001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
042import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
043import ca.uhn.fhir.model.dstu2.resource.Appointment;
044import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
045import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
048import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
049import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
057import ca.uhn.fhir.model.dstu2.resource.BodySite;
058import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
059import ca.uhn.fhir.model.dstu2.resource.CarePlan;
060import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
063import ca.uhn.fhir.model.dstu2.resource.Claim;
064import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
065import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
066import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
067import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
068import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
069import ca.uhn.fhir.model.dstu2.composite.CodingDt;
070import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
071import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
072import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
073import ca.uhn.fhir.model.dstu2.resource.Composition;
074import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
075import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
076import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
077import ca.uhn.fhir.model.dstu2.resource.Condition;
078import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
079import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
082import ca.uhn.fhir.model.dstu2.resource.Conformance;
083import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
085import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
086import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
087import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
088import ca.uhn.fhir.model.dstu2.resource.Contract;
089import ca.uhn.fhir.model.dstu2.resource.Coverage;
090import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
091import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
092import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
093import ca.uhn.fhir.model.dstu2.resource.Device;
094import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
095import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
096import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
097import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
098import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
101import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
102import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
103import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
105import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
106import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
108import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
109import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
110import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
111import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
112import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
113import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
114import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
115import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
116import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
117import ca.uhn.fhir.model.dstu2.resource.Encounter;
118import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
119import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
120import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
121import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
122import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
123import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
124import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
125import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
126import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
127import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
128import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
129import ca.uhn.fhir.model.dstu2.resource.Goal;
130import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
131import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
132import ca.uhn.fhir.model.dstu2.resource.Group;
133import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
134import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
135import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
136import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
137import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
138import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
139import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
140import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
141import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
143import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
144import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
145import ca.uhn.fhir.model.dstu2.resource.Immunization;
146import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
147import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
148import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
149import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
150import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
152import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
153import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
154import ca.uhn.fhir.model.dstu2.resource.Location;
155import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
156import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
157import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
158import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
159import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
160import ca.uhn.fhir.model.dstu2.resource.Media;
161import ca.uhn.fhir.model.dstu2.resource.Medication;
162import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
163import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
164import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
165import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
166import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
167import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
168import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
169import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
170import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
171import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
172import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
175import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
176import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
177import ca.uhn.fhir.model.dstu2.resource.Observation;
178import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
179import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
180import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
181import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
182import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
183import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
184import ca.uhn.fhir.model.dstu2.resource.Order;
185import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.Organization;
187import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
188import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
189import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
190import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
191import ca.uhn.fhir.model.dstu2.resource.Patient;
192import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
193import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
194import ca.uhn.fhir.model.dstu2.resource.Person;
195import ca.uhn.fhir.model.dstu2.resource.Practitioner;
196import ca.uhn.fhir.model.dstu2.resource.Procedure;
197import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
198import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
199import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
200import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
201import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
202import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
203import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
204import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
205import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
206import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
207import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
208import ca.uhn.fhir.model.dstu2.composite.RangeDt;
209import ca.uhn.fhir.model.dstu2.composite.RatioDt;
210import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
211import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
212import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
213import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
214import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
216import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
217import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
218import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
219import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
220import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
221import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
222import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
223import ca.uhn.fhir.model.dstu2.resource.Schedule;
224import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
225import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
226import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
227import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
228import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
229import ca.uhn.fhir.model.dstu2.resource.Slot;
230import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.Specimen;
232import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
233import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
234import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
235import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
236import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
237import ca.uhn.fhir.model.dstu2.resource.Substance;
238import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
239import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
240import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
241import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
242import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
243import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
244import ca.uhn.fhir.model.dstu2.composite.TimingDt;
245import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
247import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
249import ca.uhn.fhir.model.dstu2.resource.ValueSet;
250import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
251import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
252import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
253import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
254import ca.uhn.fhir.model.api.IResource;
255import ca.uhn.fhir.model.dstu2.composite.AgeDt;
256import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
257import ca.uhn.fhir.model.dstu2.composite.DurationDt;
258import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
259import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
260import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
261import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
262import ca.uhn.fhir.model.primitive.Base64BinaryDt;
263import ca.uhn.fhir.model.primitive.BooleanDt;
264import ca.uhn.fhir.model.primitive.BoundCodeDt;
265import ca.uhn.fhir.model.primitive.CodeDt;
266import ca.uhn.fhir.model.primitive.DateDt;
267import ca.uhn.fhir.model.primitive.DateTimeDt;
268import ca.uhn.fhir.model.primitive.DecimalDt;
269import ca.uhn.fhir.model.primitive.IdDt;
270import ca.uhn.fhir.model.primitive.InstantDt;
271import ca.uhn.fhir.model.primitive.IntegerDt;
272import ca.uhn.fhir.model.primitive.OidDt;
273import ca.uhn.fhir.model.primitive.PositiveIntDt;
274import ca.uhn.fhir.model.primitive.StringDt;
275import ca.uhn.fhir.model.primitive.TimeDt;
276import ca.uhn.fhir.model.primitive.UnsignedIntDt;
277import ca.uhn.fhir.model.primitive.UriDt;
278
279
280/**
281 * HAPI/FHIR <b>Communication</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * 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.
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * 
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Communication">http://hl7.org/fhir/profiles/Communication</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Communication", profile="http://hl7.org/fhir/profiles/Communication", id="communication")
301public class Communication extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>identifier</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>Communication.identifier</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="identifier", path="Communication.identifier", description="", type="token" 
314 )
315        public static final String SP_IDENTIFIER = "identifier";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
319         * <p>
320         * Description: <b></b><br>
321         * Type: <b>token</b><br>
322         * Path: <b>Communication.identifier</b><br>
323         * </p>
324         */
325        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
326
327        /**
328         * Search parameter constant for <b>category</b>
329         * <p>
330         * Description: <b></b><br>
331         * Type: <b>token</b><br>
332         * Path: <b>Communication.category</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="category", path="Communication.category", description="", type="token" 
336 )
337        public static final String SP_CATEGORY = "category";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>category</b>
341         * <p>
342         * Description: <b></b><br>
343         * Type: <b>token</b><br>
344         * Path: <b>Communication.category</b><br>
345         * </p>
346         */
347        public static final TokenClientParam CATEGORY = new TokenClientParam(SP_CATEGORY);
348
349        /**
350         * Search parameter constant for <b>sender</b>
351         * <p>
352         * Description: <b></b><br>
353         * Type: <b>reference</b><br>
354         * Path: <b>Communication.sender</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="sender", path="Communication.sender", description="", type="reference" 
358, providesMembershipIn={
359 @Compartment(name="Patient") ,  @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner") ,  @Compartment(name="Device")         }
360 )
361        public static final String SP_SENDER = "sender";
362
363        /**
364         * <b>Fluent Client</b> search parameter constant for <b>sender</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>reference</b><br>
368         * Path: <b>Communication.sender</b><br>
369         * </p>
370         */
371        public static final ReferenceClientParam SENDER = new ReferenceClientParam(SP_SENDER);
372
373        /**
374         * Search parameter constant for <b>recipient</b>
375         * <p>
376         * Description: <b></b><br>
377         * Type: <b>reference</b><br>
378         * Path: <b>Communication.recipient</b><br>
379         * </p>
380         */
381        @SearchParamDefinition(name="recipient", path="Communication.recipient", description="", type="reference" 
382, providesMembershipIn={
383 @Compartment(name="Patient") ,  @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner") ,  @Compartment(name="Device")         }
384 )
385        public static final String SP_RECIPIENT = "recipient";
386
387        /**
388         * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
389         * <p>
390         * Description: <b></b><br>
391         * Type: <b>reference</b><br>
392         * Path: <b>Communication.recipient</b><br>
393         * </p>
394         */
395        public static final ReferenceClientParam RECIPIENT = new ReferenceClientParam(SP_RECIPIENT);
396
397        /**
398         * Search parameter constant for <b>medium</b>
399         * <p>
400         * Description: <b></b><br>
401         * Type: <b>token</b><br>
402         * Path: <b>Communication.medium</b><br>
403         * </p>
404         */
405        @SearchParamDefinition(name="medium", path="Communication.medium", description="", type="token" 
406 )
407        public static final String SP_MEDIUM = "medium";
408
409        /**
410         * <b>Fluent Client</b> search parameter constant for <b>medium</b>
411         * <p>
412         * Description: <b></b><br>
413         * Type: <b>token</b><br>
414         * Path: <b>Communication.medium</b><br>
415         * </p>
416         */
417        public static final TokenClientParam MEDIUM = new TokenClientParam(SP_MEDIUM);
418
419        /**
420         * Search parameter constant for <b>status</b>
421         * <p>
422         * Description: <b></b><br>
423         * Type: <b>token</b><br>
424         * Path: <b>Communication.status</b><br>
425         * </p>
426         */
427        @SearchParamDefinition(name="status", path="Communication.status", description="", type="token" 
428 )
429        public static final String SP_STATUS = "status";
430
431        /**
432         * <b>Fluent Client</b> search parameter constant for <b>status</b>
433         * <p>
434         * Description: <b></b><br>
435         * Type: <b>token</b><br>
436         * Path: <b>Communication.status</b><br>
437         * </p>
438         */
439        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
440
441        /**
442         * Search parameter constant for <b>encounter</b>
443         * <p>
444         * Description: <b></b><br>
445         * Type: <b>reference</b><br>
446         * Path: <b>Communication.encounter</b><br>
447         * </p>
448         */
449        @SearchParamDefinition(name="encounter", path="Communication.encounter", description="", type="reference" 
450, providesMembershipIn={
451 @Compartment(name="Encounter")         }
452 )
453        public static final String SP_ENCOUNTER = "encounter";
454
455        /**
456         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
457         * <p>
458         * Description: <b></b><br>
459         * Type: <b>reference</b><br>
460         * Path: <b>Communication.encounter</b><br>
461         * </p>
462         */
463        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
464
465        /**
466         * Search parameter constant for <b>sent</b>
467         * <p>
468         * Description: <b></b><br>
469         * Type: <b>date</b><br>
470         * Path: <b>Communication.sent</b><br>
471         * </p>
472         */
473        @SearchParamDefinition(name="sent", path="Communication.sent", description="", type="date" 
474 )
475        public static final String SP_SENT = "sent";
476
477        /**
478         * <b>Fluent Client</b> search parameter constant for <b>sent</b>
479         * <p>
480         * Description: <b></b><br>
481         * Type: <b>date</b><br>
482         * Path: <b>Communication.sent</b><br>
483         * </p>
484         */
485        public static final DateClientParam SENT = new DateClientParam(SP_SENT);
486
487        /**
488         * Search parameter constant for <b>received</b>
489         * <p>
490         * Description: <b></b><br>
491         * Type: <b>date</b><br>
492         * Path: <b>Communication.received</b><br>
493         * </p>
494         */
495        @SearchParamDefinition(name="received", path="Communication.received", description="", type="date" 
496 )
497        public static final String SP_RECEIVED = "received";
498
499        /**
500         * <b>Fluent Client</b> search parameter constant for <b>received</b>
501         * <p>
502         * Description: <b></b><br>
503         * Type: <b>date</b><br>
504         * Path: <b>Communication.received</b><br>
505         * </p>
506         */
507        public static final DateClientParam RECEIVED = new DateClientParam(SP_RECEIVED);
508
509        /**
510         * Search parameter constant for <b>subject</b>
511         * <p>
512         * Description: <b></b><br>
513         * Type: <b>reference</b><br>
514         * Path: <b>Communication.subject</b><br>
515         * </p>
516         */
517        @SearchParamDefinition(name="subject", path="Communication.subject", description="", type="reference" 
518, providesMembershipIn={
519 @Compartment(name="Patient")   }
520 )
521        public static final String SP_SUBJECT = "subject";
522
523        /**
524         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
525         * <p>
526         * Description: <b></b><br>
527         * Type: <b>reference</b><br>
528         * Path: <b>Communication.subject</b><br>
529         * </p>
530         */
531        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
532
533        /**
534         * Search parameter constant for <b>patient</b>
535         * <p>
536         * Description: <b></b><br>
537         * Type: <b>reference</b><br>
538         * Path: <b>Communication.subject</b><br>
539         * </p>
540         */
541        @SearchParamDefinition(name="patient", path="Communication.subject", description="", type="reference" 
542 )
543        public static final String SP_PATIENT = "patient";
544
545        /**
546         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
547         * <p>
548         * Description: <b></b><br>
549         * Type: <b>reference</b><br>
550         * Path: <b>Communication.subject</b><br>
551         * </p>
552         */
553        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
554
555        /**
556         * Search parameter constant for <b>request</b>
557         * <p>
558         * Description: <b></b><br>
559         * Type: <b>reference</b><br>
560         * Path: <b>Communication.requestDetail</b><br>
561         * </p>
562         */
563        @SearchParamDefinition(name="request", path="Communication.requestDetail", description="", type="reference" 
564 )
565        public static final String SP_REQUEST = "request";
566
567        /**
568         * <b>Fluent Client</b> search parameter constant for <b>request</b>
569         * <p>
570         * Description: <b></b><br>
571         * Type: <b>reference</b><br>
572         * Path: <b>Communication.requestDetail</b><br>
573         * </p>
574         */
575        public static final ReferenceClientParam REQUEST = new ReferenceClientParam(SP_REQUEST);
576
577
578        /**
579         * Constant for fluent queries to be used to add include statements. Specifies
580         * the path value of "<b>Communication:encounter</b>".
581         */
582        public static final Include INCLUDE_ENCOUNTER = new Include("Communication:encounter");
583
584        /**
585         * Constant for fluent queries to be used to add include statements. Specifies
586         * the path value of "<b>Communication:patient</b>".
587         */
588        public static final Include INCLUDE_PATIENT = new Include("Communication:patient");
589
590        /**
591         * Constant for fluent queries to be used to add include statements. Specifies
592         * the path value of "<b>Communication:recipient</b>".
593         */
594        public static final Include INCLUDE_RECIPIENT = new Include("Communication:recipient");
595
596        /**
597         * Constant for fluent queries to be used to add include statements. Specifies
598         * the path value of "<b>Communication:request</b>".
599         */
600        public static final Include INCLUDE_REQUEST = new Include("Communication:request");
601
602        /**
603         * Constant for fluent queries to be used to add include statements. Specifies
604         * the path value of "<b>Communication:sender</b>".
605         */
606        public static final Include INCLUDE_SENDER = new Include("Communication:sender");
607
608        /**
609         * Constant for fluent queries to be used to add include statements. Specifies
610         * the path value of "<b>Communication:subject</b>".
611         */
612        public static final Include INCLUDE_SUBJECT = new Include("Communication:subject");
613
614
615        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
616        @Description(
617                shortDefinition="",
618                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)."
619        )
620        private java.util.List<IdentifierDt> myIdentifier;
621        
622        @Child(name="category", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=false, modifier=false)     
623        @Description(
624                shortDefinition="",
625                formalDefinition="The type of message conveyed such as alert, notification, reminder, instruction, etc."
626        )
627        private CodeableConceptDt myCategory;
628        
629        @Child(name="sender", order=2, min=0, max=1, summary=false, modifier=false, type={
630                ca.uhn.fhir.model.dstu2.resource.Device.class, 
631                ca.uhn.fhir.model.dstu2.resource.Organization.class, 
632                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
633                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
634                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class
635        })
636        @Description(
637                shortDefinition="",
638                formalDefinition="The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication."
639        )
640        private ResourceReferenceDt mySender;
641        
642        @Child(name="recipient", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
643                ca.uhn.fhir.model.dstu2.resource.Device.class, 
644                ca.uhn.fhir.model.dstu2.resource.Organization.class, 
645                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
646                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
647                ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class, 
648                ca.uhn.fhir.model.dstu2.resource.Group.class
649        })
650        @Description(
651                shortDefinition="",
652                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)."
653        )
654        private java.util.List<ResourceReferenceDt> myRecipient;
655        
656        @Child(name="payload", order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
657        @Description(
658                shortDefinition="",
659                formalDefinition="Text, attachment(s), or resource(s) that was communicated to the recipient."
660        )
661        private java.util.List<Payload> myPayload;
662        
663        @Child(name="medium", type=CodeableConceptDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
664        @Description(
665                shortDefinition="",
666                formalDefinition="A channel that was used for this communication (e.g. email, fax)."
667        )
668        private java.util.List<CodeableConceptDt> myMedium;
669        
670        @Child(name="status", type=CodeDt.class, order=6, min=0, max=1, summary=false, modifier=true)   
671        @Description(
672                shortDefinition="",
673                formalDefinition="The status of the transmission."
674        )
675        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/communication-status")
676        private BoundCodeDt<CommunicationStatusEnum> myStatus;
677        
678        @Child(name="encounter", order=7, min=0, max=1, summary=false, modifier=false, type={
679                ca.uhn.fhir.model.dstu2.resource.Encounter.class
680        })
681        @Description(
682                shortDefinition="",
683                formalDefinition="The encounter within which the communication was sent."
684        )
685        private ResourceReferenceDt myEncounter;
686        
687        @Child(name="sent", type=DateTimeDt.class, order=8, min=0, max=1, summary=false, modifier=false)        
688        @Description(
689                shortDefinition="",
690                formalDefinition="The time when this communication was sent."
691        )
692        private DateTimeDt mySent;
693        
694        @Child(name="received", type=DateTimeDt.class, order=9, min=0, max=1, summary=false, modifier=false)    
695        @Description(
696                shortDefinition="",
697                formalDefinition="The time when this communication arrived at the destination."
698        )
699        private DateTimeDt myReceived;
700        
701        @Child(name="reason", type=CodeableConceptDt.class, order=10, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)    
702        @Description(
703                shortDefinition="",
704                formalDefinition="The reason or justification for the communication."
705        )
706        private java.util.List<CodeableConceptDt> myReason;
707        
708        @Child(name="subject", order=11, min=0, max=1, summary=false, modifier=false, type={
709                ca.uhn.fhir.model.dstu2.resource.Patient.class
710        })
711        @Description(
712                shortDefinition="",
713                formalDefinition="The patient who was the focus of this communication."
714        )
715        private ResourceReferenceDt mySubject;
716        
717        @Child(name="requestDetail", order=12, min=0, max=1, summary=false, modifier=false, type={
718                ca.uhn.fhir.model.dstu2.resource.CommunicationRequest.class
719        })
720        @Description(
721                shortDefinition="",
722                formalDefinition="The communication request that was responsible for producing this communication."
723        )
724        private ResourceReferenceDt myRequestDetail;
725        
726
727        @Override
728        public boolean isEmpty() {
729                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myCategory,  mySender,  myRecipient,  myPayload,  myMedium,  myStatus,  myEncounter,  mySent,  myReceived,  myReason,  mySubject,  myRequestDetail);
730        }
731        
732        @Override
733        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
734                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myCategory, mySender, myRecipient, myPayload, myMedium, myStatus, myEncounter, mySent, myReceived, myReason, mySubject, myRequestDetail);
735        }
736
737        /**
738         * Gets the value(s) for <b>identifier</b> ().
739         * creating it if it does
740         * not exist. Will not return <code>null</code>.
741         *
742     * <p>
743     * <b>Definition:</b>
744     * 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).
745     * </p> 
746         */
747        public java.util.List<IdentifierDt> getIdentifier() {  
748                if (myIdentifier == null) {
749                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
750                }
751                return myIdentifier;
752        }
753
754        /**
755         * Sets the value(s) for <b>identifier</b> ()
756         *
757     * <p>
758     * <b>Definition:</b>
759     * 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).
760     * </p> 
761         */
762        public Communication setIdentifier(java.util.List<IdentifierDt> theValue) {
763                myIdentifier = theValue;
764                return this;
765        }
766        
767        
768
769        /**
770         * Adds and returns a new value for <b>identifier</b> ()
771         *
772     * <p>
773     * <b>Definition:</b>
774     * 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).
775     * </p> 
776         */
777        public IdentifierDt addIdentifier() {
778                IdentifierDt newType = new IdentifierDt();
779                getIdentifier().add(newType);
780                return newType; 
781        }
782
783        /**
784         * Adds a given new value for <b>identifier</b> ()
785         *
786         * <p>
787         * <b>Definition:</b>
788         * 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).
789         * </p>
790         * @param theValue The identifier to add (must not be <code>null</code>)
791         */
792        public Communication addIdentifier(IdentifierDt theValue) {
793                if (theValue == null) {
794                        throw new NullPointerException("theValue must not be null");
795                }
796                getIdentifier().add(theValue);
797                return this;
798        }
799
800        /**
801         * Gets the first repetition for <b>identifier</b> (),
802         * creating it if it does not already exist.
803         *
804     * <p>
805     * <b>Definition:</b>
806     * 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).
807     * </p> 
808         */
809        public IdentifierDt getIdentifierFirstRep() {
810                if (getIdentifier().isEmpty()) {
811                        return addIdentifier();
812                }
813                return getIdentifier().get(0); 
814        }
815  
816        /**
817         * Gets the value(s) for <b>category</b> ().
818         * creating it if it does
819         * not exist. Will not return <code>null</code>.
820         *
821     * <p>
822     * <b>Definition:</b>
823     * The type of message conveyed such as alert, notification, reminder, instruction, etc.
824     * </p> 
825         */
826        public CodeableConceptDt getCategory() {  
827                if (myCategory == null) {
828                        myCategory = new CodeableConceptDt();
829                }
830                return myCategory;
831        }
832
833        /**
834         * Sets the value(s) for <b>category</b> ()
835         *
836     * <p>
837     * <b>Definition:</b>
838     * The type of message conveyed such as alert, notification, reminder, instruction, etc.
839     * </p> 
840         */
841        public Communication setCategory(CodeableConceptDt theValue) {
842                myCategory = theValue;
843                return this;
844        }
845        
846        
847
848  
849        /**
850         * Gets the value(s) for <b>sender</b> ().
851         * creating it if it does
852         * not exist. Will not return <code>null</code>.
853         *
854     * <p>
855     * <b>Definition:</b>
856     * The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.
857     * </p> 
858         */
859        public ResourceReferenceDt getSender() {  
860                if (mySender == null) {
861                        mySender = new ResourceReferenceDt();
862                }
863                return mySender;
864        }
865
866        /**
867         * Sets the value(s) for <b>sender</b> ()
868         *
869     * <p>
870     * <b>Definition:</b>
871     * The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.
872     * </p> 
873         */
874        public Communication setSender(ResourceReferenceDt theValue) {
875                mySender = theValue;
876                return this;
877        }
878        
879        
880
881  
882        /**
883         * Gets the value(s) for <b>recipient</b> ().
884         * creating it if it does
885         * not exist. Will not return <code>null</code>.
886         *
887     * <p>
888     * <b>Definition:</b>
889     * 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).
890     * </p> 
891         */
892        public java.util.List<ResourceReferenceDt> getRecipient() {  
893                if (myRecipient == null) {
894                        myRecipient = new java.util.ArrayList<ResourceReferenceDt>();
895                }
896                return myRecipient;
897        }
898
899        /**
900         * Sets the value(s) for <b>recipient</b> ()
901         *
902     * <p>
903     * <b>Definition:</b>
904     * 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).
905     * </p> 
906         */
907        public Communication setRecipient(java.util.List<ResourceReferenceDt> theValue) {
908                myRecipient = theValue;
909                return this;
910        }
911        
912        
913
914        /**
915         * Adds and returns a new value for <b>recipient</b> ()
916         *
917     * <p>
918     * <b>Definition:</b>
919     * 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).
920     * </p> 
921         */
922        public ResourceReferenceDt addRecipient() {
923                ResourceReferenceDt newType = new ResourceReferenceDt();
924                getRecipient().add(newType);
925                return newType; 
926        }
927  
928        /**
929         * Gets the value(s) for <b>payload</b> ().
930         * creating it if it does
931         * not exist. Will not return <code>null</code>.
932         *
933     * <p>
934     * <b>Definition:</b>
935     * Text, attachment(s), or resource(s) that was communicated to the recipient.
936     * </p> 
937         */
938        public java.util.List<Payload> getPayload() {  
939                if (myPayload == null) {
940                        myPayload = new java.util.ArrayList<Payload>();
941                }
942                return myPayload;
943        }
944
945        /**
946         * Sets the value(s) for <b>payload</b> ()
947         *
948     * <p>
949     * <b>Definition:</b>
950     * Text, attachment(s), or resource(s) that was communicated to the recipient.
951     * </p> 
952         */
953        public Communication setPayload(java.util.List<Payload> theValue) {
954                myPayload = theValue;
955                return this;
956        }
957        
958        
959
960        /**
961         * Adds and returns a new value for <b>payload</b> ()
962         *
963     * <p>
964     * <b>Definition:</b>
965     * Text, attachment(s), or resource(s) that was communicated to the recipient.
966     * </p> 
967         */
968        public Payload addPayload() {
969                Payload newType = new Payload();
970                getPayload().add(newType);
971                return newType; 
972        }
973
974        /**
975         * Adds a given new value for <b>payload</b> ()
976         *
977         * <p>
978         * <b>Definition:</b>
979         * Text, attachment(s), or resource(s) that was communicated to the recipient.
980         * </p>
981         * @param theValue The payload to add (must not be <code>null</code>)
982         */
983        public Communication addPayload(Payload theValue) {
984                if (theValue == null) {
985                        throw new NullPointerException("theValue must not be null");
986                }
987                getPayload().add(theValue);
988                return this;
989        }
990
991        /**
992         * Gets the first repetition for <b>payload</b> (),
993         * creating it if it does not already exist.
994         *
995     * <p>
996     * <b>Definition:</b>
997     * Text, attachment(s), or resource(s) that was communicated to the recipient.
998     * </p> 
999         */
1000        public Payload getPayloadFirstRep() {
1001                if (getPayload().isEmpty()) {
1002                        return addPayload();
1003                }
1004                return getPayload().get(0); 
1005        }
1006  
1007        /**
1008         * Gets the value(s) for <b>medium</b> ().
1009         * creating it if it does
1010         * not exist. Will not return <code>null</code>.
1011         *
1012     * <p>
1013     * <b>Definition:</b>
1014     * A channel that was used for this communication (e.g. email, fax).
1015     * </p> 
1016         */
1017        public java.util.List<CodeableConceptDt> getMedium() {  
1018                if (myMedium == null) {
1019                        myMedium = new java.util.ArrayList<CodeableConceptDt>();
1020                }
1021                return myMedium;
1022        }
1023
1024        /**
1025         * Sets the value(s) for <b>medium</b> ()
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * A channel that was used for this communication (e.g. email, fax).
1030     * </p> 
1031         */
1032        public Communication setMedium(java.util.List<CodeableConceptDt> theValue) {
1033                myMedium = theValue;
1034                return this;
1035        }
1036        
1037        
1038
1039        /**
1040         * Adds and returns a new value for <b>medium</b> ()
1041         *
1042     * <p>
1043     * <b>Definition:</b>
1044     * A channel that was used for this communication (e.g. email, fax).
1045     * </p> 
1046         */
1047        public CodeableConceptDt addMedium() {
1048                CodeableConceptDt newType = new CodeableConceptDt();
1049                getMedium().add(newType);
1050                return newType; 
1051        }
1052
1053        /**
1054         * Adds a given new value for <b>medium</b> ()
1055         *
1056         * <p>
1057         * <b>Definition:</b>
1058         * A channel that was used for this communication (e.g. email, fax).
1059         * </p>
1060         * @param theValue The medium to add (must not be <code>null</code>)
1061         */
1062        public Communication addMedium(CodeableConceptDt theValue) {
1063                if (theValue == null) {
1064                        throw new NullPointerException("theValue must not be null");
1065                }
1066                getMedium().add(theValue);
1067                return this;
1068        }
1069
1070        /**
1071         * Gets the first repetition for <b>medium</b> (),
1072         * creating it if it does not already exist.
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * A channel that was used for this communication (e.g. email, fax).
1077     * </p> 
1078         */
1079        public CodeableConceptDt getMediumFirstRep() {
1080                if (getMedium().isEmpty()) {
1081                        return addMedium();
1082                }
1083                return getMedium().get(0); 
1084        }
1085  
1086        /**
1087         * Gets the value(s) for <b>status</b> ().
1088         * creating it if it does
1089         * not exist. Will not return <code>null</code>.
1090         *
1091     * <p>
1092     * <b>Definition:</b>
1093     * The status of the transmission.
1094     * </p> 
1095         */
1096        public BoundCodeDt<CommunicationStatusEnum> getStatusElement() {  
1097                if (myStatus == null) {
1098                        myStatus = new BoundCodeDt<CommunicationStatusEnum>(CommunicationStatusEnum.VALUESET_BINDER);
1099                }
1100                return myStatus;
1101        }
1102
1103        
1104        /**
1105         * Gets the value(s) for <b>status</b> ().
1106         * creating it if it does
1107         * not exist. This method may return <code>null</code>.
1108         *
1109     * <p>
1110     * <b>Definition:</b>
1111     * The status of the transmission.
1112     * </p> 
1113         */
1114        public String getStatus() {  
1115                return getStatusElement().getValue();
1116        }
1117
1118        /**
1119         * Sets the value(s) for <b>status</b> ()
1120         *
1121     * <p>
1122     * <b>Definition:</b>
1123     * The status of the transmission.
1124     * </p> 
1125         */
1126        public Communication setStatus(BoundCodeDt<CommunicationStatusEnum> theValue) {
1127                myStatus = theValue;
1128                return this;
1129        }
1130        
1131        
1132
1133        /**
1134         * Sets the value(s) for <b>status</b> ()
1135         *
1136     * <p>
1137     * <b>Definition:</b>
1138     * The status of the transmission.
1139     * </p> 
1140         */
1141        public Communication setStatus(CommunicationStatusEnum theValue) {
1142                setStatus(new BoundCodeDt<CommunicationStatusEnum>(CommunicationStatusEnum.VALUESET_BINDER, theValue));
1143                
1144/*
1145                getStatusElement().setValueAsEnum(theValue);
1146*/
1147                return this;
1148        }
1149
1150  
1151        /**
1152         * Gets the value(s) for <b>encounter</b> ().
1153         * creating it if it does
1154         * not exist. Will not return <code>null</code>.
1155         *
1156     * <p>
1157     * <b>Definition:</b>
1158     * The encounter within which the communication was sent.
1159     * </p> 
1160         */
1161        public ResourceReferenceDt getEncounter() {  
1162                if (myEncounter == null) {
1163                        myEncounter = new ResourceReferenceDt();
1164                }
1165                return myEncounter;
1166        }
1167
1168        /**
1169         * Sets the value(s) for <b>encounter</b> ()
1170         *
1171     * <p>
1172     * <b>Definition:</b>
1173     * The encounter within which the communication was sent.
1174     * </p> 
1175         */
1176        public Communication setEncounter(ResourceReferenceDt theValue) {
1177                myEncounter = theValue;
1178                return this;
1179        }
1180        
1181        
1182
1183  
1184        /**
1185         * Gets the value(s) for <b>sent</b> ().
1186         * creating it if it does
1187         * not exist. Will not return <code>null</code>.
1188         *
1189     * <p>
1190     * <b>Definition:</b>
1191     * The time when this communication was sent.
1192     * </p> 
1193         */
1194        public DateTimeDt getSentElement() {  
1195                if (mySent == null) {
1196                        mySent = new DateTimeDt();
1197                }
1198                return mySent;
1199        }
1200
1201        
1202        /**
1203         * Gets the value(s) for <b>sent</b> ().
1204         * creating it if it does
1205         * not exist. This method may return <code>null</code>.
1206         *
1207     * <p>
1208     * <b>Definition:</b>
1209     * The time when this communication was sent.
1210     * </p> 
1211         */
1212        public Date getSent() {  
1213                return getSentElement().getValue();
1214        }
1215
1216        /**
1217         * Sets the value(s) for <b>sent</b> ()
1218         *
1219     * <p>
1220     * <b>Definition:</b>
1221     * The time when this communication was sent.
1222     * </p> 
1223         */
1224        public Communication setSent(DateTimeDt theValue) {
1225                mySent = theValue;
1226                return this;
1227        }
1228        
1229        
1230
1231        /**
1232         * Sets the value for <b>sent</b> ()
1233         *
1234     * <p>
1235     * <b>Definition:</b>
1236     * The time when this communication was sent.
1237     * </p> 
1238         */
1239        public Communication setSent( Date theDate,  TemporalPrecisionEnum thePrecision) {
1240                mySent = new DateTimeDt(theDate, thePrecision); 
1241                return this; 
1242        }
1243
1244        /**
1245         * Sets the value for <b>sent</b> ()
1246         *
1247     * <p>
1248     * <b>Definition:</b>
1249     * The time when this communication was sent.
1250     * </p> 
1251         */
1252        public Communication setSentWithSecondsPrecision( Date theDate) {
1253                mySent = new DateTimeDt(theDate); 
1254                return this; 
1255        }
1256
1257 
1258        /**
1259         * Gets the value(s) for <b>received</b> ().
1260         * creating it if it does
1261         * not exist. Will not return <code>null</code>.
1262         *
1263     * <p>
1264     * <b>Definition:</b>
1265     * The time when this communication arrived at the destination.
1266     * </p> 
1267         */
1268        public DateTimeDt getReceivedElement() {  
1269                if (myReceived == null) {
1270                        myReceived = new DateTimeDt();
1271                }
1272                return myReceived;
1273        }
1274
1275        
1276        /**
1277         * Gets the value(s) for <b>received</b> ().
1278         * creating it if it does
1279         * not exist. This method may return <code>null</code>.
1280         *
1281     * <p>
1282     * <b>Definition:</b>
1283     * The time when this communication arrived at the destination.
1284     * </p> 
1285         */
1286        public Date getReceived() {  
1287                return getReceivedElement().getValue();
1288        }
1289
1290        /**
1291         * Sets the value(s) for <b>received</b> ()
1292         *
1293     * <p>
1294     * <b>Definition:</b>
1295     * The time when this communication arrived at the destination.
1296     * </p> 
1297         */
1298        public Communication setReceived(DateTimeDt theValue) {
1299                myReceived = theValue;
1300                return this;
1301        }
1302        
1303        
1304
1305        /**
1306         * Sets the value for <b>received</b> ()
1307         *
1308     * <p>
1309     * <b>Definition:</b>
1310     * The time when this communication arrived at the destination.
1311     * </p> 
1312         */
1313        public Communication setReceived( Date theDate,  TemporalPrecisionEnum thePrecision) {
1314                myReceived = new DateTimeDt(theDate, thePrecision); 
1315                return this; 
1316        }
1317
1318        /**
1319         * Sets the value for <b>received</b> ()
1320         *
1321     * <p>
1322     * <b>Definition:</b>
1323     * The time when this communication arrived at the destination.
1324     * </p> 
1325         */
1326        public Communication setReceivedWithSecondsPrecision( Date theDate) {
1327                myReceived = new DateTimeDt(theDate); 
1328                return this; 
1329        }
1330
1331 
1332        /**
1333         * Gets the value(s) for <b>reason</b> ().
1334         * creating it if it does
1335         * not exist. Will not return <code>null</code>.
1336         *
1337     * <p>
1338     * <b>Definition:</b>
1339     * The reason or justification for the communication.
1340     * </p> 
1341         */
1342        public java.util.List<CodeableConceptDt> getReason() {  
1343                if (myReason == null) {
1344                        myReason = new java.util.ArrayList<CodeableConceptDt>();
1345                }
1346                return myReason;
1347        }
1348
1349        /**
1350         * Sets the value(s) for <b>reason</b> ()
1351         *
1352     * <p>
1353     * <b>Definition:</b>
1354     * The reason or justification for the communication.
1355     * </p> 
1356         */
1357        public Communication setReason(java.util.List<CodeableConceptDt> theValue) {
1358                myReason = theValue;
1359                return this;
1360        }
1361        
1362        
1363
1364        /**
1365         * Adds and returns a new value for <b>reason</b> ()
1366         *
1367     * <p>
1368     * <b>Definition:</b>
1369     * The reason or justification for the communication.
1370     * </p> 
1371         */
1372        public CodeableConceptDt addReason() {
1373                CodeableConceptDt newType = new CodeableConceptDt();
1374                getReason().add(newType);
1375                return newType; 
1376        }
1377
1378        /**
1379         * Adds a given new value for <b>reason</b> ()
1380         *
1381         * <p>
1382         * <b>Definition:</b>
1383         * The reason or justification for the communication.
1384         * </p>
1385         * @param theValue The reason to add (must not be <code>null</code>)
1386         */
1387        public Communication addReason(CodeableConceptDt theValue) {
1388                if (theValue == null) {
1389                        throw new NullPointerException("theValue must not be null");
1390                }
1391                getReason().add(theValue);
1392                return this;
1393        }
1394
1395        /**
1396         * Gets the first repetition for <b>reason</b> (),
1397         * creating it if it does not already exist.
1398         *
1399     * <p>
1400     * <b>Definition:</b>
1401     * The reason or justification for the communication.
1402     * </p> 
1403         */
1404        public CodeableConceptDt getReasonFirstRep() {
1405                if (getReason().isEmpty()) {
1406                        return addReason();
1407                }
1408                return getReason().get(0); 
1409        }
1410  
1411        /**
1412         * Gets the value(s) for <b>subject</b> ().
1413         * creating it if it does
1414         * not exist. Will not return <code>null</code>.
1415         *
1416     * <p>
1417     * <b>Definition:</b>
1418     * The patient who was the focus of this communication.
1419     * </p> 
1420         */
1421        public ResourceReferenceDt getSubject() {  
1422                if (mySubject == null) {
1423                        mySubject = new ResourceReferenceDt();
1424                }
1425                return mySubject;
1426        }
1427
1428        /**
1429         * Sets the value(s) for <b>subject</b> ()
1430         *
1431     * <p>
1432     * <b>Definition:</b>
1433     * The patient who was the focus of this communication.
1434     * </p> 
1435         */
1436        public Communication setSubject(ResourceReferenceDt theValue) {
1437                mySubject = theValue;
1438                return this;
1439        }
1440        
1441        
1442
1443  
1444        /**
1445         * Gets the value(s) for <b>requestDetail</b> ().
1446         * creating it if it does
1447         * not exist. Will not return <code>null</code>.
1448         *
1449     * <p>
1450     * <b>Definition:</b>
1451     * The communication request that was responsible for producing this communication.
1452     * </p> 
1453         */
1454        public ResourceReferenceDt getRequestDetail() {  
1455                if (myRequestDetail == null) {
1456                        myRequestDetail = new ResourceReferenceDt();
1457                }
1458                return myRequestDetail;
1459        }
1460
1461        /**
1462         * Sets the value(s) for <b>requestDetail</b> ()
1463         *
1464     * <p>
1465     * <b>Definition:</b>
1466     * The communication request that was responsible for producing this communication.
1467     * </p> 
1468         */
1469        public Communication setRequestDetail(ResourceReferenceDt theValue) {
1470                myRequestDetail = theValue;
1471                return this;
1472        }
1473        
1474        
1475
1476  
1477        /**
1478         * Block class for child element: <b>Communication.payload</b> ()
1479         *
1480     * <p>
1481     * <b>Definition:</b>
1482     * Text, attachment(s), or resource(s) that was communicated to the recipient.
1483     * </p> 
1484         */
1485        @Block()        
1486        public static class Payload 
1487            extends  BaseIdentifiableElement  
1488            implements IResourceBlock {
1489        
1490        @Child(name="content", order=0, min=1, max=1, summary=false, modifier=false, type={
1491                StringDt.class, 
1492                AttachmentDt.class, 
1493                IResource.class
1494        })
1495        @Description(
1496                shortDefinition="",
1497                formalDefinition="A communicated content (or for multi-part communications, one portion of the communication)"
1498        )
1499        private IDatatype myContent;
1500        
1501
1502        @Override
1503        public boolean isEmpty() {
1504                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myContent);
1505        }
1506        
1507        @Override
1508        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1509                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myContent);
1510        }
1511
1512        /**
1513         * Gets the value(s) for <b>content[x]</b> ().
1514         * creating it if it does
1515         * not exist. Will not return <code>null</code>.
1516         *
1517     * <p>
1518     * <b>Definition:</b>
1519     * A communicated content (or for multi-part communications, one portion of the communication)
1520     * </p> 
1521         */
1522        public IDatatype getContent() {  
1523                return myContent;
1524        }
1525
1526        /**
1527         * Sets the value(s) for <b>content[x]</b> ()
1528         *
1529     * <p>
1530     * <b>Definition:</b>
1531     * A communicated content (or for multi-part communications, one portion of the communication)
1532     * </p> 
1533         */
1534        public Payload setContent(IDatatype theValue) {
1535                myContent = theValue;
1536                return this;
1537        }
1538        
1539        
1540
1541  
1542
1543
1544        }
1545
1546
1547
1548
1549    @Override
1550    public String getResourceName() {
1551        return "Communication";
1552    }
1553    
1554    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1555        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1556    }
1557
1558
1559}