001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017package ca.uhn.fhir.model.dstu2.resource;
018
019import java.math.BigDecimal;
020import java.net.URI;
021import java.util.*;
022import ca.uhn.fhir.model.api.*;
023import ca.uhn.fhir.model.api.annotation.*;
024import ca.uhn.fhir.rest.gclient.*;
025
026import ca.uhn.fhir.model.dstu2.valueset.AccountStatusEnum;
027import ca.uhn.fhir.model.dstu2.valueset.ActionListEnum;
028import ca.uhn.fhir.model.dstu2.composite.AddressDt;
029import ca.uhn.fhir.model.dstu2.valueset.AdjudicationCodesEnum;
030import ca.uhn.fhir.model.dstu2.valueset.AdjudicationErrorCodesEnum;
031import ca.uhn.fhir.model.dstu2.valueset.AdjustmentReasonCodesEnum;
032import ca.uhn.fhir.model.dstu2.valueset.AdministrativeGenderEnum;
033import ca.uhn.fhir.model.dstu2.valueset.AdmitSourceEnum;
034import ca.uhn.fhir.model.dstu2.resource.AllergyIntolerance;
035import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCategoryEnum;
036import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCertaintyEnum;
037import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceCriticalityEnum;
038import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceSeverityEnum;
039import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceStatusEnum;
040import ca.uhn.fhir.model.dstu2.valueset.AllergyIntoleranceTypeEnum;
041import ca.uhn.fhir.model.dstu2.valueset.AnimalSpeciesEnum;
042import ca.uhn.fhir.model.dstu2.composite.AnnotationDt;
043import ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum;
044import ca.uhn.fhir.model.dstu2.resource.Appointment;
045import ca.uhn.fhir.model.dstu2.valueset.AppointmentStatusEnum;
046import ca.uhn.fhir.model.dstu2.valueset.AssertionDirectionTypeEnum;
047import ca.uhn.fhir.model.dstu2.valueset.AssertionOperatorTypeEnum;
048import ca.uhn.fhir.model.dstu2.valueset.AssertionResponseTypesEnum;
049import ca.uhn.fhir.model.dstu2.composite.AttachmentDt;
050import ca.uhn.fhir.model.dstu2.valueset.AuditEventActionEnum;
051import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectLifecycleEnum;
052import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectRoleEnum;
053import ca.uhn.fhir.model.dstu2.valueset.AuditEventObjectTypeEnum;
054import ca.uhn.fhir.model.dstu2.valueset.AuditEventOutcomeEnum;
055import ca.uhn.fhir.model.dstu2.valueset.AuditEventParticipantNetworkTypeEnum;
056import ca.uhn.fhir.model.dstu2.valueset.AuditEventSourceTypeEnum;
057import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
058import ca.uhn.fhir.model.dstu2.resource.BodySite;
059import ca.uhn.fhir.model.dstu2.valueset.BundleTypeEnum;
060import ca.uhn.fhir.model.dstu2.resource.CarePlan;
061import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityCategoryEnum;
062import ca.uhn.fhir.model.dstu2.valueset.CarePlanActivityStatusEnum;
063import ca.uhn.fhir.model.dstu2.valueset.CarePlanRelationshipEnum;
064import ca.uhn.fhir.model.dstu2.valueset.CarePlanStatusEnum;
065import ca.uhn.fhir.model.dstu2.resource.Claim;
066import ca.uhn.fhir.model.dstu2.resource.ClaimResponse;
067import ca.uhn.fhir.model.dstu2.valueset.ClaimTypeEnum;
068import ca.uhn.fhir.model.dstu2.resource.ClinicalImpression;
069import ca.uhn.fhir.model.dstu2.valueset.ClinicalImpressionStatusEnum;
070import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
071import ca.uhn.fhir.model.dstu2.composite.CodingDt;
072import ca.uhn.fhir.model.dstu2.resource.CommunicationRequest;
073import ca.uhn.fhir.model.dstu2.valueset.CommunicationRequestStatusEnum;
074import ca.uhn.fhir.model.dstu2.valueset.CommunicationStatusEnum;
075import ca.uhn.fhir.model.dstu2.resource.Composition;
076import ca.uhn.fhir.model.dstu2.valueset.CompositionAttestationModeEnum;
077import ca.uhn.fhir.model.dstu2.valueset.CompositionStatusEnum;
078import ca.uhn.fhir.model.dstu2.valueset.ConceptMapEquivalenceEnum;
079import ca.uhn.fhir.model.dstu2.resource.Condition;
080import ca.uhn.fhir.model.dstu2.valueset.ConditionCategoryCodesEnum;
081import ca.uhn.fhir.model.dstu2.valueset.ConditionClinicalStatusCodesEnum;
082import ca.uhn.fhir.model.dstu2.valueset.ConditionVerificationStatusEnum;
083import ca.uhn.fhir.model.dstu2.valueset.ConditionalDeleteStatusEnum;
084import ca.uhn.fhir.model.dstu2.valueset.ConditionsCodesEnum;
085import ca.uhn.fhir.model.dstu2.resource.Conformance;
086import ca.uhn.fhir.model.dstu2.valueset.ConformanceEventModeEnum;
087import ca.uhn.fhir.model.dstu2.valueset.ConformanceResourceStatusEnum;
088import ca.uhn.fhir.model.dstu2.valueset.ConformanceStatementKindEnum;
089import ca.uhn.fhir.model.dstu2.composite.ContactPointDt;
090import ca.uhn.fhir.model.dstu2.valueset.ContentTypeEnum;
091import ca.uhn.fhir.model.dstu2.resource.Contract;
092import ca.uhn.fhir.model.dstu2.valueset.ContractActionCodesEnum;
093import ca.uhn.fhir.model.dstu2.valueset.ContractActorRoleCodesEnum;
094import ca.uhn.fhir.model.dstu2.valueset.ContractSubtypeCodesEnum;
095import ca.uhn.fhir.model.dstu2.valueset.ContractTermTypeCodesEnum;
096import ca.uhn.fhir.model.dstu2.valueset.ContractTypeCodesEnum;
097import ca.uhn.fhir.model.dstu2.resource.Coverage;
098import ca.uhn.fhir.model.dstu2.valueset.DataElementStringencyEnum;
099import ca.uhn.fhir.model.dstu2.valueset.DaysOfWeekEnum;
100import ca.uhn.fhir.model.dstu2.valueset.DetectedIssueSeverityEnum;
101import ca.uhn.fhir.model.dstu2.resource.Device;
102import ca.uhn.fhir.model.dstu2.resource.DeviceComponent;
103import ca.uhn.fhir.model.dstu2.resource.DeviceMetric;
104import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationStateEnum;
105import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCalibrationTypeEnum;
106import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricCategoryEnum;
107import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricColorEnum;
108import ca.uhn.fhir.model.dstu2.valueset.DeviceMetricOperationalStatusEnum;
109import ca.uhn.fhir.model.dstu2.valueset.DeviceStatusEnum;
110import ca.uhn.fhir.model.dstu2.resource.DeviceUseRequest;
111import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestPriorityEnum;
112import ca.uhn.fhir.model.dstu2.valueset.DeviceUseRequestStatusEnum;
113import ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder;
114import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderPriorityEnum;
115import ca.uhn.fhir.model.dstu2.valueset.DiagnosticOrderStatusEnum;
116import ca.uhn.fhir.model.dstu2.resource.DiagnosticReport;
117import ca.uhn.fhir.model.dstu2.valueset.DiagnosticReportStatusEnum;
118import ca.uhn.fhir.model.dstu2.valueset.DigitalMediaTypeEnum;
119import ca.uhn.fhir.model.dstu2.valueset.DocumentModeEnum;
120import ca.uhn.fhir.model.dstu2.resource.DocumentReference;
121import ca.uhn.fhir.model.dstu2.valueset.DocumentReferenceStatusEnum;
122import ca.uhn.fhir.model.dstu2.valueset.DocumentRelationshipTypeEnum;
123import ca.uhn.fhir.model.dstu2.composite.ElementDefinitionDt;
124import ca.uhn.fhir.model.dstu2.resource.EligibilityRequest;
125import ca.uhn.fhir.model.dstu2.resource.Encounter;
126import ca.uhn.fhir.model.dstu2.valueset.EncounterClassEnum;
127import ca.uhn.fhir.model.dstu2.valueset.EncounterLocationStatusEnum;
128import ca.uhn.fhir.model.dstu2.valueset.EncounterStateEnum;
129import ca.uhn.fhir.model.dstu2.valueset.EncounterTypeEnum;
130import ca.uhn.fhir.model.dstu2.resource.EnrollmentRequest;
131import ca.uhn.fhir.model.dstu2.valueset.EnteralFormulaTypeCodesEnum;
132import ca.uhn.fhir.model.dstu2.resource.EpisodeOfCare;
133import ca.uhn.fhir.model.dstu2.valueset.EpisodeOfCareStatusEnum;
134import ca.uhn.fhir.model.dstu2.valueset.ExceptionCodesEnum;
135import ca.uhn.fhir.model.dstu2.valueset.ExtensionContextEnum;
136import ca.uhn.fhir.model.dstu2.valueset.FamilyHistoryStatusEnum;
137import ca.uhn.fhir.model.dstu2.resource.FamilyMemberHistory;
138import ca.uhn.fhir.model.dstu2.valueset.FilterOperatorEnum;
139import ca.uhn.fhir.model.dstu2.valueset.FlagCategoryCodesEnum;
140import ca.uhn.fhir.model.dstu2.valueset.FlagStatusEnum;
141import ca.uhn.fhir.model.dstu2.valueset.FluidConsistencyTypeCodesEnum;
142import ca.uhn.fhir.model.dstu2.resource.Goal;
143import ca.uhn.fhir.model.dstu2.valueset.GoalCategoryEnum;
144import ca.uhn.fhir.model.dstu2.valueset.GoalPriorityEnum;
145import ca.uhn.fhir.model.dstu2.valueset.GoalStartEventEnum;
146import ca.uhn.fhir.model.dstu2.valueset.GoalStatusEnum;
147import ca.uhn.fhir.model.dstu2.valueset.GoalStatusReasonEnum;
148import ca.uhn.fhir.model.dstu2.resource.Group;
149import ca.uhn.fhir.model.dstu2.valueset.GroupTypeEnum;
150import ca.uhn.fhir.model.dstu2.valueset.GuideDependencyTypeEnum;
151import ca.uhn.fhir.model.dstu2.valueset.GuidePageKindEnum;
152import ca.uhn.fhir.model.dstu2.valueset.GuideResourcePurposeEnum;
153import ca.uhn.fhir.model.dstu2.valueset.HTTPVerbEnum;
154import ca.uhn.fhir.model.dstu2.resource.HealthcareService;
155import ca.uhn.fhir.model.dstu2.composite.HumanNameDt;
156import ca.uhn.fhir.model.dstu2.composite.IdentifierDt;
157import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
158import ca.uhn.fhir.model.dstu2.valueset.IdentityAssuranceLevelEnum;
159import ca.uhn.fhir.model.dstu2.resource.ImagingObjectSelection;
160import ca.uhn.fhir.model.dstu2.resource.ImagingStudy;
161import ca.uhn.fhir.model.dstu2.resource.Immunization;
162import ca.uhn.fhir.model.dstu2.valueset.ImmunizationReasonCodesEnum;
163import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationDateCriterionCodesEnum;
164import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRecommendationStatusCodesEnum;
165import ca.uhn.fhir.model.dstu2.valueset.ImmunizationRouteCodesEnum;
166import ca.uhn.fhir.model.dstu2.valueset.InstanceAvailabilityEnum;
167import ca.uhn.fhir.model.dstu2.valueset.InterventionCodesEnum;
168import ca.uhn.fhir.model.dstu2.valueset.IssueSeverityEnum;
169import ca.uhn.fhir.model.dstu2.valueset.IssueTypeEnum;
170import ca.uhn.fhir.model.dstu2.valueset.KOStitleEnum;
171import ca.uhn.fhir.model.dstu2.valueset.LateralityEnum;
172import ca.uhn.fhir.model.dstu2.valueset.LinkTypeEnum;
173import ca.uhn.fhir.model.dstu2.valueset.ListModeEnum;
174import ca.uhn.fhir.model.dstu2.valueset.ListOrderCodesEnum;
175import ca.uhn.fhir.model.dstu2.valueset.ListStatusEnum;
176import ca.uhn.fhir.model.dstu2.resource.Location;
177import ca.uhn.fhir.model.dstu2.valueset.LocationModeEnum;
178import ca.uhn.fhir.model.dstu2.valueset.LocationStatusEnum;
179import ca.uhn.fhir.model.dstu2.valueset.LocationTypeEnum;
180import ca.uhn.fhir.model.dstu2.valueset.MaritalStatusCodesEnum;
181import ca.uhn.fhir.model.dstu2.valueset.MeasmntPrincipleEnum;
182import ca.uhn.fhir.model.dstu2.resource.Media;
183import ca.uhn.fhir.model.dstu2.resource.Medication;
184import ca.uhn.fhir.model.dstu2.valueset.MedicationAdministrationStatusEnum;
185import ca.uhn.fhir.model.dstu2.valueset.MedicationDispenseStatusEnum;
186import ca.uhn.fhir.model.dstu2.resource.MedicationOrder;
187import ca.uhn.fhir.model.dstu2.valueset.MedicationOrderStatusEnum;
188import ca.uhn.fhir.model.dstu2.resource.MedicationStatement;
189import ca.uhn.fhir.model.dstu2.valueset.MedicationStatementStatusEnum;
190import ca.uhn.fhir.model.dstu2.valueset.MessageEventEnum;
191import ca.uhn.fhir.model.dstu2.valueset.MessageSignificanceCategoryEnum;
192import ca.uhn.fhir.model.dstu2.valueset.MessageTransportEnum;
193import ca.uhn.fhir.model.dstu2.resource.NamingSystem;
194import ca.uhn.fhir.model.dstu2.valueset.NamingSystemIdentifierTypeEnum;
195import ca.uhn.fhir.model.dstu2.valueset.NamingSystemTypeEnum;
196import ca.uhn.fhir.model.dstu2.valueset.NoteTypeEnum;
197import ca.uhn.fhir.model.dstu2.valueset.NutrientModifierCodesEnum;
198import ca.uhn.fhir.model.dstu2.resource.NutritionOrder;
199import ca.uhn.fhir.model.dstu2.valueset.NutritionOrderStatusEnum;
200import ca.uhn.fhir.model.dstu2.resource.Observation;
201import ca.uhn.fhir.model.dstu2.valueset.ObservationCategoryCodesEnum;
202import ca.uhn.fhir.model.dstu2.valueset.ObservationRelationshipTypeEnum;
203import ca.uhn.fhir.model.dstu2.valueset.ObservationStatusEnum;
204import ca.uhn.fhir.model.dstu2.resource.OperationDefinition;
205import ca.uhn.fhir.model.dstu2.valueset.OperationKindEnum;
206import ca.uhn.fhir.model.dstu2.resource.OperationOutcome;
207import ca.uhn.fhir.model.dstu2.valueset.OperationParameterUseEnum;
208import ca.uhn.fhir.model.dstu2.resource.Order;
209import ca.uhn.fhir.model.dstu2.valueset.OrderStatusEnum;
210import ca.uhn.fhir.model.dstu2.resource.Organization;
211import ca.uhn.fhir.model.dstu2.valueset.OrganizationTypeEnum;
212import ca.uhn.fhir.model.dstu2.valueset.ParticipantRequiredEnum;
213import ca.uhn.fhir.model.dstu2.valueset.ParticipantStatusEnum;
214import ca.uhn.fhir.model.dstu2.valueset.ParticipantTypeEnum;
215import ca.uhn.fhir.model.dstu2.valueset.ParticipationStatusEnum;
216import ca.uhn.fhir.model.dstu2.resource.Patient;
217import ca.uhn.fhir.model.dstu2.valueset.PayeeTypeCodesEnum;
218import ca.uhn.fhir.model.dstu2.valueset.PaymentStatusCodesEnum;
219import ca.uhn.fhir.model.dstu2.valueset.PaymentTypeCodesEnum;
220import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
221import ca.uhn.fhir.model.dstu2.resource.Person;
222import ca.uhn.fhir.model.dstu2.resource.Practitioner;
223import ca.uhn.fhir.model.dstu2.valueset.PractitionerRoleEnum;
224import ca.uhn.fhir.model.dstu2.valueset.PractitionerSpecialtyEnum;
225import ca.uhn.fhir.model.dstu2.valueset.PriorityCodesEnum;
226import ca.uhn.fhir.model.dstu2.resource.Procedure;
227import ca.uhn.fhir.model.dstu2.resource.ProcedureRequest;
228import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestPriorityEnum;
229import ca.uhn.fhir.model.dstu2.valueset.ProcedureRequestStatusEnum;
230import ca.uhn.fhir.model.dstu2.valueset.ProcedureStatusEnum;
231import ca.uhn.fhir.model.dstu2.resource.ProcessRequest;
232import ca.uhn.fhir.model.dstu2.valueset.ProvenanceEntityRoleEnum;
233import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
234import ca.uhn.fhir.model.dstu2.resource.Questionnaire;
235import ca.uhn.fhir.model.dstu2.resource.QuestionnaireResponse;
236import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireResponseStatusEnum;
237import ca.uhn.fhir.model.dstu2.valueset.QuestionnaireStatusEnum;
238import ca.uhn.fhir.model.dstu2.composite.RangeDt;
239import ca.uhn.fhir.model.dstu2.composite.RatioDt;
240import ca.uhn.fhir.model.dstu2.valueset.ReferralMethodEnum;
241import ca.uhn.fhir.model.dstu2.resource.ReferralRequest;
242import ca.uhn.fhir.model.dstu2.valueset.ReferralStatusEnum;
243import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
244import ca.uhn.fhir.model.dstu2.valueset.RemittanceOutcomeEnum;
245import ca.uhn.fhir.model.dstu2.valueset.ResourceTypeEnum;
246import ca.uhn.fhir.model.dstu2.valueset.ResourceVersionPolicyEnum;
247import ca.uhn.fhir.model.dstu2.valueset.ResponseTypeEnum;
248import ca.uhn.fhir.model.dstu2.valueset.RestfulConformanceModeEnum;
249import ca.uhn.fhir.model.dstu2.valueset.RestfulSecurityServiceEnum;
250import ca.uhn.fhir.model.dstu2.resource.RiskAssessment;
251import ca.uhn.fhir.model.dstu2.valueset.RulesetCodesEnum;
252import ca.uhn.fhir.model.dstu2.composite.SampledDataDt;
253import ca.uhn.fhir.model.dstu2.resource.Schedule;
254import ca.uhn.fhir.model.dstu2.valueset.SearchEntryModeEnum;
255import ca.uhn.fhir.model.dstu2.valueset.SearchModifierCodeEnum;
256import ca.uhn.fhir.model.dstu2.valueset.SearchParamTypeEnum;
257import ca.uhn.fhir.model.dstu2.valueset.ServiceProvisionConditionsEnum;
258import ca.uhn.fhir.model.dstu2.composite.SignatureDt;
259import ca.uhn.fhir.model.dstu2.resource.Slot;
260import ca.uhn.fhir.model.dstu2.valueset.SlotStatusEnum;
261import ca.uhn.fhir.model.dstu2.resource.Specimen;
262import ca.uhn.fhir.model.dstu2.valueset.SpecimenCollectionMethodEnum;
263import ca.uhn.fhir.model.dstu2.valueset.SpecimenStatusEnum;
264import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
265import ca.uhn.fhir.model.dstu2.valueset.StructureDefinitionKindEnum;
266import ca.uhn.fhir.model.dstu2.valueset.SubscriptionChannelTypeEnum;
267import ca.uhn.fhir.model.dstu2.valueset.SubscriptionStatusEnum;
268import ca.uhn.fhir.model.dstu2.valueset.SubscriptionTagEnum;
269import ca.uhn.fhir.model.dstu2.resource.Substance;
270import ca.uhn.fhir.model.dstu2.valueset.SubstanceCategoryCodesEnum;
271import ca.uhn.fhir.model.dstu2.valueset.SupplementTypeCodesEnum;
272import ca.uhn.fhir.model.dstu2.valueset.SupplyDeliveryStatusEnum;
273import ca.uhn.fhir.model.dstu2.resource.SupplyRequest;
274import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestReasonEnum;
275import ca.uhn.fhir.model.dstu2.valueset.SupplyRequestStatusEnum;
276import ca.uhn.fhir.model.dstu2.valueset.SurfaceCodesEnum;
277import ca.uhn.fhir.model.dstu2.valueset.SystemRestfulInteractionEnum;
278import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
279import ca.uhn.fhir.model.dstu2.valueset.TextureModifiedFoodTypeCodesEnum;
280import ca.uhn.fhir.model.dstu2.valueset.TextureModifierCodesEnum;
281import ca.uhn.fhir.model.dstu2.composite.TimingDt;
282import ca.uhn.fhir.model.dstu2.valueset.TransactionModeEnum;
283import ca.uhn.fhir.model.dstu2.valueset.TypeRestfulInteractionEnum;
284import ca.uhn.fhir.model.dstu2.valueset.UDICodesEnum;
285import ca.uhn.fhir.model.dstu2.valueset.UnknownContentCodeEnum;
286import ca.uhn.fhir.model.dstu2.valueset.UseEnum;
287import ca.uhn.fhir.model.dstu2.resource.ValueSet;
288import ca.uhn.fhir.model.dstu2.valueset.VisionBaseEnum;
289import ca.uhn.fhir.model.dstu2.valueset.VisionEyesEnum;
290import ca.uhn.fhir.model.dstu2.resource.VisionPrescription;
291import ca.uhn.fhir.model.dstu2.valueset.XPathUsageTypeEnum;
292import ca.uhn.fhir.model.api.IResource;
293import ca.uhn.fhir.model.dstu2.composite.AgeDt;
294import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
295import ca.uhn.fhir.model.dstu2.composite.DurationDt;
296import ca.uhn.fhir.model.dstu2.composite.MoneyDt;
297import ca.uhn.fhir.model.dstu2.composite.NarrativeDt;
298import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
299import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
300import ca.uhn.fhir.model.primitive.Base64BinaryDt;
301import ca.uhn.fhir.model.primitive.BooleanDt;
302import ca.uhn.fhir.model.primitive.BoundCodeDt;
303import ca.uhn.fhir.model.primitive.CodeDt;
304import ca.uhn.fhir.model.primitive.DateDt;
305import ca.uhn.fhir.model.primitive.DateTimeDt;
306import ca.uhn.fhir.model.primitive.DecimalDt;
307import ca.uhn.fhir.model.primitive.IdDt;
308import ca.uhn.fhir.model.primitive.InstantDt;
309import ca.uhn.fhir.model.primitive.IntegerDt;
310import ca.uhn.fhir.model.primitive.OidDt;
311import ca.uhn.fhir.model.primitive.PositiveIntDt;
312import ca.uhn.fhir.model.primitive.StringDt;
313import ca.uhn.fhir.model.primitive.TimeDt;
314import ca.uhn.fhir.model.primitive.UnsignedIntDt;
315import ca.uhn.fhir.model.primitive.UriDt;
316
317
318/**
319 * HAPI/FHIR <b>Composition</b> Resource
320 * ()
321 *
322 * <p>
323 * <b>Definition:</b>
324 * 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
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 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
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/Composition">http://hl7.org/fhir/profiles/Composition</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="Composition", profile="http://hl7.org/fhir/profiles/Composition", id="composition")
339public class Composition extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>type</b>
344         * <p>
345         * Description: <b></b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>Composition.type</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="type", path="Composition.type", description="", type="token"  )
351        public static final String SP_TYPE = "type";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>type</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>Composition.type</b><br>
359         * </p>
360         */
361        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
362
363        /**
364         * Search parameter constant for <b>class</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>token</b><br>
368         * Path: <b>Composition.class</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="class", path="Composition.class", description="", type="token"  )
372        public static final String SP_CLASS = "class";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>class</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>token</b><br>
379         * Path: <b>Composition.class</b><br>
380         * </p>
381         */
382        public static final TokenClientParam CLASS = new TokenClientParam(SP_CLASS);
383
384        /**
385         * Search parameter constant for <b>date</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>date</b><br>
389         * Path: <b>Composition.date</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="date", path="Composition.date", description="", type="date"  )
393        public static final String SP_DATE = "date";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>date</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>date</b><br>
400         * Path: <b>Composition.date</b><br>
401         * </p>
402         */
403        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
404
405        /**
406         * Search parameter constant for <b>subject</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>Composition.subject</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="subject", path="Composition.subject", description="", type="reference"  )
414        public static final String SP_SUBJECT = "subject";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>reference</b><br>
421         * Path: <b>Composition.subject</b><br>
422         * </p>
423         */
424        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
425
426        /**
427         * Search parameter constant for <b>author</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>reference</b><br>
431         * Path: <b>Composition.author</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="author", path="Composition.author", description="", type="reference"  )
435        public static final String SP_AUTHOR = "author";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>author</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>reference</b><br>
442         * Path: <b>Composition.author</b><br>
443         * </p>
444         */
445        public static final ReferenceClientParam AUTHOR = new ReferenceClientParam(SP_AUTHOR);
446
447        /**
448         * Search parameter constant for <b>attester</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>reference</b><br>
452         * Path: <b>Composition.attester.party</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="attester", path="Composition.attester.party", description="", type="reference"  )
456        public static final String SP_ATTESTER = "attester";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>attester</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>reference</b><br>
463         * Path: <b>Composition.attester.party</b><br>
464         * </p>
465         */
466        public static final ReferenceClientParam ATTESTER = new ReferenceClientParam(SP_ATTESTER);
467
468        /**
469         * Search parameter constant for <b>context</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>Composition.event.code</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="context", path="Composition.event.code", description="", type="token"  )
477        public static final String SP_CONTEXT = "context";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>context</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>Composition.event.code</b><br>
485         * </p>
486         */
487        public static final TokenClientParam CONTEXT = new TokenClientParam(SP_CONTEXT);
488
489        /**
490         * Search parameter constant for <b>section</b>
491         * <p>
492         * Description: <b></b><br>
493         * Type: <b>token</b><br>
494         * Path: <b>Composition.section.code</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="section", path="Composition.section.code", description="", type="token"  )
498        public static final String SP_SECTION = "section";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>section</b>
502         * <p>
503         * Description: <b></b><br>
504         * Type: <b>token</b><br>
505         * Path: <b>Composition.section.code</b><br>
506         * </p>
507         */
508        public static final TokenClientParam SECTION = new TokenClientParam(SP_SECTION);
509
510        /**
511         * Search parameter constant for <b>entry</b>
512         * <p>
513         * Description: <b></b><br>
514         * Type: <b>reference</b><br>
515         * Path: <b>Composition.section.entry</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="entry", path="Composition.section.entry", description="", type="reference"  )
519        public static final String SP_ENTRY = "entry";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>entry</b>
523         * <p>
524         * Description: <b></b><br>
525         * Type: <b>reference</b><br>
526         * Path: <b>Composition.section.entry</b><br>
527         * </p>
528         */
529        public static final ReferenceClientParam ENTRY = new ReferenceClientParam(SP_ENTRY);
530
531        /**
532         * Search parameter constant for <b>identifier</b>
533         * <p>
534         * Description: <b></b><br>
535         * Type: <b>token</b><br>
536         * Path: <b>Composition.identifier</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="identifier", path="Composition.identifier", description="", type="token"  )
540        public static final String SP_IDENTIFIER = "identifier";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
544         * <p>
545         * Description: <b></b><br>
546         * Type: <b>token</b><br>
547         * Path: <b>Composition.identifier</b><br>
548         * </p>
549         */
550        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
551
552        /**
553         * Search parameter constant for <b>title</b>
554         * <p>
555         * Description: <b></b><br>
556         * Type: <b>string</b><br>
557         * Path: <b>Composition.title</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="title", path="Composition.title", description="", type="string"  )
561        public static final String SP_TITLE = "title";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>title</b>
565         * <p>
566         * Description: <b></b><br>
567         * Type: <b>string</b><br>
568         * Path: <b>Composition.title</b><br>
569         * </p>
570         */
571        public static final StringClientParam TITLE = new StringClientParam(SP_TITLE);
572
573        /**
574         * Search parameter constant for <b>status</b>
575         * <p>
576         * Description: <b></b><br>
577         * Type: <b>token</b><br>
578         * Path: <b>Composition.status</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="status", path="Composition.status", description="", type="token"  )
582        public static final String SP_STATUS = "status";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>status</b>
586         * <p>
587         * Description: <b></b><br>
588         * Type: <b>token</b><br>
589         * Path: <b>Composition.status</b><br>
590         * </p>
591         */
592        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
593
594        /**
595         * Search parameter constant for <b>confidentiality</b>
596         * <p>
597         * Description: <b></b><br>
598         * Type: <b>token</b><br>
599         * Path: <b>Composition.confidentiality</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="", type="token"  )
603        public static final String SP_CONFIDENTIALITY = "confidentiality";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>confidentiality</b>
607         * <p>
608         * Description: <b></b><br>
609         * Type: <b>token</b><br>
610         * Path: <b>Composition.confidentiality</b><br>
611         * </p>
612         */
613        public static final TokenClientParam CONFIDENTIALITY = new TokenClientParam(SP_CONFIDENTIALITY);
614
615        /**
616         * Search parameter constant for <b>period</b>
617         * <p>
618         * Description: <b></b><br>
619         * Type: <b>date</b><br>
620         * Path: <b>Composition.event.period</b><br>
621         * </p>
622         */
623        @SearchParamDefinition(name="period", path="Composition.event.period", description="", type="date"  )
624        public static final String SP_PERIOD = "period";
625
626        /**
627         * <b>Fluent Client</b> search parameter constant for <b>period</b>
628         * <p>
629         * Description: <b></b><br>
630         * Type: <b>date</b><br>
631         * Path: <b>Composition.event.period</b><br>
632         * </p>
633         */
634        public static final DateClientParam PERIOD = new DateClientParam(SP_PERIOD);
635
636        /**
637         * Search parameter constant for <b>patient</b>
638         * <p>
639         * Description: <b></b><br>
640         * Type: <b>reference</b><br>
641         * Path: <b>Composition.subject</b><br>
642         * </p>
643         */
644        @SearchParamDefinition(name="patient", path="Composition.subject", description="", type="reference"  )
645        public static final String SP_PATIENT = "patient";
646
647        /**
648         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
649         * <p>
650         * Description: <b></b><br>
651         * Type: <b>reference</b><br>
652         * Path: <b>Composition.subject</b><br>
653         * </p>
654         */
655        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
656
657        /**
658         * Search parameter constant for <b>encounter</b>
659         * <p>
660         * Description: <b></b><br>
661         * Type: <b>reference</b><br>
662         * Path: <b>Composition.encounter</b><br>
663         * </p>
664         */
665        @SearchParamDefinition(name="encounter", path="Composition.encounter", description="", type="reference"  )
666        public static final String SP_ENCOUNTER = "encounter";
667
668        /**
669         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
670         * <p>
671         * Description: <b></b><br>
672         * Type: <b>reference</b><br>
673         * Path: <b>Composition.encounter</b><br>
674         * </p>
675         */
676        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
677
678
679        /**
680         * Constant for fluent queries to be used to add include statements. Specifies
681         * the path value of "<b>Composition:attester</b>".
682         */
683        public static final Include INCLUDE_ATTESTER = new Include("Composition:attester");
684
685        /**
686         * Constant for fluent queries to be used to add include statements. Specifies
687         * the path value of "<b>Composition:author</b>".
688         */
689        public static final Include INCLUDE_AUTHOR = new Include("Composition:author");
690
691        /**
692         * Constant for fluent queries to be used to add include statements. Specifies
693         * the path value of "<b>Composition:encounter</b>".
694         */
695        public static final Include INCLUDE_ENCOUNTER = new Include("Composition:encounter");
696
697        /**
698         * Constant for fluent queries to be used to add include statements. Specifies
699         * the path value of "<b>Composition:entry</b>".
700         */
701        public static final Include INCLUDE_ENTRY = new Include("Composition:entry");
702
703        /**
704         * Constant for fluent queries to be used to add include statements. Specifies
705         * the path value of "<b>Composition:patient</b>".
706         */
707        public static final Include INCLUDE_PATIENT = new Include("Composition:patient");
708
709        /**
710         * Constant for fluent queries to be used to add include statements. Specifies
711         * the path value of "<b>Composition:subject</b>".
712         */
713        public static final Include INCLUDE_SUBJECT = new Include("Composition:subject");
714
715
716        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=true, modifier=false) 
717        @Description(
718                shortDefinition="",
719                formalDefinition="Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time"
720        )
721        private IdentifierDt myIdentifier;
722        
723        @Child(name="date", type=DateTimeDt.class, order=1, min=1, max=1, summary=true, modifier=false) 
724        @Description(
725                shortDefinition="",
726                formalDefinition="The composition editing time, when the composition was last logically changed by the author"
727        )
728        private DateTimeDt myDate;
729        
730        @Child(name="type", type=CodeableConceptDt.class, order=2, min=1, max=1, summary=true, modifier=false)  
731        @Description(
732                shortDefinition="",
733                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"
734        )
735        private CodeableConceptDt myType;
736        
737        @Child(name="class", type=CodeableConceptDt.class, order=3, min=0, max=1, summary=true, modifier=false) 
738        @Description(
739                shortDefinition="",
740                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"
741        )
742        private CodeableConceptDt myClassElement;
743        
744        @Child(name="title", type=StringDt.class, order=4, min=1, max=1, summary=true, modifier=false)  
745        @Description(
746                shortDefinition="",
747                formalDefinition="Official human-readable label for the composition"
748        )
749        private StringDt myTitle;
750        
751        @Child(name="status", type=CodeDt.class, order=5, min=1, max=1, summary=true, modifier=true)    
752        @Description(
753                shortDefinition="",
754                formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document"
755        )
756        private BoundCodeDt<CompositionStatusEnum> myStatus;
757        
758        @Child(name="confidentiality", type=CodeDt.class, order=6, min=0, max=1, summary=true, modifier=true)   
759        @Description(
760                shortDefinition="",
761                formalDefinition="The code specifying the level of confidentiality of the Composition"
762        )
763        private CodeDt myConfidentiality;
764        
765        @Child(name="subject", order=7, min=1, max=1, summary=true, modifier=false, type={
766                IResource.class })
767        @Description(
768                shortDefinition="",
769                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)"
770        )
771        private ResourceReferenceDt mySubject;
772        
773        @Child(name="author", order=8, min=1, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={
774                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    })
775        @Description(
776                shortDefinition="",
777                formalDefinition="Identifies who is responsible for the information in the composition, not necessarily who typed it in."
778        )
779        private java.util.List<ResourceReferenceDt> myAuthor;
780        
781        @Child(name="attester", order=9, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)  
782        @Description(
783                shortDefinition="",
784                formalDefinition="A participant who has attested to the accuracy of the composition/document"
785        )
786        private java.util.List<Attester> myAttester;
787        
788        @Child(name="custodian", order=10, min=0, max=1, summary=true, modifier=false, type={
789                ca.uhn.fhir.model.dstu2.resource.Organization.class     })
790        @Description(
791                shortDefinition="",
792                formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information"
793        )
794        private ResourceReferenceDt myCustodian;
795        
796        @Child(name="event", order=11, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
797        @Description(
798                shortDefinition="",
799                formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented"
800        )
801        private java.util.List<Event> myEvent;
802        
803        @Child(name="encounter", order=12, min=0, max=1, summary=true, modifier=false, type={
804                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
805        @Description(
806                shortDefinition="",
807                formalDefinition="Describes the clinical encounter or type of care this documentation is associated with."
808        )
809        private ResourceReferenceDt myEncounter;
810        
811        @Child(name="section", order=13, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
812        @Description(
813                shortDefinition="",
814                formalDefinition="The root of the sections that make up the composition"
815        )
816        private java.util.List<Section> mySection;
817        
818
819        @Override
820        public boolean isEmpty() {
821                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myDate,  myType,  myClassElement,  myTitle,  myStatus,  myConfidentiality,  mySubject,  myAuthor,  myAttester,  myCustodian,  myEvent,  myEncounter,  mySection);
822        }
823        
824        @Override
825        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
826                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDate, myType, myClassElement, myTitle, myStatus, myConfidentiality, mySubject, myAuthor, myAttester, myCustodian, myEvent, myEncounter, mySection);
827        }
828
829        /**
830         * Gets the value(s) for <b>identifier</b> ().
831         * creating it if it does
832         * not exist. Will not return <code>null</code>.
833         *
834     * <p>
835     * <b>Definition:</b>
836     * Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time
837     * </p> 
838         */
839        public IdentifierDt getIdentifier() {  
840                if (myIdentifier == null) {
841                        myIdentifier = new IdentifierDt();
842                }
843                return myIdentifier;
844        }
845
846        /**
847         * Sets the value(s) for <b>identifier</b> ()
848         *
849     * <p>
850     * <b>Definition:</b>
851     * Logical identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time
852     * </p> 
853         */
854        public Composition setIdentifier(IdentifierDt theValue) {
855                myIdentifier = theValue;
856                return this;
857        }
858        
859        
860
861  
862        /**
863         * Gets the value(s) for <b>date</b> ().
864         * creating it if it does
865         * not exist. Will not return <code>null</code>.
866         *
867     * <p>
868     * <b>Definition:</b>
869     * The composition editing time, when the composition was last logically changed by the author
870     * </p> 
871         */
872        public DateTimeDt getDateElement() {  
873                if (myDate == null) {
874                        myDate = new DateTimeDt();
875                }
876                return myDate;
877        }
878
879        
880        /**
881         * Gets the value(s) for <b>date</b> ().
882         * creating it if it does
883         * not exist. Will not return <code>null</code>.
884         *
885     * <p>
886     * <b>Definition:</b>
887     * The composition editing time, when the composition was last logically changed by the author
888     * </p> 
889         */
890        public Date getDate() {  
891                return getDateElement().getValue();
892        }
893
894        /**
895         * Sets the value(s) for <b>date</b> ()
896         *
897     * <p>
898     * <b>Definition:</b>
899     * The composition editing time, when the composition was last logically changed by the author
900     * </p> 
901         */
902        public Composition setDate(DateTimeDt theValue) {
903                myDate = theValue;
904                return this;
905        }
906        
907        
908
909        /**
910         * Sets the value for <b>date</b> ()
911         *
912     * <p>
913     * <b>Definition:</b>
914     * The composition editing time, when the composition was last logically changed by the author
915     * </p> 
916         */
917        public Composition setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
918                myDate = new DateTimeDt(theDate, thePrecision); 
919                return this; 
920        }
921
922        /**
923         * Sets the value for <b>date</b> ()
924         *
925     * <p>
926     * <b>Definition:</b>
927     * The composition editing time, when the composition was last logically changed by the author
928     * </p> 
929         */
930        public Composition setDateWithSecondsPrecision( Date theDate) {
931                myDate = new DateTimeDt(theDate); 
932                return this; 
933        }
934
935 
936        /**
937         * Gets the value(s) for <b>type</b> ().
938         * creating it if it does
939         * not exist. Will not return <code>null</code>.
940         *
941     * <p>
942     * <b>Definition:</b>
943     * 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
944     * </p> 
945         */
946        public CodeableConceptDt getType() {  
947                if (myType == null) {
948                        myType = new CodeableConceptDt();
949                }
950                return myType;
951        }
952
953        /**
954         * Sets the value(s) for <b>type</b> ()
955         *
956     * <p>
957     * <b>Definition:</b>
958     * 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
959     * </p> 
960         */
961        public Composition setType(CodeableConceptDt theValue) {
962                myType = theValue;
963                return this;
964        }
965        
966        
967
968  
969        /**
970         * Gets the value(s) for <b>class</b> ().
971         * creating it if it does
972         * not exist. Will not return <code>null</code>.
973         *
974     * <p>
975     * <b>Definition:</b>
976     * 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
977     * </p> 
978         */
979        public CodeableConceptDt getClassElement() {  
980                if (myClassElement == null) {
981                        myClassElement = new CodeableConceptDt();
982                }
983                return myClassElement;
984        }
985
986        /**
987         * Sets the value(s) for <b>class</b> ()
988         *
989     * <p>
990     * <b>Definition:</b>
991     * 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
992     * </p> 
993         */
994        public Composition setClassElement(CodeableConceptDt theValue) {
995                myClassElement = theValue;
996                return this;
997        }
998        
999        
1000
1001  
1002        /**
1003         * Gets the value(s) for <b>title</b> ().
1004         * creating it if it does
1005         * not exist. Will not return <code>null</code>.
1006         *
1007     * <p>
1008     * <b>Definition:</b>
1009     * Official human-readable label for the composition
1010     * </p> 
1011         */
1012        public StringDt getTitleElement() {  
1013                if (myTitle == null) {
1014                        myTitle = new StringDt();
1015                }
1016                return myTitle;
1017        }
1018
1019        
1020        /**
1021         * Gets the value(s) for <b>title</b> ().
1022         * creating it if it does
1023         * not exist. Will not return <code>null</code>.
1024         *
1025     * <p>
1026     * <b>Definition:</b>
1027     * Official human-readable label for the composition
1028     * </p> 
1029         */
1030        public String getTitle() {  
1031                return getTitleElement().getValue();
1032        }
1033
1034        /**
1035         * Sets the value(s) for <b>title</b> ()
1036         *
1037     * <p>
1038     * <b>Definition:</b>
1039     * Official human-readable label for the composition
1040     * </p> 
1041         */
1042        public Composition setTitle(StringDt theValue) {
1043                myTitle = theValue;
1044                return this;
1045        }
1046        
1047        
1048
1049        /**
1050         * Sets the value for <b>title</b> ()
1051         *
1052     * <p>
1053     * <b>Definition:</b>
1054     * Official human-readable label for the composition
1055     * </p> 
1056         */
1057        public Composition setTitle( String theString) {
1058                myTitle = new StringDt(theString); 
1059                return this; 
1060        }
1061
1062 
1063        /**
1064         * Gets the value(s) for <b>status</b> ().
1065         * creating it if it does
1066         * not exist. Will not return <code>null</code>.
1067         *
1068     * <p>
1069     * <b>Definition:</b>
1070     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1071     * </p> 
1072         */
1073        public BoundCodeDt<CompositionStatusEnum> getStatusElement() {  
1074                if (myStatus == null) {
1075                        myStatus = new BoundCodeDt<CompositionStatusEnum>(CompositionStatusEnum.VALUESET_BINDER);
1076                }
1077                return myStatus;
1078        }
1079
1080        
1081        /**
1082         * Gets the value(s) for <b>status</b> ().
1083         * creating it if it does
1084         * not exist. Will not return <code>null</code>.
1085         *
1086     * <p>
1087     * <b>Definition:</b>
1088     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1089     * </p> 
1090         */
1091        public String getStatus() {  
1092                return getStatusElement().getValue();
1093        }
1094
1095        /**
1096         * Sets the value(s) for <b>status</b> ()
1097         *
1098     * <p>
1099     * <b>Definition:</b>
1100     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1101     * </p> 
1102         */
1103        public Composition setStatus(BoundCodeDt<CompositionStatusEnum> theValue) {
1104                myStatus = theValue;
1105                return this;
1106        }
1107        
1108        
1109
1110        /**
1111         * Sets the value(s) for <b>status</b> ()
1112         *
1113     * <p>
1114     * <b>Definition:</b>
1115     * The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document
1116     * </p> 
1117         */
1118        public Composition setStatus(CompositionStatusEnum theValue) {
1119                setStatus(new BoundCodeDt<CompositionStatusEnum>(CompositionStatusEnum.VALUESET_BINDER, theValue));
1120                
1121/*
1122                getStatusElement().setValueAsEnum(theValue);
1123*/
1124                return this;
1125        }
1126
1127  
1128        /**
1129         * Gets the value(s) for <b>confidentiality</b> ().
1130         * creating it if it does
1131         * not exist. Will not return <code>null</code>.
1132         *
1133     * <p>
1134     * <b>Definition:</b>
1135     * The code specifying the level of confidentiality of the Composition
1136     * </p> 
1137         */
1138        public CodeDt getConfidentialityElement() {  
1139                if (myConfidentiality == null) {
1140                        myConfidentiality = new CodeDt();
1141                }
1142                return myConfidentiality;
1143        }
1144
1145        
1146        /**
1147         * Gets the value(s) for <b>confidentiality</b> ().
1148         * creating it if it does
1149         * not exist. Will not return <code>null</code>.
1150         *
1151     * <p>
1152     * <b>Definition:</b>
1153     * The code specifying the level of confidentiality of the Composition
1154     * </p> 
1155         */
1156        public String getConfidentiality() {  
1157                return getConfidentialityElement().getValue();
1158        }
1159
1160        /**
1161         * Sets the value(s) for <b>confidentiality</b> ()
1162         *
1163     * <p>
1164     * <b>Definition:</b>
1165     * The code specifying the level of confidentiality of the Composition
1166     * </p> 
1167         */
1168        public Composition setConfidentiality(CodeDt theValue) {
1169                myConfidentiality = theValue;
1170                return this;
1171        }
1172        
1173        
1174
1175        /**
1176         * Sets the value for <b>confidentiality</b> ()
1177         *
1178     * <p>
1179     * <b>Definition:</b>
1180     * The code specifying the level of confidentiality of the Composition
1181     * </p> 
1182         */
1183        public Composition setConfidentiality( String theCode) {
1184                myConfidentiality = new CodeDt(theCode); 
1185                return this; 
1186        }
1187
1188 
1189        /**
1190         * Gets the value(s) for <b>subject</b> ().
1191         * creating it if it does
1192         * not exist. Will not return <code>null</code>.
1193         *
1194     * <p>
1195     * <b>Definition:</b>
1196     * 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)
1197     * </p> 
1198         */
1199        public ResourceReferenceDt getSubject() {  
1200                if (mySubject == null) {
1201                        mySubject = new ResourceReferenceDt();
1202                }
1203                return mySubject;
1204        }
1205
1206        /**
1207         * Sets the value(s) for <b>subject</b> ()
1208         *
1209     * <p>
1210     * <b>Definition:</b>
1211     * 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)
1212     * </p> 
1213         */
1214        public Composition setSubject(ResourceReferenceDt theValue) {
1215                mySubject = theValue;
1216                return this;
1217        }
1218        
1219        
1220
1221  
1222        /**
1223         * Gets the value(s) for <b>author</b> ().
1224         * creating it if it does
1225         * not exist. Will not return <code>null</code>.
1226         *
1227     * <p>
1228     * <b>Definition:</b>
1229     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1230     * </p> 
1231         */
1232        public java.util.List<ResourceReferenceDt> getAuthor() {  
1233                if (myAuthor == null) {
1234                        myAuthor = new java.util.ArrayList<ResourceReferenceDt>();
1235                }
1236                return myAuthor;
1237        }
1238
1239        /**
1240         * Sets the value(s) for <b>author</b> ()
1241         *
1242     * <p>
1243     * <b>Definition:</b>
1244     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1245     * </p> 
1246         */
1247        public Composition setAuthor(java.util.List<ResourceReferenceDt> theValue) {
1248                myAuthor = theValue;
1249                return this;
1250        }
1251        
1252        
1253
1254        /**
1255         * Adds and returns a new value for <b>author</b> ()
1256         *
1257     * <p>
1258     * <b>Definition:</b>
1259     * Identifies who is responsible for the information in the composition, not necessarily who typed it in.
1260     * </p> 
1261         */
1262        public ResourceReferenceDt addAuthor() {
1263                ResourceReferenceDt newType = new ResourceReferenceDt();
1264                getAuthor().add(newType);
1265                return newType; 
1266        }
1267  
1268        /**
1269         * Gets the value(s) for <b>attester</b> ().
1270         * creating it if it does
1271         * not exist. Will not return <code>null</code>.
1272         *
1273     * <p>
1274     * <b>Definition:</b>
1275     * A participant who has attested to the accuracy of the composition/document
1276     * </p> 
1277         */
1278        public java.util.List<Attester> getAttester() {  
1279                if (myAttester == null) {
1280                        myAttester = new java.util.ArrayList<Attester>();
1281                }
1282                return myAttester;
1283        }
1284
1285        /**
1286         * Sets the value(s) for <b>attester</b> ()
1287         *
1288     * <p>
1289     * <b>Definition:</b>
1290     * A participant who has attested to the accuracy of the composition/document
1291     * </p> 
1292         */
1293        public Composition setAttester(java.util.List<Attester> theValue) {
1294                myAttester = theValue;
1295                return this;
1296        }
1297        
1298        
1299
1300        /**
1301         * Adds and returns a new value for <b>attester</b> ()
1302         *
1303     * <p>
1304     * <b>Definition:</b>
1305     * A participant who has attested to the accuracy of the composition/document
1306     * </p> 
1307         */
1308        public Attester addAttester() {
1309                Attester newType = new Attester();
1310                getAttester().add(newType);
1311                return newType; 
1312        }
1313
1314        /**
1315         * Adds a given new value for <b>attester</b> ()
1316         *
1317         * <p>
1318         * <b>Definition:</b>
1319         * A participant who has attested to the accuracy of the composition/document
1320         * </p>
1321         * @param theValue The attester to add (must not be <code>null</code>)
1322         */
1323        public Composition addAttester(Attester theValue) {
1324                if (theValue == null) {
1325                        throw new NullPointerException("theValue must not be null");
1326                }
1327                getAttester().add(theValue);
1328                return this;
1329        }
1330
1331        /**
1332         * Gets the first repetition for <b>attester</b> (),
1333         * creating it if it does not already exist.
1334         *
1335     * <p>
1336     * <b>Definition:</b>
1337     * A participant who has attested to the accuracy of the composition/document
1338     * </p> 
1339         */
1340        public Attester getAttesterFirstRep() {
1341                if (getAttester().isEmpty()) {
1342                        return addAttester();
1343                }
1344                return getAttester().get(0); 
1345        }
1346  
1347        /**
1348         * Gets the value(s) for <b>custodian</b> ().
1349         * creating it if it does
1350         * not exist. Will not return <code>null</code>.
1351         *
1352     * <p>
1353     * <b>Definition:</b>
1354     * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information
1355     * </p> 
1356         */
1357        public ResourceReferenceDt getCustodian() {  
1358                if (myCustodian == null) {
1359                        myCustodian = new ResourceReferenceDt();
1360                }
1361                return myCustodian;
1362        }
1363
1364        /**
1365         * Sets the value(s) for <b>custodian</b> ()
1366         *
1367     * <p>
1368     * <b>Definition:</b>
1369     * Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information
1370     * </p> 
1371         */
1372        public Composition setCustodian(ResourceReferenceDt theValue) {
1373                myCustodian = theValue;
1374                return this;
1375        }
1376        
1377        
1378
1379  
1380        /**
1381         * Gets the value(s) for <b>event</b> ().
1382         * creating it if it does
1383         * not exist. Will not return <code>null</code>.
1384         *
1385     * <p>
1386     * <b>Definition:</b>
1387     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1388     * </p> 
1389         */
1390        public java.util.List<Event> getEvent() {  
1391                if (myEvent == null) {
1392                        myEvent = new java.util.ArrayList<Event>();
1393                }
1394                return myEvent;
1395        }
1396
1397        /**
1398         * Sets the value(s) for <b>event</b> ()
1399         *
1400     * <p>
1401     * <b>Definition:</b>
1402     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1403     * </p> 
1404         */
1405        public Composition setEvent(java.util.List<Event> theValue) {
1406                myEvent = theValue;
1407                return this;
1408        }
1409        
1410        
1411
1412        /**
1413         * Adds and returns a new value for <b>event</b> ()
1414         *
1415     * <p>
1416     * <b>Definition:</b>
1417     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1418     * </p> 
1419         */
1420        public Event addEvent() {
1421                Event newType = new Event();
1422                getEvent().add(newType);
1423                return newType; 
1424        }
1425
1426        /**
1427         * Adds a given new value for <b>event</b> ()
1428         *
1429         * <p>
1430         * <b>Definition:</b>
1431         * The clinical service, such as a colonoscopy or an appendectomy, being documented
1432         * </p>
1433         * @param theValue The event to add (must not be <code>null</code>)
1434         */
1435        public Composition addEvent(Event theValue) {
1436                if (theValue == null) {
1437                        throw new NullPointerException("theValue must not be null");
1438                }
1439                getEvent().add(theValue);
1440                return this;
1441        }
1442
1443        /**
1444         * Gets the first repetition for <b>event</b> (),
1445         * creating it if it does not already exist.
1446         *
1447     * <p>
1448     * <b>Definition:</b>
1449     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1450     * </p> 
1451         */
1452        public Event getEventFirstRep() {
1453                if (getEvent().isEmpty()) {
1454                        return addEvent();
1455                }
1456                return getEvent().get(0); 
1457        }
1458  
1459        /**
1460         * Gets the value(s) for <b>encounter</b> ().
1461         * creating it if it does
1462         * not exist. Will not return <code>null</code>.
1463         *
1464     * <p>
1465     * <b>Definition:</b>
1466     * Describes the clinical encounter or type of care this documentation is associated with.
1467     * </p> 
1468         */
1469        public ResourceReferenceDt getEncounter() {  
1470                if (myEncounter == null) {
1471                        myEncounter = new ResourceReferenceDt();
1472                }
1473                return myEncounter;
1474        }
1475
1476        /**
1477         * Sets the value(s) for <b>encounter</b> ()
1478         *
1479     * <p>
1480     * <b>Definition:</b>
1481     * Describes the clinical encounter or type of care this documentation is associated with.
1482     * </p> 
1483         */
1484        public Composition setEncounter(ResourceReferenceDt theValue) {
1485                myEncounter = theValue;
1486                return this;
1487        }
1488        
1489        
1490
1491  
1492        /**
1493         * Gets the value(s) for <b>section</b> ().
1494         * creating it if it does
1495         * not exist. Will not return <code>null</code>.
1496         *
1497     * <p>
1498     * <b>Definition:</b>
1499     * The root of the sections that make up the composition
1500     * </p> 
1501         */
1502        public java.util.List<Section> getSection() {  
1503                if (mySection == null) {
1504                        mySection = new java.util.ArrayList<Section>();
1505                }
1506                return mySection;
1507        }
1508
1509        /**
1510         * Sets the value(s) for <b>section</b> ()
1511         *
1512     * <p>
1513     * <b>Definition:</b>
1514     * The root of the sections that make up the composition
1515     * </p> 
1516         */
1517        public Composition setSection(java.util.List<Section> theValue) {
1518                mySection = theValue;
1519                return this;
1520        }
1521        
1522        
1523
1524        /**
1525         * Adds and returns a new value for <b>section</b> ()
1526         *
1527     * <p>
1528     * <b>Definition:</b>
1529     * The root of the sections that make up the composition
1530     * </p> 
1531         */
1532        public Section addSection() {
1533                Section newType = new Section();
1534                getSection().add(newType);
1535                return newType; 
1536        }
1537
1538        /**
1539         * Adds a given new value for <b>section</b> ()
1540         *
1541         * <p>
1542         * <b>Definition:</b>
1543         * The root of the sections that make up the composition
1544         * </p>
1545         * @param theValue The section to add (must not be <code>null</code>)
1546         */
1547        public Composition addSection(Section theValue) {
1548                if (theValue == null) {
1549                        throw new NullPointerException("theValue must not be null");
1550                }
1551                getSection().add(theValue);
1552                return this;
1553        }
1554
1555        /**
1556         * Gets the first repetition for <b>section</b> (),
1557         * creating it if it does not already exist.
1558         *
1559     * <p>
1560     * <b>Definition:</b>
1561     * The root of the sections that make up the composition
1562     * </p> 
1563         */
1564        public Section getSectionFirstRep() {
1565                if (getSection().isEmpty()) {
1566                        return addSection();
1567                }
1568                return getSection().get(0); 
1569        }
1570  
1571        /**
1572         * Block class for child element: <b>Composition.attester</b> ()
1573         *
1574     * <p>
1575     * <b>Definition:</b>
1576     * A participant who has attested to the accuracy of the composition/document
1577     * </p> 
1578         */
1579        @Block()        
1580        public static class Attester 
1581            extends  BaseIdentifiableElement        implements IResourceBlock {
1582        
1583        @Child(name="mode", type=CodeDt.class, order=0, min=1, max=Child.MAX_UNLIMITED, summary=true, modifier=false)   
1584        @Description(
1585                shortDefinition="",
1586                formalDefinition="The type of attestation the authenticator offers"
1587        )
1588        private java.util.List<BoundCodeDt<CompositionAttestationModeEnum>> myMode;
1589        
1590        @Child(name="time", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
1591        @Description(
1592                shortDefinition="",
1593                formalDefinition="When composition was attested by the party"
1594        )
1595        private DateTimeDt myTime;
1596        
1597        @Child(name="party", order=2, min=0, max=1, summary=true, modifier=false, type={
1598                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Organization.class     })
1599        @Description(
1600                shortDefinition="",
1601                formalDefinition="Who attested the composition in the specified way"
1602        )
1603        private ResourceReferenceDt myParty;
1604        
1605
1606        @Override
1607        public boolean isEmpty() {
1608                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myMode,  myTime,  myParty);
1609        }
1610        
1611        @Override
1612        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1613                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMode, myTime, myParty);
1614        }
1615
1616        /**
1617         * Gets the value(s) for <b>mode</b> ().
1618         * creating it if it does
1619         * not exist. Will not return <code>null</code>.
1620         *
1621     * <p>
1622     * <b>Definition:</b>
1623     * The type of attestation the authenticator offers
1624     * </p> 
1625         */
1626        public java.util.List<BoundCodeDt<CompositionAttestationModeEnum>> getMode() {  
1627                if (myMode == null) {
1628                        myMode = new java.util.ArrayList<BoundCodeDt<CompositionAttestationModeEnum>>();
1629                }
1630                return myMode;
1631        }
1632
1633        /**
1634         * Sets the value(s) for <b>mode</b> ()
1635         *
1636     * <p>
1637     * <b>Definition:</b>
1638     * The type of attestation the authenticator offers
1639     * </p> 
1640         */
1641        public Attester setMode(java.util.List<BoundCodeDt<CompositionAttestationModeEnum>> theValue) {
1642                myMode = theValue;
1643                return this;
1644        }
1645        
1646        
1647
1648        /**
1649         * Add a value for <b>mode</b> () using an enumerated type. This
1650         * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
1651         * or contain the desirable codes. If you wish to use codes other than those which are built-in, 
1652         * you may also use the {@link #addMode()} method.
1653         *
1654     * <p>
1655     * <b>Definition:</b>
1656     * The type of attestation the authenticator offers
1657     * </p> 
1658         */
1659        public BoundCodeDt<CompositionAttestationModeEnum> addMode(CompositionAttestationModeEnum theValue) {
1660                BoundCodeDt<CompositionAttestationModeEnum> retVal = new BoundCodeDt<CompositionAttestationModeEnum>(CompositionAttestationModeEnum.VALUESET_BINDER, theValue);
1661                getMode().add(retVal);
1662                return retVal;
1663        }
1664
1665        /**
1666         * Gets the first repetition for <b>mode</b> (),
1667         * creating it if it does not already exist.
1668         *
1669     * <p>
1670     * <b>Definition:</b>
1671     * The type of attestation the authenticator offers
1672     * </p> 
1673         */
1674        public BoundCodeDt<CompositionAttestationModeEnum> getModeFirstRep() {
1675                if (getMode().size() == 0) {
1676                        addMode();
1677                }
1678                return getMode().get(0);
1679        }
1680
1681        /**
1682         * Add a value for <b>mode</b> ()
1683         *
1684     * <p>
1685     * <b>Definition:</b>
1686     * The type of attestation the authenticator offers
1687     * </p> 
1688         */
1689        public BoundCodeDt<CompositionAttestationModeEnum> addMode() {
1690                BoundCodeDt<CompositionAttestationModeEnum> retVal = new BoundCodeDt<CompositionAttestationModeEnum>(CompositionAttestationModeEnum.VALUESET_BINDER);
1691                getMode().add(retVal);
1692                return retVal;
1693        }
1694
1695        /**
1696         * Sets the value(s), and clears any existing value(s) for <b>mode</b> ()
1697         *
1698     * <p>
1699     * <b>Definition:</b>
1700     * The type of attestation the authenticator offers
1701     * </p> 
1702         */
1703        public Attester setMode(CompositionAttestationModeEnum theValue) {
1704                getMode().clear();
1705                addMode(theValue);
1706                return this;
1707        }
1708
1709  
1710        /**
1711         * Gets the value(s) for <b>time</b> ().
1712         * creating it if it does
1713         * not exist. Will not return <code>null</code>.
1714         *
1715     * <p>
1716     * <b>Definition:</b>
1717     * When composition was attested by the party
1718     * </p> 
1719         */
1720        public DateTimeDt getTimeElement() {  
1721                if (myTime == null) {
1722                        myTime = new DateTimeDt();
1723                }
1724                return myTime;
1725        }
1726
1727        
1728        /**
1729         * Gets the value(s) for <b>time</b> ().
1730         * creating it if it does
1731         * not exist. Will not return <code>null</code>.
1732         *
1733     * <p>
1734     * <b>Definition:</b>
1735     * When composition was attested by the party
1736     * </p> 
1737         */
1738        public Date getTime() {  
1739                return getTimeElement().getValue();
1740        }
1741
1742        /**
1743         * Sets the value(s) for <b>time</b> ()
1744         *
1745     * <p>
1746     * <b>Definition:</b>
1747     * When composition was attested by the party
1748     * </p> 
1749         */
1750        public Attester setTime(DateTimeDt theValue) {
1751                myTime = theValue;
1752                return this;
1753        }
1754        
1755        
1756
1757        /**
1758         * Sets the value for <b>time</b> ()
1759         *
1760     * <p>
1761     * <b>Definition:</b>
1762     * When composition was attested by the party
1763     * </p> 
1764         */
1765        public Attester setTime( Date theDate,  TemporalPrecisionEnum thePrecision) {
1766                myTime = new DateTimeDt(theDate, thePrecision); 
1767                return this; 
1768        }
1769
1770        /**
1771         * Sets the value for <b>time</b> ()
1772         *
1773     * <p>
1774     * <b>Definition:</b>
1775     * When composition was attested by the party
1776     * </p> 
1777         */
1778        public Attester setTimeWithSecondsPrecision( Date theDate) {
1779                myTime = new DateTimeDt(theDate); 
1780                return this; 
1781        }
1782
1783 
1784        /**
1785         * Gets the value(s) for <b>party</b> ().
1786         * creating it if it does
1787         * not exist. Will not return <code>null</code>.
1788         *
1789     * <p>
1790     * <b>Definition:</b>
1791     * Who attested the composition in the specified way
1792     * </p> 
1793         */
1794        public ResourceReferenceDt getParty() {  
1795                if (myParty == null) {
1796                        myParty = new ResourceReferenceDt();
1797                }
1798                return myParty;
1799        }
1800
1801        /**
1802         * Sets the value(s) for <b>party</b> ()
1803         *
1804     * <p>
1805     * <b>Definition:</b>
1806     * Who attested the composition in the specified way
1807     * </p> 
1808         */
1809        public Attester setParty(ResourceReferenceDt theValue) {
1810                myParty = theValue;
1811                return this;
1812        }
1813        
1814        
1815
1816  
1817
1818
1819        }
1820
1821
1822        /**
1823         * Block class for child element: <b>Composition.event</b> ()
1824         *
1825     * <p>
1826     * <b>Definition:</b>
1827     * The clinical service, such as a colonoscopy or an appendectomy, being documented
1828     * </p> 
1829         */
1830        @Block()        
1831        public static class Event 
1832            extends  BaseIdentifiableElement        implements IResourceBlock {
1833        
1834        @Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)        
1835        @Description(
1836                shortDefinition="",
1837                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."
1838        )
1839        private java.util.List<CodeableConceptDt> myCode;
1840        
1841        @Child(name="period", type=PeriodDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
1842        @Description(
1843                shortDefinition="",
1844                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"
1845        )
1846        private PeriodDt myPeriod;
1847        
1848        @Child(name="detail", order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false, type={
1849                IResource.class })
1850        @Description(
1851                shortDefinition="",
1852                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"
1853        )
1854        private java.util.List<ResourceReferenceDt> myDetail;
1855        
1856
1857        @Override
1858        public boolean isEmpty() {
1859                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  myPeriod,  myDetail);
1860        }
1861        
1862        @Override
1863        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1864                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, myPeriod, myDetail);
1865        }
1866
1867        /**
1868         * Gets the value(s) for <b>code</b> ().
1869         * creating it if it does
1870         * not exist. Will not return <code>null</code>.
1871         *
1872     * <p>
1873     * <b>Definition:</b>
1874     * 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.
1875     * </p> 
1876         */
1877        public java.util.List<CodeableConceptDt> getCode() {  
1878                if (myCode == null) {
1879                        myCode = new java.util.ArrayList<CodeableConceptDt>();
1880                }
1881                return myCode;
1882        }
1883
1884        /**
1885         * Sets the value(s) for <b>code</b> ()
1886         *
1887     * <p>
1888     * <b>Definition:</b>
1889     * 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.
1890     * </p> 
1891         */
1892        public Event setCode(java.util.List<CodeableConceptDt> theValue) {
1893                myCode = theValue;
1894                return this;
1895        }
1896        
1897        
1898
1899        /**
1900         * Adds and returns a new value for <b>code</b> ()
1901         *
1902     * <p>
1903     * <b>Definition:</b>
1904     * 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.
1905     * </p> 
1906         */
1907        public CodeableConceptDt addCode() {
1908                CodeableConceptDt newType = new CodeableConceptDt();
1909                getCode().add(newType);
1910                return newType; 
1911        }
1912
1913        /**
1914         * Adds a given new value for <b>code</b> ()
1915         *
1916         * <p>
1917         * <b>Definition:</b>
1918         * 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.
1919         * </p>
1920         * @param theValue The code to add (must not be <code>null</code>)
1921         */
1922        public Event addCode(CodeableConceptDt theValue) {
1923                if (theValue == null) {
1924                        throw new NullPointerException("theValue must not be null");
1925                }
1926                getCode().add(theValue);
1927                return this;
1928        }
1929
1930        /**
1931         * Gets the first repetition for <b>code</b> (),
1932         * creating it if it does not already exist.
1933         *
1934     * <p>
1935     * <b>Definition:</b>
1936     * 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.
1937     * </p> 
1938         */
1939        public CodeableConceptDt getCodeFirstRep() {
1940                if (getCode().isEmpty()) {
1941                        return addCode();
1942                }
1943                return getCode().get(0); 
1944        }
1945  
1946        /**
1947         * Gets the value(s) for <b>period</b> ().
1948         * creating it if it does
1949         * not exist. Will not return <code>null</code>.
1950         *
1951     * <p>
1952     * <b>Definition:</b>
1953     * 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
1954     * </p> 
1955         */
1956        public PeriodDt getPeriod() {  
1957                if (myPeriod == null) {
1958                        myPeriod = new PeriodDt();
1959                }
1960                return myPeriod;
1961        }
1962
1963        /**
1964         * Sets the value(s) for <b>period</b> ()
1965         *
1966     * <p>
1967     * <b>Definition:</b>
1968     * 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
1969     * </p> 
1970         */
1971        public Event setPeriod(PeriodDt theValue) {
1972                myPeriod = theValue;
1973                return this;
1974        }
1975        
1976        
1977
1978  
1979        /**
1980         * Gets the value(s) for <b>detail</b> ().
1981         * creating it if it does
1982         * not exist. Will not return <code>null</code>.
1983         *
1984     * <p>
1985     * <b>Definition:</b>
1986     * 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
1987     * </p> 
1988         */
1989        public java.util.List<ResourceReferenceDt> getDetail() {  
1990                if (myDetail == null) {
1991                        myDetail = new java.util.ArrayList<ResourceReferenceDt>();
1992                }
1993                return myDetail;
1994        }
1995
1996        /**
1997         * Sets the value(s) for <b>detail</b> ()
1998         *
1999     * <p>
2000     * <b>Definition:</b>
2001     * 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
2002     * </p> 
2003         */
2004        public Event setDetail(java.util.List<ResourceReferenceDt> theValue) {
2005                myDetail = theValue;
2006                return this;
2007        }
2008        
2009        
2010
2011        /**
2012         * Adds and returns a new value for <b>detail</b> ()
2013         *
2014     * <p>
2015     * <b>Definition:</b>
2016     * 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
2017     * </p> 
2018         */
2019        public ResourceReferenceDt addDetail() {
2020                ResourceReferenceDt newType = new ResourceReferenceDt();
2021                getDetail().add(newType);
2022                return newType; 
2023        }
2024  
2025
2026
2027        }
2028
2029
2030        /**
2031         * Block class for child element: <b>Composition.section</b> ()
2032         *
2033     * <p>
2034     * <b>Definition:</b>
2035     * The root of the sections that make up the composition
2036     * </p> 
2037         */
2038        @Block()        
2039        public static class Section 
2040            extends  BaseIdentifiableElement        implements IResourceBlock {
2041        
2042        @Child(name="title", type=StringDt.class, order=0, min=0, max=1, summary=false, modifier=false) 
2043        @Description(
2044                shortDefinition="",
2045                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"
2046        )
2047        private StringDt myTitle;
2048        
2049        @Child(name="code", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=false, modifier=false) 
2050        @Description(
2051                shortDefinition="",
2052                formalDefinition="A code identifying the kind of content contained within the section. This must be consistent with the section title"
2053        )
2054        private CodeableConceptDt myCode;
2055        
2056        @Child(name="text", type=NarrativeDt.class, order=2, min=0, max=1, summary=false, modifier=false)       
2057        @Description(
2058                shortDefinition="",
2059                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."
2060        )
2061        private NarrativeDt myText;
2062        
2063        @Child(name="mode", type=CodeDt.class, order=3, min=0, max=1, summary=true, modifier=true)      
2064        @Description(
2065                shortDefinition="",
2066                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"
2067        )
2068        private CodeDt myMode;
2069        
2070        @Child(name="orderedBy", type=CodeableConceptDt.class, order=4, min=0, max=1, summary=false, modifier=false)    
2071        @Description(
2072                shortDefinition="",
2073                formalDefinition="Specifies the order applied to the items in the section entries"
2074        )
2075        private CodeableConceptDt myOrderedBy;
2076        
2077        @Child(name="entry", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
2078                IResource.class })
2079        @Description(
2080                shortDefinition="",
2081                formalDefinition="A reference to the actual resource from which the narrative in the section is derived"
2082        )
2083        private java.util.List<ResourceReferenceDt> myEntry;
2084        
2085        @Child(name="emptyReason", type=CodeableConceptDt.class, order=6, min=0, max=1, summary=false, modifier=false)  
2086        @Description(
2087                shortDefinition="",
2088                formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason"
2089        )
2090        private CodeableConceptDt myEmptyReason;
2091        
2092        @Child(name="section", type=Section.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
2093        @Description(
2094                shortDefinition="",
2095                formalDefinition="A nested sub-section within this section"
2096        )
2097        private java.util.List<Section> mySection;
2098        
2099
2100        @Override
2101        public boolean isEmpty() {
2102                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myTitle,  myCode,  myText,  myMode,  myOrderedBy,  myEntry,  myEmptyReason,  mySection);
2103        }
2104        
2105        @Override
2106        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
2107                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myTitle, myCode, myText, myMode, myOrderedBy, myEntry, myEmptyReason, mySection);
2108        }
2109
2110        /**
2111         * Gets the value(s) for <b>title</b> ().
2112         * creating it if it does
2113         * not exist. Will not return <code>null</code>.
2114         *
2115     * <p>
2116     * <b>Definition:</b>
2117     * 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
2118     * </p> 
2119         */
2120        public StringDt getTitleElement() {  
2121                if (myTitle == null) {
2122                        myTitle = new StringDt();
2123                }
2124                return myTitle;
2125        }
2126
2127        
2128        /**
2129         * Gets the value(s) for <b>title</b> ().
2130         * creating it if it does
2131         * not exist. Will not return <code>null</code>.
2132         *
2133     * <p>
2134     * <b>Definition:</b>
2135     * 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
2136     * </p> 
2137         */
2138        public String getTitle() {  
2139                return getTitleElement().getValue();
2140        }
2141
2142        /**
2143         * Sets the value(s) for <b>title</b> ()
2144         *
2145     * <p>
2146     * <b>Definition:</b>
2147     * 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
2148     * </p> 
2149         */
2150        public Section setTitle(StringDt theValue) {
2151                myTitle = theValue;
2152                return this;
2153        }
2154        
2155        
2156
2157        /**
2158         * Sets the value for <b>title</b> ()
2159         *
2160     * <p>
2161     * <b>Definition:</b>
2162     * 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
2163     * </p> 
2164         */
2165        public Section setTitle( String theString) {
2166                myTitle = new StringDt(theString); 
2167                return this; 
2168        }
2169
2170 
2171        /**
2172         * Gets the value(s) for <b>code</b> ().
2173         * creating it if it does
2174         * not exist. Will not return <code>null</code>.
2175         *
2176     * <p>
2177     * <b>Definition:</b>
2178     * A code identifying the kind of content contained within the section. This must be consistent with the section title
2179     * </p> 
2180         */
2181        public CodeableConceptDt getCode() {  
2182                if (myCode == null) {
2183                        myCode = new CodeableConceptDt();
2184                }
2185                return myCode;
2186        }
2187
2188        /**
2189         * Sets the value(s) for <b>code</b> ()
2190         *
2191     * <p>
2192     * <b>Definition:</b>
2193     * A code identifying the kind of content contained within the section. This must be consistent with the section title
2194     * </p> 
2195         */
2196        public Section setCode(CodeableConceptDt theValue) {
2197                myCode = theValue;
2198                return this;
2199        }
2200        
2201        
2202
2203  
2204        /**
2205         * Gets the value(s) for <b>text</b> ().
2206         * creating it if it does
2207         * not exist. Will not return <code>null</code>.
2208         *
2209     * <p>
2210     * <b>Definition:</b>
2211     * 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.
2212     * </p> 
2213         */
2214        public NarrativeDt getText() {  
2215                if (myText == null) {
2216                        myText = new NarrativeDt();
2217                }
2218                return myText;
2219        }
2220
2221        /**
2222         * Sets the value(s) for <b>text</b> ()
2223         *
2224     * <p>
2225     * <b>Definition:</b>
2226     * 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.
2227     * </p> 
2228         */
2229        public Section setText(NarrativeDt theValue) {
2230                myText = theValue;
2231                return this;
2232        }
2233        
2234        
2235
2236  
2237        /**
2238         * Gets the value(s) for <b>mode</b> ().
2239         * creating it if it does
2240         * not exist. Will not return <code>null</code>.
2241         *
2242     * <p>
2243     * <b>Definition:</b>
2244     * 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
2245     * </p> 
2246         */
2247        public CodeDt getModeElement() {  
2248                if (myMode == null) {
2249                        myMode = new CodeDt();
2250                }
2251                return myMode;
2252        }
2253
2254        
2255        /**
2256         * Gets the value(s) for <b>mode</b> ().
2257         * creating it if it does
2258         * not exist. Will not return <code>null</code>.
2259         *
2260     * <p>
2261     * <b>Definition:</b>
2262     * 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
2263     * </p> 
2264         */
2265        public String getMode() {  
2266                return getModeElement().getValue();
2267        }
2268
2269        /**
2270         * Sets the value(s) for <b>mode</b> ()
2271         *
2272     * <p>
2273     * <b>Definition:</b>
2274     * 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
2275     * </p> 
2276         */
2277        public Section setMode(CodeDt theValue) {
2278                myMode = theValue;
2279                return this;
2280        }
2281        
2282        
2283
2284        /**
2285         * Sets the value for <b>mode</b> ()
2286         *
2287     * <p>
2288     * <b>Definition:</b>
2289     * 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
2290     * </p> 
2291         */
2292        public Section setMode( String theCode) {
2293                myMode = new CodeDt(theCode); 
2294                return this; 
2295        }
2296
2297 
2298        /**
2299         * Gets the value(s) for <b>orderedBy</b> ().
2300         * creating it if it does
2301         * not exist. Will not return <code>null</code>.
2302         *
2303     * <p>
2304     * <b>Definition:</b>
2305     * Specifies the order applied to the items in the section entries
2306     * </p> 
2307         */
2308        public CodeableConceptDt getOrderedBy() {  
2309                if (myOrderedBy == null) {
2310                        myOrderedBy = new CodeableConceptDt();
2311                }
2312                return myOrderedBy;
2313        }
2314
2315        /**
2316         * Sets the value(s) for <b>orderedBy</b> ()
2317         *
2318     * <p>
2319     * <b>Definition:</b>
2320     * Specifies the order applied to the items in the section entries
2321     * </p> 
2322         */
2323        public Section setOrderedBy(CodeableConceptDt theValue) {
2324                myOrderedBy = theValue;
2325                return this;
2326        }
2327        
2328        
2329
2330  
2331        /**
2332         * Gets the value(s) for <b>entry</b> ().
2333         * creating it if it does
2334         * not exist. Will not return <code>null</code>.
2335         *
2336     * <p>
2337     * <b>Definition:</b>
2338     * A reference to the actual resource from which the narrative in the section is derived
2339     * </p> 
2340         */
2341        public java.util.List<ResourceReferenceDt> getEntry() {  
2342                if (myEntry == null) {
2343                        myEntry = new java.util.ArrayList<ResourceReferenceDt>();
2344                }
2345                return myEntry;
2346        }
2347
2348        /**
2349         * Sets the value(s) for <b>entry</b> ()
2350         *
2351     * <p>
2352     * <b>Definition:</b>
2353     * A reference to the actual resource from which the narrative in the section is derived
2354     * </p> 
2355         */
2356        public Section setEntry(java.util.List<ResourceReferenceDt> theValue) {
2357                myEntry = theValue;
2358                return this;
2359        }
2360        
2361        
2362
2363        /**
2364         * Adds and returns a new value for <b>entry</b> ()
2365         *
2366     * <p>
2367     * <b>Definition:</b>
2368     * A reference to the actual resource from which the narrative in the section is derived
2369     * </p> 
2370         */
2371        public ResourceReferenceDt addEntry() {
2372                ResourceReferenceDt newType = new ResourceReferenceDt();
2373                getEntry().add(newType);
2374                return newType; 
2375        }
2376  
2377        /**
2378         * Gets the value(s) for <b>emptyReason</b> ().
2379         * creating it if it does
2380         * not exist. Will not return <code>null</code>.
2381         *
2382     * <p>
2383     * <b>Definition:</b>
2384     * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason
2385     * </p> 
2386         */
2387        public CodeableConceptDt getEmptyReason() {  
2388                if (myEmptyReason == null) {
2389                        myEmptyReason = new CodeableConceptDt();
2390                }
2391                return myEmptyReason;
2392        }
2393
2394        /**
2395         * Sets the value(s) for <b>emptyReason</b> ()
2396         *
2397     * <p>
2398     * <b>Definition:</b>
2399     * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason
2400     * </p> 
2401         */
2402        public Section setEmptyReason(CodeableConceptDt theValue) {
2403                myEmptyReason = theValue;
2404                return this;
2405        }
2406        
2407        
2408
2409  
2410        /**
2411         * Gets the value(s) for <b>section</b> ().
2412         * creating it if it does
2413         * not exist. Will not return <code>null</code>.
2414         *
2415     * <p>
2416     * <b>Definition:</b>
2417     * A nested sub-section within this section
2418     * </p> 
2419         */
2420        public java.util.List<Section> getSection() {  
2421                if (mySection == null) {
2422                        mySection = new java.util.ArrayList<Section>();
2423                }
2424                return mySection;
2425        }
2426
2427        /**
2428         * Sets the value(s) for <b>section</b> ()
2429         *
2430     * <p>
2431     * <b>Definition:</b>
2432     * A nested sub-section within this section
2433     * </p> 
2434         */
2435        public Section setSection(java.util.List<Section> theValue) {
2436                mySection = theValue;
2437                return this;
2438        }
2439        
2440        
2441
2442        /**
2443         * Adds and returns a new value for <b>section</b> ()
2444         *
2445     * <p>
2446     * <b>Definition:</b>
2447     * A nested sub-section within this section
2448     * </p> 
2449         */
2450        public Section addSection() {
2451                Section newType = new Section();
2452                getSection().add(newType);
2453                return newType; 
2454        }
2455
2456        /**
2457         * Adds a given new value for <b>section</b> ()
2458         *
2459         * <p>
2460         * <b>Definition:</b>
2461         * A nested sub-section within this section
2462         * </p>
2463         * @param theValue The section to add (must not be <code>null</code>)
2464         */
2465        public Section addSection(Section theValue) {
2466                if (theValue == null) {
2467                        throw new NullPointerException("theValue must not be null");
2468                }
2469                getSection().add(theValue);
2470                return this;
2471        }
2472
2473        /**
2474         * Gets the first repetition for <b>section</b> (),
2475         * creating it if it does not already exist.
2476         *
2477     * <p>
2478     * <b>Definition:</b>
2479     * A nested sub-section within this section
2480     * </p> 
2481         */
2482        public Section getSectionFirstRep() {
2483                if (getSection().isEmpty()) {
2484                        return addSection();
2485                }
2486                return getSection().get(0); 
2487        }
2488  
2489
2490
2491        }
2492
2493
2494
2495
2496    @Override
2497    public String getResourceName() {
2498        return "Composition";
2499    }
2500    
2501    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2502        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2503    }
2504
2505
2506}