001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017package ca.uhn.fhir.model.dstu2.resource; 018 019import java.math.BigDecimal; 020import java.net.URI; 021import java.util.*; 022import ca.uhn.fhir.model.api.*; 023import ca.uhn.fhir.model.api.annotation.*; 024import ca.uhn.fhir.rest.gclient.*; 025 026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum; 027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum; 028import ca.uhn.fhir.model.dstu2.composite.AddressDt; 029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum; 030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum; 031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum; 032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum; 033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum; 034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance; 035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum; 036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum; 037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum; 038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum; 039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum; 040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum; 041import ca.uhn.fhir.model.dstu2.valueset.AnimalSpeciesEnum; 042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt; 043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum; 044import ca.uhn.fhir.model.dstu2.resource.Appointment; 045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum; 046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum; 047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum; 048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum; 049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt; 050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum; 051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum; 052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum; 053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum; 054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum; 055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum; 056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum; 057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum; 058import ca.uhn.fhir.model.dstu2.resource.BodySite; 059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum; 060import ca.uhn.fhir.model.dstu2.resource.CarePlan; 061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum; 062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum; 063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum; 064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum; 065import ca.uhn.fhir.model.dstu2.resource.Claim; 066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse; 067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum; 068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression; 069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum; 070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; 071import ca.uhn.fhir.model.dstu2.composite.CodingDt; 072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest; 073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum; 074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum; 075import ca.uhn.fhir.model.dstu2.resource.Composition; 076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum; 077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum; 078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum; 079import ca.uhn.fhir.model.dstu2.resource.Condition; 080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum; 081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum; 082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum; 083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum; 084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum; 085import ca.uhn.fhir.model.dstu2.resource.Conformance; 086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum; 087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum; 088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum; 089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt; 090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum; 091import ca.uhn.fhir.model.dstu2.resource.Contract; 092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum; 093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum; 094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum; 095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum; 096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum; 097import ca.uhn.fhir.model.dstu2.resource.Coverage; 098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum; 099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum; 100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum; 101import ca.uhn.fhir.model.dstu2.resource.Device; 102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent; 103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric; 104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum; 105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum; 106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum; 107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum; 108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum; 109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum; 110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest; 111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum; 112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum; 113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder; 114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum; 115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum; 116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport; 117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum; 118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum; 119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum; 120import ca.uhn.fhir.model.dstu2.resource.DocumentReference; 121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum; 122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum; 123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt; 124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest; 125import ca.uhn.fhir.model.dstu2.resource.Encounter; 126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum; 127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum; 128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum; 129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum; 130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest; 131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum; 132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare; 133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum; 134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum; 135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum; 136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum; 137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory; 138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum; 139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum; 140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum; 141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum; 142import ca.uhn.fhir.model.dstu2.resource.Goal; 143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum; 144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum; 145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum; 146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum; 147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum; 148import ca.uhn.fhir.model.dstu2.resource.Group; 149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum; 150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum; 151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum; 152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum; 153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; 154import ca.uhn.fhir.model.dstu2.resource.HealthcareService; 155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; 156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; 157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum; 158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum; 159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection; 160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy; 161import ca.uhn.fhir.model.dstu2.resource.Immunization; 162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum; 163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum; 164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum; 165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum; 166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum; 167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum; 168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum; 169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum; 170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum; 171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum; 172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum; 173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum; 174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum; 175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum; 176import ca.uhn.fhir.model.dstu2.resource.Location; 177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum; 178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum; 179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum; 180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum; 181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum; 182import ca.uhn.fhir.model.dstu2.resource.Media; 183import ca.uhn.fhir.model.dstu2.resource.Medication; 184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum; 185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum; 186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder; 187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum; 188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement; 189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum; 190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum; 191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum; 192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum; 193import ca.uhn.fhir.model.dstu2.resource.NamingSystem; 194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum; 195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum; 196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum; 197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum; 198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder; 199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum; 200import ca.uhn.fhir.model.dstu2.resource.Observation; 201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum; 202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum; 203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum; 204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition; 205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum; 206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; 207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum; 208import ca.uhn.fhir.model.dstu2.resource.Order; 209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum; 210import ca.uhn.fhir.model.dstu2.resource.Organization; 211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum; 212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum; 213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum; 214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum; 215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum; 216import ca.uhn.fhir.model.dstu2.resource.Patient; 217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum; 218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum; 219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum; 220import ca.uhn.fhir.model.dstu2.composite.PeriodDt; 221import ca.uhn.fhir.model.dstu2.resource.Person; 222import ca.uhn.fhir.model.dstu2.resource.Practitioner; 223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum; 224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum; 225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum; 226import ca.uhn.fhir.model.dstu2.resource.Procedure; 227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest; 228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum; 229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum; 230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum; 231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest; 232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum; 233import ca.uhn.fhir.model.dstu2.composite.QuantityDt; 234import ca.uhn.fhir.model.dstu2.resource.Questionnaire; 235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse; 236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum; 237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum; 238import ca.uhn.fhir.model.dstu2.composite.RangeDt; 239import ca.uhn.fhir.model.dstu2.composite.RatioDt; 240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum; 241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest; 242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum; 243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson; 244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum; 245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum; 246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum; 247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum; 248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum; 249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum; 250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment; 251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum; 252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt; 253import ca.uhn.fhir.model.dstu2.resource.Schedule; 254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum; 255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum; 256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum; 257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum; 258import ca.uhn.fhir.model.dstu2.composite.SignatureDt; 259import ca.uhn.fhir.model.dstu2.resource.Slot; 260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum; 261import ca.uhn.fhir.model.dstu2.resource.Specimen; 262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum; 263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum; 264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition; 265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum; 266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum; 267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum; 268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum; 269import ca.uhn.fhir.model.dstu2.resource.Substance; 270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum; 271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum; 272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum; 273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest; 274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum; 275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum; 276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum; 277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum; 278import ca.uhn.fhir.model.api.TemporalPrecisionEnum; 279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum; 280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum; 281import ca.uhn.fhir.model.dstu2.composite.TimingDt; 282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum; 283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum; 284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum; 285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum; 286import ca.uhn.fhir.model.dstu2.valueset.UseEnum; 287import ca.uhn.fhir.model.dstu2.resource.ValueSet; 288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum; 289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum; 290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription; 291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum; 292import ca.uhn.fhir.model.api.IResource; 293import ca.uhn.fhir.model.dstu2.composite.AgeDt; 294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt; 295import ca.uhn.fhir.model.dstu2.composite.DurationDt; 296import ca.uhn.fhir.model.dstu2.composite.MoneyDt; 297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt; 298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; 299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt; 300import ca.uhn.fhir.model.primitive.Base64BinaryDt; 301import ca.uhn.fhir.model.primitive.BooleanDt; 302import ca.uhn.fhir.model.primitive.BoundCodeDt; 303import ca.uhn.fhir.model.primitive.CodeDt; 304import ca.uhn.fhir.model.primitive.DateDt; 305import ca.uhn.fhir.model.primitive.DateTimeDt; 306import ca.uhn.fhir.model.primitive.DecimalDt; 307import ca.uhn.fhir.model.primitive.IdDt; 308import ca.uhn.fhir.model.primitive.InstantDt; 309import ca.uhn.fhir.model.primitive.IntegerDt; 310import ca.uhn.fhir.model.primitive.OidDt; 311import ca.uhn.fhir.model.primitive.PositiveIntDt; 312import ca.uhn.fhir.model.primitive.StringDt; 313import ca.uhn.fhir.model.primitive.TimeDt; 314import ca.uhn.fhir.model.primitive.UnsignedIntDt; 315import ca.uhn.fhir.model.primitive.UriDt; 316 317 318/** 319 * HAPI/FHIR <b>Medication</b> Resource 320 * (clinical.medication) 321 * 322 * <p> 323 * <b>Definition:</b> 324 * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. 325 * </p> 326 * 327 * <p> 328 * <b>Requirements:</b> 329 * 330 * </p> 331 * 332 * <p> 333 * <b>Profile Definition:</b> 334 * <a href="http://hl7.org/fhir/profiles/Medication">http://hl7.org/fhir/profiles/Medication</a> 335 * </p> 336 * 337 */ 338@ResourceDef(name="Medication", profile="http://hl7.org/fhir/profiles/Medication", id="medication") 339public class Medication extends ca.uhn.fhir.model.dstu2.resource.BaseResource 340 implements IResource { 341 342 /** 343 * Search parameter constant for <b>code</b> 344 * <p> 345 * Description: <b></b><br> 346 * Type: <b>token</b><br> 347 * Path: <b>Medication.code</b><br> 348 * </p> 349 */ 350 @SearchParamDefinition(name="code", path="Medication.code", description="", type="token" ) 351 public static final String SP_CODE = "code"; 352 353 /** 354 * <b>Fluent Client</b> search parameter constant for <b>code</b> 355 * <p> 356 * Description: <b></b><br> 357 * Type: <b>token</b><br> 358 * Path: <b>Medication.code</b><br> 359 * </p> 360 */ 361 public static final TokenClientParam CODE = new TokenClientParam(SP_CODE); 362 363 /** 364 * Search parameter constant for <b>manufacturer</b> 365 * <p> 366 * Description: <b></b><br> 367 * Type: <b>reference</b><br> 368 * Path: <b>Medication.manufacturer</b><br> 369 * </p> 370 */ 371 @SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="", type="reference" ) 372 public static final String SP_MANUFACTURER = "manufacturer"; 373 374 /** 375 * <b>Fluent Client</b> search parameter constant for <b>manufacturer</b> 376 * <p> 377 * Description: <b></b><br> 378 * Type: <b>reference</b><br> 379 * Path: <b>Medication.manufacturer</b><br> 380 * </p> 381 */ 382 public static final ReferenceClientParam MANUFACTURER = new ReferenceClientParam(SP_MANUFACTURER); 383 384 /** 385 * Search parameter constant for <b>form</b> 386 * <p> 387 * Description: <b></b><br> 388 * Type: <b>token</b><br> 389 * Path: <b>Medication.product.form</b><br> 390 * </p> 391 */ 392 @SearchParamDefinition(name="form", path="Medication.product.form", description="", type="token" ) 393 public static final String SP_FORM = "form"; 394 395 /** 396 * <b>Fluent Client</b> search parameter constant for <b>form</b> 397 * <p> 398 * Description: <b></b><br> 399 * Type: <b>token</b><br> 400 * Path: <b>Medication.product.form</b><br> 401 * </p> 402 */ 403 public static final TokenClientParam FORM = new TokenClientParam(SP_FORM); 404 405 /** 406 * Search parameter constant for <b>ingredient</b> 407 * <p> 408 * Description: <b></b><br> 409 * Type: <b>reference</b><br> 410 * Path: <b>Medication.product.ingredient.item</b><br> 411 * </p> 412 */ 413 @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="", type="reference" ) 414 public static final String SP_INGREDIENT = "ingredient"; 415 416 /** 417 * <b>Fluent Client</b> search parameter constant for <b>ingredient</b> 418 * <p> 419 * Description: <b></b><br> 420 * Type: <b>reference</b><br> 421 * Path: <b>Medication.product.ingredient.item</b><br> 422 * </p> 423 */ 424 public static final ReferenceClientParam INGREDIENT = new ReferenceClientParam(SP_INGREDIENT); 425 426 /** 427 * Search parameter constant for <b>container</b> 428 * <p> 429 * Description: <b></b><br> 430 * Type: <b>token</b><br> 431 * Path: <b>Medication.package.container</b><br> 432 * </p> 433 */ 434 @SearchParamDefinition(name="container", path="Medication.package.container", description="", type="token" ) 435 public static final String SP_CONTAINER = "container"; 436 437 /** 438 * <b>Fluent Client</b> search parameter constant for <b>container</b> 439 * <p> 440 * Description: <b></b><br> 441 * Type: <b>token</b><br> 442 * Path: <b>Medication.package.container</b><br> 443 * </p> 444 */ 445 public static final TokenClientParam CONTAINER = new TokenClientParam(SP_CONTAINER); 446 447 /** 448 * Search parameter constant for <b>content</b> 449 * <p> 450 * Description: <b></b><br> 451 * Type: <b>reference</b><br> 452 * Path: <b>Medication.package.content.item</b><br> 453 * </p> 454 */ 455 @SearchParamDefinition(name="content", path="Medication.package.content.item", description="", type="reference" ) 456 public static final String SP_CONTENT = "content"; 457 458 /** 459 * <b>Fluent Client</b> search parameter constant for <b>content</b> 460 * <p> 461 * Description: <b></b><br> 462 * Type: <b>reference</b><br> 463 * Path: <b>Medication.package.content.item</b><br> 464 * </p> 465 */ 466 public static final ReferenceClientParam CONTENT = new ReferenceClientParam(SP_CONTENT); 467 468 469 /** 470 * Constant for fluent queries to be used to add include statements. Specifies 471 * the path value of "<b>Medication:content</b>". 472 */ 473 public static final Include INCLUDE_CONTENT = new Include("Medication:content"); 474 475 /** 476 * Constant for fluent queries to be used to add include statements. Specifies 477 * the path value of "<b>Medication:ingredient</b>". 478 */ 479 public static final Include INCLUDE_INGREDIENT = new Include("Medication:ingredient"); 480 481 /** 482 * Constant for fluent queries to be used to add include statements. Specifies 483 * the path value of "<b>Medication:manufacturer</b>". 484 */ 485 public static final Include INCLUDE_MANUFACTURER = new Include("Medication:manufacturer"); 486 487 488 @Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=true, modifier=false) 489 @Description( 490 shortDefinition="class", 491 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." 492 ) 493 private CodeableConceptDt myCode; 494 495 @Child(name="isBrand", type=BooleanDt.class, order=1, min=0, max=1, summary=true, modifier=false) 496 @Description( 497 shortDefinition="class", 498 formalDefinition="Set to true if the item is attributable to a specific manufacturer." 499 ) 500 private BooleanDt myIsBrand; 501 502 @Child(name="manufacturer", order=2, min=0, max=1, summary=true, modifier=false, type={ 503 ca.uhn.fhir.model.dstu2.resource.Organization.class }) 504 @Description( 505 shortDefinition="who.actor", 506 formalDefinition="Describes the details of the manufacturer" 507 ) 508 private ResourceReferenceDt myManufacturer; 509 510 @Child(name="product", order=3, min=0, max=1, summary=false, modifier=false) 511 @Description( 512 shortDefinition="", 513 formalDefinition="Information that only applies to products (not packages)" 514 ) 515 private Product myProduct; 516 517 @Child(name="package", order=4, min=0, max=1, summary=false, modifier=false) 518 @Description( 519 shortDefinition="", 520 formalDefinition="Information that only applies to packages (not products)" 521 ) 522 private Package myPackage; 523 524 525 @Override 526 public boolean isEmpty() { 527 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myIsBrand, myManufacturer, myProduct, myPackage); 528 } 529 530 @Override 531 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 532 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myIsBrand, myManufacturer, myProduct, myPackage); 533 } 534 535 /** 536 * Gets the value(s) for <b>code</b> (class). 537 * creating it if it does 538 * not exist. Will not return <code>null</code>. 539 * 540 * <p> 541 * <b>Definition:</b> 542 * 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. 543 * </p> 544 */ 545 public CodeableConceptDt getCode() { 546 if (myCode == null) { 547 myCode = new CodeableConceptDt(); 548 } 549 return myCode; 550 } 551 552 /** 553 * Sets the value(s) for <b>code</b> (class) 554 * 555 * <p> 556 * <b>Definition:</b> 557 * 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. 558 * </p> 559 */ 560 public Medication setCode(CodeableConceptDt theValue) { 561 myCode = theValue; 562 return this; 563 } 564 565 566 567 568 /** 569 * Gets the value(s) for <b>isBrand</b> (class). 570 * creating it if it does 571 * not exist. Will not return <code>null</code>. 572 * 573 * <p> 574 * <b>Definition:</b> 575 * Set to true if the item is attributable to a specific manufacturer. 576 * </p> 577 */ 578 public BooleanDt getIsBrandElement() { 579 if (myIsBrand == null) { 580 myIsBrand = new BooleanDt(); 581 } 582 return myIsBrand; 583 } 584 585 586 /** 587 * Gets the value(s) for <b>isBrand</b> (class). 588 * creating it if it does 589 * not exist. Will not return <code>null</code>. 590 * 591 * <p> 592 * <b>Definition:</b> 593 * Set to true if the item is attributable to a specific manufacturer. 594 * </p> 595 */ 596 public Boolean getIsBrand() { 597 return getIsBrandElement().getValue(); 598 } 599 600 /** 601 * Sets the value(s) for <b>isBrand</b> (class) 602 * 603 * <p> 604 * <b>Definition:</b> 605 * Set to true if the item is attributable to a specific manufacturer. 606 * </p> 607 */ 608 public Medication setIsBrand(BooleanDt theValue) { 609 myIsBrand = theValue; 610 return this; 611 } 612 613 614 615 /** 616 * Sets the value for <b>isBrand</b> (class) 617 * 618 * <p> 619 * <b>Definition:</b> 620 * Set to true if the item is attributable to a specific manufacturer. 621 * </p> 622 */ 623 public Medication setIsBrand( boolean theBoolean) { 624 myIsBrand = new BooleanDt(theBoolean); 625 return this; 626 } 627 628 629 /** 630 * Gets the value(s) for <b>manufacturer</b> (who.actor). 631 * creating it if it does 632 * not exist. Will not return <code>null</code>. 633 * 634 * <p> 635 * <b>Definition:</b> 636 * Describes the details of the manufacturer 637 * </p> 638 */ 639 public ResourceReferenceDt getManufacturer() { 640 if (myManufacturer == null) { 641 myManufacturer = new ResourceReferenceDt(); 642 } 643 return myManufacturer; 644 } 645 646 /** 647 * Sets the value(s) for <b>manufacturer</b> (who.actor) 648 * 649 * <p> 650 * <b>Definition:</b> 651 * Describes the details of the manufacturer 652 * </p> 653 */ 654 public Medication setManufacturer(ResourceReferenceDt theValue) { 655 myManufacturer = theValue; 656 return this; 657 } 658 659 660 661 662 /** 663 * Gets the value(s) for <b>product</b> (). 664 * creating it if it does 665 * not exist. Will not return <code>null</code>. 666 * 667 * <p> 668 * <b>Definition:</b> 669 * Information that only applies to products (not packages) 670 * </p> 671 */ 672 public Product getProduct() { 673 if (myProduct == null) { 674 myProduct = new Product(); 675 } 676 return myProduct; 677 } 678 679 /** 680 * Sets the value(s) for <b>product</b> () 681 * 682 * <p> 683 * <b>Definition:</b> 684 * Information that only applies to products (not packages) 685 * </p> 686 */ 687 public Medication setProduct(Product theValue) { 688 myProduct = theValue; 689 return this; 690 } 691 692 693 694 695 /** 696 * Gets the value(s) for <b>package</b> (). 697 * creating it if it does 698 * not exist. Will not return <code>null</code>. 699 * 700 * <p> 701 * <b>Definition:</b> 702 * Information that only applies to packages (not products) 703 * </p> 704 */ 705 public Package getPackage() { 706 if (myPackage == null) { 707 myPackage = new Package(); 708 } 709 return myPackage; 710 } 711 712 /** 713 * Sets the value(s) for <b>package</b> () 714 * 715 * <p> 716 * <b>Definition:</b> 717 * Information that only applies to packages (not products) 718 * </p> 719 */ 720 public Medication setPackage(Package theValue) { 721 myPackage = theValue; 722 return this; 723 } 724 725 726 727 728 /** 729 * Block class for child element: <b>Medication.product</b> () 730 * 731 * <p> 732 * <b>Definition:</b> 733 * Information that only applies to products (not packages) 734 * </p> 735 */ 736 @Block() 737 public static class Product 738 extends BaseIdentifiableElement implements IResourceBlock { 739 740 @Child(name="form", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false) 741 @Description( 742 shortDefinition="", 743 formalDefinition="Describes the form of the item. Powder; tablets; carton" 744 ) 745 private CodeableConceptDt myForm; 746 747 @Child(name="ingredient", order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 748 @Description( 749 shortDefinition="", 750 formalDefinition="Identifies a particular constituent of interest in the product" 751 ) 752 private java.util.List<ProductIngredient> myIngredient; 753 754 @Child(name="batch", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 755 @Description( 756 shortDefinition="", 757 formalDefinition="Information about a group of medication produced or packaged from one production run." 758 ) 759 private java.util.List<ProductBatch> myBatch; 760 761 762 @Override 763 public boolean isEmpty() { 764 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myForm, myIngredient, myBatch); 765 } 766 767 @Override 768 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 769 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myForm, myIngredient, myBatch); 770 } 771 772 /** 773 * Gets the value(s) for <b>form</b> (). 774 * creating it if it does 775 * not exist. Will not return <code>null</code>. 776 * 777 * <p> 778 * <b>Definition:</b> 779 * Describes the form of the item. Powder; tablets; carton 780 * </p> 781 */ 782 public CodeableConceptDt getForm() { 783 if (myForm == null) { 784 myForm = new CodeableConceptDt(); 785 } 786 return myForm; 787 } 788 789 /** 790 * Sets the value(s) for <b>form</b> () 791 * 792 * <p> 793 * <b>Definition:</b> 794 * Describes the form of the item. Powder; tablets; carton 795 * </p> 796 */ 797 public Product setForm(CodeableConceptDt theValue) { 798 myForm = theValue; 799 return this; 800 } 801 802 803 804 805 /** 806 * Gets the value(s) for <b>ingredient</b> (). 807 * creating it if it does 808 * not exist. Will not return <code>null</code>. 809 * 810 * <p> 811 * <b>Definition:</b> 812 * Identifies a particular constituent of interest in the product 813 * </p> 814 */ 815 public java.util.List<ProductIngredient> getIngredient() { 816 if (myIngredient == null) { 817 myIngredient = new java.util.ArrayList<ProductIngredient>(); 818 } 819 return myIngredient; 820 } 821 822 /** 823 * Sets the value(s) for <b>ingredient</b> () 824 * 825 * <p> 826 * <b>Definition:</b> 827 * Identifies a particular constituent of interest in the product 828 * </p> 829 */ 830 public Product setIngredient(java.util.List<ProductIngredient> theValue) { 831 myIngredient = theValue; 832 return this; 833 } 834 835 836 837 /** 838 * Adds and returns a new value for <b>ingredient</b> () 839 * 840 * <p> 841 * <b>Definition:</b> 842 * Identifies a particular constituent of interest in the product 843 * </p> 844 */ 845 public ProductIngredient addIngredient() { 846 ProductIngredient newType = new ProductIngredient(); 847 getIngredient().add(newType); 848 return newType; 849 } 850 851 /** 852 * Adds a given new value for <b>ingredient</b> () 853 * 854 * <p> 855 * <b>Definition:</b> 856 * Identifies a particular constituent of interest in the product 857 * </p> 858 * @param theValue The ingredient to add (must not be <code>null</code>) 859 */ 860 public Product addIngredient(ProductIngredient theValue) { 861 if (theValue == null) { 862 throw new NullPointerException("theValue must not be null"); 863 } 864 getIngredient().add(theValue); 865 return this; 866 } 867 868 /** 869 * Gets the first repetition for <b>ingredient</b> (), 870 * creating it if it does not already exist. 871 * 872 * <p> 873 * <b>Definition:</b> 874 * Identifies a particular constituent of interest in the product 875 * </p> 876 */ 877 public ProductIngredient getIngredientFirstRep() { 878 if (getIngredient().isEmpty()) { 879 return addIngredient(); 880 } 881 return getIngredient().get(0); 882 } 883 884 /** 885 * Gets the value(s) for <b>batch</b> (). 886 * creating it if it does 887 * not exist. Will not return <code>null</code>. 888 * 889 * <p> 890 * <b>Definition:</b> 891 * Information about a group of medication produced or packaged from one production run. 892 * </p> 893 */ 894 public java.util.List<ProductBatch> getBatch() { 895 if (myBatch == null) { 896 myBatch = new java.util.ArrayList<ProductBatch>(); 897 } 898 return myBatch; 899 } 900 901 /** 902 * Sets the value(s) for <b>batch</b> () 903 * 904 * <p> 905 * <b>Definition:</b> 906 * Information about a group of medication produced or packaged from one production run. 907 * </p> 908 */ 909 public Product setBatch(java.util.List<ProductBatch> theValue) { 910 myBatch = theValue; 911 return this; 912 } 913 914 915 916 /** 917 * Adds and returns a new value for <b>batch</b> () 918 * 919 * <p> 920 * <b>Definition:</b> 921 * Information about a group of medication produced or packaged from one production run. 922 * </p> 923 */ 924 public ProductBatch addBatch() { 925 ProductBatch newType = new ProductBatch(); 926 getBatch().add(newType); 927 return newType; 928 } 929 930 /** 931 * Adds a given new value for <b>batch</b> () 932 * 933 * <p> 934 * <b>Definition:</b> 935 * Information about a group of medication produced or packaged from one production run. 936 * </p> 937 * @param theValue The batch to add (must not be <code>null</code>) 938 */ 939 public Product addBatch(ProductBatch theValue) { 940 if (theValue == null) { 941 throw new NullPointerException("theValue must not be null"); 942 } 943 getBatch().add(theValue); 944 return this; 945 } 946 947 /** 948 * Gets the first repetition for <b>batch</b> (), 949 * creating it if it does not already exist. 950 * 951 * <p> 952 * <b>Definition:</b> 953 * Information about a group of medication produced or packaged from one production run. 954 * </p> 955 */ 956 public ProductBatch getBatchFirstRep() { 957 if (getBatch().isEmpty()) { 958 return addBatch(); 959 } 960 return getBatch().get(0); 961 } 962 963 964 965 } 966 967 /** 968 * Block class for child element: <b>Medication.product.ingredient</b> () 969 * 970 * <p> 971 * <b>Definition:</b> 972 * Identifies a particular constituent of interest in the product 973 * </p> 974 */ 975 @Block() 976 public static class ProductIngredient 977 extends BaseIdentifiableElement implements IResourceBlock { 978 979 @Child(name="item", order=0, min=1, max=1, summary=false, modifier=false, type={ 980 ca.uhn.fhir.model.dstu2.resource.Substance.class, ca.uhn.fhir.model.dstu2.resource.Medication.class }) 981 @Description( 982 shortDefinition="", 983 formalDefinition="The actual ingredient - either a substance (simple ingredient) or another medication" 984 ) 985 private ResourceReferenceDt myItem; 986 987 @Child(name="amount", type=RatioDt.class, order=1, min=0, max=1, summary=false, modifier=false) 988 @Description( 989 shortDefinition="", 990 formalDefinition="Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet" 991 ) 992 private RatioDt myAmount; 993 994 995 @Override 996 public boolean isEmpty() { 997 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myItem, myAmount); 998 } 999 1000 @Override 1001 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 1002 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myItem, myAmount); 1003 } 1004 1005 /** 1006 * Gets the value(s) for <b>item</b> (). 1007 * creating it if it does 1008 * not exist. Will not return <code>null</code>. 1009 * 1010 * <p> 1011 * <b>Definition:</b> 1012 * The actual ingredient - either a substance (simple ingredient) or another medication 1013 * </p> 1014 */ 1015 public ResourceReferenceDt getItem() { 1016 if (myItem == null) { 1017 myItem = new ResourceReferenceDt(); 1018 } 1019 return myItem; 1020 } 1021 1022 /** 1023 * Sets the value(s) for <b>item</b> () 1024 * 1025 * <p> 1026 * <b>Definition:</b> 1027 * The actual ingredient - either a substance (simple ingredient) or another medication 1028 * </p> 1029 */ 1030 public ProductIngredient setItem(ResourceReferenceDt theValue) { 1031 myItem = theValue; 1032 return this; 1033 } 1034 1035 1036 1037 1038 /** 1039 * Gets the value(s) for <b>amount</b> (). 1040 * creating it if it does 1041 * not exist. Will not return <code>null</code>. 1042 * 1043 * <p> 1044 * <b>Definition:</b> 1045 * Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet 1046 * </p> 1047 */ 1048 public RatioDt getAmount() { 1049 if (myAmount == null) { 1050 myAmount = new RatioDt(); 1051 } 1052 return myAmount; 1053 } 1054 1055 /** 1056 * Sets the value(s) for <b>amount</b> () 1057 * 1058 * <p> 1059 * <b>Definition:</b> 1060 * Specifies how many (or how much) of the items there are in this Medication. For example, 250 mg per tablet 1061 * </p> 1062 */ 1063 public ProductIngredient setAmount(RatioDt theValue) { 1064 myAmount = theValue; 1065 return this; 1066 } 1067 1068 1069 1070 1071 1072 1073 } 1074 1075 1076 /** 1077 * Block class for child element: <b>Medication.product.batch</b> () 1078 * 1079 * <p> 1080 * <b>Definition:</b> 1081 * Information about a group of medication produced or packaged from one production run. 1082 * </p> 1083 */ 1084 @Block() 1085 public static class ProductBatch 1086 extends BaseIdentifiableElement implements IResourceBlock { 1087 1088 @Child(name="lotNumber", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false) 1089 @Description( 1090 shortDefinition="", 1091 formalDefinition="The assigned lot number of a batch of the specified product." 1092 ) 1093 private StringDt myLotNumber; 1094 1095 @Child(name="expirationDate", type=DateTimeDt.class, order=1, min=0, max=1, summary=false, modifier=false) 1096 @Description( 1097 shortDefinition="", 1098 formalDefinition="When this specific batch of product will expire." 1099 ) 1100 private DateTimeDt myExpirationDate; 1101 1102 1103 @Override 1104 public boolean isEmpty() { 1105 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLotNumber, myExpirationDate); 1106 } 1107 1108 @Override 1109 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 1110 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLotNumber, myExpirationDate); 1111 } 1112 1113 /** 1114 * Gets the value(s) for <b>lotNumber</b> (). 1115 * creating it if it does 1116 * not exist. Will not return <code>null</code>. 1117 * 1118 * <p> 1119 * <b>Definition:</b> 1120 * The assigned lot number of a batch of the specified product. 1121 * </p> 1122 */ 1123 public StringDt getLotNumberElement() { 1124 if (myLotNumber == null) { 1125 myLotNumber = new StringDt(); 1126 } 1127 return myLotNumber; 1128 } 1129 1130 1131 /** 1132 * Gets the value(s) for <b>lotNumber</b> (). 1133 * creating it if it does 1134 * not exist. Will not return <code>null</code>. 1135 * 1136 * <p> 1137 * <b>Definition:</b> 1138 * The assigned lot number of a batch of the specified product. 1139 * </p> 1140 */ 1141 public String getLotNumber() { 1142 return getLotNumberElement().getValue(); 1143 } 1144 1145 /** 1146 * Sets the value(s) for <b>lotNumber</b> () 1147 * 1148 * <p> 1149 * <b>Definition:</b> 1150 * The assigned lot number of a batch of the specified product. 1151 * </p> 1152 */ 1153 public ProductBatch setLotNumber(StringDt theValue) { 1154 myLotNumber = theValue; 1155 return this; 1156 } 1157 1158 1159 1160 /** 1161 * Sets the value for <b>lotNumber</b> () 1162 * 1163 * <p> 1164 * <b>Definition:</b> 1165 * The assigned lot number of a batch of the specified product. 1166 * </p> 1167 */ 1168 public ProductBatch setLotNumber( String theString) { 1169 myLotNumber = new StringDt(theString); 1170 return this; 1171 } 1172 1173 1174 /** 1175 * Gets the value(s) for <b>expirationDate</b> (). 1176 * creating it if it does 1177 * not exist. Will not return <code>null</code>. 1178 * 1179 * <p> 1180 * <b>Definition:</b> 1181 * When this specific batch of product will expire. 1182 * </p> 1183 */ 1184 public DateTimeDt getExpirationDateElement() { 1185 if (myExpirationDate == null) { 1186 myExpirationDate = new DateTimeDt(); 1187 } 1188 return myExpirationDate; 1189 } 1190 1191 1192 /** 1193 * Gets the value(s) for <b>expirationDate</b> (). 1194 * creating it if it does 1195 * not exist. Will not return <code>null</code>. 1196 * 1197 * <p> 1198 * <b>Definition:</b> 1199 * When this specific batch of product will expire. 1200 * </p> 1201 */ 1202 public Date getExpirationDate() { 1203 return getExpirationDateElement().getValue(); 1204 } 1205 1206 /** 1207 * Sets the value(s) for <b>expirationDate</b> () 1208 * 1209 * <p> 1210 * <b>Definition:</b> 1211 * When this specific batch of product will expire. 1212 * </p> 1213 */ 1214 public ProductBatch setExpirationDate(DateTimeDt theValue) { 1215 myExpirationDate = theValue; 1216 return this; 1217 } 1218 1219 1220 1221 /** 1222 * Sets the value for <b>expirationDate</b> () 1223 * 1224 * <p> 1225 * <b>Definition:</b> 1226 * When this specific batch of product will expire. 1227 * </p> 1228 */ 1229 public ProductBatch setExpirationDate( Date theDate, TemporalPrecisionEnum thePrecision) { 1230 myExpirationDate = new DateTimeDt(theDate, thePrecision); 1231 return this; 1232 } 1233 1234 /** 1235 * Sets the value for <b>expirationDate</b> () 1236 * 1237 * <p> 1238 * <b>Definition:</b> 1239 * When this specific batch of product will expire. 1240 * </p> 1241 */ 1242 public ProductBatch setExpirationDateWithSecondsPrecision( Date theDate) { 1243 myExpirationDate = new DateTimeDt(theDate); 1244 return this; 1245 } 1246 1247 1248 1249 1250 } 1251 1252 1253 1254 /** 1255 * Block class for child element: <b>Medication.package</b> () 1256 * 1257 * <p> 1258 * <b>Definition:</b> 1259 * Information that only applies to packages (not products) 1260 * </p> 1261 */ 1262 @Block() 1263 public static class Package 1264 extends BaseIdentifiableElement implements IResourceBlock { 1265 1266 @Child(name="container", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false) 1267 @Description( 1268 shortDefinition="", 1269 formalDefinition="The kind of container that this package comes as" 1270 ) 1271 private CodeableConceptDt myContainer; 1272 1273 @Child(name="content", order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 1274 @Description( 1275 shortDefinition="", 1276 formalDefinition="A set of components that go to make up the described item." 1277 ) 1278 private java.util.List<PackageContent> myContent; 1279 1280 1281 @Override 1282 public boolean isEmpty() { 1283 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContainer, myContent); 1284 } 1285 1286 @Override 1287 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 1288 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContainer, myContent); 1289 } 1290 1291 /** 1292 * Gets the value(s) for <b>container</b> (). 1293 * creating it if it does 1294 * not exist. Will not return <code>null</code>. 1295 * 1296 * <p> 1297 * <b>Definition:</b> 1298 * The kind of container that this package comes as 1299 * </p> 1300 */ 1301 public CodeableConceptDt getContainer() { 1302 if (myContainer == null) { 1303 myContainer = new CodeableConceptDt(); 1304 } 1305 return myContainer; 1306 } 1307 1308 /** 1309 * Sets the value(s) for <b>container</b> () 1310 * 1311 * <p> 1312 * <b>Definition:</b> 1313 * The kind of container that this package comes as 1314 * </p> 1315 */ 1316 public Package setContainer(CodeableConceptDt theValue) { 1317 myContainer = theValue; 1318 return this; 1319 } 1320 1321 1322 1323 1324 /** 1325 * Gets the value(s) for <b>content</b> (). 1326 * creating it if it does 1327 * not exist. Will not return <code>null</code>. 1328 * 1329 * <p> 1330 * <b>Definition:</b> 1331 * A set of components that go to make up the described item. 1332 * </p> 1333 */ 1334 public java.util.List<PackageContent> getContent() { 1335 if (myContent == null) { 1336 myContent = new java.util.ArrayList<PackageContent>(); 1337 } 1338 return myContent; 1339 } 1340 1341 /** 1342 * Sets the value(s) for <b>content</b> () 1343 * 1344 * <p> 1345 * <b>Definition:</b> 1346 * A set of components that go to make up the described item. 1347 * </p> 1348 */ 1349 public Package setContent(java.util.List<PackageContent> theValue) { 1350 myContent = theValue; 1351 return this; 1352 } 1353 1354 1355 1356 /** 1357 * Adds and returns a new value for <b>content</b> () 1358 * 1359 * <p> 1360 * <b>Definition:</b> 1361 * A set of components that go to make up the described item. 1362 * </p> 1363 */ 1364 public PackageContent addContent() { 1365 PackageContent newType = new PackageContent(); 1366 getContent().add(newType); 1367 return newType; 1368 } 1369 1370 /** 1371 * Adds a given new value for <b>content</b> () 1372 * 1373 * <p> 1374 * <b>Definition:</b> 1375 * A set of components that go to make up the described item. 1376 * </p> 1377 * @param theValue The content to add (must not be <code>null</code>) 1378 */ 1379 public Package addContent(PackageContent theValue) { 1380 if (theValue == null) { 1381 throw new NullPointerException("theValue must not be null"); 1382 } 1383 getContent().add(theValue); 1384 return this; 1385 } 1386 1387 /** 1388 * Gets the first repetition for <b>content</b> (), 1389 * creating it if it does not already exist. 1390 * 1391 * <p> 1392 * <b>Definition:</b> 1393 * A set of components that go to make up the described item. 1394 * </p> 1395 */ 1396 public PackageContent getContentFirstRep() { 1397 if (getContent().isEmpty()) { 1398 return addContent(); 1399 } 1400 return getContent().get(0); 1401 } 1402 1403 1404 1405 } 1406 1407 /** 1408 * Block class for child element: <b>Medication.package.content</b> () 1409 * 1410 * <p> 1411 * <b>Definition:</b> 1412 * A set of components that go to make up the described item. 1413 * </p> 1414 */ 1415 @Block() 1416 public static class PackageContent 1417 extends BaseIdentifiableElement implements IResourceBlock { 1418 1419 @Child(name="item", order=0, min=1, max=1, summary=false, modifier=false, type={ 1420 ca.uhn.fhir.model.dstu2.resource.Medication.class }) 1421 @Description( 1422 shortDefinition="", 1423 formalDefinition="Identifies one of the items in the package" 1424 ) 1425 private ResourceReferenceDt myItem; 1426 1427 @Child(name="amount", type=SimpleQuantityDt.class, order=1, min=0, max=1, summary=false, modifier=false) 1428 @Description( 1429 shortDefinition="", 1430 formalDefinition="The amount of the product that is in the package" 1431 ) 1432 private SimpleQuantityDt myAmount; 1433 1434 1435 @Override 1436 public boolean isEmpty() { 1437 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myItem, myAmount); 1438 } 1439 1440 @Override 1441 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 1442 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myItem, myAmount); 1443 } 1444 1445 /** 1446 * Gets the value(s) for <b>item</b> (). 1447 * creating it if it does 1448 * not exist. Will not return <code>null</code>. 1449 * 1450 * <p> 1451 * <b>Definition:</b> 1452 * Identifies one of the items in the package 1453 * </p> 1454 */ 1455 public ResourceReferenceDt getItem() { 1456 if (myItem == null) { 1457 myItem = new ResourceReferenceDt(); 1458 } 1459 return myItem; 1460 } 1461 1462 /** 1463 * Sets the value(s) for <b>item</b> () 1464 * 1465 * <p> 1466 * <b>Definition:</b> 1467 * Identifies one of the items in the package 1468 * </p> 1469 */ 1470 public PackageContent setItem(ResourceReferenceDt theValue) { 1471 myItem = theValue; 1472 return this; 1473 } 1474 1475 1476 1477 1478 /** 1479 * Gets the value(s) for <b>amount</b> (). 1480 * creating it if it does 1481 * not exist. Will not return <code>null</code>. 1482 * 1483 * <p> 1484 * <b>Definition:</b> 1485 * The amount of the product that is in the package 1486 * </p> 1487 */ 1488 public SimpleQuantityDt getAmount() { 1489 if (myAmount == null) { 1490 myAmount = new SimpleQuantityDt(); 1491 } 1492 return myAmount; 1493 } 1494 1495 /** 1496 * Sets the value(s) for <b>amount</b> () 1497 * 1498 * <p> 1499 * <b>Definition:</b> 1500 * The amount of the product that is in the package 1501 * </p> 1502 */ 1503 public PackageContent setAmount(SimpleQuantityDt theValue) { 1504 myAmount = theValue; 1505 return this; 1506 } 1507 1508 1509 1510 1511 1512 1513 } 1514 1515 1516 1517 1518 1519 @Override 1520 public String getResourceName() { 1521 return "Medication"; 1522 } 1523 1524 public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() { 1525 return ca.uhn.fhir.context.FhirVersionEnum.DSTU2; 1526 } 1527 1528 1529}