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>CommunicationRequest</b> Resource
320 * ()
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/CommunicationRequest">http://hl7.org/fhir/profiles/CommunicationRequest</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="CommunicationRequest", profile="http://hl7.org/fhir/profiles/CommunicationRequest", id="communicationrequest")
339public class CommunicationRequest extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>identifier</b>
344         * <p>
345         * Description: <b></b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>CommunicationRequest.identifier</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="", type="token"  )
351        public static final String SP_IDENTIFIER = "identifier";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>CommunicationRequest.identifier</b><br>
359         * </p>
360         */
361        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
362
363        /**
364         * Search parameter constant for <b>category</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>token</b><br>
368         * Path: <b>CommunicationRequest.category</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="", type="token"  )
372        public static final String SP_CATEGORY = "category";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>category</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>token</b><br>
379         * Path: <b>CommunicationRequest.category</b><br>
380         * </p>
381         */
382        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
383
384        /**
385         * Search parameter constant for <b>sender</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>reference</b><br>
389         * Path: <b>CommunicationRequest.sender</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="", type="reference"  )
393        public static final String SP_SENDER = "sender";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>sender</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>reference</b><br>
400         * Path: <b>CommunicationRequest.sender</b><br>
401         * </p>
402         */
403        public static final ReferenceClientParam SENDER = new ReferenceClientParam(SP_SENDER);
404
405        /**
406         * Search parameter constant for <b>recipient</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>CommunicationRequest.recipient</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="", type="reference"  )
414        public static final String SP_RECIPIENT = "recipient";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>reference</b><br>
421         * Path: <b>CommunicationRequest.recipient</b><br>
422         * </p>
423         */
424        public static final ReferenceClientParam RECIPIENT = new ReferenceClientParam(SP_RECIPIENT);
425
426        /**
427         * Search parameter constant for <b>medium</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>token</b><br>
431         * Path: <b>CommunicationRequest.medium</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="", type="token"  )
435        public static final String SP_MEDIUM = "medium";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>medium</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>CommunicationRequest.medium</b><br>
443         * </p>
444         */
445        public static final TokenClientParam MEDIUM = new TokenClientParam(SP_MEDIUM);
446
447        /**
448         * Search parameter constant for <b>requester</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>reference</b><br>
452         * Path: <b>CommunicationRequest.requester</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="requester", path="CommunicationRequest.requester", description="", type="reference"  )
456        public static final String SP_REQUESTER = "requester";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>requester</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>reference</b><br>
463         * Path: <b>CommunicationRequest.requester</b><br>
464         * </p>
465         */
466        public static final ReferenceClientParam REQUESTER = new ReferenceClientParam(SP_REQUESTER);
467
468        /**
469         * Search parameter constant for <b>status</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>CommunicationRequest.status</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="", type="token"  )
477        public static final String SP_STATUS = "status";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>status</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>CommunicationRequest.status</b><br>
485         * </p>
486         */
487        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
488
489        /**
490         * Search parameter constant for <b>encounter</b>
491         * <p>
492         * Description: <b></b><br>
493         * Type: <b>reference</b><br>
494         * Path: <b>CommunicationRequest.encounter</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="", type="reference"  )
498        public static final String SP_ENCOUNTER = "encounter";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
502         * <p>
503         * Description: <b></b><br>
504         * Type: <b>reference</b><br>
505         * Path: <b>CommunicationRequest.encounter</b><br>
506         * </p>
507         */
508        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
509
510        /**
511         * Search parameter constant for <b>time</b>
512         * <p>
513         * Description: <b></b><br>
514         * Type: <b>date</b><br>
515         * Path: <b>CommunicationRequest.scheduledDateTime</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="time", path="CommunicationRequest.scheduledDateTime", description="", type="date"  )
519        public static final String SP_TIME = "time";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>time</b>
523         * <p>
524         * Description: <b></b><br>
525         * Type: <b>date</b><br>
526         * Path: <b>CommunicationRequest.scheduledDateTime</b><br>
527         * </p>
528         */
529        public static final DateClientParam TIME = new DateClientParam(SP_TIME);
530
531        /**
532         * Search parameter constant for <b>requested</b>
533         * <p>
534         * Description: <b></b><br>
535         * Type: <b>date</b><br>
536         * Path: <b>CommunicationRequest.requestedOn</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="requested", path="CommunicationRequest.requestedOn", description="", type="date"  )
540        public static final String SP_REQUESTED = "requested";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>requested</b>
544         * <p>
545         * Description: <b></b><br>
546         * Type: <b>date</b><br>
547         * Path: <b>CommunicationRequest.requestedOn</b><br>
548         * </p>
549         */
550        public static final DateClientParam REQUESTED = new DateClientParam(SP_REQUESTED);
551
552        /**
553         * Search parameter constant for <b>subject</b>
554         * <p>
555         * Description: <b></b><br>
556         * Type: <b>reference</b><br>
557         * Path: <b>CommunicationRequest.subject</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="", type="reference"  )
561        public static final String SP_SUBJECT = "subject";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
565         * <p>
566         * Description: <b></b><br>
567         * Type: <b>reference</b><br>
568         * Path: <b>CommunicationRequest.subject</b><br>
569         * </p>
570         */
571        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
572
573        /**
574         * Search parameter constant for <b>priority</b>
575         * <p>
576         * Description: <b></b><br>
577         * Type: <b>token</b><br>
578         * Path: <b>CommunicationRequest.priority</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="", type="token"  )
582        public static final String SP_PRIORITY = "priority";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>priority</b>
586         * <p>
587         * Description: <b></b><br>
588         * Type: <b>token</b><br>
589         * Path: <b>CommunicationRequest.priority</b><br>
590         * </p>
591         */
592        public static final TokenClientParam PRIORITY = new TokenClientParam(SP_PRIORITY);
593
594        /**
595         * Search parameter constant for <b>patient</b>
596         * <p>
597         * Description: <b></b><br>
598         * Type: <b>reference</b><br>
599         * Path: <b>CommunicationRequest.subject</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="", type="reference"  )
603        public static final String SP_PATIENT = "patient";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
607         * <p>
608         * Description: <b></b><br>
609         * Type: <b>reference</b><br>
610         * Path: <b>CommunicationRequest.subject</b><br>
611         * </p>
612         */
613        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
614
615
616        /**
617         * Constant for fluent queries to be used to add include statements. Specifies
618         * the path value of "<b>CommunicationRequest:encounter</b>".
619         */
620        public static final Include INCLUDE_ENCOUNTER = new Include("CommunicationRequest:encounter");
621
622        /**
623         * Constant for fluent queries to be used to add include statements. Specifies
624         * the path value of "<b>CommunicationRequest:patient</b>".
625         */
626        public static final Include INCLUDE_PATIENT = new Include("CommunicationRequest:patient");
627
628        /**
629         * Constant for fluent queries to be used to add include statements. Specifies
630         * the path value of "<b>CommunicationRequest:recipient</b>".
631         */
632        public static final Include INCLUDE_RECIPIENT = new Include("CommunicationRequest:recipient");
633
634        /**
635         * Constant for fluent queries to be used to add include statements. Specifies
636         * the path value of "<b>CommunicationRequest:requester</b>".
637         */
638        public static final Include INCLUDE_REQUESTER = new Include("CommunicationRequest:requester");
639
640        /**
641         * Constant for fluent queries to be used to add include statements. Specifies
642         * the path value of "<b>CommunicationRequest:sender</b>".
643         */
644        public static final Include INCLUDE_SENDER = new Include("CommunicationRequest:sender");
645
646        /**
647         * Constant for fluent queries to be used to add include statements. Specifies
648         * the path value of "<b>CommunicationRequest:subject</b>".
649         */
650        public static final Include INCLUDE_SUBJECT = new Include("CommunicationRequest:subject");
651
652
653        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
654        @Description(
655                shortDefinition="",
656                formalDefinition="A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system."
657        )
658        private java.util.List<IdentifierDt> myIdentifier;
659        
660        @Child(name="category", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=false, modifier=false)     
661        @Description(
662                shortDefinition="",
663                formalDefinition="The type of message to be sent such as alert, notification, reminder, instruction, etc."
664        )
665        private CodeableConceptDt myCategory;
666        
667        @Child(name="sender", order=2, min=0, max=1, summary=false, modifier=false, type={
668                ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Organization.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class    })
669        @Description(
670                shortDefinition="",
671                formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication"
672        )
673        private ResourceReferenceDt mySender;
674        
675        @Child(name="recipient", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
676                ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Organization.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class    })
677        @Description(
678                shortDefinition="",
679                formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication"
680        )
681        private java.util.List<ResourceReferenceDt> myRecipient;
682        
683        @Child(name="payload", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
684        @Description(
685                shortDefinition="",
686                formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient"
687        )
688        private java.util.List<Payload> myPayload;
689        
690        @Child(name="medium", type=CodeableConceptDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
691        @Description(
692                shortDefinition="",
693                formalDefinition="A channel that was used for this communication (e.g. email, fax)."
694        )
695        private java.util.List<CodeableConceptDt> myMedium;
696        
697        @Child(name="requester", order=6, min=0, max=1, summary=false, modifier=false, type={
698                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class    })
699        @Description(
700                shortDefinition="",
701                formalDefinition="The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application."
702        )
703        private ResourceReferenceDt myRequester;
704        
705        @Child(name="status", type=CodeDt.class, order=7, min=0, max=1, summary=false, modifier=true)   
706        @Description(
707                shortDefinition="",
708                formalDefinition="The status of the proposal or order."
709        )
710        private BoundCodeDt<CommunicationRequestStatusEnum> myStatus;
711        
712        @Child(name="encounter", order=8, min=0, max=1, summary=false, modifier=false, type={
713                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
714        @Description(
715                shortDefinition="",
716                formalDefinition="The encounter within which the communication request was created."
717        )
718        private ResourceReferenceDt myEncounter;
719        
720        @Child(name="scheduled", order=9, min=0, max=1, summary=false, modifier=false, type={
721                DateTimeDt.class,               PeriodDt.class  })
722        @Description(
723                shortDefinition="",
724                formalDefinition="The time when this communication is to occur."
725        )
726        private IDatatype myScheduled;
727        
728        @Child(name="reason", type=CodeableConceptDt.class, order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
729        @Description(
730                shortDefinition="",
731                formalDefinition="The reason or justification for the communication request."
732        )
733        private java.util.List<CodeableConceptDt> myReason;
734        
735        @Child(name="requestedOn", type=DateTimeDt.class, order=11, min=0, max=1, summary=false, modifier=false)        
736        @Description(
737                shortDefinition="",
738                formalDefinition="The time when the request was made."
739        )
740        private DateTimeDt myRequestedOn;
741        
742        @Child(name="subject", order=12, min=0, max=1, summary=false, modifier=false, type={
743                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
744        @Description(
745                shortDefinition="",
746                formalDefinition="The patient who is the focus of this communication request."
747        )
748        private ResourceReferenceDt mySubject;
749        
750        @Child(name="priority", type=CodeableConceptDt.class, order=13, min=0, max=1, summary=false, modifier=false)    
751        @Description(
752                shortDefinition="",
753                formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine."
754        )
755        private CodeableConceptDt myPriority;
756        
757
758        @Override
759        public boolean isEmpty() {
760                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myCategory,  mySender,  myRecipient,  myPayload,  myMedium,  myRequester,  myStatus,  myEncounter,  myScheduled,  myReason,  myRequestedOn,  mySubject,  myPriority);
761        }
762        
763        @Override
764        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
765                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCategory, mySender, myRecipient, myPayload, myMedium, myRequester, myStatus, myEncounter, myScheduled, myReason, myRequestedOn, mySubject, myPriority);
766        }
767
768        /**
769         * Gets the value(s) for <b>identifier</b> ().
770         * creating it if it does
771         * not exist. Will not return <code>null</code>.
772         *
773     * <p>
774     * <b>Definition:</b>
775     * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.
776     * </p> 
777         */
778        public java.util.List<IdentifierDt> getIdentifier() {  
779                if (myIdentifier == null) {
780                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
781                }
782                return myIdentifier;
783        }
784
785        /**
786         * Sets the value(s) for <b>identifier</b> ()
787         *
788     * <p>
789     * <b>Definition:</b>
790     * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.
791     * </p> 
792         */
793        public CommunicationRequest setIdentifier(java.util.List<IdentifierDt> theValue) {
794                myIdentifier = theValue;
795                return this;
796        }
797        
798        
799
800        /**
801         * Adds and returns a new value for <b>identifier</b> ()
802         *
803     * <p>
804     * <b>Definition:</b>
805     * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.
806     * </p> 
807         */
808        public IdentifierDt addIdentifier() {
809                IdentifierDt newType = new IdentifierDt();
810                getIdentifier().add(newType);
811                return newType; 
812        }
813
814        /**
815         * Adds a given new value for <b>identifier</b> ()
816         *
817         * <p>
818         * <b>Definition:</b>
819         * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.
820         * </p>
821         * @param theValue The identifier to add (must not be <code>null</code>)
822         */
823        public CommunicationRequest addIdentifier(IdentifierDt theValue) {
824                if (theValue == null) {
825                        throw new NullPointerException("theValue must not be null");
826                }
827                getIdentifier().add(theValue);
828                return this;
829        }
830
831        /**
832         * Gets the first repetition for <b>identifier</b> (),
833         * creating it if it does not already exist.
834         *
835     * <p>
836     * <b>Definition:</b>
837     * A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be autogenerated, if needed, by CDS system. Does not need to be the actual ID of the source system.
838     * </p> 
839         */
840        public IdentifierDt getIdentifierFirstRep() {
841                if (getIdentifier().isEmpty()) {
842                        return addIdentifier();
843                }
844                return getIdentifier().get(0); 
845        }
846  
847        /**
848         * Gets the value(s) for <b>category</b> ().
849         * creating it if it does
850         * not exist. Will not return <code>null</code>.
851         *
852     * <p>
853     * <b>Definition:</b>
854     * The type of message to be sent such as alert, notification, reminder, instruction, etc.
855     * </p> 
856         */
857        public CodeableConceptDt getCategory() {  
858                if (myCategory == null) {
859                        myCategory = new CodeableConceptDt();
860                }
861                return myCategory;
862        }
863
864        /**
865         * Sets the value(s) for <b>category</b> ()
866         *
867     * <p>
868     * <b>Definition:</b>
869     * The type of message to be sent such as alert, notification, reminder, instruction, etc.
870     * </p> 
871         */
872        public CommunicationRequest setCategory(CodeableConceptDt theValue) {
873                myCategory = theValue;
874                return this;
875        }
876        
877        
878
879  
880        /**
881         * Gets the value(s) for <b>sender</b> ().
882         * creating it if it does
883         * not exist. Will not return <code>null</code>.
884         *
885     * <p>
886     * <b>Definition:</b>
887     * The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication
888     * </p> 
889         */
890        public ResourceReferenceDt getSender() {  
891                if (mySender == null) {
892                        mySender = new ResourceReferenceDt();
893                }
894                return mySender;
895        }
896
897        /**
898         * Sets the value(s) for <b>sender</b> ()
899         *
900     * <p>
901     * <b>Definition:</b>
902     * The entity (e.g. person, organization, clinical information system, or device) which is to be the source of the communication
903     * </p> 
904         */
905        public CommunicationRequest setSender(ResourceReferenceDt theValue) {
906                mySender = theValue;
907                return this;
908        }
909        
910        
911
912  
913        /**
914         * Gets the value(s) for <b>recipient</b> ().
915         * creating it if it does
916         * not exist. Will not return <code>null</code>.
917         *
918     * <p>
919     * <b>Definition:</b>
920     * The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication
921     * </p> 
922         */
923        public java.util.List<ResourceReferenceDt> getRecipient() {  
924                if (myRecipient == null) {
925                        myRecipient = new java.util.ArrayList<ResourceReferenceDt>();
926                }
927                return myRecipient;
928        }
929
930        /**
931         * Sets the value(s) for <b>recipient</b> ()
932         *
933     * <p>
934     * <b>Definition:</b>
935     * The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication
936     * </p> 
937         */
938        public CommunicationRequest setRecipient(java.util.List<ResourceReferenceDt> theValue) {
939                myRecipient = theValue;
940                return this;
941        }
942        
943        
944
945        /**
946         * Adds and returns a new value for <b>recipient</b> ()
947         *
948     * <p>
949     * <b>Definition:</b>
950     * The entity (e.g. person, organization, clinical information system, or device) which is the intended target of the communication
951     * </p> 
952         */
953        public ResourceReferenceDt addRecipient() {
954                ResourceReferenceDt newType = new ResourceReferenceDt();
955                getRecipient().add(newType);
956                return newType; 
957        }
958  
959        /**
960         * Gets the value(s) for <b>payload</b> ().
961         * creating it if it does
962         * not exist. Will not return <code>null</code>.
963         *
964     * <p>
965     * <b>Definition:</b>
966     * Text, attachment(s), or resource(s) to be communicated to the recipient
967     * </p> 
968         */
969        public java.util.List<Payload> getPayload() {  
970                if (myPayload == null) {
971                        myPayload = new java.util.ArrayList<Payload>();
972                }
973                return myPayload;
974        }
975
976        /**
977         * Sets the value(s) for <b>payload</b> ()
978         *
979     * <p>
980     * <b>Definition:</b>
981     * Text, attachment(s), or resource(s) to be communicated to the recipient
982     * </p> 
983         */
984        public CommunicationRequest setPayload(java.util.List<Payload> theValue) {
985                myPayload = theValue;
986                return this;
987        }
988        
989        
990
991        /**
992         * Adds and returns a new value for <b>payload</b> ()
993         *
994     * <p>
995     * <b>Definition:</b>
996     * Text, attachment(s), or resource(s) to be communicated to the recipient
997     * </p> 
998         */
999        public Payload addPayload() {
1000                Payload newType = new Payload();
1001                getPayload().add(newType);
1002                return newType; 
1003        }
1004
1005        /**
1006         * Adds a given new value for <b>payload</b> ()
1007         *
1008         * <p>
1009         * <b>Definition:</b>
1010         * Text, attachment(s), or resource(s) to be communicated to the recipient
1011         * </p>
1012         * @param theValue The payload to add (must not be <code>null</code>)
1013         */
1014        public CommunicationRequest addPayload(Payload theValue) {
1015                if (theValue == null) {
1016                        throw new NullPointerException("theValue must not be null");
1017                }
1018                getPayload().add(theValue);
1019                return this;
1020        }
1021
1022        /**
1023         * Gets the first repetition for <b>payload</b> (),
1024         * creating it if it does not already exist.
1025         *
1026     * <p>
1027     * <b>Definition:</b>
1028     * Text, attachment(s), or resource(s) to be communicated to the recipient
1029     * </p> 
1030         */
1031        public Payload getPayloadFirstRep() {
1032                if (getPayload().isEmpty()) {
1033                        return addPayload();
1034                }
1035                return getPayload().get(0); 
1036        }
1037  
1038        /**
1039         * Gets the value(s) for <b>medium</b> ().
1040         * creating it if it does
1041         * not exist. Will not return <code>null</code>.
1042         *
1043     * <p>
1044     * <b>Definition:</b>
1045     * A channel that was used for this communication (e.g. email, fax).
1046     * </p> 
1047         */
1048        public java.util.List<CodeableConceptDt> getMedium() {  
1049                if (myMedium == null) {
1050                        myMedium = new java.util.ArrayList<CodeableConceptDt>();
1051                }
1052                return myMedium;
1053        }
1054
1055        /**
1056         * Sets the value(s) for <b>medium</b> ()
1057         *
1058     * <p>
1059     * <b>Definition:</b>
1060     * A channel that was used for this communication (e.g. email, fax).
1061     * </p> 
1062         */
1063        public CommunicationRequest setMedium(java.util.List<CodeableConceptDt> theValue) {
1064                myMedium = theValue;
1065                return this;
1066        }
1067        
1068        
1069
1070        /**
1071         * Adds and returns a new value for <b>medium</b> ()
1072         *
1073     * <p>
1074     * <b>Definition:</b>
1075     * A channel that was used for this communication (e.g. email, fax).
1076     * </p> 
1077         */
1078        public CodeableConceptDt addMedium() {
1079                CodeableConceptDt newType = new CodeableConceptDt();
1080                getMedium().add(newType);
1081                return newType; 
1082        }
1083
1084        /**
1085         * Adds a given new value for <b>medium</b> ()
1086         *
1087         * <p>
1088         * <b>Definition:</b>
1089         * A channel that was used for this communication (e.g. email, fax).
1090         * </p>
1091         * @param theValue The medium to add (must not be <code>null</code>)
1092         */
1093        public CommunicationRequest addMedium(CodeableConceptDt theValue) {
1094                if (theValue == null) {
1095                        throw new NullPointerException("theValue must not be null");
1096                }
1097                getMedium().add(theValue);
1098                return this;
1099        }
1100
1101        /**
1102         * Gets the first repetition for <b>medium</b> (),
1103         * creating it if it does not already exist.
1104         *
1105     * <p>
1106     * <b>Definition:</b>
1107     * A channel that was used for this communication (e.g. email, fax).
1108     * </p> 
1109         */
1110        public CodeableConceptDt getMediumFirstRep() {
1111                if (getMedium().isEmpty()) {
1112                        return addMedium();
1113                }
1114                return getMedium().get(0); 
1115        }
1116  
1117        /**
1118         * Gets the value(s) for <b>requester</b> ().
1119         * creating it if it does
1120         * not exist. Will not return <code>null</code>.
1121         *
1122     * <p>
1123     * <b>Definition:</b>
1124     * The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.
1125     * </p> 
1126         */
1127        public ResourceReferenceDt getRequester() {  
1128                if (myRequester == null) {
1129                        myRequester = new ResourceReferenceDt();
1130                }
1131                return myRequester;
1132        }
1133
1134        /**
1135         * Sets the value(s) for <b>requester</b> ()
1136         *
1137     * <p>
1138     * <b>Definition:</b>
1139     * The responsible person who authorizes this order, e.g. physician. This may be different than the author of the order statement, e.g. clerk, who may have entered the statement into the order entry application.
1140     * </p> 
1141         */
1142        public CommunicationRequest setRequester(ResourceReferenceDt theValue) {
1143                myRequester = theValue;
1144                return this;
1145        }
1146        
1147        
1148
1149  
1150        /**
1151         * Gets the value(s) for <b>status</b> ().
1152         * creating it if it does
1153         * not exist. Will not return <code>null</code>.
1154         *
1155     * <p>
1156     * <b>Definition:</b>
1157     * The status of the proposal or order.
1158     * </p> 
1159         */
1160        public BoundCodeDt<CommunicationRequestStatusEnum> getStatusElement() {  
1161                if (myStatus == null) {
1162                        myStatus = new BoundCodeDt<CommunicationRequestStatusEnum>(CommunicationRequestStatusEnum.VALUESET_BINDER);
1163                }
1164                return myStatus;
1165        }
1166
1167        
1168        /**
1169         * Gets the value(s) for <b>status</b> ().
1170         * creating it if it does
1171         * not exist. Will not return <code>null</code>.
1172         *
1173     * <p>
1174     * <b>Definition:</b>
1175     * The status of the proposal or order.
1176     * </p> 
1177         */
1178        public String getStatus() {  
1179                return getStatusElement().getValue();
1180        }
1181
1182        /**
1183         * Sets the value(s) for <b>status</b> ()
1184         *
1185     * <p>
1186     * <b>Definition:</b>
1187     * The status of the proposal or order.
1188     * </p> 
1189         */
1190        public CommunicationRequest setStatus(BoundCodeDt<CommunicationRequestStatusEnum> theValue) {
1191                myStatus = theValue;
1192                return this;
1193        }
1194        
1195        
1196
1197        /**
1198         * Sets the value(s) for <b>status</b> ()
1199         *
1200     * <p>
1201     * <b>Definition:</b>
1202     * The status of the proposal or order.
1203     * </p> 
1204         */
1205        public CommunicationRequest setStatus(CommunicationRequestStatusEnum theValue) {
1206                setStatus(new BoundCodeDt<CommunicationRequestStatusEnum>(CommunicationRequestStatusEnum.VALUESET_BINDER, theValue));
1207                
1208/*
1209                getStatusElement().setValueAsEnum(theValue);
1210*/
1211                return this;
1212        }
1213
1214  
1215        /**
1216         * Gets the value(s) for <b>encounter</b> ().
1217         * creating it if it does
1218         * not exist. Will not return <code>null</code>.
1219         *
1220     * <p>
1221     * <b>Definition:</b>
1222     * The encounter within which the communication request was created.
1223     * </p> 
1224         */
1225        public ResourceReferenceDt getEncounter() {  
1226                if (myEncounter == null) {
1227                        myEncounter = new ResourceReferenceDt();
1228                }
1229                return myEncounter;
1230        }
1231
1232        /**
1233         * Sets the value(s) for <b>encounter</b> ()
1234         *
1235     * <p>
1236     * <b>Definition:</b>
1237     * The encounter within which the communication request was created.
1238     * </p> 
1239         */
1240        public CommunicationRequest setEncounter(ResourceReferenceDt theValue) {
1241                myEncounter = theValue;
1242                return this;
1243        }
1244        
1245        
1246
1247  
1248        /**
1249         * Gets the value(s) for <b>scheduled[x]</b> ().
1250         * creating it if it does
1251         * not exist. Will not return <code>null</code>.
1252         *
1253     * <p>
1254     * <b>Definition:</b>
1255     * The time when this communication is to occur.
1256     * </p> 
1257         */
1258        public IDatatype getScheduled() {  
1259                return myScheduled;
1260        }
1261
1262        /**
1263         * Sets the value(s) for <b>scheduled[x]</b> ()
1264         *
1265     * <p>
1266     * <b>Definition:</b>
1267     * The time when this communication is to occur.
1268     * </p> 
1269         */
1270        public CommunicationRequest setScheduled(IDatatype theValue) {
1271                myScheduled = theValue;
1272                return this;
1273        }
1274        
1275        
1276
1277  
1278        /**
1279         * Gets the value(s) for <b>reason</b> ().
1280         * creating it if it does
1281         * not exist. Will not return <code>null</code>.
1282         *
1283     * <p>
1284     * <b>Definition:</b>
1285     * The reason or justification for the communication request.
1286     * </p> 
1287         */
1288        public java.util.List<CodeableConceptDt> getReason() {  
1289                if (myReason == null) {
1290                        myReason = new java.util.ArrayList<CodeableConceptDt>();
1291                }
1292                return myReason;
1293        }
1294
1295        /**
1296         * Sets the value(s) for <b>reason</b> ()
1297         *
1298     * <p>
1299     * <b>Definition:</b>
1300     * The reason or justification for the communication request.
1301     * </p> 
1302         */
1303        public CommunicationRequest setReason(java.util.List<CodeableConceptDt> theValue) {
1304                myReason = theValue;
1305                return this;
1306        }
1307        
1308        
1309
1310        /**
1311         * Adds and returns a new value for <b>reason</b> ()
1312         *
1313     * <p>
1314     * <b>Definition:</b>
1315     * The reason or justification for the communication request.
1316     * </p> 
1317         */
1318        public CodeableConceptDt addReason() {
1319                CodeableConceptDt newType = new CodeableConceptDt();
1320                getReason().add(newType);
1321                return newType; 
1322        }
1323
1324        /**
1325         * Adds a given new value for <b>reason</b> ()
1326         *
1327         * <p>
1328         * <b>Definition:</b>
1329         * The reason or justification for the communication request.
1330         * </p>
1331         * @param theValue The reason to add (must not be <code>null</code>)
1332         */
1333        public CommunicationRequest addReason(CodeableConceptDt theValue) {
1334                if (theValue == null) {
1335                        throw new NullPointerException("theValue must not be null");
1336                }
1337                getReason().add(theValue);
1338                return this;
1339        }
1340
1341        /**
1342         * Gets the first repetition for <b>reason</b> (),
1343         * creating it if it does not already exist.
1344         *
1345     * <p>
1346     * <b>Definition:</b>
1347     * The reason or justification for the communication request.
1348     * </p> 
1349         */
1350        public CodeableConceptDt getReasonFirstRep() {
1351                if (getReason().isEmpty()) {
1352                        return addReason();
1353                }
1354                return getReason().get(0); 
1355        }
1356  
1357        /**
1358         * Gets the value(s) for <b>requestedOn</b> ().
1359         * creating it if it does
1360         * not exist. Will not return <code>null</code>.
1361         *
1362     * <p>
1363     * <b>Definition:</b>
1364     * The time when the request was made.
1365     * </p> 
1366         */
1367        public DateTimeDt getRequestedOnElement() {  
1368                if (myRequestedOn == null) {
1369                        myRequestedOn = new DateTimeDt();
1370                }
1371                return myRequestedOn;
1372        }
1373
1374        
1375        /**
1376         * Gets the value(s) for <b>requestedOn</b> ().
1377         * creating it if it does
1378         * not exist. Will not return <code>null</code>.
1379         *
1380     * <p>
1381     * <b>Definition:</b>
1382     * The time when the request was made.
1383     * </p> 
1384         */
1385        public Date getRequestedOn() {  
1386                return getRequestedOnElement().getValue();
1387        }
1388
1389        /**
1390         * Sets the value(s) for <b>requestedOn</b> ()
1391         *
1392     * <p>
1393     * <b>Definition:</b>
1394     * The time when the request was made.
1395     * </p> 
1396         */
1397        public CommunicationRequest setRequestedOn(DateTimeDt theValue) {
1398                myRequestedOn = theValue;
1399                return this;
1400        }
1401        
1402        
1403
1404        /**
1405         * Sets the value for <b>requestedOn</b> ()
1406         *
1407     * <p>
1408     * <b>Definition:</b>
1409     * The time when the request was made.
1410     * </p> 
1411         */
1412        public CommunicationRequest setRequestedOn( Date theDate,  TemporalPrecisionEnum thePrecision) {
1413                myRequestedOn = new DateTimeDt(theDate, thePrecision); 
1414                return this; 
1415        }
1416
1417        /**
1418         * Sets the value for <b>requestedOn</b> ()
1419         *
1420     * <p>
1421     * <b>Definition:</b>
1422     * The time when the request was made.
1423     * </p> 
1424         */
1425        public CommunicationRequest setRequestedOnWithSecondsPrecision( Date theDate) {
1426                myRequestedOn = new DateTimeDt(theDate); 
1427                return this; 
1428        }
1429
1430 
1431        /**
1432         * Gets the value(s) for <b>subject</b> ().
1433         * creating it if it does
1434         * not exist. Will not return <code>null</code>.
1435         *
1436     * <p>
1437     * <b>Definition:</b>
1438     * The patient who is the focus of this communication request.
1439     * </p> 
1440         */
1441        public ResourceReferenceDt getSubject() {  
1442                if (mySubject == null) {
1443                        mySubject = new ResourceReferenceDt();
1444                }
1445                return mySubject;
1446        }
1447
1448        /**
1449         * Sets the value(s) for <b>subject</b> ()
1450         *
1451     * <p>
1452     * <b>Definition:</b>
1453     * The patient who is the focus of this communication request.
1454     * </p> 
1455         */
1456        public CommunicationRequest setSubject(ResourceReferenceDt theValue) {
1457                mySubject = theValue;
1458                return this;
1459        }
1460        
1461        
1462
1463  
1464        /**
1465         * Gets the value(s) for <b>priority</b> ().
1466         * creating it if it does
1467         * not exist. Will not return <code>null</code>.
1468         *
1469     * <p>
1470     * <b>Definition:</b>
1471     * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.
1472     * </p> 
1473         */
1474        public CodeableConceptDt getPriority() {  
1475                if (myPriority == null) {
1476                        myPriority = new CodeableConceptDt();
1477                }
1478                return myPriority;
1479        }
1480
1481        /**
1482         * Sets the value(s) for <b>priority</b> ()
1483         *
1484     * <p>
1485     * <b>Definition:</b>
1486     * Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.
1487     * </p> 
1488         */
1489        public CommunicationRequest setPriority(CodeableConceptDt theValue) {
1490                myPriority = theValue;
1491                return this;
1492        }
1493        
1494        
1495
1496  
1497        /**
1498         * Block class for child element: <b>CommunicationRequest.payload</b> ()
1499         *
1500     * <p>
1501     * <b>Definition:</b>
1502     * Text, attachment(s), or resource(s) to be communicated to the recipient
1503     * </p> 
1504         */
1505        @Block()        
1506        public static class Payload 
1507            extends  BaseIdentifiableElement        implements IResourceBlock {
1508        
1509        @Child(name="content", order=0, min=1, max=1, summary=false, modifier=false, type={
1510                StringDt.class,                 AttachmentDt.class,             IResource.class })
1511        @Description(
1512                shortDefinition="",
1513                formalDefinition="The communicated content (or for multi-part communications, one portion of the communication)"
1514        )
1515        private IDatatype myContent;
1516        
1517
1518        @Override
1519        public boolean isEmpty() {
1520                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myContent);
1521        }
1522        
1523        @Override
1524        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1525                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContent);
1526        }
1527
1528        /**
1529         * Gets the value(s) for <b>content[x]</b> ().
1530         * creating it if it does
1531         * not exist. Will not return <code>null</code>.
1532         *
1533     * <p>
1534     * <b>Definition:</b>
1535     * The communicated content (or for multi-part communications, one portion of the communication)
1536     * </p> 
1537         */
1538        public IDatatype getContent() {  
1539                return myContent;
1540        }
1541
1542        /**
1543         * Sets the value(s) for <b>content[x]</b> ()
1544         *
1545     * <p>
1546     * <b>Definition:</b>
1547     * The communicated content (or for multi-part communications, one portion of the communication)
1548     * </p> 
1549         */
1550        public Payload setContent(IDatatype theValue) {
1551                myContent = theValue;
1552                return this;
1553        }
1554        
1555        
1556
1557  
1558
1559
1560        }
1561
1562
1563
1564
1565    @Override
1566    public String getResourceName() {
1567        return "CommunicationRequest";
1568    }
1569    
1570    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1571        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1572    }
1573
1574
1575}