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