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>DeviceUseRequest</b> Resource
282 * (workflow.order)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
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/DeviceUseRequest">http://hl7.org/fhir/profiles/DeviceUseRequest</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="DeviceUseRequest", profile="http://hl7.org/fhir/profiles/DeviceUseRequest", id="deviceuserequest")
301public class DeviceUseRequest extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>subject</b>
306         * <p>
307         * Description: <b>Search by subject</b><br>
308         * Type: <b>reference</b><br>
309         * Path: <b>DeviceUseRequest.subject</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="subject", path="DeviceUseRequest.subject", description="Search by subject", type="reference" , providesMembershipIn={
313 @Compartment(name="Patient")   }
314 )
315        public static final String SP_SUBJECT = "subject";
316
317        /**
318         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
319         * <p>
320         * Description: <b>Search by subject</b><br>
321         * Type: <b>reference</b><br>
322         * Path: <b>DeviceUseRequest.subject</b><br>
323         * </p>
324         */
325        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
326
327        /**
328         * Search parameter constant for <b>patient</b>
329         * <p>
330         * Description: <b>Search by subject - a patient</b><br>
331         * Type: <b>reference</b><br>
332         * Path: <b>DeviceUseRequest.subject</b><br>
333         * </p>
334         */
335        @SearchParamDefinition(name="patient", path="DeviceUseRequest.subject", description="Search by subject - a patient", type="reference"  )
336        public static final String SP_PATIENT = "patient";
337
338        /**
339         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
340         * <p>
341         * Description: <b>Search by subject - a patient</b><br>
342         * Type: <b>reference</b><br>
343         * Path: <b>DeviceUseRequest.subject</b><br>
344         * </p>
345         */
346        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
347
348        /**
349         * Search parameter constant for <b>device</b>
350         * <p>
351         * Description: <b></b><br>
352         * Type: <b>reference</b><br>
353         * Path: <b>DeviceUseRequest.device</b><br>
354         * </p>
355         */
356        @SearchParamDefinition(name="device", path="DeviceUseRequest.device", description="", type="reference" , providesMembershipIn={
357 @Compartment(name="Encounter")         }
358 )
359        public static final String SP_DEVICE = "device";
360
361        /**
362         * <b>Fluent Client</b> search parameter constant for <b>device</b>
363         * <p>
364         * Description: <b></b><br>
365         * Type: <b>reference</b><br>
366         * Path: <b>DeviceUseRequest.device</b><br>
367         * </p>
368         */
369        public static final ReferenceClientParam DEVICE = new ReferenceClientParam(SP_DEVICE);
370
371
372        /**
373         * Constant for fluent queries to be used to add include statements. Specifies
374         * the path value of "<b>DeviceUseRequest:device</b>".
375         */
376        public static final Include INCLUDE_DEVICE = new Include("DeviceUseRequest:device");
377
378        /**
379         * Constant for fluent queries to be used to add include statements. Specifies
380         * the path value of "<b>DeviceUseRequest:patient</b>".
381         */
382        public static final Include INCLUDE_PATIENT = new Include("DeviceUseRequest:patient");
383
384        /**
385         * Constant for fluent queries to be used to add include statements. Specifies
386         * the path value of "<b>DeviceUseRequest:subject</b>".
387         */
388        public static final Include INCLUDE_SUBJECT = new Include("DeviceUseRequest:subject");
389
390
391        @Child(name="bodySite", order=0, min=0, max=1, summary=false, modifier=false, type={
392                CodeableConceptDt.class,                BodySite.class  })
393        @Description(
394                shortDefinition="",
395                formalDefinition="Indicates the site on the subject's body where the device should be used ( i.e. the target site)."
396        )
397        private IDatatype myBodySite;
398        
399        @Child(name="status", type=CodeDt.class, order=1, min=0, max=1, summary=false, modifier=true)   
400        @Description(
401                shortDefinition="status",
402                formalDefinition="The status of the request."
403        )
404        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/device-use-request-status")
405        private BoundCodeDt<DeviceUseRequestStatusEnum> myStatus;
406        
407        @Child(name="device", order=2, min=1, max=1, summary=false, modifier=false, type={
408                ca.uhn.fhir.model.dstu2.resource.Device.class   })
409        @Description(
410                shortDefinition="",
411                formalDefinition="The details of the device  to be used."
412        )
413        private ResourceReferenceDt myDevice;
414        
415        @Child(name="encounter", order=3, min=0, max=1, summary=false, modifier=false, type={
416                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
417        @Description(
418                shortDefinition="context",
419                formalDefinition="An encounter that provides additional context in which this request is made."
420        )
421        private ResourceReferenceDt myEncounter;
422        
423        @Child(name="identifier", type=IdentifierDt.class, order=4, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
424        @Description(
425                shortDefinition="id",
426                formalDefinition="Identifiers assigned to this order by the orderer or by the receiver."
427        )
428        private java.util.List<IdentifierDt> myIdentifier;
429        
430        @Child(name="indication", type=CodeableConceptDt.class, order=5, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
431        @Description(
432                shortDefinition="why",
433                formalDefinition="Reason or justification for the use of this device."
434        )
435        private java.util.List<CodeableConceptDt> myIndication;
436        
437        @Child(name="notes", type=StringDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)       
438        @Description(
439                shortDefinition="",
440                formalDefinition="Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement."
441        )
442        private java.util.List<StringDt> myNotes;
443        
444        @Child(name="prnReason", type=CodeableConceptDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
445        @Description(
446                shortDefinition="",
447                formalDefinition="The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%."
448        )
449        private java.util.List<CodeableConceptDt> myPrnReason;
450        
451        @Child(name="orderedOn", type=DateTimeDt.class, order=8, min=0, max=1, summary=false, modifier=false)   
452        @Description(
453                shortDefinition="when.init",
454                formalDefinition="The time when the request was made."
455        )
456        private DateTimeDt myOrderedOn;
457        
458        @Child(name="recordedOn", type=DateTimeDt.class, order=9, min=0, max=1, summary=false, modifier=false)  
459        @Description(
460                shortDefinition="when.recorded",
461                formalDefinition="The time at which the request was made/recorded."
462        )
463        private DateTimeDt myRecordedOn;
464        
465        @Child(name="subject", order=10, min=1, max=1, summary=false, modifier=false, type={
466                ca.uhn.fhir.model.dstu2.resource.Patient.class  })
467        @Description(
468                shortDefinition="who.focus",
469                formalDefinition="The patient who will use the device."
470        )
471        private ResourceReferenceDt mySubject;
472        
473        @Child(name="timing", order=11, min=0, max=1, summary=false, modifier=false, type={
474                TimingDt.class,                 PeriodDt.class,                 DateTimeDt.class        })
475        @Description(
476                shortDefinition="when.planned",
477                formalDefinition="The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. \"Every 8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\"; \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\"."
478        )
479        private IDatatype myTiming;
480        
481        @Child(name="priority", type=CodeDt.class, order=12, min=0, max=1, summary=false, modifier=false)       
482        @Description(
483                shortDefinition="grade",
484                formalDefinition="Characterizes how quickly the  use of device must be initiated. Includes concepts such as stat, urgent, routine."
485        )
486        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/device-use-request-priority")
487        private BoundCodeDt<DeviceUseRequestPriorityEnum> myPriority;
488        
489
490        @Override
491        public boolean isEmpty() {
492                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myBodySite,  myStatus,  myDevice,  myEncounter,  myIdentifier,  myIndication,  myNotes,  myPrnReason,  myOrderedOn,  myRecordedOn,  mySubject,  myTiming,  myPriority);
493        }
494        
495        @Override
496        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
497                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myBodySite, myStatus, myDevice, myEncounter, myIdentifier, myIndication, myNotes, myPrnReason, myOrderedOn, myRecordedOn, mySubject, myTiming, myPriority);
498        }
499
500        /**
501         * Gets the value(s) for <b>bodySite[x]</b> ().
502         * creating it if it does
503         * not exist. Will not return <code>null</code>.
504         *
505     * <p>
506     * <b>Definition:</b>
507     * Indicates the site on the subject's body where the device should be used ( i.e. the target site).
508     * </p> 
509         */
510        public IDatatype getBodySite() {  
511                return myBodySite;
512        }
513
514        /**
515         * Sets the value(s) for <b>bodySite[x]</b> ()
516         *
517     * <p>
518     * <b>Definition:</b>
519     * Indicates the site on the subject's body where the device should be used ( i.e. the target site).
520     * </p> 
521         */
522        public DeviceUseRequest setBodySite(IDatatype theValue) {
523                myBodySite = theValue;
524                return this;
525        }
526        
527        
528
529  
530        /**
531         * Gets the value(s) for <b>status</b> (status).
532         * creating it if it does
533         * not exist. Will not return <code>null</code>.
534         *
535     * <p>
536     * <b>Definition:</b>
537     * The status of the request.
538     * </p> 
539         */
540        public BoundCodeDt<DeviceUseRequestStatusEnum> getStatusElement() {  
541                if (myStatus == null) {
542                        myStatus = new BoundCodeDt<DeviceUseRequestStatusEnum>(DeviceUseRequestStatusEnum.VALUESET_BINDER);
543                }
544                return myStatus;
545        }
546
547        
548        /**
549         * Gets the value(s) for <b>status</b> (status).
550         * creating it if it does
551         * not exist. This method may return <code>null</code>.
552         *
553     * <p>
554     * <b>Definition:</b>
555     * The status of the request.
556     * </p> 
557         */
558        public String getStatus() {  
559                return getStatusElement().getValue();
560        }
561
562        /**
563         * Sets the value(s) for <b>status</b> (status)
564         *
565     * <p>
566     * <b>Definition:</b>
567     * The status of the request.
568     * </p> 
569         */
570        public DeviceUseRequest setStatus(BoundCodeDt<DeviceUseRequestStatusEnum> theValue) {
571                myStatus = theValue;
572                return this;
573        }
574        
575        
576
577        /**
578         * Sets the value(s) for <b>status</b> (status)
579         *
580     * <p>
581     * <b>Definition:</b>
582     * The status of the request.
583     * </p> 
584         */
585        public DeviceUseRequest setStatus(DeviceUseRequestStatusEnum theValue) {
586                setStatus(new BoundCodeDt<DeviceUseRequestStatusEnum>(DeviceUseRequestStatusEnum.VALUESET_BINDER, theValue));
587                
588/*
589                getStatusElement().setValueAsEnum(theValue);
590*/
591                return this;
592        }
593
594  
595        /**
596         * Gets the value(s) for <b>device</b> ().
597         * creating it if it does
598         * not exist. Will not return <code>null</code>.
599         *
600     * <p>
601     * <b>Definition:</b>
602     * The details of the device  to be used.
603     * </p> 
604         */
605        public ResourceReferenceDt getDevice() {  
606                if (myDevice == null) {
607                        myDevice = new ResourceReferenceDt();
608                }
609                return myDevice;
610        }
611
612        /**
613         * Sets the value(s) for <b>device</b> ()
614         *
615     * <p>
616     * <b>Definition:</b>
617     * The details of the device  to be used.
618     * </p> 
619         */
620        public DeviceUseRequest setDevice(ResourceReferenceDt theValue) {
621                myDevice = theValue;
622                return this;
623        }
624        
625        
626
627  
628        /**
629         * Gets the value(s) for <b>encounter</b> (context).
630         * creating it if it does
631         * not exist. Will not return <code>null</code>.
632         *
633     * <p>
634     * <b>Definition:</b>
635     * An encounter that provides additional context in which this request is made.
636     * </p> 
637         */
638        public ResourceReferenceDt getEncounter() {  
639                if (myEncounter == null) {
640                        myEncounter = new ResourceReferenceDt();
641                }
642                return myEncounter;
643        }
644
645        /**
646         * Sets the value(s) for <b>encounter</b> (context)
647         *
648     * <p>
649     * <b>Definition:</b>
650     * An encounter that provides additional context in which this request is made.
651     * </p> 
652         */
653        public DeviceUseRequest setEncounter(ResourceReferenceDt theValue) {
654                myEncounter = theValue;
655                return this;
656        }
657        
658        
659
660  
661        /**
662         * Gets the value(s) for <b>identifier</b> (id).
663         * creating it if it does
664         * not exist. Will not return <code>null</code>.
665         *
666     * <p>
667     * <b>Definition:</b>
668     * Identifiers assigned to this order by the orderer or by the receiver.
669     * </p> 
670         */
671        public java.util.List<IdentifierDt> getIdentifier() {  
672                if (myIdentifier == null) {
673                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
674                }
675                return myIdentifier;
676        }
677
678        /**
679         * Sets the value(s) for <b>identifier</b> (id)
680         *
681     * <p>
682     * <b>Definition:</b>
683     * Identifiers assigned to this order by the orderer or by the receiver.
684     * </p> 
685         */
686        public DeviceUseRequest setIdentifier(java.util.List<IdentifierDt> theValue) {
687                myIdentifier = theValue;
688                return this;
689        }
690        
691        
692
693        /**
694         * Adds and returns a new value for <b>identifier</b> (id)
695         *
696     * <p>
697     * <b>Definition:</b>
698     * Identifiers assigned to this order by the orderer or by the receiver.
699     * </p> 
700         */
701        public IdentifierDt addIdentifier() {
702                IdentifierDt newType = new IdentifierDt();
703                getIdentifier().add(newType);
704                return newType; 
705        }
706
707        /**
708         * Adds a given new value for <b>identifier</b> (id)
709         *
710         * <p>
711         * <b>Definition:</b>
712         * Identifiers assigned to this order by the orderer or by the receiver.
713         * </p>
714         * @param theValue The identifier to add (must not be <code>null</code>)
715         */
716        public DeviceUseRequest addIdentifier(IdentifierDt theValue) {
717                if (theValue == null) {
718                        throw new NullPointerException("theValue must not be null");
719                }
720                getIdentifier().add(theValue);
721                return this;
722        }
723
724        /**
725         * Gets the first repetition for <b>identifier</b> (id),
726         * creating it if it does not already exist.
727         *
728     * <p>
729     * <b>Definition:</b>
730     * Identifiers assigned to this order by the orderer or by the receiver.
731     * </p> 
732         */
733        public IdentifierDt getIdentifierFirstRep() {
734                if (getIdentifier().isEmpty()) {
735                        return addIdentifier();
736                }
737                return getIdentifier().get(0); 
738        }
739  
740        /**
741         * Gets the value(s) for <b>indication</b> (why).
742         * creating it if it does
743         * not exist. Will not return <code>null</code>.
744         *
745     * <p>
746     * <b>Definition:</b>
747     * Reason or justification for the use of this device.
748     * </p> 
749         */
750        public java.util.List<CodeableConceptDt> getIndication() {  
751                if (myIndication == null) {
752                        myIndication = new java.util.ArrayList<CodeableConceptDt>();
753                }
754                return myIndication;
755        }
756
757        /**
758         * Sets the value(s) for <b>indication</b> (why)
759         *
760     * <p>
761     * <b>Definition:</b>
762     * Reason or justification for the use of this device.
763     * </p> 
764         */
765        public DeviceUseRequest setIndication(java.util.List<CodeableConceptDt> theValue) {
766                myIndication = theValue;
767                return this;
768        }
769        
770        
771
772        /**
773         * Adds and returns a new value for <b>indication</b> (why)
774         *
775     * <p>
776     * <b>Definition:</b>
777     * Reason or justification for the use of this device.
778     * </p> 
779         */
780        public CodeableConceptDt addIndication() {
781                CodeableConceptDt newType = new CodeableConceptDt();
782                getIndication().add(newType);
783                return newType; 
784        }
785
786        /**
787         * Adds a given new value for <b>indication</b> (why)
788         *
789         * <p>
790         * <b>Definition:</b>
791         * Reason or justification for the use of this device.
792         * </p>
793         * @param theValue The indication to add (must not be <code>null</code>)
794         */
795        public DeviceUseRequest addIndication(CodeableConceptDt theValue) {
796                if (theValue == null) {
797                        throw new NullPointerException("theValue must not be null");
798                }
799                getIndication().add(theValue);
800                return this;
801        }
802
803        /**
804         * Gets the first repetition for <b>indication</b> (why),
805         * creating it if it does not already exist.
806         *
807     * <p>
808     * <b>Definition:</b>
809     * Reason or justification for the use of this device.
810     * </p> 
811         */
812        public CodeableConceptDt getIndicationFirstRep() {
813                if (getIndication().isEmpty()) {
814                        return addIndication();
815                }
816                return getIndication().get(0); 
817        }
818  
819        /**
820         * Gets the value(s) for <b>notes</b> ().
821         * creating it if it does
822         * not exist. Will not return <code>null</code>.
823         *
824     * <p>
825     * <b>Definition:</b>
826     * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
827     * </p> 
828         */
829        public java.util.List<StringDt> getNotes() {  
830                if (myNotes == null) {
831                        myNotes = new java.util.ArrayList<StringDt>();
832                }
833                return myNotes;
834        }
835
836        /**
837         * Sets the value(s) for <b>notes</b> ()
838         *
839     * <p>
840     * <b>Definition:</b>
841     * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
842     * </p> 
843         */
844        public DeviceUseRequest setNotes(java.util.List<StringDt> theValue) {
845                myNotes = theValue;
846                return this;
847        }
848        
849        
850
851        /**
852         * Adds and returns a new value for <b>notes</b> ()
853         *
854     * <p>
855     * <b>Definition:</b>
856     * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
857     * </p> 
858         */
859        public StringDt addNotes() {
860                StringDt newType = new StringDt();
861                getNotes().add(newType);
862                return newType; 
863        }
864
865        /**
866         * Adds a given new value for <b>notes</b> ()
867         *
868         * <p>
869         * <b>Definition:</b>
870         * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
871         * </p>
872         * @param theValue The notes to add (must not be <code>null</code>)
873         */
874        public DeviceUseRequest addNotes(StringDt theValue) {
875                if (theValue == null) {
876                        throw new NullPointerException("theValue must not be null");
877                }
878                getNotes().add(theValue);
879                return this;
880        }
881
882        /**
883         * Gets the first repetition for <b>notes</b> (),
884         * creating it if it does not already exist.
885         *
886     * <p>
887     * <b>Definition:</b>
888     * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
889     * </p> 
890         */
891        public StringDt getNotesFirstRep() {
892                if (getNotes().isEmpty()) {
893                        return addNotes();
894                }
895                return getNotes().get(0); 
896        }
897        /**
898         * Adds a new value for <b>notes</b> ()
899         *
900     * <p>
901     * <b>Definition:</b>
902     * Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement.
903     * </p> 
904     *
905     * @return Returns a reference to this object, to allow for simple chaining.
906         */
907        public DeviceUseRequest addNotes( String theString) {
908                if (myNotes == null) {
909                        myNotes = new java.util.ArrayList<StringDt>();
910                }
911                myNotes.add(new StringDt(theString));
912                return this; 
913        }
914
915 
916        /**
917         * Gets the value(s) for <b>prnReason</b> ().
918         * creating it if it does
919         * not exist. Will not return <code>null</code>.
920         *
921     * <p>
922     * <b>Definition:</b>
923     * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.
924     * </p> 
925         */
926        public java.util.List<CodeableConceptDt> getPrnReason() {  
927                if (myPrnReason == null) {
928                        myPrnReason = new java.util.ArrayList<CodeableConceptDt>();
929                }
930                return myPrnReason;
931        }
932
933        /**
934         * Sets the value(s) for <b>prnReason</b> ()
935         *
936     * <p>
937     * <b>Definition:</b>
938     * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.
939     * </p> 
940         */
941        public DeviceUseRequest setPrnReason(java.util.List<CodeableConceptDt> theValue) {
942                myPrnReason = theValue;
943                return this;
944        }
945        
946        
947
948        /**
949         * Adds and returns a new value for <b>prnReason</b> ()
950         *
951     * <p>
952     * <b>Definition:</b>
953     * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.
954     * </p> 
955         */
956        public CodeableConceptDt addPrnReason() {
957                CodeableConceptDt newType = new CodeableConceptDt();
958                getPrnReason().add(newType);
959                return newType; 
960        }
961
962        /**
963         * Adds a given new value for <b>prnReason</b> ()
964         *
965         * <p>
966         * <b>Definition:</b>
967         * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.
968         * </p>
969         * @param theValue The prnReason to add (must not be <code>null</code>)
970         */
971        public DeviceUseRequest addPrnReason(CodeableConceptDt theValue) {
972                if (theValue == null) {
973                        throw new NullPointerException("theValue must not be null");
974                }
975                getPrnReason().add(theValue);
976                return this;
977        }
978
979        /**
980         * Gets the first repetition for <b>prnReason</b> (),
981         * creating it if it does not already exist.
982         *
983     * <p>
984     * <b>Definition:</b>
985     * The proposed act must be performed if the indicated conditions occur, e.g.., shortness of breath, SpO2 less than x%.
986     * </p> 
987         */
988        public CodeableConceptDt getPrnReasonFirstRep() {
989                if (getPrnReason().isEmpty()) {
990                        return addPrnReason();
991                }
992                return getPrnReason().get(0); 
993        }
994  
995        /**
996         * Gets the value(s) for <b>orderedOn</b> (when.init).
997         * creating it if it does
998         * not exist. Will not return <code>null</code>.
999         *
1000     * <p>
1001     * <b>Definition:</b>
1002     * The time when the request was made.
1003     * </p> 
1004         */
1005        public DateTimeDt getOrderedOnElement() {  
1006                if (myOrderedOn == null) {
1007                        myOrderedOn = new DateTimeDt();
1008                }
1009                return myOrderedOn;
1010        }
1011
1012        
1013        /**
1014         * Gets the value(s) for <b>orderedOn</b> (when.init).
1015         * creating it if it does
1016         * not exist. This method may return <code>null</code>.
1017         *
1018     * <p>
1019     * <b>Definition:</b>
1020     * The time when the request was made.
1021     * </p> 
1022         */
1023        public Date getOrderedOn() {  
1024                return getOrderedOnElement().getValue();
1025        }
1026
1027        /**
1028         * Sets the value(s) for <b>orderedOn</b> (when.init)
1029         *
1030     * <p>
1031     * <b>Definition:</b>
1032     * The time when the request was made.
1033     * </p> 
1034         */
1035        public DeviceUseRequest setOrderedOn(DateTimeDt theValue) {
1036                myOrderedOn = theValue;
1037                return this;
1038        }
1039        
1040        
1041
1042        /**
1043         * Sets the value for <b>orderedOn</b> (when.init)
1044         *
1045     * <p>
1046     * <b>Definition:</b>
1047     * The time when the request was made.
1048     * </p> 
1049         */
1050        public DeviceUseRequest setOrderedOn( Date theDate,  TemporalPrecisionEnum thePrecision) {
1051                myOrderedOn = new DateTimeDt(theDate, thePrecision); 
1052                return this; 
1053        }
1054
1055        /**
1056         * Sets the value for <b>orderedOn</b> (when.init)
1057         *
1058     * <p>
1059     * <b>Definition:</b>
1060     * The time when the request was made.
1061     * </p> 
1062         */
1063        public DeviceUseRequest setOrderedOnWithSecondsPrecision( Date theDate) {
1064                myOrderedOn = new DateTimeDt(theDate); 
1065                return this; 
1066        }
1067
1068 
1069        /**
1070         * Gets the value(s) for <b>recordedOn</b> (when.recorded).
1071         * creating it if it does
1072         * not exist. Will not return <code>null</code>.
1073         *
1074     * <p>
1075     * <b>Definition:</b>
1076     * The time at which the request was made/recorded.
1077     * </p> 
1078         */
1079        public DateTimeDt getRecordedOnElement() {  
1080                if (myRecordedOn == null) {
1081                        myRecordedOn = new DateTimeDt();
1082                }
1083                return myRecordedOn;
1084        }
1085
1086        
1087        /**
1088         * Gets the value(s) for <b>recordedOn</b> (when.recorded).
1089         * creating it if it does
1090         * not exist. This method may return <code>null</code>.
1091         *
1092     * <p>
1093     * <b>Definition:</b>
1094     * The time at which the request was made/recorded.
1095     * </p> 
1096         */
1097        public Date getRecordedOn() {  
1098                return getRecordedOnElement().getValue();
1099        }
1100
1101        /**
1102         * Sets the value(s) for <b>recordedOn</b> (when.recorded)
1103         *
1104     * <p>
1105     * <b>Definition:</b>
1106     * The time at which the request was made/recorded.
1107     * </p> 
1108         */
1109        public DeviceUseRequest setRecordedOn(DateTimeDt theValue) {
1110                myRecordedOn = theValue;
1111                return this;
1112        }
1113        
1114        
1115
1116        /**
1117         * Sets the value for <b>recordedOn</b> (when.recorded)
1118         *
1119     * <p>
1120     * <b>Definition:</b>
1121     * The time at which the request was made/recorded.
1122     * </p> 
1123         */
1124        public DeviceUseRequest setRecordedOn( Date theDate,  TemporalPrecisionEnum thePrecision) {
1125                myRecordedOn = new DateTimeDt(theDate, thePrecision); 
1126                return this; 
1127        }
1128
1129        /**
1130         * Sets the value for <b>recordedOn</b> (when.recorded)
1131         *
1132     * <p>
1133     * <b>Definition:</b>
1134     * The time at which the request was made/recorded.
1135     * </p> 
1136         */
1137        public DeviceUseRequest setRecordedOnWithSecondsPrecision( Date theDate) {
1138                myRecordedOn = new DateTimeDt(theDate); 
1139                return this; 
1140        }
1141
1142 
1143        /**
1144         * Gets the value(s) for <b>subject</b> (who.focus).
1145         * creating it if it does
1146         * not exist. Will not return <code>null</code>.
1147         *
1148     * <p>
1149     * <b>Definition:</b>
1150     * The patient who will use the device.
1151     * </p> 
1152         */
1153        public ResourceReferenceDt getSubject() {  
1154                if (mySubject == null) {
1155                        mySubject = new ResourceReferenceDt();
1156                }
1157                return mySubject;
1158        }
1159
1160        /**
1161         * Sets the value(s) for <b>subject</b> (who.focus)
1162         *
1163     * <p>
1164     * <b>Definition:</b>
1165     * The patient who will use the device.
1166     * </p> 
1167         */
1168        public DeviceUseRequest setSubject(ResourceReferenceDt theValue) {
1169                mySubject = theValue;
1170                return this;
1171        }
1172        
1173        
1174
1175  
1176        /**
1177         * Gets the value(s) for <b>timing[x]</b> (when.planned).
1178         * creating it if it does
1179         * not exist. Will not return <code>null</code>.
1180         *
1181     * <p>
1182     * <b>Definition:</b>
1183     * The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. \&quot;Every 8 hours\&quot;; \&quot;Three times a day\&quot;; \&quot;1/2 an hour before breakfast for 10 days from 23-Dec 2011:\&quot;; \&quot;15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\&quot;.
1184     * </p> 
1185         */
1186        public IDatatype getTiming() {  
1187                return myTiming;
1188        }
1189
1190        /**
1191         * Sets the value(s) for <b>timing[x]</b> (when.planned)
1192         *
1193     * <p>
1194     * <b>Definition:</b>
1195     * The timing schedule for the use of the device The Schedule data type allows many different expressions, for example. \&quot;Every 8 hours\&quot;; \&quot;Three times a day\&quot;; \&quot;1/2 an hour before breakfast for 10 days from 23-Dec 2011:\&quot;; \&quot;15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\&quot;.
1196     * </p> 
1197         */
1198        public DeviceUseRequest setTiming(IDatatype theValue) {
1199                myTiming = theValue;
1200                return this;
1201        }
1202        
1203        
1204
1205  
1206        /**
1207         * Gets the value(s) for <b>priority</b> (grade).
1208         * creating it if it does
1209         * not exist. Will not return <code>null</code>.
1210         *
1211     * <p>
1212     * <b>Definition:</b>
1213     * Characterizes how quickly the  use of device must be initiated. Includes concepts such as stat, urgent, routine.
1214     * </p> 
1215         */
1216        public BoundCodeDt<DeviceUseRequestPriorityEnum> getPriorityElement() {  
1217                if (myPriority == null) {
1218                        myPriority = new BoundCodeDt<DeviceUseRequestPriorityEnum>(DeviceUseRequestPriorityEnum.VALUESET_BINDER);
1219                }
1220                return myPriority;
1221        }
1222
1223        
1224        /**
1225         * Gets the value(s) for <b>priority</b> (grade).
1226         * creating it if it does
1227         * not exist. This method may return <code>null</code>.
1228         *
1229     * <p>
1230     * <b>Definition:</b>
1231     * Characterizes how quickly the  use of device must be initiated. Includes concepts such as stat, urgent, routine.
1232     * </p> 
1233         */
1234        public String getPriority() {  
1235                return getPriorityElement().getValue();
1236        }
1237
1238        /**
1239         * Sets the value(s) for <b>priority</b> (grade)
1240         *
1241     * <p>
1242     * <b>Definition:</b>
1243     * Characterizes how quickly the  use of device must be initiated. Includes concepts such as stat, urgent, routine.
1244     * </p> 
1245         */
1246        public DeviceUseRequest setPriority(BoundCodeDt<DeviceUseRequestPriorityEnum> theValue) {
1247                myPriority = theValue;
1248                return this;
1249        }
1250        
1251        
1252
1253        /**
1254         * Sets the value(s) for <b>priority</b> (grade)
1255         *
1256     * <p>
1257     * <b>Definition:</b>
1258     * Characterizes how quickly the  use of device must be initiated. Includes concepts such as stat, urgent, routine.
1259     * </p> 
1260         */
1261        public DeviceUseRequest setPriority(DeviceUseRequestPriorityEnum theValue) {
1262                setPriority(new BoundCodeDt<DeviceUseRequestPriorityEnum>(DeviceUseRequestPriorityEnum.VALUESET_BINDER, theValue));
1263                
1264/*
1265                getPriorityElement().setValueAsEnum(theValue);
1266*/
1267                return this;
1268        }
1269
1270  
1271
1272
1273    @Override
1274    public String getResourceName() {
1275        return "DeviceUseRequest";
1276    }
1277    
1278    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
1279        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
1280    }
1281
1282
1283}