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>Order</b> Resource
282 * (workflow.order)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A request to perform an action.
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/Order">http://hl7.org/fhir/profiles/Order</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Order", profile="http://hl7.org/fhir/profiles/Order", id="order")
301public class Order extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource 
303    {
304
305        /**
306         * Search parameter constant for <b>date</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>date</b><br>
310         * Path: <b>Order.date</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="date", path="Order.date", description="", type="date" 
314 )
315        public static final String SP_DATE = "date";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>date</b>
319         * <p>
320         * Description: <b></b><br>
321         * Type: <b>date</b><br>
322         * Path: <b>Order.date</b><br>
323         * </p>
324         */
325        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
326
327        /**
328         * Search parameter constant for <b>subject</b>
329         * <p>
330         * Description: <b></b><br>
331         * Type: <b>reference</b><br>
332         * Path: <b>Order.subject</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="subject", path="Order.subject", description="", type="reference" 
336, providesMembershipIn={
337 @Compartment(name="Patient")   }
338 )
339        public static final String SP_SUBJECT = "subject";
340
341        /**
342         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
343         * <p>
344         * Description: <b></b><br>
345         * Type: <b>reference</b><br>
346         * Path: <b>Order.subject</b><br>
347         * </p>
348         */
349        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
350
351        /**
352         * Search parameter constant for <b>source</b>
353         * <p>
354         * Description: <b></b><br>
355         * Type: <b>reference</b><br>
356         * Path: <b>Order.source</b><br>
357         * </p>
358         */
359        @SearchParamDefinition(name="source", path="Order.source", description="", type="reference" 
360, providesMembershipIn={
361 @Compartment(name="Encounter")         }
362 )
363        public static final String SP_SOURCE = "source";
364
365        /**
366         * <b>Fluent Client</b> search parameter constant for <b>source</b>
367         * <p>
368         * Description: <b></b><br>
369         * Type: <b>reference</b><br>
370         * Path: <b>Order.source</b><br>
371         * </p>
372         */
373        public static final ReferenceClientParam SOURCE = new ReferenceClientParam(SP_SOURCE);
374
375        /**
376         * Search parameter constant for <b>target</b>
377         * <p>
378         * Description: <b></b><br>
379         * Type: <b>reference</b><br>
380         * Path: <b>Order.target</b><br>
381         * </p>
382         */
383        @SearchParamDefinition(name="target", path="Order.target", description="", type="reference" 
384, providesMembershipIn={
385 @Compartment(name="Encounter") ,  @Compartment(name="RelatedPerson")   }
386 )
387        public static final String SP_TARGET = "target";
388
389        /**
390         * <b>Fluent Client</b> search parameter constant for <b>target</b>
391         * <p>
392         * Description: <b></b><br>
393         * Type: <b>reference</b><br>
394         * Path: <b>Order.target</b><br>
395         * </p>
396         */
397        public static final ReferenceClientParam TARGET = new ReferenceClientParam(SP_TARGET);
398
399        /**
400         * Search parameter constant for <b>when_code</b>
401         * <p>
402         * Description: <b></b><br>
403         * Type: <b>token</b><br>
404         * Path: <b>Order.when.code</b><br>
405         * </p>
406         */
407        @SearchParamDefinition(name="when_code", path="Order.when.code", description="", type="token" 
408 )
409        public static final String SP_WHEN_CODE = "when_code";
410
411        /**
412         * <b>Fluent Client</b> search parameter constant for <b>when_code</b>
413         * <p>
414         * Description: <b></b><br>
415         * Type: <b>token</b><br>
416         * Path: <b>Order.when.code</b><br>
417         * </p>
418         */
419        public static final TokenClientParam WHEN_CODE = new TokenClientParam(SP_WHEN_CODE);
420
421        /**
422         * Search parameter constant for <b>when</b>
423         * <p>
424         * Description: <b></b><br>
425         * Type: <b>date</b><br>
426         * Path: <b>Order.when.schedule</b><br>
427         * </p>
428         */
429        @SearchParamDefinition(name="when", path="Order.when.schedule", description="", type="date" 
430 )
431        public static final String SP_WHEN = "when";
432
433        /**
434         * <b>Fluent Client</b> search parameter constant for <b>when</b>
435         * <p>
436         * Description: <b></b><br>
437         * Type: <b>date</b><br>
438         * Path: <b>Order.when.schedule</b><br>
439         * </p>
440         */
441        public static final DateClientParam WHEN = new DateClientParam(SP_WHEN);
442
443        /**
444         * Search parameter constant for <b>detail</b>
445         * <p>
446         * Description: <b></b><br>
447         * Type: <b>reference</b><br>
448         * Path: <b>Order.detail</b><br>
449         * </p>
450         */
451        @SearchParamDefinition(name="detail", path="Order.detail", description="", type="reference" 
452 )
453        public static final String SP_DETAIL = "detail";
454
455        /**
456         * <b>Fluent Client</b> search parameter constant for <b>detail</b>
457         * <p>
458         * Description: <b></b><br>
459         * Type: <b>reference</b><br>
460         * Path: <b>Order.detail</b><br>
461         * </p>
462         */
463        public static final ReferenceClientParam DETAIL = new ReferenceClientParam(SP_DETAIL);
464
465        /**
466         * Search parameter constant for <b>patient</b>
467         * <p>
468         * Description: <b></b><br>
469         * Type: <b>reference</b><br>
470         * Path: <b>Order.subject</b><br>
471         * </p>
472         */
473        @SearchParamDefinition(name="patient", path="Order.subject", description="", type="reference" 
474, target={
475 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
476 )
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>Order.subject</b><br>
485         * </p>
486         */
487        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
488
489        /**
490         * Search parameter constant for <b>identifier</b>
491         * <p>
492         * Description: <b>Instance id from source, target, and/or  others</b><br>
493         * Type: <b>token</b><br>
494         * Path: <b>Order.identifier</b><br>
495         * </p>
496         */
497        @SearchParamDefinition(name="identifier", path="Order.identifier", description="Instance id from source, target, and/or  others", type="token" 
498 )
499        public static final String SP_IDENTIFIER = "identifier";
500
501        /**
502         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
503         * <p>
504         * Description: <b>Instance id from source, target, and/or  others</b><br>
505         * Type: <b>token</b><br>
506         * Path: <b>Order.identifier</b><br>
507         * </p>
508         */
509        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
510
511
512        /**
513         * Constant for fluent queries to be used to add include statements. Specifies
514         * the path value of "<b>Order:detail</b>".
515         */
516        public static final Include INCLUDE_DETAIL = new Include("Order:detail");
517
518        /**
519         * Constant for fluent queries to be used to add include statements. Specifies
520         * the path value of "<b>Order:patient</b>".
521         */
522        public static final Include INCLUDE_PATIENT = new Include("Order:patient");
523
524        /**
525         * Constant for fluent queries to be used to add include statements. Specifies
526         * the path value of "<b>Order:source</b>".
527         */
528        public static final Include INCLUDE_SOURCE = new Include("Order:source");
529
530        /**
531         * Constant for fluent queries to be used to add include statements. Specifies
532         * the path value of "<b>Order:subject</b>".
533         */
534        public static final Include INCLUDE_SUBJECT = new Include("Order:subject");
535
536        /**
537         * Constant for fluent queries to be used to add include statements. Specifies
538         * the path value of "<b>Order:target</b>".
539         */
540        public static final Include INCLUDE_TARGET = new Include("Order:target");
541
542
543        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
544        @Description(
545                shortDefinition="id",
546                formalDefinition=""
547        )
548        private java.util.List<IdentifierDt> myIdentifier;
549        
550        @Child(name="date", type=DateTimeDt.class, order=1, min=0, max=1, summary=false, modifier=false)        
551        @Description(
552                shortDefinition="when.done",
553                formalDefinition=""
554        )
555        private DateTimeDt myDate;
556        
557        @Child(name="subject", order=2, min=0, max=1, summary=false, modifier=false, type={
558                ca.uhn.fhir.model.dstu2.resource.Patient.class, 
559                ca.uhn.fhir.model.dstu2.resource.Group.class, 
560                ca.uhn.fhir.model.dstu2.resource.Device.class, 
561                ca.uhn.fhir.model.dstu2.resource.Substance.class
562        })
563        @Description(
564                shortDefinition="who.focus",
565                formalDefinition=""
566        )
567        private ResourceReferenceDt mySubject;
568        
569        @Child(name="source", order=3, min=0, max=1, summary=false, modifier=false, type={
570                ca.uhn.fhir.model.dstu2.resource.Practitioner.class, 
571                ca.uhn.fhir.model.dstu2.resource.Organization.class
572        })
573        @Description(
574                shortDefinition="who.cause",
575                formalDefinition=""
576        )
577        private ResourceReferenceDt mySource;
578        
579        @Child(name="target", order=4, min=0, max=1, summary=false, modifier=false, type={
580                ca.uhn.fhir.model.dstu2.resource.Organization.class, 
581                ca.uhn.fhir.model.dstu2.resource.Device.class, 
582                ca.uhn.fhir.model.dstu2.resource.Practitioner.class
583        })
584        @Description(
585                shortDefinition="who.actor",
586                formalDefinition=""
587        )
588        private ResourceReferenceDt myTarget;
589        
590        @Child(name="reason", order=5, min=0, max=1, summary=false, modifier=false, type={
591                CodeableConceptDt.class, 
592                IResource.class
593        })
594        @Description(
595                shortDefinition="why",
596                formalDefinition=""
597        )
598        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/condition-code")
599        private IDatatype myReason;
600        
601        @Child(name="when", order=6, min=0, max=1, summary=false, modifier=false)       
602        @Description(
603                shortDefinition="",
604                formalDefinition=""
605        )
606        private When myWhen;
607        
608        @Child(name="detail", order=7, min=1, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
609                IResource.class
610        })
611        @Description(
612                shortDefinition="",
613                formalDefinition=""
614        )
615        private java.util.List<ResourceReferenceDt> myDetail;
616        
617
618        @Override
619        public boolean isEmpty() {
620                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  myDate,  mySubject,  mySource,  myTarget,  myReason,  myWhen,  myDetail);
621        }
622        
623        @Override
624        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
625                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, myDate, mySubject, mySource, myTarget, myReason, myWhen, myDetail);
626        }
627
628        /**
629         * Gets the value(s) for <b>identifier</b> (id).
630         * creating it if it does
631         * not exist. Will not return <code>null</code>.
632         *
633     * <p>
634     * <b>Definition:</b>
635     * 
636     * </p> 
637         */
638        public java.util.List<IdentifierDt> getIdentifier() {  
639                if (myIdentifier == null) {
640                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
641                }
642                return myIdentifier;
643        }
644
645        /**
646         * Sets the value(s) for <b>identifier</b> (id)
647         *
648     * <p>
649     * <b>Definition:</b>
650     * 
651     * </p> 
652         */
653        public Order setIdentifier(java.util.List<IdentifierDt> theValue) {
654                myIdentifier = theValue;
655                return this;
656        }
657        
658        
659
660        /**
661         * Adds and returns a new value for <b>identifier</b> (id)
662         *
663     * <p>
664     * <b>Definition:</b>
665     * 
666     * </p> 
667         */
668        public IdentifierDt addIdentifier() {
669                IdentifierDt newType = new IdentifierDt();
670                getIdentifier().add(newType);
671                return newType; 
672        }
673
674        /**
675         * Adds a given new value for <b>identifier</b> (id)
676         *
677         * <p>
678         * <b>Definition:</b>
679         * 
680         * </p>
681         * @param theValue The identifier to add (must not be <code>null</code>)
682         */
683        public Order addIdentifier(IdentifierDt theValue) {
684                if (theValue == null) {
685                        throw new NullPointerException("theValue must not be null");
686                }
687                getIdentifier().add(theValue);
688                return this;
689        }
690
691        /**
692         * Gets the first repetition for <b>identifier</b> (id),
693         * creating it if it does not already exist.
694         *
695     * <p>
696     * <b>Definition:</b>
697     * 
698     * </p> 
699         */
700        public IdentifierDt getIdentifierFirstRep() {
701                if (getIdentifier().isEmpty()) {
702                        return addIdentifier();
703                }
704                return getIdentifier().get(0); 
705        }
706  
707        /**
708         * Gets the value(s) for <b>date</b> (when.done).
709         * creating it if it does
710         * not exist. Will not return <code>null</code>.
711         *
712     * <p>
713     * <b>Definition:</b>
714     * 
715     * </p> 
716         */
717        public DateTimeDt getDateElement() {  
718                if (myDate == null) {
719                        myDate = new DateTimeDt();
720                }
721                return myDate;
722        }
723
724        
725        /**
726         * Gets the value(s) for <b>date</b> (when.done).
727         * creating it if it does
728         * not exist. This method may return <code>null</code>.
729         *
730     * <p>
731     * <b>Definition:</b>
732     * 
733     * </p> 
734         */
735        public Date getDate() {  
736                return getDateElement().getValue();
737        }
738
739        /**
740         * Sets the value(s) for <b>date</b> (when.done)
741         *
742     * <p>
743     * <b>Definition:</b>
744     * 
745     * </p> 
746         */
747        public Order setDate(DateTimeDt theValue) {
748                myDate = theValue;
749                return this;
750        }
751        
752        
753
754        /**
755         * Sets the value for <b>date</b> (when.done)
756         *
757     * <p>
758     * <b>Definition:</b>
759     * 
760     * </p> 
761         */
762        public Order setDateWithSecondsPrecision( Date theDate) {
763                myDate = new DateTimeDt(theDate); 
764                return this; 
765        }
766
767        /**
768         * Sets the value for <b>date</b> (when.done)
769         *
770     * <p>
771     * <b>Definition:</b>
772     * 
773     * </p> 
774         */
775        public Order setDate( Date theDate,  TemporalPrecisionEnum thePrecision) {
776                myDate = new DateTimeDt(theDate, thePrecision); 
777                return this; 
778        }
779
780 
781        /**
782         * Gets the value(s) for <b>subject</b> (who.focus).
783         * creating it if it does
784         * not exist. Will not return <code>null</code>.
785         *
786     * <p>
787     * <b>Definition:</b>
788     * 
789     * </p> 
790         */
791        public ResourceReferenceDt getSubject() {  
792                if (mySubject == null) {
793                        mySubject = new ResourceReferenceDt();
794                }
795                return mySubject;
796        }
797
798        /**
799         * Sets the value(s) for <b>subject</b> (who.focus)
800         *
801     * <p>
802     * <b>Definition:</b>
803     * 
804     * </p> 
805         */
806        public Order setSubject(ResourceReferenceDt theValue) {
807                mySubject = theValue;
808                return this;
809        }
810        
811        
812
813  
814        /**
815         * Gets the value(s) for <b>source</b> (who.cause).
816         * creating it if it does
817         * not exist. Will not return <code>null</code>.
818         *
819     * <p>
820     * <b>Definition:</b>
821     * 
822     * </p> 
823         */
824        public ResourceReferenceDt getSource() {  
825                if (mySource == null) {
826                        mySource = new ResourceReferenceDt();
827                }
828                return mySource;
829        }
830
831        /**
832         * Sets the value(s) for <b>source</b> (who.cause)
833         *
834     * <p>
835     * <b>Definition:</b>
836     * 
837     * </p> 
838         */
839        public Order setSource(ResourceReferenceDt theValue) {
840                mySource = theValue;
841                return this;
842        }
843        
844        
845
846  
847        /**
848         * Gets the value(s) for <b>target</b> (who.actor).
849         * creating it if it does
850         * not exist. Will not return <code>null</code>.
851         *
852     * <p>
853     * <b>Definition:</b>
854     * 
855     * </p> 
856         */
857        public ResourceReferenceDt getTarget() {  
858                if (myTarget == null) {
859                        myTarget = new ResourceReferenceDt();
860                }
861                return myTarget;
862        }
863
864        /**
865         * Sets the value(s) for <b>target</b> (who.actor)
866         *
867     * <p>
868     * <b>Definition:</b>
869     * 
870     * </p> 
871         */
872        public Order setTarget(ResourceReferenceDt theValue) {
873                myTarget = theValue;
874                return this;
875        }
876        
877        
878
879  
880        /**
881         * Gets the value(s) for <b>reason[x]</b> (why).
882         * creating it if it does
883         * not exist. Will not return <code>null</code>.
884         *
885     * <p>
886     * <b>Definition:</b>
887     * 
888     * </p> 
889         */
890        public IDatatype getReason() {  
891                return myReason;
892        }
893
894        /**
895         * Sets the value(s) for <b>reason[x]</b> (why)
896         *
897     * <p>
898     * <b>Definition:</b>
899     * 
900     * </p> 
901         */
902        public Order setReason(IDatatype theValue) {
903                myReason = theValue;
904                return this;
905        }
906        
907        
908
909  
910        /**
911         * Gets the value(s) for <b>when</b> ().
912         * creating it if it does
913         * not exist. Will not return <code>null</code>.
914         *
915     * <p>
916     * <b>Definition:</b>
917     * 
918     * </p> 
919         */
920        public When getWhen() {  
921                if (myWhen == null) {
922                        myWhen = new When();
923                }
924                return myWhen;
925        }
926
927        /**
928         * Sets the value(s) for <b>when</b> ()
929         *
930     * <p>
931     * <b>Definition:</b>
932     * 
933     * </p> 
934         */
935        public Order setWhen(When theValue) {
936                myWhen = theValue;
937                return this;
938        }
939        
940        
941
942  
943        /**
944         * Gets the value(s) for <b>detail</b> ().
945         * creating it if it does
946         * not exist. Will not return <code>null</code>.
947         *
948     * <p>
949     * <b>Definition:</b>
950     * 
951     * </p> 
952         */
953        public java.util.List<ResourceReferenceDt> getDetail() {  
954                if (myDetail == null) {
955                        myDetail = new java.util.ArrayList<ResourceReferenceDt>();
956                }
957                return myDetail;
958        }
959
960        /**
961         * Sets the value(s) for <b>detail</b> ()
962         *
963     * <p>
964     * <b>Definition:</b>
965     * 
966     * </p> 
967         */
968        public Order setDetail(java.util.List<ResourceReferenceDt> theValue) {
969                myDetail = theValue;
970                return this;
971        }
972        
973        
974
975        /**
976         * Adds and returns a new value for <b>detail</b> ()
977         *
978     * <p>
979     * <b>Definition:</b>
980     * 
981     * </p> 
982         */
983        public ResourceReferenceDt addDetail() {
984                ResourceReferenceDt newType = new ResourceReferenceDt();
985                getDetail().add(newType);
986                return newType; 
987        }
988  
989        /**
990         * Block class for child element: <b>Order.when</b> ()
991         *
992     * <p>
993     * <b>Definition:</b>
994     * 
995     * </p> 
996         */
997        @Block()        
998        public static class When 
999            extends  BaseIdentifiableElement  
1000            implements IResourceBlock {
1001        
1002        @Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false) 
1003        @Description(
1004                shortDefinition="",
1005                formalDefinition=""
1006        )
1007        private CodeableConceptDt myCode;
1008        
1009        @Child(name="schedule", type=TimingDt.class, order=1, min=0, max=1, summary=false, modifier=false)      
1010        @Description(
1011                shortDefinition="when.planned",
1012                formalDefinition=""
1013        )
1014        private TimingDt mySchedule;
1015        
1016
1017        @Override
1018        public boolean isEmpty() {
1019                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myCode,  mySchedule);
1020        }
1021        
1022        @Override
1023        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1024                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCode, mySchedule);
1025        }
1026
1027        /**
1028         * Gets the value(s) for <b>code</b> ().
1029         * creating it if it does
1030         * not exist. Will not return <code>null</code>.
1031         *
1032     * <p>
1033     * <b>Definition:</b>
1034     * 
1035     * </p> 
1036         */
1037        public CodeableConceptDt getCode() {  
1038                if (myCode == null) {
1039                        myCode = new CodeableConceptDt();
1040                }
1041                return myCode;
1042        }
1043
1044        /**
1045         * Sets the value(s) for <b>code</b> ()
1046         *
1047     * <p>
1048     * <b>Definition:</b>
1049     * 
1050     * </p> 
1051         */
1052        public When setCode(CodeableConceptDt theValue) {
1053                myCode = theValue;
1054                return this;
1055        }
1056        
1057        
1058
1059  
1060        /**
1061         * Gets the value(s) for <b>schedule</b> (when.planned).
1062         * creating it if it does
1063         * not exist. Will not return <code>null</code>.
1064         *
1065     * <p>
1066     * <b>Definition:</b>
1067     * 
1068     * </p> 
1069         */
1070        public TimingDt getSchedule() {  
1071                if (mySchedule == null) {
1072                        mySchedule = new TimingDt();
1073                }
1074                return mySchedule;
1075        }
1076
1077        /**
1078         * Sets the value(s) for <b>schedule</b> (when.planned)
1079         *
1080     * <p>
1081     * <b>Definition:</b>
1082     * 
1083     * </p> 
1084         */
1085        public When setSchedule(TimingDt theValue) {
1086                mySchedule = theValue;
1087                return this;
1088        }
1089        
1090        
1091
1092  
1093
1094
1095        }
1096
1097
1098
1099
1100    @Override
1101    public String getResourceName() {
1102        return "Order";
1103    }
1104    
1105    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1106        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1107    }
1108
1109
1110}