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>DocumentManifest</b> Resource
320 * (infrastructure.documents)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A manifest that defines a set of documents.
325 * </p> 
326 *
327 * <p>
328 * <b>Requirements:</b>
329 * 
330 * </p> 
331 *
332 * <p>
333 * <b>Profile Definition:</b>
334 * <a href="http://hl7.org/fhir/profiles/DocumentManifest">http://hl7.org/fhir/profiles/DocumentManifest</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="DocumentManifest", profile="http://hl7.org/fhir/profiles/DocumentManifest", id="documentmanifest")
339public class DocumentManifest extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>identifier</b>
344         * <p>
345         * Description: <b></b><br>
346         * Type: <b>token</b><br>
347         * Path: <b>DocumentManifest.masterIdentifier | DocumentManifest.identifier</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="", type="token"  )
351        public static final String SP_IDENTIFIER = "identifier";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>token</b><br>
358         * Path: <b>DocumentManifest.masterIdentifier | DocumentManifest.identifier</b><br>
359         * </p>
360         */
361        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
362
363        /**
364         * Search parameter constant for <b>subject</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>reference</b><br>
368         * Path: <b>DocumentManifest.subject</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="", type="reference"  )
372        public static final String SP_SUBJECT = "subject";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>reference</b><br>
379         * Path: <b>DocumentManifest.subject</b><br>
380         * </p>
381         */
382        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
383
384        /**
385         * Search parameter constant for <b>type</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>DocumentManifest.type</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="type", path="DocumentManifest.type", description="", type="token"  )
393        public static final String SP_TYPE = "type";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>type</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>DocumentManifest.type</b><br>
401         * </p>
402         */
403        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
404
405        /**
406         * Search parameter constant for <b>recipient</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>reference</b><br>
410         * Path: <b>DocumentManifest.recipient</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="", type="reference"  )
414        public static final String SP_RECIPIENT = "recipient";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>recipient</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>reference</b><br>
421         * Path: <b>DocumentManifest.recipient</b><br>
422         * </p>
423         */
424        public static final ReferenceClientParam RECIPIENT = new ReferenceClientParam(SP_RECIPIENT);
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>DocumentManifest.author</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="author", path="DocumentManifest.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>DocumentManifest.author</b><br>
443         * </p>
444         */
445        public static final ReferenceClientParam AUTHOR = new ReferenceClientParam(SP_AUTHOR);
446
447        /**
448         * Search parameter constant for <b>created</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>date</b><br>
452         * Path: <b>DocumentManifest.created</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="created", path="DocumentManifest.created", description="", type="date"  )
456        public static final String SP_CREATED = "created";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>created</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>date</b><br>
463         * Path: <b>DocumentManifest.created</b><br>
464         * </p>
465         */
466        public static final DateClientParam CREATED = new DateClientParam(SP_CREATED);
467
468        /**
469         * Search parameter constant for <b>status</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>token</b><br>
473         * Path: <b>DocumentManifest.status</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="status", path="DocumentManifest.status", description="", type="token"  )
477        public static final String SP_STATUS = "status";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>status</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>token</b><br>
484         * Path: <b>DocumentManifest.status</b><br>
485         * </p>
486         */
487        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
488
489        /**
490         * Search parameter constant for <b>description</b>
491         * <p>
492         * Description: <b></b><br>
493         * Type: <b>string</b><br>
494         * Path: <b>DocumentManifest.description</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="description", path="DocumentManifest.description", description="", type="string"  )
498        public static final String SP_DESCRIPTION = "description";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>description</b>
502         * <p>
503         * Description: <b></b><br>
504         * Type: <b>string</b><br>
505         * Path: <b>DocumentManifest.description</b><br>
506         * </p>
507         */
508        public static final StringClientParam DESCRIPTION = new StringClientParam(SP_DESCRIPTION);
509
510        /**
511         * Search parameter constant for <b>content-ref</b>
512         * <p>
513         * Description: <b></b><br>
514         * Type: <b>reference</b><br>
515         * Path: <b>DocumentManifest.content.pReference</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="content-ref", path="DocumentManifest.content.pReference", description="", type="reference"  )
519        public static final String SP_CONTENT_REF = "content-ref";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>content-ref</b>
523         * <p>
524         * Description: <b></b><br>
525         * Type: <b>reference</b><br>
526         * Path: <b>DocumentManifest.content.pReference</b><br>
527         * </p>
528         */
529        public static final ReferenceClientParam CONTENT_REF = new ReferenceClientParam(SP_CONTENT_REF);
530
531        /**
532         * Search parameter constant for <b>patient</b>
533         * <p>
534         * Description: <b></b><br>
535         * Type: <b>reference</b><br>
536         * Path: <b>DocumentManifest.subject</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="patient", path="DocumentManifest.subject", description="", type="reference"  )
540        public static final String SP_PATIENT = "patient";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
544         * <p>
545         * Description: <b></b><br>
546         * Type: <b>reference</b><br>
547         * Path: <b>DocumentManifest.subject</b><br>
548         * </p>
549         */
550        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
551
552        /**
553         * Search parameter constant for <b>source</b>
554         * <p>
555         * Description: <b></b><br>
556         * Type: <b>uri</b><br>
557         * Path: <b>DocumentManifest.source</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="source", path="DocumentManifest.source", description="", type="uri"  )
561        public static final String SP_SOURCE = "source";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>source</b>
565         * <p>
566         * Description: <b></b><br>
567         * Type: <b>uri</b><br>
568         * Path: <b>DocumentManifest.source</b><br>
569         * </p>
570         */
571        public static final UriClientParam SOURCE = new UriClientParam(SP_SOURCE);
572
573        /**
574         * Search parameter constant for <b>related-id</b>
575         * <p>
576         * Description: <b></b><br>
577         * Type: <b>token</b><br>
578         * Path: <b>DocumentManifest.related.identifier</b><br>
579         * </p>
580         */
581        @SearchParamDefinition(name="related-id", path="DocumentManifest.related.identifier", description="", type="token"  )
582        public static final String SP_RELATED_ID = "related-id";
583
584        /**
585         * <b>Fluent Client</b> search parameter constant for <b>related-id</b>
586         * <p>
587         * Description: <b></b><br>
588         * Type: <b>token</b><br>
589         * Path: <b>DocumentManifest.related.identifier</b><br>
590         * </p>
591         */
592        public static final TokenClientParam RELATED_ID = new TokenClientParam(SP_RELATED_ID);
593
594        /**
595         * Search parameter constant for <b>related-ref</b>
596         * <p>
597         * Description: <b></b><br>
598         * Type: <b>reference</b><br>
599         * Path: <b>DocumentManifest.related.ref</b><br>
600         * </p>
601         */
602        @SearchParamDefinition(name="related-ref", path="DocumentManifest.related.ref", description="", type="reference"  )
603        public static final String SP_RELATED_REF = "related-ref";
604
605        /**
606         * <b>Fluent Client</b> search parameter constant for <b>related-ref</b>
607         * <p>
608         * Description: <b></b><br>
609         * Type: <b>reference</b><br>
610         * Path: <b>DocumentManifest.related.ref</b><br>
611         * </p>
612         */
613        public static final ReferenceClientParam RELATED_REF = new ReferenceClientParam(SP_RELATED_REF);
614
615
616        /**
617         * Constant for fluent queries to be used to add include statements. Specifies
618         * the path value of "<b>DocumentManifest:author</b>".
619         */
620        public static final Include INCLUDE_AUTHOR = new Include("DocumentManifest:author");
621
622        /**
623         * Constant for fluent queries to be used to add include statements. Specifies
624         * the path value of "<b>DocumentManifest:content-ref</b>".
625         */
626        public static final Include INCLUDE_CONTENT_REF = new Include("DocumentManifest:content-ref");
627
628        /**
629         * Constant for fluent queries to be used to add include statements. Specifies
630         * the path value of "<b>DocumentManifest:patient</b>".
631         */
632        public static final Include INCLUDE_PATIENT = new Include("DocumentManifest:patient");
633
634        /**
635         * Constant for fluent queries to be used to add include statements. Specifies
636         * the path value of "<b>DocumentManifest:recipient</b>".
637         */
638        public static final Include INCLUDE_RECIPIENT = new Include("DocumentManifest:recipient");
639
640        /**
641         * Constant for fluent queries to be used to add include statements. Specifies
642         * the path value of "<b>DocumentManifest:related-ref</b>".
643         */
644        public static final Include INCLUDE_RELATED_REF = new Include("DocumentManifest:related-ref");
645
646        /**
647         * Constant for fluent queries to be used to add include statements. Specifies
648         * the path value of "<b>DocumentManifest:subject</b>".
649         */
650        public static final Include INCLUDE_SUBJECT = new Include("DocumentManifest:subject");
651
652
653        @Child(name="masterIdentifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=false, modifier=false)  
654        @Description(
655                shortDefinition="id",
656                formalDefinition="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts"
657        )
658        private IdentifierDt myMasterIdentifier;
659        
660        @Child(name="identifier", type=IdentifierDt.class, order=1, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
661        @Description(
662                shortDefinition="id",
663                formalDefinition="Other identifiers associated with the document manifest, including version independent  identifiers"
664        )
665        private java.util.List<IdentifierDt> myIdentifier;
666        
667        @Child(name="subject", order=2, min=0, max=1, summary=false, modifier=false, type={
668                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Group.class,           ca.uhn.fhir.model.dstu2.resource.Device.class   })
669        @Description(
670                shortDefinition="who.focus",
671                formalDefinition="Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)"
672        )
673        private ResourceReferenceDt mySubject;
674        
675        @Child(name="recipient", order=3, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
676                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.RelatedPerson.class,           ca.uhn.fhir.model.dstu2.resource.Organization.class     })
677        @Description(
678                shortDefinition="who.cause",
679                formalDefinition="A patient, practitioner, or organization for which this set of documents is intended"
680        )
681        private java.util.List<ResourceReferenceDt> myRecipient;
682        
683        @Child(name="type", type=CodeableConceptDt.class, order=4, min=0, max=1, summary=false, modifier=false) 
684        @Description(
685                shortDefinition="class",
686                formalDefinition="Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider"
687        )
688        private CodeableConceptDt myType;
689        
690        @Child(name="author", order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
691                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Organization.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    })
692        @Description(
693                shortDefinition="who.author",
694                formalDefinition="Identifies who is responsible for creating the manifest, and adding  documents to it"
695        )
696        private java.util.List<ResourceReferenceDt> myAuthor;
697        
698        @Child(name="created", type=DateTimeDt.class, order=6, min=0, max=1, summary=false, modifier=false)     
699        @Description(
700                shortDefinition="when.done",
701                formalDefinition="When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)"
702        )
703        private DateTimeDt myCreated;
704        
705        @Child(name="source", type=UriDt.class, order=7, min=0, max=1, summary=false, modifier=false)   
706        @Description(
707                shortDefinition="",
708                formalDefinition="Identifies the source system, application, or software that produced the document manifest"
709        )
710        private UriDt mySource;
711        
712        @Child(name="status", type=CodeDt.class, order=8, min=1, max=1, summary=false, modifier=true)   
713        @Description(
714                shortDefinition="status",
715                formalDefinition="The status of this document manifest"
716        )
717        private BoundCodeDt<DocumentReferenceStatusEnum> myStatus;
718        
719        @Child(name="description", type=StringDt.class, order=9, min=0, max=1, summary=false, modifier=false)   
720        @Description(
721                shortDefinition="",
722                formalDefinition="Human-readable description of the source document. This is sometimes known as the \"title\""
723        )
724        private StringDt myDescription;
725        
726        @Child(name="content", order=10, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
727        @Description(
728                shortDefinition="",
729                formalDefinition="The list of Documents included in the manifest."
730        )
731        private java.util.List<Content> myContent;
732        
733        @Child(name="related", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
734        @Description(
735                shortDefinition="",
736                formalDefinition="Related identifiers or resources associated with the DocumentManifest."
737        )
738        private java.util.List<Related> myRelated;
739        
740
741        @Override
742        public boolean isEmpty() {
743                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myMasterIdentifier,  myIdentifier,  mySubject,  myRecipient,  myType,  myAuthor,  myCreated,  mySource,  myStatus,  myDescription,  myContent,  myRelated);
744        }
745        
746        @Override
747        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
748                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMasterIdentifier, myIdentifier, mySubject, myRecipient, myType, myAuthor, myCreated, mySource, myStatus, myDescription, myContent, myRelated);
749        }
750
751        /**
752         * Gets the value(s) for <b>masterIdentifier</b> (id).
753         * creating it if it does
754         * not exist. Will not return <code>null</code>.
755         *
756     * <p>
757     * <b>Definition:</b>
758     * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts
759     * </p> 
760         */
761        public IdentifierDt getMasterIdentifier() {  
762                if (myMasterIdentifier == null) {
763                        myMasterIdentifier = new IdentifierDt();
764                }
765                return myMasterIdentifier;
766        }
767
768        /**
769         * Sets the value(s) for <b>masterIdentifier</b> (id)
770         *
771     * <p>
772     * <b>Definition:</b>
773     * A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts
774     * </p> 
775         */
776        public DocumentManifest setMasterIdentifier(IdentifierDt theValue) {
777                myMasterIdentifier = theValue;
778                return this;
779        }
780        
781        
782
783  
784        /**
785         * Gets the value(s) for <b>identifier</b> (id).
786         * creating it if it does
787         * not exist. Will not return <code>null</code>.
788         *
789     * <p>
790     * <b>Definition:</b>
791     * Other identifiers associated with the document manifest, including version independent  identifiers
792     * </p> 
793         */
794        public java.util.List<IdentifierDt> getIdentifier() {  
795                if (myIdentifier == null) {
796                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
797                }
798                return myIdentifier;
799        }
800
801        /**
802         * Sets the value(s) for <b>identifier</b> (id)
803         *
804     * <p>
805     * <b>Definition:</b>
806     * Other identifiers associated with the document manifest, including version independent  identifiers
807     * </p> 
808         */
809        public DocumentManifest setIdentifier(java.util.List<IdentifierDt> theValue) {
810                myIdentifier = theValue;
811                return this;
812        }
813        
814        
815
816        /**
817         * Adds and returns a new value for <b>identifier</b> (id)
818         *
819     * <p>
820     * <b>Definition:</b>
821     * Other identifiers associated with the document manifest, including version independent  identifiers
822     * </p> 
823         */
824        public IdentifierDt addIdentifier() {
825                IdentifierDt newType = new IdentifierDt();
826                getIdentifier().add(newType);
827                return newType; 
828        }
829
830        /**
831         * Adds a given new value for <b>identifier</b> (id)
832         *
833         * <p>
834         * <b>Definition:</b>
835         * Other identifiers associated with the document manifest, including version independent  identifiers
836         * </p>
837         * @param theValue The identifier to add (must not be <code>null</code>)
838         */
839        public DocumentManifest addIdentifier(IdentifierDt theValue) {
840                if (theValue == null) {
841                        throw new NullPointerException("theValue must not be null");
842                }
843                getIdentifier().add(theValue);
844                return this;
845        }
846
847        /**
848         * Gets the first repetition for <b>identifier</b> (id),
849         * creating it if it does not already exist.
850         *
851     * <p>
852     * <b>Definition:</b>
853     * Other identifiers associated with the document manifest, including version independent  identifiers
854     * </p> 
855         */
856        public IdentifierDt getIdentifierFirstRep() {
857                if (getIdentifier().isEmpty()) {
858                        return addIdentifier();
859                }
860                return getIdentifier().get(0); 
861        }
862  
863        /**
864         * Gets the value(s) for <b>subject</b> (who.focus).
865         * creating it if it does
866         * not exist. Will not return <code>null</code>.
867         *
868     * <p>
869     * <b>Definition:</b>
870     * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)
871     * </p> 
872         */
873        public ResourceReferenceDt getSubject() {  
874                if (mySubject == null) {
875                        mySubject = new ResourceReferenceDt();
876                }
877                return mySubject;
878        }
879
880        /**
881         * Sets the value(s) for <b>subject</b> (who.focus)
882         *
883     * <p>
884     * <b>Definition:</b>
885     * Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case)
886     * </p> 
887         */
888        public DocumentManifest setSubject(ResourceReferenceDt theValue) {
889                mySubject = theValue;
890                return this;
891        }
892        
893        
894
895  
896        /**
897         * Gets the value(s) for <b>recipient</b> (who.cause).
898         * creating it if it does
899         * not exist. Will not return <code>null</code>.
900         *
901     * <p>
902     * <b>Definition:</b>
903     * A patient, practitioner, or organization for which this set of documents is intended
904     * </p> 
905         */
906        public java.util.List<ResourceReferenceDt> getRecipient() {  
907                if (myRecipient == null) {
908                        myRecipient = new java.util.ArrayList<ResourceReferenceDt>();
909                }
910                return myRecipient;
911        }
912
913        /**
914         * Sets the value(s) for <b>recipient</b> (who.cause)
915         *
916     * <p>
917     * <b>Definition:</b>
918     * A patient, practitioner, or organization for which this set of documents is intended
919     * </p> 
920         */
921        public DocumentManifest setRecipient(java.util.List<ResourceReferenceDt> theValue) {
922                myRecipient = theValue;
923                return this;
924        }
925        
926        
927
928        /**
929         * Adds and returns a new value for <b>recipient</b> (who.cause)
930         *
931     * <p>
932     * <b>Definition:</b>
933     * A patient, practitioner, or organization for which this set of documents is intended
934     * </p> 
935         */
936        public ResourceReferenceDt addRecipient() {
937                ResourceReferenceDt newType = new ResourceReferenceDt();
938                getRecipient().add(newType);
939                return newType; 
940        }
941  
942        /**
943         * Gets the value(s) for <b>type</b> (class).
944         * creating it if it does
945         * not exist. Will not return <code>null</code>.
946         *
947     * <p>
948     * <b>Definition:</b>
949     * Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider
950     * </p> 
951         */
952        public CodeableConceptDt getType() {  
953                if (myType == null) {
954                        myType = new CodeableConceptDt();
955                }
956                return myType;
957        }
958
959        /**
960         * Sets the value(s) for <b>type</b> (class)
961         *
962     * <p>
963     * <b>Definition:</b>
964     * Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider
965     * </p> 
966         */
967        public DocumentManifest setType(CodeableConceptDt theValue) {
968                myType = theValue;
969                return this;
970        }
971        
972        
973
974  
975        /**
976         * Gets the value(s) for <b>author</b> (who.author).
977         * creating it if it does
978         * not exist. Will not return <code>null</code>.
979         *
980     * <p>
981     * <b>Definition:</b>
982     * Identifies who is responsible for creating the manifest, and adding  documents to it
983     * </p> 
984         */
985        public java.util.List<ResourceReferenceDt> getAuthor() {  
986                if (myAuthor == null) {
987                        myAuthor = new java.util.ArrayList<ResourceReferenceDt>();
988                }
989                return myAuthor;
990        }
991
992        /**
993         * Sets the value(s) for <b>author</b> (who.author)
994         *
995     * <p>
996     * <b>Definition:</b>
997     * Identifies who is responsible for creating the manifest, and adding  documents to it
998     * </p> 
999         */
1000        public DocumentManifest setAuthor(java.util.List<ResourceReferenceDt> theValue) {
1001                myAuthor = theValue;
1002                return this;
1003        }
1004        
1005        
1006
1007        /**
1008         * Adds and returns a new value for <b>author</b> (who.author)
1009         *
1010     * <p>
1011     * <b>Definition:</b>
1012     * Identifies who is responsible for creating the manifest, and adding  documents to it
1013     * </p> 
1014         */
1015        public ResourceReferenceDt addAuthor() {
1016                ResourceReferenceDt newType = new ResourceReferenceDt();
1017                getAuthor().add(newType);
1018                return newType; 
1019        }
1020  
1021        /**
1022         * Gets the value(s) for <b>created</b> (when.done).
1023         * creating it if it does
1024         * not exist. Will not return <code>null</code>.
1025         *
1026     * <p>
1027     * <b>Definition:</b>
1028     * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)
1029     * </p> 
1030         */
1031        public DateTimeDt getCreatedElement() {  
1032                if (myCreated == null) {
1033                        myCreated = new DateTimeDt();
1034                }
1035                return myCreated;
1036        }
1037
1038        
1039        /**
1040         * Gets the value(s) for <b>created</b> (when.done).
1041         * creating it if it does
1042         * not exist. Will not return <code>null</code>.
1043         *
1044     * <p>
1045     * <b>Definition:</b>
1046     * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)
1047     * </p> 
1048         */
1049        public Date getCreated() {  
1050                return getCreatedElement().getValue();
1051        }
1052
1053        /**
1054         * Sets the value(s) for <b>created</b> (when.done)
1055         *
1056     * <p>
1057     * <b>Definition:</b>
1058     * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)
1059     * </p> 
1060         */
1061        public DocumentManifest setCreated(DateTimeDt theValue) {
1062                myCreated = theValue;
1063                return this;
1064        }
1065        
1066        
1067
1068        /**
1069         * Sets the value for <b>created</b> (when.done)
1070         *
1071     * <p>
1072     * <b>Definition:</b>
1073     * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)
1074     * </p> 
1075         */
1076        public DocumentManifest setCreated( Date theDate,  TemporalPrecisionEnum thePrecision) {
1077                myCreated = new DateTimeDt(theDate, thePrecision); 
1078                return this; 
1079        }
1080
1081        /**
1082         * Sets the value for <b>created</b> (when.done)
1083         *
1084     * <p>
1085     * <b>Definition:</b>
1086     * When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.)
1087     * </p> 
1088         */
1089        public DocumentManifest setCreatedWithSecondsPrecision( Date theDate) {
1090                myCreated = new DateTimeDt(theDate); 
1091                return this; 
1092        }
1093
1094 
1095        /**
1096         * Gets the value(s) for <b>source</b> ().
1097         * creating it if it does
1098         * not exist. Will not return <code>null</code>.
1099         *
1100     * <p>
1101     * <b>Definition:</b>
1102     * Identifies the source system, application, or software that produced the document manifest
1103     * </p> 
1104         */
1105        public UriDt getSourceElement() {  
1106                if (mySource == null) {
1107                        mySource = new UriDt();
1108                }
1109                return mySource;
1110        }
1111
1112        
1113        /**
1114         * Gets the value(s) for <b>source</b> ().
1115         * creating it if it does
1116         * not exist. Will not return <code>null</code>.
1117         *
1118     * <p>
1119     * <b>Definition:</b>
1120     * Identifies the source system, application, or software that produced the document manifest
1121     * </p> 
1122         */
1123        public String getSource() {  
1124                return getSourceElement().getValue();
1125        }
1126
1127        /**
1128         * Sets the value(s) for <b>source</b> ()
1129         *
1130     * <p>
1131     * <b>Definition:</b>
1132     * Identifies the source system, application, or software that produced the document manifest
1133     * </p> 
1134         */
1135        public DocumentManifest setSource(UriDt theValue) {
1136                mySource = theValue;
1137                return this;
1138        }
1139        
1140        
1141
1142        /**
1143         * Sets the value for <b>source</b> ()
1144         *
1145     * <p>
1146     * <b>Definition:</b>
1147     * Identifies the source system, application, or software that produced the document manifest
1148     * </p> 
1149         */
1150        public DocumentManifest setSource( String theUri) {
1151                mySource = new UriDt(theUri); 
1152                return this; 
1153        }
1154
1155 
1156        /**
1157         * Gets the value(s) for <b>status</b> (status).
1158         * creating it if it does
1159         * not exist. Will not return <code>null</code>.
1160         *
1161     * <p>
1162     * <b>Definition:</b>
1163     * The status of this document manifest
1164     * </p> 
1165         */
1166        public BoundCodeDt<DocumentReferenceStatusEnum> getStatusElement() {  
1167                if (myStatus == null) {
1168                        myStatus = new BoundCodeDt<DocumentReferenceStatusEnum>(DocumentReferenceStatusEnum.VALUESET_BINDER);
1169                }
1170                return myStatus;
1171        }
1172
1173        
1174        /**
1175         * Gets the value(s) for <b>status</b> (status).
1176         * creating it if it does
1177         * not exist. Will not return <code>null</code>.
1178         *
1179     * <p>
1180     * <b>Definition:</b>
1181     * The status of this document manifest
1182     * </p> 
1183         */
1184        public String getStatus() {  
1185                return getStatusElement().getValue();
1186        }
1187
1188        /**
1189         * Sets the value(s) for <b>status</b> (status)
1190         *
1191     * <p>
1192     * <b>Definition:</b>
1193     * The status of this document manifest
1194     * </p> 
1195         */
1196        public DocumentManifest setStatus(BoundCodeDt<DocumentReferenceStatusEnum> theValue) {
1197                myStatus = theValue;
1198                return this;
1199        }
1200        
1201        
1202
1203        /**
1204         * Sets the value(s) for <b>status</b> (status)
1205         *
1206     * <p>
1207     * <b>Definition:</b>
1208     * The status of this document manifest
1209     * </p> 
1210         */
1211        public DocumentManifest setStatus(DocumentReferenceStatusEnum theValue) {
1212                setStatus(new BoundCodeDt<DocumentReferenceStatusEnum>(DocumentReferenceStatusEnum.VALUESET_BINDER, theValue));
1213                
1214/*
1215                getStatusElement().setValueAsEnum(theValue);
1216*/
1217                return this;
1218        }
1219
1220  
1221        /**
1222         * Gets the value(s) for <b>description</b> ().
1223         * creating it if it does
1224         * not exist. Will not return <code>null</code>.
1225         *
1226     * <p>
1227     * <b>Definition:</b>
1228     * Human-readable description of the source document. This is sometimes known as the \&quot;title\&quot;
1229     * </p> 
1230         */
1231        public StringDt getDescriptionElement() {  
1232                if (myDescription == null) {
1233                        myDescription = new StringDt();
1234                }
1235                return myDescription;
1236        }
1237
1238        
1239        /**
1240         * Gets the value(s) for <b>description</b> ().
1241         * creating it if it does
1242         * not exist. Will not return <code>null</code>.
1243         *
1244     * <p>
1245     * <b>Definition:</b>
1246     * Human-readable description of the source document. This is sometimes known as the \&quot;title\&quot;
1247     * </p> 
1248         */
1249        public String getDescription() {  
1250                return getDescriptionElement().getValue();
1251        }
1252
1253        /**
1254         * Sets the value(s) for <b>description</b> ()
1255         *
1256     * <p>
1257     * <b>Definition:</b>
1258     * Human-readable description of the source document. This is sometimes known as the \&quot;title\&quot;
1259     * </p> 
1260         */
1261        public DocumentManifest setDescription(StringDt theValue) {
1262                myDescription = theValue;
1263                return this;
1264        }
1265        
1266        
1267
1268        /**
1269         * Sets the value for <b>description</b> ()
1270         *
1271     * <p>
1272     * <b>Definition:</b>
1273     * Human-readable description of the source document. This is sometimes known as the \&quot;title\&quot;
1274     * </p> 
1275         */
1276        public DocumentManifest setDescription( String theString) {
1277                myDescription = new StringDt(theString); 
1278                return this; 
1279        }
1280
1281 
1282        /**
1283         * Gets the value(s) for <b>content</b> ().
1284         * creating it if it does
1285         * not exist. Will not return <code>null</code>.
1286         *
1287     * <p>
1288     * <b>Definition:</b>
1289     * The list of Documents included in the manifest.
1290     * </p> 
1291         */
1292        public java.util.List<Content> getContent() {  
1293                if (myContent == null) {
1294                        myContent = new java.util.ArrayList<Content>();
1295                }
1296                return myContent;
1297        }
1298
1299        /**
1300         * Sets the value(s) for <b>content</b> ()
1301         *
1302     * <p>
1303     * <b>Definition:</b>
1304     * The list of Documents included in the manifest.
1305     * </p> 
1306         */
1307        public DocumentManifest setContent(java.util.List<Content> theValue) {
1308                myContent = theValue;
1309                return this;
1310        }
1311        
1312        
1313
1314        /**
1315         * Adds and returns a new value for <b>content</b> ()
1316         *
1317     * <p>
1318     * <b>Definition:</b>
1319     * The list of Documents included in the manifest.
1320     * </p> 
1321         */
1322        public Content addContent() {
1323                Content newType = new Content();
1324                getContent().add(newType);
1325                return newType; 
1326        }
1327
1328        /**
1329         * Adds a given new value for <b>content</b> ()
1330         *
1331         * <p>
1332         * <b>Definition:</b>
1333         * The list of Documents included in the manifest.
1334         * </p>
1335         * @param theValue The content to add (must not be <code>null</code>)
1336         */
1337        public DocumentManifest addContent(Content theValue) {
1338                if (theValue == null) {
1339                        throw new NullPointerException("theValue must not be null");
1340                }
1341                getContent().add(theValue);
1342                return this;
1343        }
1344
1345        /**
1346         * Gets the first repetition for <b>content</b> (),
1347         * creating it if it does not already exist.
1348         *
1349     * <p>
1350     * <b>Definition:</b>
1351     * The list of Documents included in the manifest.
1352     * </p> 
1353         */
1354        public Content getContentFirstRep() {
1355                if (getContent().isEmpty()) {
1356                        return addContent();
1357                }
1358                return getContent().get(0); 
1359        }
1360  
1361        /**
1362         * Gets the value(s) for <b>related</b> ().
1363         * creating it if it does
1364         * not exist. Will not return <code>null</code>.
1365         *
1366     * <p>
1367     * <b>Definition:</b>
1368     * Related identifiers or resources associated with the DocumentManifest.
1369     * </p> 
1370         */
1371        public java.util.List<Related> getRelated() {  
1372                if (myRelated == null) {
1373                        myRelated = new java.util.ArrayList<Related>();
1374                }
1375                return myRelated;
1376        }
1377
1378        /**
1379         * Sets the value(s) for <b>related</b> ()
1380         *
1381     * <p>
1382     * <b>Definition:</b>
1383     * Related identifiers or resources associated with the DocumentManifest.
1384     * </p> 
1385         */
1386        public DocumentManifest setRelated(java.util.List<Related> theValue) {
1387                myRelated = theValue;
1388                return this;
1389        }
1390        
1391        
1392
1393        /**
1394         * Adds and returns a new value for <b>related</b> ()
1395         *
1396     * <p>
1397     * <b>Definition:</b>
1398     * Related identifiers or resources associated with the DocumentManifest.
1399     * </p> 
1400         */
1401        public Related addRelated() {
1402                Related newType = new Related();
1403                getRelated().add(newType);
1404                return newType; 
1405        }
1406
1407        /**
1408         * Adds a given new value for <b>related</b> ()
1409         *
1410         * <p>
1411         * <b>Definition:</b>
1412         * Related identifiers or resources associated with the DocumentManifest.
1413         * </p>
1414         * @param theValue The related to add (must not be <code>null</code>)
1415         */
1416        public DocumentManifest addRelated(Related theValue) {
1417                if (theValue == null) {
1418                        throw new NullPointerException("theValue must not be null");
1419                }
1420                getRelated().add(theValue);
1421                return this;
1422        }
1423
1424        /**
1425         * Gets the first repetition for <b>related</b> (),
1426         * creating it if it does not already exist.
1427         *
1428     * <p>
1429     * <b>Definition:</b>
1430     * Related identifiers or resources associated with the DocumentManifest.
1431     * </p> 
1432         */
1433        public Related getRelatedFirstRep() {
1434                if (getRelated().isEmpty()) {
1435                        return addRelated();
1436                }
1437                return getRelated().get(0); 
1438        }
1439  
1440        /**
1441         * Block class for child element: <b>DocumentManifest.content</b> ()
1442         *
1443     * <p>
1444     * <b>Definition:</b>
1445     * The list of Documents included in the manifest.
1446     * </p> 
1447         */
1448        @Block()        
1449        public static class Content 
1450            extends  BaseIdentifiableElement        implements IResourceBlock {
1451        
1452        @Child(name="p", order=0, min=1, max=1, summary=false, modifier=false, type={
1453                AttachmentDt.class,             IResource.class })
1454        @Description(
1455                shortDefinition="",
1456                formalDefinition="The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed"
1457        )
1458        private IDatatype myP;
1459        
1460
1461        @Override
1462        public boolean isEmpty() {
1463                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myP);
1464        }
1465        
1466        @Override
1467        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1468                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myP);
1469        }
1470
1471        /**
1472         * Gets the value(s) for <b>p[x]</b> ().
1473         * creating it if it does
1474         * not exist. Will not return <code>null</code>.
1475         *
1476     * <p>
1477     * <b>Definition:</b>
1478     * The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed
1479     * </p> 
1480         */
1481        public IDatatype getP() {  
1482                return myP;
1483        }
1484
1485        /**
1486         * Sets the value(s) for <b>p[x]</b> ()
1487         *
1488     * <p>
1489     * <b>Definition:</b>
1490     * The list of references to document content, or Attachment that consist of the parts of this document manifest. Usually, these would be document references, but direct references to Media or Attachments are also allowed
1491     * </p> 
1492         */
1493        public Content setP(IDatatype theValue) {
1494                myP = theValue;
1495                return this;
1496        }
1497        
1498        
1499
1500  
1501
1502
1503        }
1504
1505
1506        /**
1507         * Block class for child element: <b>DocumentManifest.related</b> ()
1508         *
1509     * <p>
1510     * <b>Definition:</b>
1511     * Related identifiers or resources associated with the DocumentManifest.
1512     * </p> 
1513         */
1514        @Block()        
1515        public static class Related 
1516            extends  BaseIdentifiableElement        implements IResourceBlock {
1517        
1518        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1, summary=false, modifier=false)        
1519        @Description(
1520                shortDefinition="",
1521                formalDefinition="Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers."
1522        )
1523        private IdentifierDt myIdentifier;
1524        
1525        @Child(name="ref", order=1, min=0, max=1, summary=false, modifier=false, type={
1526                IResource.class })
1527        @Description(
1528                shortDefinition="",
1529                formalDefinition="Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc."
1530        )
1531        private ResourceReferenceDt myRef;
1532        
1533
1534        @Override
1535        public boolean isEmpty() {
1536                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myRef);
1537        }
1538        
1539        @Override
1540        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1541                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myRef);
1542        }
1543
1544        /**
1545         * Gets the value(s) for <b>identifier</b> ().
1546         * creating it if it does
1547         * not exist. Will not return <code>null</code>.
1548         *
1549     * <p>
1550     * <b>Definition:</b>
1551     * Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.
1552     * </p> 
1553         */
1554        public IdentifierDt getIdentifier() {  
1555                if (myIdentifier == null) {
1556                        myIdentifier = new IdentifierDt();
1557                }
1558                return myIdentifier;
1559        }
1560
1561        /**
1562         * Sets the value(s) for <b>identifier</b> ()
1563         *
1564     * <p>
1565     * <b>Definition:</b>
1566     * Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.
1567     * </p> 
1568         */
1569        public Related setIdentifier(IdentifierDt theValue) {
1570                myIdentifier = theValue;
1571                return this;
1572        }
1573        
1574        
1575
1576  
1577        /**
1578         * Gets the value(s) for <b>ref</b> ().
1579         * creating it if it does
1580         * not exist. Will not return <code>null</code>.
1581         *
1582     * <p>
1583     * <b>Definition:</b>
1584     * Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.
1585     * </p> 
1586         */
1587        public ResourceReferenceDt getRef() {  
1588                if (myRef == null) {
1589                        myRef = new ResourceReferenceDt();
1590                }
1591                return myRef;
1592        }
1593
1594        /**
1595         * Sets the value(s) for <b>ref</b> ()
1596         *
1597     * <p>
1598     * <b>Definition:</b>
1599     * Related Resource to this DocumentManifest. For example, Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.
1600     * </p> 
1601         */
1602        public Related setRef(ResourceReferenceDt theValue) {
1603                myRef = theValue;
1604                return this;
1605        }
1606        
1607        
1608
1609  
1610
1611
1612        }
1613
1614
1615
1616
1617    @Override
1618    public String getResourceName() {
1619        return "DocumentManifest";
1620    }
1621    
1622    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1623        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1624    }
1625
1626
1627}