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>AllergyIntolerance</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 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.
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/AllergyIntolerance">http://hl7.org/fhir/profiles/AllergyIntolerance</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="AllergyIntolerance", profile="http://hl7.org/fhir/profiles/AllergyIntolerance", id="allergyintolerance")
301public class AllergyIntolerance extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>substance</b>
306         * <p>
307         * Description: <b></b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>AllergyIntolerance.substance | AllergyIntolerance.reaction.substance</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance | AllergyIntolerance.reaction.substance", description="", type="token"  )
313        public static final String SP_SUBSTANCE = "substance";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>substance</b>
317         * <p>
318         * Description: <b></b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>AllergyIntolerance.substance | AllergyIntolerance.reaction.substance</b><br>
321         * </p>
322         */
323        public static final TokenClientParam SUBSTANCE = new TokenClientParam(SP_SUBSTANCE);
324
325        /**
326         * Search parameter constant for <b>status</b>
327         * <p>
328         * Description: <b></b><br>
329         * Type: <b>token</b><br>
330         * Path: <b>AllergyIntolerance.status</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="", type="token"  )
334        public static final String SP_STATUS = "status";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>status</b>
338         * <p>
339         * Description: <b></b><br>
340         * Type: <b>token</b><br>
341         * Path: <b>AllergyIntolerance.status</b><br>
342         * </p>
343         */
344        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
345
346        /**
347         * Search parameter constant for <b>criticality</b>
348         * <p>
349         * Description: <b></b><br>
350         * Type: <b>token</b><br>
351         * Path: <b>AllergyIntolerance.criticality</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="", type="token"  )
355        public static final String SP_CRITICALITY = "criticality";
356
357        /**
358         * <b>Fluent Client</b> search parameter constant for <b>criticality</b>
359         * <p>
360         * Description: <b></b><br>
361         * Type: <b>token</b><br>
362         * Path: <b>AllergyIntolerance.criticality</b><br>
363         * </p>
364         */
365        public static final TokenClientParam CRITICALITY = new TokenClientParam(SP_CRITICALITY);
366
367        /**
368         * Search parameter constant for <b>type</b>
369         * <p>
370         * Description: <b></b><br>
371         * Type: <b>token</b><br>
372         * Path: <b>AllergyIntolerance.type</b><br>
373         * </p>
374         */
375        @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="", type="token"  )
376        public static final String SP_TYPE = "type";
377
378        /**
379         * <b>Fluent Client</b> search parameter constant for <b>type</b>
380         * <p>
381         * Description: <b></b><br>
382         * Type: <b>token</b><br>
383         * Path: <b>AllergyIntolerance.type</b><br>
384         * </p>
385         */
386        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
387
388        /**
389         * Search parameter constant for <b>category</b>
390         * <p>
391         * Description: <b></b><br>
392         * Type: <b>token</b><br>
393         * Path: <b>AllergyIntolerance.category</b><br>
394         * </p>
395         */
396        @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="", type="token"  )
397        public static final String SP_CATEGORY = "category";
398
399        /**
400         * <b>Fluent Client</b> search parameter constant for <b>category</b>
401         * <p>
402         * Description: <b></b><br>
403         * Type: <b>token</b><br>
404         * Path: <b>AllergyIntolerance.category</b><br>
405         * </p>
406         */
407        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
408
409        /**
410         * Search parameter constant for <b>last-date</b>
411         * <p>
412         * Description: <b></b><br>
413         * Type: <b>date</b><br>
414         * Path: <b>AllergyIntolerance.lastOccurence</b><br>
415         * </p>
416         */
417        @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="", type="date"  )
418        public static final String SP_LAST_DATE = "last-date";
419
420        /**
421         * <b>Fluent Client</b> search parameter constant for <b>last-date</b>
422         * <p>
423         * Description: <b></b><br>
424         * Type: <b>date</b><br>
425         * Path: <b>AllergyIntolerance.lastOccurence</b><br>
426         * </p>
427         */
428        public static final DateClientParam LAST_DATE = new DateClientParam(SP_LAST_DATE);
429
430        /**
431         * Search parameter constant for <b>manifestation</b>
432         * <p>
433         * Description: <b></b><br>
434         * Type: <b>token</b><br>
435         * Path: <b>AllergyIntolerance.reaction.manifestation</b><br>
436         * </p>
437         */
438        @SearchParamDefinition(name="manifestation", path="AllergyIntolerance.reaction.manifestation", description="", type="token"  )
439        public static final String SP_MANIFESTATION = "manifestation";
440
441        /**
442         * <b>Fluent Client</b> search parameter constant for <b>manifestation</b>
443         * <p>
444         * Description: <b></b><br>
445         * Type: <b>token</b><br>
446         * Path: <b>AllergyIntolerance.reaction.manifestation</b><br>
447         * </p>
448         */
449        public static final TokenClientParam MANIFESTATION = new TokenClientParam(SP_MANIFESTATION);
450
451        /**
452         * Search parameter constant for <b>onset</b>
453         * <p>
454         * Description: <b></b><br>
455         * Type: <b>date</b><br>
456         * Path: <b>AllergyIntolerance.reaction.onset</b><br>
457         * </p>
458         */
459        @SearchParamDefinition(name="onset", path="AllergyIntolerance.reaction.onset", description="", type="date"  )
460        public static final String SP_ONSET = "onset";
461
462        /**
463         * <b>Fluent Client</b> search parameter constant for <b>onset</b>
464         * <p>
465         * Description: <b></b><br>
466         * Type: <b>date</b><br>
467         * Path: <b>AllergyIntolerance.reaction.onset</b><br>
468         * </p>
469         */
470        public static final DateClientParam ONSET = new DateClientParam(SP_ONSET);
471
472        /**
473         * Search parameter constant for <b>severity</b>
474         * <p>
475         * Description: <b></b><br>
476         * Type: <b>token</b><br>
477         * Path: <b>AllergyIntolerance.reaction.severity</b><br>
478         * </p>
479         */
480        @SearchParamDefinition(name="severity", path="AllergyIntolerance.reaction.severity", description="", type="token"  )
481        public static final String SP_SEVERITY = "severity";
482
483        /**
484         * <b>Fluent Client</b> search parameter constant for <b>severity</b>
485         * <p>
486         * Description: <b></b><br>
487         * Type: <b>token</b><br>
488         * Path: <b>AllergyIntolerance.reaction.severity</b><br>
489         * </p>
490         */
491        public static final TokenClientParam SEVERITY = new TokenClientParam(SP_SEVERITY);
492
493        /**
494         * Search parameter constant for <b>route</b>
495         * <p>
496         * Description: <b></b><br>
497         * Type: <b>token</b><br>
498         * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
499         * </p>
500         */
501        @SearchParamDefinition(name="route", path="AllergyIntolerance.reaction.exposureRoute", description="", type="token"  )
502        public static final String SP_ROUTE = "route";
503
504        /**
505         * <b>Fluent Client</b> search parameter constant for <b>route</b>
506         * <p>
507         * Description: <b></b><br>
508         * Type: <b>token</b><br>
509         * Path: <b>AllergyIntolerance.reaction.exposureRoute</b><br>
510         * </p>
511         */
512        public static final TokenClientParam ROUTE = new TokenClientParam(SP_ROUTE);
513
514        /**
515         * Search parameter constant for <b>identifier</b>
516         * <p>
517         * Description: <b></b><br>
518         * Type: <b>token</b><br>
519         * Path: <b>AllergyIntolerance.identifier</b><br>
520         * </p>
521         */
522        @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="", type="token"  )
523        public static final String SP_IDENTIFIER = "identifier";
524
525        /**
526         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
527         * <p>
528         * Description: <b></b><br>
529         * Type: <b>token</b><br>
530         * Path: <b>AllergyIntolerance.identifier</b><br>
531         * </p>
532         */
533        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
534
535        /**
536         * Search parameter constant for <b>date</b>
537         * <p>
538         * Description: <b></b><br>
539         * Type: <b>date</b><br>
540         * Path: <b>AllergyIntolerance.recordedDate</b><br>
541         * </p>
542         */
543        @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="", type="date"  )
544        public static final String SP_DATE = "date";
545
546        /**
547         * <b>Fluent Client</b> search parameter constant for <b>date</b>
548         * <p>
549         * Description: <b></b><br>
550         * Type: <b>date</b><br>
551         * Path: <b>AllergyIntolerance.recordedDate</b><br>
552         * </p>
553         */
554        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
555
556        /**
557         * Search parameter constant for <b>recorder</b>
558         * <p>
559         * Description: <b></b><br>
560         * Type: <b>reference</b><br>
561         * Path: <b>AllergyIntolerance.recorder</b><br>
562         * </p>
563         */
564        @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="", type="reference" , providesMembershipIn={
565 @Compartment(name="Patient") ,  @Compartment(name="RelatedPerson")     }
566 )
567        public static final String SP_RECORDER = "recorder";
568
569        /**
570         * <b>Fluent Client</b> search parameter constant for <b>recorder</b>
571         * <p>
572         * Description: <b></b><br>
573         * Type: <b>reference</b><br>
574         * Path: <b>AllergyIntolerance.recorder</b><br>
575         * </p>
576         */
577        public static final ReferenceClientParam RECORDER = new ReferenceClientParam(SP_RECORDER);
578
579        /**
580         * Search parameter constant for <b>patient</b>
581         * <p>
582         * Description: <b></b><br>
583         * Type: <b>reference</b><br>
584         * Path: <b>AllergyIntolerance.patient</b><br>
585         * </p>
586         */
587        @SearchParamDefinition(name="patient", path="AllergyIntolerance.patient", description="", type="reference" , providesMembershipIn={
588 @Compartment(name="Patient")   }
589 )
590        public static final String SP_PATIENT = "patient";
591
592        /**
593         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
594         * <p>
595         * Description: <b></b><br>
596         * Type: <b>reference</b><br>
597         * Path: <b>AllergyIntolerance.patient</b><br>
598         * </p>
599         */
600        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
601
602        /**
603         * Search parameter constant for <b>reporter</b>
604         * <p>
605         * Description: <b></b><br>
606         * Type: <b>reference</b><br>
607         * Path: <b>AllergyIntolerance.reporter</b><br>
608         * </p>
609         */
610        @SearchParamDefinition(name="reporter", path="AllergyIntolerance.reporter", description="", type="reference" , providesMembershipIn={
611 @Compartment(name="Patient") ,  @Compartment(name="Encounter") ,  @Compartment(name="RelatedPerson")   }
612 )
613        public static final String SP_REPORTER = "reporter";
614
615        /**
616         * <b>Fluent Client</b> search parameter constant for <b>reporter</b>
617         * <p>
618         * Description: <b></b><br>
619         * Type: <b>reference</b><br>
620         * Path: <b>AllergyIntolerance.reporter</b><br>
621         * </p>
622         */
623        public static final ReferenceClientParam REPORTER = new ReferenceClientParam(SP_REPORTER);
624
625
626        /**
627         * Constant for fluent queries to be used to add include statements. Specifies
628         * the path value of "<b>AllergyIntolerance:patient</b>".
629         */
630        public static final Include INCLUDE_PATIENT = new Include("AllergyIntolerance:patient");
631
632        /**
633         * Constant for fluent queries to be used to add include statements. Specifies
634         * the path value of "<b>AllergyIntolerance:recorder</b>".
635         */
636        public static final Include INCLUDE_RECORDER = new Include("AllergyIntolerance:recorder");
637
638        /**
639         * Constant for fluent queries to be used to add include statements. Specifies
640         * the path value of "<b>AllergyIntolerance:reporter</b>".
641         */
642        public static final Include INCLUDE_REPORTER = new Include("AllergyIntolerance:reporter");
643
644
645        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
646        @Description(
647                shortDefinition="",
648                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)"
649        )
650        private java.util.List<IdentifierDt> myIdentifier;
651        
652        @Child(name="onset", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
653        @Description(
654                shortDefinition="",
655                formalDefinition="Record of the date and/or time of the onset of the Allergy or Intolerance"
656        )
657        private DateTimeDt myOnset;
658        
659        @Child(name="recordedDate", type=DateTimeDt.class, order=2, min=0, max=1, summary=true, modifier=false) 
660        @Description(
661                shortDefinition="",
662                formalDefinition="Date when the sensitivity was recorded"
663        )
664        private DateTimeDt myRecordedDate;
665        
666        @Child(name="recorder", order=3, min=0, max=1, summary=true, modifier=false, type={
667                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class  })
668        @Description(
669                shortDefinition="",
670                formalDefinition="Individual who recorded the record and takes responsibility for its conten"
671        )
672        private ResourceReferenceDt myRecorder;
673        
674        @Child(name="patient", order=4, min=1, max=1, summary=true, modifier=false, type={
675                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
676        @Description(
677                shortDefinition="",
678                formalDefinition="The patient who has the allergy or intolerance"
679        )
680        private ResourceReferenceDt myPatient;
681        
682        @Child(name="reporter", order=5, min=0, max=1, summary=true, modifier=false, type={
683                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class,           ca.uhn.fhir.model.dstu2.resource.Practitioner.class     })
684        @Description(
685                shortDefinition="",
686                formalDefinition="The source of the information about the allergy that is recorded"
687        )
688        private ResourceReferenceDt myReporter;
689        
690        @Child(name="substance", type=CodeableConceptDt.class, order=6, min=1, max=1, summary=true, modifier=false)     
691        @Description(
692                shortDefinition="",
693                formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk"
694        )
695        private CodeableConceptDt mySubstance;
696        
697        @Child(name="status", type=CodeDt.class, order=7, min=0, max=1, summary=true, modifier=true)    
698        @Description(
699                shortDefinition="",
700                formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance"
701        )
702        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/allergy-intolerance-status")
703        private BoundCodeDt<AllergyIntoleranceStatusEnum> myStatus;
704        
705        @Child(name="criticality", type=CodeDt.class, order=8, min=0, max=1, summary=true, modifier=false)      
706        @Description(
707                shortDefinition="",
708                formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance"
709        )
710        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality")
711        private BoundCodeDt<AllergyIntoleranceCriticalityEnum> myCriticality;
712        
713        @Child(name="type", type=CodeDt.class, order=9, min=0, max=1, summary=true, modifier=false)     
714        @Description(
715                shortDefinition="",
716                formalDefinition="Identification of the underlying physiological mechanism for the reaction risk."
717        )
718        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/allergy-intolerance-type")
719        private BoundCodeDt<AllergyIntoleranceTypeEnum> myType;
720        
721        @Child(name="category", type=CodeDt.class, order=10, min=0, max=1, summary=true, modifier=false)        
722        @Description(
723                shortDefinition="",
724                formalDefinition="Category of the identified Substance"
725        )
726        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/allergy-intolerance-category")
727        private BoundCodeDt<AllergyIntoleranceCategoryEnum> myCategory;
728        
729        @Child(name="lastOccurence", type=DateTimeDt.class, order=11, min=0, max=1, summary=true, modifier=false)       
730        @Description(
731                shortDefinition="",
732                formalDefinition="Represents the date and/or time of the last known occurrence of a reaction event"
733        )
734        private DateTimeDt myLastOccurence;
735        
736        @Child(name="note", type=AnnotationDt.class, order=12, min=0, max=1, summary=false, modifier=false)     
737        @Description(
738                shortDefinition="",
739                formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields."
740        )
741        private AnnotationDt myNote;
742        
743        @Child(name="reaction", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)        
744        @Description(
745                shortDefinition="",
746                formalDefinition="Details about each adverse reaction event linked to exposure to the identified Substance"
747        )
748        private java.util.List<Reaction> myReaction;
749        
750
751        @Override
752        public boolean isEmpty() {
753                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myOnset,  myRecordedDate,  myRecorder,  myPatient,  myReporter,  mySubstance,  myStatus,  myCriticality,  myType,  myCategory,  myLastOccurence,  myNote,  myReaction);
754        }
755        
756        @Override
757        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
758                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myOnset, myRecordedDate, myRecorder, myPatient, myReporter, mySubstance, myStatus, myCriticality, myType, myCategory, myLastOccurence, myNote, myReaction);
759        }
760
761        /**
762         * Gets the value(s) for <b>identifier</b> ().
763         * creating it if it does
764         * not exist. Will not return <code>null</code>.
765         *
766     * <p>
767     * <b>Definition:</b>
768     * 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)
769     * </p> 
770         */
771        public java.util.List<IdentifierDt> getIdentifier() {  
772                if (myIdentifier == null) {
773                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
774                }
775                return myIdentifier;
776        }
777
778        /**
779         * Sets the value(s) for <b>identifier</b> ()
780         *
781     * <p>
782     * <b>Definition:</b>
783     * 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)
784     * </p> 
785         */
786        public AllergyIntolerance setIdentifier(java.util.List<IdentifierDt> theValue) {
787                myIdentifier = theValue;
788                return this;
789        }
790        
791        
792
793        /**
794         * Adds and returns a new value for <b>identifier</b> ()
795         *
796     * <p>
797     * <b>Definition:</b>
798     * 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)
799     * </p> 
800         */
801        public IdentifierDt addIdentifier() {
802                IdentifierDt newType = new IdentifierDt();
803                getIdentifier().add(newType);
804                return newType; 
805        }
806
807        /**
808         * Adds a given new value for <b>identifier</b> ()
809         *
810         * <p>
811         * <b>Definition:</b>
812         * 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)
813         * </p>
814         * @param theValue The identifier to add (must not be <code>null</code>)
815         */
816        public AllergyIntolerance addIdentifier(IdentifierDt theValue) {
817                if (theValue == null) {
818                        throw new NullPointerException("theValue must not be null");
819                }
820                getIdentifier().add(theValue);
821                return this;
822        }
823
824        /**
825         * Gets the first repetition for <b>identifier</b> (),
826         * creating it if it does not already exist.
827         *
828     * <p>
829     * <b>Definition:</b>
830     * 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)
831     * </p> 
832         */
833        public IdentifierDt getIdentifierFirstRep() {
834                if (getIdentifier().isEmpty()) {
835                        return addIdentifier();
836                }
837                return getIdentifier().get(0); 
838        }
839  
840        /**
841         * Gets the value(s) for <b>onset</b> ().
842         * creating it if it does
843         * not exist. Will not return <code>null</code>.
844         *
845     * <p>
846     * <b>Definition:</b>
847     * Record of the date and/or time of the onset of the Allergy or Intolerance
848     * </p> 
849         */
850        public DateTimeDt getOnsetElement() {  
851                if (myOnset == null) {
852                        myOnset = new DateTimeDt();
853                }
854                return myOnset;
855        }
856
857        
858        /**
859         * Gets the value(s) for <b>onset</b> ().
860         * creating it if it does
861         * not exist. This method may return <code>null</code>.
862         *
863     * <p>
864     * <b>Definition:</b>
865     * Record of the date and/or time of the onset of the Allergy or Intolerance
866     * </p> 
867         */
868        public Date getOnset() {  
869                return getOnsetElement().getValue();
870        }
871
872        /**
873         * Sets the value(s) for <b>onset</b> ()
874         *
875     * <p>
876     * <b>Definition:</b>
877     * Record of the date and/or time of the onset of the Allergy or Intolerance
878     * </p> 
879         */
880        public AllergyIntolerance setOnset(DateTimeDt theValue) {
881                myOnset = theValue;
882                return this;
883        }
884        
885        
886
887        /**
888         * Sets the value for <b>onset</b> ()
889         *
890     * <p>
891     * <b>Definition:</b>
892     * Record of the date and/or time of the onset of the Allergy or Intolerance
893     * </p> 
894         */
895        public AllergyIntolerance setOnset( Date theDate,  TemporalPrecisionEnum thePrecision) {
896                myOnset = new DateTimeDt(theDate, thePrecision); 
897                return this; 
898        }
899
900        /**
901         * Sets the value 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 setOnsetWithSecondsPrecision( Date theDate) {
909                myOnset = new DateTimeDt(theDate); 
910                return this; 
911        }
912
913 
914        /**
915         * Gets the value(s) for <b>recordedDate</b> ().
916         * creating it if it does
917         * not exist. Will not return <code>null</code>.
918         *
919     * <p>
920     * <b>Definition:</b>
921     * Date when the sensitivity was recorded
922     * </p> 
923         */
924        public DateTimeDt getRecordedDateElement() {  
925                if (myRecordedDate == null) {
926                        myRecordedDate = new DateTimeDt();
927                }
928                return myRecordedDate;
929        }
930
931        
932        /**
933         * Gets the value(s) for <b>recordedDate</b> ().
934         * creating it if it does
935         * not exist. This method may return <code>null</code>.
936         *
937     * <p>
938     * <b>Definition:</b>
939     * Date when the sensitivity was recorded
940     * </p> 
941         */
942        public Date getRecordedDate() {  
943                return getRecordedDateElement().getValue();
944        }
945
946        /**
947         * Sets the value(s) for <b>recordedDate</b> ()
948         *
949     * <p>
950     * <b>Definition:</b>
951     * Date when the sensitivity was recorded
952     * </p> 
953         */
954        public AllergyIntolerance setRecordedDate(DateTimeDt theValue) {
955                myRecordedDate = theValue;
956                return this;
957        }
958        
959        
960
961        /**
962         * Sets the value for <b>recordedDate</b> ()
963         *
964     * <p>
965     * <b>Definition:</b>
966     * Date when the sensitivity was recorded
967     * </p> 
968         */
969        public AllergyIntolerance setRecordedDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
970                myRecordedDate = new DateTimeDt(theDate, thePrecision); 
971                return this; 
972        }
973
974        /**
975         * Sets the value for <b>recordedDate</b> ()
976         *
977     * <p>
978     * <b>Definition:</b>
979     * Date when the sensitivity was recorded
980     * </p> 
981         */
982        public AllergyIntolerance setRecordedDateWithSecondsPrecision( Date theDate) {
983                myRecordedDate = new DateTimeDt(theDate); 
984                return this; 
985        }
986
987 
988        /**
989         * Gets the value(s) for <b>recorder</b> ().
990         * creating it if it does
991         * not exist. Will not return <code>null</code>.
992         *
993     * <p>
994     * <b>Definition:</b>
995     * Individual who recorded the record and takes responsibility for its conten
996     * </p> 
997         */
998        public ResourceReferenceDt getRecorder() {  
999                if (myRecorder == null) {
1000                        myRecorder = new ResourceReferenceDt();
1001                }
1002                return myRecorder;
1003        }
1004
1005        /**
1006         * Sets the value(s) for <b>recorder</b> ()
1007         *
1008     * <p>
1009     * <b>Definition:</b>
1010     * Individual who recorded the record and takes responsibility for its conten
1011     * </p> 
1012         */
1013        public AllergyIntolerance setRecorder(ResourceReferenceDt theValue) {
1014                myRecorder = theValue;
1015                return this;
1016        }
1017        
1018        
1019
1020  
1021        /**
1022         * Gets the value(s) for <b>patient</b> ().
1023         * creating it if it does
1024         * not exist. Will not return <code>null</code>.
1025         *
1026     * <p>
1027     * <b>Definition:</b>
1028     * The patient who has the allergy or intolerance
1029     * </p> 
1030         */
1031        public ResourceReferenceDt getPatient() {  
1032                if (myPatient == null) {
1033                        myPatient = new ResourceReferenceDt();
1034                }
1035                return myPatient;
1036        }
1037
1038        /**
1039         * Sets the value(s) for <b>patient</b> ()
1040         *
1041     * <p>
1042     * <b>Definition:</b>
1043     * The patient who has the allergy or intolerance
1044     * </p> 
1045         */
1046        public AllergyIntolerance setPatient(ResourceReferenceDt theValue) {
1047                myPatient = theValue;
1048                return this;
1049        }
1050        
1051        
1052
1053  
1054        /**
1055         * Gets the value(s) for <b>reporter</b> ().
1056         * creating it if it does
1057         * not exist. Will not return <code>null</code>.
1058         *
1059     * <p>
1060     * <b>Definition:</b>
1061     * The source of the information about the allergy that is recorded
1062     * </p> 
1063         */
1064        public ResourceReferenceDt getReporter() {  
1065                if (myReporter == null) {
1066                        myReporter = new ResourceReferenceDt();
1067                }
1068                return myReporter;
1069        }
1070
1071        /**
1072         * Sets the value(s) for <b>reporter</b> ()
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * The source of the information about the allergy that is recorded
1077     * </p> 
1078         */
1079        public AllergyIntolerance setReporter(ResourceReferenceDt theValue) {
1080                myReporter = theValue;
1081                return this;
1082        }
1083        
1084        
1085
1086  
1087        /**
1088         * Gets the value(s) for <b>substance</b> ().
1089         * creating it if it does
1090         * not exist. Will not return <code>null</code>.
1091         *
1092     * <p>
1093     * <b>Definition:</b>
1094     * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk
1095     * </p> 
1096         */
1097        public CodeableConceptDt getSubstance() {  
1098                if (mySubstance == null) {
1099                        mySubstance = new CodeableConceptDt();
1100                }
1101                return mySubstance;
1102        }
1103
1104        /**
1105         * Sets the value(s) for <b>substance</b> ()
1106         *
1107     * <p>
1108     * <b>Definition:</b>
1109     * Identification of a substance, or a class of substances, that is considered to be responsible for the adverse reaction risk
1110     * </p> 
1111         */
1112        public AllergyIntolerance setSubstance(CodeableConceptDt theValue) {
1113                mySubstance = theValue;
1114                return this;
1115        }
1116        
1117        
1118
1119  
1120        /**
1121         * Gets the value(s) for <b>status</b> ().
1122         * creating it if it does
1123         * not exist. Will not return <code>null</code>.
1124         *
1125     * <p>
1126     * <b>Definition:</b>
1127     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1128     * </p> 
1129         */
1130        public BoundCodeDt<AllergyIntoleranceStatusEnum> getStatusElement() {  
1131                if (myStatus == null) {
1132                        myStatus = new BoundCodeDt<AllergyIntoleranceStatusEnum>(AllergyIntoleranceStatusEnum.VALUESET_BINDER);
1133                }
1134                return myStatus;
1135        }
1136
1137        
1138        /**
1139         * Gets the value(s) for <b>status</b> ().
1140         * creating it if it does
1141         * not exist. This method may return <code>null</code>.
1142         *
1143     * <p>
1144     * <b>Definition:</b>
1145     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1146     * </p> 
1147         */
1148        public String getStatus() {  
1149                return getStatusElement().getValue();
1150        }
1151
1152        /**
1153         * Sets the value(s) for <b>status</b> ()
1154         *
1155     * <p>
1156     * <b>Definition:</b>
1157     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1158     * </p> 
1159         */
1160        public AllergyIntolerance setStatus(BoundCodeDt<AllergyIntoleranceStatusEnum> theValue) {
1161                myStatus = theValue;
1162                return this;
1163        }
1164        
1165        
1166
1167        /**
1168         * Sets the value(s) for <b>status</b> ()
1169         *
1170     * <p>
1171     * <b>Definition:</b>
1172     * Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance
1173     * </p> 
1174         */
1175        public AllergyIntolerance setStatus(AllergyIntoleranceStatusEnum theValue) {
1176                setStatus(new BoundCodeDt<AllergyIntoleranceStatusEnum>(AllergyIntoleranceStatusEnum.VALUESET_BINDER, theValue));
1177                
1178/*
1179                getStatusElement().setValueAsEnum(theValue);
1180*/
1181                return this;
1182        }
1183
1184  
1185        /**
1186         * Gets the value(s) for <b>criticality</b> ().
1187         * creating it if it does
1188         * not exist. Will not return <code>null</code>.
1189         *
1190     * <p>
1191     * <b>Definition:</b>
1192     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1193     * </p> 
1194         */
1195        public BoundCodeDt<AllergyIntoleranceCriticalityEnum> getCriticalityElement() {  
1196                if (myCriticality == null) {
1197                        myCriticality = new BoundCodeDt<AllergyIntoleranceCriticalityEnum>(AllergyIntoleranceCriticalityEnum.VALUESET_BINDER);
1198                }
1199                return myCriticality;
1200        }
1201
1202        
1203        /**
1204         * Gets the value(s) for <b>criticality</b> ().
1205         * creating it if it does
1206         * not exist. This method may return <code>null</code>.
1207         *
1208     * <p>
1209     * <b>Definition:</b>
1210     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1211     * </p> 
1212         */
1213        public String getCriticality() {  
1214                return getCriticalityElement().getValue();
1215        }
1216
1217        /**
1218         * Sets the value(s) for <b>criticality</b> ()
1219         *
1220     * <p>
1221     * <b>Definition:</b>
1222     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1223     * </p> 
1224         */
1225        public AllergyIntolerance setCriticality(BoundCodeDt<AllergyIntoleranceCriticalityEnum> theValue) {
1226                myCriticality = theValue;
1227                return this;
1228        }
1229        
1230        
1231
1232        /**
1233         * Sets the value(s) for <b>criticality</b> ()
1234         *
1235     * <p>
1236     * <b>Definition:</b>
1237     * Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance
1238     * </p> 
1239         */
1240        public AllergyIntolerance setCriticality(AllergyIntoleranceCriticalityEnum theValue) {
1241                setCriticality(new BoundCodeDt<AllergyIntoleranceCriticalityEnum>(AllergyIntoleranceCriticalityEnum.VALUESET_BINDER, theValue));
1242                
1243/*
1244                getCriticalityElement().setValueAsEnum(theValue);
1245*/
1246                return this;
1247        }
1248
1249  
1250        /**
1251         * Gets the value(s) for <b>type</b> ().
1252         * creating it if it does
1253         * not exist. Will not return <code>null</code>.
1254         *
1255     * <p>
1256     * <b>Definition:</b>
1257     * Identification of the underlying physiological mechanism for the reaction risk.
1258     * </p> 
1259         */
1260        public BoundCodeDt<AllergyIntoleranceTypeEnum> getTypeElement() {  
1261                if (myType == null) {
1262                        myType = new BoundCodeDt<AllergyIntoleranceTypeEnum>(AllergyIntoleranceTypeEnum.VALUESET_BINDER);
1263                }
1264                return myType;
1265        }
1266
1267        
1268        /**
1269         * Gets the value(s) for <b>type</b> ().
1270         * creating it if it does
1271         * not exist. This method may return <code>null</code>.
1272         *
1273     * <p>
1274     * <b>Definition:</b>
1275     * Identification of the underlying physiological mechanism for the reaction risk.
1276     * </p> 
1277         */
1278        public String getType() {  
1279                return getTypeElement().getValue();
1280        }
1281
1282        /**
1283         * Sets the value(s) for <b>type</b> ()
1284         *
1285     * <p>
1286     * <b>Definition:</b>
1287     * Identification of the underlying physiological mechanism for the reaction risk.
1288     * </p> 
1289         */
1290        public AllergyIntolerance setType(BoundCodeDt<AllergyIntoleranceTypeEnum> theValue) {
1291                myType = theValue;
1292                return this;
1293        }
1294        
1295        
1296
1297        /**
1298         * Sets the value(s) for <b>type</b> ()
1299         *
1300     * <p>
1301     * <b>Definition:</b>
1302     * Identification of the underlying physiological mechanism for the reaction risk.
1303     * </p> 
1304         */
1305        public AllergyIntolerance setType(AllergyIntoleranceTypeEnum theValue) {
1306                setType(new BoundCodeDt<AllergyIntoleranceTypeEnum>(AllergyIntoleranceTypeEnum.VALUESET_BINDER, theValue));
1307                
1308/*
1309                getTypeElement().setValueAsEnum(theValue);
1310*/
1311                return this;
1312        }
1313
1314  
1315        /**
1316         * Gets the value(s) for <b>category</b> ().
1317         * creating it if it does
1318         * not exist. Will not return <code>null</code>.
1319         *
1320     * <p>
1321     * <b>Definition:</b>
1322     * Category of the identified Substance
1323     * </p> 
1324         */
1325        public BoundCodeDt<AllergyIntoleranceCategoryEnum> getCategoryElement() {  
1326                if (myCategory == null) {
1327                        myCategory = new BoundCodeDt<AllergyIntoleranceCategoryEnum>(AllergyIntoleranceCategoryEnum.VALUESET_BINDER);
1328                }
1329                return myCategory;
1330        }
1331
1332        
1333        /**
1334         * Gets the value(s) for <b>category</b> ().
1335         * creating it if it does
1336         * not exist. This method may return <code>null</code>.
1337         *
1338     * <p>
1339     * <b>Definition:</b>
1340     * Category of the identified Substance
1341     * </p> 
1342         */
1343        public String getCategory() {  
1344                return getCategoryElement().getValue();
1345        }
1346
1347        /**
1348         * Sets the value(s) for <b>category</b> ()
1349         *
1350     * <p>
1351     * <b>Definition:</b>
1352     * Category of the identified Substance
1353     * </p> 
1354         */
1355        public AllergyIntolerance setCategory(BoundCodeDt<AllergyIntoleranceCategoryEnum> theValue) {
1356                myCategory = theValue;
1357                return this;
1358        }
1359        
1360        
1361
1362        /**
1363         * Sets the value(s) for <b>category</b> ()
1364         *
1365     * <p>
1366     * <b>Definition:</b>
1367     * Category of the identified Substance
1368     * </p> 
1369         */
1370        public AllergyIntolerance setCategory(AllergyIntoleranceCategoryEnum theValue) {
1371                setCategory(new BoundCodeDt<AllergyIntoleranceCategoryEnum>(AllergyIntoleranceCategoryEnum.VALUESET_BINDER, theValue));
1372                
1373/*
1374                getCategoryElement().setValueAsEnum(theValue);
1375*/
1376                return this;
1377        }
1378
1379  
1380        /**
1381         * Gets the value(s) for <b>lastOccurence</b> ().
1382         * creating it if it does
1383         * not exist. Will not return <code>null</code>.
1384         *
1385     * <p>
1386     * <b>Definition:</b>
1387     * Represents the date and/or time of the last known occurrence of a reaction event
1388     * </p> 
1389         */
1390        public DateTimeDt getLastOccurenceElement() {  
1391                if (myLastOccurence == null) {
1392                        myLastOccurence = new DateTimeDt();
1393                }
1394                return myLastOccurence;
1395        }
1396
1397        
1398        /**
1399         * Gets the value(s) for <b>lastOccurence</b> ().
1400         * creating it if it does
1401         * not exist. This method may return <code>null</code>.
1402         *
1403     * <p>
1404     * <b>Definition:</b>
1405     * Represents the date and/or time of the last known occurrence of a reaction event
1406     * </p> 
1407         */
1408        public Date getLastOccurence() {  
1409                return getLastOccurenceElement().getValue();
1410        }
1411
1412        /**
1413         * Sets the value(s) for <b>lastOccurence</b> ()
1414         *
1415     * <p>
1416     * <b>Definition:</b>
1417     * Represents the date and/or time of the last known occurrence of a reaction event
1418     * </p> 
1419         */
1420        public AllergyIntolerance setLastOccurence(DateTimeDt theValue) {
1421                myLastOccurence = theValue;
1422                return this;
1423        }
1424        
1425        
1426
1427        /**
1428         * Sets the value for <b>lastOccurence</b> ()
1429         *
1430     * <p>
1431     * <b>Definition:</b>
1432     * Represents the date and/or time of the last known occurrence of a reaction event
1433     * </p> 
1434         */
1435        public AllergyIntolerance setLastOccurence( Date theDate,  TemporalPrecisionEnum thePrecision) {
1436                myLastOccurence = new DateTimeDt(theDate, thePrecision); 
1437                return this; 
1438        }
1439
1440        /**
1441         * Sets the value 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 setLastOccurenceWithSecondsPrecision( Date theDate) {
1449                myLastOccurence = new DateTimeDt(theDate); 
1450                return this; 
1451        }
1452
1453 
1454        /**
1455         * Gets the value(s) for <b>note</b> ().
1456         * creating it if it does
1457         * not exist. Will not return <code>null</code>.
1458         *
1459     * <p>
1460     * <b>Definition:</b>
1461     * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
1462     * </p> 
1463         */
1464        public AnnotationDt getNote() {  
1465                if (myNote == null) {
1466                        myNote = new AnnotationDt();
1467                }
1468                return myNote;
1469        }
1470
1471        /**
1472         * Sets the value(s) for <b>note</b> ()
1473         *
1474     * <p>
1475     * <b>Definition:</b>
1476     * Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
1477     * </p> 
1478         */
1479        public AllergyIntolerance setNote(AnnotationDt theValue) {
1480                myNote = theValue;
1481                return this;
1482        }
1483        
1484        
1485
1486  
1487        /**
1488         * Gets the value(s) for <b>reaction</b> ().
1489         * creating it if it does
1490         * not exist. Will not return <code>null</code>.
1491         *
1492     * <p>
1493     * <b>Definition:</b>
1494     * Details about each adverse reaction event linked to exposure to the identified Substance
1495     * </p> 
1496         */
1497        public java.util.List<Reaction> getReaction() {  
1498                if (myReaction == null) {
1499                        myReaction = new java.util.ArrayList<Reaction>();
1500                }
1501                return myReaction;
1502        }
1503
1504        /**
1505         * Sets the value(s) for <b>reaction</b> ()
1506         *
1507     * <p>
1508     * <b>Definition:</b>
1509     * Details about each adverse reaction event linked to exposure to the identified Substance
1510     * </p> 
1511         */
1512        public AllergyIntolerance setReaction(java.util.List<Reaction> theValue) {
1513                myReaction = theValue;
1514                return this;
1515        }
1516        
1517        
1518
1519        /**
1520         * Adds and returns a new value for <b>reaction</b> ()
1521         *
1522     * <p>
1523     * <b>Definition:</b>
1524     * Details about each adverse reaction event linked to exposure to the identified Substance
1525     * </p> 
1526         */
1527        public Reaction addReaction() {
1528                Reaction newType = new Reaction();
1529                getReaction().add(newType);
1530                return newType; 
1531        }
1532
1533        /**
1534         * Adds a given new value for <b>reaction</b> ()
1535         *
1536         * <p>
1537         * <b>Definition:</b>
1538         * Details about each adverse reaction event linked to exposure to the identified Substance
1539         * </p>
1540         * @param theValue The reaction to add (must not be <code>null</code>)
1541         */
1542        public AllergyIntolerance addReaction(Reaction theValue) {
1543                if (theValue == null) {
1544                        throw new NullPointerException("theValue must not be null");
1545                }
1546                getReaction().add(theValue);
1547                return this;
1548        }
1549
1550        /**
1551         * Gets the first repetition for <b>reaction</b> (),
1552         * creating it if it does not already exist.
1553         *
1554     * <p>
1555     * <b>Definition:</b>
1556     * Details about each adverse reaction event linked to exposure to the identified Substance
1557     * </p> 
1558         */
1559        public Reaction getReactionFirstRep() {
1560                if (getReaction().isEmpty()) {
1561                        return addReaction();
1562                }
1563                return getReaction().get(0); 
1564        }
1565  
1566        /**
1567         * Block class for child element: <b>AllergyIntolerance.reaction</b> ()
1568         *
1569     * <p>
1570     * <b>Definition:</b>
1571     * Details about each adverse reaction event linked to exposure to the identified Substance
1572     * </p> 
1573         */
1574        @Block()        
1575        public static class Reaction 
1576            extends  BaseIdentifiableElement        implements IResourceBlock {
1577        
1578        @Child(name="substance", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=true, modifier=false)     
1579        @Description(
1580                shortDefinition="",
1581                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"
1582        )
1583        private CodeableConceptDt mySubstance;
1584        
1585        @Child(name="certainty", type=CodeDt.class, order=1, min=0, max=1, summary=true, modifier=false)        
1586        @Description(
1587                shortDefinition="",
1588                formalDefinition="Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event"
1589        )
1590        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/reaction-event-certainty")
1591        private BoundCodeDt<AllergyIntoleranceCertaintyEnum> myCertainty;
1592        
1593        @Child(name="manifestation", type=CodeableConceptDt.class, order=2, min=1, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
1594        @Description(
1595                shortDefinition="",
1596                formalDefinition="Clinical symptoms and/or signs that are observed or associated with the adverse reaction event"
1597        )
1598        private java.util.List<CodeableConceptDt> myManifestation;
1599        
1600        @Child(name="description", type=StringDt.class, order=3, min=0, max=1, summary=false, modifier=false)   
1601        @Description(
1602                shortDefinition="",
1603                formalDefinition="Text description about the reaction as a whole, including details of the manifestation if required"
1604        )
1605        private StringDt myDescription;
1606        
1607        @Child(name="onset", type=DateTimeDt.class, order=4, min=0, max=1, summary=true, modifier=false)        
1608        @Description(
1609                shortDefinition="",
1610                formalDefinition="Record of the date and/or time of the onset of the Reaction"
1611        )
1612        private DateTimeDt myOnset;
1613        
1614        @Child(name="severity", type=CodeDt.class, order=5, min=0, max=1, summary=true, modifier=false) 
1615        @Description(
1616                shortDefinition="",
1617                formalDefinition="Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations"
1618        )
1619        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/reaction-event-severity")
1620        private BoundCodeDt<AllergyIntoleranceSeverityEnum> mySeverity;
1621        
1622        @Child(name="exposureRoute", type=CodeableConceptDt.class, order=6, min=0, max=1, summary=true, modifier=false) 
1623        @Description(
1624                shortDefinition="",
1625                formalDefinition="Identification of the route by which the subject was exposed to the substance."
1626        )
1627        private CodeableConceptDt myExposureRoute;
1628        
1629        @Child(name="note", type=AnnotationDt.class, order=7, min=0, max=1, summary=false, modifier=false)      
1630        @Description(
1631                shortDefinition="",
1632                formalDefinition="Additional text about the adverse reaction event not captured in other fields"
1633        )
1634        private AnnotationDt myNote;
1635        
1636
1637        @Override
1638        public boolean isEmpty() {
1639                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  mySubstance,  myCertainty,  myManifestation,  myDescription,  myOnset,  mySeverity,  myExposureRoute,  myNote);
1640        }
1641        
1642        @Override
1643        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1644                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySubstance, myCertainty, myManifestation, myDescription, myOnset, mySeverity, myExposureRoute, myNote);
1645        }
1646
1647        /**
1648         * Gets the value(s) for <b>substance</b> ().
1649         * creating it if it does
1650         * not exist. Will not return <code>null</code>.
1651         *
1652     * <p>
1653     * <b>Definition:</b>
1654     * 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
1655     * </p> 
1656         */
1657        public CodeableConceptDt getSubstance() {  
1658                if (mySubstance == null) {
1659                        mySubstance = new CodeableConceptDt();
1660                }
1661                return mySubstance;
1662        }
1663
1664        /**
1665         * Sets the value(s) for <b>substance</b> ()
1666         *
1667     * <p>
1668     * <b>Definition:</b>
1669     * 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
1670     * </p> 
1671         */
1672        public Reaction setSubstance(CodeableConceptDt theValue) {
1673                mySubstance = theValue;
1674                return this;
1675        }
1676        
1677        
1678
1679  
1680        /**
1681         * Gets the value(s) for <b>certainty</b> ().
1682         * creating it if it does
1683         * not exist. Will not return <code>null</code>.
1684         *
1685     * <p>
1686     * <b>Definition:</b>
1687     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1688     * </p> 
1689         */
1690        public BoundCodeDt<AllergyIntoleranceCertaintyEnum> getCertaintyElement() {  
1691                if (myCertainty == null) {
1692                        myCertainty = new BoundCodeDt<AllergyIntoleranceCertaintyEnum>(AllergyIntoleranceCertaintyEnum.VALUESET_BINDER);
1693                }
1694                return myCertainty;
1695        }
1696
1697        
1698        /**
1699         * Gets the value(s) for <b>certainty</b> ().
1700         * creating it if it does
1701         * not exist. This method may return <code>null</code>.
1702         *
1703     * <p>
1704     * <b>Definition:</b>
1705     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1706     * </p> 
1707         */
1708        public String getCertainty() {  
1709                return getCertaintyElement().getValue();
1710        }
1711
1712        /**
1713         * Sets the value(s) for <b>certainty</b> ()
1714         *
1715     * <p>
1716     * <b>Definition:</b>
1717     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1718     * </p> 
1719         */
1720        public Reaction setCertainty(BoundCodeDt<AllergyIntoleranceCertaintyEnum> theValue) {
1721                myCertainty = theValue;
1722                return this;
1723        }
1724        
1725        
1726
1727        /**
1728         * Sets the value(s) for <b>certainty</b> ()
1729         *
1730     * <p>
1731     * <b>Definition:</b>
1732     * Statement about the degree of clinical certainty that the specific substance was the cause of the manifestation in this reaction event
1733     * </p> 
1734         */
1735        public Reaction setCertainty(AllergyIntoleranceCertaintyEnum theValue) {
1736                setCertainty(new BoundCodeDt<AllergyIntoleranceCertaintyEnum>(AllergyIntoleranceCertaintyEnum.VALUESET_BINDER, theValue));
1737                
1738/*
1739                getCertaintyElement().setValueAsEnum(theValue);
1740*/
1741                return this;
1742        }
1743
1744  
1745        /**
1746         * Gets the value(s) for <b>manifestation</b> ().
1747         * creating it if it does
1748         * not exist. Will not return <code>null</code>.
1749         *
1750     * <p>
1751     * <b>Definition:</b>
1752     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1753     * </p> 
1754         */
1755        public java.util.List<CodeableConceptDt> getManifestation() {  
1756                if (myManifestation == null) {
1757                        myManifestation = new java.util.ArrayList<CodeableConceptDt>();
1758                }
1759                return myManifestation;
1760        }
1761
1762        /**
1763         * Sets the value(s) for <b>manifestation</b> ()
1764         *
1765     * <p>
1766     * <b>Definition:</b>
1767     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1768     * </p> 
1769         */
1770        public Reaction setManifestation(java.util.List<CodeableConceptDt> theValue) {
1771                myManifestation = theValue;
1772                return this;
1773        }
1774        
1775        
1776
1777        /**
1778         * Adds and returns a new value for <b>manifestation</b> ()
1779         *
1780     * <p>
1781     * <b>Definition:</b>
1782     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1783     * </p> 
1784         */
1785        public CodeableConceptDt addManifestation() {
1786                CodeableConceptDt newType = new CodeableConceptDt();
1787                getManifestation().add(newType);
1788                return newType; 
1789        }
1790
1791        /**
1792         * Adds a given new value for <b>manifestation</b> ()
1793         *
1794         * <p>
1795         * <b>Definition:</b>
1796         * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1797         * </p>
1798         * @param theValue The manifestation to add (must not be <code>null</code>)
1799         */
1800        public Reaction addManifestation(CodeableConceptDt theValue) {
1801                if (theValue == null) {
1802                        throw new NullPointerException("theValue must not be null");
1803                }
1804                getManifestation().add(theValue);
1805                return this;
1806        }
1807
1808        /**
1809         * Gets the first repetition for <b>manifestation</b> (),
1810         * creating it if it does not already exist.
1811         *
1812     * <p>
1813     * <b>Definition:</b>
1814     * Clinical symptoms and/or signs that are observed or associated with the adverse reaction event
1815     * </p> 
1816         */
1817        public CodeableConceptDt getManifestationFirstRep() {
1818                if (getManifestation().isEmpty()) {
1819                        return addManifestation();
1820                }
1821                return getManifestation().get(0); 
1822        }
1823  
1824        /**
1825         * Gets the value(s) for <b>description</b> ().
1826         * creating it if it does
1827         * not exist. Will not return <code>null</code>.
1828         *
1829     * <p>
1830     * <b>Definition:</b>
1831     * Text description about the reaction as a whole, including details of the manifestation if required
1832     * </p> 
1833         */
1834        public StringDt getDescriptionElement() {  
1835                if (myDescription == null) {
1836                        myDescription = new StringDt();
1837                }
1838                return myDescription;
1839        }
1840
1841        
1842        /**
1843         * Gets the value(s) for <b>description</b> ().
1844         * creating it if it does
1845         * not exist. This method may return <code>null</code>.
1846         *
1847     * <p>
1848     * <b>Definition:</b>
1849     * Text description about the reaction as a whole, including details of the manifestation if required
1850     * </p> 
1851         */
1852        public String getDescription() {  
1853                return getDescriptionElement().getValue();
1854        }
1855
1856        /**
1857         * Sets the value(s) for <b>description</b> ()
1858         *
1859     * <p>
1860     * <b>Definition:</b>
1861     * Text description about the reaction as a whole, including details of the manifestation if required
1862     * </p> 
1863         */
1864        public Reaction setDescription(StringDt theValue) {
1865                myDescription = theValue;
1866                return this;
1867        }
1868        
1869        
1870
1871        /**
1872         * Sets the value for <b>description</b> ()
1873         *
1874     * <p>
1875     * <b>Definition:</b>
1876     * Text description about the reaction as a whole, including details of the manifestation if required
1877     * </p> 
1878         */
1879        public Reaction setDescription( String theString) {
1880                myDescription = new StringDt(theString); 
1881                return this; 
1882        }
1883
1884 
1885        /**
1886         * Gets the value(s) for <b>onset</b> ().
1887         * creating it if it does
1888         * not exist. Will not return <code>null</code>.
1889         *
1890     * <p>
1891     * <b>Definition:</b>
1892     * Record of the date and/or time of the onset of the Reaction
1893     * </p> 
1894         */
1895        public DateTimeDt getOnsetElement() {  
1896                if (myOnset == null) {
1897                        myOnset = new DateTimeDt();
1898                }
1899                return myOnset;
1900        }
1901
1902        
1903        /**
1904         * Gets the value(s) for <b>onset</b> ().
1905         * creating it if it does
1906         * not exist. This method may return <code>null</code>.
1907         *
1908     * <p>
1909     * <b>Definition:</b>
1910     * Record of the date and/or time of the onset of the Reaction
1911     * </p> 
1912         */
1913        public Date getOnset() {  
1914                return getOnsetElement().getValue();
1915        }
1916
1917        /**
1918         * Sets the value(s) for <b>onset</b> ()
1919         *
1920     * <p>
1921     * <b>Definition:</b>
1922     * Record of the date and/or time of the onset of the Reaction
1923     * </p> 
1924         */
1925        public Reaction setOnset(DateTimeDt theValue) {
1926                myOnset = theValue;
1927                return this;
1928        }
1929        
1930        
1931
1932        /**
1933         * Sets the value for <b>onset</b> ()
1934         *
1935     * <p>
1936     * <b>Definition:</b>
1937     * Record of the date and/or time of the onset of the Reaction
1938     * </p> 
1939         */
1940        public Reaction setOnset( Date theDate,  TemporalPrecisionEnum thePrecision) {
1941                myOnset = new DateTimeDt(theDate, thePrecision); 
1942                return this; 
1943        }
1944
1945        /**
1946         * Sets the value for <b>onset</b> ()
1947         *
1948     * <p>
1949     * <b>Definition:</b>
1950     * Record of the date and/or time of the onset of the Reaction
1951     * </p> 
1952         */
1953        public Reaction setOnsetWithSecondsPrecision( Date theDate) {
1954                myOnset = new DateTimeDt(theDate); 
1955                return this; 
1956        }
1957
1958 
1959        /**
1960         * Gets the value(s) for <b>severity</b> ().
1961         * creating it if it does
1962         * not exist. Will not return <code>null</code>.
1963         *
1964     * <p>
1965     * <b>Definition:</b>
1966     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
1967     * </p> 
1968         */
1969        public BoundCodeDt<AllergyIntoleranceSeverityEnum> getSeverityElement() {  
1970                if (mySeverity == null) {
1971                        mySeverity = new BoundCodeDt<AllergyIntoleranceSeverityEnum>(AllergyIntoleranceSeverityEnum.VALUESET_BINDER);
1972                }
1973                return mySeverity;
1974        }
1975
1976        
1977        /**
1978         * Gets the value(s) for <b>severity</b> ().
1979         * creating it if it does
1980         * not exist. This method may return <code>null</code>.
1981         *
1982     * <p>
1983     * <b>Definition:</b>
1984     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
1985     * </p> 
1986         */
1987        public String getSeverity() {  
1988                return getSeverityElement().getValue();
1989        }
1990
1991        /**
1992         * Sets the value(s) for <b>severity</b> ()
1993         *
1994     * <p>
1995     * <b>Definition:</b>
1996     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
1997     * </p> 
1998         */
1999        public Reaction setSeverity(BoundCodeDt<AllergyIntoleranceSeverityEnum> theValue) {
2000                mySeverity = theValue;
2001                return this;
2002        }
2003        
2004        
2005
2006        /**
2007         * Sets the value(s) for <b>severity</b> ()
2008         *
2009     * <p>
2010     * <b>Definition:</b>
2011     * Clinical assessment of the severity of the reaction event as a whole, potentially considering multiple different manifestations
2012     * </p> 
2013         */
2014        public Reaction setSeverity(AllergyIntoleranceSeverityEnum theValue) {
2015                setSeverity(new BoundCodeDt<AllergyIntoleranceSeverityEnum>(AllergyIntoleranceSeverityEnum.VALUESET_BINDER, theValue));
2016                
2017/*
2018                getSeverityElement().setValueAsEnum(theValue);
2019*/
2020                return this;
2021        }
2022
2023  
2024        /**
2025         * Gets the value(s) for <b>exposureRoute</b> ().
2026         * creating it if it does
2027         * not exist. Will not return <code>null</code>.
2028         *
2029     * <p>
2030     * <b>Definition:</b>
2031     * Identification of the route by which the subject was exposed to the substance.
2032     * </p> 
2033         */
2034        public CodeableConceptDt getExposureRoute() {  
2035                if (myExposureRoute == null) {
2036                        myExposureRoute = new CodeableConceptDt();
2037                }
2038                return myExposureRoute;
2039        }
2040
2041        /**
2042         * Sets the value(s) for <b>exposureRoute</b> ()
2043         *
2044     * <p>
2045     * <b>Definition:</b>
2046     * Identification of the route by which the subject was exposed to the substance.
2047     * </p> 
2048         */
2049        public Reaction setExposureRoute(CodeableConceptDt theValue) {
2050                myExposureRoute = theValue;
2051                return this;
2052        }
2053        
2054        
2055
2056  
2057        /**
2058         * Gets the value(s) for <b>note</b> ().
2059         * creating it if it does
2060         * not exist. Will not return <code>null</code>.
2061         *
2062     * <p>
2063     * <b>Definition:</b>
2064     * Additional text about the adverse reaction event not captured in other fields
2065     * </p> 
2066         */
2067        public AnnotationDt getNote() {  
2068                if (myNote == null) {
2069                        myNote = new AnnotationDt();
2070                }
2071                return myNote;
2072        }
2073
2074        /**
2075         * Sets the value(s) for <b>note</b> ()
2076         *
2077     * <p>
2078     * <b>Definition:</b>
2079     * Additional text about the adverse reaction event not captured in other fields
2080     * </p> 
2081         */
2082        public Reaction setNote(AnnotationDt theValue) {
2083                myNote = theValue;
2084                return this;
2085        }
2086        
2087        
2088
2089  
2090
2091
2092        }
2093
2094
2095
2096
2097    @Override
2098    public String getResourceName() {
2099        return "AllergyIntolerance";
2100    }
2101    
2102    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2103        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2104    }
2105
2106
2107}