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.composite.AnnotationDt; 042import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum; 043import ca.uhn.fhir.model.dstu2.resource.Appointment; 044import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum; 045import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum; 046import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum; 047import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum; 048import ca.uhn.fhir.model.dstu2.composite.AttachmentDt; 049import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum; 050import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum; 051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum; 052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum; 053import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum; 054import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum; 055import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum; 056import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum; 057import ca.uhn.fhir.model.dstu2.resource.BodySite; 058import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum; 059import ca.uhn.fhir.model.dstu2.resource.CarePlan; 060import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum; 061import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum; 062import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum; 063import ca.uhn.fhir.model.dstu2.resource.Claim; 064import ca.uhn.fhir.model.dstu2.resource.ClaimResponse; 065import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum; 066import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression; 067import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum; 068import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt; 069import ca.uhn.fhir.model.dstu2.composite.CodingDt; 070import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest; 071import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum; 072import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum; 073import ca.uhn.fhir.model.dstu2.resource.Composition; 074import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum; 075import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum; 076import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum; 077import ca.uhn.fhir.model.dstu2.resource.Condition; 078import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum; 079import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum; 080import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum; 081import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum; 082import ca.uhn.fhir.model.dstu2.resource.Conformance; 083import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum; 084import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum; 085import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum; 086import ca.uhn.fhir.model.dstu2.composite.ContactPointDt; 087import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum; 088import ca.uhn.fhir.model.dstu2.resource.Contract; 089import ca.uhn.fhir.model.dstu2.resource.Coverage; 090import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum; 091import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum; 092import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum; 093import ca.uhn.fhir.model.dstu2.resource.Device; 094import ca.uhn.fhir.model.dstu2.resource.DeviceComponent; 095import ca.uhn.fhir.model.dstu2.resource.DeviceMetric; 096import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum; 097import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum; 098import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum; 099import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum; 100import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum; 101import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum; 102import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest; 103import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum; 104import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum; 105import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder; 106import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum; 107import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum; 108import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport; 109import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum; 110import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum; 111import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum; 112import ca.uhn.fhir.model.dstu2.resource.DocumentReference; 113import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum; 114import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum; 115import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt; 116import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest; 117import ca.uhn.fhir.model.dstu2.resource.Encounter; 118import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum; 119import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum; 120import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum; 121import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest; 122import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare; 123import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum; 124import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum; 125import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum; 126import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory; 127import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum; 128import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum; 129import ca.uhn.fhir.model.dstu2.resource.Goal; 130import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum; 131import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum; 132import ca.uhn.fhir.model.dstu2.resource.Group; 133import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum; 134import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum; 135import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum; 136import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum; 137import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum; 138import ca.uhn.fhir.model.dstu2.resource.HealthcareService; 139import ca.uhn.fhir.model.dstu2.composite.HumanNameDt; 140import ca.uhn.fhir.model.dstu2.composite.IdentifierDt; 141import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum; 142import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum; 143import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection; 144import ca.uhn.fhir.model.dstu2.resource.ImagingStudy; 145import ca.uhn.fhir.model.dstu2.resource.Immunization; 146import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum; 147import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum; 148import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum; 149import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum; 150import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum; 151import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum; 152import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum; 153import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum; 154import ca.uhn.fhir.model.dstu2.resource.Location; 155import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum; 156import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum; 157import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum; 158import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum; 159import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum; 160import ca.uhn.fhir.model.dstu2.resource.Media; 161import ca.uhn.fhir.model.dstu2.resource.Medication; 162import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum; 163import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum; 164import ca.uhn.fhir.model.dstu2.resource.MedicationOrder; 165import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum; 166import ca.uhn.fhir.model.dstu2.resource.MedicationStatement; 167import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum; 168import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum; 169import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum; 170import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum; 171import ca.uhn.fhir.model.dstu2.resource.NamingSystem; 172import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum; 173import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum; 174import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum; 175import ca.uhn.fhir.model.dstu2.resource.NutritionOrder; 176import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum; 177import ca.uhn.fhir.model.dstu2.resource.Observation; 178import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum; 179import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum; 180import ca.uhn.fhir.model.dstu2.resource.OperationDefinition; 181import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum; 182import ca.uhn.fhir.model.dstu2.resource.OperationOutcome; 183import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum; 184import ca.uhn.fhir.model.dstu2.resource.Order; 185import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum; 186import ca.uhn.fhir.model.dstu2.resource.Organization; 187import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum; 188import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum; 189import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum; 190import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum; 191import ca.uhn.fhir.model.dstu2.resource.Patient; 192import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum; 193import ca.uhn.fhir.model.dstu2.composite.PeriodDt; 194import ca.uhn.fhir.model.dstu2.resource.Person; 195import ca.uhn.fhir.model.dstu2.resource.Practitioner; 196import ca.uhn.fhir.model.dstu2.resource.Procedure; 197import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest; 198import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum; 199import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum; 200import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum; 201import ca.uhn.fhir.model.dstu2.resource.ProcessRequest; 202import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum; 203import ca.uhn.fhir.model.dstu2.composite.QuantityDt; 204import ca.uhn.fhir.model.dstu2.resource.Questionnaire; 205import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse; 206import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum; 207import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum; 208import ca.uhn.fhir.model.dstu2.composite.RangeDt; 209import ca.uhn.fhir.model.dstu2.composite.RatioDt; 210import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum; 211import ca.uhn.fhir.model.dstu2.resource.ReferralRequest; 212import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum; 213import ca.uhn.fhir.model.dstu2.resource.RelatedPerson; 214import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum; 215import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum; 216import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum; 217import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum; 218import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum; 219import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum; 220import ca.uhn.fhir.model.dstu2.resource.RiskAssessment; 221import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum; 222import ca.uhn.fhir.model.dstu2.composite.SampledDataDt; 223import ca.uhn.fhir.model.dstu2.resource.Schedule; 224import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum; 225import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum; 226import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum; 227import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum; 228import ca.uhn.fhir.model.dstu2.composite.SignatureDt; 229import ca.uhn.fhir.model.dstu2.resource.Slot; 230import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum; 231import ca.uhn.fhir.model.dstu2.resource.Specimen; 232import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum; 233import ca.uhn.fhir.model.dstu2.resource.StructureDefinition; 234import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum; 235import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum; 236import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum; 237import ca.uhn.fhir.model.dstu2.resource.Substance; 238import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum; 239import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum; 240import ca.uhn.fhir.model.dstu2.resource.SupplyRequest; 241import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum; 242import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum; 243import ca.uhn.fhir.model.api.TemporalPrecisionEnum; 244import ca.uhn.fhir.model.dstu2.composite.TimingDt; 245import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum; 246import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum; 247import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum; 248import ca.uhn.fhir.model.dstu2.valueset.UseEnum; 249import ca.uhn.fhir.model.dstu2.resource.ValueSet; 250import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum; 251import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum; 252import ca.uhn.fhir.model.dstu2.resource.VisionPrescription; 253import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum; 254import ca.uhn.fhir.model.api.IResource; 255import ca.uhn.fhir.model.dstu2.composite.AgeDt; 256import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt; 257import ca.uhn.fhir.model.dstu2.composite.DurationDt; 258import ca.uhn.fhir.model.dstu2.composite.MoneyDt; 259import ca.uhn.fhir.model.dstu2.composite.NarrativeDt; 260import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt; 261import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt; 262import ca.uhn.fhir.model.primitive.Base64BinaryDt; 263import ca.uhn.fhir.model.primitive.BooleanDt; 264import ca.uhn.fhir.model.primitive.BoundCodeDt; 265import ca.uhn.fhir.model.primitive.CodeDt; 266import ca.uhn.fhir.model.primitive.DateDt; 267import ca.uhn.fhir.model.primitive.DateTimeDt; 268import ca.uhn.fhir.model.primitive.DecimalDt; 269import ca.uhn.fhir.model.primitive.IdDt; 270import ca.uhn.fhir.model.primitive.InstantDt; 271import ca.uhn.fhir.model.primitive.IntegerDt; 272import ca.uhn.fhir.model.primitive.OidDt; 273import ca.uhn.fhir.model.primitive.PositiveIntDt; 274import ca.uhn.fhir.model.primitive.StringDt; 275import ca.uhn.fhir.model.primitive.TimeDt; 276import ca.uhn.fhir.model.primitive.UnsignedIntDt; 277import ca.uhn.fhir.model.primitive.UriDt; 278 279 280/** 281 * HAPI/FHIR <b>MedicationStatement</b> Resource 282 * (clinical.medication) 283 * 284 * <p> 285 * <b>Definition:</b> 286 * A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. 287 * </p> 288 * 289 * <p> 290 * <b>Requirements:</b> 291 * 292 * </p> 293 * 294 * <p> 295 * <b>Profile Definition:</b> 296 * <a href="http://hl7.org/fhir/profiles/MedicationStatement">http://hl7.org/fhir/profiles/MedicationStatement</a> 297 * </p> 298 * 299 */ 300@ResourceDef(name="MedicationStatement", profile="http://hl7.org/fhir/profiles/MedicationStatement", id="medicationstatement") 301public class MedicationStatement extends ca.uhn.fhir.model.dstu2.resource.BaseResource 302 implements IResource { 303 304 /** 305 * Search parameter constant for <b>identifier</b> 306 * <p> 307 * Description: <b>Return statements with this external identifier</b><br> 308 * Type: <b>token</b><br> 309 * Path: <b>MedicationStatement.identifier</b><br> 310 * </p> 311 */ 312 @SearchParamDefinition(name="identifier", path="MedicationStatement.identifier", description="Return statements with this external identifier", type="token" ) 313 public static final String SP_IDENTIFIER = "identifier"; 314 315 /** 316 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 317 * <p> 318 * Description: <b>Return statements with this external identifier</b><br> 319 * Type: <b>token</b><br> 320 * Path: <b>MedicationStatement.identifier</b><br> 321 * </p> 322 */ 323 public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER); 324 325 /** 326 * Search parameter constant for <b>medication</b> 327 * <p> 328 * Description: <b>Return administrations of this medication reference</b><br> 329 * Type: <b>reference</b><br> 330 * Path: <b>MedicationStatement.medicationReference</b><br> 331 * </p> 332 */ 333 @SearchParamDefinition(name="medication", path="MedicationStatement.medicationReference", description="Return administrations of this medication reference", type="reference" ) 334 public static final String SP_MEDICATION = "medication"; 335 336 /** 337 * <b>Fluent Client</b> search parameter constant for <b>medication</b> 338 * <p> 339 * Description: <b>Return administrations of this medication reference</b><br> 340 * Type: <b>reference</b><br> 341 * Path: <b>MedicationStatement.medicationReference</b><br> 342 * </p> 343 */ 344 public static final ReferenceClientParam MEDICATION = new ReferenceClientParam(SP_MEDICATION); 345 346 /** 347 * Search parameter constant for <b>code</b> 348 * <p> 349 * Description: <b>Return administrations of this medication code</b><br> 350 * Type: <b>token</b><br> 351 * Path: <b>MedicationStatement.medicationCodeableConcept</b><br> 352 * </p> 353 */ 354 @SearchParamDefinition(name="code", path="MedicationStatement.medicationCodeableConcept", description="Return administrations of this medication code", type="token" ) 355 public static final String SP_CODE = "code"; 356 357 /** 358 * <b>Fluent Client</b> search parameter constant for <b>code</b> 359 * <p> 360 * Description: <b>Return administrations of this medication code</b><br> 361 * Type: <b>token</b><br> 362 * Path: <b>MedicationStatement.medicationCodeableConcept</b><br> 363 * </p> 364 */ 365 public static final TokenClientParam CODE = new TokenClientParam(SP_CODE); 366 367 /** 368 * Search parameter constant for <b>patient</b> 369 * <p> 370 * Description: <b>The identity of a patient to list statements for</b><br> 371 * Type: <b>reference</b><br> 372 * Path: <b>MedicationStatement.patient</b><br> 373 * </p> 374 */ 375 @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list statements for", type="reference" , providesMembershipIn={ 376 @Compartment(name="Patient") } 377 ) 378 public static final String SP_PATIENT = "patient"; 379 380 /** 381 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 382 * <p> 383 * Description: <b>The identity of a patient to list statements for</b><br> 384 * Type: <b>reference</b><br> 385 * Path: <b>MedicationStatement.patient</b><br> 386 * </p> 387 */ 388 public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT); 389 390 /** 391 * Search parameter constant for <b>effectivedate</b> 392 * <p> 393 * Description: <b>Date when patient was taking (or not taking) the medication</b><br> 394 * Type: <b>date</b><br> 395 * Path: <b>MedicationStatement.effective[x]</b><br> 396 * </p> 397 */ 398 @SearchParamDefinition(name="effectivedate", path="MedicationStatement.effective[x]", description="Date when patient was taking (or not taking) the medication", type="date" ) 399 public static final String SP_EFFECTIVEDATE = "effectivedate"; 400 401 /** 402 * <b>Fluent Client</b> search parameter constant for <b>effectivedate</b> 403 * <p> 404 * Description: <b>Date when patient was taking (or not taking) the medication</b><br> 405 * Type: <b>date</b><br> 406 * Path: <b>MedicationStatement.effective[x]</b><br> 407 * </p> 408 */ 409 public static final DateClientParam EFFECTIVEDATE = new DateClientParam(SP_EFFECTIVEDATE); 410 411 /** 412 * Search parameter constant for <b>status</b> 413 * <p> 414 * Description: <b>Return statements that match the given status</b><br> 415 * Type: <b>token</b><br> 416 * Path: <b>MedicationStatement.status</b><br> 417 * </p> 418 */ 419 @SearchParamDefinition(name="status", path="MedicationStatement.status", description="Return statements that match the given status", type="token" ) 420 public static final String SP_STATUS = "status"; 421 422 /** 423 * <b>Fluent Client</b> search parameter constant for <b>status</b> 424 * <p> 425 * Description: <b>Return statements that match the given status</b><br> 426 * Type: <b>token</b><br> 427 * Path: <b>MedicationStatement.status</b><br> 428 * </p> 429 */ 430 public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS); 431 432 /** 433 * Search parameter constant for <b>source</b> 434 * <p> 435 * Description: <b>Who the information in the statement came from</b><br> 436 * Type: <b>reference</b><br> 437 * Path: <b>MedicationStatement.informationSource</b><br> 438 * </p> 439 */ 440 @SearchParamDefinition(name="source", path="MedicationStatement.informationSource", description="Who the information in the statement came from", type="reference" , providesMembershipIn={ 441 @Compartment(name="Patient") , @Compartment(name="Encounter") , @Compartment(name="RelatedPerson") } 442 ) 443 public static final String SP_SOURCE = "source"; 444 445 /** 446 * <b>Fluent Client</b> search parameter constant for <b>source</b> 447 * <p> 448 * Description: <b>Who the information in the statement came from</b><br> 449 * Type: <b>reference</b><br> 450 * Path: <b>MedicationStatement.informationSource</b><br> 451 * </p> 452 */ 453 public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE); 454 455 456 /** 457 * Constant for fluent queries to be used to add include statements. Specifies 458 * the path value of "<b>MedicationStatement:medication</b>". 459 */ 460 public static final Include INCLUDE_MEDICATION = new Include("MedicationStatement:medication"); 461 462 /** 463 * Constant for fluent queries to be used to add include statements. Specifies 464 * the path value of "<b>MedicationStatement:patient</b>". 465 */ 466 public static final Include INCLUDE_PATIENT = new Include("MedicationStatement:patient"); 467 468 /** 469 * Constant for fluent queries to be used to add include statements. Specifies 470 * the path value of "<b>MedicationStatement:source</b>". 471 */ 472 public static final Include INCLUDE_SOURCE = new Include("MedicationStatement:source"); 473 474 475 @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 476 @Description( 477 shortDefinition="id", 478 formalDefinition="External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated." 479 ) 480 private java.util.List<IdentifierDt> myIdentifier; 481 482 @Child(name="patient", order=1, min=1, max=1, summary=false, modifier=false, type={ 483 ca.uhn.fhir.model.dstu2.resource.Patient.class }) 484 @Description( 485 shortDefinition="who.focus", 486 formalDefinition="The person or animal who is/was taking the medication." 487 ) 488 private ResourceReferenceDt myPatient; 489 490 @Child(name="informationSource", order=2, min=0, max=1, summary=false, modifier=false, type={ 491 ca.uhn.fhir.model.dstu2.resource.Patient.class, ca.uhn.fhir.model.dstu2.resource.Practitioner.class, ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class }) 492 @Description( 493 shortDefinition="who.source", 494 formalDefinition="The person who provided the information about the taking of this medication." 495 ) 496 private ResourceReferenceDt myInformationSource; 497 498 @Child(name="dateAsserted", type=DateTimeDt.class, order=3, min=0, max=1, summary=false, modifier=false) 499 @Description( 500 shortDefinition="", 501 formalDefinition="The date when the medication statement was asserted by the information source." 502 ) 503 private DateTimeDt myDateAsserted; 504 505 @Child(name="status", type=CodeDt.class, order=4, min=1, max=1, summary=false, modifier=true) 506 @Description( 507 shortDefinition="", 508 formalDefinition="A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed." 509 ) 510 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medication-statement-status") 511 private BoundCodeDt<MedicationStatementStatusEnum> myStatus; 512 513 @Child(name="wasNotTaken", type=BooleanDt.class, order=5, min=0, max=1, summary=false, modifier=true) 514 @Description( 515 shortDefinition="status", 516 formalDefinition="Set this to true if the record is saying that the medication was NOT taken." 517 ) 518 private BooleanDt myWasNotTaken; 519 520 @Child(name="reasonNotTaken", type=CodeableConceptDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 521 @Description( 522 shortDefinition="", 523 formalDefinition="A code indicating why the medication was not taken." 524 ) 525 private java.util.List<CodeableConceptDt> myReasonNotTaken; 526 527 @Child(name="reasonForUse", order=7, min=0, max=1, summary=false, modifier=false, type={ 528 CodeableConceptDt.class, Condition.class }) 529 @Description( 530 shortDefinition="", 531 formalDefinition="A reason for why the medication is being/was taken." 532 ) 533 private IDatatype myReasonForUse; 534 535 @Child(name="effective", order=8, min=0, max=1, summary=false, modifier=false, type={ 536 DateTimeDt.class, PeriodDt.class }) 537 @Description( 538 shortDefinition="when.done", 539 formalDefinition="The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true)." 540 ) 541 private IDatatype myEffective; 542 543 @Child(name="note", type=StringDt.class, order=9, min=0, max=1, summary=false, modifier=false) 544 @Description( 545 shortDefinition="", 546 formalDefinition="Provides extra information about the medication statement that is not conveyed by the other attributes." 547 ) 548 private StringDt myNote; 549 550 @Child(name="supportingInformation", order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={ 551 IResource.class }) 552 @Description( 553 shortDefinition="", 554 formalDefinition="Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement." 555 ) 556 private java.util.List<ResourceReferenceDt> mySupportingInformation; 557 558 @Child(name="medication", order=11, min=1, max=1, summary=false, modifier=false, type={ 559 CodeableConceptDt.class, Medication.class }) 560 @Description( 561 shortDefinition="what", 562 formalDefinition="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." 563 ) 564 private IDatatype myMedication; 565 566 @Child(name="dosage", order=12, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 567 @Description( 568 shortDefinition="", 569 formalDefinition="Indicates how the medication is/was used by the patient" 570 ) 571 private java.util.List<Dosage> myDosage; 572 573 574 @Override 575 public boolean isEmpty() { 576 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myPatient, myInformationSource, myDateAsserted, myStatus, myWasNotTaken, myReasonNotTaken, myReasonForUse, myEffective, myNote, mySupportingInformation, myMedication, myDosage); 577 } 578 579 @Override 580 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 581 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myPatient, myInformationSource, myDateAsserted, myStatus, myWasNotTaken, myReasonNotTaken, myReasonForUse, myEffective, myNote, mySupportingInformation, myMedication, myDosage); 582 } 583 584 /** 585 * Gets the value(s) for <b>identifier</b> (id). 586 * creating it if it does 587 * not exist. Will not return <code>null</code>. 588 * 589 * <p> 590 * <b>Definition:</b> 591 * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. 592 * </p> 593 */ 594 public java.util.List<IdentifierDt> getIdentifier() { 595 if (myIdentifier == null) { 596 myIdentifier = new java.util.ArrayList<IdentifierDt>(); 597 } 598 return myIdentifier; 599 } 600 601 /** 602 * Sets the value(s) for <b>identifier</b> (id) 603 * 604 * <p> 605 * <b>Definition:</b> 606 * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. 607 * </p> 608 */ 609 public MedicationStatement setIdentifier(java.util.List<IdentifierDt> theValue) { 610 myIdentifier = theValue; 611 return this; 612 } 613 614 615 616 /** 617 * Adds and returns a new value for <b>identifier</b> (id) 618 * 619 * <p> 620 * <b>Definition:</b> 621 * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. 622 * </p> 623 */ 624 public IdentifierDt addIdentifier() { 625 IdentifierDt newType = new IdentifierDt(); 626 getIdentifier().add(newType); 627 return newType; 628 } 629 630 /** 631 * Adds a given new value for <b>identifier</b> (id) 632 * 633 * <p> 634 * <b>Definition:</b> 635 * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. 636 * </p> 637 * @param theValue The identifier to add (must not be <code>null</code>) 638 */ 639 public MedicationStatement addIdentifier(IdentifierDt theValue) { 640 if (theValue == null) { 641 throw new NullPointerException("theValue must not be null"); 642 } 643 getIdentifier().add(theValue); 644 return this; 645 } 646 647 /** 648 * Gets the first repetition for <b>identifier</b> (id), 649 * creating it if it does not already exist. 650 * 651 * <p> 652 * <b>Definition:</b> 653 * External identifier - FHIR will generate its own internal identifiers (probably URLs) which do not need to be explicitly managed by the resource. The identifier here is one that would be used by another non-FHIR system - for example an automated medication pump would provide a record each time it operated; an administration while the patient was off the ward might be made with a different system and entered after the event. Particularly important if these records have to be updated. 654 * </p> 655 */ 656 public IdentifierDt getIdentifierFirstRep() { 657 if (getIdentifier().isEmpty()) { 658 return addIdentifier(); 659 } 660 return getIdentifier().get(0); 661 } 662 663 /** 664 * Gets the value(s) for <b>patient</b> (who.focus). 665 * creating it if it does 666 * not exist. Will not return <code>null</code>. 667 * 668 * <p> 669 * <b>Definition:</b> 670 * The person or animal who is/was taking the medication. 671 * </p> 672 */ 673 public ResourceReferenceDt getPatient() { 674 if (myPatient == null) { 675 myPatient = new ResourceReferenceDt(); 676 } 677 return myPatient; 678 } 679 680 /** 681 * Sets the value(s) for <b>patient</b> (who.focus) 682 * 683 * <p> 684 * <b>Definition:</b> 685 * The person or animal who is/was taking the medication. 686 * </p> 687 */ 688 public MedicationStatement setPatient(ResourceReferenceDt theValue) { 689 myPatient = theValue; 690 return this; 691 } 692 693 694 695 696 /** 697 * Gets the value(s) for <b>informationSource</b> (who.source). 698 * creating it if it does 699 * not exist. Will not return <code>null</code>. 700 * 701 * <p> 702 * <b>Definition:</b> 703 * The person who provided the information about the taking of this medication. 704 * </p> 705 */ 706 public ResourceReferenceDt getInformationSource() { 707 if (myInformationSource == null) { 708 myInformationSource = new ResourceReferenceDt(); 709 } 710 return myInformationSource; 711 } 712 713 /** 714 * Sets the value(s) for <b>informationSource</b> (who.source) 715 * 716 * <p> 717 * <b>Definition:</b> 718 * The person who provided the information about the taking of this medication. 719 * </p> 720 */ 721 public MedicationStatement setInformationSource(ResourceReferenceDt theValue) { 722 myInformationSource = theValue; 723 return this; 724 } 725 726 727 728 729 /** 730 * Gets the value(s) for <b>dateAsserted</b> (). 731 * creating it if it does 732 * not exist. Will not return <code>null</code>. 733 * 734 * <p> 735 * <b>Definition:</b> 736 * The date when the medication statement was asserted by the information source. 737 * </p> 738 */ 739 public DateTimeDt getDateAssertedElement() { 740 if (myDateAsserted == null) { 741 myDateAsserted = new DateTimeDt(); 742 } 743 return myDateAsserted; 744 } 745 746 747 /** 748 * Gets the value(s) for <b>dateAsserted</b> (). 749 * creating it if it does 750 * not exist. This method may return <code>null</code>. 751 * 752 * <p> 753 * <b>Definition:</b> 754 * The date when the medication statement was asserted by the information source. 755 * </p> 756 */ 757 public Date getDateAsserted() { 758 return getDateAssertedElement().getValue(); 759 } 760 761 /** 762 * Sets the value(s) for <b>dateAsserted</b> () 763 * 764 * <p> 765 * <b>Definition:</b> 766 * The date when the medication statement was asserted by the information source. 767 * </p> 768 */ 769 public MedicationStatement setDateAsserted(DateTimeDt theValue) { 770 myDateAsserted = theValue; 771 return this; 772 } 773 774 775 776 /** 777 * Sets the value for <b>dateAsserted</b> () 778 * 779 * <p> 780 * <b>Definition:</b> 781 * The date when the medication statement was asserted by the information source. 782 * </p> 783 */ 784 public MedicationStatement setDateAsserted( Date theDate, TemporalPrecisionEnum thePrecision) { 785 myDateAsserted = new DateTimeDt(theDate, thePrecision); 786 return this; 787 } 788 789 /** 790 * Sets the value for <b>dateAsserted</b> () 791 * 792 * <p> 793 * <b>Definition:</b> 794 * The date when the medication statement was asserted by the information source. 795 * </p> 796 */ 797 public MedicationStatement setDateAssertedWithSecondsPrecision( Date theDate) { 798 myDateAsserted = new DateTimeDt(theDate); 799 return this; 800 } 801 802 803 /** 804 * Gets the value(s) for <b>status</b> (). 805 * creating it if it does 806 * not exist. Will not return <code>null</code>. 807 * 808 * <p> 809 * <b>Definition:</b> 810 * A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. 811 * </p> 812 */ 813 public BoundCodeDt<MedicationStatementStatusEnum> getStatusElement() { 814 if (myStatus == null) { 815 myStatus = new BoundCodeDt<MedicationStatementStatusEnum>(MedicationStatementStatusEnum.VALUESET_BINDER); 816 } 817 return myStatus; 818 } 819 820 821 /** 822 * Gets the value(s) for <b>status</b> (). 823 * creating it if it does 824 * not exist. This method may return <code>null</code>. 825 * 826 * <p> 827 * <b>Definition:</b> 828 * A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. 829 * </p> 830 */ 831 public String getStatus() { 832 return getStatusElement().getValue(); 833 } 834 835 /** 836 * Sets the value(s) for <b>status</b> () 837 * 838 * <p> 839 * <b>Definition:</b> 840 * A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. 841 * </p> 842 */ 843 public MedicationStatement setStatus(BoundCodeDt<MedicationStatementStatusEnum> theValue) { 844 myStatus = theValue; 845 return this; 846 } 847 848 849 850 /** 851 * Sets the value(s) for <b>status</b> () 852 * 853 * <p> 854 * <b>Definition:</b> 855 * A code representing the patient or other source's judgment about the state of the medication used that this statement is about. Generally this will be active or completed. 856 * </p> 857 */ 858 public MedicationStatement setStatus(MedicationStatementStatusEnum theValue) { 859 setStatus(new BoundCodeDt<MedicationStatementStatusEnum>(MedicationStatementStatusEnum.VALUESET_BINDER, theValue)); 860 861/* 862 getStatusElement().setValueAsEnum(theValue); 863*/ 864 return this; 865 } 866 867 868 /** 869 * Gets the value(s) for <b>wasNotTaken</b> (status). 870 * creating it if it does 871 * not exist. Will not return <code>null</code>. 872 * 873 * <p> 874 * <b>Definition:</b> 875 * Set this to true if the record is saying that the medication was NOT taken. 876 * </p> 877 */ 878 public BooleanDt getWasNotTakenElement() { 879 if (myWasNotTaken == null) { 880 myWasNotTaken = new BooleanDt(); 881 } 882 return myWasNotTaken; 883 } 884 885 886 /** 887 * Gets the value(s) for <b>wasNotTaken</b> (status). 888 * creating it if it does 889 * not exist. This method may return <code>null</code>. 890 * 891 * <p> 892 * <b>Definition:</b> 893 * Set this to true if the record is saying that the medication was NOT taken. 894 * </p> 895 */ 896 public Boolean getWasNotTaken() { 897 return getWasNotTakenElement().getValue(); 898 } 899 900 /** 901 * Sets the value(s) for <b>wasNotTaken</b> (status) 902 * 903 * <p> 904 * <b>Definition:</b> 905 * Set this to true if the record is saying that the medication was NOT taken. 906 * </p> 907 */ 908 public MedicationStatement setWasNotTaken(BooleanDt theValue) { 909 myWasNotTaken = theValue; 910 return this; 911 } 912 913 914 915 /** 916 * Sets the value for <b>wasNotTaken</b> (status) 917 * 918 * <p> 919 * <b>Definition:</b> 920 * Set this to true if the record is saying that the medication was NOT taken. 921 * </p> 922 */ 923 public MedicationStatement setWasNotTaken( boolean theBoolean) { 924 myWasNotTaken = new BooleanDt(theBoolean); 925 return this; 926 } 927 928 929 /** 930 * Gets the value(s) for <b>reasonNotTaken</b> (). 931 * creating it if it does 932 * not exist. Will not return <code>null</code>. 933 * 934 * <p> 935 * <b>Definition:</b> 936 * A code indicating why the medication was not taken. 937 * </p> 938 */ 939 public java.util.List<CodeableConceptDt> getReasonNotTaken() { 940 if (myReasonNotTaken == null) { 941 myReasonNotTaken = new java.util.ArrayList<CodeableConceptDt>(); 942 } 943 return myReasonNotTaken; 944 } 945 946 /** 947 * Sets the value(s) for <b>reasonNotTaken</b> () 948 * 949 * <p> 950 * <b>Definition:</b> 951 * A code indicating why the medication was not taken. 952 * </p> 953 */ 954 public MedicationStatement setReasonNotTaken(java.util.List<CodeableConceptDt> theValue) { 955 myReasonNotTaken = theValue; 956 return this; 957 } 958 959 960 961 /** 962 * Adds and returns a new value for <b>reasonNotTaken</b> () 963 * 964 * <p> 965 * <b>Definition:</b> 966 * A code indicating why the medication was not taken. 967 * </p> 968 */ 969 public CodeableConceptDt addReasonNotTaken() { 970 CodeableConceptDt newType = new CodeableConceptDt(); 971 getReasonNotTaken().add(newType); 972 return newType; 973 } 974 975 /** 976 * Adds a given new value for <b>reasonNotTaken</b> () 977 * 978 * <p> 979 * <b>Definition:</b> 980 * A code indicating why the medication was not taken. 981 * </p> 982 * @param theValue The reasonNotTaken to add (must not be <code>null</code>) 983 */ 984 public MedicationStatement addReasonNotTaken(CodeableConceptDt theValue) { 985 if (theValue == null) { 986 throw new NullPointerException("theValue must not be null"); 987 } 988 getReasonNotTaken().add(theValue); 989 return this; 990 } 991 992 /** 993 * Gets the first repetition for <b>reasonNotTaken</b> (), 994 * creating it if it does not already exist. 995 * 996 * <p> 997 * <b>Definition:</b> 998 * A code indicating why the medication was not taken. 999 * </p> 1000 */ 1001 public CodeableConceptDt getReasonNotTakenFirstRep() { 1002 if (getReasonNotTaken().isEmpty()) { 1003 return addReasonNotTaken(); 1004 } 1005 return getReasonNotTaken().get(0); 1006 } 1007 1008 /** 1009 * Gets the value(s) for <b>reasonForUse[x]</b> (). 1010 * creating it if it does 1011 * not exist. Will not return <code>null</code>. 1012 * 1013 * <p> 1014 * <b>Definition:</b> 1015 * A reason for why the medication is being/was taken. 1016 * </p> 1017 */ 1018 public IDatatype getReasonForUse() { 1019 return myReasonForUse; 1020 } 1021 1022 /** 1023 * Sets the value(s) for <b>reasonForUse[x]</b> () 1024 * 1025 * <p> 1026 * <b>Definition:</b> 1027 * A reason for why the medication is being/was taken. 1028 * </p> 1029 */ 1030 public MedicationStatement setReasonForUse(IDatatype theValue) { 1031 myReasonForUse = theValue; 1032 return this; 1033 } 1034 1035 1036 1037 1038 /** 1039 * Gets the value(s) for <b>effective[x]</b> (when.done). 1040 * creating it if it does 1041 * not exist. Will not return <code>null</code>. 1042 * 1043 * <p> 1044 * <b>Definition:</b> 1045 * The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true). 1046 * </p> 1047 */ 1048 public IDatatype getEffective() { 1049 return myEffective; 1050 } 1051 1052 /** 1053 * Sets the value(s) for <b>effective[x]</b> (when.done) 1054 * 1055 * <p> 1056 * <b>Definition:</b> 1057 * The interval of time during which it is being asserted that the patient was taking the medication (or was not taking, when the wasNotGiven element is true). 1058 * </p> 1059 */ 1060 public MedicationStatement setEffective(IDatatype theValue) { 1061 myEffective = theValue; 1062 return this; 1063 } 1064 1065 1066 1067 1068 /** 1069 * Gets the value(s) for <b>note</b> (). 1070 * creating it if it does 1071 * not exist. Will not return <code>null</code>. 1072 * 1073 * <p> 1074 * <b>Definition:</b> 1075 * Provides extra information about the medication statement that is not conveyed by the other attributes. 1076 * </p> 1077 */ 1078 public StringDt getNoteElement() { 1079 if (myNote == null) { 1080 myNote = new StringDt(); 1081 } 1082 return myNote; 1083 } 1084 1085 1086 /** 1087 * Gets the value(s) for <b>note</b> (). 1088 * creating it if it does 1089 * not exist. This method may return <code>null</code>. 1090 * 1091 * <p> 1092 * <b>Definition:</b> 1093 * Provides extra information about the medication statement that is not conveyed by the other attributes. 1094 * </p> 1095 */ 1096 public String getNote() { 1097 return getNoteElement().getValue(); 1098 } 1099 1100 /** 1101 * Sets the value(s) for <b>note</b> () 1102 * 1103 * <p> 1104 * <b>Definition:</b> 1105 * Provides extra information about the medication statement that is not conveyed by the other attributes. 1106 * </p> 1107 */ 1108 public MedicationStatement setNote(StringDt theValue) { 1109 myNote = theValue; 1110 return this; 1111 } 1112 1113 1114 1115 /** 1116 * Sets the value for <b>note</b> () 1117 * 1118 * <p> 1119 * <b>Definition:</b> 1120 * Provides extra information about the medication statement that is not conveyed by the other attributes. 1121 * </p> 1122 */ 1123 public MedicationStatement setNote( String theString) { 1124 myNote = new StringDt(theString); 1125 return this; 1126 } 1127 1128 1129 /** 1130 * Gets the value(s) for <b>supportingInformation</b> (). 1131 * creating it if it does 1132 * not exist. Will not return <code>null</code>. 1133 * 1134 * <p> 1135 * <b>Definition:</b> 1136 * Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement. 1137 * </p> 1138 */ 1139 public java.util.List<ResourceReferenceDt> getSupportingInformation() { 1140 if (mySupportingInformation == null) { 1141 mySupportingInformation = new java.util.ArrayList<ResourceReferenceDt>(); 1142 } 1143 return mySupportingInformation; 1144 } 1145 1146 /** 1147 * Sets the value(s) for <b>supportingInformation</b> () 1148 * 1149 * <p> 1150 * <b>Definition:</b> 1151 * Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement. 1152 * </p> 1153 */ 1154 public MedicationStatement setSupportingInformation(java.util.List<ResourceReferenceDt> theValue) { 1155 mySupportingInformation = theValue; 1156 return this; 1157 } 1158 1159 1160 1161 /** 1162 * Adds and returns a new value for <b>supportingInformation</b> () 1163 * 1164 * <p> 1165 * <b>Definition:</b> 1166 * Allows linking the MedicationStatement to the underlying MedicationOrder, or to other information that supports the MedicationStatement. 1167 * </p> 1168 */ 1169 public ResourceReferenceDt addSupportingInformation() { 1170 ResourceReferenceDt newType = new ResourceReferenceDt(); 1171 getSupportingInformation().add(newType); 1172 return newType; 1173 } 1174 1175 /** 1176 * Gets the value(s) for <b>medication[x]</b> (what). 1177 * creating it if it does 1178 * not exist. Will not return <code>null</code>. 1179 * 1180 * <p> 1181 * <b>Definition:</b> 1182 * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. 1183 * </p> 1184 */ 1185 public IDatatype getMedication() { 1186 return myMedication; 1187 } 1188 1189 /** 1190 * Sets the value(s) for <b>medication[x]</b> (what) 1191 * 1192 * <p> 1193 * <b>Definition:</b> 1194 * Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications. 1195 * </p> 1196 */ 1197 public MedicationStatement setMedication(IDatatype theValue) { 1198 myMedication = theValue; 1199 return this; 1200 } 1201 1202 1203 1204 1205 /** 1206 * Gets the value(s) for <b>dosage</b> (). 1207 * creating it if it does 1208 * not exist. Will not return <code>null</code>. 1209 * 1210 * <p> 1211 * <b>Definition:</b> 1212 * Indicates how the medication is/was used by the patient 1213 * </p> 1214 */ 1215 public java.util.List<Dosage> getDosage() { 1216 if (myDosage == null) { 1217 myDosage = new java.util.ArrayList<Dosage>(); 1218 } 1219 return myDosage; 1220 } 1221 1222 /** 1223 * Sets the value(s) for <b>dosage</b> () 1224 * 1225 * <p> 1226 * <b>Definition:</b> 1227 * Indicates how the medication is/was used by the patient 1228 * </p> 1229 */ 1230 public MedicationStatement setDosage(java.util.List<Dosage> theValue) { 1231 myDosage = theValue; 1232 return this; 1233 } 1234 1235 1236 1237 /** 1238 * Adds and returns a new value for <b>dosage</b> () 1239 * 1240 * <p> 1241 * <b>Definition:</b> 1242 * Indicates how the medication is/was used by the patient 1243 * </p> 1244 */ 1245 public Dosage addDosage() { 1246 Dosage newType = new Dosage(); 1247 getDosage().add(newType); 1248 return newType; 1249 } 1250 1251 /** 1252 * Adds a given new value for <b>dosage</b> () 1253 * 1254 * <p> 1255 * <b>Definition:</b> 1256 * Indicates how the medication is/was used by the patient 1257 * </p> 1258 * @param theValue The dosage to add (must not be <code>null</code>) 1259 */ 1260 public MedicationStatement addDosage(Dosage theValue) { 1261 if (theValue == null) { 1262 throw new NullPointerException("theValue must not be null"); 1263 } 1264 getDosage().add(theValue); 1265 return this; 1266 } 1267 1268 /** 1269 * Gets the first repetition for <b>dosage</b> (), 1270 * creating it if it does not already exist. 1271 * 1272 * <p> 1273 * <b>Definition:</b> 1274 * Indicates how the medication is/was used by the patient 1275 * </p> 1276 */ 1277 public Dosage getDosageFirstRep() { 1278 if (getDosage().isEmpty()) { 1279 return addDosage(); 1280 } 1281 return getDosage().get(0); 1282 } 1283 1284 /** 1285 * Block class for child element: <b>MedicationStatement.dosage</b> () 1286 * 1287 * <p> 1288 * <b>Definition:</b> 1289 * Indicates how the medication is/was used by the patient 1290 * </p> 1291 */ 1292 @Block() 1293 public static class Dosage 1294 extends BaseIdentifiableElement implements IResourceBlock { 1295 1296 @Child(name="text", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false) 1297 @Description( 1298 shortDefinition="", 1299 formalDefinition="Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans." 1300 ) 1301 private StringDt myText; 1302 1303 @Child(name="timing", type=TimingDt.class, order=1, min=0, max=1, summary=false, modifier=false) 1304 @Description( 1305 shortDefinition="", 1306 formalDefinition="The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"" 1307 ) 1308 private TimingDt myTiming; 1309 1310 @Child(name="asNeeded", order=2, min=0, max=1, summary=false, modifier=false, type={ 1311 BooleanDt.class, CodeableConceptDt.class }) 1312 @Description( 1313 shortDefinition="", 1314 formalDefinition="Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule." 1315 ) 1316 private IDatatype myAsNeeded; 1317 1318 @Child(name="site", order=3, min=0, max=1, summary=false, modifier=false, type={ 1319 CodeableConceptDt.class, BodySite.class }) 1320 @Description( 1321 shortDefinition="", 1322 formalDefinition="A coded specification of or a reference to the anatomic site where the medication first enters the body" 1323 ) 1324 private IDatatype mySite; 1325 1326 @Child(name="route", type=CodeableConceptDt.class, order=4, min=0, max=1, summary=false, modifier=false) 1327 @Description( 1328 shortDefinition="", 1329 formalDefinition="A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject." 1330 ) 1331 private CodeableConceptDt myRoute; 1332 1333 @Child(name="method", type=CodeableConceptDt.class, order=5, min=0, max=1, summary=false, modifier=false) 1334 @Description( 1335 shortDefinition="", 1336 formalDefinition="A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV." 1337 ) 1338 private CodeableConceptDt myMethod; 1339 1340 @Child(name="quantity", order=6, min=0, max=1, summary=false, modifier=false, type={ 1341 SimpleQuantityDt.class, RangeDt.class }) 1342 @Description( 1343 shortDefinition="", 1344 formalDefinition="The amount of therapeutic or other substance given at one administration event." 1345 ) 1346 private IDatatype myQuantity; 1347 1348 @Child(name="rate", order=7, min=0, max=1, summary=false, modifier=false, type={ 1349 RatioDt.class, RangeDt.class }) 1350 @Description( 1351 shortDefinition="", 1352 formalDefinition="Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours" 1353 ) 1354 private IDatatype myRate; 1355 1356 @Child(name="maxDosePerPeriod", type=RatioDt.class, order=8, min=0, max=1, summary=false, modifier=false) 1357 @Description( 1358 shortDefinition="", 1359 formalDefinition="The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours." 1360 ) 1361 private RatioDt myMaxDosePerPeriod; 1362 1363 1364 @Override 1365 public boolean isEmpty() { 1366 return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myText, myTiming, myAsNeeded, mySite, myRoute, myMethod, myQuantity, myRate, myMaxDosePerPeriod); 1367 } 1368 1369 @Override 1370 public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) { 1371 return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myText, myTiming, myAsNeeded, mySite, myRoute, myMethod, myQuantity, myRate, myMaxDosePerPeriod); 1372 } 1373 1374 /** 1375 * Gets the value(s) for <b>text</b> (). 1376 * creating it if it does 1377 * not exist. Will not return <code>null</code>. 1378 * 1379 * <p> 1380 * <b>Definition:</b> 1381 * Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. 1382 * </p> 1383 */ 1384 public StringDt getTextElement() { 1385 if (myText == null) { 1386 myText = new StringDt(); 1387 } 1388 return myText; 1389 } 1390 1391 1392 /** 1393 * Gets the value(s) for <b>text</b> (). 1394 * creating it if it does 1395 * not exist. This method may return <code>null</code>. 1396 * 1397 * <p> 1398 * <b>Definition:</b> 1399 * Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. 1400 * </p> 1401 */ 1402 public String getText() { 1403 return getTextElement().getValue(); 1404 } 1405 1406 /** 1407 * Sets the value(s) for <b>text</b> () 1408 * 1409 * <p> 1410 * <b>Definition:</b> 1411 * Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. 1412 * </p> 1413 */ 1414 public Dosage setText(StringDt theValue) { 1415 myText = theValue; 1416 return this; 1417 } 1418 1419 1420 1421 /** 1422 * Sets the value for <b>text</b> () 1423 * 1424 * <p> 1425 * <b>Definition:</b> 1426 * Free text dosage information as reported about a patient's medication use. When coded dosage information is present, the free text may still be present for display to humans. 1427 * </p> 1428 */ 1429 public Dosage setText( String theString) { 1430 myText = new StringDt(theString); 1431 return this; 1432 } 1433 1434 1435 /** 1436 * Gets the value(s) for <b>timing</b> (). 1437 * creating it if it does 1438 * not exist. Will not return <code>null</code>. 1439 * 1440 * <p> 1441 * <b>Definition:</b> 1442 * The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\" 1443 * </p> 1444 */ 1445 public TimingDt getTiming() { 1446 if (myTiming == null) { 1447 myTiming = new TimingDt(); 1448 } 1449 return myTiming; 1450 } 1451 1452 /** 1453 * Sets the value(s) for <b>timing</b> () 1454 * 1455 * <p> 1456 * <b>Definition:</b> 1457 * The timing schedule for giving the medication to the patient. The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\" 1458 * </p> 1459 */ 1460 public Dosage setTiming(TimingDt theValue) { 1461 myTiming = theValue; 1462 return this; 1463 } 1464 1465 1466 1467 1468 /** 1469 * Gets the value(s) for <b>asNeeded[x]</b> (). 1470 * creating it if it does 1471 * not exist. Will not return <code>null</code>. 1472 * 1473 * <p> 1474 * <b>Definition:</b> 1475 * Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule. 1476 * </p> 1477 */ 1478 public IDatatype getAsNeeded() { 1479 return myAsNeeded; 1480 } 1481 1482 /** 1483 * Sets the value(s) for <b>asNeeded[x]</b> () 1484 * 1485 * <p> 1486 * <b>Definition:</b> 1487 * Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept). Specifically if 'boolean' datatype is selected, then the following logic applies: If set to True, this indicates that the medication is only taken when needed, within the specified schedule. 1488 * </p> 1489 */ 1490 public Dosage setAsNeeded(IDatatype theValue) { 1491 myAsNeeded = theValue; 1492 return this; 1493 } 1494 1495 1496 1497 1498 /** 1499 * Gets the value(s) for <b>site[x]</b> (). 1500 * creating it if it does 1501 * not exist. Will not return <code>null</code>. 1502 * 1503 * <p> 1504 * <b>Definition:</b> 1505 * A coded specification of or a reference to the anatomic site where the medication first enters the body 1506 * </p> 1507 */ 1508 public IDatatype getSite() { 1509 return mySite; 1510 } 1511 1512 /** 1513 * Sets the value(s) for <b>site[x]</b> () 1514 * 1515 * <p> 1516 * <b>Definition:</b> 1517 * A coded specification of or a reference to the anatomic site where the medication first enters the body 1518 * </p> 1519 */ 1520 public Dosage setSite(IDatatype theValue) { 1521 mySite = theValue; 1522 return this; 1523 } 1524 1525 1526 1527 1528 /** 1529 * Gets the value(s) for <b>route</b> (). 1530 * creating it if it does 1531 * not exist. Will not return <code>null</code>. 1532 * 1533 * <p> 1534 * <b>Definition:</b> 1535 * A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject. 1536 * </p> 1537 */ 1538 public CodeableConceptDt getRoute() { 1539 if (myRoute == null) { 1540 myRoute = new CodeableConceptDt(); 1541 } 1542 return myRoute; 1543 } 1544 1545 /** 1546 * Sets the value(s) for <b>route</b> () 1547 * 1548 * <p> 1549 * <b>Definition:</b> 1550 * A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject. 1551 * </p> 1552 */ 1553 public Dosage setRoute(CodeableConceptDt theValue) { 1554 myRoute = theValue; 1555 return this; 1556 } 1557 1558 1559 1560 1561 /** 1562 * Gets the value(s) for <b>method</b> (). 1563 * creating it if it does 1564 * not exist. Will not return <code>null</code>. 1565 * 1566 * <p> 1567 * <b>Definition:</b> 1568 * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV. 1569 * </p> 1570 */ 1571 public CodeableConceptDt getMethod() { 1572 if (myMethod == null) { 1573 myMethod = new CodeableConceptDt(); 1574 } 1575 return myMethod; 1576 } 1577 1578 /** 1579 * Sets the value(s) for <b>method</b> () 1580 * 1581 * <p> 1582 * <b>Definition:</b> 1583 * A coded value indicating the method by which the medication is intended to be or was introduced into or on the body. This attribute will most often NOT be populated. It is most commonly used for injections. For example, Slow Push, Deep IV. 1584 * </p> 1585 */ 1586 public Dosage setMethod(CodeableConceptDt theValue) { 1587 myMethod = theValue; 1588 return this; 1589 } 1590 1591 1592 1593 1594 /** 1595 * Gets the value(s) for <b>quantity[x]</b> (). 1596 * creating it if it does 1597 * not exist. Will not return <code>null</code>. 1598 * 1599 * <p> 1600 * <b>Definition:</b> 1601 * The amount of therapeutic or other substance given at one administration event. 1602 * </p> 1603 */ 1604 public IDatatype getQuantity() { 1605 return myQuantity; 1606 } 1607 1608 /** 1609 * Sets the value(s) for <b>quantity[x]</b> () 1610 * 1611 * <p> 1612 * <b>Definition:</b> 1613 * The amount of therapeutic or other substance given at one administration event. 1614 * </p> 1615 */ 1616 public Dosage setQuantity(IDatatype theValue) { 1617 myQuantity = theValue; 1618 return this; 1619 } 1620 1621 1622 1623 1624 /** 1625 * Gets the value(s) for <b>rate[x]</b> (). 1626 * creating it if it does 1627 * not exist. Will not return <code>null</code>. 1628 * 1629 * <p> 1630 * <b>Definition:</b> 1631 * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours 1632 * </p> 1633 */ 1634 public IDatatype getRate() { 1635 return myRate; 1636 } 1637 1638 /** 1639 * Sets the value(s) for <b>rate[x]</b> () 1640 * 1641 * <p> 1642 * <b>Definition:</b> 1643 * Identifies the speed with which the medication was or will be introduced into the patient. Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr. May also be expressed as a rate per unit of time e.g. 500 ml per 2 hours. Currently we do not specify a default of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or 200 mcg/1 minute; 1 liter/8 hours 1644 * </p> 1645 */ 1646 public Dosage setRate(IDatatype theValue) { 1647 myRate = theValue; 1648 return this; 1649 } 1650 1651 1652 1653 1654 /** 1655 * Gets the value(s) for <b>maxDosePerPeriod</b> (). 1656 * creating it if it does 1657 * not exist. Will not return <code>null</code>. 1658 * 1659 * <p> 1660 * <b>Definition:</b> 1661 * The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours. 1662 * </p> 1663 */ 1664 public RatioDt getMaxDosePerPeriod() { 1665 if (myMaxDosePerPeriod == null) { 1666 myMaxDosePerPeriod = new RatioDt(); 1667 } 1668 return myMaxDosePerPeriod; 1669 } 1670 1671 /** 1672 * Sets the value(s) for <b>maxDosePerPeriod</b> () 1673 * 1674 * <p> 1675 * <b>Definition:</b> 1676 * The maximum total quantity of a therapeutic substance that may be administered to a subject over the period of time. For example, 1000mg in 24 hours. 1677 * </p> 1678 */ 1679 public Dosage setMaxDosePerPeriod(RatioDt theValue) { 1680 myMaxDosePerPeriod = theValue; 1681 return this; 1682 } 1683 1684 1685 1686 1687 1688 1689 } 1690 1691 1692 1693 1694 @Override 1695 public String getResourceName() { 1696 return "MedicationStatement"; 1697 } 1698 1699 public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() { 1700 return ca.uhn.fhir.context.FhirVersionEnum.DSTU2; 1701 } 1702 1703 1704}