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