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