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>Encounter</b> Resource 320 * (workflow.encounter) 321 * 322 * <p> 323 * <b>Definition:</b> 324 * 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. 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/Encounter">http://hl7.org/fhir/profiles/Encounter</a> 335 * </p> 336 * 337 */ 338@ResourceDef(name="Encounter", profile="http://hl7.org/fhir/profiles/Encounter", id="encounter") 339public class Encounter extends ca.uhn.fhir.model.dstu2.resource.BaseResource 340 implements IResource { 341 342 /** 343 * Search parameter constant for <b>identifier</b> 344 * <p> 345 * Description: <b></b><br> 346 * Type: <b>token</b><br> 347 * Path: <b>Encounter.identifier</b><br> 348 * </p> 349 */ 350 @SearchParamDefinition(name="identifier", path="Encounter.identifier", description="", type="token" ) 351 public static final String SP_IDENTIFIER = "identifier"; 352 353 /** 354 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 355 * <p> 356 * Description: <b></b><br> 357 * Type: <b>token</b><br> 358 * Path: <b>Encounter.identifier</b><br> 359 * </p> 360 */ 361 public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER); 362 363 /** 364 * Search parameter constant for <b>status</b> 365 * <p> 366 * Description: <b></b><br> 367 * Type: <b>token</b><br> 368 * Path: <b>Encounter.status</b><br> 369 * </p> 370 */ 371 @SearchParamDefinition(name="status", path="Encounter.status", description="", type="token" ) 372 public static final String SP_STATUS = "status"; 373 374 /** 375 * <b>Fluent Client</b> search parameter constant for <b>status</b> 376 * <p> 377 * Description: <b></b><br> 378 * Type: <b>token</b><br> 379 * Path: <b>Encounter.status</b><br> 380 * </p> 381 */ 382 public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS); 383 384 /** 385 * Search parameter constant for <b>date</b> 386 * <p> 387 * Description: <b>A date within the period the Encounter lasted</b><br> 388 * Type: <b>date</b><br> 389 * Path: <b>Encounter.period</b><br> 390 * </p> 391 */ 392 @SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted", type="date" ) 393 public static final String SP_DATE = "date"; 394 395 /** 396 * <b>Fluent Client</b> search parameter constant for <b>date</b> 397 * <p> 398 * Description: <b>A date within the period the Encounter lasted</b><br> 399 * Type: <b>date</b><br> 400 * Path: <b>Encounter.period</b><br> 401 * </p> 402 */ 403 public static final DateClientParam DATE = new DateClientParam(SP_DATE); 404 405 /** 406 * Search parameter constant for <b>patient</b> 407 * <p> 408 * Description: <b></b><br> 409 * Type: <b>reference</b><br> 410 * Path: <b>Encounter.patient</b><br> 411 * </p> 412 */ 413 @SearchParamDefinition(name="patient", path="Encounter.patient", description="", type="reference" ) 414 public static final String SP_PATIENT = "patient"; 415 416 /** 417 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 418 * <p> 419 * Description: <b></b><br> 420 * Type: <b>reference</b><br> 421 * Path: <b>Encounter.patient</b><br> 422 * </p> 423 */ 424 public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT); 425 426 /** 427 * Search parameter constant for <b>appointment</b> 428 * <p> 429 * Description: <b></b><br> 430 * Type: <b>reference</b><br> 431 * Path: <b>Encounter.appointment</b><br> 432 * </p> 433 */ 434 @SearchParamDefinition(name="appointment", path="Encounter.appointment", description="", type="reference" ) 435 public static final String SP_APPOINTMENT = "appointment"; 436 437 /** 438 * <b>Fluent Client</b> search parameter constant for <b>appointment</b> 439 * <p> 440 * Description: <b></b><br> 441 * Type: <b>reference</b><br> 442 * Path: <b>Encounter.appointment</b><br> 443 * </p> 444 */ 445 public static final ReferenceClientParam APPOINTMENT = new ReferenceClientParam(SP_APPOINTMENT); 446 447 /** 448 * Search parameter constant for <b>length</b> 449 * <p> 450 * Description: <b>Length of encounter in days</b><br> 451 * Type: <b>number</b><br> 452 * Path: <b>Encounter.length</b><br> 453 * </p> 454 */ 455 @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days", type="number" ) 456 public static final String SP_LENGTH = "length"; 457 458 /** 459 * <b>Fluent Client</b> search parameter constant for <b>length</b> 460 * <p> 461 * Description: <b>Length of encounter in days</b><br> 462 * Type: <b>number</b><br> 463 * Path: <b>Encounter.length</b><br> 464 * </p> 465 */ 466 public static final NumberClientParam LENGTH = new NumberClientParam(SP_LENGTH); 467 468 /** 469 * Search parameter constant for <b>reason</b> 470 * <p> 471 * Description: <b></b><br> 472 * Type: <b>token</b><br> 473 * Path: <b>Encounter.reason</b><br> 474 * </p> 475 */ 476 @SearchParamDefinition(name="reason", path="Encounter.reason", description="", type="token" ) 477 public static final String SP_REASON = "reason"; 478 479 /** 480 * <b>Fluent Client</b> search parameter constant for <b>reason</b> 481 * <p> 482 * Description: <b></b><br> 483 * Type: <b>token</b><br> 484 * Path: <b>Encounter.reason</b><br> 485 * </p> 486 */ 487 public static final TokenClientParam REASON = new TokenClientParam(SP_REASON); 488 489 /** 490 * Search parameter constant for <b>indication</b> 491 * <p> 492 * Description: <b></b><br> 493 * Type: <b>reference</b><br> 494 * Path: <b>Encounter.indication</b><br> 495 * </p> 496 */ 497 @SearchParamDefinition(name="indication", path="Encounter.indication", description="", type="reference" ) 498 public static final String SP_INDICATION = "indication"; 499 500 /** 501 * <b>Fluent Client</b> search parameter constant for <b>indication</b> 502 * <p> 503 * Description: <b></b><br> 504 * Type: <b>reference</b><br> 505 * Path: <b>Encounter.indication</b><br> 506 * </p> 507 */ 508 public static final ReferenceClientParam INDICATION = new ReferenceClientParam(SP_INDICATION); 509 510 /** 511 * Search parameter constant for <b>condition</b> 512 * <p> 513 * Description: <b></b><br> 514 * Type: <b>reference</b><br> 515 * Path: <b>Encounter.indication</b><br> 516 * </p> 517 */ 518 @SearchParamDefinition(name="condition", path="Encounter.indication", description="", type="reference" ) 519 public static final String SP_CONDITION = "condition"; 520 521 /** 522 * <b>Fluent Client</b> search parameter constant for <b>condition</b> 523 * <p> 524 * Description: <b></b><br> 525 * Type: <b>reference</b><br> 526 * Path: <b>Encounter.indication</b><br> 527 * </p> 528 */ 529 public static final ReferenceClientParam CONDITION = new ReferenceClientParam(SP_CONDITION); 530 531 /** 532 * Search parameter constant for <b>procedure</b> 533 * <p> 534 * Description: <b></b><br> 535 * Type: <b>reference</b><br> 536 * Path: <b>Encounter.indication</b><br> 537 * </p> 538 */ 539 @SearchParamDefinition(name="procedure", path="Encounter.indication", description="", type="reference" ) 540 public static final String SP_PROCEDURE = "procedure"; 541 542 /** 543 * <b>Fluent Client</b> search parameter constant for <b>procedure</b> 544 * <p> 545 * Description: <b></b><br> 546 * Type: <b>reference</b><br> 547 * Path: <b>Encounter.indication</b><br> 548 * </p> 549 */ 550 public static final ReferenceClientParam PROCEDURE = new ReferenceClientParam(SP_PROCEDURE); 551 552 /** 553 * Search parameter constant for <b>location</b> 554 * <p> 555 * Description: <b></b><br> 556 * Type: <b>reference</b><br> 557 * Path: <b>Encounter.location.location</b><br> 558 * </p> 559 */ 560 @SearchParamDefinition(name="location", path="Encounter.location.location", description="", type="reference" ) 561 public static final String SP_LOCATION = "location"; 562 563 /** 564 * <b>Fluent Client</b> search parameter constant for <b>location</b> 565 * <p> 566 * Description: <b></b><br> 567 * Type: <b>reference</b><br> 568 * Path: <b>Encounter.location.location</b><br> 569 * </p> 570 */ 571 public static final ReferenceClientParam LOCATION = new ReferenceClientParam(SP_LOCATION); 572 573 /** 574 * Search parameter constant for <b>location-period</b> 575 * <p> 576 * Description: <b></b><br> 577 * Type: <b>date</b><br> 578 * Path: <b>Encounter.location.period</b><br> 579 * </p> 580 */ 581 @SearchParamDefinition(name="location-period", path="Encounter.location.period", description="", type="date" ) 582 public static final String SP_LOCATION_PERIOD = "location-period"; 583 584 /** 585 * <b>Fluent Client</b> search parameter constant for <b>location-period</b> 586 * <p> 587 * Description: <b></b><br> 588 * Type: <b>date</b><br> 589 * Path: <b>Encounter.location.period</b><br> 590 * </p> 591 */ 592 public static final DateClientParam LOCATION_PERIOD = new DateClientParam(SP_LOCATION_PERIOD); 593 594 /** 595 * Search parameter constant for <b>type</b> 596 * <p> 597 * Description: <b></b><br> 598 * Type: <b>token</b><br> 599 * Path: <b>Encounter.type</b><br> 600 * </p> 601 */ 602 @SearchParamDefinition(name="type", path="Encounter.type", description="", type="token" ) 603 public static final String SP_TYPE = "type"; 604 605 /** 606 * <b>Fluent Client</b> search parameter constant for <b>type</b> 607 * <p> 608 * Description: <b></b><br> 609 * Type: <b>token</b><br> 610 * Path: <b>Encounter.type</b><br> 611 * </p> 612 */ 613 public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE); 614 615 /** 616 * Search parameter constant for <b>special-arrangement</b> 617 * <p> 618 * Description: <b></b><br> 619 * Type: <b>token</b><br> 620 * Path: <b>Encounter.hospitalization.specialArrangement</b><br> 621 * </p> 622 */ 623 @SearchParamDefinition(name="special-arrangement", path="Encounter.hospitalization.specialArrangement", description="", type="token" ) 624 public static final String SP_SPECIAL_ARRANGEMENT = "special-arrangement"; 625 626 /** 627 * <b>Fluent Client</b> search parameter constant for <b>special-arrangement</b> 628 * <p> 629 * Description: <b></b><br> 630 * Type: <b>token</b><br> 631 * Path: <b>Encounter.hospitalization.specialArrangement</b><br> 632 * </p> 633 */ 634 public static final TokenClientParam SPECIAL_ARRANGEMENT = new TokenClientParam(SP_SPECIAL_ARRANGEMENT); 635 636 /** 637 * Search parameter constant for <b>part-of</b> 638 * <p> 639 * Description: <b></b><br> 640 * Type: <b>reference</b><br> 641 * Path: <b>Encounter.partOf</b><br> 642 * </p> 643 */ 644 @SearchParamDefinition(name="part-of", path="Encounter.partOf", description="", type="reference" ) 645 public static final String SP_PART_OF = "part-of"; 646 647 /** 648 * <b>Fluent Client</b> search parameter constant for <b>part-of</b> 649 * <p> 650 * Description: <b></b><br> 651 * Type: <b>reference</b><br> 652 * Path: <b>Encounter.partOf</b><br> 653 * </p> 654 */ 655 public static final ReferenceClientParam PART_OF = new ReferenceClientParam(SP_PART_OF); 656 657 /** 658 * Search parameter constant for <b>participant</b> 659 * <p> 660 * Description: <b></b><br> 661 * Type: <b>reference</b><br> 662 * Path: <b>Encounter.participant.individual</b><br> 663 * </p> 664 */ 665 @SearchParamDefinition(name="participant", path="Encounter.participant.individual", description="", type="reference" ) 666 public static final String SP_PARTICIPANT = "participant"; 667 668 /** 669 * <b>Fluent Client</b> search parameter constant for <b>participant</b> 670 * <p> 671 * Description: <b></b><br> 672 * Type: <b>reference</b><br> 673 * Path: <b>Encounter.participant.individual</b><br> 674 * </p> 675 */ 676 public static final ReferenceClientParam PARTICIPANT = new ReferenceClientParam(SP_PARTICIPANT); 677 678 /** 679 * Search parameter constant for <b>participant-type</b> 680 * <p> 681 * Description: <b></b><br> 682 * Type: <b>token</b><br> 683 * Path: <b>Encounter.participant.type</b><br> 684 * </p> 685 */ 686 @SearchParamDefinition(name="participant-type", path="Encounter.participant.type", description="", type="token" ) 687 public static final String SP_PARTICIPANT_TYPE = "participant-type"; 688 689 /** 690 * <b>Fluent Client</b> search parameter constant for <b>participant-type</b> 691 * <p> 692 * Description: <b></b><br> 693 * Type: <b>token</b><br> 694 * Path: <b>Encounter.participant.type</b><br> 695 * </p> 696 */ 697 public static final TokenClientParam PARTICIPANT_TYPE = new TokenClientParam(SP_PARTICIPANT_TYPE); 698 699 /** 700 * Search parameter constant for <b>episodeofcare</b> 701 * <p> 702 * Description: <b></b><br> 703 * Type: <b>reference</b><br> 704 * Path: <b>Encounter.episodeOfCare</b><br> 705 * </p> 706 */ 707 @SearchParamDefinition(name="episodeofcare", path="Encounter.episodeOfCare", description="", type="reference" ) 708 public static final String SP_EPISODEOFCARE = "episodeofcare"; 709 710 /** 711 * <b>Fluent Client</b> search parameter constant for <b>episodeofcare</b> 712 * <p> 713 * Description: <b></b><br> 714 * Type: <b>reference</b><br> 715 * Path: <b>Encounter.episodeOfCare</b><br> 716 * </p> 717 */ 718 public static final ReferenceClientParam EPISODEOFCARE = new ReferenceClientParam(SP_EPISODEOFCARE); 719 720 /** 721 * Search parameter constant for <b>incomingreferral</b> 722 * <p> 723 * Description: <b></b><br> 724 * Type: <b>reference</b><br> 725 * Path: <b>Encounter.incomingReferral</b><br> 726 * </p> 727 */ 728 @SearchParamDefinition(name="incomingreferral", path="Encounter.incomingReferral", description="", type="reference" ) 729 public static final String SP_INCOMINGREFERRAL = "incomingreferral"; 730 731 /** 732 * <b>Fluent Client</b> search parameter constant for <b>incomingreferral</b> 733 * <p> 734 * Description: <b></b><br> 735 * Type: <b>reference</b><br> 736 * Path: <b>Encounter.incomingReferral</b><br> 737 * </p> 738 */ 739 public static final ReferenceClientParam INCOMINGREFERRAL = new ReferenceClientParam(SP_INCOMINGREFERRAL); 740 741 /** 742 * Search parameter constant for <b>practitioner</b> 743 * <p> 744 * Description: <b></b><br> 745 * Type: <b>reference</b><br> 746 * Path: <b>Encounter.participant.individual</b><br> 747 * </p> 748 */ 749 @SearchParamDefinition(name="practitioner", path="Encounter.participant.individual", description="", type="reference" ) 750 public static final String SP_PRACTITIONER = "practitioner"; 751 752 /** 753 * <b>Fluent Client</b> search parameter constant for <b>practitioner</b> 754 * <p> 755 * Description: <b></b><br> 756 * Type: <b>reference</b><br> 757 * Path: <b>Encounter.participant.individual</b><br> 758 * </p> 759 */ 760 public static final ReferenceClientParam PRACTITIONER = new ReferenceClientParam(SP_PRACTITIONER); 761 762 763 /** 764 * Constant for fluent queries to be used to add include statements. Specifies 765 * the path value of "<b>Encounter:appointment</b>". 766 */ 767 public static final Include INCLUDE_APPOINTMENT = new Include("Encounter:appointment"); 768 769 /** 770 * Constant for fluent queries to be used to add include statements. Specifies 771 * the path value of "<b>Encounter:condition</b>". 772 */ 773 public static final Include INCLUDE_CONDITION = new Include("Encounter:condition"); 774 775 /** 776 * Constant for fluent queries to be used to add include statements. Specifies 777 * the path value of "<b>Encounter:episodeofcare</b>". 778 */ 779 public static final Include INCLUDE_EPISODEOFCARE = new Include("Encounter:episodeofcare"); 780 781 /** 782 * Constant for fluent queries to be used to add include statements. Specifies 783 * the path value of "<b>Encounter:incomingreferral</b>". 784 */ 785 public static final Include INCLUDE_INCOMINGREFERRAL = new Include("Encounter:incomingreferral"); 786 787 /** 788 * Constant for fluent queries to be used to add include statements. Specifies 789 * the path value of "<b>Encounter:indication</b>". 790 */ 791 public static final Include INCLUDE_INDICATION = new Include("Encounter:indication"); 792 793 /** 794 * Constant for fluent queries to be used to add include statements. Specifies 795 * the path value of "<b>Encounter:location</b>". 796 */ 797 public static final Include INCLUDE_LOCATION = new Include("Encounter:location"); 798 799 /** 800 * Constant for fluent queries to be used to add include statements. Specifies 801 * the path value of "<b>Encounter:part-of</b>". 802 */ 803 public static final Include INCLUDE_PART_OF = new Include("Encounter:part-of"); 804 805 /** 806 * Constant for fluent queries to be used to add include statements. Specifies 807 * the path value of "<b>Encounter:participant</b>". 808 */ 809 public static final Include INCLUDE_PARTICIPANT = new Include("Encounter:participant"); 810 811 /** 812 * Constant for fluent queries to be used to add include statements. Specifies 813 * the path value of "<b>Encounter:patient</b>". 814 */ 815 public static final Include INCLUDE_PATIENT = new Include("Encounter:patient"); 816 817 /** 818 * Constant for fluent queries to be used to add include statements. Specifies 819 * the path value of "<b>Encounter:practitioner</b>". 820 */ 821 public static final Include INCLUDE_PRACTITIONER = new Include("Encounter:practitioner"); 822 823 /** 824 * Constant for fluent queries to be used to add include statements. Specifies 825 * the path value of "<b>Encounter:procedure</b>". 826 */ 827 public static final Include INCLUDE_PROCEDURE = new Include("Encounter:procedure"); 828 829 830 @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 831 @Description( 832 shortDefinition="id", 833 formalDefinition="" 834 ) 835 private java.util.List<IdentifierDt> myIdentifier; 836 837 @Child(name="status", type=CodeDt.class, order=1, min=1, max=1, summary=true, modifier=true) 838 @Description( 839 shortDefinition="status", 840 formalDefinition="" 841 ) 842 private BoundCodeDt<EncounterStateEnum> myStatus; 843 844 @Child(name="statusHistory", order=2, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 845 @Description( 846 shortDefinition="", 847 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" 848 ) 849 private java.util.List<StatusHistory> myStatusHistory; 850 851 @Child(name="class", type=CodeDt.class, order=3, min=0, max=1, summary=true, modifier=false) 852 @Description( 853 shortDefinition="class", 854 formalDefinition="" 855 ) 856 private BoundCodeDt<EncounterClassEnum> myClassElement; 857 858 @Child(name="type", type=CodeableConceptDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 859 @Description( 860 shortDefinition="class", 861 formalDefinition="Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation)" 862 ) 863 private java.util.List<BoundCodeableConceptDt<EncounterTypeEnum>> myType; 864 865 @Child(name="priority", type=CodeableConceptDt.class, order=5, min=0, max=1, summary=false, modifier=false) 866 @Description( 867 shortDefinition="grade", 868 formalDefinition="" 869 ) 870 private BoundCodeableConceptDt<PriorityCodesEnum> myPriority; 871 872 @Child(name="patient", order=6, min=0, max=1, summary=true, modifier=false, type={ 873 ca.uhn.fhir.model.dstu2.resource.Patient.class }) 874 @Description( 875 shortDefinition="who.focus", 876 formalDefinition="" 877 ) 878 private ResourceReferenceDt myPatient; 879 880 @Child(name="episodeOfCare", order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={ 881 ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare.class }) 882 @Description( 883 shortDefinition="context", 884 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)" 885 ) 886 private java.util.List<ResourceReferenceDt> myEpisodeOfCare; 887 888 @Child(name="incomingReferral", order=8, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={ 889 ca.uhn.fhir.model.dstu2.resource.ReferralRequest.class }) 890 @Description( 891 shortDefinition="", 892 formalDefinition="The referral request this encounter satisfies (incoming referral)" 893 ) 894 private java.util.List<ResourceReferenceDt> myIncomingReferral; 895 896 @Child(name="participant", order=9, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 897 @Description( 898 shortDefinition="", 899 formalDefinition="The list of people responsible for providing the service" 900 ) 901 private java.util.List<Participant> myParticipant; 902 903 @Child(name="appointment", order=10, min=0, max=1, summary=true, modifier=false, type={ 904 ca.uhn.fhir.model.dstu2.resource.Appointment.class }) 905 @Description( 906 shortDefinition="", 907 formalDefinition="" 908 ) 909 private ResourceReferenceDt myAppointment; 910 911 @Child(name="period", type=PeriodDt.class, order=11, min=0, max=1, summary=false, modifier=false) 912 @Description( 913 shortDefinition="when.done", 914 formalDefinition="The start and end time of the encounter" 915 ) 916 private PeriodDt myPeriod; 917 918 @Child(name="length", type=DurationDt.class, order=12, min=0, max=1, summary=false, modifier=false) 919 @Description( 920 shortDefinition="", 921 formalDefinition="Quantity of time the encounter lasted. This excludes the time during leaves of absence." 922 ) 923 private DurationDt myLength; 924 925 @Child(name="reason", type=CodeableConceptDt.class, order=13, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 926 @Description( 927 shortDefinition="why", 928 formalDefinition="Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis" 929 ) 930 private java.util.List<CodeableConceptDt> myReason; 931 932 @Child(name="indication", order=14, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={ 933 ca.uhn.fhir.model.dstu2.resource.Condition.class, ca.uhn.fhir.model.dstu2.resource.Procedure.class }) 934 @Description( 935 shortDefinition="why", 936 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" 937 ) 938 private java.util.List<ResourceReferenceDt> myIndication; 939 940 @Child(name="hospitalization", order=15, min=0, max=1, summary=false, modifier=false) 941 @Description( 942 shortDefinition="", 943 formalDefinition="" 944 ) 945 private Hospitalization myHospitalization; 946 947 @Child(name="location", order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 948 @Description( 949 shortDefinition="", 950 formalDefinition="List of locations where the patient has been during this encounter" 951 ) 952 private java.util.List<Location> myLocation; 953 954 @Child(name="serviceProvider", order=17, min=0, max=1, summary=false, modifier=false, type={ 955 ca.uhn.fhir.model.dstu2.resource.Organization.class }) 956 @Description( 957 shortDefinition="", 958 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." 959 ) 960 private ResourceReferenceDt myServiceProvider; 961 962 @Child(name="partOf", order=18, min=0, max=1, summary=false, modifier=false, type={ 963 ca.uhn.fhir.model.dstu2.resource.Encounter.class }) 964 @Description( 965 shortDefinition="", 966 formalDefinition="Another Encounter of which this encounter is a part of (administratively or in time)." 967 ) 968 private ResourceReferenceDt myPartOf; 969 970 971 @Override 972 public boolean isEmpty() { 973 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myStatus, myStatusHistory, myClassElement, myType, myPriority, myPatient, myEpisodeOfCare, myIncomingReferral, myParticipant, myAppointment, myPeriod, myLength, myReason, myIndication, myHospitalization, myLocation, myServiceProvider, myPartOf); 974 } 975 976 @Override 977 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 978 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myStatus, myStatusHistory, myClassElement, myType, myPriority, myPatient, myEpisodeOfCare, myIncomingReferral, myParticipant, myAppointment, myPeriod, myLength, myReason, myIndication, myHospitalization, myLocation, myServiceProvider, myPartOf); 979 } 980 981 /** 982 * Gets the value(s) for <b>identifier</b> (id). 983 * creating it if it does 984 * not exist. Will not return <code>null</code>. 985 * 986 * <p> 987 * <b>Definition:</b> 988 * 989 * </p> 990 */ 991 public java.util.List<IdentifierDt> getIdentifier() { 992 if (myIdentifier == null) { 993 myIdentifier = new java.util.ArrayList<IdentifierDt>(); 994 } 995 return myIdentifier; 996 } 997 998 /** 999 * Sets the value(s) for <b>identifier</b> (id) 1000 * 1001 * <p> 1002 * <b>Definition:</b> 1003 * 1004 * </p> 1005 */ 1006 public Encounter setIdentifier(java.util.List<IdentifierDt> theValue) { 1007 myIdentifier = theValue; 1008 return this; 1009 } 1010 1011 1012 1013 /** 1014 * Adds and returns a new value for <b>identifier</b> (id) 1015 * 1016 * <p> 1017 * <b>Definition:</b> 1018 * 1019 * </p> 1020 */ 1021 public IdentifierDt addIdentifier() { 1022 IdentifierDt newType = new IdentifierDt(); 1023 getIdentifier().add(newType); 1024 return newType; 1025 } 1026 1027 /** 1028 * Adds a given new value for <b>identifier</b> (id) 1029 * 1030 * <p> 1031 * <b>Definition:</b> 1032 * 1033 * </p> 1034 * @param theValue The identifier to add (must not be <code>null</code>) 1035 */ 1036 public Encounter addIdentifier(IdentifierDt theValue) { 1037 if (theValue == null) { 1038 throw new NullPointerException("theValue must not be null"); 1039 } 1040 getIdentifier().add(theValue); 1041 return this; 1042 } 1043 1044 /** 1045 * Gets the first repetition for <b>identifier</b> (id), 1046 * creating it if it does not already exist. 1047 * 1048 * <p> 1049 * <b>Definition:</b> 1050 * 1051 * </p> 1052 */ 1053 public IdentifierDt getIdentifierFirstRep() { 1054 if (getIdentifier().isEmpty()) { 1055 return addIdentifier(); 1056 } 1057 return getIdentifier().get(0); 1058 } 1059 1060 /** 1061 * Gets the value(s) for <b>status</b> (status). 1062 * creating it if it does 1063 * not exist. Will not return <code>null</code>. 1064 * 1065 * <p> 1066 * <b>Definition:</b> 1067 * 1068 * </p> 1069 */ 1070 public BoundCodeDt<EncounterStateEnum> getStatusElement() { 1071 if (myStatus == null) { 1072 myStatus = new BoundCodeDt<EncounterStateEnum>(EncounterStateEnum.VALUESET_BINDER); 1073 } 1074 return myStatus; 1075 } 1076 1077 1078 /** 1079 * Gets the value(s) for <b>status</b> (status). 1080 * creating it if it does 1081 * not exist. Will not return <code>null</code>. 1082 * 1083 * <p> 1084 * <b>Definition:</b> 1085 * 1086 * </p> 1087 */ 1088 public String getStatus() { 1089 return getStatusElement().getValue(); 1090 } 1091 1092 /** 1093 * Sets the value(s) for <b>status</b> (status) 1094 * 1095 * <p> 1096 * <b>Definition:</b> 1097 * 1098 * </p> 1099 */ 1100 public Encounter setStatus(BoundCodeDt<EncounterStateEnum> theValue) { 1101 myStatus = theValue; 1102 return this; 1103 } 1104 1105 1106 1107 /** 1108 * Sets the value(s) for <b>status</b> (status) 1109 * 1110 * <p> 1111 * <b>Definition:</b> 1112 * 1113 * </p> 1114 */ 1115 public Encounter setStatus(EncounterStateEnum theValue) { 1116 setStatus(new BoundCodeDt<EncounterStateEnum>(EncounterStateEnum.VALUESET_BINDER, theValue)); 1117 1118/* 1119 getStatusElement().setValueAsEnum(theValue); 1120*/ 1121 return this; 1122 } 1123 1124 1125 /** 1126 * Gets the value(s) for <b>statusHistory</b> (). 1127 * creating it if it does 1128 * not exist. Will not return <code>null</code>. 1129 * 1130 * <p> 1131 * <b>Definition:</b> 1132 * 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 1133 * </p> 1134 */ 1135 public java.util.List<StatusHistory> getStatusHistory() { 1136 if (myStatusHistory == null) { 1137 myStatusHistory = new java.util.ArrayList<StatusHistory>(); 1138 } 1139 return myStatusHistory; 1140 } 1141 1142 /** 1143 * Sets the value(s) for <b>statusHistory</b> () 1144 * 1145 * <p> 1146 * <b>Definition:</b> 1147 * 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 1148 * </p> 1149 */ 1150 public Encounter setStatusHistory(java.util.List<StatusHistory> theValue) { 1151 myStatusHistory = theValue; 1152 return this; 1153 } 1154 1155 1156 1157 /** 1158 * Adds and returns a new value for <b>statusHistory</b> () 1159 * 1160 * <p> 1161 * <b>Definition:</b> 1162 * 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 1163 * </p> 1164 */ 1165 public StatusHistory addStatusHistory() { 1166 StatusHistory newType = new StatusHistory(); 1167 getStatusHistory().add(newType); 1168 return newType; 1169 } 1170 1171 /** 1172 * Adds a given new value for <b>statusHistory</b> () 1173 * 1174 * <p> 1175 * <b>Definition:</b> 1176 * 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 1177 * </p> 1178 * @param theValue The statusHistory to add (must not be <code>null</code>) 1179 */ 1180 public Encounter addStatusHistory(StatusHistory theValue) { 1181 if (theValue == null) { 1182 throw new NullPointerException("theValue must not be null"); 1183 } 1184 getStatusHistory().add(theValue); 1185 return this; 1186 } 1187 1188 /** 1189 * Gets the first repetition for <b>statusHistory</b> (), 1190 * creating it if it does not already exist. 1191 * 1192 * <p> 1193 * <b>Definition:</b> 1194 * 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 1195 * </p> 1196 */ 1197 public StatusHistory getStatusHistoryFirstRep() { 1198 if (getStatusHistory().isEmpty()) { 1199 return addStatusHistory(); 1200 } 1201 return getStatusHistory().get(0); 1202 } 1203 1204 /** 1205 * Gets the value(s) for <b>class</b> (class). 1206 * creating it if it does 1207 * not exist. Will not return <code>null</code>. 1208 * 1209 * <p> 1210 * <b>Definition:</b> 1211 * 1212 * </p> 1213 */ 1214 public BoundCodeDt<EncounterClassEnum> getClassElementElement() { 1215 if (myClassElement == null) { 1216 myClassElement = new BoundCodeDt<EncounterClassEnum>(EncounterClassEnum.VALUESET_BINDER); 1217 } 1218 return myClassElement; 1219 } 1220 1221 1222 /** 1223 * Gets the value(s) for <b>class</b> (class). 1224 * creating it if it does 1225 * not exist. Will not return <code>null</code>. 1226 * 1227 * <p> 1228 * <b>Definition:</b> 1229 * 1230 * </p> 1231 */ 1232 public String getClassElement() { 1233 return getClassElementElement().getValue(); 1234 } 1235 1236 /** 1237 * Sets the value(s) for <b>class</b> (class) 1238 * 1239 * <p> 1240 * <b>Definition:</b> 1241 * 1242 * </p> 1243 */ 1244 public Encounter setClassElement(BoundCodeDt<EncounterClassEnum> theValue) { 1245 myClassElement = theValue; 1246 return this; 1247 } 1248 1249 1250 1251 /** 1252 * Sets the value(s) for <b>class</b> (class) 1253 * 1254 * <p> 1255 * <b>Definition:</b> 1256 * 1257 * </p> 1258 */ 1259 public Encounter setClassElement(EncounterClassEnum theValue) { 1260 setClassElement(new BoundCodeDt<EncounterClassEnum>(EncounterClassEnum.VALUESET_BINDER, theValue)); 1261 1262/* 1263 getClassElementElement().setValueAsEnum(theValue); 1264*/ 1265 return this; 1266 } 1267 1268 1269 /** 1270 * Gets the value(s) for <b>type</b> (class). 1271 * creating it if it does 1272 * not exist. Will not return <code>null</code>. 1273 * 1274 * <p> 1275 * <b>Definition:</b> 1276 * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) 1277 * </p> 1278 */ 1279 public java.util.List<BoundCodeableConceptDt<EncounterTypeEnum>> getType() { 1280 if (myType == null) { 1281 myType = new java.util.ArrayList<BoundCodeableConceptDt<EncounterTypeEnum>>(); 1282 } 1283 return myType; 1284 } 1285 1286 /** 1287 * Sets the value(s) for <b>type</b> (class) 1288 * 1289 * <p> 1290 * <b>Definition:</b> 1291 * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) 1292 * </p> 1293 */ 1294 public Encounter setType(java.util.List<BoundCodeableConceptDt<EncounterTypeEnum>> theValue) { 1295 myType = theValue; 1296 return this; 1297 } 1298 1299 1300 1301 /** 1302 * Add a value for <b>type</b> (class) using an enumerated type. This 1303 * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory 1304 * or contain the desirable codes. If you wish to use codes other than those which are built-in, 1305 * you may also use the {@link #addType()} method. 1306 * 1307 * <p> 1308 * <b>Definition:</b> 1309 * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) 1310 * </p> 1311 */ 1312 public BoundCodeableConceptDt<EncounterTypeEnum> addType(EncounterTypeEnum theValue) { 1313 BoundCodeableConceptDt<EncounterTypeEnum> retVal = new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER, theValue); 1314 getType().add(retVal); 1315 return retVal; 1316 } 1317 1318 /** 1319 * Gets the first repetition for <b>type</b> (class), 1320 * creating it if it does not already exist. 1321 * 1322 * <p> 1323 * <b>Definition:</b> 1324 * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) 1325 * </p> 1326 */ 1327 public BoundCodeableConceptDt<EncounterTypeEnum> getTypeFirstRep() { 1328 if (getType().size() == 0) { 1329 addType(); 1330 } 1331 return getType().get(0); 1332 } 1333 1334 /** 1335 * Add a value for <b>type</b> (class) 1336 * 1337 * <p> 1338 * <b>Definition:</b> 1339 * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) 1340 * </p> 1341 */ 1342 public BoundCodeableConceptDt<EncounterTypeEnum> addType() { 1343 BoundCodeableConceptDt<EncounterTypeEnum> retVal = new BoundCodeableConceptDt<EncounterTypeEnum>(EncounterTypeEnum.VALUESET_BINDER); 1344 getType().add(retVal); 1345 return retVal; 1346 } 1347 1348 /** 1349 * Sets the value(s), and clears any existing value(s) for <b>type</b> (class) 1350 * 1351 * <p> 1352 * <b>Definition:</b> 1353 * Specific type of encounter (e.g. e-mail consultation, surgical day-care, skilled nursing, rehabilitation) 1354 * </p> 1355 */ 1356 public Encounter setType(EncounterTypeEnum theValue) { 1357 getType().clear(); 1358 addType(theValue); 1359 return this; 1360 } 1361 1362 1363 /** 1364 * Gets the value(s) for <b>priority</b> (grade). 1365 * creating it if it does 1366 * not exist. Will not return <code>null</code>. 1367 * 1368 * <p> 1369 * <b>Definition:</b> 1370 * 1371 * </p> 1372 */ 1373 public BoundCodeableConceptDt<PriorityCodesEnum> getPriority() { 1374 if (myPriority == null) { 1375 myPriority = new BoundCodeableConceptDt<PriorityCodesEnum>(PriorityCodesEnum.VALUESET_BINDER); 1376 } 1377 return myPriority; 1378 } 1379 1380 /** 1381 * Sets the value(s) for <b>priority</b> (grade) 1382 * 1383 * <p> 1384 * <b>Definition:</b> 1385 * 1386 * </p> 1387 */ 1388 public Encounter setPriority(BoundCodeableConceptDt<PriorityCodesEnum> theValue) { 1389 myPriority = theValue; 1390 return this; 1391 } 1392 1393 1394 1395 /** 1396 * Sets the value(s) for <b>priority</b> (grade) 1397 * 1398 * <p> 1399 * <b>Definition:</b> 1400 * 1401 * </p> 1402 */ 1403 public Encounter setPriority(PriorityCodesEnum theValue) { 1404 setPriority(new BoundCodeableConceptDt<PriorityCodesEnum>(PriorityCodesEnum.VALUESET_BINDER, theValue)); 1405 1406/* 1407 getPriority().setValueAsEnum(theValue); 1408*/ 1409 return this; 1410 } 1411 1412 1413 /** 1414 * Gets the value(s) for <b>patient</b> (who.focus). 1415 * creating it if it does 1416 * not exist. Will not return <code>null</code>. 1417 * 1418 * <p> 1419 * <b>Definition:</b> 1420 * 1421 * </p> 1422 */ 1423 public ResourceReferenceDt getPatient() { 1424 if (myPatient == null) { 1425 myPatient = new ResourceReferenceDt(); 1426 } 1427 return myPatient; 1428 } 1429 1430 /** 1431 * Sets the value(s) for <b>patient</b> (who.focus) 1432 * 1433 * <p> 1434 * <b>Definition:</b> 1435 * 1436 * </p> 1437 */ 1438 public Encounter setPatient(ResourceReferenceDt theValue) { 1439 myPatient = theValue; 1440 return this; 1441 } 1442 1443 1444 1445 1446 /** 1447 * Gets the value(s) for <b>episodeOfCare</b> (context). 1448 * creating it if it does 1449 * not exist. Will not return <code>null</code>. 1450 * 1451 * <p> 1452 * <b>Definition:</b> 1453 * 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) 1454 * </p> 1455 */ 1456 public java.util.List<ResourceReferenceDt> getEpisodeOfCare() { 1457 if (myEpisodeOfCare == null) { 1458 myEpisodeOfCare = new java.util.ArrayList<ResourceReferenceDt>(); 1459 } 1460 return myEpisodeOfCare; 1461 } 1462 1463 /** 1464 * Sets the value(s) for <b>episodeOfCare</b> (context) 1465 * 1466 * <p> 1467 * <b>Definition:</b> 1468 * 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) 1469 * </p> 1470 */ 1471 public Encounter setEpisodeOfCare(java.util.List<ResourceReferenceDt> theValue) { 1472 myEpisodeOfCare = theValue; 1473 return this; 1474 } 1475 1476 1477 1478 /** 1479 * Adds and returns a new value for <b>episodeOfCare</b> (context) 1480 * 1481 * <p> 1482 * <b>Definition:</b> 1483 * 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) 1484 * </p> 1485 */ 1486 public ResourceReferenceDt addEpisodeOfCare() { 1487 ResourceReferenceDt newType = new ResourceReferenceDt(); 1488 getEpisodeOfCare().add(newType); 1489 return newType; 1490 } 1491 1492 /** 1493 * Gets the value(s) for <b>incomingReferral</b> (). 1494 * creating it if it does 1495 * not exist. Will not return <code>null</code>. 1496 * 1497 * <p> 1498 * <b>Definition:</b> 1499 * The referral request this encounter satisfies (incoming referral) 1500 * </p> 1501 */ 1502 public java.util.List<ResourceReferenceDt> getIncomingReferral() { 1503 if (myIncomingReferral == null) { 1504 myIncomingReferral = new java.util.ArrayList<ResourceReferenceDt>(); 1505 } 1506 return myIncomingReferral; 1507 } 1508 1509 /** 1510 * Sets the value(s) for <b>incomingReferral</b> () 1511 * 1512 * <p> 1513 * <b>Definition:</b> 1514 * The referral request this encounter satisfies (incoming referral) 1515 * </p> 1516 */ 1517 public Encounter setIncomingReferral(java.util.List<ResourceReferenceDt> theValue) { 1518 myIncomingReferral = theValue; 1519 return this; 1520 } 1521 1522 1523 1524 /** 1525 * Adds and returns a new value for <b>incomingReferral</b> () 1526 * 1527 * <p> 1528 * <b>Definition:</b> 1529 * The referral request this encounter satisfies (incoming referral) 1530 * </p> 1531 */ 1532 public ResourceReferenceDt addIncomingReferral() { 1533 ResourceReferenceDt newType = new ResourceReferenceDt(); 1534 getIncomingReferral().add(newType); 1535 return newType; 1536 } 1537 1538 /** 1539 * Gets the value(s) for <b>participant</b> (). 1540 * creating it if it does 1541 * not exist. Will not return <code>null</code>. 1542 * 1543 * <p> 1544 * <b>Definition:</b> 1545 * The list of people responsible for providing the service 1546 * </p> 1547 */ 1548 public java.util.List<Participant> getParticipant() { 1549 if (myParticipant == null) { 1550 myParticipant = new java.util.ArrayList<Participant>(); 1551 } 1552 return myParticipant; 1553 } 1554 1555 /** 1556 * Sets the value(s) for <b>participant</b> () 1557 * 1558 * <p> 1559 * <b>Definition:</b> 1560 * The list of people responsible for providing the service 1561 * </p> 1562 */ 1563 public Encounter setParticipant(java.util.List<Participant> theValue) { 1564 myParticipant = theValue; 1565 return this; 1566 } 1567 1568 1569 1570 /** 1571 * Adds and returns a new value for <b>participant</b> () 1572 * 1573 * <p> 1574 * <b>Definition:</b> 1575 * The list of people responsible for providing the service 1576 * </p> 1577 */ 1578 public Participant addParticipant() { 1579 Participant newType = new Participant(); 1580 getParticipant().add(newType); 1581 return newType; 1582 } 1583 1584 /** 1585 * Adds a given new value for <b>participant</b> () 1586 * 1587 * <p> 1588 * <b>Definition:</b> 1589 * The list of people responsible for providing the service 1590 * </p> 1591 * @param theValue The participant to add (must not be <code>null</code>) 1592 */ 1593 public Encounter addParticipant(Participant theValue) { 1594 if (theValue == null) { 1595 throw new NullPointerException("theValue must not be null"); 1596 } 1597 getParticipant().add(theValue); 1598 return this; 1599 } 1600 1601 /** 1602 * Gets the first repetition for <b>participant</b> (), 1603 * creating it if it does not already exist. 1604 * 1605 * <p> 1606 * <b>Definition:</b> 1607 * The list of people responsible for providing the service 1608 * </p> 1609 */ 1610 public Participant getParticipantFirstRep() { 1611 if (getParticipant().isEmpty()) { 1612 return addParticipant(); 1613 } 1614 return getParticipant().get(0); 1615 } 1616 1617 /** 1618 * Gets the value(s) for <b>appointment</b> (). 1619 * creating it if it does 1620 * not exist. Will not return <code>null</code>. 1621 * 1622 * <p> 1623 * <b>Definition:</b> 1624 * 1625 * </p> 1626 */ 1627 public ResourceReferenceDt getAppointment() { 1628 if (myAppointment == null) { 1629 myAppointment = new ResourceReferenceDt(); 1630 } 1631 return myAppointment; 1632 } 1633 1634 /** 1635 * Sets the value(s) for <b>appointment</b> () 1636 * 1637 * <p> 1638 * <b>Definition:</b> 1639 * 1640 * </p> 1641 */ 1642 public Encounter setAppointment(ResourceReferenceDt theValue) { 1643 myAppointment = theValue; 1644 return this; 1645 } 1646 1647 1648 1649 1650 /** 1651 * Gets the value(s) for <b>period</b> (when.done). 1652 * creating it if it does 1653 * not exist. Will not return <code>null</code>. 1654 * 1655 * <p> 1656 * <b>Definition:</b> 1657 * The start and end time of the encounter 1658 * </p> 1659 */ 1660 public PeriodDt getPeriod() { 1661 if (myPeriod == null) { 1662 myPeriod = new PeriodDt(); 1663 } 1664 return myPeriod; 1665 } 1666 1667 /** 1668 * Sets the value(s) for <b>period</b> (when.done) 1669 * 1670 * <p> 1671 * <b>Definition:</b> 1672 * The start and end time of the encounter 1673 * </p> 1674 */ 1675 public Encounter setPeriod(PeriodDt theValue) { 1676 myPeriod = theValue; 1677 return this; 1678 } 1679 1680 1681 1682 1683 /** 1684 * Gets the value(s) for <b>length</b> (). 1685 * creating it if it does 1686 * not exist. Will not return <code>null</code>. 1687 * 1688 * <p> 1689 * <b>Definition:</b> 1690 * Quantity of time the encounter lasted. This excludes the time during leaves of absence. 1691 * </p> 1692 */ 1693 public DurationDt getLength() { 1694 if (myLength == null) { 1695 myLength = new DurationDt(); 1696 } 1697 return myLength; 1698 } 1699 1700 /** 1701 * Sets the value(s) for <b>length</b> () 1702 * 1703 * <p> 1704 * <b>Definition:</b> 1705 * Quantity of time the encounter lasted. This excludes the time during leaves of absence. 1706 * </p> 1707 */ 1708 public Encounter setLength(DurationDt theValue) { 1709 myLength = theValue; 1710 return this; 1711 } 1712 1713 1714 1715 1716 /** 1717 * Gets the value(s) for <b>reason</b> (why). 1718 * creating it if it does 1719 * not exist. Will not return <code>null</code>. 1720 * 1721 * <p> 1722 * <b>Definition:</b> 1723 * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis 1724 * </p> 1725 */ 1726 public java.util.List<CodeableConceptDt> getReason() { 1727 if (myReason == null) { 1728 myReason = new java.util.ArrayList<CodeableConceptDt>(); 1729 } 1730 return myReason; 1731 } 1732 1733 /** 1734 * Sets the value(s) for <b>reason</b> (why) 1735 * 1736 * <p> 1737 * <b>Definition:</b> 1738 * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis 1739 * </p> 1740 */ 1741 public Encounter setReason(java.util.List<CodeableConceptDt> theValue) { 1742 myReason = theValue; 1743 return this; 1744 } 1745 1746 1747 1748 /** 1749 * Adds and returns a new value for <b>reason</b> (why) 1750 * 1751 * <p> 1752 * <b>Definition:</b> 1753 * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis 1754 * </p> 1755 */ 1756 public CodeableConceptDt addReason() { 1757 CodeableConceptDt newType = new CodeableConceptDt(); 1758 getReason().add(newType); 1759 return newType; 1760 } 1761 1762 /** 1763 * Adds a given new value for <b>reason</b> (why) 1764 * 1765 * <p> 1766 * <b>Definition:</b> 1767 * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis 1768 * </p> 1769 * @param theValue The reason to add (must not be <code>null</code>) 1770 */ 1771 public Encounter addReason(CodeableConceptDt theValue) { 1772 if (theValue == null) { 1773 throw new NullPointerException("theValue must not be null"); 1774 } 1775 getReason().add(theValue); 1776 return this; 1777 } 1778 1779 /** 1780 * Gets the first repetition for <b>reason</b> (why), 1781 * creating it if it does not already exist. 1782 * 1783 * <p> 1784 * <b>Definition:</b> 1785 * Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis 1786 * </p> 1787 */ 1788 public CodeableConceptDt getReasonFirstRep() { 1789 if (getReason().isEmpty()) { 1790 return addReason(); 1791 } 1792 return getReason().get(0); 1793 } 1794 1795 /** 1796 * Gets the value(s) for <b>indication</b> (why). 1797 * creating it if it does 1798 * not exist. Will not return <code>null</code>. 1799 * 1800 * <p> 1801 * <b>Definition:</b> 1802 * 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 1803 * </p> 1804 */ 1805 public java.util.List<ResourceReferenceDt> getIndication() { 1806 if (myIndication == null) { 1807 myIndication = new java.util.ArrayList<ResourceReferenceDt>(); 1808 } 1809 return myIndication; 1810 } 1811 1812 /** 1813 * Sets the value(s) for <b>indication</b> (why) 1814 * 1815 * <p> 1816 * <b>Definition:</b> 1817 * 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 1818 * </p> 1819 */ 1820 public Encounter setIndication(java.util.List<ResourceReferenceDt> theValue) { 1821 myIndication = theValue; 1822 return this; 1823 } 1824 1825 1826 1827 /** 1828 * Adds and returns a new value for <b>indication</b> (why) 1829 * 1830 * <p> 1831 * <b>Definition:</b> 1832 * 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 1833 * </p> 1834 */ 1835 public ResourceReferenceDt addIndication() { 1836 ResourceReferenceDt newType = new ResourceReferenceDt(); 1837 getIndication().add(newType); 1838 return newType; 1839 } 1840 1841 /** 1842 * Gets the value(s) for <b>hospitalization</b> (). 1843 * creating it if it does 1844 * not exist. Will not return <code>null</code>. 1845 * 1846 * <p> 1847 * <b>Definition:</b> 1848 * 1849 * </p> 1850 */ 1851 public Hospitalization getHospitalization() { 1852 if (myHospitalization == null) { 1853 myHospitalization = new Hospitalization(); 1854 } 1855 return myHospitalization; 1856 } 1857 1858 /** 1859 * Sets the value(s) for <b>hospitalization</b> () 1860 * 1861 * <p> 1862 * <b>Definition:</b> 1863 * 1864 * </p> 1865 */ 1866 public Encounter setHospitalization(Hospitalization theValue) { 1867 myHospitalization = theValue; 1868 return this; 1869 } 1870 1871 1872 1873 1874 /** 1875 * Gets the value(s) for <b>location</b> (). 1876 * creating it if it does 1877 * not exist. Will not return <code>null</code>. 1878 * 1879 * <p> 1880 * <b>Definition:</b> 1881 * List of locations where the patient has been during this encounter 1882 * </p> 1883 */ 1884 public java.util.List<Location> getLocation() { 1885 if (myLocation == null) { 1886 myLocation = new java.util.ArrayList<Location>(); 1887 } 1888 return myLocation; 1889 } 1890 1891 /** 1892 * Sets the value(s) for <b>location</b> () 1893 * 1894 * <p> 1895 * <b>Definition:</b> 1896 * List of locations where the patient has been during this encounter 1897 * </p> 1898 */ 1899 public Encounter setLocation(java.util.List<Location> theValue) { 1900 myLocation = theValue; 1901 return this; 1902 } 1903 1904 1905 1906 /** 1907 * Adds and returns a new value for <b>location</b> () 1908 * 1909 * <p> 1910 * <b>Definition:</b> 1911 * List of locations where the patient has been during this encounter 1912 * </p> 1913 */ 1914 public Location addLocation() { 1915 Location newType = new Location(); 1916 getLocation().add(newType); 1917 return newType; 1918 } 1919 1920 /** 1921 * Adds a given new value for <b>location</b> () 1922 * 1923 * <p> 1924 * <b>Definition:</b> 1925 * List of locations where the patient has been during this encounter 1926 * </p> 1927 * @param theValue The location to add (must not be <code>null</code>) 1928 */ 1929 public Encounter addLocation(Location theValue) { 1930 if (theValue == null) { 1931 throw new NullPointerException("theValue must not be null"); 1932 } 1933 getLocation().add(theValue); 1934 return this; 1935 } 1936 1937 /** 1938 * Gets the first repetition for <b>location</b> (), 1939 * creating it if it does not already exist. 1940 * 1941 * <p> 1942 * <b>Definition:</b> 1943 * List of locations where the patient has been during this encounter 1944 * </p> 1945 */ 1946 public Location getLocationFirstRep() { 1947 if (getLocation().isEmpty()) { 1948 return addLocation(); 1949 } 1950 return getLocation().get(0); 1951 } 1952 1953 /** 1954 * Gets the value(s) for <b>serviceProvider</b> (). 1955 * creating it if it does 1956 * not exist. Will not return <code>null</code>. 1957 * 1958 * <p> 1959 * <b>Definition:</b> 1960 * 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. 1961 * </p> 1962 */ 1963 public ResourceReferenceDt getServiceProvider() { 1964 if (myServiceProvider == null) { 1965 myServiceProvider = new ResourceReferenceDt(); 1966 } 1967 return myServiceProvider; 1968 } 1969 1970 /** 1971 * Sets the value(s) for <b>serviceProvider</b> () 1972 * 1973 * <p> 1974 * <b>Definition:</b> 1975 * 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. 1976 * </p> 1977 */ 1978 public Encounter setServiceProvider(ResourceReferenceDt theValue) { 1979 myServiceProvider = theValue; 1980 return this; 1981 } 1982 1983 1984 1985 1986 /** 1987 * Gets the value(s) for <b>partOf</b> (). 1988 * creating it if it does 1989 * not exist. Will not return <code>null</code>. 1990 * 1991 * <p> 1992 * <b>Definition:</b> 1993 * Another Encounter of which this encounter is a part of (administratively or in time). 1994 * </p> 1995 */ 1996 public ResourceReferenceDt getPartOf() { 1997 if (myPartOf == null) { 1998 myPartOf = new ResourceReferenceDt(); 1999 } 2000 return myPartOf; 2001 } 2002 2003 /** 2004 * Sets the value(s) for <b>partOf</b> () 2005 * 2006 * <p> 2007 * <b>Definition:</b> 2008 * Another Encounter of which this encounter is a part of (administratively or in time). 2009 * </p> 2010 */ 2011 public Encounter setPartOf(ResourceReferenceDt theValue) { 2012 myPartOf = theValue; 2013 return this; 2014 } 2015 2016 2017 2018 2019 /** 2020 * Block class for child element: <b>Encounter.statusHistory</b> () 2021 * 2022 * <p> 2023 * <b>Definition:</b> 2024 * 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 2025 * </p> 2026 */ 2027 @Block() 2028 public static class StatusHistory 2029 extends BaseIdentifiableElement implements IResourceBlock { 2030 2031 @Child(name="status", type=CodeDt.class, order=0, min=1, max=1, summary=false, modifier=false) 2032 @Description( 2033 shortDefinition="", 2034 formalDefinition="" 2035 ) 2036 private BoundCodeDt<EncounterStateEnum> myStatus; 2037 2038 @Child(name="period", type=PeriodDt.class, order=1, min=1, max=1, summary=false, modifier=false) 2039 @Description( 2040 shortDefinition="", 2041 formalDefinition="" 2042 ) 2043 private PeriodDt myPeriod; 2044 2045 2046 @Override 2047 public boolean isEmpty() { 2048 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStatus, myPeriod); 2049 } 2050 2051 @Override 2052 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 2053 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStatus, myPeriod); 2054 } 2055 2056 /** 2057 * Gets the value(s) for <b>status</b> (). 2058 * creating it if it does 2059 * not exist. Will not return <code>null</code>. 2060 * 2061 * <p> 2062 * <b>Definition:</b> 2063 * 2064 * </p> 2065 */ 2066 public BoundCodeDt<EncounterStateEnum> getStatusElement() { 2067 if (myStatus == null) { 2068 myStatus = new BoundCodeDt<EncounterStateEnum>(EncounterStateEnum.VALUESET_BINDER); 2069 } 2070 return myStatus; 2071 } 2072 2073 2074 /** 2075 * Gets the value(s) for <b>status</b> (). 2076 * creating it if it does 2077 * not exist. Will not return <code>null</code>. 2078 * 2079 * <p> 2080 * <b>Definition:</b> 2081 * 2082 * </p> 2083 */ 2084 public String getStatus() { 2085 return getStatusElement().getValue(); 2086 } 2087 2088 /** 2089 * Sets the value(s) for <b>status</b> () 2090 * 2091 * <p> 2092 * <b>Definition:</b> 2093 * 2094 * </p> 2095 */ 2096 public StatusHistory setStatus(BoundCodeDt<EncounterStateEnum> theValue) { 2097 myStatus = theValue; 2098 return this; 2099 } 2100 2101 2102 2103 /** 2104 * Sets the value(s) for <b>status</b> () 2105 * 2106 * <p> 2107 * <b>Definition:</b> 2108 * 2109 * </p> 2110 */ 2111 public StatusHistory setStatus(EncounterStateEnum theValue) { 2112 setStatus(new BoundCodeDt<EncounterStateEnum>(EncounterStateEnum.VALUESET_BINDER, theValue)); 2113 2114/* 2115 getStatusElement().setValueAsEnum(theValue); 2116*/ 2117 return this; 2118 } 2119 2120 2121 /** 2122 * Gets the value(s) for <b>period</b> (). 2123 * creating it if it does 2124 * not exist. Will not return <code>null</code>. 2125 * 2126 * <p> 2127 * <b>Definition:</b> 2128 * 2129 * </p> 2130 */ 2131 public PeriodDt getPeriod() { 2132 if (myPeriod == null) { 2133 myPeriod = new PeriodDt(); 2134 } 2135 return myPeriod; 2136 } 2137 2138 /** 2139 * Sets the value(s) for <b>period</b> () 2140 * 2141 * <p> 2142 * <b>Definition:</b> 2143 * 2144 * </p> 2145 */ 2146 public StatusHistory setPeriod(PeriodDt theValue) { 2147 myPeriod = theValue; 2148 return this; 2149 } 2150 2151 2152 2153 2154 2155 2156 } 2157 2158 2159 /** 2160 * Block class for child element: <b>Encounter.participant</b> () 2161 * 2162 * <p> 2163 * <b>Definition:</b> 2164 * The list of people responsible for providing the service 2165 * </p> 2166 */ 2167 @Block() 2168 public static class Participant 2169 extends BaseIdentifiableElement implements IResourceBlock { 2170 2171 @Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 2172 @Description( 2173 shortDefinition="", 2174 formalDefinition="Role of participant in encounter" 2175 ) 2176 private java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> myType; 2177 2178 @Child(name="period", type=PeriodDt.class, order=1, min=0, max=1, summary=false, modifier=false) 2179 @Description( 2180 shortDefinition="", 2181 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" 2182 ) 2183 private PeriodDt myPeriod; 2184 2185 @Child(name="individual", order=2, min=0, max=1, summary=true, modifier=false, type={ 2186 ca.uhn.fhir.model.dstu2.resource.Practitioner.class, ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class }) 2187 @Description( 2188 shortDefinition="who", 2189 formalDefinition="" 2190 ) 2191 private ResourceReferenceDt myIndividual; 2192 2193 2194 @Override 2195 public boolean isEmpty() { 2196 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myPeriod, myIndividual); 2197 } 2198 2199 @Override 2200 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 2201 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myPeriod, myIndividual); 2202 } 2203 2204 /** 2205 * Gets the value(s) for <b>type</b> (). 2206 * creating it if it does 2207 * not exist. Will not return <code>null</code>. 2208 * 2209 * <p> 2210 * <b>Definition:</b> 2211 * Role of participant in encounter 2212 * </p> 2213 */ 2214 public java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> getType() { 2215 if (myType == null) { 2216 myType = new java.util.ArrayList<BoundCodeableConceptDt<ParticipantTypeEnum>>(); 2217 } 2218 return myType; 2219 } 2220 2221 /** 2222 * Sets the value(s) for <b>type</b> () 2223 * 2224 * <p> 2225 * <b>Definition:</b> 2226 * Role of participant in encounter 2227 * </p> 2228 */ 2229 public Participant setType(java.util.List<BoundCodeableConceptDt<ParticipantTypeEnum>> theValue) { 2230 myType = theValue; 2231 return this; 2232 } 2233 2234 2235 2236 /** 2237 * Add a value for <b>type</b> () using an enumerated type. This 2238 * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory 2239 * or contain the desirable codes. If you wish to use codes other than those which are built-in, 2240 * you may also use the {@link #addType()} method. 2241 * 2242 * <p> 2243 * <b>Definition:</b> 2244 * Role of participant in encounter 2245 * </p> 2246 */ 2247 public BoundCodeableConceptDt<ParticipantTypeEnum> addType(ParticipantTypeEnum theValue) { 2248 BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER, theValue); 2249 getType().add(retVal); 2250 return retVal; 2251 } 2252 2253 /** 2254 * Gets the first repetition for <b>type</b> (), 2255 * creating it if it does not already exist. 2256 * 2257 * <p> 2258 * <b>Definition:</b> 2259 * Role of participant in encounter 2260 * </p> 2261 */ 2262 public BoundCodeableConceptDt<ParticipantTypeEnum> getTypeFirstRep() { 2263 if (getType().size() == 0) { 2264 addType(); 2265 } 2266 return getType().get(0); 2267 } 2268 2269 /** 2270 * Add a value for <b>type</b> () 2271 * 2272 * <p> 2273 * <b>Definition:</b> 2274 * Role of participant in encounter 2275 * </p> 2276 */ 2277 public BoundCodeableConceptDt<ParticipantTypeEnum> addType() { 2278 BoundCodeableConceptDt<ParticipantTypeEnum> retVal = new BoundCodeableConceptDt<ParticipantTypeEnum>(ParticipantTypeEnum.VALUESET_BINDER); 2279 getType().add(retVal); 2280 return retVal; 2281 } 2282 2283 /** 2284 * Sets the value(s), and clears any existing value(s) for <b>type</b> () 2285 * 2286 * <p> 2287 * <b>Definition:</b> 2288 * Role of participant in encounter 2289 * </p> 2290 */ 2291 public Participant setType(ParticipantTypeEnum theValue) { 2292 getType().clear(); 2293 addType(theValue); 2294 return this; 2295 } 2296 2297 2298 /** 2299 * Gets the value(s) for <b>period</b> (). 2300 * creating it if it does 2301 * not exist. Will not return <code>null</code>. 2302 * 2303 * <p> 2304 * <b>Definition:</b> 2305 * 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 2306 * </p> 2307 */ 2308 public PeriodDt getPeriod() { 2309 if (myPeriod == null) { 2310 myPeriod = new PeriodDt(); 2311 } 2312 return myPeriod; 2313 } 2314 2315 /** 2316 * Sets the value(s) for <b>period</b> () 2317 * 2318 * <p> 2319 * <b>Definition:</b> 2320 * 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 2321 * </p> 2322 */ 2323 public Participant setPeriod(PeriodDt theValue) { 2324 myPeriod = theValue; 2325 return this; 2326 } 2327 2328 2329 2330 2331 /** 2332 * Gets the value(s) for <b>individual</b> (who). 2333 * creating it if it does 2334 * not exist. Will not return <code>null</code>. 2335 * 2336 * <p> 2337 * <b>Definition:</b> 2338 * 2339 * </p> 2340 */ 2341 public ResourceReferenceDt getIndividual() { 2342 if (myIndividual == null) { 2343 myIndividual = new ResourceReferenceDt(); 2344 } 2345 return myIndividual; 2346 } 2347 2348 /** 2349 * Sets the value(s) for <b>individual</b> (who) 2350 * 2351 * <p> 2352 * <b>Definition:</b> 2353 * 2354 * </p> 2355 */ 2356 public Participant setIndividual(ResourceReferenceDt theValue) { 2357 myIndividual = theValue; 2358 return this; 2359 } 2360 2361 2362 2363 2364 2365 2366 } 2367 2368 2369 /** 2370 * Block class for child element: <b>Encounter.hospitalization</b> () 2371 * 2372 * <p> 2373 * <b>Definition:</b> 2374 * 2375 * </p> 2376 */ 2377 @Block() 2378 public static class Hospitalization 2379 extends BaseIdentifiableElement implements IResourceBlock { 2380 2381 @Child(name="preAdmissionIdentifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=false, modifier=false) 2382 @Description( 2383 shortDefinition="", 2384 formalDefinition="" 2385 ) 2386 private IdentifierDt myPreAdmissionIdentifier; 2387 2388 @Child(name="origin", order=1, min=0, max=1, summary=false, modifier=false, type={ 2389 ca.uhn.fhir.model.dstu2.resource.Location.class }) 2390 @Description( 2391 shortDefinition="", 2392 formalDefinition="" 2393 ) 2394 private ResourceReferenceDt myOrigin; 2395 2396 @Child(name="admitSource", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=false, modifier=false) 2397 @Description( 2398 shortDefinition="", 2399 formalDefinition="" 2400 ) 2401 private BoundCodeableConceptDt<AdmitSourceEnum> myAdmitSource; 2402 2403 @Child(name="admittingDiagnosis", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={ 2404 ca.uhn.fhir.model.dstu2.resource.Condition.class }) 2405 @Description( 2406 shortDefinition="", 2407 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" 2408 ) 2409 private java.util.List<ResourceReferenceDt> myAdmittingDiagnosis; 2410 2411 @Child(name="reAdmission", type=CodeableConceptDt.class, order=4, min=0, max=1, summary=false, modifier=false) 2412 @Description( 2413 shortDefinition="", 2414 formalDefinition="Whether this hospitalization is a readmission and why if known" 2415 ) 2416 private CodeableConceptDt myReAdmission; 2417 2418 @Child(name="dietPreference", type=CodeableConceptDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 2419 @Description( 2420 shortDefinition="", 2421 formalDefinition="" 2422 ) 2423 private java.util.List<CodeableConceptDt> myDietPreference; 2424 2425 @Child(name="specialCourtesy", type=CodeableConceptDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 2426 @Description( 2427 shortDefinition="", 2428 formalDefinition="" 2429 ) 2430 private java.util.List<CodeableConceptDt> mySpecialCourtesy; 2431 2432 @Child(name="specialArrangement", type=CodeableConceptDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 2433 @Description( 2434 shortDefinition="", 2435 formalDefinition="" 2436 ) 2437 private java.util.List<CodeableConceptDt> mySpecialArrangement; 2438 2439 @Child(name="destination", order=8, min=0, max=1, summary=false, modifier=false, type={ 2440 ca.uhn.fhir.model.dstu2.resource.Location.class }) 2441 @Description( 2442 shortDefinition="", 2443 formalDefinition="" 2444 ) 2445 private ResourceReferenceDt myDestination; 2446 2447 @Child(name="dischargeDisposition", type=CodeableConceptDt.class, order=9, min=0, max=1, summary=false, modifier=false) 2448 @Description( 2449 shortDefinition="", 2450 formalDefinition="" 2451 ) 2452 private CodeableConceptDt myDischargeDisposition; 2453 2454 @Child(name="dischargeDiagnosis", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={ 2455 ca.uhn.fhir.model.dstu2.resource.Condition.class }) 2456 @Description( 2457 shortDefinition="", 2458 formalDefinition="" 2459 ) 2460 private java.util.List<ResourceReferenceDt> myDischargeDiagnosis; 2461 2462 2463 @Override 2464 public boolean isEmpty() { 2465 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myPreAdmissionIdentifier, myOrigin, myAdmitSource, myAdmittingDiagnosis, myReAdmission, myDietPreference, mySpecialCourtesy, mySpecialArrangement, myDestination, myDischargeDisposition, myDischargeDiagnosis); 2466 } 2467 2468 @Override 2469 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 2470 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myPreAdmissionIdentifier, myOrigin, myAdmitSource, myAdmittingDiagnosis, myReAdmission, myDietPreference, mySpecialCourtesy, mySpecialArrangement, myDestination, myDischargeDisposition, myDischargeDiagnosis); 2471 } 2472 2473 /** 2474 * Gets the value(s) for <b>preAdmissionIdentifier</b> (). 2475 * creating it if it does 2476 * not exist. Will not return <code>null</code>. 2477 * 2478 * <p> 2479 * <b>Definition:</b> 2480 * 2481 * </p> 2482 */ 2483 public IdentifierDt getPreAdmissionIdentifier() { 2484 if (myPreAdmissionIdentifier == null) { 2485 myPreAdmissionIdentifier = new IdentifierDt(); 2486 } 2487 return myPreAdmissionIdentifier; 2488 } 2489 2490 /** 2491 * Sets the value(s) for <b>preAdmissionIdentifier</b> () 2492 * 2493 * <p> 2494 * <b>Definition:</b> 2495 * 2496 * </p> 2497 */ 2498 public Hospitalization setPreAdmissionIdentifier(IdentifierDt theValue) { 2499 myPreAdmissionIdentifier = theValue; 2500 return this; 2501 } 2502 2503 2504 2505 2506 /** 2507 * Gets the value(s) for <b>origin</b> (). 2508 * creating it if it does 2509 * not exist. Will not return <code>null</code>. 2510 * 2511 * <p> 2512 * <b>Definition:</b> 2513 * 2514 * </p> 2515 */ 2516 public ResourceReferenceDt getOrigin() { 2517 if (myOrigin == null) { 2518 myOrigin = new ResourceReferenceDt(); 2519 } 2520 return myOrigin; 2521 } 2522 2523 /** 2524 * Sets the value(s) for <b>origin</b> () 2525 * 2526 * <p> 2527 * <b>Definition:</b> 2528 * 2529 * </p> 2530 */ 2531 public Hospitalization setOrigin(ResourceReferenceDt theValue) { 2532 myOrigin = theValue; 2533 return this; 2534 } 2535 2536 2537 2538 2539 /** 2540 * Gets the value(s) for <b>admitSource</b> (). 2541 * creating it if it does 2542 * not exist. Will not return <code>null</code>. 2543 * 2544 * <p> 2545 * <b>Definition:</b> 2546 * 2547 * </p> 2548 */ 2549 public BoundCodeableConceptDt<AdmitSourceEnum> getAdmitSource() { 2550 if (myAdmitSource == null) { 2551 myAdmitSource = new BoundCodeableConceptDt<AdmitSourceEnum>(AdmitSourceEnum.VALUESET_BINDER); 2552 } 2553 return myAdmitSource; 2554 } 2555 2556 /** 2557 * Sets the value(s) for <b>admitSource</b> () 2558 * 2559 * <p> 2560 * <b>Definition:</b> 2561 * 2562 * </p> 2563 */ 2564 public Hospitalization setAdmitSource(BoundCodeableConceptDt<AdmitSourceEnum> theValue) { 2565 myAdmitSource = theValue; 2566 return this; 2567 } 2568 2569 2570 2571 /** 2572 * Sets the value(s) for <b>admitSource</b> () 2573 * 2574 * <p> 2575 * <b>Definition:</b> 2576 * 2577 * </p> 2578 */ 2579 public Hospitalization setAdmitSource(AdmitSourceEnum theValue) { 2580 setAdmitSource(new BoundCodeableConceptDt<AdmitSourceEnum>(AdmitSourceEnum.VALUESET_BINDER, theValue)); 2581 2582/* 2583 getAdmitSource().setValueAsEnum(theValue); 2584*/ 2585 return this; 2586 } 2587 2588 2589 /** 2590 * Gets the value(s) for <b>admittingDiagnosis</b> (). 2591 * creating it if it does 2592 * not exist. Will not return <code>null</code>. 2593 * 2594 * <p> 2595 * <b>Definition:</b> 2596 * 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 2597 * </p> 2598 */ 2599 public java.util.List<ResourceReferenceDt> getAdmittingDiagnosis() { 2600 if (myAdmittingDiagnosis == null) { 2601 myAdmittingDiagnosis = new java.util.ArrayList<ResourceReferenceDt>(); 2602 } 2603 return myAdmittingDiagnosis; 2604 } 2605 2606 /** 2607 * Sets the value(s) for <b>admittingDiagnosis</b> () 2608 * 2609 * <p> 2610 * <b>Definition:</b> 2611 * 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 2612 * </p> 2613 */ 2614 public Hospitalization setAdmittingDiagnosis(java.util.List<ResourceReferenceDt> theValue) { 2615 myAdmittingDiagnosis = theValue; 2616 return this; 2617 } 2618 2619 2620 2621 /** 2622 * Adds and returns a new value for <b>admittingDiagnosis</b> () 2623 * 2624 * <p> 2625 * <b>Definition:</b> 2626 * 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 2627 * </p> 2628 */ 2629 public ResourceReferenceDt addAdmittingDiagnosis() { 2630 ResourceReferenceDt newType = new ResourceReferenceDt(); 2631 getAdmittingDiagnosis().add(newType); 2632 return newType; 2633 } 2634 2635 /** 2636 * Gets the value(s) for <b>reAdmission</b> (). 2637 * creating it if it does 2638 * not exist. Will not return <code>null</code>. 2639 * 2640 * <p> 2641 * <b>Definition:</b> 2642 * Whether this hospitalization is a readmission and why if known 2643 * </p> 2644 */ 2645 public CodeableConceptDt getReAdmission() { 2646 if (myReAdmission == null) { 2647 myReAdmission = new CodeableConceptDt(); 2648 } 2649 return myReAdmission; 2650 } 2651 2652 /** 2653 * Sets the value(s) for <b>reAdmission</b> () 2654 * 2655 * <p> 2656 * <b>Definition:</b> 2657 * Whether this hospitalization is a readmission and why if known 2658 * </p> 2659 */ 2660 public Hospitalization setReAdmission(CodeableConceptDt theValue) { 2661 myReAdmission = theValue; 2662 return this; 2663 } 2664 2665 2666 2667 2668 /** 2669 * Gets the value(s) for <b>dietPreference</b> (). 2670 * creating it if it does 2671 * not exist. Will not return <code>null</code>. 2672 * 2673 * <p> 2674 * <b>Definition:</b> 2675 * 2676 * </p> 2677 */ 2678 public java.util.List<CodeableConceptDt> getDietPreference() { 2679 if (myDietPreference == null) { 2680 myDietPreference = new java.util.ArrayList<CodeableConceptDt>(); 2681 } 2682 return myDietPreference; 2683 } 2684 2685 /** 2686 * Sets the value(s) for <b>dietPreference</b> () 2687 * 2688 * <p> 2689 * <b>Definition:</b> 2690 * 2691 * </p> 2692 */ 2693 public Hospitalization setDietPreference(java.util.List<CodeableConceptDt> theValue) { 2694 myDietPreference = theValue; 2695 return this; 2696 } 2697 2698 2699 2700 /** 2701 * Adds and returns a new value for <b>dietPreference</b> () 2702 * 2703 * <p> 2704 * <b>Definition:</b> 2705 * 2706 * </p> 2707 */ 2708 public CodeableConceptDt addDietPreference() { 2709 CodeableConceptDt newType = new CodeableConceptDt(); 2710 getDietPreference().add(newType); 2711 return newType; 2712 } 2713 2714 /** 2715 * Adds a given new value for <b>dietPreference</b> () 2716 * 2717 * <p> 2718 * <b>Definition:</b> 2719 * 2720 * </p> 2721 * @param theValue The dietPreference to add (must not be <code>null</code>) 2722 */ 2723 public Hospitalization addDietPreference(CodeableConceptDt theValue) { 2724 if (theValue == null) { 2725 throw new NullPointerException("theValue must not be null"); 2726 } 2727 getDietPreference().add(theValue); 2728 return this; 2729 } 2730 2731 /** 2732 * Gets the first repetition for <b>dietPreference</b> (), 2733 * creating it if it does not already exist. 2734 * 2735 * <p> 2736 * <b>Definition:</b> 2737 * 2738 * </p> 2739 */ 2740 public CodeableConceptDt getDietPreferenceFirstRep() { 2741 if (getDietPreference().isEmpty()) { 2742 return addDietPreference(); 2743 } 2744 return getDietPreference().get(0); 2745 } 2746 2747 /** 2748 * Gets the value(s) for <b>specialCourtesy</b> (). 2749 * creating it if it does 2750 * not exist. Will not return <code>null</code>. 2751 * 2752 * <p> 2753 * <b>Definition:</b> 2754 * 2755 * </p> 2756 */ 2757 public java.util.List<CodeableConceptDt> getSpecialCourtesy() { 2758 if (mySpecialCourtesy == null) { 2759 mySpecialCourtesy = new java.util.ArrayList<CodeableConceptDt>(); 2760 } 2761 return mySpecialCourtesy; 2762 } 2763 2764 /** 2765 * Sets the value(s) for <b>specialCourtesy</b> () 2766 * 2767 * <p> 2768 * <b>Definition:</b> 2769 * 2770 * </p> 2771 */ 2772 public Hospitalization setSpecialCourtesy(java.util.List<CodeableConceptDt> theValue) { 2773 mySpecialCourtesy = theValue; 2774 return this; 2775 } 2776 2777 2778 2779 /** 2780 * Adds and returns a new value for <b>specialCourtesy</b> () 2781 * 2782 * <p> 2783 * <b>Definition:</b> 2784 * 2785 * </p> 2786 */ 2787 public CodeableConceptDt addSpecialCourtesy() { 2788 CodeableConceptDt newType = new CodeableConceptDt(); 2789 getSpecialCourtesy().add(newType); 2790 return newType; 2791 } 2792 2793 /** 2794 * Adds a given new value for <b>specialCourtesy</b> () 2795 * 2796 * <p> 2797 * <b>Definition:</b> 2798 * 2799 * </p> 2800 * @param theValue The specialCourtesy to add (must not be <code>null</code>) 2801 */ 2802 public Hospitalization addSpecialCourtesy(CodeableConceptDt theValue) { 2803 if (theValue == null) { 2804 throw new NullPointerException("theValue must not be null"); 2805 } 2806 getSpecialCourtesy().add(theValue); 2807 return this; 2808 } 2809 2810 /** 2811 * Gets the first repetition for <b>specialCourtesy</b> (), 2812 * creating it if it does not already exist. 2813 * 2814 * <p> 2815 * <b>Definition:</b> 2816 * 2817 * </p> 2818 */ 2819 public CodeableConceptDt getSpecialCourtesyFirstRep() { 2820 if (getSpecialCourtesy().isEmpty()) { 2821 return addSpecialCourtesy(); 2822 } 2823 return getSpecialCourtesy().get(0); 2824 } 2825 2826 /** 2827 * Gets the value(s) for <b>specialArrangement</b> (). 2828 * creating it if it does 2829 * not exist. Will not return <code>null</code>. 2830 * 2831 * <p> 2832 * <b>Definition:</b> 2833 * 2834 * </p> 2835 */ 2836 public java.util.List<CodeableConceptDt> getSpecialArrangement() { 2837 if (mySpecialArrangement == null) { 2838 mySpecialArrangement = new java.util.ArrayList<CodeableConceptDt>(); 2839 } 2840 return mySpecialArrangement; 2841 } 2842 2843 /** 2844 * Sets the value(s) for <b>specialArrangement</b> () 2845 * 2846 * <p> 2847 * <b>Definition:</b> 2848 * 2849 * </p> 2850 */ 2851 public Hospitalization setSpecialArrangement(java.util.List<CodeableConceptDt> theValue) { 2852 mySpecialArrangement = theValue; 2853 return this; 2854 } 2855 2856 2857 2858 /** 2859 * Adds and returns a new value for <b>specialArrangement</b> () 2860 * 2861 * <p> 2862 * <b>Definition:</b> 2863 * 2864 * </p> 2865 */ 2866 public CodeableConceptDt addSpecialArrangement() { 2867 CodeableConceptDt newType = new CodeableConceptDt(); 2868 getSpecialArrangement().add(newType); 2869 return newType; 2870 } 2871 2872 /** 2873 * Adds a given new value for <b>specialArrangement</b> () 2874 * 2875 * <p> 2876 * <b>Definition:</b> 2877 * 2878 * </p> 2879 * @param theValue The specialArrangement to add (must not be <code>null</code>) 2880 */ 2881 public Hospitalization addSpecialArrangement(CodeableConceptDt theValue) { 2882 if (theValue == null) { 2883 throw new NullPointerException("theValue must not be null"); 2884 } 2885 getSpecialArrangement().add(theValue); 2886 return this; 2887 } 2888 2889 /** 2890 * Gets the first repetition for <b>specialArrangement</b> (), 2891 * creating it if it does not already exist. 2892 * 2893 * <p> 2894 * <b>Definition:</b> 2895 * 2896 * </p> 2897 */ 2898 public CodeableConceptDt getSpecialArrangementFirstRep() { 2899 if (getSpecialArrangement().isEmpty()) { 2900 return addSpecialArrangement(); 2901 } 2902 return getSpecialArrangement().get(0); 2903 } 2904 2905 /** 2906 * Gets the value(s) for <b>destination</b> (). 2907 * creating it if it does 2908 * not exist. Will not return <code>null</code>. 2909 * 2910 * <p> 2911 * <b>Definition:</b> 2912 * 2913 * </p> 2914 */ 2915 public ResourceReferenceDt getDestination() { 2916 if (myDestination == null) { 2917 myDestination = new ResourceReferenceDt(); 2918 } 2919 return myDestination; 2920 } 2921 2922 /** 2923 * Sets the value(s) for <b>destination</b> () 2924 * 2925 * <p> 2926 * <b>Definition:</b> 2927 * 2928 * </p> 2929 */ 2930 public Hospitalization setDestination(ResourceReferenceDt theValue) { 2931 myDestination = theValue; 2932 return this; 2933 } 2934 2935 2936 2937 2938 /** 2939 * Gets the value(s) for <b>dischargeDisposition</b> (). 2940 * creating it if it does 2941 * not exist. Will not return <code>null</code>. 2942 * 2943 * <p> 2944 * <b>Definition:</b> 2945 * 2946 * </p> 2947 */ 2948 public CodeableConceptDt getDischargeDisposition() { 2949 if (myDischargeDisposition == null) { 2950 myDischargeDisposition = new CodeableConceptDt(); 2951 } 2952 return myDischargeDisposition; 2953 } 2954 2955 /** 2956 * Sets the value(s) for <b>dischargeDisposition</b> () 2957 * 2958 * <p> 2959 * <b>Definition:</b> 2960 * 2961 * </p> 2962 */ 2963 public Hospitalization setDischargeDisposition(CodeableConceptDt theValue) { 2964 myDischargeDisposition = theValue; 2965 return this; 2966 } 2967 2968 2969 2970 2971 /** 2972 * Gets the value(s) for <b>dischargeDiagnosis</b> (). 2973 * creating it if it does 2974 * not exist. Will not return <code>null</code>. 2975 * 2976 * <p> 2977 * <b>Definition:</b> 2978 * 2979 * </p> 2980 */ 2981 public java.util.List<ResourceReferenceDt> getDischargeDiagnosis() { 2982 if (myDischargeDiagnosis == null) { 2983 myDischargeDiagnosis = new java.util.ArrayList<ResourceReferenceDt>(); 2984 } 2985 return myDischargeDiagnosis; 2986 } 2987 2988 /** 2989 * Sets the value(s) for <b>dischargeDiagnosis</b> () 2990 * 2991 * <p> 2992 * <b>Definition:</b> 2993 * 2994 * </p> 2995 */ 2996 public Hospitalization setDischargeDiagnosis(java.util.List<ResourceReferenceDt> theValue) { 2997 myDischargeDiagnosis = theValue; 2998 return this; 2999 } 3000 3001 3002 3003 /** 3004 * Adds and returns a new value for <b>dischargeDiagnosis</b> () 3005 * 3006 * <p> 3007 * <b>Definition:</b> 3008 * 3009 * </p> 3010 */ 3011 public ResourceReferenceDt addDischargeDiagnosis() { 3012 ResourceReferenceDt newType = new ResourceReferenceDt(); 3013 getDischargeDiagnosis().add(newType); 3014 return newType; 3015 } 3016 3017 3018 3019 } 3020 3021 3022 /** 3023 * Block class for child element: <b>Encounter.location</b> () 3024 * 3025 * <p> 3026 * <b>Definition:</b> 3027 * List of locations where the patient has been during this encounter 3028 * </p> 3029 */ 3030 @Block() 3031 public static class Location 3032 extends BaseIdentifiableElement implements IResourceBlock { 3033 3034 @Child(name="location", order=0, min=1, max=1, summary=false, modifier=false, type={ 3035 ca.uhn.fhir.model.dstu2.resource.Location.class }) 3036 @Description( 3037 shortDefinition="where", 3038 formalDefinition="The location where the encounter takes place" 3039 ) 3040 private ResourceReferenceDt myLocation; 3041 3042 @Child(name="status", type=CodeDt.class, order=1, min=0, max=1, summary=false, modifier=false) 3043 @Description( 3044 shortDefinition="", 3045 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" 3046 ) 3047 private BoundCodeDt<EncounterLocationStatusEnum> myStatus; 3048 3049 @Child(name="period", type=PeriodDt.class, order=2, min=0, max=1, summary=false, modifier=false) 3050 @Description( 3051 shortDefinition="", 3052 formalDefinition="" 3053 ) 3054 private PeriodDt myPeriod; 3055 3056 3057 @Override 3058 public boolean isEmpty() { 3059 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLocation, myStatus, myPeriod); 3060 } 3061 3062 @Override 3063 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 3064 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLocation, myStatus, myPeriod); 3065 } 3066 3067 /** 3068 * Gets the value(s) for <b>location</b> (where). 3069 * creating it if it does 3070 * not exist. Will not return <code>null</code>. 3071 * 3072 * <p> 3073 * <b>Definition:</b> 3074 * The location where the encounter takes place 3075 * </p> 3076 */ 3077 public ResourceReferenceDt getLocation() { 3078 if (myLocation == null) { 3079 myLocation = new ResourceReferenceDt(); 3080 } 3081 return myLocation; 3082 } 3083 3084 /** 3085 * Sets the value(s) for <b>location</b> (where) 3086 * 3087 * <p> 3088 * <b>Definition:</b> 3089 * The location where the encounter takes place 3090 * </p> 3091 */ 3092 public Location setLocation(ResourceReferenceDt theValue) { 3093 myLocation = theValue; 3094 return this; 3095 } 3096 3097 3098 3099 3100 /** 3101 * Gets the value(s) for <b>status</b> (). 3102 * creating it if it does 3103 * not exist. Will not return <code>null</code>. 3104 * 3105 * <p> 3106 * <b>Definition:</b> 3107 * 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 3108 * </p> 3109 */ 3110 public BoundCodeDt<EncounterLocationStatusEnum> getStatusElement() { 3111 if (myStatus == null) { 3112 myStatus = new BoundCodeDt<EncounterLocationStatusEnum>(EncounterLocationStatusEnum.VALUESET_BINDER); 3113 } 3114 return myStatus; 3115 } 3116 3117 3118 /** 3119 * Gets the value(s) for <b>status</b> (). 3120 * creating it if it does 3121 * not exist. Will not return <code>null</code>. 3122 * 3123 * <p> 3124 * <b>Definition:</b> 3125 * 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 3126 * </p> 3127 */ 3128 public String getStatus() { 3129 return getStatusElement().getValue(); 3130 } 3131 3132 /** 3133 * Sets the value(s) for <b>status</b> () 3134 * 3135 * <p> 3136 * <b>Definition:</b> 3137 * 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 3138 * </p> 3139 */ 3140 public Location setStatus(BoundCodeDt<EncounterLocationStatusEnum> theValue) { 3141 myStatus = theValue; 3142 return this; 3143 } 3144 3145 3146 3147 /** 3148 * Sets the value(s) for <b>status</b> () 3149 * 3150 * <p> 3151 * <b>Definition:</b> 3152 * 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 3153 * </p> 3154 */ 3155 public Location setStatus(EncounterLocationStatusEnum theValue) { 3156 setStatus(new BoundCodeDt<EncounterLocationStatusEnum>(EncounterLocationStatusEnum.VALUESET_BINDER, theValue)); 3157 3158/* 3159 getStatusElement().setValueAsEnum(theValue); 3160*/ 3161 return this; 3162 } 3163 3164 3165 /** 3166 * Gets the value(s) for <b>period</b> (). 3167 * creating it if it does 3168 * not exist. Will not return <code>null</code>. 3169 * 3170 * <p> 3171 * <b>Definition:</b> 3172 * 3173 * </p> 3174 */ 3175 public PeriodDt getPeriod() { 3176 if (myPeriod == null) { 3177 myPeriod = new PeriodDt(); 3178 } 3179 return myPeriod; 3180 } 3181 3182 /** 3183 * Sets the value(s) for <b>period</b> () 3184 * 3185 * <p> 3186 * <b>Definition:</b> 3187 * 3188 * </p> 3189 */ 3190 public Location setPeriod(PeriodDt theValue) { 3191 myPeriod = theValue; 3192 return this; 3193 } 3194 3195 3196 3197 3198 3199 3200 } 3201 3202 3203 3204 3205 @Override 3206 public String getResourceName() { 3207 return "Encounter"; 3208 } 3209 3210 public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() { 3211 return ca.uhn.fhir.context.FhirVersionEnum.DSTU2; 3212 } 3213 3214 3215}