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