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