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>List</b> Resource
320 * (infrastructure.documents)
321 *
322 * <p>
323 * <b>Definition:</b>
324 * A set of information summarized from a list of other resources.
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/List">http://hl7.org/fhir/profiles/List</a> 
335 * </p>
336 *
337 */
338@ResourceDef(name="List", profile="http://hl7.org/fhir/profiles/List", id="list")
339public class ListResource extends ca.uhn.fhir.model.dstu2.resource.BaseResource
340    implements  IResource     {
341
342        /**
343         * Search parameter constant for <b>source</b>
344         * <p>
345         * Description: <b></b><br>
346         * Type: <b>reference</b><br>
347         * Path: <b>List.source</b><br>
348         * </p>
349         */
350        @SearchParamDefinition(name="source", path="List.source", description="", type="reference"  )
351        public static final String SP_SOURCE = "source";
352
353        /**
354         * <b>Fluent Client</b> search parameter constant for <b>source</b>
355         * <p>
356         * Description: <b></b><br>
357         * Type: <b>reference</b><br>
358         * Path: <b>List.source</b><br>
359         * </p>
360         */
361        public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE);
362
363        /**
364         * Search parameter constant for <b>item</b>
365         * <p>
366         * Description: <b></b><br>
367         * Type: <b>reference</b><br>
368         * Path: <b>List.entry.item</b><br>
369         * </p>
370         */
371        @SearchParamDefinition(name="item", path="List.entry.item", description="", type="reference"  )
372        public static final String SP_ITEM = "item";
373
374        /**
375         * <b>Fluent Client</b> search parameter constant for <b>item</b>
376         * <p>
377         * Description: <b></b><br>
378         * Type: <b>reference</b><br>
379         * Path: <b>List.entry.item</b><br>
380         * </p>
381         */
382        public static final ReferenceClientParam ITEM = new ReferenceClientParam(SP_ITEM);
383
384        /**
385         * Search parameter constant for <b>empty-reason</b>
386         * <p>
387         * Description: <b></b><br>
388         * Type: <b>token</b><br>
389         * Path: <b>List.emptyReason</b><br>
390         * </p>
391         */
392        @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="", type="token"  )
393        public static final String SP_EMPTY_REASON = "empty-reason";
394
395        /**
396         * <b>Fluent Client</b> search parameter constant for <b>empty-reason</b>
397         * <p>
398         * Description: <b></b><br>
399         * Type: <b>token</b><br>
400         * Path: <b>List.emptyReason</b><br>
401         * </p>
402         */
403        public static final TokenClientParam EMPTY_REASON = new TokenClientParam(SP_EMPTY_REASON);
404
405        /**
406         * Search parameter constant for <b>date</b>
407         * <p>
408         * Description: <b></b><br>
409         * Type: <b>date</b><br>
410         * Path: <b>List.date</b><br>
411         * </p>
412         */
413        @SearchParamDefinition(name="date", path="List.date", description="", type="date"  )
414        public static final String SP_DATE = "date";
415
416        /**
417         * <b>Fluent Client</b> search parameter constant for <b>date</b>
418         * <p>
419         * Description: <b></b><br>
420         * Type: <b>date</b><br>
421         * Path: <b>List.date</b><br>
422         * </p>
423         */
424        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
425
426        /**
427         * Search parameter constant for <b>code</b>
428         * <p>
429         * Description: <b></b><br>
430         * Type: <b>token</b><br>
431         * Path: <b>List.code</b><br>
432         * </p>
433         */
434        @SearchParamDefinition(name="code", path="List.code", description="", type="token"  )
435        public static final String SP_CODE = "code";
436
437        /**
438         * <b>Fluent Client</b> search parameter constant for <b>code</b>
439         * <p>
440         * Description: <b></b><br>
441         * Type: <b>token</b><br>
442         * Path: <b>List.code</b><br>
443         * </p>
444         */
445        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
446
447        /**
448         * Search parameter constant for <b>subject</b>
449         * <p>
450         * Description: <b></b><br>
451         * Type: <b>reference</b><br>
452         * Path: <b>List.subject</b><br>
453         * </p>
454         */
455        @SearchParamDefinition(name="subject", path="List.subject", description="", type="reference"  )
456        public static final String SP_SUBJECT = "subject";
457
458        /**
459         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
460         * <p>
461         * Description: <b></b><br>
462         * Type: <b>reference</b><br>
463         * Path: <b>List.subject</b><br>
464         * </p>
465         */
466        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
467
468        /**
469         * Search parameter constant for <b>patient</b>
470         * <p>
471         * Description: <b></b><br>
472         * Type: <b>reference</b><br>
473         * Path: <b>List.subject</b><br>
474         * </p>
475         */
476        @SearchParamDefinition(name="patient", path="List.subject", description="", type="reference"  )
477        public static final String SP_PATIENT = "patient";
478
479        /**
480         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
481         * <p>
482         * Description: <b></b><br>
483         * Type: <b>reference</b><br>
484         * Path: <b>List.subject</b><br>
485         * </p>
486         */
487        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
488
489        /**
490         * Search parameter constant for <b>status</b>
491         * <p>
492         * Description: <b></b><br>
493         * Type: <b>token</b><br>
494         * Path: <b>List.status</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="status", path="List.status", description="", type="token"  )
498        public static final String SP_STATUS = "status";
499
500        /**
501         * <b>Fluent Client</b> search parameter constant for <b>status</b>
502         * <p>
503         * Description: <b></b><br>
504         * Type: <b>token</b><br>
505         * Path: <b>List.status</b><br>
506         * </p>
507         */
508        public static final TokenClientParam STATUS = new TokenClientParam(SP_STATUS);
509
510        /**
511         * Search parameter constant for <b>title</b>
512         * <p>
513         * Description: <b></b><br>
514         * Type: <b>string</b><br>
515         * Path: <b>List.title</b><br>
516         * </p>
517         */
518        @SearchParamDefinition(name="title", path="List.title", description="", type="string"  )
519        public static final String SP_TITLE = "title";
520
521        /**
522         * <b>Fluent Client</b> search parameter constant for <b>title</b>
523         * <p>
524         * Description: <b></b><br>
525         * Type: <b>string</b><br>
526         * Path: <b>List.title</b><br>
527         * </p>
528         */
529        public static final StringClientParam TITLE = new StringClientParam(SP_TITLE);
530
531        /**
532         * Search parameter constant for <b>notes</b>
533         * <p>
534         * Description: <b></b><br>
535         * Type: <b>string</b><br>
536         * Path: <b>List.note</b><br>
537         * </p>
538         */
539        @SearchParamDefinition(name="notes", path="List.note", description="", type="string"  )
540        public static final String SP_NOTES = "notes";
541
542        /**
543         * <b>Fluent Client</b> search parameter constant for <b>notes</b>
544         * <p>
545         * Description: <b></b><br>
546         * Type: <b>string</b><br>
547         * Path: <b>List.note</b><br>
548         * </p>
549         */
550        public static final StringClientParam NOTES = new StringClientParam(SP_NOTES);
551
552        /**
553         * Search parameter constant for <b>encounter</b>
554         * <p>
555         * Description: <b></b><br>
556         * Type: <b>reference</b><br>
557         * Path: <b>List.encounter</b><br>
558         * </p>
559         */
560        @SearchParamDefinition(name="encounter", path="List.encounter", description="", type="reference"  )
561        public static final String SP_ENCOUNTER = "encounter";
562
563        /**
564         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
565         * <p>
566         * Description: <b></b><br>
567         * Type: <b>reference</b><br>
568         * Path: <b>List.encounter</b><br>
569         * </p>
570         */
571        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
572
573
574        /**
575         * Constant for fluent queries to be used to add include statements. Specifies
576         * the path value of "<b>List:encounter</b>".
577         */
578        public static final Include INCLUDE_ENCOUNTER = new Include("List:encounter");
579
580        /**
581         * Constant for fluent queries to be used to add include statements. Specifies
582         * the path value of "<b>List:item</b>".
583         */
584        public static final Include INCLUDE_ITEM = new Include("List:item");
585
586        /**
587         * Constant for fluent queries to be used to add include statements. Specifies
588         * the path value of "<b>List:patient</b>".
589         */
590        public static final Include INCLUDE_PATIENT = new Include("List:patient");
591
592        /**
593         * Constant for fluent queries to be used to add include statements. Specifies
594         * the path value of "<b>List:source</b>".
595         */
596        public static final Include INCLUDE_SOURCE = new Include("List:source");
597
598        /**
599         * Constant for fluent queries to be used to add include statements. Specifies
600         * the path value of "<b>List:subject</b>".
601         */
602        public static final Include INCLUDE_SUBJECT = new Include("List:subject");
603
604
605        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
606        @Description(
607                shortDefinition="id",
608                formalDefinition="Identifier for the List assigned for business purposes outside the context of FHIR."
609        )
610        private java.util.List<IdentifierDt> myIdentifier;
611        
612        @Child(name="title", type=StringDt.class, order=1, min=0, max=1, summary=true, modifier=false)  
613        @Description(
614                shortDefinition="",
615                formalDefinition="A label for the list assigned by the author"
616        )
617        private StringDt myTitle;
618        
619        @Child(name="code", type=CodeableConceptDt.class, order=2, min=0, max=1, summary=true, modifier=false)  
620        @Description(
621                shortDefinition="what",
622                formalDefinition="This code defines the purpose of the list - why it was created"
623        )
624        private CodeableConceptDt myCode;
625        
626        @Child(name="subject", order=3, min=0, max=1, summary=true, modifier=false, type={
627                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Group.class,           ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Location.class })
628        @Description(
629                shortDefinition="who.focus",
630                formalDefinition="The common subject (or patient) of the resources that are in the list, if there is one"
631        )
632        private ResourceReferenceDt mySubject;
633        
634        @Child(name="source", order=4, min=0, max=1, summary=true, modifier=false, type={
635                ca.uhn.fhir.model.dstu2.resource.Practitioner.class,            ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Device.class   })
636        @Description(
637                shortDefinition="who.author",
638                formalDefinition="The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list"
639        )
640        private ResourceReferenceDt mySource;
641        
642        @Child(name="encounter", order=5, min=0, max=1, summary=false, modifier=false, type={
643                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
644        @Description(
645                shortDefinition="context",
646                formalDefinition="The encounter that is the context in which this list was created"
647        )
648        private ResourceReferenceDt myEncounter;
649        
650        @Child(name="status", type=CodeDt.class, order=6, min=1, max=1, summary=true, modifier=true)    
651        @Description(
652                shortDefinition="status",
653                formalDefinition="Indicates the current state of this list"
654        )
655        private BoundCodeDt<ListStatusEnum> myStatus;
656        
657        @Child(name="date", type=DateTimeDt.class, order=7, min=0, max=1, summary=true, modifier=false) 
658        @Description(
659                shortDefinition="when.recorded",
660                formalDefinition="The date that the list was prepared"
661        )
662        private DateTimeDt myDate;
663        
664        @Child(name="orderedBy", type=CodeableConceptDt.class, order=8, min=0, max=1, summary=false, modifier=false)    
665        @Description(
666                shortDefinition="",
667                formalDefinition="What order applies to the items in the list"
668        )
669        private BoundCodeableConceptDt<ListOrderCodesEnum> myOrderedBy;
670        
671        @Child(name="mode", type=CodeDt.class, order=9, min=1, max=1, summary=true, modifier=true)      
672        @Description(
673                shortDefinition="class",
674                formalDefinition="How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted"
675        )
676        private BoundCodeDt<ListModeEnum> myMode;
677        
678        @Child(name="note", type=StringDt.class, order=10, min=0, max=1, summary=false, modifier=false) 
679        @Description(
680                shortDefinition="",
681                formalDefinition="Comments that apply to the overall list"
682        )
683        private StringDt myNote;
684        
685        @Child(name="entry", order=11, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)   
686        @Description(
687                shortDefinition="",
688                formalDefinition="Entries in this list"
689        )
690        private java.util.List<Entry> myEntry;
691        
692        @Child(name="emptyReason", type=CodeableConceptDt.class, order=12, min=0, max=1, summary=false, modifier=false) 
693        @Description(
694                shortDefinition="",
695                formalDefinition="If the list is empty, why the list is empty"
696        )
697        private CodeableConceptDt myEmptyReason;
698        
699
700        @Override
701        public boolean isEmpty() {
702                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myTitle,  myCode,  mySubject,  mySource,  myEncounter,  myStatus,  myDate,  myOrderedBy,  myMode,  myNote,  myEntry,  myEmptyReason);
703        }
704        
705        @Override
706        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
707                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myTitle, myCode, mySubject, mySource, myEncounter, myStatus, myDate, myOrderedBy, myMode, myNote, myEntry, myEmptyReason);
708        }
709
710        /**
711         * Gets the value(s) for <b>identifier</b> (id).
712         * creating it if it does
713         * not exist. Will not return <code>null</code>.
714         *
715     * <p>
716     * <b>Definition:</b>
717     * Identifier for the List assigned for business purposes outside the context of FHIR.
718     * </p> 
719         */
720        public java.util.List<IdentifierDt> getIdentifier() {  
721                if (myIdentifier == null) {
722                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
723                }
724                return myIdentifier;
725        }
726
727        /**
728         * Sets the value(s) for <b>identifier</b> (id)
729         *
730     * <p>
731     * <b>Definition:</b>
732     * Identifier for the List assigned for business purposes outside the context of FHIR.
733     * </p> 
734         */
735        public ListResource setIdentifier(java.util.List<IdentifierDt> theValue) {
736                myIdentifier = theValue;
737                return this;
738        }
739        
740        
741
742        /**
743         * Adds and returns a new value for <b>identifier</b> (id)
744         *
745     * <p>
746     * <b>Definition:</b>
747     * Identifier for the List assigned for business purposes outside the context of FHIR.
748     * </p> 
749         */
750        public IdentifierDt addIdentifier() {
751                IdentifierDt newType = new IdentifierDt();
752                getIdentifier().add(newType);
753                return newType; 
754        }
755
756        /**
757         * Adds a given new value for <b>identifier</b> (id)
758         *
759         * <p>
760         * <b>Definition:</b>
761         * Identifier for the List assigned for business purposes outside the context of FHIR.
762         * </p>
763         * @param theValue The identifier to add (must not be <code>null</code>)
764         */
765        public ListResource addIdentifier(IdentifierDt theValue) {
766                if (theValue == null) {
767                        throw new NullPointerException("theValue must not be null");
768                }
769                getIdentifier().add(theValue);
770                return this;
771        }
772
773        /**
774         * Gets the first repetition for <b>identifier</b> (id),
775         * creating it if it does not already exist.
776         *
777     * <p>
778     * <b>Definition:</b>
779     * Identifier for the List assigned for business purposes outside the context of FHIR.
780     * </p> 
781         */
782        public IdentifierDt getIdentifierFirstRep() {
783                if (getIdentifier().isEmpty()) {
784                        return addIdentifier();
785                }
786                return getIdentifier().get(0); 
787        }
788  
789        /**
790         * Gets the value(s) for <b>title</b> ().
791         * creating it if it does
792         * not exist. Will not return <code>null</code>.
793         *
794     * <p>
795     * <b>Definition:</b>
796     * A label for the list assigned by the author
797     * </p> 
798         */
799        public StringDt getTitleElement() {  
800                if (myTitle == null) {
801                        myTitle = new StringDt();
802                }
803                return myTitle;
804        }
805
806        
807        /**
808         * Gets the value(s) for <b>title</b> ().
809         * creating it if it does
810         * not exist. Will not return <code>null</code>.
811         *
812     * <p>
813     * <b>Definition:</b>
814     * A label for the list assigned by the author
815     * </p> 
816         */
817        public String getTitle() {  
818                return getTitleElement().getValue();
819        }
820
821        /**
822         * Sets the value(s) for <b>title</b> ()
823         *
824     * <p>
825     * <b>Definition:</b>
826     * A label for the list assigned by the author
827     * </p> 
828         */
829        public ListResource setTitle(StringDt theValue) {
830                myTitle = theValue;
831                return this;
832        }
833        
834        
835
836        /**
837         * Sets the value for <b>title</b> ()
838         *
839     * <p>
840     * <b>Definition:</b>
841     * A label for the list assigned by the author
842     * </p> 
843         */
844        public ListResource setTitle( String theString) {
845                myTitle = new StringDt(theString); 
846                return this; 
847        }
848
849 
850        /**
851         * Gets the value(s) for <b>code</b> (what).
852         * creating it if it does
853         * not exist. Will not return <code>null</code>.
854         *
855     * <p>
856     * <b>Definition:</b>
857     * This code defines the purpose of the list - why it was created
858     * </p> 
859         */
860        public CodeableConceptDt getCode() {  
861                if (myCode == null) {
862                        myCode = new CodeableConceptDt();
863                }
864                return myCode;
865        }
866
867        /**
868         * Sets the value(s) for <b>code</b> (what)
869         *
870     * <p>
871     * <b>Definition:</b>
872     * This code defines the purpose of the list - why it was created
873     * </p> 
874         */
875        public ListResource setCode(CodeableConceptDt theValue) {
876                myCode = theValue;
877                return this;
878        }
879        
880        
881
882  
883        /**
884         * Gets the value(s) for <b>subject</b> (who.focus).
885         * creating it if it does
886         * not exist. Will not return <code>null</code>.
887         *
888     * <p>
889     * <b>Definition:</b>
890     * The common subject (or patient) of the resources that are in the list, if there is one
891     * </p> 
892         */
893        public ResourceReferenceDt getSubject() {  
894                if (mySubject == null) {
895                        mySubject = new ResourceReferenceDt();
896                }
897                return mySubject;
898        }
899
900        /**
901         * Sets the value(s) for <b>subject</b> (who.focus)
902         *
903     * <p>
904     * <b>Definition:</b>
905     * The common subject (or patient) of the resources that are in the list, if there is one
906     * </p> 
907         */
908        public ListResource setSubject(ResourceReferenceDt theValue) {
909                mySubject = theValue;
910                return this;
911        }
912        
913        
914
915  
916        /**
917         * Gets the value(s) for <b>source</b> (who.author).
918         * creating it if it does
919         * not exist. Will not return <code>null</code>.
920         *
921     * <p>
922     * <b>Definition:</b>
923     * The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list
924     * </p> 
925         */
926        public ResourceReferenceDt getSource() {  
927                if (mySource == null) {
928                        mySource = new ResourceReferenceDt();
929                }
930                return mySource;
931        }
932
933        /**
934         * Sets the value(s) for <b>source</b> (who.author)
935         *
936     * <p>
937     * <b>Definition:</b>
938     * The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list
939     * </p> 
940         */
941        public ListResource setSource(ResourceReferenceDt theValue) {
942                mySource = theValue;
943                return this;
944        }
945        
946        
947
948  
949        /**
950         * Gets the value(s) for <b>encounter</b> (context).
951         * creating it if it does
952         * not exist. Will not return <code>null</code>.
953         *
954     * <p>
955     * <b>Definition:</b>
956     * The encounter that is the context in which this list was created
957     * </p> 
958         */
959        public ResourceReferenceDt getEncounter() {  
960                if (myEncounter == null) {
961                        myEncounter = new ResourceReferenceDt();
962                }
963                return myEncounter;
964        }
965
966        /**
967         * Sets the value(s) for <b>encounter</b> (context)
968         *
969     * <p>
970     * <b>Definition:</b>
971     * The encounter that is the context in which this list was created
972     * </p> 
973         */
974        public ListResource setEncounter(ResourceReferenceDt theValue) {
975                myEncounter = theValue;
976                return this;
977        }
978        
979        
980
981  
982        /**
983         * Gets the value(s) for <b>status</b> (status).
984         * creating it if it does
985         * not exist. Will not return <code>null</code>.
986         *
987     * <p>
988     * <b>Definition:</b>
989     * Indicates the current state of this list
990     * </p> 
991         */
992        public BoundCodeDt<ListStatusEnum> getStatusElement() {  
993                if (myStatus == null) {
994                        myStatus = new BoundCodeDt<ListStatusEnum>(ListStatusEnum.VALUESET_BINDER);
995                }
996                return myStatus;
997        }
998
999        
1000        /**
1001         * Gets the value(s) for <b>status</b> (status).
1002         * creating it if it does
1003         * not exist. Will not return <code>null</code>.
1004         *
1005     * <p>
1006     * <b>Definition:</b>
1007     * Indicates the current state of this list
1008     * </p> 
1009         */
1010        public String getStatus() {  
1011                return getStatusElement().getValue();
1012        }
1013
1014        /**
1015         * Sets the value(s) for <b>status</b> (status)
1016         *
1017     * <p>
1018     * <b>Definition:</b>
1019     * Indicates the current state of this list
1020     * </p> 
1021         */
1022        public ListResource setStatus(BoundCodeDt<ListStatusEnum> theValue) {
1023                myStatus = theValue;
1024                return this;
1025        }
1026        
1027        
1028
1029        /**
1030         * Sets the value(s) for <b>status</b> (status)
1031         *
1032     * <p>
1033     * <b>Definition:</b>
1034     * Indicates the current state of this list
1035     * </p> 
1036         */
1037        public ListResource setStatus(ListStatusEnum theValue) {
1038                setStatus(new BoundCodeDt<ListStatusEnum>(ListStatusEnum.VALUESET_BINDER, theValue));
1039                
1040/*
1041                getStatusElement().setValueAsEnum(theValue);
1042*/
1043                return this;
1044        }
1045
1046  
1047        /**
1048         * Gets the value(s) for <b>date</b> (when.recorded).
1049         * creating it if it does
1050         * not exist. Will not return <code>null</code>.
1051         *
1052     * <p>
1053     * <b>Definition:</b>
1054     * The date that the list was prepared
1055     * </p> 
1056         */
1057        public DateTimeDt getDateElement() {  
1058                if (myDate == null) {
1059                        myDate = new DateTimeDt();
1060                }
1061                return myDate;
1062        }
1063
1064        
1065        /**
1066         * Gets the value(s) for <b>date</b> (when.recorded).
1067         * creating it if it does
1068         * not exist. Will not return <code>null</code>.
1069         *
1070     * <p>
1071     * <b>Definition:</b>
1072     * The date that the list was prepared
1073     * </p> 
1074         */
1075        public Date getDate() {  
1076                return getDateElement().getValue();
1077        }
1078
1079        /**
1080         * Sets the value(s) for <b>date</b> (when.recorded)
1081         *
1082     * <p>
1083     * <b>Definition:</b>
1084     * The date that the list was prepared
1085     * </p> 
1086         */
1087        public ListResource setDate(DateTimeDt theValue) {
1088                myDate = theValue;
1089                return this;
1090        }
1091        
1092        
1093
1094        /**
1095         * Sets the value for <b>date</b> (when.recorded)
1096         *
1097     * <p>
1098     * <b>Definition:</b>
1099     * The date that the list was prepared
1100     * </p> 
1101         */
1102        public ListResource setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1103                myDate = new DateTimeDt(theDate, thePrecision); 
1104                return this; 
1105        }
1106
1107        /**
1108         * Sets the value for <b>date</b> (when.recorded)
1109         *
1110     * <p>
1111     * <b>Definition:</b>
1112     * The date that the list was prepared
1113     * </p> 
1114         */
1115        public ListResource setDateWithSecondsPrecision( Date theDate) {
1116                myDate = new DateTimeDt(theDate); 
1117                return this; 
1118        }
1119
1120 
1121        /**
1122         * Gets the value(s) for <b>orderedBy</b> ().
1123         * creating it if it does
1124         * not exist. Will not return <code>null</code>.
1125         *
1126     * <p>
1127     * <b>Definition:</b>
1128     * What order applies to the items in the list
1129     * </p> 
1130         */
1131        public BoundCodeableConceptDt<ListOrderCodesEnum> getOrderedBy() {  
1132                if (myOrderedBy == null) {
1133                        myOrderedBy = new BoundCodeableConceptDt<ListOrderCodesEnum>(ListOrderCodesEnum.VALUESET_BINDER);
1134                }
1135                return myOrderedBy;
1136        }
1137
1138        /**
1139         * Sets the value(s) for <b>orderedBy</b> ()
1140         *
1141     * <p>
1142     * <b>Definition:</b>
1143     * What order applies to the items in the list
1144     * </p> 
1145         */
1146        public ListResource setOrderedBy(BoundCodeableConceptDt<ListOrderCodesEnum> theValue) {
1147                myOrderedBy = theValue;
1148                return this;
1149        }
1150        
1151        
1152
1153        /**
1154         * Sets the value(s) for <b>orderedBy</b> ()
1155         *
1156     * <p>
1157     * <b>Definition:</b>
1158     * What order applies to the items in the list
1159     * </p> 
1160         */
1161        public ListResource setOrderedBy(ListOrderCodesEnum theValue) {
1162                setOrderedBy(new BoundCodeableConceptDt<ListOrderCodesEnum>(ListOrderCodesEnum.VALUESET_BINDER, theValue));
1163                
1164/*
1165                getOrderedBy().setValueAsEnum(theValue);
1166*/
1167                return this;
1168        }
1169
1170  
1171        /**
1172         * Gets the value(s) for <b>mode</b> (class).
1173         * creating it if it does
1174         * not exist. Will not return <code>null</code>.
1175         *
1176     * <p>
1177     * <b>Definition:</b>
1178     * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
1179     * </p> 
1180         */
1181        public BoundCodeDt<ListModeEnum> getModeElement() {  
1182                if (myMode == null) {
1183                        myMode = new BoundCodeDt<ListModeEnum>(ListModeEnum.VALUESET_BINDER);
1184                }
1185                return myMode;
1186        }
1187
1188        
1189        /**
1190         * Gets the value(s) for <b>mode</b> (class).
1191         * creating it if it does
1192         * not exist. Will not return <code>null</code>.
1193         *
1194     * <p>
1195     * <b>Definition:</b>
1196     * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
1197     * </p> 
1198         */
1199        public String getMode() {  
1200                return getModeElement().getValue();
1201        }
1202
1203        /**
1204         * Sets the value(s) for <b>mode</b> (class)
1205         *
1206     * <p>
1207     * <b>Definition:</b>
1208     * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
1209     * </p> 
1210         */
1211        public ListResource setMode(BoundCodeDt<ListModeEnum> theValue) {
1212                myMode = theValue;
1213                return this;
1214        }
1215        
1216        
1217
1218        /**
1219         * Sets the value(s) for <b>mode</b> (class)
1220         *
1221     * <p>
1222     * <b>Definition:</b>
1223     * How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted
1224     * </p> 
1225         */
1226        public ListResource setMode(ListModeEnum theValue) {
1227                setMode(new BoundCodeDt<ListModeEnum>(ListModeEnum.VALUESET_BINDER, theValue));
1228                
1229/*
1230                getModeElement().setValueAsEnum(theValue);
1231*/
1232                return this;
1233        }
1234
1235  
1236        /**
1237         * Gets the value(s) for <b>note</b> ().
1238         * creating it if it does
1239         * not exist. Will not return <code>null</code>.
1240         *
1241     * <p>
1242     * <b>Definition:</b>
1243     * Comments that apply to the overall list
1244     * </p> 
1245         */
1246        public StringDt getNoteElement() {  
1247                if (myNote == null) {
1248                        myNote = new StringDt();
1249                }
1250                return myNote;
1251        }
1252
1253        
1254        /**
1255         * Gets the value(s) for <b>note</b> ().
1256         * creating it if it does
1257         * not exist. Will not return <code>null</code>.
1258         *
1259     * <p>
1260     * <b>Definition:</b>
1261     * Comments that apply to the overall list
1262     * </p> 
1263         */
1264        public String getNote() {  
1265                return getNoteElement().getValue();
1266        }
1267
1268        /**
1269         * Sets the value(s) for <b>note</b> ()
1270         *
1271     * <p>
1272     * <b>Definition:</b>
1273     * Comments that apply to the overall list
1274     * </p> 
1275         */
1276        public ListResource setNote(StringDt theValue) {
1277                myNote = theValue;
1278                return this;
1279        }
1280        
1281        
1282
1283        /**
1284         * Sets the value for <b>note</b> ()
1285         *
1286     * <p>
1287     * <b>Definition:</b>
1288     * Comments that apply to the overall list
1289     * </p> 
1290         */
1291        public ListResource setNote( String theString) {
1292                myNote = new StringDt(theString); 
1293                return this; 
1294        }
1295
1296 
1297        /**
1298         * Gets the value(s) for <b>entry</b> ().
1299         * creating it if it does
1300         * not exist. Will not return <code>null</code>.
1301         *
1302     * <p>
1303     * <b>Definition:</b>
1304     * Entries in this list
1305     * </p> 
1306         */
1307        public java.util.List<Entry> getEntry() {  
1308                if (myEntry == null) {
1309                        myEntry = new java.util.ArrayList<Entry>();
1310                }
1311                return myEntry;
1312        }
1313
1314        /**
1315         * Sets the value(s) for <b>entry</b> ()
1316         *
1317     * <p>
1318     * <b>Definition:</b>
1319     * Entries in this list
1320     * </p> 
1321         */
1322        public ListResource setEntry(java.util.List<Entry> theValue) {
1323                myEntry = theValue;
1324                return this;
1325        }
1326        
1327        
1328
1329        /**
1330         * Adds and returns a new value for <b>entry</b> ()
1331         *
1332     * <p>
1333     * <b>Definition:</b>
1334     * Entries in this list
1335     * </p> 
1336         */
1337        public Entry addEntry() {
1338                Entry newType = new Entry();
1339                getEntry().add(newType);
1340                return newType; 
1341        }
1342
1343        /**
1344         * Adds a given new value for <b>entry</b> ()
1345         *
1346         * <p>
1347         * <b>Definition:</b>
1348         * Entries in this list
1349         * </p>
1350         * @param theValue The entry to add (must not be <code>null</code>)
1351         */
1352        public ListResource addEntry(Entry theValue) {
1353                if (theValue == null) {
1354                        throw new NullPointerException("theValue must not be null");
1355                }
1356                getEntry().add(theValue);
1357                return this;
1358        }
1359
1360        /**
1361         * Gets the first repetition for <b>entry</b> (),
1362         * creating it if it does not already exist.
1363         *
1364     * <p>
1365     * <b>Definition:</b>
1366     * Entries in this list
1367     * </p> 
1368         */
1369        public Entry getEntryFirstRep() {
1370                if (getEntry().isEmpty()) {
1371                        return addEntry();
1372                }
1373                return getEntry().get(0); 
1374        }
1375  
1376        /**
1377         * Gets the value(s) for <b>emptyReason</b> ().
1378         * creating it if it does
1379         * not exist. Will not return <code>null</code>.
1380         *
1381     * <p>
1382     * <b>Definition:</b>
1383     * If the list is empty, why the list is empty
1384     * </p> 
1385         */
1386        public CodeableConceptDt getEmptyReason() {  
1387                if (myEmptyReason == null) {
1388                        myEmptyReason = new CodeableConceptDt();
1389                }
1390                return myEmptyReason;
1391        }
1392
1393        /**
1394         * Sets the value(s) for <b>emptyReason</b> ()
1395         *
1396     * <p>
1397     * <b>Definition:</b>
1398     * If the list is empty, why the list is empty
1399     * </p> 
1400         */
1401        public ListResource setEmptyReason(CodeableConceptDt theValue) {
1402                myEmptyReason = theValue;
1403                return this;
1404        }
1405        
1406        
1407
1408  
1409        /**
1410         * Block class for child element: <b>List.entry</b> ()
1411         *
1412     * <p>
1413     * <b>Definition:</b>
1414     * Entries in this list
1415     * </p> 
1416         */
1417        @Block()        
1418        public static class Entry 
1419            extends  BaseIdentifiableElement        implements IResourceBlock {
1420        
1421        @Child(name="flag", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false) 
1422        @Description(
1423                shortDefinition="",
1424                formalDefinition="The flag allows the system constructing the list to indicate the role and significance of the item in the list"
1425        )
1426        private CodeableConceptDt myFlag;
1427        
1428        @Child(name="deleted", type=BooleanDt.class, order=1, min=0, max=1, summary=false, modifier=true)       
1429        @Description(
1430                shortDefinition="",
1431                formalDefinition="True if this item is marked as deleted in the list."
1432        )
1433        private BooleanDt myDeleted;
1434        
1435        @Child(name="date", type=DateTimeDt.class, order=2, min=0, max=1, summary=false, modifier=false)        
1436        @Description(
1437                shortDefinition="",
1438                formalDefinition="When this item was added to the list"
1439        )
1440        private DateTimeDt myDate;
1441        
1442        @Child(name="item", order=3, min=1, max=1, summary=false, modifier=false, type={
1443                IResource.class })
1444        @Description(
1445                shortDefinition="",
1446                formalDefinition="A reference to the actual resource from which data was derived"
1447        )
1448        private ResourceReferenceDt myItem;
1449        
1450
1451        @Override
1452        public boolean isEmpty() {
1453                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myFlag,  myDeleted,  myDate,  myItem);
1454        }
1455        
1456        @Override
1457        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1458                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myFlag, myDeleted, myDate, myItem);
1459        }
1460
1461        /**
1462         * Gets the value(s) for <b>flag</b> ().
1463         * creating it if it does
1464         * not exist. Will not return <code>null</code>.
1465         *
1466     * <p>
1467     * <b>Definition:</b>
1468     * The flag allows the system constructing the list to indicate the role and significance of the item in the list
1469     * </p> 
1470         */
1471        public CodeableConceptDt getFlag() {  
1472                if (myFlag == null) {
1473                        myFlag = new CodeableConceptDt();
1474                }
1475                return myFlag;
1476        }
1477
1478        /**
1479         * Sets the value(s) for <b>flag</b> ()
1480         *
1481     * <p>
1482     * <b>Definition:</b>
1483     * The flag allows the system constructing the list to indicate the role and significance of the item in the list
1484     * </p> 
1485         */
1486        public Entry setFlag(CodeableConceptDt theValue) {
1487                myFlag = theValue;
1488                return this;
1489        }
1490        
1491        
1492
1493  
1494        /**
1495         * Gets the value(s) for <b>deleted</b> ().
1496         * creating it if it does
1497         * not exist. Will not return <code>null</code>.
1498         *
1499     * <p>
1500     * <b>Definition:</b>
1501     * True if this item is marked as deleted in the list.
1502     * </p> 
1503         */
1504        public BooleanDt getDeletedElement() {  
1505                if (myDeleted == null) {
1506                        myDeleted = new BooleanDt();
1507                }
1508                return myDeleted;
1509        }
1510
1511        
1512        /**
1513         * Gets the value(s) for <b>deleted</b> ().
1514         * creating it if it does
1515         * not exist. Will not return <code>null</code>.
1516         *
1517     * <p>
1518     * <b>Definition:</b>
1519     * True if this item is marked as deleted in the list.
1520     * </p> 
1521         */
1522        public Boolean getDeleted() {  
1523                return getDeletedElement().getValue();
1524        }
1525
1526        /**
1527         * Sets the value(s) for <b>deleted</b> ()
1528         *
1529     * <p>
1530     * <b>Definition:</b>
1531     * True if this item is marked as deleted in the list.
1532     * </p> 
1533         */
1534        public Entry setDeleted(BooleanDt theValue) {
1535                myDeleted = theValue;
1536                return this;
1537        }
1538        
1539        
1540
1541        /**
1542         * Sets the value for <b>deleted</b> ()
1543         *
1544     * <p>
1545     * <b>Definition:</b>
1546     * True if this item is marked as deleted in the list.
1547     * </p> 
1548         */
1549        public Entry setDeleted( boolean theBoolean) {
1550                myDeleted = new BooleanDt(theBoolean); 
1551                return this; 
1552        }
1553
1554 
1555        /**
1556         * Gets the value(s) for <b>date</b> ().
1557         * creating it if it does
1558         * not exist. Will not return <code>null</code>.
1559         *
1560     * <p>
1561     * <b>Definition:</b>
1562     * When this item was added to the list
1563     * </p> 
1564         */
1565        public DateTimeDt getDateElement() {  
1566                if (myDate == null) {
1567                        myDate = new DateTimeDt();
1568                }
1569                return myDate;
1570        }
1571
1572        
1573        /**
1574         * Gets the value(s) for <b>date</b> ().
1575         * creating it if it does
1576         * not exist. Will not return <code>null</code>.
1577         *
1578     * <p>
1579     * <b>Definition:</b>
1580     * When this item was added to the list
1581     * </p> 
1582         */
1583        public Date getDate() {  
1584                return getDateElement().getValue();
1585        }
1586
1587        /**
1588         * Sets the value(s) for <b>date</b> ()
1589         *
1590     * <p>
1591     * <b>Definition:</b>
1592     * When this item was added to the list
1593     * </p> 
1594         */
1595        public Entry setDate(DateTimeDt theValue) {
1596                myDate = theValue;
1597                return this;
1598        }
1599        
1600        
1601
1602        /**
1603         * Sets the value for <b>date</b> ()
1604         *
1605     * <p>
1606     * <b>Definition:</b>
1607     * When this item was added to the list
1608     * </p> 
1609         */
1610        public Entry setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
1611                myDate = new DateTimeDt(theDate, thePrecision); 
1612                return this; 
1613        }
1614
1615        /**
1616         * Sets the value for <b>date</b> ()
1617         *
1618     * <p>
1619     * <b>Definition:</b>
1620     * When this item was added to the list
1621     * </p> 
1622         */
1623        public Entry setDateWithSecondsPrecision( Date theDate) {
1624                myDate = new DateTimeDt(theDate); 
1625                return this; 
1626        }
1627
1628 
1629        /**
1630         * Gets the value(s) for <b>item</b> ().
1631         * creating it if it does
1632         * not exist. Will not return <code>null</code>.
1633         *
1634     * <p>
1635     * <b>Definition:</b>
1636     * A reference to the actual resource from which data was derived
1637     * </p> 
1638         */
1639        public ResourceReferenceDt getItem() {  
1640                if (myItem == null) {
1641                        myItem = new ResourceReferenceDt();
1642                }
1643                return myItem;
1644        }
1645
1646        /**
1647         * Sets the value(s) for <b>item</b> ()
1648         *
1649     * <p>
1650     * <b>Definition:</b>
1651     * A reference to the actual resource from which data was derived
1652     * </p> 
1653         */
1654        public Entry setItem(ResourceReferenceDt theValue) {
1655                myItem = theValue;
1656                return this;
1657        }
1658        
1659        
1660
1661  
1662
1663
1664        }
1665
1666
1667
1668
1669    @Override
1670    public String getResourceName() {
1671        return "List";
1672    }
1673    
1674    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1675        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1676    }
1677
1678
1679}