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