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