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>Observation</b> Resource
320 * (clinical.diagnostics)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * Measurements and simple assertions made about a patient, device or other subject.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * Observations are a key aspect of healthcare.  This resource is used to capture those that do not require more sophisticated mechanisms.
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/Observation">http://hl7.org/fhir/profiles/Observation</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="Observation", profile="http://hl7.org/fhir/profiles/Observation", id="observation")
339public class Observation extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>code</b>
344         * <p>
345         * Description: <b>The code of the observation type</b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>Observation.code</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="code", path="Observation.code", description="The code of the observation type", type="token"  )
351        public static final String SP_CODE = "code";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>code</b>
355         * <p>
356         * Description: <b>The code of the observation type</b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>Observation.code</b><br>
359         * </p>
360         */
361        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
362
363        /**
364         * Search parameter constant for <b>component-code</b>
365         * <p>
366         * Description: <b>The component code of the observation type</b><br>
367         * Type: <b>token</b><br>
368         * Path: <b>Observation.component.code</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="component-code", path="Observation.component.code", description="The component code of the observation type", type="token"  )
372        public static final String SP_COMPONENT_CODE = "component-code";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>component-code</b>
376         * <p>
377         * Description: <b>The component code of the observation type</b><br>
378         * Type: <b>token</b><br>
379         * Path: <b>Observation.component.code</b><br>
380         * </p>
381         */
382        public static final TokenClientParam COMPONENT_CODE = new TokenClientParam(SP_COMPONENT_CODE);
383
384        /**
385         * Search parameter constant for <b>value-quantity</b>
386         * <p>
387         * Description: <b>The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
388         * Type: <b>quantity</b><br>
389         * Path: <b>Observation.valueQuantity</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="value-quantity", path="Observation.valueQuantity", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity"  )
393        public static final String SP_VALUE_QUANTITY = "value-quantity";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>value-quantity</b>
397         * <p>
398         * Description: <b>The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
399         * Type: <b>quantity</b><br>
400         * Path: <b>Observation.valueQuantity</b><br>
401         * </p>
402         */
403        public static final QuantityClientParam VALUE_QUANTITY = new QuantityClientParam(SP_VALUE_QUANTITY);
404
405        /**
406         * Search parameter constant for <b>component-value-quantity</b>
407         * <p>
408         * Description: <b>The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
409         * Type: <b>quantity</b><br>
410         * Path: <b>Observation.component.valueQuantity</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="component-value-quantity", path="Observation.component.valueQuantity", description="The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)", type="quantity"  )
414        public static final String SP_COMPONENT_VALUE_QUANTITY = "component-value-quantity";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>component-value-quantity</b>
418         * <p>
419         * Description: <b>The value of the component observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)</b><br>
420         * Type: <b>quantity</b><br>
421         * Path: <b>Observation.component.valueQuantity</b><br>
422         * </p>
423         */
424        public static final QuantityClientParam COMPONENT_VALUE_QUANTITY = new QuantityClientParam(SP_COMPONENT_VALUE_QUANTITY);
425
426        /**
427         * Search parameter constant for <b>value-concept</b>
428         * <p>
429         * Description: <b>The value of the observation, if the value is a CodeableConcept</b><br>
430         * Type: <b>token</b><br>
431         * Path: <b>Observation.valueCodeableConcept</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="value-concept", path="Observation.valueCodeableConcept", description="The value of the observation, if the value is a CodeableConcept", type="token"  )
435        public static final String SP_VALUE_CONCEPT = "value-concept";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>value-concept</b>
439         * <p>
440         * Description: <b>The value of the observation, if the value is a CodeableConcept</b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>Observation.valueCodeableConcept</b><br>
443         * </p>
444         */
445        public static final TokenClientParam VALUE_CONCEPT = new TokenClientParam(SP_VALUE_CONCEPT);
446
447        /**
448         * Search parameter constant for <b>component-value-concept</b>
449         * <p>
450         * Description: <b>The value of the component observation, if the value is a CodeableConcept</b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>Observation.component.valueCodeableConcept</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="component-value-concept", path="Observation.component.valueCodeableConcept", description="The value of the component observation, if the value is a CodeableConcept", type="token"  )
456        public static final String SP_COMPONENT_VALUE_CONCEPT = "component-value-concept";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>component-value-concept</b>
460         * <p>
461         * Description: <b>The value of the component observation, if the value is a CodeableConcept</b><br>
462         * Type: <b>token</b><br>
463         * Path: <b>Observation.component.valueCodeableConcept</b><br>
464         * </p>
465         */
466        public static final TokenClientParam COMPONENT_VALUE_CONCEPT = new TokenClientParam(SP_COMPONENT_VALUE_CONCEPT);
467
468        /**
469         * Search parameter constant for <b>value-date</b>
470         * <p>
471         * Description: <b>The value of the observation, if the value is a date or period of time</b><br>
472         * Type: <b>date</b><br>
473         * Path: <b>Observation.valueDateTime | Observation.valuePeriod</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="value-date", path="Observation.valueDateTime | Observation.valuePeriod", description="The value of the observation, if the value is a date or period of time", type="date"  )
477        public static final String SP_VALUE_DATE = "value-date";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>value-date</b>
481         * <p>
482         * Description: <b>The value of the observation, if the value is a date or period of time</b><br>
483         * Type: <b>date</b><br>
484         * Path: <b>Observation.valueDateTime | Observation.valuePeriod</b><br>
485         * </p>
486         */
487        public static final DateClientParam VALUE_DATE = new DateClientParam(SP_VALUE_DATE);
488
489        /**
490         * Search parameter constant for <b>value-string</b>
491         * <p>
492         * Description: <b>The value of the observation, if the value is a string, and also searches in CodeableConcept.text</b><br>
493         * Type: <b>string</b><br>
494         * Path: <b>Observation.valueString</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="value-string", path="Observation.valueString", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text", type="string"  )
498        public static final String SP_VALUE_STRING = "value-string";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>value-string</b>
502         * <p>
503         * Description: <b>The value of the observation, if the value is a string, and also searches in CodeableConcept.text</b><br>
504         * Type: <b>string</b><br>
505         * Path: <b>Observation.valueString</b><br>
506         * </p>
507         */
508        public static final StringClientParam VALUE_STRING = new StringClientParam(SP_VALUE_STRING);
509
510        /**
511         * Search parameter constant for <b>component-value-string</b>
512         * <p>
513         * Description: <b>The value of the component observation, if the value is a string, and also searches in CodeableConcept.text</b><br>
514         * Type: <b>string</b><br>
515         * Path: <b>Observation.component.valueString</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="component-value-string", path="Observation.component.valueString", description="The value of the component observation, if the value is a string, and also searches in CodeableConcept.text", type="string"  )
519        public static final String SP_COMPONENT_VALUE_STRING = "component-value-string";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>component-value-string</b>
523         * <p>
524         * Description: <b>The value of the component observation, if the value is a string, and also searches in CodeableConcept.text</b><br>
525         * Type: <b>string</b><br>
526         * Path: <b>Observation.component.valueString</b><br>
527         * </p>
528         */
529        public static final StringClientParam COMPONENT_VALUE_STRING = new StringClientParam(SP_COMPONENT_VALUE_STRING);
530
531        /**
532         * Search parameter constant for <b>date</b>
533         * <p>
534         * Description: <b>Obtained date/time. If the obtained element is a period, a date that falls in the period</b><br>
535         * Type: <b>date</b><br>
536         * Path: <b>Observation.effective[x]</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="date", path="Observation.effective[x]", description="Obtained date/time. If the obtained element is a period, a date that falls in the period", type="date"  )
540        public static final String SP_DATE = "date";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>date</b>
544         * <p>
545         * Description: <b>Obtained date/time. If the obtained element is a period, a date that falls in the period</b><br>
546         * Type: <b>date</b><br>
547         * Path: <b>Observation.effective[x]</b><br>
548         * </p>
549         */
550        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
551
552        /**
553         * Search parameter constant for <b>status</b>
554         * <p>
555         * Description: <b>The status of the observation</b><br>
556         * Type: <b>token</b><br>
557         * Path: <b>Observation.status</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation", type="token"  )
561        public static final String SP_STATUS = "status";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>status</b>
565         * <p>
566         * Description: <b>The status of the observation</b><br>
567         * Type: <b>token</b><br>
568         * Path: <b>Observation.status</b><br>
569         * </p>
570         */
571        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
572
573        /**
574         * Search parameter constant for <b>subject</b>
575         * <p>
576         * Description: <b>The subject that the observation is about</b><br>
577         * Type: <b>reference</b><br>
578         * Path: <b>Observation.subject</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about", type="reference"  )
582        public static final String SP_SUBJECT = "subject";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
586         * <p>
587         * Description: <b>The subject that the observation is about</b><br>
588         * Type: <b>reference</b><br>
589         * Path: <b>Observation.subject</b><br>
590         * </p>
591         */
592        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
593
594        /**
595         * Search parameter constant for <b>performer</b>
596         * <p>
597         * Description: <b>Who performed the observation</b><br>
598         * Type: <b>reference</b><br>
599         * Path: <b>Observation.performer</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="performer", path="Observation.performer", description="Who performed the observation", type="reference"  )
603        public static final String SP_PERFORMER = "performer";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>performer</b>
607         * <p>
608         * Description: <b>Who performed the observation</b><br>
609         * Type: <b>reference</b><br>
610         * Path: <b>Observation.performer</b><br>
611         * </p>
612         */
613        public static final ReferenceClientParam PERFORMER = new ReferenceClientParam(SP_PERFORMER);
614
615        /**
616         * Search parameter constant for <b>specimen</b>
617         * <p>
618         * Description: <b></b><br>
619         * Type: <b>reference</b><br>
620         * Path: <b>Observation.specimen</b><br>
621         * </p>
622         */
623        @SearchParamDefinition(name="specimen", path="Observation.specimen", description="", type="reference"  )
624        public static final String SP_SPECIMEN = "specimen";
625
626        /**
627         * <b>Fluent Client</b> search parameter constant for <b>specimen</b>
628         * <p>
629         * Description: <b></b><br>
630         * Type: <b>reference</b><br>
631         * Path: <b>Observation.specimen</b><br>
632         * </p>
633         */
634        public static final ReferenceClientParam SPECIMEN = new ReferenceClientParam(SP_SPECIMEN);
635
636        /**
637         * Search parameter constant for <b>related-type</b>
638         * <p>
639         * Description: <b></b><br>
640         * Type: <b>token</b><br>
641         * Path: <b>Observation.related.type</b><br>
642         * </p>
643         */
644        @SearchParamDefinition(name="related-type", path="Observation.related.type", description="", type="token"  )
645        public static final String SP_RELATED_TYPE = "related-type";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>related-type</b>
649         * <p>
650         * Description: <b></b><br>
651         * Type: <b>token</b><br>
652         * Path: <b>Observation.related.type</b><br>
653         * </p>
654         */
655        public static final TokenClientParam RELATED_TYPE = new TokenClientParam(SP_RELATED_TYPE);
656
657        /**
658         * Search parameter constant for <b>related-target</b>
659         * <p>
660         * Description: <b></b><br>
661         * Type: <b>reference</b><br>
662         * Path: <b>Observation.related.target</b><br>
663         * </p>
664         */
665        @SearchParamDefinition(name="related-target", path="Observation.related.target", description="", type="reference"  )
666        public static final String SP_RELATED_TARGET = "related-target";
667
668        /**
669         * <b>Fluent Client</b> search parameter constant for <b>related-target</b>
670         * <p>
671         * Description: <b></b><br>
672         * Type: <b>reference</b><br>
673         * Path: <b>Observation.related.target</b><br>
674         * </p>
675         */
676        public static final ReferenceClientParam RELATED_TARGET = new ReferenceClientParam(SP_RELATED_TARGET);
677
678        /**
679         * Search parameter constant for <b>encounter</b>
680         * <p>
681         * Description: <b>Healthcare event related to the observation</b><br>
682         * Type: <b>reference</b><br>
683         * Path: <b>Observation.encounter</b><br>
684         * </p>
685         */
686        @SearchParamDefinition(name="encounter", path="Observation.encounter", description="Healthcare event related to the observation", type="reference"  )
687        public static final String SP_ENCOUNTER = "encounter";
688
689        /**
690         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
691         * <p>
692         * Description: <b>Healthcare event related to the observation</b><br>
693         * Type: <b>reference</b><br>
694         * Path: <b>Observation.encounter</b><br>
695         * </p>
696         */
697        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
698
699        /**
700         * Search parameter constant for <b>data-absent-reason</b>
701         * <p>
702         * Description: <b>The reason why the expected value in the element Observation.value[x] is missing.</b><br>
703         * Type: <b>token</b><br>
704         * Path: <b>Observation.dataAbsentReason</b><br>
705         * </p>
706         */
707        @SearchParamDefinition(name="data-absent-reason", path="Observation.dataAbsentReason", description="The reason why the expected value in the element Observation.value[x] is missing.", type="token"  )
708        public static final String SP_DATA_ABSENT_REASON = "data-absent-reason";
709
710        /**
711         * <b>Fluent Client</b> search parameter constant for <b>data-absent-reason</b>
712         * <p>
713         * Description: <b>The reason why the expected value in the element Observation.value[x] is missing.</b><br>
714         * Type: <b>token</b><br>
715         * Path: <b>Observation.dataAbsentReason</b><br>
716         * </p>
717         */
718        public static final TokenClientParam DATA_ABSENT_REASON = new TokenClientParam(SP_DATA_ABSENT_REASON);
719
720        /**
721         * Search parameter constant for <b>component-data-absent-reason</b>
722         * <p>
723         * Description: <b>The reason why the expected value in the element Observation.component.value[x] is missing.</b><br>
724         * Type: <b>token</b><br>
725         * Path: <b>Observation.component.dataAbsentReason</b><br>
726         * </p>
727         */
728        @SearchParamDefinition(name="component-data-absent-reason", path="Observation.component.dataAbsentReason", description="The reason why the expected value in the element Observation.component.value[x] is missing.", type="token"  )
729        public static final String SP_COMPONENT_DATA_ABSENT_REASON = "component-data-absent-reason";
730
731        /**
732         * <b>Fluent Client</b> search parameter constant for <b>component-data-absent-reason</b>
733         * <p>
734         * Description: <b>The reason why the expected value in the element Observation.component.value[x] is missing.</b><br>
735         * Type: <b>token</b><br>
736         * Path: <b>Observation.component.dataAbsentReason</b><br>
737         * </p>
738         */
739        public static final TokenClientParam COMPONENT_DATA_ABSENT_REASON = new TokenClientParam(SP_COMPONENT_DATA_ABSENT_REASON);
740
741        /**
742         * Search parameter constant for <b>patient</b>
743         * <p>
744         * Description: <b>The subject that the observation is about (if patient)</b><br>
745         * Type: <b>reference</b><br>
746         * Path: <b>Observation.subject</b><br>
747         * </p>
748         */
749        @SearchParamDefinition(name="patient", path="Observation.subject", description="The subject that the observation is about (if patient)", type="reference"  )
750        public static final String SP_PATIENT = "patient";
751
752        /**
753         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
754         * <p>
755         * Description: <b>The subject that the observation is about (if patient)</b><br>
756         * Type: <b>reference</b><br>
757         * Path: <b>Observation.subject</b><br>
758         * </p>
759         */
760        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
761
762        /**
763         * Search parameter constant for <b>identifier</b>
764         * <p>
765         * Description: <b>The unique id for a particular observation</b><br>
766         * Type: <b>token</b><br>
767         * Path: <b>Observation.identifier</b><br>
768         * </p>
769         */
770        @SearchParamDefinition(name="identifier", path="Observation.identifier", description="The unique id for a particular observation", type="token"  )
771        public static final String SP_IDENTIFIER = "identifier";
772
773        /**
774         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
775         * <p>
776         * Description: <b>The unique id for a particular observation</b><br>
777         * Type: <b>token</b><br>
778         * Path: <b>Observation.identifier</b><br>
779         * </p>
780         */
781        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
782
783        /**
784         * Search parameter constant for <b>device</b>
785         * <p>
786         * Description: <b>The Device that generated the observation data.</b><br>
787         * Type: <b>reference</b><br>
788         * Path: <b>Observation.device</b><br>
789         * </p>
790         */
791        @SearchParamDefinition(name="device", path="Observation.device", description="The Device that generated the observation data.", type="reference"  )
792        public static final String SP_DEVICE = "device";
793
794        /**
795         * <b>Fluent Client</b> search parameter constant for <b>device</b>
796         * <p>
797         * Description: <b>The Device that generated the observation data.</b><br>
798         * Type: <b>reference</b><br>
799         * Path: <b>Observation.device</b><br>
800         * </p>
801         */
802        public static final ReferenceClientParam DEVICE = new ReferenceClientParam(SP_DEVICE);
803
804        /**
805         * Search parameter constant for <b>category</b>
806         * <p>
807         * Description: <b>The classification of the type of observation</b><br>
808         * Type: <b>token</b><br>
809         * Path: <b>Observation.category</b><br>
810         * </p>
811         */
812        @SearchParamDefinition(name="category", path="Observation.category", description="The classification of the type of observation", type="token"  )
813        public static final String SP_CATEGORY = "category";
814
815        /**
816         * <b>Fluent Client</b> search parameter constant for <b>category</b>
817         * <p>
818         * Description: <b>The classification of the type of observation</b><br>
819         * Type: <b>token</b><br>
820         * Path: <b>Observation.category</b><br>
821         * </p>
822         */
823        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
824
825        /**
826         * Search parameter constant for <b>code-value-quantity</b>
827         * <p>
828         * Description: <b>Both code and one of the value parameters</b><br>
829         * Type: <b>composite</b><br>
830         * Path: <b>code &amp; value[x]</b><br>
831         * </p>
832         */
833        @SearchParamDefinition(name="code-value-quantity", path="code & value[x]", description="Both code and one of the value parameters", type="composite"  , compositeOf={  "code",  "value-quantity" }  )
834        public static final String SP_CODE_VALUE_QUANTITY = "code-value-quantity";
835
836        /**
837         * <b>Fluent Client</b> search parameter constant for <b>code-value-quantity</b>
838         * <p>
839         * Description: <b>Both code and one of the value parameters</b><br>
840         * Type: <b>composite</b><br>
841         * Path: <b>code &amp; value[x]</b><br>
842         * </p>
843         */
844        public static final CompositeClientParam<TokenClientParam, QuantityClientParam> CODE_VALUE_QUANTITY = new CompositeClientParam<TokenClientParam, QuantityClientParam>(SP_CODE_VALUE_QUANTITY);
845
846        /**
847         * Search parameter constant for <b>code-value-concept</b>
848         * <p>
849         * Description: <b>Both code and one of the value parameters</b><br>
850         * Type: <b>composite</b><br>
851         * Path: <b>code &amp; value[x]</b><br>
852         * </p>
853         */
854        @SearchParamDefinition(name="code-value-concept", path="code & value[x]", description="Both code and one of the value parameters", type="composite"  , compositeOf={  "code",  "value-concept" }  )
855        public static final String SP_CODE_VALUE_CONCEPT = "code-value-concept";
856
857        /**
858         * <b>Fluent Client</b> search parameter constant for <b>code-value-concept</b>
859         * <p>
860         * Description: <b>Both code and one of the value parameters</b><br>
861         * Type: <b>composite</b><br>
862         * Path: <b>code &amp; value[x]</b><br>
863         * </p>
864         */
865        public static final CompositeClientParam<TokenClientParam, TokenClientParam> CODE_VALUE_CONCEPT = new CompositeClientParam<TokenClientParam, TokenClientParam>(SP_CODE_VALUE_CONCEPT);
866
867        /**
868         * Search parameter constant for <b>code-value-date</b>
869         * <p>
870         * Description: <b>Both code and one of the value parameters</b><br>
871         * Type: <b>composite</b><br>
872         * Path: <b>code &amp; value[x]</b><br>
873         * </p>
874         */
875        @SearchParamDefinition(name="code-value-date", path="code & value[x]", description="Both code and one of the value parameters", type="composite"  , compositeOf={  "code",  "value-date" }  )
876        public static final String SP_CODE_VALUE_DATE = "code-value-date";
877
878        /**
879         * <b>Fluent Client</b> search parameter constant for <b>code-value-date</b>
880         * <p>
881         * Description: <b>Both code and one of the value parameters</b><br>
882         * Type: <b>composite</b><br>
883         * Path: <b>code &amp; value[x]</b><br>
884         * </p>
885         */
886        public static final CompositeClientParam<TokenClientParam, DateClientParam> CODE_VALUE_DATE = new CompositeClientParam<TokenClientParam, DateClientParam>(SP_CODE_VALUE_DATE);
887
888        /**
889         * Search parameter constant for <b>code-value-string</b>
890         * <p>
891         * Description: <b>Both code and one of the value parameters</b><br>
892         * Type: <b>composite</b><br>
893         * Path: <b>code &amp; value[x]</b><br>
894         * </p>
895         */
896        @SearchParamDefinition(name="code-value-string", path="code & value[x]", description="Both code and one of the value parameters", type="composite"  , compositeOf={  "code",  "value-string" }  )
897        public static final String SP_CODE_VALUE_STRING = "code-value-string";
898
899        /**
900         * <b>Fluent Client</b> search parameter constant for <b>code-value-string</b>
901         * <p>
902         * Description: <b>Both code and one of the value parameters</b><br>
903         * Type: <b>composite</b><br>
904         * Path: <b>code &amp; value[x]</b><br>
905         * </p>
906         */
907        public static final CompositeClientParam<TokenClientParam, StringClientParam> CODE_VALUE_STRING = new CompositeClientParam<TokenClientParam, StringClientParam>(SP_CODE_VALUE_STRING);
908
909        /**
910         * Search parameter constant for <b>component-code-component-value-quantity</b>
911         * <p>
912         * Description: <b>Both component code and one of the component value parameters</b><br>
913         * Type: <b>composite</b><br>
914         * Path: <b>component-code &amp; component-value[x]</b><br>
915         * </p>
916         */
917        @SearchParamDefinition(name="component-code-component-value-quantity", path="component-code & component-value[x]", description="Both component code and one of the component value parameters", type="composite"  , compositeOf={  "component-code",  "component-value-quantity" }  )
918        public static final String SP_COMPONENT_CODE_COMPONENT_VALUE_QUANTITY = "component-code-component-value-quantity";
919
920        /**
921         * <b>Fluent Client</b> search parameter constant for <b>component-code-component-value-quantity</b>
922         * <p>
923         * Description: <b>Both component code and one of the component value parameters</b><br>
924         * Type: <b>composite</b><br>
925         * Path: <b>component-code &amp; component-value[x]</b><br>
926         * </p>
927         */
928        public static final CompositeClientParam<TokenClientParam, QuantityClientParam> COMPONENT_CODE_COMPONENT_VALUE_QUANTITY = new CompositeClientParam<TokenClientParam, QuantityClientParam>(SP_COMPONENT_CODE_COMPONENT_VALUE_QUANTITY);
929
930        /**
931         * Search parameter constant for <b>component-code-component-value-concept</b>
932         * <p>
933         * Description: <b>Both component code and one of the component value parameters</b><br>
934         * Type: <b>composite</b><br>
935         * Path: <b>component-code &amp; component-value[x]</b><br>
936         * </p>
937         */
938        @SearchParamDefinition(name="component-code-component-value-concept", path="component-code & component-value[x]", description="Both component code and one of the component value parameters", type="composite"  , compositeOf={  "component-code",  "component-value-concept" }  )
939        public static final String SP_COMPONENT_CODE_COMPONENT_VALUE_CONCEPT = "component-code-component-value-concept";
940
941        /**
942         * <b>Fluent Client</b> search parameter constant for <b>component-code-component-value-concept</b>
943         * <p>
944         * Description: <b>Both component code and one of the component value parameters</b><br>
945         * Type: <b>composite</b><br>
946         * Path: <b>component-code &amp; component-value[x]</b><br>
947         * </p>
948         */
949        public static final CompositeClientParam<TokenClientParam, TokenClientParam> COMPONENT_CODE_COMPONENT_VALUE_CONCEPT = new CompositeClientParam<TokenClientParam, TokenClientParam>(SP_COMPONENT_CODE_COMPONENT_VALUE_CONCEPT);
950
951        /**
952         * Search parameter constant for <b>component-code-component-value-string</b>
953         * <p>
954         * Description: <b>Both component code and one of the component value parameters</b><br>
955         * Type: <b>composite</b><br>
956         * Path: <b>component-code &amp; component-value[x]</b><br>
957         * </p>
958         */
959        @SearchParamDefinition(name="component-code-component-value-string", path="component-code & component-value[x]", description="Both component code and one of the component value parameters", type="composite"  , compositeOf={  "component-code",  "component-value-string" }  )
960        public static final String SP_COMPONENT_CODE_COMPONENT_VALUE_STRING = "component-code-component-value-string";
961
962        /**
963         * <b>Fluent Client</b> search parameter constant for <b>component-code-component-value-string</b>
964         * <p>
965         * Description: <b>Both component code and one of the component value parameters</b><br>
966         * Type: <b>composite</b><br>
967         * Path: <b>component-code &amp; component-value[x]</b><br>
968         * </p>
969         */
970        public static final CompositeClientParam<TokenClientParam, StringClientParam> COMPONENT_CODE_COMPONENT_VALUE_STRING = new CompositeClientParam<TokenClientParam, StringClientParam>(SP_COMPONENT_CODE_COMPONENT_VALUE_STRING);
971
972        /**
973         * Search parameter constant for <b>related-target-related-type</b>
974         * <p>
975         * Description: <b>Related Observations - search on related-type and related-target together</b><br>
976         * Type: <b>composite</b><br>
977         * Path: <b>related-target &amp; related-type</b><br>
978         * </p>
979         */
980        @SearchParamDefinition(name="related-target-related-type", path="related-target & related-type", description="Related Observations - search on related-type and related-target together", type="composite"  , compositeOf={  "related-target",  "related-type" }  )
981        public static final String SP_RELATED_TARGET_RELATED_TYPE = "related-target-related-type";
982
983        /**
984         * <b>Fluent Client</b> search parameter constant for <b>related-target-related-type</b>
985         * <p>
986         * Description: <b>Related Observations - search on related-type and related-target together</b><br>
987         * Type: <b>composite</b><br>
988         * Path: <b>related-target &amp; related-type</b><br>
989         * </p>
990         */
991        public static final CompositeClientParam<ReferenceClientParam, TokenClientParam> RELATED_TARGET_RELATED_TYPE = new CompositeClientParam<ReferenceClientParam, TokenClientParam>(SP_RELATED_TARGET_RELATED_TYPE);
992
993
994        /**
995         * Constant for fluent queries to be used to add include statements. Specifies
996         * the path value of "<b>Observation:device</b>".
997         */
998        public static final Include INCLUDE_DEVICE = new Include("Observation:device");
999
1000        /**
1001         * Constant for fluent queries to be used to add include statements. Specifies
1002         * the path value of "<b>Observation:encounter</b>".
1003         */
1004        public static final Include INCLUDE_ENCOUNTER = new Include("Observation:encounter");
1005
1006        /**
1007         * Constant for fluent queries to be used to add include statements. Specifies
1008         * the path value of "<b>Observation:patient</b>".
1009         */
1010        public static final Include INCLUDE_PATIENT = new Include("Observation:patient");
1011
1012        /**
1013         * Constant for fluent queries to be used to add include statements. Specifies
1014         * the path value of "<b>Observation:performer</b>".
1015         */
1016        public static final Include INCLUDE_PERFORMER = new Include("Observation:performer");
1017
1018        /**
1019         * Constant for fluent queries to be used to add include statements. Specifies
1020         * the path value of "<b>Observation:related-target</b>".
1021         */
1022        public static final Include INCLUDE_RELATED_TARGET = new Include("Observation:related-target");
1023
1024        /**
1025         * Constant for fluent queries to be used to add include statements. Specifies
1026         * the path value of "<b>Observation:specimen</b>".
1027         */
1028        public static final Include INCLUDE_SPECIMEN = new Include("Observation:specimen");
1029
1030        /**
1031         * Constant for fluent queries to be used to add include statements. Specifies
1032         * the path value of "<b>Observation:subject</b>".
1033         */
1034        public static final Include INCLUDE_SUBJECT = new Include("Observation:subject");
1035
1036
1037        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
1038        @Description(
1039                shortDefinition="id",
1040                formalDefinition="A unique identifier for the simple observation instance."
1041        )
1042        private java.util.List<IdentifierDt> myIdentifier;
1043        
1044        @Child(name="status", type=CodeDt.class, order=1, min=1, max=1, summary=true, modifier=true)    
1045        @Description(
1046                shortDefinition="status",
1047                formalDefinition="The status of the result value"
1048        )
1049        private BoundCodeDt<ObservationStatusEnum> myStatus;
1050        
1051        @Child(name="category", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=false, modifier=false)     
1052        @Description(
1053                shortDefinition="class",
1054                formalDefinition="A code that classifies the general type of observation being made.  This is used  for searching, sorting and display purposes."
1055        )
1056        private BoundCodeableConceptDt<ObservationCategoryCodesEnum> myCategory;
1057        
1058        @Child(name="code", type=CodeableConceptDt.class, order=3, min=1, max=1, summary=true, modifier=false)  
1059        @Description(
1060                shortDefinition="what",
1061                formalDefinition="Describes what was observed. Sometimes this is called the observation \"name\""
1062        )
1063        private CodeableConceptDt myCode;
1064        
1065        @Child(name="subject", order=4, min=0, max=1, summary=true, modifier=false, type={
1066                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Group.class,           ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Location.class })
1067        @Description(
1068                shortDefinition="who.focus",
1069                formalDefinition="The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.  Comments: Indirect characteristics may be those of a specimen, fetus, donor,  other observer (for example a relative or EMT), or any observation made about the subject."
1070        )
1071        private ResourceReferenceDt mySubject;
1072        
1073        @Child(name="encounter", order=5, min=0, max=1, summary=false, modifier=false, type={
1074                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
1075        @Description(
1076                shortDefinition="context",
1077                formalDefinition="The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made"
1078        )
1079        private ResourceReferenceDt myEncounter;
1080        
1081        @Child(name="effective", order=6, min=0, max=1, summary=true, modifier=false, type={
1082                DateTimeDt.class,               PeriodDt.class  })
1083        @Description(
1084                shortDefinition="when.done",
1085                formalDefinition="The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \"physiologically relevant time\". This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself"
1086        )
1087        private IDatatype myEffective;
1088        
1089        @Child(name="issued", type=InstantDt.class, order=7, min=0, max=1, summary=true, modifier=false)        
1090        @Description(
1091                shortDefinition="when.recorded",
1092                formalDefinition="The date and time this observation was made available to providers, typically after the results have been reviewed and verified."
1093        )
1094        private InstantDt myIssued;
1095        
1096        @Child(name="performer", order=8, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={
1097                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Organization.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class    })
1098        @Description(
1099                shortDefinition="who.actor",
1100                formalDefinition="Who was responsible for asserting the observed value as \"true\""
1101        )
1102        private java.util.List<ResourceReferenceDt> myPerformer;
1103        
1104        @Child(name="value", order=9, min=0, max=1, summary=true, modifier=false, type={
1105                QuantityDt.class,               CodeableConceptDt.class,                StringDt.class,                 RangeDt.class,          RatioDt.class,          SampledDataDt.class,            AttachmentDt.class,             TimeDt.class,           DateTimeDt.class,               PeriodDt.class  })
1106        @Description(
1107                shortDefinition="",
1108                formalDefinition="The information determined as a result of making the observation, if the information has a simple value"
1109        )
1110        private IDatatype myValue;
1111        
1112        @Child(name="dataAbsentReason", type=CodeableConceptDt.class, order=10, min=0, max=1, summary=false, modifier=false)    
1113        @Description(
1114                shortDefinition="",
1115                formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing."
1116        )
1117        private CodeableConceptDt myDataAbsentReason;
1118        
1119        @Child(name="interpretation", type=CodeableConceptDt.class, order=11, min=0, max=1, summary=false, modifier=false)      
1120        @Description(
1121                shortDefinition="",
1122                formalDefinition="The assessment made based on the result of the observation.  Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag."
1123        )
1124        private CodeableConceptDt myInterpretation;
1125        
1126        @Child(name="comments", type=StringDt.class, order=12, min=0, max=1, summary=false, modifier=false)     
1127        @Description(
1128                shortDefinition="",
1129                formalDefinition="May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result."
1130        )
1131        private StringDt myComments;
1132        
1133        @Child(name="bodySite", type=CodeableConceptDt.class, order=13, min=0, max=1, summary=false, modifier=false)    
1134        @Description(
1135                shortDefinition="",
1136                formalDefinition="Indicates the site on the subject's body where the observation was made (i.e. the target site)."
1137        )
1138        private CodeableConceptDt myBodySite;
1139        
1140        @Child(name="method", type=CodeableConceptDt.class, order=14, min=0, max=1, summary=false, modifier=false)      
1141        @Description(
1142                shortDefinition="",
1143                formalDefinition="Indicates the mechanism used to perform the observation"
1144        )
1145        private CodeableConceptDt myMethod;
1146        
1147        @Child(name="specimen", order=15, min=0, max=1, summary=false, modifier=false, type={
1148                ca.uhn.fhir.model.dstu2.resource.Specimen.class })
1149        @Description(
1150                shortDefinition="",
1151                formalDefinition="The specimen that was used when this observation was made"
1152        )
1153        private ResourceReferenceDt mySpecimen;
1154        
1155        @Child(name="device", order=16, min=0, max=1, summary=false, modifier=false, type={
1156                ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.DeviceMetric.class     })
1157        @Description(
1158                shortDefinition="",
1159                formalDefinition="The device used to generate the observation data."
1160        )
1161        private ResourceReferenceDt myDevice;
1162        
1163        @Child(name="referenceRange", order=17, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
1164        @Description(
1165                shortDefinition="",
1166                formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range"
1167        )
1168        private java.util.List<ReferenceRange> myReferenceRange;
1169        
1170        @Child(name="related", order=18, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)  
1171        @Description(
1172                shortDefinition="",
1173                formalDefinition="A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code."
1174        )
1175        private java.util.List<Related> myRelated;
1176        
1177        @Child(name="component", order=19, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1178        @Description(
1179                shortDefinition="",
1180                formalDefinition="Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations."
1181        )
1182        private java.util.List<Component> myComponent;
1183        
1184
1185        @Override
1186        public boolean isEmpty() {
1187                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myStatus,  myCategory,  myCode,  mySubject,  myEncounter,  myEffective,  myIssued,  myPerformer,  myValue,  myDataAbsentReason,  myInterpretation,  myComments,  myBodySite,  myMethod,  mySpecimen,  myDevice,  myReferenceRange,  myRelated,  myComponent);
1188        }
1189        
1190        @Override
1191        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1192                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myStatus, myCategory, myCode, mySubject, myEncounter, myEffective, myIssued, myPerformer, myValue, myDataAbsentReason, myInterpretation, myComments, myBodySite, myMethod, mySpecimen, myDevice, myReferenceRange, myRelated, myComponent);
1193        }
1194
1195        /**
1196         * Gets the value(s) for <b>identifier</b> (id).
1197         * creating it if it does
1198         * not exist. Will not return <code>null</code>.
1199         *
1200     * <p>
1201     * <b>Definition:</b>
1202     * A unique identifier for the simple observation instance.
1203     * </p> 
1204         */
1205        public java.util.List<IdentifierDt> getIdentifier() {  
1206                if (myIdentifier == null) {
1207                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
1208                }
1209                return myIdentifier;
1210        }
1211
1212        /**
1213         * Sets the value(s) for <b>identifier</b> (id)
1214         *
1215     * <p>
1216     * <b>Definition:</b>
1217     * A unique identifier for the simple observation instance.
1218     * </p> 
1219         */
1220        public Observation setIdentifier(java.util.List<IdentifierDt> theValue) {
1221                myIdentifier = theValue;
1222                return this;
1223        }
1224        
1225        
1226
1227        /**
1228         * Adds and returns a new value for <b>identifier</b> (id)
1229         *
1230     * <p>
1231     * <b>Definition:</b>
1232     * A unique identifier for the simple observation instance.
1233     * </p> 
1234         */
1235        public IdentifierDt addIdentifier() {
1236                IdentifierDt newType = new IdentifierDt();
1237                getIdentifier().add(newType);
1238                return newType; 
1239        }
1240
1241        /**
1242         * Adds a given new value for <b>identifier</b> (id)
1243         *
1244         * <p>
1245         * <b>Definition:</b>
1246         * A unique identifier for the simple observation instance.
1247         * </p>
1248         * @param theValue The identifier to add (must not be <code>null</code>)
1249         */
1250        public Observation addIdentifier(IdentifierDt theValue) {
1251                if (theValue == null) {
1252                        throw new NullPointerException("theValue must not be null");
1253                }
1254                getIdentifier().add(theValue);
1255                return this;
1256        }
1257
1258        /**
1259         * Gets the first repetition for <b>identifier</b> (id),
1260         * creating it if it does not already exist.
1261         *
1262     * <p>
1263     * <b>Definition:</b>
1264     * A unique identifier for the simple observation instance.
1265     * </p> 
1266         */
1267        public IdentifierDt getIdentifierFirstRep() {
1268                if (getIdentifier().isEmpty()) {
1269                        return addIdentifier();
1270                }
1271                return getIdentifier().get(0); 
1272        }
1273  
1274        /**
1275         * Gets the value(s) for <b>status</b> (status).
1276         * creating it if it does
1277         * not exist. Will not return <code>null</code>.
1278         *
1279     * <p>
1280     * <b>Definition:</b>
1281     * The status of the result value
1282     * </p> 
1283         */
1284        public BoundCodeDt<ObservationStatusEnum> getStatusElement() {  
1285                if (myStatus == null) {
1286                        myStatus = new BoundCodeDt<ObservationStatusEnum>(ObservationStatusEnum.VALUESET_BINDER);
1287                }
1288                return myStatus;
1289        }
1290
1291        
1292        /**
1293         * Gets the value(s) for <b>status</b> (status).
1294         * creating it if it does
1295         * not exist. Will not return <code>null</code>.
1296         *
1297     * <p>
1298     * <b>Definition:</b>
1299     * The status of the result value
1300     * </p> 
1301         */
1302        public String getStatus() {  
1303                return getStatusElement().getValue();
1304        }
1305
1306        /**
1307         * Sets the value(s) for <b>status</b> (status)
1308         *
1309     * <p>
1310     * <b>Definition:</b>
1311     * The status of the result value
1312     * </p> 
1313         */
1314        public Observation setStatus(BoundCodeDt<ObservationStatusEnum> theValue) {
1315                myStatus = theValue;
1316                return this;
1317        }
1318        
1319        
1320
1321        /**
1322         * Sets the value(s) for <b>status</b> (status)
1323         *
1324     * <p>
1325     * <b>Definition:</b>
1326     * The status of the result value
1327     * </p> 
1328         */
1329        public Observation setStatus(ObservationStatusEnum theValue) {
1330                setStatus(new BoundCodeDt<ObservationStatusEnum>(ObservationStatusEnum.VALUESET_BINDER, theValue));
1331                
1332/*
1333                getStatusElement().setValueAsEnum(theValue);
1334*/
1335                return this;
1336        }
1337
1338  
1339        /**
1340         * Gets the value(s) for <b>category</b> (class).
1341         * creating it if it does
1342         * not exist. Will not return <code>null</code>.
1343         *
1344     * <p>
1345     * <b>Definition:</b>
1346     * A code that classifies the general type of observation being made.  This is used  for searching, sorting and display purposes.
1347     * </p> 
1348         */
1349        public BoundCodeableConceptDt<ObservationCategoryCodesEnum> getCategory() {  
1350                if (myCategory == null) {
1351                        myCategory = new BoundCodeableConceptDt<ObservationCategoryCodesEnum>(ObservationCategoryCodesEnum.VALUESET_BINDER);
1352                }
1353                return myCategory;
1354        }
1355
1356        /**
1357         * Sets the value(s) for <b>category</b> (class)
1358         *
1359     * <p>
1360     * <b>Definition:</b>
1361     * A code that classifies the general type of observation being made.  This is used  for searching, sorting and display purposes.
1362     * </p> 
1363         */
1364        public Observation setCategory(BoundCodeableConceptDt<ObservationCategoryCodesEnum> theValue) {
1365                myCategory = theValue;
1366                return this;
1367        }
1368        
1369        
1370
1371        /**
1372         * Sets the value(s) for <b>category</b> (class)
1373         *
1374     * <p>
1375     * <b>Definition:</b>
1376     * A code that classifies the general type of observation being made.  This is used  for searching, sorting and display purposes.
1377     * </p> 
1378         */
1379        public Observation setCategory(ObservationCategoryCodesEnum theValue) {
1380                setCategory(new BoundCodeableConceptDt<ObservationCategoryCodesEnum>(ObservationCategoryCodesEnum.VALUESET_BINDER, theValue));
1381                
1382/*
1383                getCategory().setValueAsEnum(theValue);
1384*/
1385                return this;
1386        }
1387
1388  
1389        /**
1390         * Gets the value(s) for <b>code</b> (what).
1391         * creating it if it does
1392         * not exist. Will not return <code>null</code>.
1393         *
1394     * <p>
1395     * <b>Definition:</b>
1396     * Describes what was observed. Sometimes this is called the observation \&quot;name\&quot;
1397     * </p> 
1398         */
1399        public CodeableConceptDt getCode() {  
1400                if (myCode == null) {
1401                        myCode = new CodeableConceptDt();
1402                }
1403                return myCode;
1404        }
1405
1406        /**
1407         * Sets the value(s) for <b>code</b> (what)
1408         *
1409     * <p>
1410     * <b>Definition:</b>
1411     * Describes what was observed. Sometimes this is called the observation \&quot;name\&quot;
1412     * </p> 
1413         */
1414        public Observation setCode(CodeableConceptDt theValue) {
1415                myCode = theValue;
1416                return this;
1417        }
1418        
1419        
1420
1421  
1422        /**
1423         * Gets the value(s) for <b>subject</b> (who.focus).
1424         * creating it if it does
1425         * not exist. Will not return <code>null</code>.
1426         *
1427     * <p>
1428     * <b>Definition:</b>
1429     * The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.  Comments: Indirect characteristics may be those of a specimen, fetus, donor,  other observer (for example a relative or EMT), or any observation made about the subject.
1430     * </p> 
1431         */
1432        public ResourceReferenceDt getSubject() {  
1433                if (mySubject == null) {
1434                        mySubject = new ResourceReferenceDt();
1435                }
1436                return mySubject;
1437        }
1438
1439        /**
1440         * Sets the value(s) for <b>subject</b> (who.focus)
1441         *
1442     * <p>
1443     * <b>Definition:</b>
1444     * The patient, or group of patients, location, or device whose characteristics (direct or indirect) are described by the observation and into whose record the observation is placed.  Comments: Indirect characteristics may be those of a specimen, fetus, donor,  other observer (for example a relative or EMT), or any observation made about the subject.
1445     * </p> 
1446         */
1447        public Observation setSubject(ResourceReferenceDt theValue) {
1448                mySubject = theValue;
1449                return this;
1450        }
1451        
1452        
1453
1454  
1455        /**
1456         * Gets the value(s) for <b>encounter</b> (context).
1457         * creating it if it does
1458         * not exist. Will not return <code>null</code>.
1459         *
1460     * <p>
1461     * <b>Definition:</b>
1462     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made
1463     * </p> 
1464         */
1465        public ResourceReferenceDt getEncounter() {  
1466                if (myEncounter == null) {
1467                        myEncounter = new ResourceReferenceDt();
1468                }
1469                return myEncounter;
1470        }
1471
1472        /**
1473         * Sets the value(s) for <b>encounter</b> (context)
1474         *
1475     * <p>
1476     * <b>Definition:</b>
1477     * The healthcare event  (e.g. a patient and healthcare provider interaction) during which this observation is made
1478     * </p> 
1479         */
1480        public Observation setEncounter(ResourceReferenceDt theValue) {
1481                myEncounter = theValue;
1482                return this;
1483        }
1484        
1485        
1486
1487  
1488        /**
1489         * Gets the value(s) for <b>effective[x]</b> (when.done).
1490         * creating it if it does
1491         * not exist. Will not return <code>null</code>.
1492         *
1493     * <p>
1494     * <b>Definition:</b>
1495     * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \&quot;physiologically relevant time\&quot;. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself
1496     * </p> 
1497         */
1498        public IDatatype getEffective() {  
1499                return myEffective;
1500        }
1501
1502        /**
1503         * Sets the value(s) for <b>effective[x]</b> (when.done)
1504         *
1505     * <p>
1506     * <b>Definition:</b>
1507     * The time or time-period the observed value is asserted as being true. For biological subjects - e.g. human patients - this is usually called the \&quot;physiologically relevant time\&quot;. This is usually either the time of the procedure or of specimen collection, but very often the source of the date/time is not known, only the date/time itself
1508     * </p> 
1509         */
1510        public Observation setEffective(IDatatype theValue) {
1511                myEffective = theValue;
1512                return this;
1513        }
1514        
1515        
1516
1517  
1518        /**
1519         * Gets the value(s) for <b>issued</b> (when.recorded).
1520         * creating it if it does
1521         * not exist. Will not return <code>null</code>.
1522         *
1523     * <p>
1524     * <b>Definition:</b>
1525     * The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
1526     * </p> 
1527         */
1528        public InstantDt getIssuedElement() {  
1529                if (myIssued == null) {
1530                        myIssued = new InstantDt();
1531                }
1532                return myIssued;
1533        }
1534
1535        
1536        /**
1537         * Gets the value(s) for <b>issued</b> (when.recorded).
1538         * creating it if it does
1539         * not exist. Will not return <code>null</code>.
1540         *
1541     * <p>
1542     * <b>Definition:</b>
1543     * The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
1544     * </p> 
1545         */
1546        public Date getIssued() {  
1547                return getIssuedElement().getValue();
1548        }
1549
1550        /**
1551         * Sets the value(s) for <b>issued</b> (when.recorded)
1552         *
1553     * <p>
1554     * <b>Definition:</b>
1555     * The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
1556     * </p> 
1557         */
1558        public Observation setIssued(InstantDt theValue) {
1559                myIssued = theValue;
1560                return this;
1561        }
1562        
1563        
1564
1565        /**
1566         * Sets the value for <b>issued</b> (when.recorded)
1567         *
1568     * <p>
1569     * <b>Definition:</b>
1570     * The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
1571     * </p> 
1572         */
1573        public Observation setIssuedWithMillisPrecision( Date theDate) {
1574                myIssued = new InstantDt(theDate); 
1575                return this; 
1576        }
1577
1578        /**
1579         * Sets the value for <b>issued</b> (when.recorded)
1580         *
1581     * <p>
1582     * <b>Definition:</b>
1583     * The date and time this observation was made available to providers, typically after the results have been reviewed and verified.
1584     * </p> 
1585         */
1586        public Observation setIssued( Date theDate,  TemporalPrecisionEnum thePrecision) {
1587                myIssued = new InstantDt(theDate, thePrecision); 
1588                return this; 
1589        }
1590
1591 
1592        /**
1593         * Gets the value(s) for <b>performer</b> (who.actor).
1594         * creating it if it does
1595         * not exist. Will not return <code>null</code>.
1596         *
1597     * <p>
1598     * <b>Definition:</b>
1599     * Who was responsible for asserting the observed value as \&quot;true\&quot;
1600     * </p> 
1601         */
1602        public java.util.List<ResourceReferenceDt> getPerformer() {  
1603                if (myPerformer == null) {
1604                        myPerformer = new java.util.ArrayList<ResourceReferenceDt>();
1605                }
1606                return myPerformer;
1607        }
1608
1609        /**
1610         * Sets the value(s) for <b>performer</b> (who.actor)
1611         *
1612     * <p>
1613     * <b>Definition:</b>
1614     * Who was responsible for asserting the observed value as \&quot;true\&quot;
1615     * </p> 
1616         */
1617        public Observation setPerformer(java.util.List<ResourceReferenceDt> theValue) {
1618                myPerformer = theValue;
1619                return this;
1620        }
1621        
1622        
1623
1624        /**
1625         * Adds and returns a new value for <b>performer</b> (who.actor)
1626         *
1627     * <p>
1628     * <b>Definition:</b>
1629     * Who was responsible for asserting the observed value as \&quot;true\&quot;
1630     * </p> 
1631         */
1632        public ResourceReferenceDt addPerformer() {
1633                ResourceReferenceDt newType = new ResourceReferenceDt();
1634                getPerformer().add(newType);
1635                return newType; 
1636        }
1637  
1638        /**
1639         * Gets the value(s) for <b>value[x]</b> ().
1640         * creating it if it does
1641         * not exist. Will not return <code>null</code>.
1642         *
1643     * <p>
1644     * <b>Definition:</b>
1645     * The information determined as a result of making the observation, if the information has a simple value
1646     * </p> 
1647         */
1648        public IDatatype getValue() {  
1649                return myValue;
1650        }
1651
1652        /**
1653         * Sets the value(s) for <b>value[x]</b> ()
1654         *
1655     * <p>
1656     * <b>Definition:</b>
1657     * The information determined as a result of making the observation, if the information has a simple value
1658     * </p> 
1659         */
1660        public Observation setValue(IDatatype theValue) {
1661                myValue = theValue;
1662                return this;
1663        }
1664        
1665        
1666
1667  
1668        /**
1669         * Gets the value(s) for <b>dataAbsentReason</b> ().
1670         * creating it if it does
1671         * not exist. Will not return <code>null</code>.
1672         *
1673     * <p>
1674     * <b>Definition:</b>
1675     * Provides a reason why the expected value in the element Observation.value[x] is missing.
1676     * </p> 
1677         */
1678        public CodeableConceptDt getDataAbsentReason() {  
1679                if (myDataAbsentReason == null) {
1680                        myDataAbsentReason = new CodeableConceptDt();
1681                }
1682                return myDataAbsentReason;
1683        }
1684
1685        /**
1686         * Sets the value(s) for <b>dataAbsentReason</b> ()
1687         *
1688     * <p>
1689     * <b>Definition:</b>
1690     * Provides a reason why the expected value in the element Observation.value[x] is missing.
1691     * </p> 
1692         */
1693        public Observation setDataAbsentReason(CodeableConceptDt theValue) {
1694                myDataAbsentReason = theValue;
1695                return this;
1696        }
1697        
1698        
1699
1700  
1701        /**
1702         * Gets the value(s) for <b>interpretation</b> ().
1703         * creating it if it does
1704         * not exist. Will not return <code>null</code>.
1705         *
1706     * <p>
1707     * <b>Definition:</b>
1708     * The assessment made based on the result of the observation.  Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.
1709     * </p> 
1710         */
1711        public CodeableConceptDt getInterpretation() {  
1712                if (myInterpretation == null) {
1713                        myInterpretation = new CodeableConceptDt();
1714                }
1715                return myInterpretation;
1716        }
1717
1718        /**
1719         * Sets the value(s) for <b>interpretation</b> ()
1720         *
1721     * <p>
1722     * <b>Definition:</b>
1723     * The assessment made based on the result of the observation.  Intended as a simple compact code often placed adjacent to the result value in reports and flow sheets to signal the meaning/normalcy status of the result. Otherwise known as abnormal flag.
1724     * </p> 
1725         */
1726        public Observation setInterpretation(CodeableConceptDt theValue) {
1727                myInterpretation = theValue;
1728                return this;
1729        }
1730        
1731        
1732
1733  
1734        /**
1735         * Gets the value(s) for <b>comments</b> ().
1736         * creating it if it does
1737         * not exist. Will not return <code>null</code>.
1738         *
1739     * <p>
1740     * <b>Definition:</b>
1741     * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.
1742     * </p> 
1743         */
1744        public StringDt getCommentsElement() {  
1745                if (myComments == null) {
1746                        myComments = new StringDt();
1747                }
1748                return myComments;
1749        }
1750
1751        
1752        /**
1753         * Gets the value(s) for <b>comments</b> ().
1754         * creating it if it does
1755         * not exist. Will not return <code>null</code>.
1756         *
1757     * <p>
1758     * <b>Definition:</b>
1759     * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.
1760     * </p> 
1761         */
1762        public String getComments() {  
1763                return getCommentsElement().getValue();
1764        }
1765
1766        /**
1767         * Sets the value(s) for <b>comments</b> ()
1768         *
1769     * <p>
1770     * <b>Definition:</b>
1771     * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.
1772     * </p> 
1773         */
1774        public Observation setComments(StringDt theValue) {
1775                myComments = theValue;
1776                return this;
1777        }
1778        
1779        
1780
1781        /**
1782         * Sets the value for <b>comments</b> ()
1783         *
1784     * <p>
1785     * <b>Definition:</b>
1786     * May include statements about significant, unexpected or unreliable values, or information about the source of the value where this may be relevant to the interpretation of the result.
1787     * </p> 
1788         */
1789        public Observation setComments( String theString) {
1790                myComments = new StringDt(theString); 
1791                return this; 
1792        }
1793
1794 
1795        /**
1796         * Gets the value(s) for <b>bodySite</b> ().
1797         * creating it if it does
1798         * not exist. Will not return <code>null</code>.
1799         *
1800     * <p>
1801     * <b>Definition:</b>
1802     * Indicates the site on the subject's body where the observation was made (i.e. the target site).
1803     * </p> 
1804         */
1805        public CodeableConceptDt getBodySite() {  
1806                if (myBodySite == null) {
1807                        myBodySite = new CodeableConceptDt();
1808                }
1809                return myBodySite;
1810        }
1811
1812        /**
1813         * Sets the value(s) for <b>bodySite</b> ()
1814         *
1815     * <p>
1816     * <b>Definition:</b>
1817     * Indicates the site on the subject's body where the observation was made (i.e. the target site).
1818     * </p> 
1819         */
1820        public Observation setBodySite(CodeableConceptDt theValue) {
1821                myBodySite = theValue;
1822                return this;
1823        }
1824        
1825        
1826
1827  
1828        /**
1829         * Gets the value(s) for <b>method</b> ().
1830         * creating it if it does
1831         * not exist. Will not return <code>null</code>.
1832         *
1833     * <p>
1834     * <b>Definition:</b>
1835     * Indicates the mechanism used to perform the observation
1836     * </p> 
1837         */
1838        public CodeableConceptDt getMethod() {  
1839                if (myMethod == null) {
1840                        myMethod = new CodeableConceptDt();
1841                }
1842                return myMethod;
1843        }
1844
1845        /**
1846         * Sets the value(s) for <b>method</b> ()
1847         *
1848     * <p>
1849     * <b>Definition:</b>
1850     * Indicates the mechanism used to perform the observation
1851     * </p> 
1852         */
1853        public Observation setMethod(CodeableConceptDt theValue) {
1854                myMethod = theValue;
1855                return this;
1856        }
1857        
1858        
1859
1860  
1861        /**
1862         * Gets the value(s) for <b>specimen</b> ().
1863         * creating it if it does
1864         * not exist. Will not return <code>null</code>.
1865         *
1866     * <p>
1867     * <b>Definition:</b>
1868     * The specimen that was used when this observation was made
1869     * </p> 
1870         */
1871        public ResourceReferenceDt getSpecimen() {  
1872                if (mySpecimen == null) {
1873                        mySpecimen = new ResourceReferenceDt();
1874                }
1875                return mySpecimen;
1876        }
1877
1878        /**
1879         * Sets the value(s) for <b>specimen</b> ()
1880         *
1881     * <p>
1882     * <b>Definition:</b>
1883     * The specimen that was used when this observation was made
1884     * </p> 
1885         */
1886        public Observation setSpecimen(ResourceReferenceDt theValue) {
1887                mySpecimen = theValue;
1888                return this;
1889        }
1890        
1891        
1892
1893  
1894        /**
1895         * Gets the value(s) for <b>device</b> ().
1896         * creating it if it does
1897         * not exist. Will not return <code>null</code>.
1898         *
1899     * <p>
1900     * <b>Definition:</b>
1901     * The device used to generate the observation data.
1902     * </p> 
1903         */
1904        public ResourceReferenceDt getDevice() {  
1905                if (myDevice == null) {
1906                        myDevice = new ResourceReferenceDt();
1907                }
1908                return myDevice;
1909        }
1910
1911        /**
1912         * Sets the value(s) for <b>device</b> ()
1913         *
1914     * <p>
1915     * <b>Definition:</b>
1916     * The device used to generate the observation data.
1917     * </p> 
1918         */
1919        public Observation setDevice(ResourceReferenceDt theValue) {
1920                myDevice = theValue;
1921                return this;
1922        }
1923        
1924        
1925
1926  
1927        /**
1928         * Gets the value(s) for <b>referenceRange</b> ().
1929         * creating it if it does
1930         * not exist. Will not return <code>null</code>.
1931         *
1932     * <p>
1933     * <b>Definition:</b>
1934     * Guidance on how to interpret the value by comparison to a normal or recommended range
1935     * </p> 
1936         */
1937        public java.util.List<ReferenceRange> getReferenceRange() {  
1938                if (myReferenceRange == null) {
1939                        myReferenceRange = new java.util.ArrayList<ReferenceRange>();
1940                }
1941                return myReferenceRange;
1942        }
1943
1944        /**
1945         * Sets the value(s) for <b>referenceRange</b> ()
1946         *
1947     * <p>
1948     * <b>Definition:</b>
1949     * Guidance on how to interpret the value by comparison to a normal or recommended range
1950     * </p> 
1951         */
1952        public Observation setReferenceRange(java.util.List<ReferenceRange> theValue) {
1953                myReferenceRange = theValue;
1954                return this;
1955        }
1956        
1957        
1958
1959        /**
1960         * Adds and returns a new value for <b>referenceRange</b> ()
1961         *
1962     * <p>
1963     * <b>Definition:</b>
1964     * Guidance on how to interpret the value by comparison to a normal or recommended range
1965     * </p> 
1966         */
1967        public ReferenceRange addReferenceRange() {
1968                ReferenceRange newType = new ReferenceRange();
1969                getReferenceRange().add(newType);
1970                return newType; 
1971        }
1972
1973        /**
1974         * Adds a given new value for <b>referenceRange</b> ()
1975         *
1976         * <p>
1977         * <b>Definition:</b>
1978         * Guidance on how to interpret the value by comparison to a normal or recommended range
1979         * </p>
1980         * @param theValue The referenceRange to add (must not be <code>null</code>)
1981         */
1982        public Observation addReferenceRange(ReferenceRange theValue) {
1983                if (theValue == null) {
1984                        throw new NullPointerException("theValue must not be null");
1985                }
1986                getReferenceRange().add(theValue);
1987                return this;
1988        }
1989
1990        /**
1991         * Gets the first repetition for <b>referenceRange</b> (),
1992         * creating it if it does not already exist.
1993         *
1994     * <p>
1995     * <b>Definition:</b>
1996     * Guidance on how to interpret the value by comparison to a normal or recommended range
1997     * </p> 
1998         */
1999        public ReferenceRange getReferenceRangeFirstRep() {
2000                if (getReferenceRange().isEmpty()) {
2001                        return addReferenceRange();
2002                }
2003                return getReferenceRange().get(0); 
2004        }
2005  
2006        /**
2007         * Gets the value(s) for <b>related</b> ().
2008         * creating it if it does
2009         * not exist. Will not return <code>null</code>.
2010         *
2011     * <p>
2012     * <b>Definition:</b>
2013     * A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.
2014     * </p> 
2015         */
2016        public java.util.List<Related> getRelated() {  
2017                if (myRelated == null) {
2018                        myRelated = new java.util.ArrayList<Related>();
2019                }
2020                return myRelated;
2021        }
2022
2023        /**
2024         * Sets the value(s) for <b>related</b> ()
2025         *
2026     * <p>
2027     * <b>Definition:</b>
2028     * A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.
2029     * </p> 
2030         */
2031        public Observation setRelated(java.util.List<Related> theValue) {
2032                myRelated = theValue;
2033                return this;
2034        }
2035        
2036        
2037
2038        /**
2039         * Adds and returns a new value for <b>related</b> ()
2040         *
2041     * <p>
2042     * <b>Definition:</b>
2043     * A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.
2044     * </p> 
2045         */
2046        public Related addRelated() {
2047                Related newType = new Related();
2048                getRelated().add(newType);
2049                return newType; 
2050        }
2051
2052        /**
2053         * Adds a given new value for <b>related</b> ()
2054         *
2055         * <p>
2056         * <b>Definition:</b>
2057         * A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.
2058         * </p>
2059         * @param theValue The related to add (must not be <code>null</code>)
2060         */
2061        public Observation addRelated(Related theValue) {
2062                if (theValue == null) {
2063                        throw new NullPointerException("theValue must not be null");
2064                }
2065                getRelated().add(theValue);
2066                return this;
2067        }
2068
2069        /**
2070         * Gets the first repetition for <b>related</b> (),
2071         * creating it if it does not already exist.
2072         *
2073     * <p>
2074     * <b>Definition:</b>
2075     * A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.
2076     * </p> 
2077         */
2078        public Related getRelatedFirstRep() {
2079                if (getRelated().isEmpty()) {
2080                        return addRelated();
2081                }
2082                return getRelated().get(0); 
2083        }
2084  
2085        /**
2086         * Gets the value(s) for <b>component</b> ().
2087         * creating it if it does
2088         * not exist. Will not return <code>null</code>.
2089         *
2090     * <p>
2091     * <b>Definition:</b>
2092     * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
2093     * </p> 
2094         */
2095        public java.util.List<Component> getComponent() {  
2096                if (myComponent == null) {
2097                        myComponent = new java.util.ArrayList<Component>();
2098                }
2099                return myComponent;
2100        }
2101
2102        /**
2103         * Sets the value(s) for <b>component</b> ()
2104         *
2105     * <p>
2106     * <b>Definition:</b>
2107     * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
2108     * </p> 
2109         */
2110        public Observation setComponent(java.util.List<Component> theValue) {
2111                myComponent = theValue;
2112                return this;
2113        }
2114        
2115        
2116
2117        /**
2118         * Adds and returns a new value for <b>component</b> ()
2119         *
2120     * <p>
2121     * <b>Definition:</b>
2122     * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
2123     * </p> 
2124         */
2125        public Component addComponent() {
2126                Component newType = new Component();
2127                getComponent().add(newType);
2128                return newType; 
2129        }
2130
2131        /**
2132         * Adds a given new value for <b>component</b> ()
2133         *
2134         * <p>
2135         * <b>Definition:</b>
2136         * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
2137         * </p>
2138         * @param theValue The component to add (must not be <code>null</code>)
2139         */
2140        public Observation addComponent(Component theValue) {
2141                if (theValue == null) {
2142                        throw new NullPointerException("theValue must not be null");
2143                }
2144                getComponent().add(theValue);
2145                return this;
2146        }
2147
2148        /**
2149         * Gets the first repetition for <b>component</b> (),
2150         * creating it if it does not already exist.
2151         *
2152     * <p>
2153     * <b>Definition:</b>
2154     * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
2155     * </p> 
2156         */
2157        public Component getComponentFirstRep() {
2158                if (getComponent().isEmpty()) {
2159                        return addComponent();
2160                }
2161                return getComponent().get(0); 
2162        }
2163  
2164        /**
2165         * Block class for child element: <b>Observation.referenceRange</b> ()
2166         *
2167     * <p>
2168     * <b>Definition:</b>
2169     * Guidance on how to interpret the value by comparison to a normal or recommended range
2170     * </p> 
2171         */
2172        @Block()        
2173        public static class ReferenceRange 
2174            extends  BaseIdentifiableElement        implements IResourceBlock {
2175        
2176        @Child(name="low", type=SimpleQuantityDt.class, order=0, min=0, max=1, summary=false, modifier=false)   
2177        @Description(
2178                shortDefinition="",
2179                formalDefinition="The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9).   If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is <=2.3)."
2180        )
2181        private SimpleQuantityDt myLow;
2182        
2183        @Child(name="high", type=SimpleQuantityDt.class, order=1, min=0, max=1, summary=false, modifier=false)  
2184        @Description(
2185                shortDefinition="",
2186                formalDefinition="The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is >=5 - <=9).   If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is >= 2.3)."
2187        )
2188        private SimpleQuantityDt myHigh;
2189        
2190        @Child(name="meaning", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=false, modifier=false)      
2191        @Description(
2192                shortDefinition="",
2193                formalDefinition="Code for the meaning of the reference range"
2194        )
2195        private CodeableConceptDt myMeaning;
2196        
2197        @Child(name="age", type=RangeDt.class, order=3, min=0, max=1, summary=false, modifier=false)    
2198        @Description(
2199                shortDefinition="",
2200                formalDefinition="The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so"
2201        )
2202        private RangeDt myAge;
2203        
2204        @Child(name="text", type=StringDt.class, order=4, min=0, max=1, summary=false, modifier=false)  
2205        @Description(
2206                shortDefinition="",
2207                formalDefinition="Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \"Negative\" or a list or table of 'normals'."
2208        )
2209        private StringDt myText;
2210        
2211
2212        @Override
2213        public boolean isEmpty() {
2214                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLow,  myHigh,  myMeaning,  myAge,  myText);
2215        }
2216        
2217        @Override
2218        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2219                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLow, myHigh, myMeaning, myAge, myText);
2220        }
2221
2222        /**
2223         * Gets the value(s) for <b>low</b> ().
2224         * creating it if it does
2225         * not exist. Will not return <code>null</code>.
2226         *
2227     * <p>
2228     * <b>Definition:</b>
2229     * The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is &gt;=5 - &lt;=9).   If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is &lt;=2.3).
2230     * </p> 
2231         */
2232        public SimpleQuantityDt getLow() {  
2233                if (myLow == null) {
2234                        myLow = new SimpleQuantityDt();
2235                }
2236                return myLow;
2237        }
2238
2239        /**
2240         * Sets the value(s) for <b>low</b> ()
2241         *
2242     * <p>
2243     * <b>Definition:</b>
2244     * The value of the low bound of the reference range.  The low bound of the reference range endpoint is inclusive of the value (e.g.  reference range is &gt;=5 - &lt;=9).   If the low bound is omitted,  it is assumed to be meaningless (e.g. reference range is &lt;=2.3).
2245     * </p> 
2246         */
2247        public ReferenceRange setLow(SimpleQuantityDt theValue) {
2248                myLow = theValue;
2249                return this;
2250        }
2251        
2252        
2253
2254  
2255        /**
2256         * Gets the value(s) for <b>high</b> ().
2257         * creating it if it does
2258         * not exist. Will not return <code>null</code>.
2259         *
2260     * <p>
2261     * <b>Definition:</b>
2262     * The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is &gt;=5 - &lt;=9).   If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is &gt;= 2.3).
2263     * </p> 
2264         */
2265        public SimpleQuantityDt getHigh() {  
2266                if (myHigh == null) {
2267                        myHigh = new SimpleQuantityDt();
2268                }
2269                return myHigh;
2270        }
2271
2272        /**
2273         * Sets the value(s) for <b>high</b> ()
2274         *
2275     * <p>
2276     * <b>Definition:</b>
2277     * The value of the high bound of the reference range.  The high bound of the reference range endpoint is inclusive of the value (e.g.  reference range is &gt;=5 - &lt;=9).   If the high bound is omitted,  it is assumed to be meaningless (e.g. reference range is &gt;= 2.3).
2278     * </p> 
2279         */
2280        public ReferenceRange setHigh(SimpleQuantityDt theValue) {
2281                myHigh = theValue;
2282                return this;
2283        }
2284        
2285        
2286
2287  
2288        /**
2289         * Gets the value(s) for <b>meaning</b> ().
2290         * creating it if it does
2291         * not exist. Will not return <code>null</code>.
2292         *
2293     * <p>
2294     * <b>Definition:</b>
2295     * Code for the meaning of the reference range
2296     * </p> 
2297         */
2298        public CodeableConceptDt getMeaning() {  
2299                if (myMeaning == null) {
2300                        myMeaning = new CodeableConceptDt();
2301                }
2302                return myMeaning;
2303        }
2304
2305        /**
2306         * Sets the value(s) for <b>meaning</b> ()
2307         *
2308     * <p>
2309     * <b>Definition:</b>
2310     * Code for the meaning of the reference range
2311     * </p> 
2312         */
2313        public ReferenceRange setMeaning(CodeableConceptDt theValue) {
2314                myMeaning = theValue;
2315                return this;
2316        }
2317        
2318        
2319
2320  
2321        /**
2322         * Gets the value(s) for <b>age</b> ().
2323         * creating it if it does
2324         * not exist. Will not return <code>null</code>.
2325         *
2326     * <p>
2327     * <b>Definition:</b>
2328     * The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so
2329     * </p> 
2330         */
2331        public RangeDt getAge() {  
2332                if (myAge == null) {
2333                        myAge = new RangeDt();
2334                }
2335                return myAge;
2336        }
2337
2338        /**
2339         * Sets the value(s) for <b>age</b> ()
2340         *
2341     * <p>
2342     * <b>Definition:</b>
2343     * The age at which this reference range is applicable. This is a neonatal age (e.g. number of weeks at term) if the meaning says so
2344     * </p> 
2345         */
2346        public ReferenceRange setAge(RangeDt theValue) {
2347                myAge = theValue;
2348                return this;
2349        }
2350        
2351        
2352
2353  
2354        /**
2355         * Gets the value(s) for <b>text</b> ().
2356         * creating it if it does
2357         * not exist. Will not return <code>null</code>.
2358         *
2359     * <p>
2360     * <b>Definition:</b>
2361     * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \&quot;Negative\&quot; or a list or table of 'normals'.
2362     * </p> 
2363         */
2364        public StringDt getTextElement() {  
2365                if (myText == null) {
2366                        myText = new StringDt();
2367                }
2368                return myText;
2369        }
2370
2371        
2372        /**
2373         * Gets the value(s) for <b>text</b> ().
2374         * creating it if it does
2375         * not exist. Will not return <code>null</code>.
2376         *
2377     * <p>
2378     * <b>Definition:</b>
2379     * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \&quot;Negative\&quot; or a list or table of 'normals'.
2380     * </p> 
2381         */
2382        public String getText() {  
2383                return getTextElement().getValue();
2384        }
2385
2386        /**
2387         * Sets the value(s) for <b>text</b> ()
2388         *
2389     * <p>
2390     * <b>Definition:</b>
2391     * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \&quot;Negative\&quot; or a list or table of 'normals'.
2392     * </p> 
2393         */
2394        public ReferenceRange setText(StringDt theValue) {
2395                myText = theValue;
2396                return this;
2397        }
2398        
2399        
2400
2401        /**
2402         * Sets the value for <b>text</b> ()
2403         *
2404     * <p>
2405     * <b>Definition:</b>
2406     * Text based reference range in an observation which may be used when a quantitative range is not appropriate for an observation.  An example would be a reference value of \&quot;Negative\&quot; or a list or table of 'normals'.
2407     * </p> 
2408         */
2409        public ReferenceRange setText( String theString) {
2410                myText = new StringDt(theString); 
2411                return this; 
2412        }
2413
2414 
2415
2416
2417        }
2418
2419
2420        /**
2421         * Block class for child element: <b>Observation.related</b> ()
2422         *
2423     * <p>
2424     * <b>Definition:</b>
2425     * A  reference to another resource (usually another Observation but could  also be a QuestionnaireAnswer) whose relationship is defined by the relationship type code.
2426     * </p> 
2427         */
2428        @Block()        
2429        public static class Related 
2430            extends  BaseIdentifiableElement        implements IResourceBlock {
2431        
2432        @Child(name="type", type=CodeDt.class, order=0, min=0, max=1, summary=false, modifier=false)    
2433        @Description(
2434                shortDefinition="",
2435                formalDefinition="A code specifying the kind of relationship that exists with the target resource"
2436        )
2437        private BoundCodeDt<ObservationRelationshipTypeEnum> myType;
2438        
2439        @Child(name="target", order=1, min=1, max=1, summary=false, modifier=false, type={
2440                ca.uhn.fhir.model.dstu2.resource.Observation.class,             ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse.class    })
2441        @Description(
2442                shortDefinition="",
2443                formalDefinition="A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation"
2444        )
2445        private ResourceReferenceDt myTarget;
2446        
2447
2448        @Override
2449        public boolean isEmpty() {
2450                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myTarget);
2451        }
2452        
2453        @Override
2454        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2455                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myTarget);
2456        }
2457
2458        /**
2459         * Gets the value(s) for <b>type</b> ().
2460         * creating it if it does
2461         * not exist. Will not return <code>null</code>.
2462         *
2463     * <p>
2464     * <b>Definition:</b>
2465     * A code specifying the kind of relationship that exists with the target resource
2466     * </p> 
2467         */
2468        public BoundCodeDt<ObservationRelationshipTypeEnum> getTypeElement() {  
2469                if (myType == null) {
2470                        myType = new BoundCodeDt<ObservationRelationshipTypeEnum>(ObservationRelationshipTypeEnum.VALUESET_BINDER);
2471                }
2472                return myType;
2473        }
2474
2475        
2476        /**
2477         * Gets the value(s) for <b>type</b> ().
2478         * creating it if it does
2479         * not exist. Will not return <code>null</code>.
2480         *
2481     * <p>
2482     * <b>Definition:</b>
2483     * A code specifying the kind of relationship that exists with the target resource
2484     * </p> 
2485         */
2486        public String getType() {  
2487                return getTypeElement().getValue();
2488        }
2489
2490        /**
2491         * Sets the value(s) for <b>type</b> ()
2492         *
2493     * <p>
2494     * <b>Definition:</b>
2495     * A code specifying the kind of relationship that exists with the target resource
2496     * </p> 
2497         */
2498        public Related setType(BoundCodeDt<ObservationRelationshipTypeEnum> theValue) {
2499                myType = theValue;
2500                return this;
2501        }
2502        
2503        
2504
2505        /**
2506         * Sets the value(s) for <b>type</b> ()
2507         *
2508     * <p>
2509     * <b>Definition:</b>
2510     * A code specifying the kind of relationship that exists with the target resource
2511     * </p> 
2512         */
2513        public Related setType(ObservationRelationshipTypeEnum theValue) {
2514                setType(new BoundCodeDt<ObservationRelationshipTypeEnum>(ObservationRelationshipTypeEnum.VALUESET_BINDER, theValue));
2515                
2516/*
2517                getTypeElement().setValueAsEnum(theValue);
2518*/
2519                return this;
2520        }
2521
2522  
2523        /**
2524         * Gets the value(s) for <b>target</b> ().
2525         * creating it if it does
2526         * not exist. Will not return <code>null</code>.
2527         *
2528     * <p>
2529     * <b>Definition:</b>
2530     * A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation
2531     * </p> 
2532         */
2533        public ResourceReferenceDt getTarget() {  
2534                if (myTarget == null) {
2535                        myTarget = new ResourceReferenceDt();
2536                }
2537                return myTarget;
2538        }
2539
2540        /**
2541         * Sets the value(s) for <b>target</b> ()
2542         *
2543     * <p>
2544     * <b>Definition:</b>
2545     * A reference to the observation or [[[QuestionnaireResponse]]] resource that is related to this observation
2546     * </p> 
2547         */
2548        public Related setTarget(ResourceReferenceDt theValue) {
2549                myTarget = theValue;
2550                return this;
2551        }
2552        
2553        
2554
2555  
2556
2557
2558        }
2559
2560
2561        /**
2562         * Block class for child element: <b>Observation.component</b> ()
2563         *
2564     * <p>
2565     * <b>Definition:</b>
2566     * Some observations have multiple component observations.  These component observations are expressed as separate code value pairs that share the same attributes.  Examples include systolic and diastolic component observations for blood pressure measurement and multiple component observations for genetics observations.
2567     * </p> 
2568         */
2569        @Block()        
2570        public static class Component 
2571            extends  BaseIdentifiableElement        implements IResourceBlock {
2572        
2573        @Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1, summary=true, modifier=false)  
2574        @Description(
2575                shortDefinition="what",
2576                formalDefinition="Describes what was observed. Sometimes this is called the observation \"code\""
2577        )
2578        private CodeableConceptDt myCode;
2579        
2580        @Child(name="value", order=1, min=0, max=1, summary=true, modifier=false, type={
2581                QuantityDt.class,               CodeableConceptDt.class,                StringDt.class,                 RangeDt.class,          RatioDt.class,          SampledDataDt.class,            AttachmentDt.class,             TimeDt.class,           DateTimeDt.class,               PeriodDt.class  })
2582        @Description(
2583                shortDefinition="",
2584                formalDefinition="The information determined as a result of making the observation, if the information has a simple value"
2585        )
2586        private IDatatype myValue;
2587        
2588        @Child(name="dataAbsentReason", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=false, modifier=false)     
2589        @Description(
2590                shortDefinition="",
2591                formalDefinition="Provides a reason why the expected value in the element Observation.value[x] is missing."
2592        )
2593        private CodeableConceptDt myDataAbsentReason;
2594        
2595        @Child(name="referenceRange", type=ReferenceRange.class, order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
2596        @Description(
2597                shortDefinition="",
2598                formalDefinition="Guidance on how to interpret the value by comparison to a normal or recommended range"
2599        )
2600        private java.util.List<ReferenceRange> myReferenceRange;
2601        
2602
2603        @Override
2604        public boolean isEmpty() {
2605                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myValue,  myDataAbsentReason,  myReferenceRange);
2606        }
2607        
2608        @Override
2609        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2610                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myValue, myDataAbsentReason, myReferenceRange);
2611        }
2612
2613        /**
2614         * Gets the value(s) for <b>code</b> (what).
2615         * creating it if it does
2616         * not exist. Will not return <code>null</code>.
2617         *
2618     * <p>
2619     * <b>Definition:</b>
2620     * Describes what was observed. Sometimes this is called the observation \&quot;code\&quot;
2621     * </p> 
2622         */
2623        public CodeableConceptDt getCode() {  
2624                if (myCode == null) {
2625                        myCode = new CodeableConceptDt();
2626                }
2627                return myCode;
2628        }
2629
2630        /**
2631         * Sets the value(s) for <b>code</b> (what)
2632         *
2633     * <p>
2634     * <b>Definition:</b>
2635     * Describes what was observed. Sometimes this is called the observation \&quot;code\&quot;
2636     * </p> 
2637         */
2638        public Component setCode(CodeableConceptDt theValue) {
2639                myCode = theValue;
2640                return this;
2641        }
2642        
2643        
2644
2645  
2646        /**
2647         * Gets the value(s) for <b>value[x]</b> ().
2648         * creating it if it does
2649         * not exist. Will not return <code>null</code>.
2650         *
2651     * <p>
2652     * <b>Definition:</b>
2653     * The information determined as a result of making the observation, if the information has a simple value
2654     * </p> 
2655         */
2656        public IDatatype getValue() {  
2657                return myValue;
2658        }
2659
2660        /**
2661         * Sets the value(s) for <b>value[x]</b> ()
2662         *
2663     * <p>
2664     * <b>Definition:</b>
2665     * The information determined as a result of making the observation, if the information has a simple value
2666     * </p> 
2667         */
2668        public Component setValue(IDatatype theValue) {
2669                myValue = theValue;
2670                return this;
2671        }
2672        
2673        
2674
2675  
2676        /**
2677         * Gets the value(s) for <b>dataAbsentReason</b> ().
2678         * creating it if it does
2679         * not exist. Will not return <code>null</code>.
2680         *
2681     * <p>
2682     * <b>Definition:</b>
2683     * Provides a reason why the expected value in the element Observation.value[x] is missing.
2684     * </p> 
2685         */
2686        public CodeableConceptDt getDataAbsentReason() {  
2687                if (myDataAbsentReason == null) {
2688                        myDataAbsentReason = new CodeableConceptDt();
2689                }
2690                return myDataAbsentReason;
2691        }
2692
2693        /**
2694         * Sets the value(s) for <b>dataAbsentReason</b> ()
2695         *
2696     * <p>
2697     * <b>Definition:</b>
2698     * Provides a reason why the expected value in the element Observation.value[x] is missing.
2699     * </p> 
2700         */
2701        public Component setDataAbsentReason(CodeableConceptDt theValue) {
2702                myDataAbsentReason = theValue;
2703                return this;
2704        }
2705        
2706        
2707
2708  
2709        /**
2710         * Gets the value(s) for <b>referenceRange</b> ().
2711         * creating it if it does
2712         * not exist. Will not return <code>null</code>.
2713         *
2714     * <p>
2715     * <b>Definition:</b>
2716     * Guidance on how to interpret the value by comparison to a normal or recommended range
2717     * </p> 
2718         */
2719        public java.util.List<ReferenceRange> getReferenceRange() {  
2720                if (myReferenceRange == null) {
2721                        myReferenceRange = new java.util.ArrayList<ReferenceRange>();
2722                }
2723                return myReferenceRange;
2724        }
2725
2726        /**
2727         * Sets the value(s) for <b>referenceRange</b> ()
2728         *
2729     * <p>
2730     * <b>Definition:</b>
2731     * Guidance on how to interpret the value by comparison to a normal or recommended range
2732     * </p> 
2733         */
2734        public Component setReferenceRange(java.util.List<ReferenceRange> theValue) {
2735                myReferenceRange = theValue;
2736                return this;
2737        }
2738        
2739        
2740
2741        /**
2742         * Adds and returns a new value for <b>referenceRange</b> ()
2743         *
2744     * <p>
2745     * <b>Definition:</b>
2746     * Guidance on how to interpret the value by comparison to a normal or recommended range
2747     * </p> 
2748         */
2749        public ReferenceRange addReferenceRange() {
2750                ReferenceRange newType = new ReferenceRange();
2751                getReferenceRange().add(newType);
2752                return newType; 
2753        }
2754
2755        /**
2756         * Adds a given new value for <b>referenceRange</b> ()
2757         *
2758         * <p>
2759         * <b>Definition:</b>
2760         * Guidance on how to interpret the value by comparison to a normal or recommended range
2761         * </p>
2762         * @param theValue The referenceRange to add (must not be <code>null</code>)
2763         */
2764        public Component addReferenceRange(ReferenceRange theValue) {
2765                if (theValue == null) {
2766                        throw new NullPointerException("theValue must not be null");
2767                }
2768                getReferenceRange().add(theValue);
2769                return this;
2770        }
2771
2772        /**
2773         * Gets the first repetition for <b>referenceRange</b> (),
2774         * creating it if it does not already exist.
2775         *
2776     * <p>
2777     * <b>Definition:</b>
2778     * Guidance on how to interpret the value by comparison to a normal or recommended range
2779     * </p> 
2780         */
2781        public ReferenceRange getReferenceRangeFirstRep() {
2782                if (getReferenceRange().isEmpty()) {
2783                        return addReferenceRange();
2784                }
2785                return getReferenceRange().get(0); 
2786        }
2787  
2788
2789
2790        }
2791
2792
2793
2794
2795    @Override
2796    public String getResourceName() {
2797        return "Observation";
2798    }
2799    
2800    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2801        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2802    }
2803
2804
2805}