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