001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>AllergyIntolerance</b> Resource
320 * ()
321 *
322 * <p>
323 * <b>Definition:</b>
324 * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * To record a clinical assessment of a propensity, or potential risk to an individual, of an adverse reaction upon future exposure to the specified substance, or class of substance.
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/AllergyIntolerance">http://hl7.org/fhir/profiles/AllergyIntolerance</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="AllergyIntolerance", profile="http://hl7.org/fhir/profiles/AllergyIntolerance", id="allergyintolerance")
339public class AllergyIntolerance extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>substance</b>
344         * <p>
345         * Description: <b></b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>AllergyIntolerance.substance | AllergyIntolerance.reaction.substance</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance | AllergyIntolerance.reaction.substance", description="", type="token"  )
351        public static final String SP_SUBSTANCE = "substance";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>substance</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>AllergyIntolerance.substance | AllergyIntolerance.reaction.substance</b><br>
359         * </p>
360         */
361        public static final TokenClientParam SUBSTANCE = new TokenClientParam(SP_SUBSTANCE);
362
363        /**
364         * Search parameter constant for <b>status</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>token</b><br>
368         * Path: <b>AllergyIntolerance.status</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="", type="token"  )
372        public static final String SP_STATUS = "status";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>status</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>token</b><br>
379         * Path: <b>AllergyIntolerance.status</b><br>
380         * </p>
381         */
382        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
383
384        /**
385         * Search parameter constant for <b>criticality</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>AllergyIntolerance.criticality</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="", type="token"  )
393        public static final String SP_CRITICALITY = "criticality";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>criticality</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>AllergyIntolerance.criticality</b><br>
401         * </p>
402         */
403        public static final TokenClientParam CRITICALITY = new TokenClientParam(SP_CRITICALITY);
404
405        /**
406         * Search parameter constant for <b>type</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>token</b><br>
410         * Path: <b>AllergyIntolerance.type</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="", type="token"  )
414        public static final String SP_TYPE = "type";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>type</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>token</b><br>
421         * Path: <b>AllergyIntolerance.type</b><br>
422         * </p>
423         */
424        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
425
426        /**
427         * Search parameter constant for <b>category</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>token</b><br>
431         * Path: <b>AllergyIntolerance.category</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="", type="token"  )
435        public static final String SP_CATEGORY = "category";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>category</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>AllergyIntolerance.category</b><br>
443         * </p>
444         */
445        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
446
447        /**
448         * Search parameter constant for <b>last-date</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>date</b><br>
452         * Path: <b>AllergyIntolerance.lastOccurence</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="", type="date"  )
456        public static final String SP_LAST_DATE = "last-date";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>last-date</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>date</b><br>
463         * Path: <b>AllergyIntolerance.lastOccurence</b><br>
464         * </p>
465         */
466        public static final DateClientParam LAST_DATE = new DateClientParam(SP_LAST_DATE);
467
468        /**
469         * Search parameter constant for <b>manifestation</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>AllergyIntolerance.reaction.manifestation</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="manifestation", path="AllergyIntolerance.reaction.manifestation", description="", type="token"  )
477        public static final String SP_MANIFESTATION = "manifestation";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>manifestation</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>AllergyIntolerance.reaction.manifestation</b><br>
485         * </p>
486         */
487        public static final TokenClientParam MANIFESTATION = new TokenClientParam(SP_MANIFESTATION);
488
489        /**
490         * Search parameter constant for <b>onset</b>
491         * <p>
492         * Description: <b></b><br>
493         * Type: <b>date</b><br>
494         * Path: <b>AllergyIntolerance.reaction.onset</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="onset", path="AllergyIntolerance.reaction.onset", description="", type="date"  )
498        public static final String SP_ONSET = "onset";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>onset</b>
502         * <p>
503         * Description: <b></b><br>
504         * Type: <b>date</b><br>
505         * Path: <b>AllergyIntolerance.reaction.onset</b><br>
506         * </p>
507         */
508        public static final DateClientParam ONSET = new DateClientParam(SP_ONSET);
509
510        /**
511         * Search parameter constant for <b>severity</b>
512         * <p>
513         * Description: <b></b><br>
514         * Type: <b>token</b><br>
515         * Path: <b>AllergyIntolerance.reaction.severity</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="severity", path="AllergyIntolerance.reaction.severity", description="", type="token"  )
519        public static final String SP_SEVERITY = "severity";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>severity</b>
523         * <p>
524         * Description: <b></b><br>
525         * Type: <b>token</b><br>
526         * Path: <b>AllergyIntolerance.reaction.severity</b><br>
527         * </p>
528         */
529        public static final TokenClientParam SEVERITY = new TokenClientParam(SP_SEVERITY);
530
531        /**
532         * Search parameter constant for <b>route</b>
533         * <p>
534         * Description: <b></b><br>
535         * Type: <b>token</b><br>
536         * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="route", path="AllergyIntolerance.reaction.exposureRoute", description="", type="token"  )
540        public static final String SP_ROUTE = "route";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>route</b>
544         * <p>
545         * Description: <b></b><br>
546         * Type: <b>token</b><br>
547         * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
548         * </p>
549         */
550        public static final TokenClientParam ROUTE = new TokenClientParam(SP_ROUTE);
551
552        /**
553         * Search parameter constant for <b>identifier</b>
554         * <p>
555         * Description: <b></b><br>
556         * Type: <b>token</b><br>
557         * Path: <b>AllergyIntolerance.identifier</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="", type="token"  )
561        public static final String SP_IDENTIFIER = "identifier";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
565         * <p>
566         * Description: <b></b><br>
567         * Type: <b>token</b><br>
568         * Path: <b>AllergyIntolerance.identifier</b><br>
569         * </p>
570         */
571        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
572
573        /**
574         * Search parameter constant for <b>date</b>
575         * <p>
576         * Description: <b></b><br>
577         * Type: <b>date</b><br>
578         * Path: <b>AllergyIntolerance.recordedDate</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="", type="date"  )
582        public static final String SP_DATE = "date";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>date</b>
586         * <p>
587         * Description: <b></b><br>
588         * Type: <b>date</b><br>
589         * Path: <b>AllergyIntolerance.recordedDate</b><br>
590         * </p>
591         */
592        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
593
594        /**
595         * Search parameter constant for <b>recorder</b>
596         * <p>
597         * Description: <b></b><br>
598         * Type: <b>reference</b><br>
599         * Path: <b>AllergyIntolerance.recorder</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="", type="reference"  )
603        public static final String SP_RECORDER = "recorder";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>recorder</b>
607         * <p>
608         * Description: <b></b><br>
609         * Type: <b>reference</b><br>
610         * Path: <b>AllergyIntolerance.recorder</b><br>
611         * </p>
612         */
613        public static final ReferenceClientParam RECORDER = new ReferenceClientParam(SP_RECORDER);
614
615        /**
616         * Search parameter constant for <b>patient</b>
617         * <p>
618         * Description: <b></b><br>
619         * Type: <b>reference</b><br>
620         * Path: <b>AllergyIntolerance.patient</b><br>
621         * </p>
622         */
623        @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="", type="reference"  )
624        public static final String SP_PATIENT = "patient";
625
626        /**
627         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
628         * <p>
629         * Description: <b></b><br>
630         * Type: <b>reference</b><br>
631         * Path: <b>AllergyIntolerance.patient</b><br>
632         * </p>
633         */
634        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
635
636        /**
637         * Search parameter constant for <b>reporter</b>
638         * <p>
639         * Description: <b></b><br>
640         * Type: <b>reference</b><br>
641         * Path: <b>AllergyIntolerance.reporter</b><br>
642         * </p>
643         */
644        @SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="", type="reference"  )
645        public static final String SP_REPORTER = "reporter";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>reporter</b>
649         * <p>
650         * Description: <b></b><br>
651         * Type: <b>reference</b><br>
652         * Path: <b>AllergyIntolerance.reporter</b><br>
653         * </p>
654         */
655        public static final ReferenceClientParam REPORTER = new ReferenceClientParam(SP_REPORTER);
656
657
658        /**
659         * Constant for fluent queries to be used to add include statements. Specifies
660         * the path value of "<b>AllergyIntolerance:patient</b>".
661         */
662        public static final Include INCLUDE_PATIENT = new Include("AllergyIntolerance:patient");
663
664        /**
665         * Constant for fluent queries to be used to add include statements. Specifies
666         * the path value of "<b>AllergyIntolerance:recorder</b>".
667         */
668        public static final Include INCLUDE_RECORDER = new Include("AllergyIntolerance:recorder");
669
670        /**
671         * Constant for fluent queries to be used to add include statements. Specifies
672         * the path value of "<b>AllergyIntolerance:reporter</b>".
673         */
674        public static final Include INCLUDE_REPORTER = new Include("AllergyIntolerance:reporter");
675
676
677        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
678        @Description(
679                shortDefinition="",
680                formalDefinition="This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
681        )
682        private java.util.List<IdentifierDt> myIdentifier;
683        
684        @Child(name="onset", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
685        @Description(
686                shortDefinition="",
687                formalDefinition="Record of the date and/or time of the onset of the Allergy or Intolerance"
688        )
689        private DateTimeDt myOnset;
690        
691        @Child(name="recordedDate", type=DateTimeDt.class, order=2, min=0, max=1, summary=true, modifier=false) 
692        @Description(
693                shortDefinition="",
694                formalDefinition="Date when the sensitivity was recorded"
695        )
696        private DateTimeDt myRecordedDate;
697        
698        @Child(name="recorder", order=3, min=0, max=1, summary=true, modifier=false, type={
699                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class  })
700        @Description(
701                shortDefinition="",
702                formalDefinition="Individual who recorded the record and takes responsibility for its conten"
703        )
704        private ResourceReferenceDt myRecorder;
705        
706        @Child(name="patient", order=4, min=1, max=1, summary=true, modifier=false, type={
707                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
708        @Description(
709                shortDefinition="",
710                formalDefinition="The patient who has the allergy or intolerance"
711        )
712        private ResourceReferenceDt myPatient;
713        
714        @Child(name="reporter", order=5, min=0, max=1, summary=true, modifier=false, type={
715                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class,           ca.uhn.fhir.model.dstu2.resource.Practitioner.class     })
716        @Description(
717                shortDefinition="",
718                formalDefinition="The source of the information about the allergy that is recorded"
719        )
720        private ResourceReferenceDt myReporter;
721        
722        @Child(name="substance", type=CodeableConceptDt.class, order=6, min=1, max=1, summary=true, modifier=false)     
723        @Description(
724                shortDefinition="",
725                formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk"
726        )
727        private CodeableConceptDt mySubstance;
728        
729        @Child(name="status", type=CodeDt.class, order=7, min=0, max=1, summary=true, modifier=true)    
730        @Description(
731                shortDefinition="",
732                formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance"
733        )
734        private BoundCodeDt<AllergyIntoleranceStatusEnum> myStatus;
735        
736        @Child(name="criticality", type=CodeDt.class, order=8, min=0, max=1, summary=true, modifier=false)      
737        @Description(
738                shortDefinition="",
739                formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance"
740        )
741        private BoundCodeDt<AllergyIntoleranceCriticalityEnum> myCriticality;
742        
743        @Child(name="type", type=CodeDt.class, order=9, min=0, max=1, summary=true, modifier=false)     
744        @Description(
745                shortDefinition="",
746                formalDefinition="Identification of the underlying physiological mechanism for the reaction risk."
747        )
748        private BoundCodeDt<AllergyIntoleranceTypeEnum> myType;
749        
750        @Child(name="category", type=CodeDt.class, order=10, min=0, max=1, summary=true, modifier=false)        
751        @Description(
752                shortDefinition="",
753                formalDefinition="Category of the identified Substance"
754        )
755        private BoundCodeDt<AllergyIntoleranceCategoryEnum> myCategory;
756        
757        @Child(name="lastOccurence", type=DateTimeDt.class, order=11, min=0, max=1, summary=true, modifier=false)       
758        @Description(
759                shortDefinition="",
760                formalDefinition="Represents the date and/or time of the last known occurrence of a reaction event"
761        )
762        private DateTimeDt myLastOccurence;
763        
764        @Child(name="note", type=AnnotationDt.class, order=12, min=0, max=1, summary=false, modifier=false)     
765        @Description(
766                shortDefinition="",
767                formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields."
768        )
769        private AnnotationDt myNote;
770        
771        @Child(name="reaction", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
772        @Description(
773                shortDefinition="",
774                formalDefinition="Details about each adverse reaction event linked to exposure to the identified Substance"
775        )
776        private java.util.List<Reaction> myReaction;
777        
778
779        @Override
780        public boolean isEmpty() {
781                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myOnset,  myRecordedDate,  myRecorder,  myPatient,  myReporter,  mySubstance,  myStatus,  myCriticality,  myType,  myCategory,  myLastOccurence,  myNote,  myReaction);
782        }
783        
784        @Override
785        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
786                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myOnset, myRecordedDate, myRecorder, myPatient, myReporter, mySubstance, myStatus, myCriticality, myType, myCategory, myLastOccurence, myNote, myReaction);
787        }
788
789        /**
790         * Gets the value(s) for <b>identifier</b> ().
791         * creating it if it does
792         * not exist. Will not return <code>null</code>.
793         *
794     * <p>
795     * <b>Definition:</b>
796     * This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
797     * </p> 
798         */
799        public java.util.List<IdentifierDt> getIdentifier() {  
800                if (myIdentifier == null) {
801                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
802                }
803                return myIdentifier;
804        }
805
806        /**
807         * Sets the value(s) for <b>identifier</b> ()
808         *
809     * <p>
810     * <b>Definition:</b>
811     * This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
812     * </p> 
813         */
814        public AllergyIntolerance setIdentifier(java.util.List<IdentifierDt> theValue) {
815                myIdentifier = theValue;
816                return this;
817        }
818        
819        
820
821        /**
822         * Adds and returns a new value for <b>identifier</b> ()
823         *
824     * <p>
825     * <b>Definition:</b>
826     * This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
827     * </p> 
828         */
829        public IdentifierDt addIdentifier() {
830                IdentifierDt newType = new IdentifierDt();
831                getIdentifier().add(newType);
832                return newType; 
833        }
834
835        /**
836         * Adds a given new value for <b>identifier</b> ()
837         *
838         * <p>
839         * <b>Definition:</b>
840         * This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
841         * </p>
842         * @param theValue The identifier to add (must not be <code>null</code>)
843         */
844        public AllergyIntolerance addIdentifier(IdentifierDt theValue) {
845                if (theValue == null) {
846                        throw new NullPointerException("theValue must not be null");
847                }
848                getIdentifier().add(theValue);
849                return this;
850        }
851
852        /**
853         * Gets the first repetition for <b>identifier</b> (),
854         * creating it if it does not already exist.
855         *
856     * <p>
857     * <b>Definition:</b>
858     * This records identifiers associated with this allergy/intolerance concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
859     * </p> 
860         */
861        public IdentifierDt getIdentifierFirstRep() {
862                if (getIdentifier().isEmpty()) {
863                        return addIdentifier();
864                }
865                return getIdentifier().get(0); 
866        }
867  
868        /**
869         * Gets the value(s) for <b>onset</b> ().
870         * creating it if it does
871         * not exist. Will not return <code>null</code>.
872         *
873     * <p>
874     * <b>Definition:</b>
875     * Record of the date and/or time of the onset of the Allergy or Intolerance
876     * </p> 
877         */
878        public DateTimeDt getOnsetElement() {  
879                if (myOnset == null) {
880                        myOnset = new DateTimeDt();
881                }
882                return myOnset;
883        }
884
885        
886        /**
887         * Gets the value(s) for <b>onset</b> ().
888         * creating it if it does
889         * not exist. Will not return <code>null</code>.
890         *
891     * <p>
892     * <b>Definition:</b>
893     * Record of the date and/or time of the onset of the Allergy or Intolerance
894     * </p> 
895         */
896        public Date getOnset() {  
897                return getOnsetElement().getValue();
898        }
899
900        /**
901         * Sets the value(s) for <b>onset</b> ()
902         *
903     * <p>
904     * <b>Definition:</b>
905     * Record of the date and/or time of the onset of the Allergy or Intolerance
906     * </p> 
907         */
908        public AllergyIntolerance setOnset(DateTimeDt theValue) {
909                myOnset = theValue;
910                return this;
911        }
912        
913        
914
915        /**
916         * Sets the value for <b>onset</b> ()
917         *
918     * <p>
919     * <b>Definition:</b>
920     * Record of the date and/or time of the onset of the Allergy or Intolerance
921     * </p> 
922         */
923        public AllergyIntolerance setOnset( Date theDate,  TemporalPrecisionEnum thePrecision) {
924                myOnset = new DateTimeDt(theDate, thePrecision); 
925                return this; 
926        }
927
928        /**
929         * Sets the value for <b>onset</b> ()
930         *
931     * <p>
932     * <b>Definition:</b>
933     * Record of the date and/or time of the onset of the Allergy or Intolerance
934     * </p> 
935         */
936        public AllergyIntolerance setOnsetWithSecondsPrecision( Date theDate) {
937                myOnset = new DateTimeDt(theDate); 
938                return this; 
939        }
940
941 
942        /**
943         * Gets the value(s) for <b>recordedDate</b> ().
944         * creating it if it does
945         * not exist. Will not return <code>null</code>.
946         *
947     * <p>
948     * <b>Definition:</b>
949     * Date when the sensitivity was recorded
950     * </p> 
951         */
952        public DateTimeDt getRecordedDateElement() {  
953                if (myRecordedDate == null) {
954                        myRecordedDate = new DateTimeDt();
955                }
956                return myRecordedDate;
957        }
958
959        
960        /**
961         * Gets the value(s) for <b>recordedDate</b> ().
962         * creating it if it does
963         * not exist. Will not return <code>null</code>.
964         *
965     * <p>
966     * <b>Definition:</b>
967     * Date when the sensitivity was recorded
968     * </p> 
969         */
970        public Date getRecordedDate() {  
971                return getRecordedDateElement().getValue();
972        }
973
974        /**
975         * Sets the value(s) for <b>recordedDate</b> ()
976         *
977     * <p>
978     * <b>Definition:</b>
979     * Date when the sensitivity was recorded
980     * </p> 
981         */
982        public AllergyIntolerance setRecordedDate(DateTimeDt theValue) {
983                myRecordedDate = theValue;
984                return this;
985        }
986        
987        
988
989        /**
990         * Sets the value for <b>recordedDate</b> ()
991         *
992     * <p>
993     * <b>Definition:</b>
994     * Date when the sensitivity was recorded
995     * </p> 
996         */
997        public AllergyIntolerance setRecordedDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
998                myRecordedDate = new DateTimeDt(theDate, thePrecision); 
999                return this; 
1000        }
1001
1002        /**
1003         * Sets the value for <b>recordedDate</b> ()
1004         *
1005     * <p>
1006     * <b>Definition:</b>
1007     * Date when the sensitivity was recorded
1008     * </p> 
1009         */
1010        public AllergyIntolerance setRecordedDateWithSecondsPrecision( Date theDate) {
1011                myRecordedDate = new DateTimeDt(theDate); 
1012                return this; 
1013        }
1014
1015 
1016        /**
1017         * Gets the value(s) for <b>recorder</b> ().
1018         * creating it if it does
1019         * not exist. Will not return <code>null</code>.
1020         *
1021     * <p>
1022     * <b>Definition:</b>
1023     * Individual who recorded the record and takes responsibility for its conten
1024     * </p> 
1025         */
1026        public ResourceReferenceDt getRecorder() {  
1027                if (myRecorder == null) {
1028                        myRecorder = new ResourceReferenceDt();
1029                }
1030                return myRecorder;
1031        }
1032
1033        /**
1034         * Sets the value(s) for <b>recorder</b> ()
1035         *
1036     * <p>
1037     * <b>Definition:</b>
1038     * Individual who recorded the record and takes responsibility for its conten
1039     * </p> 
1040         */
1041        public AllergyIntolerance setRecorder(ResourceReferenceDt theValue) {
1042                myRecorder = theValue;
1043                return this;
1044        }
1045        
1046        
1047
1048  
1049        /**
1050         * Gets the value(s) for <b>patient</b> ().
1051         * creating it if it does
1052         * not exist. Will not return <code>null</code>.
1053         *
1054     * <p>
1055     * <b>Definition:</b>
1056     * The patient who has the allergy or intolerance
1057     * </p> 
1058         */
1059        public ResourceReferenceDt getPatient() {  
1060                if (myPatient == null) {
1061                        myPatient = new ResourceReferenceDt();
1062                }
1063                return myPatient;
1064        }
1065
1066        /**
1067         * Sets the value(s) for <b>patient</b> ()
1068         *
1069     * <p>
1070     * <b>Definition:</b>
1071     * The patient who has the allergy or intolerance
1072     * </p> 
1073         */
1074        public AllergyIntolerance setPatient(ResourceReferenceDt theValue) {
1075                myPatient = theValue;
1076                return this;
1077        }
1078        
1079        
1080
1081  
1082        /**
1083         * Gets the value(s) for <b>reporter</b> ().
1084         * creating it if it does
1085         * not exist. Will not return <code>null</code>.
1086         *
1087     * <p>
1088     * <b>Definition:</b>
1089     * The source of the information about the allergy that is recorded
1090     * </p> 
1091         */
1092        public ResourceReferenceDt getReporter() {  
1093                if (myReporter == null) {
1094                        myReporter = new ResourceReferenceDt();
1095                }
1096                return myReporter;
1097        }
1098
1099        /**
1100         * Sets the value(s) for <b>reporter</b> ()
1101         *
1102     * <p>
1103     * <b>Definition:</b>
1104     * The source of the information about the allergy that is recorded
1105     * </p> 
1106         */
1107        public AllergyIntolerance setReporter(ResourceReferenceDt theValue) {
1108                myReporter = theValue;
1109                return this;
1110        }
1111        
1112        
1113
1114  
1115        /**
1116         * Gets the value(s) for <b>substance</b> ().
1117         * creating it if it does
1118         * not exist. Will not return <code>null</code>.
1119         *
1120     * <p>
1121     * <b>Definition:</b>
1122     * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk
1123     * </p> 
1124         */
1125        public CodeableConceptDt getSubstance() {  
1126                if (mySubstance == null) {
1127                        mySubstance = new CodeableConceptDt();
1128                }
1129                return mySubstance;
1130        }
1131
1132        /**
1133         * Sets the value(s) for <b>substance</b> ()
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk
1138     * </p> 
1139         */
1140        public AllergyIntolerance setSubstance(CodeableConceptDt theValue) {
1141                mySubstance = theValue;
1142                return this;
1143        }
1144        
1145        
1146
1147  
1148        /**
1149         * Gets the value(s) for <b>status</b> ().
1150         * creating it if it does
1151         * not exist. Will not return <code>null</code>.
1152         *
1153     * <p>
1154     * <b>Definition:</b>
1155     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1156     * </p> 
1157         */
1158        public BoundCodeDt<AllergyIntoleranceStatusEnum> getStatusElement() {  
1159                if (myStatus == null) {
1160                        myStatus = new BoundCodeDt<AllergyIntoleranceStatusEnum>(AllergyIntoleranceStatusEnum.VALUESET_BINDER);
1161                }
1162                return myStatus;
1163        }
1164
1165        
1166        /**
1167         * Gets the value(s) for <b>status</b> ().
1168         * creating it if it does
1169         * not exist. Will not return <code>null</code>.
1170         *
1171     * <p>
1172     * <b>Definition:</b>
1173     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1174     * </p> 
1175         */
1176        public String getStatus() {  
1177                return getStatusElement().getValue();
1178        }
1179
1180        /**
1181         * Sets the value(s) for <b>status</b> ()
1182         *
1183     * <p>
1184     * <b>Definition:</b>
1185     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1186     * </p> 
1187         */
1188        public AllergyIntolerance setStatus(BoundCodeDt<AllergyIntoleranceStatusEnum> theValue) {
1189                myStatus = theValue;
1190                return this;
1191        }
1192        
1193        
1194
1195        /**
1196         * Sets the value(s) for <b>status</b> ()
1197         *
1198     * <p>
1199     * <b>Definition:</b>
1200     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1201     * </p> 
1202         */
1203        public AllergyIntolerance setStatus(AllergyIntoleranceStatusEnum theValue) {
1204                setStatus(new BoundCodeDt<AllergyIntoleranceStatusEnum>(AllergyIntoleranceStatusEnum.VALUESET_BINDER, theValue));
1205                
1206/*
1207                getStatusElement().setValueAsEnum(theValue);
1208*/
1209                return this;
1210        }
1211
1212  
1213        /**
1214         * Gets the value(s) for <b>criticality</b> ().
1215         * creating it if it does
1216         * not exist. Will not return <code>null</code>.
1217         *
1218     * <p>
1219     * <b>Definition:</b>
1220     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1221     * </p> 
1222         */
1223        public BoundCodeDt<AllergyIntoleranceCriticalityEnum> getCriticalityElement() {  
1224                if (myCriticality == null) {
1225                        myCriticality = new BoundCodeDt<AllergyIntoleranceCriticalityEnum>(AllergyIntoleranceCriticalityEnum.VALUESET_BINDER);
1226                }
1227                return myCriticality;
1228        }
1229
1230        
1231        /**
1232         * Gets the value(s) for <b>criticality</b> ().
1233         * creating it if it does
1234         * not exist. Will not return <code>null</code>.
1235         *
1236     * <p>
1237     * <b>Definition:</b>
1238     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1239     * </p> 
1240         */
1241        public String getCriticality() {  
1242                return getCriticalityElement().getValue();
1243        }
1244
1245        /**
1246         * Sets the value(s) for <b>criticality</b> ()
1247         *
1248     * <p>
1249     * <b>Definition:</b>
1250     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1251     * </p> 
1252         */
1253        public AllergyIntolerance setCriticality(BoundCodeDt<AllergyIntoleranceCriticalityEnum> theValue) {
1254                myCriticality = theValue;
1255                return this;
1256        }
1257        
1258        
1259
1260        /**
1261         * Sets the value(s) for <b>criticality</b> ()
1262         *
1263     * <p>
1264     * <b>Definition:</b>
1265     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1266     * </p> 
1267         */
1268        public AllergyIntolerance setCriticality(AllergyIntoleranceCriticalityEnum theValue) {
1269                setCriticality(new BoundCodeDt<AllergyIntoleranceCriticalityEnum>(AllergyIntoleranceCriticalityEnum.VALUESET_BINDER, theValue));
1270                
1271/*
1272                getCriticalityElement().setValueAsEnum(theValue);
1273*/
1274                return this;
1275        }
1276
1277  
1278        /**
1279         * Gets the value(s) for <b>type</b> ().
1280         * creating it if it does
1281         * not exist. Will not return <code>null</code>.
1282         *
1283     * <p>
1284     * <b>Definition:</b>
1285     * Identification of the underlying physiological mechanism for the reaction risk.
1286     * </p> 
1287         */
1288        public BoundCodeDt<AllergyIntoleranceTypeEnum> getTypeElement() {  
1289                if (myType == null) {
1290                        myType = new BoundCodeDt<AllergyIntoleranceTypeEnum>(AllergyIntoleranceTypeEnum.VALUESET_BINDER);
1291                }
1292                return myType;
1293        }
1294
1295        
1296        /**
1297         * Gets the value(s) for <b>type</b> ().
1298         * creating it if it does
1299         * not exist. Will not return <code>null</code>.
1300         *
1301     * <p>
1302     * <b>Definition:</b>
1303     * Identification of the underlying physiological mechanism for the reaction risk.
1304     * </p> 
1305         */
1306        public String getType() {  
1307                return getTypeElement().getValue();
1308        }
1309
1310        /**
1311         * Sets the value(s) for <b>type</b> ()
1312         *
1313     * <p>
1314     * <b>Definition:</b>
1315     * Identification of the underlying physiological mechanism for the reaction risk.
1316     * </p> 
1317         */
1318        public AllergyIntolerance setType(BoundCodeDt<AllergyIntoleranceTypeEnum> theValue) {
1319                myType = theValue;
1320                return this;
1321        }
1322        
1323        
1324
1325        /**
1326         * Sets the value(s) for <b>type</b> ()
1327         *
1328     * <p>
1329     * <b>Definition:</b>
1330     * Identification of the underlying physiological mechanism for the reaction risk.
1331     * </p> 
1332         */
1333        public AllergyIntolerance setType(AllergyIntoleranceTypeEnum theValue) {
1334                setType(new BoundCodeDt<AllergyIntoleranceTypeEnum>(AllergyIntoleranceTypeEnum.VALUESET_BINDER, theValue));
1335                
1336/*
1337                getTypeElement().setValueAsEnum(theValue);
1338*/
1339                return this;
1340        }
1341
1342  
1343        /**
1344         * Gets the value(s) for <b>category</b> ().
1345         * creating it if it does
1346         * not exist. Will not return <code>null</code>.
1347         *
1348     * <p>
1349     * <b>Definition:</b>
1350     * Category of the identified Substance
1351     * </p> 
1352         */
1353        public BoundCodeDt<AllergyIntoleranceCategoryEnum> getCategoryElement() {  
1354                if (myCategory == null) {
1355                        myCategory = new BoundCodeDt<AllergyIntoleranceCategoryEnum>(AllergyIntoleranceCategoryEnum.VALUESET_BINDER);
1356                }
1357                return myCategory;
1358        }
1359
1360        
1361        /**
1362         * Gets the value(s) for <b>category</b> ().
1363         * creating it if it does
1364         * not exist. Will not return <code>null</code>.
1365         *
1366     * <p>
1367     * <b>Definition:</b>
1368     * Category of the identified Substance
1369     * </p> 
1370         */
1371        public String getCategory() {  
1372                return getCategoryElement().getValue();
1373        }
1374
1375        /**
1376         * Sets the value(s) for <b>category</b> ()
1377         *
1378     * <p>
1379     * <b>Definition:</b>
1380     * Category of the identified Substance
1381     * </p> 
1382         */
1383        public AllergyIntolerance setCategory(BoundCodeDt<AllergyIntoleranceCategoryEnum> theValue) {
1384                myCategory = theValue;
1385                return this;
1386        }
1387        
1388        
1389
1390        /**
1391         * Sets the value(s) for <b>category</b> ()
1392         *
1393     * <p>
1394     * <b>Definition:</b>
1395     * Category of the identified Substance
1396     * </p> 
1397         */
1398        public AllergyIntolerance setCategory(AllergyIntoleranceCategoryEnum theValue) {
1399                setCategory(new BoundCodeDt<AllergyIntoleranceCategoryEnum>(AllergyIntoleranceCategoryEnum.VALUESET_BINDER, theValue));
1400                
1401/*
1402                getCategoryElement().setValueAsEnum(theValue);
1403*/
1404                return this;
1405        }
1406
1407  
1408        /**
1409         * Gets the value(s) for <b>lastOccurence</b> ().
1410         * creating it if it does
1411         * not exist. Will not return <code>null</code>.
1412         *
1413     * <p>
1414     * <b>Definition:</b>
1415     * Represents the date and/or time of the last known occurrence of a reaction event
1416     * </p> 
1417         */
1418        public DateTimeDt getLastOccurenceElement() {  
1419                if (myLastOccurence == null) {
1420                        myLastOccurence = new DateTimeDt();
1421                }
1422                return myLastOccurence;
1423        }
1424
1425        
1426        /**
1427         * Gets the value(s) for <b>lastOccurence</b> ().
1428         * creating it if it does
1429         * not exist. Will not return <code>null</code>.
1430         *
1431     * <p>
1432     * <b>Definition:</b>
1433     * Represents the date and/or time of the last known occurrence of a reaction event
1434     * </p> 
1435         */
1436        public Date getLastOccurence() {  
1437                return getLastOccurenceElement().getValue();
1438        }
1439
1440        /**
1441         * Sets the value(s) for <b>lastOccurence</b> ()
1442         *
1443     * <p>
1444     * <b>Definition:</b>
1445     * Represents the date and/or time of the last known occurrence of a reaction event
1446     * </p> 
1447         */
1448        public AllergyIntolerance setLastOccurence(DateTimeDt theValue) {
1449                myLastOccurence = theValue;
1450                return this;
1451        }
1452        
1453        
1454
1455        /**
1456         * Sets the value for <b>lastOccurence</b> ()
1457         *
1458     * <p>
1459     * <b>Definition:</b>
1460     * Represents the date and/or time of the last known occurrence of a reaction event
1461     * </p> 
1462         */
1463        public AllergyIntolerance setLastOccurence( Date theDate,  TemporalPrecisionEnum thePrecision) {
1464                myLastOccurence = new DateTimeDt(theDate, thePrecision); 
1465                return this; 
1466        }
1467
1468        /**
1469         * Sets the value for <b>lastOccurence</b> ()
1470         *
1471     * <p>
1472     * <b>Definition:</b>
1473     * Represents the date and/or time of the last known occurrence of a reaction event
1474     * </p> 
1475         */
1476        public AllergyIntolerance setLastOccurenceWithSecondsPrecision( Date theDate) {
1477                myLastOccurence = new DateTimeDt(theDate); 
1478                return this; 
1479        }
1480
1481 
1482        /**
1483         * Gets the value(s) for <b>note</b> ().
1484         * creating it if it does
1485         * not exist. Will not return <code>null</code>.
1486         *
1487     * <p>
1488     * <b>Definition:</b>
1489     * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
1490     * </p> 
1491         */
1492        public AnnotationDt getNote() {  
1493                if (myNote == null) {
1494                        myNote = new AnnotationDt();
1495                }
1496                return myNote;
1497        }
1498
1499        /**
1500         * Sets the value(s) for <b>note</b> ()
1501         *
1502     * <p>
1503     * <b>Definition:</b>
1504     * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
1505     * </p> 
1506         */
1507        public AllergyIntolerance setNote(AnnotationDt theValue) {
1508                myNote = theValue;
1509                return this;
1510        }
1511        
1512        
1513
1514  
1515        /**
1516         * Gets the value(s) for <b>reaction</b> ().
1517         * creating it if it does
1518         * not exist. Will not return <code>null</code>.
1519         *
1520     * <p>
1521     * <b>Definition:</b>
1522     * Details about each adverse reaction event linked to exposure to the identified Substance
1523     * </p> 
1524         */
1525        public java.util.List<Reaction> getReaction() {  
1526                if (myReaction == null) {
1527                        myReaction = new java.util.ArrayList<Reaction>();
1528                }
1529                return myReaction;
1530        }
1531
1532        /**
1533         * Sets the value(s) for <b>reaction</b> ()
1534         *
1535     * <p>
1536     * <b>Definition:</b>
1537     * Details about each adverse reaction event linked to exposure to the identified Substance
1538     * </p> 
1539         */
1540        public AllergyIntolerance setReaction(java.util.List<Reaction> theValue) {
1541                myReaction = theValue;
1542                return this;
1543        }
1544        
1545        
1546
1547        /**
1548         * Adds and returns a new value for <b>reaction</b> ()
1549         *
1550     * <p>
1551     * <b>Definition:</b>
1552     * Details about each adverse reaction event linked to exposure to the identified Substance
1553     * </p> 
1554         */
1555        public Reaction addReaction() {
1556                Reaction newType = new Reaction();
1557                getReaction().add(newType);
1558                return newType; 
1559        }
1560
1561        /**
1562         * Adds a given new value for <b>reaction</b> ()
1563         *
1564         * <p>
1565         * <b>Definition:</b>
1566         * Details about each adverse reaction event linked to exposure to the identified Substance
1567         * </p>
1568         * @param theValue The reaction to add (must not be <code>null</code>)
1569         */
1570        public AllergyIntolerance addReaction(Reaction theValue) {
1571                if (theValue == null) {
1572                        throw new NullPointerException("theValue must not be null");
1573                }
1574                getReaction().add(theValue);
1575                return this;
1576        }
1577
1578        /**
1579         * Gets the first repetition for <b>reaction</b> (),
1580         * creating it if it does not already exist.
1581         *
1582     * <p>
1583     * <b>Definition:</b>
1584     * Details about each adverse reaction event linked to exposure to the identified Substance
1585     * </p> 
1586         */
1587        public Reaction getReactionFirstRep() {
1588                if (getReaction().isEmpty()) {
1589                        return addReaction();
1590                }
1591                return getReaction().get(0); 
1592        }
1593  
1594        /**
1595         * Block class for child element: <b>AllergyIntolerance.reaction</b> ()
1596         *
1597     * <p>
1598     * <b>Definition:</b>
1599     * Details about each adverse reaction event linked to exposure to the identified Substance
1600     * </p> 
1601         */
1602        @Block()        
1603        public static class Reaction 
1604            extends  BaseIdentifiableElement        implements IResourceBlock {
1605        
1606        @Child(name="substance", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=true, modifier=false)     
1607        @Description(
1608                shortDefinition="",
1609                formalDefinition="Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance"
1610        )
1611        private CodeableConceptDt mySubstance;
1612        
1613        @Child(name="certainty", type=CodeDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
1614        @Description(
1615                shortDefinition="",
1616                formalDefinition="Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event"
1617        )
1618        private BoundCodeDt<AllergyIntoleranceCertaintyEnum> myCertainty;
1619        
1620        @Child(name="manifestation", type=CodeableConceptDt.class, order=2, min=1, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
1621        @Description(
1622                shortDefinition="",
1623                formalDefinition="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event"
1624        )
1625        private java.util.List<CodeableConceptDt> myManifestation;
1626        
1627        @Child(name="description", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)   
1628        @Description(
1629                shortDefinition="",
1630                formalDefinition="Text description about the reaction as a whole, including details of the manifestation if required"
1631        )
1632        private StringDt myDescription;
1633        
1634        @Child(name="onset", type=DateTimeDt.class, order=4, min=0, max=1, summary=true, modifier=false)        
1635        @Description(
1636                shortDefinition="",
1637                formalDefinition="Record of the date and/or time of the onset of the Reaction"
1638        )
1639        private DateTimeDt myOnset;
1640        
1641        @Child(name="severity", type=CodeDt.class, order=5, min=0, max=1, summary=true, modifier=false) 
1642        @Description(
1643                shortDefinition="",
1644                formalDefinition="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations"
1645        )
1646        private BoundCodeDt<AllergyIntoleranceSeverityEnum> mySeverity;
1647        
1648        @Child(name="exposureRoute", type=CodeableConceptDt.class, order=6, min=0, max=1, summary=true, modifier=false) 
1649        @Description(
1650                shortDefinition="",
1651                formalDefinition="Identification of the route by which the subject was exposed to the substance."
1652        )
1653        private CodeableConceptDt myExposureRoute;
1654        
1655        @Child(name="note", type=AnnotationDt.class, order=7, min=0, max=1, summary=false, modifier=false)      
1656        @Description(
1657                shortDefinition="",
1658                formalDefinition="Additional text about the adverse reaction event not captured in other fields"
1659        )
1660        private AnnotationDt myNote;
1661        
1662
1663        @Override
1664        public boolean isEmpty() {
1665                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySubstance,  myCertainty,  myManifestation,  myDescription,  myOnset,  mySeverity,  myExposureRoute,  myNote);
1666        }
1667        
1668        @Override
1669        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1670                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySubstance, myCertainty, myManifestation, myDescription, myOnset, mySeverity, myExposureRoute, myNote);
1671        }
1672
1673        /**
1674         * Gets the value(s) for <b>substance</b> ().
1675         * creating it if it does
1676         * not exist. Will not return <code>null</code>.
1677         *
1678     * <p>
1679     * <b>Definition:</b>
1680     * Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance
1681     * </p> 
1682         */
1683        public CodeableConceptDt getSubstance() {  
1684                if (mySubstance == null) {
1685                        mySubstance = new CodeableConceptDt();
1686                }
1687                return mySubstance;
1688        }
1689
1690        /**
1691         * Sets the value(s) for <b>substance</b> ()
1692         *
1693     * <p>
1694     * <b>Definition:</b>
1695     * Identification of the specific substance considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different to the substance identified as the cause of the risk, but must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite substance that includes the identified substance. It must be clinically safe to only process the AllergyIntolerance.substance and ignore the AllergyIntolerance.event.substance
1696     * </p> 
1697         */
1698        public Reaction setSubstance(CodeableConceptDt theValue) {
1699                mySubstance = theValue;
1700                return this;
1701        }
1702        
1703        
1704
1705  
1706        /**
1707         * Gets the value(s) for <b>certainty</b> ().
1708         * creating it if it does
1709         * not exist. Will not return <code>null</code>.
1710         *
1711     * <p>
1712     * <b>Definition:</b>
1713     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1714     * </p> 
1715         */
1716        public BoundCodeDt<AllergyIntoleranceCertaintyEnum> getCertaintyElement() {  
1717                if (myCertainty == null) {
1718                        myCertainty = new BoundCodeDt<AllergyIntoleranceCertaintyEnum>(AllergyIntoleranceCertaintyEnum.VALUESET_BINDER);
1719                }
1720                return myCertainty;
1721        }
1722
1723        
1724        /**
1725         * Gets the value(s) for <b>certainty</b> ().
1726         * creating it if it does
1727         * not exist. Will not return <code>null</code>.
1728         *
1729     * <p>
1730     * <b>Definition:</b>
1731     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1732     * </p> 
1733         */
1734        public String getCertainty() {  
1735                return getCertaintyElement().getValue();
1736        }
1737
1738        /**
1739         * Sets the value(s) for <b>certainty</b> ()
1740         *
1741     * <p>
1742     * <b>Definition:</b>
1743     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1744     * </p> 
1745         */
1746        public Reaction setCertainty(BoundCodeDt<AllergyIntoleranceCertaintyEnum> theValue) {
1747                myCertainty = theValue;
1748                return this;
1749        }
1750        
1751        
1752
1753        /**
1754         * Sets the value(s) for <b>certainty</b> ()
1755         *
1756     * <p>
1757     * <b>Definition:</b>
1758     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1759     * </p> 
1760         */
1761        public Reaction setCertainty(AllergyIntoleranceCertaintyEnum theValue) {
1762                setCertainty(new BoundCodeDt<AllergyIntoleranceCertaintyEnum>(AllergyIntoleranceCertaintyEnum.VALUESET_BINDER, theValue));
1763                
1764/*
1765                getCertaintyElement().setValueAsEnum(theValue);
1766*/
1767                return this;
1768        }
1769
1770  
1771        /**
1772         * Gets the value(s) for <b>manifestation</b> ().
1773         * creating it if it does
1774         * not exist. Will not return <code>null</code>.
1775         *
1776     * <p>
1777     * <b>Definition:</b>
1778     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1779     * </p> 
1780         */
1781        public java.util.List<CodeableConceptDt> getManifestation() {  
1782                if (myManifestation == null) {
1783                        myManifestation = new java.util.ArrayList<CodeableConceptDt>();
1784                }
1785                return myManifestation;
1786        }
1787
1788        /**
1789         * Sets the value(s) for <b>manifestation</b> ()
1790         *
1791     * <p>
1792     * <b>Definition:</b>
1793     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1794     * </p> 
1795         */
1796        public Reaction setManifestation(java.util.List<CodeableConceptDt> theValue) {
1797                myManifestation = theValue;
1798                return this;
1799        }
1800        
1801        
1802
1803        /**
1804         * Adds and returns a new value for <b>manifestation</b> ()
1805         *
1806     * <p>
1807     * <b>Definition:</b>
1808     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1809     * </p> 
1810         */
1811        public CodeableConceptDt addManifestation() {
1812                CodeableConceptDt newType = new CodeableConceptDt();
1813                getManifestation().add(newType);
1814                return newType; 
1815        }
1816
1817        /**
1818         * Adds a given new value for <b>manifestation</b> ()
1819         *
1820         * <p>
1821         * <b>Definition:</b>
1822         * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1823         * </p>
1824         * @param theValue The manifestation to add (must not be <code>null</code>)
1825         */
1826        public Reaction addManifestation(CodeableConceptDt theValue) {
1827                if (theValue == null) {
1828                        throw new NullPointerException("theValue must not be null");
1829                }
1830                getManifestation().add(theValue);
1831                return this;
1832        }
1833
1834        /**
1835         * Gets the first repetition for <b>manifestation</b> (),
1836         * creating it if it does not already exist.
1837         *
1838     * <p>
1839     * <b>Definition:</b>
1840     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1841     * </p> 
1842         */
1843        public CodeableConceptDt getManifestationFirstRep() {
1844                if (getManifestation().isEmpty()) {
1845                        return addManifestation();
1846                }
1847                return getManifestation().get(0); 
1848        }
1849  
1850        /**
1851         * Gets the value(s) for <b>description</b> ().
1852         * creating it if it does
1853         * not exist. Will not return <code>null</code>.
1854         *
1855     * <p>
1856     * <b>Definition:</b>
1857     * Text description about the reaction as a whole, including details of the manifestation if required
1858     * </p> 
1859         */
1860        public StringDt getDescriptionElement() {  
1861                if (myDescription == null) {
1862                        myDescription = new StringDt();
1863                }
1864                return myDescription;
1865        }
1866
1867        
1868        /**
1869         * Gets the value(s) for <b>description</b> ().
1870         * creating it if it does
1871         * not exist. Will not return <code>null</code>.
1872         *
1873     * <p>
1874     * <b>Definition:</b>
1875     * Text description about the reaction as a whole, including details of the manifestation if required
1876     * </p> 
1877         */
1878        public String getDescription() {  
1879                return getDescriptionElement().getValue();
1880        }
1881
1882        /**
1883         * Sets the value(s) for <b>description</b> ()
1884         *
1885     * <p>
1886     * <b>Definition:</b>
1887     * Text description about the reaction as a whole, including details of the manifestation if required
1888     * </p> 
1889         */
1890        public Reaction setDescription(StringDt theValue) {
1891                myDescription = theValue;
1892                return this;
1893        }
1894        
1895        
1896
1897        /**
1898         * Sets the value for <b>description</b> ()
1899         *
1900     * <p>
1901     * <b>Definition:</b>
1902     * Text description about the reaction as a whole, including details of the manifestation if required
1903     * </p> 
1904         */
1905        public Reaction setDescription( String theString) {
1906                myDescription = new StringDt(theString); 
1907                return this; 
1908        }
1909
1910 
1911        /**
1912         * Gets the value(s) for <b>onset</b> ().
1913         * creating it if it does
1914         * not exist. Will not return <code>null</code>.
1915         *
1916     * <p>
1917     * <b>Definition:</b>
1918     * Record of the date and/or time of the onset of the Reaction
1919     * </p> 
1920         */
1921        public DateTimeDt getOnsetElement() {  
1922                if (myOnset == null) {
1923                        myOnset = new DateTimeDt();
1924                }
1925                return myOnset;
1926        }
1927
1928        
1929        /**
1930         * Gets the value(s) for <b>onset</b> ().
1931         * creating it if it does
1932         * not exist. Will not return <code>null</code>.
1933         *
1934     * <p>
1935     * <b>Definition:</b>
1936     * Record of the date and/or time of the onset of the Reaction
1937     * </p> 
1938         */
1939        public Date getOnset() {  
1940                return getOnsetElement().getValue();
1941        }
1942
1943        /**
1944         * Sets the value(s) for <b>onset</b> ()
1945         *
1946     * <p>
1947     * <b>Definition:</b>
1948     * Record of the date and/or time of the onset of the Reaction
1949     * </p> 
1950         */
1951        public Reaction setOnset(DateTimeDt theValue) {
1952                myOnset = theValue;
1953                return this;
1954        }
1955        
1956        
1957
1958        /**
1959         * Sets the value for <b>onset</b> ()
1960         *
1961     * <p>
1962     * <b>Definition:</b>
1963     * Record of the date and/or time of the onset of the Reaction
1964     * </p> 
1965         */
1966        public Reaction setOnset( Date theDate,  TemporalPrecisionEnum thePrecision) {
1967                myOnset = new DateTimeDt(theDate, thePrecision); 
1968                return this; 
1969        }
1970
1971        /**
1972         * Sets the value for <b>onset</b> ()
1973         *
1974     * <p>
1975     * <b>Definition:</b>
1976     * Record of the date and/or time of the onset of the Reaction
1977     * </p> 
1978         */
1979        public Reaction setOnsetWithSecondsPrecision( Date theDate) {
1980                myOnset = new DateTimeDt(theDate); 
1981                return this; 
1982        }
1983
1984 
1985        /**
1986         * Gets the value(s) for <b>severity</b> ().
1987         * creating it if it does
1988         * not exist. Will not return <code>null</code>.
1989         *
1990     * <p>
1991     * <b>Definition:</b>
1992     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
1993     * </p> 
1994         */
1995        public BoundCodeDt<AllergyIntoleranceSeverityEnum> getSeverityElement() {  
1996                if (mySeverity == null) {
1997                        mySeverity = new BoundCodeDt<AllergyIntoleranceSeverityEnum>(AllergyIntoleranceSeverityEnum.VALUESET_BINDER);
1998                }
1999                return mySeverity;
2000        }
2001
2002        
2003        /**
2004         * Gets the value(s) for <b>severity</b> ().
2005         * creating it if it does
2006         * not exist. Will not return <code>null</code>.
2007         *
2008     * <p>
2009     * <b>Definition:</b>
2010     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
2011     * </p> 
2012         */
2013        public String getSeverity() {  
2014                return getSeverityElement().getValue();
2015        }
2016
2017        /**
2018         * Sets the value(s) for <b>severity</b> ()
2019         *
2020     * <p>
2021     * <b>Definition:</b>
2022     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
2023     * </p> 
2024         */
2025        public Reaction setSeverity(BoundCodeDt<AllergyIntoleranceSeverityEnum> theValue) {
2026                mySeverity = theValue;
2027                return this;
2028        }
2029        
2030        
2031
2032        /**
2033         * Sets the value(s) for <b>severity</b> ()
2034         *
2035     * <p>
2036     * <b>Definition:</b>
2037     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
2038     * </p> 
2039         */
2040        public Reaction setSeverity(AllergyIntoleranceSeverityEnum theValue) {
2041                setSeverity(new BoundCodeDt<AllergyIntoleranceSeverityEnum>(AllergyIntoleranceSeverityEnum.VALUESET_BINDER, theValue));
2042                
2043/*
2044                getSeverityElement().setValueAsEnum(theValue);
2045*/
2046                return this;
2047        }
2048
2049  
2050        /**
2051         * Gets the value(s) for <b>exposureRoute</b> ().
2052         * creating it if it does
2053         * not exist. Will not return <code>null</code>.
2054         *
2055     * <p>
2056     * <b>Definition:</b>
2057     * Identification of the route by which the subject was exposed to the substance.
2058     * </p> 
2059         */
2060        public CodeableConceptDt getExposureRoute() {  
2061                if (myExposureRoute == null) {
2062                        myExposureRoute = new CodeableConceptDt();
2063                }
2064                return myExposureRoute;
2065        }
2066
2067        /**
2068         * Sets the value(s) for <b>exposureRoute</b> ()
2069         *
2070     * <p>
2071     * <b>Definition:</b>
2072     * Identification of the route by which the subject was exposed to the substance.
2073     * </p> 
2074         */
2075        public Reaction setExposureRoute(CodeableConceptDt theValue) {
2076                myExposureRoute = theValue;
2077                return this;
2078        }
2079        
2080        
2081
2082  
2083        /**
2084         * Gets the value(s) for <b>note</b> ().
2085         * creating it if it does
2086         * not exist. Will not return <code>null</code>.
2087         *
2088     * <p>
2089     * <b>Definition:</b>
2090     * Additional text about the adverse reaction event not captured in other fields
2091     * </p> 
2092         */
2093        public AnnotationDt getNote() {  
2094                if (myNote == null) {
2095                        myNote = new AnnotationDt();
2096                }
2097                return myNote;
2098        }
2099
2100        /**
2101         * Sets the value(s) for <b>note</b> ()
2102         *
2103     * <p>
2104     * <b>Definition:</b>
2105     * Additional text about the adverse reaction event not captured in other fields
2106     * </p> 
2107         */
2108        public Reaction setNote(AnnotationDt theValue) {
2109                myNote = theValue;
2110                return this;
2111        }
2112        
2113        
2114
2115  
2116
2117
2118        }
2119
2120
2121
2122
2123    @Override
2124    public String getResourceName() {
2125        return "AllergyIntolerance";
2126    }
2127    
2128    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2129        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2130    }
2131
2132
2133}