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>Composition</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained
287 * </p> 
288 *
289 * <p>
290 * <b>Requirements:</b>
291 * To support documents, and also to capture the EN13606 notion of an attested commit to the patient EHR, and to allow a set of disparate resources at the information/engineering level to be gathered into a clinical statement
292 * </p> 
293 *
294 * <p>
295 * <b>Profile Definition:</b>
296 * <a href="http://hl7.org/fhir/profiles/Composition">http://hl7.org/fhir/profiles/Composition</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Composition", profile="http://hl7.org/fhir/profiles/Composition", id="composition")
301public class Composition extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>type</b>
306         * <p>
307         * Description: <b></b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>Composition.type</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="type", path="Composition.type", description="", type="token"  )
313        public static final String SP_TYPE = "type";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>type</b>
317         * <p>
318         * Description: <b></b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>Composition.type</b><br>
321         * </p>
322         */
323        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
324
325        /**
326         * Search parameter constant for <b>class</b>
327         * <p>
328         * Description: <b></b><br>
329         * Type: <b>token</b><br>
330         * Path: <b>Composition.class</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="class", path="Composition.class", description="", type="token"  )
334        public static final String SP_CLASS = "class";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>class</b>
338         * <p>
339         * Description: <b></b><br>
340         * Type: <b>token</b><br>
341         * Path: <b>Composition.class</b><br>
342         * </p>
343         */
344        public static final TokenClientParam CLASS = new TokenClientParam(SP_CLASS);
345
346        /**
347         * Search parameter constant for <b>date</b>
348         * <p>
349         * Description: <b></b><br>
350         * Type: <b>date</b><br>
351         * Path: <b>Composition.date</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="date", path="Composition.date", description="", type="date"  )
355        public static final String SP_DATE = "date";
356
357        /**
358         * <b>Fluent Client</b> search parameter constant for <b>date</b>
359         * <p>
360         * Description: <b></b><br>
361         * Type: <b>date</b><br>
362         * Path: <b>Composition.date</b><br>
363         * </p>
364         */
365        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
366
367        /**
368         * Search parameter constant for <b>subject</b>
369         * <p>
370         * Description: <b></b><br>
371         * Type: <b>reference</b><br>
372         * Path: <b>Composition.subject</b><br>
373         * </p>
374         */
375        @SearchParamDefinition(name="subject", path="Composition.subject", description="", type="reference" , providesMembershipIn={
376 @Compartment(name="Patient") ,  @Compartment(name="Practitioner")      }
377 )
378        public static final String SP_SUBJECT = "subject";
379
380        /**
381         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
382         * <p>
383         * Description: <b></b><br>
384         * Type: <b>reference</b><br>
385         * Path: <b>Composition.subject</b><br>
386         * </p>
387         */
388        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
389
390        /**
391         * Search parameter constant for <b>author</b>
392         * <p>
393         * Description: <b></b><br>
394         * Type: <b>reference</b><br>
395         * Path: <b>Composition.author</b><br>
396         * </p>
397         */
398        @SearchParamDefinition(name="author", path="Composition.author", description="", type="reference" , providesMembershipIn={
399 @Compartment(name="Patient") ,  @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner") ,  @Compartment(name="Device")         }
400 )
401        public static final String SP_AUTHOR = "author";
402
403        /**
404         * <b>Fluent Client</b> search parameter constant for <b>author</b>
405         * <p>
406         * Description: <b></b><br>
407         * Type: <b>reference</b><br>
408         * Path: <b>Composition.author</b><br>
409         * </p>
410         */
411        public static final ReferenceClientParam AUTHOR = new ReferenceClientParam(SP_AUTHOR);
412
413        /**
414         * Search parameter constant for <b>attester</b>
415         * <p>
416         * Description: <b></b><br>
417         * Type: <b>reference</b><br>
418         * Path: <b>Composition.attester.party</b><br>
419         * </p>
420         */
421        @SearchParamDefinition(name="attester", path="Composition.attester.party", description="", type="reference" , providesMembershipIn={
422 @Compartment(name="Patient") ,  @Compartment(name="Practitioner")      }
423 )
424        public static final String SP_ATTESTER = "attester";
425
426        /**
427         * <b>Fluent Client</b> search parameter constant for <b>attester</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>reference</b><br>
431         * Path: <b>Composition.attester.party</b><br>
432         * </p>
433         */
434        public static final ReferenceClientParam ATTESTER = new ReferenceClientParam(SP_ATTESTER);
435
436        /**
437         * Search parameter constant for <b>context</b>
438         * <p>
439         * Description: <b></b><br>
440         * Type: <b>token</b><br>
441         * Path: <b>Composition.event.code</b><br>
442         * </p>
443         */
444        @SearchParamDefinition(name="context", path="Composition.event.code", description="", type="token"  )
445        public static final String SP_CONTEXT = "context";
446
447        /**
448         * <b>Fluent Client</b> search parameter constant for <b>context</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>token</b><br>
452         * Path: <b>Composition.event.code</b><br>
453         * </p>
454         */
455        public static final TokenClientParam CONTEXT = new TokenClientParam(SP_CONTEXT);
456
457        /**
458         * Search parameter constant for <b>section</b>
459         * <p>
460         * Description: <b></b><br>
461         * Type: <b>token</b><br>
462         * Path: <b>Composition.section.code</b><br>
463         * </p>
464         */
465        @SearchParamDefinition(name="section", path="Composition.section.code", description="", type="token"  )
466        public static final String SP_SECTION = "section";
467
468        /**
469         * <b>Fluent Client</b> search parameter constant for <b>section</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>Composition.section.code</b><br>
474         * </p>
475         */
476        public static final TokenClientParam SECTION = new TokenClientParam(SP_SECTION);
477
478        /**
479         * Search parameter constant for <b>entry</b>
480         * <p>
481         * Description: <b></b><br>
482         * Type: <b>reference</b><br>
483         * Path: <b>Composition.section.entry</b><br>
484         * </p>
485         */
486        @SearchParamDefinition(name="entry", path="Composition.section.entry", description="", type="reference"  )
487        public static final String SP_ENTRY = "entry";
488
489        /**
490         * <b>Fluent Client</b> search parameter constant for <b>entry</b>
491         * <p>
492         * Description: <b></b><br>
493         * Type: <b>reference</b><br>
494         * Path: <b>Composition.section.entry</b><br>
495         * </p>
496         */
497        public static final ReferenceClientParam ENTRY = new ReferenceClientParam(SP_ENTRY);
498
499        /**
500         * Search parameter constant for <b>identifier</b>
501         * <p>
502         * Description: <b></b><br>
503         * Type: <b>token</b><br>
504         * Path: <b>Composition.identifier</b><br>
505         * </p>
506         */
507        @SearchParamDefinition(name="identifier", path="Composition.identifier", description="", type="token"  )
508        public static final String SP_IDENTIFIER = "identifier";
509
510        /**
511         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
512         * <p>
513         * Description: <b></b><br>
514         * Type: <b>token</b><br>
515         * Path: <b>Composition.identifier</b><br>
516         * </p>
517         */
518        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
519
520        /**
521         * Search parameter constant for <b>title</b>
522         * <p>
523         * Description: <b></b><br>
524         * Type: <b>string</b><br>
525         * Path: <b>Composition.title</b><br>
526         * </p>
527         */
528        @SearchParamDefinition(name="title", path="Composition.title", description="", type="string"  )
529        public static final String SP_TITLE = "title";
530
531        /**
532         * <b>Fluent Client</b> search parameter constant for <b>title</b>
533         * <p>
534         * Description: <b></b><br>
535         * Type: <b>string</b><br>
536         * Path: <b>Composition.title</b><br>
537         * </p>
538         */
539        public static final StringClientParam TITLE = new StringClientParam(SP_TITLE);
540
541        /**
542         * Search parameter constant for <b>status</b>
543         * <p>
544         * Description: <b></b><br>
545         * Type: <b>token</b><br>
546         * Path: <b>Composition.status</b><br>
547         * </p>
548         */
549        @SearchParamDefinition(name="status", path="Composition.status", description="", type="token"  )
550        public static final String SP_STATUS = "status";
551
552        /**
553         * <b>Fluent Client</b> search parameter constant for <b>status</b>
554         * <p>
555         * Description: <b></b><br>
556         * Type: <b>token</b><br>
557         * Path: <b>Composition.status</b><br>
558         * </p>
559         */
560        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
561
562        /**
563         * Search parameter constant for <b>confidentiality</b>
564         * <p>
565         * Description: <b></b><br>
566         * Type: <b>token</b><br>
567         * Path: <b>Composition.confidentiality</b><br>
568         * </p>
569         */
570        @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="", type="token"  )
571        public static final String SP_CONFIDENTIALITY = "confidentiality";
572
573        /**
574         * <b>Fluent Client</b> search parameter constant for <b>confidentiality</b>
575         * <p>
576         * Description: <b></b><br>
577         * Type: <b>token</b><br>
578         * Path: <b>Composition.confidentiality</b><br>
579         * </p>
580         */
581        public static final TokenClientParam CONFIDENTIALITY = new TokenClientParam(SP_CONFIDENTIALITY);
582
583        /**
584         * Search parameter constant for <b>period</b>
585         * <p>
586         * Description: <b></b><br>
587         * Type: <b>date</b><br>
588         * Path: <b>Composition.event.period</b><br>
589         * </p>
590         */
591        @SearchParamDefinition(name="period", path="Composition.event.period", description="", type="date"  )
592        public static final String SP_PERIOD = "period";
593
594        /**
595         * <b>Fluent Client</b> search parameter constant for <b>period</b>
596         * <p>
597         * Description: <b></b><br>
598         * Type: <b>date</b><br>
599         * Path: <b>Composition.event.period</b><br>
600         * </p>
601         */
602        public static final DateClientParam PERIOD = new DateClientParam(SP_PERIOD);
603
604        /**
605         * Search parameter constant for <b>patient</b>
606         * <p>
607         * Description: <b></b><br>
608         * Type: <b>reference</b><br>
609         * Path: <b>Composition.subject</b><br>
610         * </p>
611         */
612        @SearchParamDefinition(name="patient", path="Composition.subject", description="", type="reference" , target={
613 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
614 )
615        public static final String SP_PATIENT = "patient";
616
617        /**
618         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
619         * <p>
620         * Description: <b></b><br>
621         * Type: <b>reference</b><br>
622         * Path: <b>Composition.subject</b><br>
623         * </p>
624         */
625        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
626
627        /**
628         * Search parameter constant for <b>encounter</b>
629         * <p>
630         * Description: <b></b><br>
631         * Type: <b>reference</b><br>
632         * Path: <b>Composition.encounter</b><br>
633         * </p>
634         */
635        @SearchParamDefinition(name="encounter", path="Composition.encounter", description="", type="reference" , providesMembershipIn={
636 @Compartment(name="Encounter")         }
637 )
638        public static final String SP_ENCOUNTER = "encounter";
639
640        /**
641         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
642         * <p>
643         * Description: <b></b><br>
644         * Type: <b>reference</b><br>
645         * Path: <b>Composition.encounter</b><br>
646         * </p>
647         */
648        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
649
650
651        /**
652         * Constant for fluent queries to be used to add include statements. Specifies
653         * the path value of "<b>Composition:attester</b>".
654         */
655        public static final Include INCLUDE_ATTESTER = new Include("Composition:attester");
656
657        /**
658         * Constant for fluent queries to be used to add include statements. Specifies
659         * the path value of "<b>Composition:author</b>".
660         */
661        public static final Include INCLUDE_AUTHOR = new Include("Composition:author");
662
663        /**
664         * Constant for fluent queries to be used to add include statements. Specifies
665         * the path value of "<b>Composition:encounter</b>".
666         */
667        public static final Include INCLUDE_ENCOUNTER = new Include("Composition:encounter");
668
669        /**
670         * Constant for fluent queries to be used to add include statements. Specifies
671         * the path value of "<b>Composition:entry</b>".
672         */
673        public static final Include INCLUDE_ENTRY = new Include("Composition:entry");
674
675        /**
676         * Constant for fluent queries to be used to add include statements. Specifies
677         * the path value of "<b>Composition:patient</b>".
678         */
679        public static final Include INCLUDE_PATIENT = new Include("Composition:patient");
680
681        /**
682         * Constant for fluent queries to be used to add include statements. Specifies
683         * the path value of "<b>Composition:subject</b>".
684         */
685        public static final Include INCLUDE_SUBJECT = new Include("Composition:subject");
686
687
688        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=true, modifier=false) 
689        @Description(
690                shortDefinition="",
691                formalDefinition="Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time"
692        )
693        private IdentifierDt myIdentifier;
694        
695        @Child(name="date", type=DateTimeDt.class, order=1, min=1, max=1, summary=true, modifier=false) 
696        @Description(
697                shortDefinition="",
698                formalDefinition="The composition editing time, when the composition was last logically changed by the author"
699        )
700        private DateTimeDt myDate;
701        
702        @Child(name="type", type=CodeableConceptDt.class, order=2, min=1, max=1, summary=true, modifier=false)  
703        @Description(
704                shortDefinition="",
705                formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition"
706        )
707        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-doc-typecodes")
708        private CodeableConceptDt myType;
709        
710        @Child(name="class", type=CodeableConceptDt.class, order=3, min=0, max=1, summary=true, modifier=false) 
711        @Description(
712                shortDefinition="",
713                formalDefinition="A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type"
714        )
715        private CodeableConceptDt myClassElement;
716        
717        @Child(name="title", type=StringDt.class, order=4, min=1, max=1, summary=true, modifier=false)  
718        @Description(
719                shortDefinition="",
720                formalDefinition="Official human-readable label for the composition"
721        )
722        private StringDt myTitle;
723        
724        @Child(name="status", type=CodeDt.class, order=5, min=1, max=1, summary=true, modifier=true)    
725        @Description(
726                shortDefinition="",
727                formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document"
728        )
729        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/composition-status")
730        private BoundCodeDt<CompositionStatusEnum> myStatus;
731        
732        @Child(name="confidentiality", type=CodeDt.class, order=6, min=0, max=1, summary=true, modifier=true)   
733        @Description(
734                shortDefinition="",
735                formalDefinition="The code specifying the level of confidentiality of the Composition"
736        )
737        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/v3-Confidentiality")
738        private CodeDt myConfidentiality;
739        
740        @Child(name="subject", order=7, min=1, max=1, summary=true, modifier=false, type={
741                IResource.class })
742        @Description(
743                shortDefinition="",
744                formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)"
745        )
746        private ResourceReferenceDt mySubject;
747        
748        @Child(name="author", order=8, min=1, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={
749                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class    })
750        @Description(
751                shortDefinition="",
752                formalDefinition="Identifies who is responsible for the information in the composition, not necessarily who typed it in."
753        )
754        private java.util.List<ResourceReferenceDt> myAuthor;
755        
756        @Child(name="attester", order=9, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)  
757        @Description(
758                shortDefinition="",
759                formalDefinition="A participant who has attested to the accuracy of the composition/document"
760        )
761        private java.util.List<Attester> myAttester;
762        
763        @Child(name="custodian", order=10, min=0, max=1, summary=true, modifier=false, type={
764                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
765        @Description(
766                shortDefinition="",
767                formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information"
768        )
769        private ResourceReferenceDt myCustodian;
770        
771        @Child(name="event", order=11, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
772        @Description(
773                shortDefinition="",
774                formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented"
775        )
776        private java.util.List<Event> myEvent;
777        
778        @Child(name="encounter", order=12, min=0, max=1, summary=true, modifier=false, type={
779                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
780        @Description(
781                shortDefinition="",
782                formalDefinition="Describes the clinical encounter or type of care this documentation is associated with."
783        )
784        private ResourceReferenceDt myEncounter;
785        
786        @Child(name="section", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
787        @Description(
788                shortDefinition="",
789                formalDefinition="The root of the sections that make up the composition"
790        )
791        private java.util.List<Section> mySection;
792        
793
794        @Override
795        public boolean isEmpty() {
796                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myDate,  myType,  myClassElement,  myTitle,  myStatus,  myConfidentiality,  mySubject,  myAuthor,  myAttester,  myCustodian,  myEvent,  myEncounter,  mySection);
797        }
798        
799        @Override
800        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
801                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDate, myType, myClassElement, myTitle, myStatus, myConfidentiality, mySubject, myAuthor, myAttester, myCustodian, myEvent, myEncounter, mySection);
802        }
803
804        /**
805         * Gets the value(s) for <b>identifier</b> ().
806         * creating it if it does
807         * not exist. Will not return <code>null</code>.
808         *
809     * <p>
810     * <b>Definition:</b>
811     * Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time
812     * </p> 
813         */
814        public IdentifierDt getIdentifier() {  
815                if (myIdentifier == null) {
816                        myIdentifier = new IdentifierDt();
817                }
818                return myIdentifier;
819        }
820
821        /**
822         * Sets the value(s) for <b>identifier</b> ()
823         *
824     * <p>
825     * <b>Definition:</b>
826     * Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time
827     * </p> 
828         */
829        public Composition setIdentifier(IdentifierDt theValue) {
830                myIdentifier = theValue;
831                return this;
832        }
833        
834        
835
836  
837        /**
838         * Gets the value(s) for <b>date</b> ().
839         * creating it if it does
840         * not exist. Will not return <code>null</code>.
841         *
842     * <p>
843     * <b>Definition:</b>
844     * The composition editing time, when the composition was last logically changed by the author
845     * </p> 
846         */
847        public DateTimeDt getDateElement() {  
848                if (myDate == null) {
849                        myDate = new DateTimeDt();
850                }
851                return myDate;
852        }
853
854        
855        /**
856         * Gets the value(s) for <b>date</b> ().
857         * creating it if it does
858         * not exist. This method may return <code>null</code>.
859         *
860     * <p>
861     * <b>Definition:</b>
862     * The composition editing time, when the composition was last logically changed by the author
863     * </p> 
864         */
865        public Date getDate() {  
866                return getDateElement().getValue();
867        }
868
869        /**
870         * Sets the value(s) for <b>date</b> ()
871         *
872     * <p>
873     * <b>Definition:</b>
874     * The composition editing time, when the composition was last logically changed by the author
875     * </p> 
876         */
877        public Composition setDate(DateTimeDt theValue) {
878                myDate = theValue;
879                return this;
880        }
881        
882        
883
884        /**
885         * Sets the value for <b>date</b> ()
886         *
887     * <p>
888     * <b>Definition:</b>
889     * The composition editing time, when the composition was last logically changed by the author
890     * </p> 
891         */
892        public Composition setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
893                myDate = new DateTimeDt(theDate, thePrecision); 
894                return this; 
895        }
896
897        /**
898         * Sets the value for <b>date</b> ()
899         *
900     * <p>
901     * <b>Definition:</b>
902     * The composition editing time, when the composition was last logically changed by the author
903     * </p> 
904         */
905        public Composition setDateWithSecondsPrecision( Date theDate) {
906                myDate = new DateTimeDt(theDate); 
907                return this; 
908        }
909
910 
911        /**
912         * Gets the value(s) for <b>type</b> ().
913         * creating it if it does
914         * not exist. Will not return <code>null</code>.
915         *
916     * <p>
917     * <b>Definition:</b>
918     * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition
919     * </p> 
920         */
921        public CodeableConceptDt getType() {  
922                if (myType == null) {
923                        myType = new CodeableConceptDt();
924                }
925                return myType;
926        }
927
928        /**
929         * Sets the value(s) for <b>type</b> ()
930         *
931     * <p>
932     * <b>Definition:</b>
933     * Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition
934     * </p> 
935         */
936        public Composition setType(CodeableConceptDt theValue) {
937                myType = theValue;
938                return this;
939        }
940        
941        
942
943  
944        /**
945         * Gets the value(s) for <b>class</b> ().
946         * creating it if it does
947         * not exist. Will not return <code>null</code>.
948         *
949     * <p>
950     * <b>Definition:</b>
951     * A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type
952     * </p> 
953         */
954        public CodeableConceptDt getClassElement() {  
955                if (myClassElement == null) {
956                        myClassElement = new CodeableConceptDt();
957                }
958                return myClassElement;
959        }
960
961        /**
962         * Sets the value(s) for <b>class</b> ()
963         *
964     * <p>
965     * <b>Definition:</b>
966     * A categorization for the type of the composition - helps for indexing and searching. This may be implied by or derived from the code specified in the Composition Type
967     * </p> 
968         */
969        public Composition setClassElement(CodeableConceptDt theValue) {
970                myClassElement = theValue;
971                return this;
972        }
973        
974        
975
976  
977        /**
978         * Gets the value(s) for <b>title</b> ().
979         * creating it if it does
980         * not exist. Will not return <code>null</code>.
981         *
982     * <p>
983     * <b>Definition:</b>
984     * Official human-readable label for the composition
985     * </p> 
986         */
987        public StringDt getTitleElement() {  
988                if (myTitle == null) {
989                        myTitle = new StringDt();
990                }
991                return myTitle;
992        }
993
994        
995        /**
996         * Gets the value(s) for <b>title</b> ().
997         * creating it if it does
998         * not exist. This method may return <code>null</code>.
999         *
1000     * <p>
1001     * <b>Definition:</b>
1002     * Official human-readable label for the composition
1003     * </p> 
1004         */
1005        public String getTitle() {  
1006                return getTitleElement().getValue();
1007        }
1008
1009        /**
1010         * Sets the value(s) for <b>title</b> ()
1011         *
1012     * <p>
1013     * <b>Definition:</b>
1014     * Official human-readable label for the composition
1015     * </p> 
1016         */
1017        public Composition setTitle(StringDt theValue) {
1018                myTitle = theValue;
1019                return this;
1020        }
1021        
1022        
1023
1024        /**
1025         * Sets the value for <b>title</b> ()
1026         *
1027     * <p>
1028     * <b>Definition:</b>
1029     * Official human-readable label for the composition
1030     * </p> 
1031         */
1032        public Composition setTitle( String theString) {
1033                myTitle = new StringDt(theString); 
1034                return this; 
1035        }
1036
1037 
1038        /**
1039         * Gets the value(s) for <b>status</b> ().
1040         * creating it if it does
1041         * not exist. Will not return <code>null</code>.
1042         *
1043     * <p>
1044     * <b>Definition:</b>
1045     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1046     * </p> 
1047         */
1048        public BoundCodeDt<CompositionStatusEnum> getStatusElement() {  
1049                if (myStatus == null) {
1050                        myStatus = new BoundCodeDt<CompositionStatusEnum>(CompositionStatusEnum.VALUESET_BINDER);
1051                }
1052                return myStatus;
1053        }
1054
1055        
1056        /**
1057         * Gets the value(s) for <b>status</b> ().
1058         * creating it if it does
1059         * not exist. This method may return <code>null</code>.
1060         *
1061     * <p>
1062     * <b>Definition:</b>
1063     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1064     * </p> 
1065         */
1066        public String getStatus() {  
1067                return getStatusElement().getValue();
1068        }
1069
1070        /**
1071         * Sets the value(s) for <b>status</b> ()
1072         *
1073     * <p>
1074     * <b>Definition:</b>
1075     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1076     * </p> 
1077         */
1078        public Composition setStatus(BoundCodeDt<CompositionStatusEnum> theValue) {
1079                myStatus = theValue;
1080                return this;
1081        }
1082        
1083        
1084
1085        /**
1086         * Sets the value(s) for <b>status</b> ()
1087         *
1088     * <p>
1089     * <b>Definition:</b>
1090     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1091     * </p> 
1092         */
1093        public Composition setStatus(CompositionStatusEnum theValue) {
1094                setStatus(new BoundCodeDt<CompositionStatusEnum>(CompositionStatusEnum.VALUESET_BINDER, theValue));
1095                
1096/*
1097                getStatusElement().setValueAsEnum(theValue);
1098*/
1099                return this;
1100        }
1101
1102  
1103        /**
1104         * Gets the value(s) for <b>confidentiality</b> ().
1105         * creating it if it does
1106         * not exist. Will not return <code>null</code>.
1107         *
1108     * <p>
1109     * <b>Definition:</b>
1110     * The code specifying the level of confidentiality of the Composition
1111     * </p> 
1112         */
1113        public CodeDt getConfidentialityElement() {  
1114                if (myConfidentiality == null) {
1115                        myConfidentiality = new CodeDt();
1116                }
1117                return myConfidentiality;
1118        }
1119
1120        
1121        /**
1122         * Gets the value(s) for <b>confidentiality</b> ().
1123         * creating it if it does
1124         * not exist. This method may return <code>null</code>.
1125         *
1126     * <p>
1127     * <b>Definition:</b>
1128     * The code specifying the level of confidentiality of the Composition
1129     * </p> 
1130         */
1131        public String getConfidentiality() {  
1132                return getConfidentialityElement().getValue();
1133        }
1134
1135        /**
1136         * Sets the value(s) for <b>confidentiality</b> ()
1137         *
1138     * <p>
1139     * <b>Definition:</b>
1140     * The code specifying the level of confidentiality of the Composition
1141     * </p> 
1142         */
1143        public Composition setConfidentiality(CodeDt theValue) {
1144                myConfidentiality = theValue;
1145                return this;
1146        }
1147        
1148        
1149
1150        /**
1151         * Sets the value for <b>confidentiality</b> ()
1152         *
1153     * <p>
1154     * <b>Definition:</b>
1155     * The code specifying the level of confidentiality of the Composition
1156     * </p> 
1157         */
1158        public Composition setConfidentiality( String theCode) {
1159                myConfidentiality = new CodeDt(theCode); 
1160                return this; 
1161        }
1162
1163 
1164        /**
1165         * Gets the value(s) for <b>subject</b> ().
1166         * creating it if it does
1167         * not exist. Will not return <code>null</code>.
1168         *
1169     * <p>
1170     * <b>Definition:</b>
1171     * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)
1172     * </p> 
1173         */
1174        public ResourceReferenceDt getSubject() {  
1175                if (mySubject == null) {
1176                        mySubject = new ResourceReferenceDt();
1177                }
1178                return mySubject;
1179        }
1180
1181        /**
1182         * Sets the value(s) for <b>subject</b> ()
1183         *
1184     * <p>
1185     * <b>Definition:</b>
1186     * Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)
1187     * </p> 
1188         */
1189        public Composition setSubject(ResourceReferenceDt theValue) {
1190                mySubject = theValue;
1191                return this;
1192        }
1193        
1194        
1195
1196  
1197        /**
1198         * Gets the value(s) for <b>author</b> ().
1199         * creating it if it does
1200         * not exist. Will not return <code>null</code>.
1201         *
1202     * <p>
1203     * <b>Definition:</b>
1204     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1205     * </p> 
1206         */
1207        public java.util.List<ResourceReferenceDt> getAuthor() {  
1208                if (myAuthor == null) {
1209                        myAuthor = new java.util.ArrayList<ResourceReferenceDt>();
1210                }
1211                return myAuthor;
1212        }
1213
1214        /**
1215         * Sets the value(s) for <b>author</b> ()
1216         *
1217     * <p>
1218     * <b>Definition:</b>
1219     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1220     * </p> 
1221         */
1222        public Composition setAuthor(java.util.List<ResourceReferenceDt> theValue) {
1223                myAuthor = theValue;
1224                return this;
1225        }
1226        
1227        
1228
1229        /**
1230         * Adds and returns a new value for <b>author</b> ()
1231         *
1232     * <p>
1233     * <b>Definition:</b>
1234     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1235     * </p> 
1236         */
1237        public ResourceReferenceDt addAuthor() {
1238                ResourceReferenceDt newType = new ResourceReferenceDt();
1239                getAuthor().add(newType);
1240                return newType; 
1241        }
1242  
1243        /**
1244         * Gets the value(s) for <b>attester</b> ().
1245         * creating it if it does
1246         * not exist. Will not return <code>null</code>.
1247         *
1248     * <p>
1249     * <b>Definition:</b>
1250     * A participant who has attested to the accuracy of the composition/document
1251     * </p> 
1252         */
1253        public java.util.List<Attester> getAttester() {  
1254                if (myAttester == null) {
1255                        myAttester = new java.util.ArrayList<Attester>();
1256                }
1257                return myAttester;
1258        }
1259
1260        /**
1261         * Sets the value(s) for <b>attester</b> ()
1262         *
1263     * <p>
1264     * <b>Definition:</b>
1265     * A participant who has attested to the accuracy of the composition/document
1266     * </p> 
1267         */
1268        public Composition setAttester(java.util.List<Attester> theValue) {
1269                myAttester = theValue;
1270                return this;
1271        }
1272        
1273        
1274
1275        /**
1276         * Adds and returns a new value for <b>attester</b> ()
1277         *
1278     * <p>
1279     * <b>Definition:</b>
1280     * A participant who has attested to the accuracy of the composition/document
1281     * </p> 
1282         */
1283        public Attester addAttester() {
1284                Attester newType = new Attester();
1285                getAttester().add(newType);
1286                return newType; 
1287        }
1288
1289        /**
1290         * Adds a given new value for <b>attester</b> ()
1291         *
1292         * <p>
1293         * <b>Definition:</b>
1294         * A participant who has attested to the accuracy of the composition/document
1295         * </p>
1296         * @param theValue The attester to add (must not be <code>null</code>)
1297         */
1298        public Composition addAttester(Attester theValue) {
1299                if (theValue == null) {
1300                        throw new NullPointerException("theValue must not be null");
1301                }
1302                getAttester().add(theValue);
1303                return this;
1304        }
1305
1306        /**
1307         * Gets the first repetition for <b>attester</b> (),
1308         * creating it if it does not already exist.
1309         *
1310     * <p>
1311     * <b>Definition:</b>
1312     * A participant who has attested to the accuracy of the composition/document
1313     * </p> 
1314         */
1315        public Attester getAttesterFirstRep() {
1316                if (getAttester().isEmpty()) {
1317                        return addAttester();
1318                }
1319                return getAttester().get(0); 
1320        }
1321  
1322        /**
1323         * Gets the value(s) for <b>custodian</b> ().
1324         * creating it if it does
1325         * not exist. Will not return <code>null</code>.
1326         *
1327     * <p>
1328     * <b>Definition:</b>
1329     * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information
1330     * </p> 
1331         */
1332        public ResourceReferenceDt getCustodian() {  
1333                if (myCustodian == null) {
1334                        myCustodian = new ResourceReferenceDt();
1335                }
1336                return myCustodian;
1337        }
1338
1339        /**
1340         * Sets the value(s) for <b>custodian</b> ()
1341         *
1342     * <p>
1343     * <b>Definition:</b>
1344     * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information
1345     * </p> 
1346         */
1347        public Composition setCustodian(ResourceReferenceDt theValue) {
1348                myCustodian = theValue;
1349                return this;
1350        }
1351        
1352        
1353
1354  
1355        /**
1356         * Gets the value(s) for <b>event</b> ().
1357         * creating it if it does
1358         * not exist. Will not return <code>null</code>.
1359         *
1360     * <p>
1361     * <b>Definition:</b>
1362     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1363     * </p> 
1364         */
1365        public java.util.List<Event> getEvent() {  
1366                if (myEvent == null) {
1367                        myEvent = new java.util.ArrayList<Event>();
1368                }
1369                return myEvent;
1370        }
1371
1372        /**
1373         * Sets the value(s) for <b>event</b> ()
1374         *
1375     * <p>
1376     * <b>Definition:</b>
1377     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1378     * </p> 
1379         */
1380        public Composition setEvent(java.util.List<Event> theValue) {
1381                myEvent = theValue;
1382                return this;
1383        }
1384        
1385        
1386
1387        /**
1388         * Adds and returns a new value for <b>event</b> ()
1389         *
1390     * <p>
1391     * <b>Definition:</b>
1392     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1393     * </p> 
1394         */
1395        public Event addEvent() {
1396                Event newType = new Event();
1397                getEvent().add(newType);
1398                return newType; 
1399        }
1400
1401        /**
1402         * Adds a given new value for <b>event</b> ()
1403         *
1404         * <p>
1405         * <b>Definition:</b>
1406         * The clinical service, such as a colonoscopy or an appendectomy, being documented
1407         * </p>
1408         * @param theValue The event to add (must not be <code>null</code>)
1409         */
1410        public Composition addEvent(Event theValue) {
1411                if (theValue == null) {
1412                        throw new NullPointerException("theValue must not be null");
1413                }
1414                getEvent().add(theValue);
1415                return this;
1416        }
1417
1418        /**
1419         * Gets the first repetition for <b>event</b> (),
1420         * creating it if it does not already exist.
1421         *
1422     * <p>
1423     * <b>Definition:</b>
1424     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1425     * </p> 
1426         */
1427        public Event getEventFirstRep() {
1428                if (getEvent().isEmpty()) {
1429                        return addEvent();
1430                }
1431                return getEvent().get(0); 
1432        }
1433  
1434        /**
1435         * Gets the value(s) for <b>encounter</b> ().
1436         * creating it if it does
1437         * not exist. Will not return <code>null</code>.
1438         *
1439     * <p>
1440     * <b>Definition:</b>
1441     * Describes the clinical encounter or type of care this documentation is associated with.
1442     * </p> 
1443         */
1444        public ResourceReferenceDt getEncounter() {  
1445                if (myEncounter == null) {
1446                        myEncounter = new ResourceReferenceDt();
1447                }
1448                return myEncounter;
1449        }
1450
1451        /**
1452         * Sets the value(s) for <b>encounter</b> ()
1453         *
1454     * <p>
1455     * <b>Definition:</b>
1456     * Describes the clinical encounter or type of care this documentation is associated with.
1457     * </p> 
1458         */
1459        public Composition setEncounter(ResourceReferenceDt theValue) {
1460                myEncounter = theValue;
1461                return this;
1462        }
1463        
1464        
1465
1466  
1467        /**
1468         * Gets the value(s) for <b>section</b> ().
1469         * creating it if it does
1470         * not exist. Will not return <code>null</code>.
1471         *
1472     * <p>
1473     * <b>Definition:</b>
1474     * The root of the sections that make up the composition
1475     * </p> 
1476         */
1477        public java.util.List<Section> getSection() {  
1478                if (mySection == null) {
1479                        mySection = new java.util.ArrayList<Section>();
1480                }
1481                return mySection;
1482        }
1483
1484        /**
1485         * Sets the value(s) for <b>section</b> ()
1486         *
1487     * <p>
1488     * <b>Definition:</b>
1489     * The root of the sections that make up the composition
1490     * </p> 
1491         */
1492        public Composition setSection(java.util.List<Section> theValue) {
1493                mySection = theValue;
1494                return this;
1495        }
1496        
1497        
1498
1499        /**
1500         * Adds and returns a new value for <b>section</b> ()
1501         *
1502     * <p>
1503     * <b>Definition:</b>
1504     * The root of the sections that make up the composition
1505     * </p> 
1506         */
1507        public Section addSection() {
1508                Section newType = new Section();
1509                getSection().add(newType);
1510                return newType; 
1511        }
1512
1513        /**
1514         * Adds a given new value for <b>section</b> ()
1515         *
1516         * <p>
1517         * <b>Definition:</b>
1518         * The root of the sections that make up the composition
1519         * </p>
1520         * @param theValue The section to add (must not be <code>null</code>)
1521         */
1522        public Composition addSection(Section theValue) {
1523                if (theValue == null) {
1524                        throw new NullPointerException("theValue must not be null");
1525                }
1526                getSection().add(theValue);
1527                return this;
1528        }
1529
1530        /**
1531         * Gets the first repetition for <b>section</b> (),
1532         * creating it if it does not already exist.
1533         *
1534     * <p>
1535     * <b>Definition:</b>
1536     * The root of the sections that make up the composition
1537     * </p> 
1538         */
1539        public Section getSectionFirstRep() {
1540                if (getSection().isEmpty()) {
1541                        return addSection();
1542                }
1543                return getSection().get(0); 
1544        }
1545  
1546        /**
1547         * Block class for child element: <b>Composition.attester</b> ()
1548         *
1549     * <p>
1550     * <b>Definition:</b>
1551     * A participant who has attested to the accuracy of the composition/document
1552     * </p> 
1553         */
1554        @Block()        
1555        public static class Attester 
1556            extends  BaseIdentifiableElement        implements IResourceBlock {
1557        
1558        @Child(name="mode", type=CodeDt.class, order=0, min=1, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
1559        @Description(
1560                shortDefinition="",
1561                formalDefinition="The type of attestation the authenticator offers"
1562        )
1563        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/composition-attestation-mode")
1564        private java.util.List<BoundCodeDt<CompositionAttestationModeEnum>> myMode;
1565        
1566        @Child(name="time", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
1567        @Description(
1568                shortDefinition="",
1569                formalDefinition="When composition was attested by the party"
1570        )
1571        private DateTimeDt myTime;
1572        
1573        @Child(name="party", order=2, min=0, max=1, summary=true, modifier=false, type={
1574                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Organization.class     })
1575        @Description(
1576                shortDefinition="",
1577                formalDefinition="Who attested the composition in the specified way"
1578        )
1579        private ResourceReferenceDt myParty;
1580        
1581
1582        @Override
1583        public boolean isEmpty() {
1584                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myMode,  myTime,  myParty);
1585        }
1586        
1587        @Override
1588        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1589                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMode, myTime, myParty);
1590        }
1591
1592        /**
1593         * Gets the value(s) for <b>mode</b> ().
1594         * creating it if it does
1595         * not exist. Will not return <code>null</code>.
1596         *
1597     * <p>
1598     * <b>Definition:</b>
1599     * The type of attestation the authenticator offers
1600     * </p> 
1601         */
1602        public java.util.List<BoundCodeDt<CompositionAttestationModeEnum>> getMode() {  
1603                if (myMode == null) {
1604                        myMode = new java.util.ArrayList<BoundCodeDt<CompositionAttestationModeEnum>>();
1605                }
1606                return myMode;
1607        }
1608
1609        /**
1610         * Sets the value(s) for <b>mode</b> ()
1611         *
1612     * <p>
1613     * <b>Definition:</b>
1614     * The type of attestation the authenticator offers
1615     * </p> 
1616         */
1617        public Attester setMode(java.util.List<BoundCodeDt<CompositionAttestationModeEnum>> theValue) {
1618                myMode = theValue;
1619                return this;
1620        }
1621        
1622        
1623
1624        /**
1625         * Add a value for <b>mode</b> () using an enumerated type. This
1626         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1627         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1628         * you may also use the {@link #addMode()} method.
1629         *
1630     * <p>
1631     * <b>Definition:</b>
1632     * The type of attestation the authenticator offers
1633     * </p> 
1634         */
1635        public BoundCodeDt<CompositionAttestationModeEnum> addMode(CompositionAttestationModeEnum theValue) {
1636                BoundCodeDt<CompositionAttestationModeEnum> retVal = new BoundCodeDt<CompositionAttestationModeEnum>(CompositionAttestationModeEnum.VALUESET_BINDER, theValue);
1637                getMode().add(retVal);
1638                return retVal;
1639        }
1640
1641        /**
1642         * Gets the first repetition for <b>mode</b> (),
1643         * creating it if it does not already exist.
1644         *
1645     * <p>
1646     * <b>Definition:</b>
1647     * The type of attestation the authenticator offers
1648     * </p> 
1649         */
1650        public BoundCodeDt<CompositionAttestationModeEnum> getModeFirstRep() {
1651                if (getMode().size() == 0) {
1652                        addMode();
1653                }
1654                return getMode().get(0);
1655        }
1656
1657        /**
1658         * Add a value for <b>mode</b> ()
1659         *
1660     * <p>
1661     * <b>Definition:</b>
1662     * The type of attestation the authenticator offers
1663     * </p> 
1664         */
1665        public BoundCodeDt<CompositionAttestationModeEnum> addMode() {
1666                BoundCodeDt<CompositionAttestationModeEnum> retVal = new BoundCodeDt<CompositionAttestationModeEnum>(CompositionAttestationModeEnum.VALUESET_BINDER);
1667                getMode().add(retVal);
1668                return retVal;
1669        }
1670
1671        /**
1672         * Sets the value(s), and clears any existing value(s) for <b>mode</b> ()
1673         *
1674     * <p>
1675     * <b>Definition:</b>
1676     * The type of attestation the authenticator offers
1677     * </p> 
1678         */
1679        public Attester setMode(CompositionAttestationModeEnum theValue) {
1680                getMode().clear();
1681                addMode(theValue);
1682                return this;
1683        }
1684
1685  
1686        /**
1687         * Gets the value(s) for <b>time</b> ().
1688         * creating it if it does
1689         * not exist. Will not return <code>null</code>.
1690         *
1691     * <p>
1692     * <b>Definition:</b>
1693     * When composition was attested by the party
1694     * </p> 
1695         */
1696        public DateTimeDt getTimeElement() {  
1697                if (myTime == null) {
1698                        myTime = new DateTimeDt();
1699                }
1700                return myTime;
1701        }
1702
1703        
1704        /**
1705         * Gets the value(s) for <b>time</b> ().
1706         * creating it if it does
1707         * not exist. This method may return <code>null</code>.
1708         *
1709     * <p>
1710     * <b>Definition:</b>
1711     * When composition was attested by the party
1712     * </p> 
1713         */
1714        public Date getTime() {  
1715                return getTimeElement().getValue();
1716        }
1717
1718        /**
1719         * Sets the value(s) for <b>time</b> ()
1720         *
1721     * <p>
1722     * <b>Definition:</b>
1723     * When composition was attested by the party
1724     * </p> 
1725         */
1726        public Attester setTime(DateTimeDt theValue) {
1727                myTime = theValue;
1728                return this;
1729        }
1730        
1731        
1732
1733        /**
1734         * Sets the value for <b>time</b> ()
1735         *
1736     * <p>
1737     * <b>Definition:</b>
1738     * When composition was attested by the party
1739     * </p> 
1740         */
1741        public Attester setTime( Date theDate,  TemporalPrecisionEnum thePrecision) {
1742                myTime = new DateTimeDt(theDate, thePrecision); 
1743                return this; 
1744        }
1745
1746        /**
1747         * Sets the value for <b>time</b> ()
1748         *
1749     * <p>
1750     * <b>Definition:</b>
1751     * When composition was attested by the party
1752     * </p> 
1753         */
1754        public Attester setTimeWithSecondsPrecision( Date theDate) {
1755                myTime = new DateTimeDt(theDate); 
1756                return this; 
1757        }
1758
1759 
1760        /**
1761         * Gets the value(s) for <b>party</b> ().
1762         * creating it if it does
1763         * not exist. Will not return <code>null</code>.
1764         *
1765     * <p>
1766     * <b>Definition:</b>
1767     * Who attested the composition in the specified way
1768     * </p> 
1769         */
1770        public ResourceReferenceDt getParty() {  
1771                if (myParty == null) {
1772                        myParty = new ResourceReferenceDt();
1773                }
1774                return myParty;
1775        }
1776
1777        /**
1778         * Sets the value(s) for <b>party</b> ()
1779         *
1780     * <p>
1781     * <b>Definition:</b>
1782     * Who attested the composition in the specified way
1783     * </p> 
1784         */
1785        public Attester setParty(ResourceReferenceDt theValue) {
1786                myParty = theValue;
1787                return this;
1788        }
1789        
1790        
1791
1792  
1793
1794
1795        }
1796
1797
1798        /**
1799         * Block class for child element: <b>Composition.event</b> ()
1800         *
1801     * <p>
1802     * <b>Definition:</b>
1803     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1804     * </p> 
1805         */
1806        @Block()        
1807        public static class Event 
1808            extends  BaseIdentifiableElement        implements IResourceBlock {
1809        
1810        @Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1811        @Description(
1812                shortDefinition="",
1813                formalDefinition="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act."
1814        )
1815        private java.util.List<CodeableConceptDt> myCode;
1816        
1817        @Child(name="period", type=PeriodDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
1818        @Description(
1819                shortDefinition="",
1820                formalDefinition="The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time"
1821        )
1822        private PeriodDt myPeriod;
1823        
1824        @Child(name="detail", order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={
1825                IResource.class })
1826        @Description(
1827                shortDefinition="",
1828                formalDefinition="The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy"
1829        )
1830        private java.util.List<ResourceReferenceDt> myDetail;
1831        
1832
1833        @Override
1834        public boolean isEmpty() {
1835                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myPeriod,  myDetail);
1836        }
1837        
1838        @Override
1839        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1840                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myPeriod, myDetail);
1841        }
1842
1843        /**
1844         * Gets the value(s) for <b>code</b> ().
1845         * creating it if it does
1846         * not exist. Will not return <code>null</code>.
1847         *
1848     * <p>
1849     * <b>Definition:</b>
1850     * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \&quot;History and Physical Report\&quot; in which the procedure being documented is necessarily a \&quot;History and Physical\&quot; act.
1851     * </p> 
1852         */
1853        public java.util.List<CodeableConceptDt> getCode() {  
1854                if (myCode == null) {
1855                        myCode = new java.util.ArrayList<CodeableConceptDt>();
1856                }
1857                return myCode;
1858        }
1859
1860        /**
1861         * Sets the value(s) for <b>code</b> ()
1862         *
1863     * <p>
1864     * <b>Definition:</b>
1865     * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \&quot;History and Physical Report\&quot; in which the procedure being documented is necessarily a \&quot;History and Physical\&quot; act.
1866     * </p> 
1867         */
1868        public Event setCode(java.util.List<CodeableConceptDt> theValue) {
1869                myCode = theValue;
1870                return this;
1871        }
1872        
1873        
1874
1875        /**
1876         * Adds and returns a new value for <b>code</b> ()
1877         *
1878     * <p>
1879     * <b>Definition:</b>
1880     * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \&quot;History and Physical Report\&quot; in which the procedure being documented is necessarily a \&quot;History and Physical\&quot; act.
1881     * </p> 
1882         */
1883        public CodeableConceptDt addCode() {
1884                CodeableConceptDt newType = new CodeableConceptDt();
1885                getCode().add(newType);
1886                return newType; 
1887        }
1888
1889        /**
1890         * Adds a given new value for <b>code</b> ()
1891         *
1892         * <p>
1893         * <b>Definition:</b>
1894         * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \&quot;History and Physical Report\&quot; in which the procedure being documented is necessarily a \&quot;History and Physical\&quot; act.
1895         * </p>
1896         * @param theValue The code to add (must not be <code>null</code>)
1897         */
1898        public Event addCode(CodeableConceptDt theValue) {
1899                if (theValue == null) {
1900                        throw new NullPointerException("theValue must not be null");
1901                }
1902                getCode().add(theValue);
1903                return this;
1904        }
1905
1906        /**
1907         * Gets the first repetition for <b>code</b> (),
1908         * creating it if it does not already exist.
1909         *
1910     * <p>
1911     * <b>Definition:</b>
1912     * This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \&quot;History and Physical Report\&quot; in which the procedure being documented is necessarily a \&quot;History and Physical\&quot; act.
1913     * </p> 
1914         */
1915        public CodeableConceptDt getCodeFirstRep() {
1916                if (getCode().isEmpty()) {
1917                        return addCode();
1918                }
1919                return getCode().get(0); 
1920        }
1921  
1922        /**
1923         * Gets the value(s) for <b>period</b> ().
1924         * creating it if it does
1925         * not exist. Will not return <code>null</code>.
1926         *
1927     * <p>
1928     * <b>Definition:</b>
1929     * The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time
1930     * </p> 
1931         */
1932        public PeriodDt getPeriod() {  
1933                if (myPeriod == null) {
1934                        myPeriod = new PeriodDt();
1935                }
1936                return myPeriod;
1937        }
1938
1939        /**
1940         * Sets the value(s) for <b>period</b> ()
1941         *
1942     * <p>
1943     * <b>Definition:</b>
1944     * The period of time covered by the documentation. There is no assertion that the documentation is a complete representation for this period, only that it documents events during this time
1945     * </p> 
1946         */
1947        public Event setPeriod(PeriodDt theValue) {
1948                myPeriod = theValue;
1949                return this;
1950        }
1951        
1952        
1953
1954  
1955        /**
1956         * Gets the value(s) for <b>detail</b> ().
1957         * creating it if it does
1958         * not exist. Will not return <code>null</code>.
1959         *
1960     * <p>
1961     * <b>Definition:</b>
1962     * The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy
1963     * </p> 
1964         */
1965        public java.util.List<ResourceReferenceDt> getDetail() {  
1966                if (myDetail == null) {
1967                        myDetail = new java.util.ArrayList<ResourceReferenceDt>();
1968                }
1969                return myDetail;
1970        }
1971
1972        /**
1973         * Sets the value(s) for <b>detail</b> ()
1974         *
1975     * <p>
1976     * <b>Definition:</b>
1977     * The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy
1978     * </p> 
1979         */
1980        public Event setDetail(java.util.List<ResourceReferenceDt> theValue) {
1981                myDetail = theValue;
1982                return this;
1983        }
1984        
1985        
1986
1987        /**
1988         * Adds and returns a new value for <b>detail</b> ()
1989         *
1990     * <p>
1991     * <b>Definition:</b>
1992     * The description and/or reference of the event(s) being documented. For example, this could be used to document such a colonoscopy or an appendectomy
1993     * </p> 
1994         */
1995        public ResourceReferenceDt addDetail() {
1996                ResourceReferenceDt newType = new ResourceReferenceDt();
1997                getDetail().add(newType);
1998                return newType; 
1999        }
2000  
2001
2002
2003        }
2004
2005
2006        /**
2007         * Block class for child element: <b>Composition.section</b> ()
2008         *
2009     * <p>
2010     * <b>Definition:</b>
2011     * The root of the sections that make up the composition
2012     * </p> 
2013         */
2014        @Block()        
2015        public static class Section 
2016            extends  BaseIdentifiableElement        implements IResourceBlock {
2017        
2018        @Child(name="title", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false) 
2019        @Description(
2020                shortDefinition="",
2021                formalDefinition="The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents"
2022        )
2023        private StringDt myTitle;
2024        
2025        @Child(name="code", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
2026        @Description(
2027                shortDefinition="",
2028                formalDefinition="A code identifying the kind of content contained within the section. This must be consistent with the section title"
2029        )
2030        private CodeableConceptDt myCode;
2031        
2032        @Child(name="text", type=NarrativeDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
2033        @Description(
2034                shortDefinition="",
2035                formalDefinition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative."
2036        )
2037        private NarrativeDt myText;
2038        
2039        @Child(name="mode", type=CodeDt.class, order=3, min=0, max=1, summary=true, modifier=true)      
2040        @Description(
2041                shortDefinition="",
2042                formalDefinition="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted"
2043        )
2044        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-mode")
2045        private CodeDt myMode;
2046        
2047        @Child(name="orderedBy", type=CodeableConceptDt.class, order=4, min=0, max=1, summary=false, modifier=false)    
2048        @Description(
2049                shortDefinition="",
2050                formalDefinition="Specifies the order applied to the items in the section entries"
2051        )
2052        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-order")
2053        private CodeableConceptDt myOrderedBy;
2054        
2055        @Child(name="entry", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
2056                IResource.class })
2057        @Description(
2058                shortDefinition="",
2059                formalDefinition="A reference to the actual resource from which the narrative in the section is derived"
2060        )
2061        private java.util.List<ResourceReferenceDt> myEntry;
2062        
2063        @Child(name="emptyReason", type=CodeableConceptDt.class, order=6, min=0, max=1, summary=false, modifier=false)  
2064        @Description(
2065                shortDefinition="",
2066                formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason"
2067        )
2068        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-empty-reason")
2069        private CodeableConceptDt myEmptyReason;
2070        
2071        @Child(name="section", type=Section.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
2072        @Description(
2073                shortDefinition="",
2074                formalDefinition="A nested sub-section within this section"
2075        )
2076        private java.util.List<Section> mySection;
2077        
2078
2079        @Override
2080        public boolean isEmpty() {
2081                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myTitle,  myCode,  myText,  myMode,  myOrderedBy,  myEntry,  myEmptyReason,  mySection);
2082        }
2083        
2084        @Override
2085        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2086                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myTitle, myCode, myText, myMode, myOrderedBy, myEntry, myEmptyReason, mySection);
2087        }
2088
2089        /**
2090         * Gets the value(s) for <b>title</b> ().
2091         * creating it if it does
2092         * not exist. Will not return <code>null</code>.
2093         *
2094     * <p>
2095     * <b>Definition:</b>
2096     * The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents
2097     * </p> 
2098         */
2099        public StringDt getTitleElement() {  
2100                if (myTitle == null) {
2101                        myTitle = new StringDt();
2102                }
2103                return myTitle;
2104        }
2105
2106        
2107        /**
2108         * Gets the value(s) for <b>title</b> ().
2109         * creating it if it does
2110         * not exist. This method may return <code>null</code>.
2111         *
2112     * <p>
2113     * <b>Definition:</b>
2114     * The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents
2115     * </p> 
2116         */
2117        public String getTitle() {  
2118                return getTitleElement().getValue();
2119        }
2120
2121        /**
2122         * Sets the value(s) for <b>title</b> ()
2123         *
2124     * <p>
2125     * <b>Definition:</b>
2126     * The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents
2127     * </p> 
2128         */
2129        public Section setTitle(StringDt theValue) {
2130                myTitle = theValue;
2131                return this;
2132        }
2133        
2134        
2135
2136        /**
2137         * Sets the value for <b>title</b> ()
2138         *
2139     * <p>
2140     * <b>Definition:</b>
2141     * The label for this particular section.  This will be part of the rendered content for the document, and is often used to build a table of contents
2142     * </p> 
2143         */
2144        public Section setTitle( String theString) {
2145                myTitle = new StringDt(theString); 
2146                return this; 
2147        }
2148
2149 
2150        /**
2151         * Gets the value(s) for <b>code</b> ().
2152         * creating it if it does
2153         * not exist. Will not return <code>null</code>.
2154         *
2155     * <p>
2156     * <b>Definition:</b>
2157     * A code identifying the kind of content contained within the section. This must be consistent with the section title
2158     * </p> 
2159         */
2160        public CodeableConceptDt getCode() {  
2161                if (myCode == null) {
2162                        myCode = new CodeableConceptDt();
2163                }
2164                return myCode;
2165        }
2166
2167        /**
2168         * Sets the value(s) for <b>code</b> ()
2169         *
2170     * <p>
2171     * <b>Definition:</b>
2172     * A code identifying the kind of content contained within the section. This must be consistent with the section title
2173     * </p> 
2174         */
2175        public Section setCode(CodeableConceptDt theValue) {
2176                myCode = theValue;
2177                return this;
2178        }
2179        
2180        
2181
2182  
2183        /**
2184         * Gets the value(s) for <b>text</b> ().
2185         * creating it if it does
2186         * not exist. Will not return <code>null</code>.
2187         *
2188     * <p>
2189     * <b>Definition:</b>
2190     * A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \&quot;clinically safe\&quot; for a human to just read the narrative.
2191     * </p> 
2192         */
2193        public NarrativeDt getText() {  
2194                if (myText == null) {
2195                        myText = new NarrativeDt();
2196                }
2197                return myText;
2198        }
2199
2200        /**
2201         * Sets the value(s) for <b>text</b> ()
2202         *
2203     * <p>
2204     * <b>Definition:</b>
2205     * A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \&quot;clinically safe\&quot; for a human to just read the narrative.
2206     * </p> 
2207         */
2208        public Section setText(NarrativeDt theValue) {
2209                myText = theValue;
2210                return this;
2211        }
2212        
2213        
2214
2215  
2216        /**
2217         * Gets the value(s) for <b>mode</b> ().
2218         * creating it if it does
2219         * not exist. Will not return <code>null</code>.
2220         *
2221     * <p>
2222     * <b>Definition:</b>
2223     * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
2224     * </p> 
2225         */
2226        public CodeDt getModeElement() {  
2227                if (myMode == null) {
2228                        myMode = new CodeDt();
2229                }
2230                return myMode;
2231        }
2232
2233        
2234        /**
2235         * Gets the value(s) for <b>mode</b> ().
2236         * creating it if it does
2237         * not exist. This method may return <code>null</code>.
2238         *
2239     * <p>
2240     * <b>Definition:</b>
2241     * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
2242     * </p> 
2243         */
2244        public String getMode() {  
2245                return getModeElement().getValue();
2246        }
2247
2248        /**
2249         * Sets the value(s) for <b>mode</b> ()
2250         *
2251     * <p>
2252     * <b>Definition:</b>
2253     * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
2254     * </p> 
2255         */
2256        public Section setMode(CodeDt theValue) {
2257                myMode = theValue;
2258                return this;
2259        }
2260        
2261        
2262
2263        /**
2264         * Sets the value for <b>mode</b> ()
2265         *
2266     * <p>
2267     * <b>Definition:</b>
2268     * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
2269     * </p> 
2270         */
2271        public Section setMode( String theCode) {
2272                myMode = new CodeDt(theCode); 
2273                return this; 
2274        }
2275
2276 
2277        /**
2278         * Gets the value(s) for <b>orderedBy</b> ().
2279         * creating it if it does
2280         * not exist. Will not return <code>null</code>.
2281         *
2282     * <p>
2283     * <b>Definition:</b>
2284     * Specifies the order applied to the items in the section entries
2285     * </p> 
2286         */
2287        public CodeableConceptDt getOrderedBy() {  
2288                if (myOrderedBy == null) {
2289                        myOrderedBy = new CodeableConceptDt();
2290                }
2291                return myOrderedBy;
2292        }
2293
2294        /**
2295         * Sets the value(s) for <b>orderedBy</b> ()
2296         *
2297     * <p>
2298     * <b>Definition:</b>
2299     * Specifies the order applied to the items in the section entries
2300     * </p> 
2301         */
2302        public Section setOrderedBy(CodeableConceptDt theValue) {
2303                myOrderedBy = theValue;
2304                return this;
2305        }
2306        
2307        
2308
2309  
2310        /**
2311         * Gets the value(s) for <b>entry</b> ().
2312         * creating it if it does
2313         * not exist. Will not return <code>null</code>.
2314         *
2315     * <p>
2316     * <b>Definition:</b>
2317     * A reference to the actual resource from which the narrative in the section is derived
2318     * </p> 
2319         */
2320        public java.util.List<ResourceReferenceDt> getEntry() {  
2321                if (myEntry == null) {
2322                        myEntry = new java.util.ArrayList<ResourceReferenceDt>();
2323                }
2324                return myEntry;
2325        }
2326
2327        /**
2328         * Sets the value(s) for <b>entry</b> ()
2329         *
2330     * <p>
2331     * <b>Definition:</b>
2332     * A reference to the actual resource from which the narrative in the section is derived
2333     * </p> 
2334         */
2335        public Section setEntry(java.util.List<ResourceReferenceDt> theValue) {
2336                myEntry = theValue;
2337                return this;
2338        }
2339        
2340        
2341
2342        /**
2343         * Adds and returns a new value for <b>entry</b> ()
2344         *
2345     * <p>
2346     * <b>Definition:</b>
2347     * A reference to the actual resource from which the narrative in the section is derived
2348     * </p> 
2349         */
2350        public ResourceReferenceDt addEntry() {
2351                ResourceReferenceDt newType = new ResourceReferenceDt();
2352                getEntry().add(newType);
2353                return newType; 
2354        }
2355  
2356        /**
2357         * Gets the value(s) for <b>emptyReason</b> ().
2358         * creating it if it does
2359         * not exist. Will not return <code>null</code>.
2360         *
2361     * <p>
2362     * <b>Definition:</b>
2363     * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason
2364     * </p> 
2365         */
2366        public CodeableConceptDt getEmptyReason() {  
2367                if (myEmptyReason == null) {
2368                        myEmptyReason = new CodeableConceptDt();
2369                }
2370                return myEmptyReason;
2371        }
2372
2373        /**
2374         * Sets the value(s) for <b>emptyReason</b> ()
2375         *
2376     * <p>
2377     * <b>Definition:</b>
2378     * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason
2379     * </p> 
2380         */
2381        public Section setEmptyReason(CodeableConceptDt theValue) {
2382                myEmptyReason = theValue;
2383                return this;
2384        }
2385        
2386        
2387
2388  
2389        /**
2390         * Gets the value(s) for <b>section</b> ().
2391         * creating it if it does
2392         * not exist. Will not return <code>null</code>.
2393         *
2394     * <p>
2395     * <b>Definition:</b>
2396     * A nested sub-section within this section
2397     * </p> 
2398         */
2399        public java.util.List<Section> getSection() {  
2400                if (mySection == null) {
2401                        mySection = new java.util.ArrayList<Section>();
2402                }
2403                return mySection;
2404        }
2405
2406        /**
2407         * Sets the value(s) for <b>section</b> ()
2408         *
2409     * <p>
2410     * <b>Definition:</b>
2411     * A nested sub-section within this section
2412     * </p> 
2413         */
2414        public Section setSection(java.util.List<Section> theValue) {
2415                mySection = theValue;
2416                return this;
2417        }
2418        
2419        
2420
2421        /**
2422         * Adds and returns a new value for <b>section</b> ()
2423         *
2424     * <p>
2425     * <b>Definition:</b>
2426     * A nested sub-section within this section
2427     * </p> 
2428         */
2429        public Section addSection() {
2430                Section newType = new Section();
2431                getSection().add(newType);
2432                return newType; 
2433        }
2434
2435        /**
2436         * Adds a given new value for <b>section</b> ()
2437         *
2438         * <p>
2439         * <b>Definition:</b>
2440         * A nested sub-section within this section
2441         * </p>
2442         * @param theValue The section to add (must not be <code>null</code>)
2443         */
2444        public Section addSection(Section theValue) {
2445                if (theValue == null) {
2446                        throw new NullPointerException("theValue must not be null");
2447                }
2448                getSection().add(theValue);
2449                return this;
2450        }
2451
2452        /**
2453         * Gets the first repetition for <b>section</b> (),
2454         * creating it if it does not already exist.
2455         *
2456     * <p>
2457     * <b>Definition:</b>
2458     * A nested sub-section within this section
2459     * </p> 
2460         */
2461        public Section getSectionFirstRep() {
2462                if (getSection().isEmpty()) {
2463                        return addSection();
2464                }
2465                return getSection().get(0); 
2466        }
2467  
2468
2469
2470        }
2471
2472
2473
2474
2475    @Override
2476    public String getResourceName() {
2477        return "Composition";
2478    }
2479    
2480    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2481        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2482    }
2483
2484
2485}