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>Procedure</b> Resource
282 * (clinical.general)
283 *
284 * <p>
285 * <b>Definition:</b>
286 * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.
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/Procedure">http://hl7.org/fhir/profiles/Procedure</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Procedure", profile="http://hl7.org/fhir/profiles/Procedure", id="procedure")
301public class Procedure extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     {
303
304        /**
305         * Search parameter constant for <b>code</b>
306         * <p>
307         * Description: <b>A code to identify a  procedure</b><br>
308         * Type: <b>token</b><br>
309         * Path: <b>Procedure.code</b><br>
310         * </p>
311         */
312        @SearchParamDefinition(name="code", path="Procedure.code", description="A code to identify a  procedure", type="token"  )
313        public static final String SP_CODE = "code";
314
315        /**
316         * <b>Fluent Client</b> search parameter constant for <b>code</b>
317         * <p>
318         * Description: <b>A code to identify a  procedure</b><br>
319         * Type: <b>token</b><br>
320         * Path: <b>Procedure.code</b><br>
321         * </p>
322         */
323        public static final TokenClientParam CODE = new TokenClientParam(SP_CODE);
324
325        /**
326         * Search parameter constant for <b>identifier</b>
327         * <p>
328         * Description: <b>A unique identifier for a procedure</b><br>
329         * Type: <b>token</b><br>
330         * Path: <b>Procedure.identifier</b><br>
331         * </p>
332         */
333        @SearchParamDefinition(name="identifier", path="Procedure.identifier", description="A unique identifier for a procedure", type="token"  )
334        public static final String SP_IDENTIFIER = "identifier";
335
336        /**
337         * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
338         * <p>
339         * Description: <b>A unique identifier for a procedure</b><br>
340         * Type: <b>token</b><br>
341         * Path: <b>Procedure.identifier</b><br>
342         * </p>
343         */
344        public static final TokenClientParam IDENTIFIER = new TokenClientParam(SP_IDENTIFIER);
345
346        /**
347         * Search parameter constant for <b>date</b>
348         * <p>
349         * Description: <b></b><br>
350         * Type: <b>date</b><br>
351         * Path: <b>Procedure.performed[x]</b><br>
352         * </p>
353         */
354        @SearchParamDefinition(name="date", path="Procedure.performed[x]", description="", type="date"  )
355        public static final String SP_DATE = "date";
356
357        /**
358         * <b>Fluent Client</b> search parameter constant for <b>date</b>
359         * <p>
360         * Description: <b></b><br>
361         * Type: <b>date</b><br>
362         * Path: <b>Procedure.performed[x]</b><br>
363         * </p>
364         */
365        public static final DateClientParam DATE = new DateClientParam(SP_DATE);
366
367        /**
368         * Search parameter constant for <b>performer</b>
369         * <p>
370         * Description: <b></b><br>
371         * Type: <b>reference</b><br>
372         * Path: <b>Procedure.performer.actor</b><br>
373         * </p>
374         */
375        @SearchParamDefinition(name="performer", path="Procedure.performer.actor", description="", type="reference" , providesMembershipIn={
376 @Compartment(name="Patient") ,  @Compartment(name="RelatedPerson") ,  @Compartment(name="Practitioner")        }
377 )
378        public static final String SP_PERFORMER = "performer";
379
380        /**
381         * <b>Fluent Client</b> search parameter constant for <b>performer</b>
382         * <p>
383         * Description: <b></b><br>
384         * Type: <b>reference</b><br>
385         * Path: <b>Procedure.performer.actor</b><br>
386         * </p>
387         */
388        public static final ReferenceClientParam PERFORMER = new ReferenceClientParam(SP_PERFORMER);
389
390        /**
391         * Search parameter constant for <b>location</b>
392         * <p>
393         * Description: <b></b><br>
394         * Type: <b>reference</b><br>
395         * Path: <b>Procedure.location</b><br>
396         * </p>
397         */
398        @SearchParamDefinition(name="location", path="Procedure.location", description="", type="reference"  )
399        public static final String SP_LOCATION = "location";
400
401        /**
402         * <b>Fluent Client</b> search parameter constant for <b>location</b>
403         * <p>
404         * Description: <b></b><br>
405         * Type: <b>reference</b><br>
406         * Path: <b>Procedure.location</b><br>
407         * </p>
408         */
409        public static final ReferenceClientParam LOCATION = new ReferenceClientParam(SP_LOCATION);
410
411        /**
412         * Search parameter constant for <b>encounter</b>
413         * <p>
414         * Description: <b></b><br>
415         * Type: <b>reference</b><br>
416         * Path: <b>Procedure.encounter</b><br>
417         * </p>
418         */
419        @SearchParamDefinition(name="encounter", path="Procedure.encounter", description="", type="reference" , providesMembershipIn={
420 @Compartment(name="Encounter")         }
421 )
422        public static final String SP_ENCOUNTER = "encounter";
423
424        /**
425         * <b>Fluent Client</b> search parameter constant for <b>encounter</b>
426         * <p>
427         * Description: <b></b><br>
428         * Type: <b>reference</b><br>
429         * Path: <b>Procedure.encounter</b><br>
430         * </p>
431         */
432        public static final ReferenceClientParam ENCOUNTER = new ReferenceClientParam(SP_ENCOUNTER);
433
434        /**
435         * Search parameter constant for <b>subject</b>
436         * <p>
437         * Description: <b>Search by subject</b><br>
438         * Type: <b>reference</b><br>
439         * Path: <b>Procedure.subject</b><br>
440         * </p>
441         */
442        @SearchParamDefinition(name="subject", path="Procedure.subject", description="Search by subject", type="reference"  )
443        public static final String SP_SUBJECT = "subject";
444
445        /**
446         * <b>Fluent Client</b> search parameter constant for <b>subject</b>
447         * <p>
448         * Description: <b>Search by subject</b><br>
449         * Type: <b>reference</b><br>
450         * Path: <b>Procedure.subject</b><br>
451         * </p>
452         */
453        public static final ReferenceClientParam SUBJECT = new ReferenceClientParam(SP_SUBJECT);
454
455        /**
456         * Search parameter constant for <b>patient</b>
457         * <p>
458         * Description: <b>Search by subject - a patient</b><br>
459         * Type: <b>reference</b><br>
460         * Path: <b>Procedure.subject</b><br>
461         * </p>
462         */
463        @SearchParamDefinition(name="patient", path="Procedure.subject", description="Search by subject - a patient", type="reference" , providesMembershipIn={
464 @Compartment(name="Patient")   }
465, target={
466 ca.uhn.fhir.model.dstu2.resource.Patient.class         }
467 )
468        public static final String SP_PATIENT = "patient";
469
470        /**
471         * <b>Fluent Client</b> search parameter constant for <b>patient</b>
472         * <p>
473         * Description: <b>Search by subject - a patient</b><br>
474         * Type: <b>reference</b><br>
475         * Path: <b>Procedure.subject</b><br>
476         * </p>
477         */
478        public static final ReferenceClientParam PATIENT = new ReferenceClientParam(SP_PATIENT);
479
480
481        /**
482         * Constant for fluent queries to be used to add include statements. Specifies
483         * the path value of "<b>Procedure:encounter</b>".
484         */
485        public static final Include INCLUDE_ENCOUNTER = new Include("Procedure:encounter");
486
487        /**
488         * Constant for fluent queries to be used to add include statements. Specifies
489         * the path value of "<b>Procedure:location</b>".
490         */
491        public static final Include INCLUDE_LOCATION = new Include("Procedure:location");
492
493        /**
494         * Constant for fluent queries to be used to add include statements. Specifies
495         * the path value of "<b>Procedure:patient</b>".
496         */
497        public static final Include INCLUDE_PATIENT = new Include("Procedure:patient");
498
499        /**
500         * Constant for fluent queries to be used to add include statements. Specifies
501         * the path value of "<b>Procedure:performer</b>".
502         */
503        public static final Include INCLUDE_PERFORMER = new Include("Procedure:performer");
504
505        /**
506         * Constant for fluent queries to be used to add include statements. Specifies
507         * the path value of "<b>Procedure:subject</b>".
508         */
509        public static final Include INCLUDE_SUBJECT = new Include("Procedure:subject");
510
511
512        @Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)       
513        @Description(
514                shortDefinition="id",
515                formalDefinition="This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)"
516        )
517        private java.util.List<IdentifierDt> myIdentifier;
518        
519        @Child(name="subject", order=1, min=1, max=1, summary=true, modifier=false, type={
520                ca.uhn.fhir.model.dstu2.resource.Patient.class,                 ca.uhn.fhir.model.dstu2.resource.Group.class    })
521        @Description(
522                shortDefinition="who.focus",
523                formalDefinition="The person, animal or group on which the procedure was performed"
524        )
525        private ResourceReferenceDt mySubject;
526        
527        @Child(name="status", type=CodeDt.class, order=2, min=1, max=1, summary=true, modifier=true)    
528        @Description(
529                shortDefinition="",
530                formalDefinition="A code specifying the state of the procedure. Generally this will be in-progress or completed state."
531        )
532        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/procedure-status")
533        private BoundCodeDt<ProcedureStatusEnum> myStatus;
534        
535        @Child(name="category", type=CodeableConceptDt.class, order=3, min=0, max=1, summary=true, modifier=false)      
536        @Description(
537                shortDefinition="",
538                formalDefinition="A code that classifies the procedure for searching, sorting and display purposes (e.g. \"Surgical Procedure\")"
539        )
540        private CodeableConceptDt myCategory;
541        
542        @Child(name="code", type=CodeableConceptDt.class, order=4, min=1, max=1, summary=true, modifier=false)  
543        @Description(
544                shortDefinition="class",
545                formalDefinition="The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \"Laparoscopic Appendectomy\")"
546        )
547        private CodeableConceptDt myCode;
548        
549        @Child(name="notPerformed", type=BooleanDt.class, order=5, min=0, max=1, summary=false, modifier=true)  
550        @Description(
551                shortDefinition="",
552                formalDefinition="Set this to true if the record is saying that the procedure was NOT performed"
553        )
554        private BooleanDt myNotPerformed;
555        
556        @Child(name="reasonNotPerformed", type=CodeableConceptDt.class, order=6, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false) 
557        @Description(
558                shortDefinition="",
559                formalDefinition="A code indicating why the procedure was not performed."
560        )
561        private java.util.List<CodeableConceptDt> myReasonNotPerformed;
562        
563        @Child(name="bodySite", type=CodeableConceptDt.class, order=7, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)    
564        @Description(
565                shortDefinition="",
566                formalDefinition="Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion"
567        )
568        private java.util.List<CodeableConceptDt> myBodySite;
569        
570        @Child(name="reason", order=8, min=0, max=1, summary=true, modifier=false, type={
571                CodeableConceptDt.class,                Condition.class })
572        @Description(
573                shortDefinition="",
574                formalDefinition="The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text"
575        )
576        private IDatatype myReason;
577        
578        @Child(name="performer", order=9, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) 
579        @Description(
580                shortDefinition="",
581                formalDefinition="Limited to 'real' people rather than equipment"
582        )
583        private java.util.List<Performer> myPerformer;
584        
585        @Child(name="performed", order=10, min=0, max=1, summary=true, modifier=false, type={
586                DateTimeDt.class,               PeriodDt.class  })
587        @Description(
588                shortDefinition="when.done",
589                formalDefinition="The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured."
590        )
591        private IDatatype myPerformed;
592        
593        @Child(name="encounter", order=11, min=0, max=1, summary=true, modifier=false, type={
594                ca.uhn.fhir.model.dstu2.resource.Encounter.class        })
595        @Description(
596                shortDefinition="context",
597                formalDefinition="The encounter during which the procedure was performed"
598        )
599        private ResourceReferenceDt myEncounter;
600        
601        @Child(name="location", order=12, min=0, max=1, summary=true, modifier=false, type={
602                ca.uhn.fhir.model.dstu2.resource.Location.class })
603        @Description(
604                shortDefinition="where",
605                formalDefinition="The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant"
606        )
607        private ResourceReferenceDt myLocation;
608        
609        @Child(name="outcome", type=CodeableConceptDt.class, order=13, min=0, max=1, summary=true, modifier=false)      
610        @Description(
611                shortDefinition="",
612                formalDefinition="The outcome of the procedure - did it resolve reasons for the procedure being performed?"
613        )
614        private CodeableConceptDt myOutcome;
615        
616        @Child(name="report", order=14, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
617                ca.uhn.fhir.model.dstu2.resource.DiagnosticReport.class })
618        @Description(
619                shortDefinition="",
620                formalDefinition="This could be a histology result, pathology report, surgical report, etc.."
621        )
622        private java.util.List<ResourceReferenceDt> myReport;
623        
624        @Child(name="complication", type=CodeableConceptDt.class, order=15, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)      
625        @Description(
626                shortDefinition="",
627                formalDefinition="Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues"
628        )
629        private java.util.List<CodeableConceptDt> myComplication;
630        
631        @Child(name="followUp", type=CodeableConceptDt.class, order=16, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
632        @Description(
633                shortDefinition="",
634                formalDefinition="If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used"
635        )
636        private java.util.List<CodeableConceptDt> myFollowUp;
637        
638        @Child(name="request", order=17, min=0, max=1, summary=false, modifier=false, type={
639                ca.uhn.fhir.model.dstu2.resource.CarePlan.class,                ca.uhn.fhir.model.dstu2.resource.DiagnosticOrder.class,                 ca.uhn.fhir.model.dstu2.resource.ProcedureRequest.class,                ca.uhn.fhir.model.dstu2.resource.ReferralRequest.class  })
640        @Description(
641                shortDefinition="",
642                formalDefinition="A reference to a resource that contains details of the request for this procedure."
643        )
644        private ResourceReferenceDt myRequest;
645        
646        @Child(name="notes", type=AnnotationDt.class, order=18, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)  
647        @Description(
648                shortDefinition="",
649                formalDefinition="Any other notes about the procedure.  E.g. the operative notes"
650        )
651        private java.util.List<AnnotationDt> myNotes;
652        
653        @Child(name="focalDevice", order=19, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false)     
654        @Description(
655                shortDefinition="",
656                formalDefinition="A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure."
657        )
658        private java.util.List<FocalDevice> myFocalDevice;
659        
660        @Child(name="used", order=20, min=0, max=Child.MAX_UNLIMITED, summary=false, modifier=false, type={
661                ca.uhn.fhir.model.dstu2.resource.Device.class,          ca.uhn.fhir.model.dstu2.resource.Medication.class,              ca.uhn.fhir.model.dstu2.resource.Substance.class        })
662        @Description(
663                shortDefinition="",
664                formalDefinition="Identifies medications, devices and any other substance used as part of the procedure"
665        )
666        private java.util.List<ResourceReferenceDt> myUsed;
667        
668
669        @Override
670        public boolean isEmpty() {
671                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myIdentifier,  mySubject,  myStatus,  myCategory,  myCode,  myNotPerformed,  myReasonNotPerformed,  myBodySite,  myReason,  myPerformer,  myPerformed,  myEncounter,  myLocation,  myOutcome,  myReport,  myComplication,  myFollowUp,  myRequest,  myNotes,  myFocalDevice,  myUsed);
672        }
673        
674        @Override
675        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
676                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myIdentifier, mySubject, myStatus, myCategory, myCode, myNotPerformed, myReasonNotPerformed, myBodySite, myReason, myPerformer, myPerformed, myEncounter, myLocation, myOutcome, myReport, myComplication, myFollowUp, myRequest, myNotes, myFocalDevice, myUsed);
677        }
678
679        /**
680         * Gets the value(s) for <b>identifier</b> (id).
681         * creating it if it does
682         * not exist. Will not return <code>null</code>.
683         *
684     * <p>
685     * <b>Definition:</b>
686     * This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
687     * </p> 
688         */
689        public java.util.List<IdentifierDt> getIdentifier() {  
690                if (myIdentifier == null) {
691                        myIdentifier = new java.util.ArrayList<IdentifierDt>();
692                }
693                return myIdentifier;
694        }
695
696        /**
697         * Sets the value(s) for <b>identifier</b> (id)
698         *
699     * <p>
700     * <b>Definition:</b>
701     * This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
702     * </p> 
703         */
704        public Procedure setIdentifier(java.util.List<IdentifierDt> theValue) {
705                myIdentifier = theValue;
706                return this;
707        }
708        
709        
710
711        /**
712         * Adds and returns a new value for <b>identifier</b> (id)
713         *
714     * <p>
715     * <b>Definition:</b>
716     * This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
717     * </p> 
718         */
719        public IdentifierDt addIdentifier() {
720                IdentifierDt newType = new IdentifierDt();
721                getIdentifier().add(newType);
722                return newType; 
723        }
724
725        /**
726         * Adds a given new value for <b>identifier</b> (id)
727         *
728         * <p>
729         * <b>Definition:</b>
730         * This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
731         * </p>
732         * @param theValue The identifier to add (must not be <code>null</code>)
733         */
734        public Procedure addIdentifier(IdentifierDt theValue) {
735                if (theValue == null) {
736                        throw new NullPointerException("theValue must not be null");
737                }
738                getIdentifier().add(theValue);
739                return this;
740        }
741
742        /**
743         * Gets the first repetition for <b>identifier</b> (id),
744         * creating it if it does not already exist.
745         *
746     * <p>
747     * <b>Definition:</b>
748     * This records identifiers associated with this procedure that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)
749     * </p> 
750         */
751        public IdentifierDt getIdentifierFirstRep() {
752                if (getIdentifier().isEmpty()) {
753                        return addIdentifier();
754                }
755                return getIdentifier().get(0); 
756        }
757  
758        /**
759         * Gets the value(s) for <b>subject</b> (who.focus).
760         * creating it if it does
761         * not exist. Will not return <code>null</code>.
762         *
763     * <p>
764     * <b>Definition:</b>
765     * The person, animal or group on which the procedure was performed
766     * </p> 
767         */
768        public ResourceReferenceDt getSubject() {  
769                if (mySubject == null) {
770                        mySubject = new ResourceReferenceDt();
771                }
772                return mySubject;
773        }
774
775        /**
776         * Sets the value(s) for <b>subject</b> (who.focus)
777         *
778     * <p>
779     * <b>Definition:</b>
780     * The person, animal or group on which the procedure was performed
781     * </p> 
782         */
783        public Procedure setSubject(ResourceReferenceDt theValue) {
784                mySubject = theValue;
785                return this;
786        }
787        
788        
789
790  
791        /**
792         * Gets the value(s) for <b>status</b> ().
793         * creating it if it does
794         * not exist. Will not return <code>null</code>.
795         *
796     * <p>
797     * <b>Definition:</b>
798     * A code specifying the state of the procedure. Generally this will be in-progress or completed state.
799     * </p> 
800         */
801        public BoundCodeDt<ProcedureStatusEnum> getStatusElement() {  
802                if (myStatus == null) {
803                        myStatus = new BoundCodeDt<ProcedureStatusEnum>(ProcedureStatusEnum.VALUESET_BINDER);
804                }
805                return myStatus;
806        }
807
808        
809        /**
810         * Gets the value(s) for <b>status</b> ().
811         * creating it if it does
812         * not exist. This method may return <code>null</code>.
813         *
814     * <p>
815     * <b>Definition:</b>
816     * A code specifying the state of the procedure. Generally this will be in-progress or completed state.
817     * </p> 
818         */
819        public String getStatus() {  
820                return getStatusElement().getValue();
821        }
822
823        /**
824         * Sets the value(s) for <b>status</b> ()
825         *
826     * <p>
827     * <b>Definition:</b>
828     * A code specifying the state of the procedure. Generally this will be in-progress or completed state.
829     * </p> 
830         */
831        public Procedure setStatus(BoundCodeDt<ProcedureStatusEnum> theValue) {
832                myStatus = theValue;
833                return this;
834        }
835        
836        
837
838        /**
839         * Sets the value(s) for <b>status</b> ()
840         *
841     * <p>
842     * <b>Definition:</b>
843     * A code specifying the state of the procedure. Generally this will be in-progress or completed state.
844     * </p> 
845         */
846        public Procedure setStatus(ProcedureStatusEnum theValue) {
847                setStatus(new BoundCodeDt<ProcedureStatusEnum>(ProcedureStatusEnum.VALUESET_BINDER, theValue));
848                
849/*
850                getStatusElement().setValueAsEnum(theValue);
851*/
852                return this;
853        }
854
855  
856        /**
857         * Gets the value(s) for <b>category</b> ().
858         * creating it if it does
859         * not exist. Will not return <code>null</code>.
860         *
861     * <p>
862     * <b>Definition:</b>
863     * A code that classifies the procedure for searching, sorting and display purposes (e.g. \&quot;Surgical Procedure\&quot;)
864     * </p> 
865         */
866        public CodeableConceptDt getCategory() {  
867                if (myCategory == null) {
868                        myCategory = new CodeableConceptDt();
869                }
870                return myCategory;
871        }
872
873        /**
874         * Sets the value(s) for <b>category</b> ()
875         *
876     * <p>
877     * <b>Definition:</b>
878     * A code that classifies the procedure for searching, sorting and display purposes (e.g. \&quot;Surgical Procedure\&quot;)
879     * </p> 
880         */
881        public Procedure setCategory(CodeableConceptDt theValue) {
882                myCategory = theValue;
883                return this;
884        }
885        
886        
887
888  
889        /**
890         * Gets the value(s) for <b>code</b> (class).
891         * creating it if it does
892         * not exist. Will not return <code>null</code>.
893         *
894     * <p>
895     * <b>Definition:</b>
896     * The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \&quot;Laparoscopic Appendectomy\&quot;)
897     * </p> 
898         */
899        public CodeableConceptDt getCode() {  
900                if (myCode == null) {
901                        myCode = new CodeableConceptDt();
902                }
903                return myCode;
904        }
905
906        /**
907         * Sets the value(s) for <b>code</b> (class)
908         *
909     * <p>
910     * <b>Definition:</b>
911     * The specific procedure that is performed. Use text if the exact nature of the procedure cannot be coded (e.g. \&quot;Laparoscopic Appendectomy\&quot;)
912     * </p> 
913         */
914        public Procedure setCode(CodeableConceptDt theValue) {
915                myCode = theValue;
916                return this;
917        }
918        
919        
920
921  
922        /**
923         * Gets the value(s) for <b>notPerformed</b> ().
924         * creating it if it does
925         * not exist. Will not return <code>null</code>.
926         *
927     * <p>
928     * <b>Definition:</b>
929     * Set this to true if the record is saying that the procedure was NOT performed
930     * </p> 
931         */
932        public BooleanDt getNotPerformedElement() {  
933                if (myNotPerformed == null) {
934                        myNotPerformed = new BooleanDt();
935                }
936                return myNotPerformed;
937        }
938
939        
940        /**
941         * Gets the value(s) for <b>notPerformed</b> ().
942         * creating it if it does
943         * not exist. This method may return <code>null</code>.
944         *
945     * <p>
946     * <b>Definition:</b>
947     * Set this to true if the record is saying that the procedure was NOT performed
948     * </p> 
949         */
950        public Boolean getNotPerformed() {  
951                return getNotPerformedElement().getValue();
952        }
953
954        /**
955         * Sets the value(s) for <b>notPerformed</b> ()
956         *
957     * <p>
958     * <b>Definition:</b>
959     * Set this to true if the record is saying that the procedure was NOT performed
960     * </p> 
961         */
962        public Procedure setNotPerformed(BooleanDt theValue) {
963                myNotPerformed = theValue;
964                return this;
965        }
966        
967        
968
969        /**
970         * Sets the value for <b>notPerformed</b> ()
971         *
972     * <p>
973     * <b>Definition:</b>
974     * Set this to true if the record is saying that the procedure was NOT performed
975     * </p> 
976         */
977        public Procedure setNotPerformed( boolean theBoolean) {
978                myNotPerformed = new BooleanDt(theBoolean); 
979                return this; 
980        }
981
982 
983        /**
984         * Gets the value(s) for <b>reasonNotPerformed</b> ().
985         * creating it if it does
986         * not exist. Will not return <code>null</code>.
987         *
988     * <p>
989     * <b>Definition:</b>
990     * A code indicating why the procedure was not performed.
991     * </p> 
992         */
993        public java.util.List<CodeableConceptDt> getReasonNotPerformed() {  
994                if (myReasonNotPerformed == null) {
995                        myReasonNotPerformed = new java.util.ArrayList<CodeableConceptDt>();
996                }
997                return myReasonNotPerformed;
998        }
999
1000        /**
1001         * Sets the value(s) for <b>reasonNotPerformed</b> ()
1002         *
1003     * <p>
1004     * <b>Definition:</b>
1005     * A code indicating why the procedure was not performed.
1006     * </p> 
1007         */
1008        public Procedure setReasonNotPerformed(java.util.List<CodeableConceptDt> theValue) {
1009                myReasonNotPerformed = theValue;
1010                return this;
1011        }
1012        
1013        
1014
1015        /**
1016         * Adds and returns a new value for <b>reasonNotPerformed</b> ()
1017         *
1018     * <p>
1019     * <b>Definition:</b>
1020     * A code indicating why the procedure was not performed.
1021     * </p> 
1022         */
1023        public CodeableConceptDt addReasonNotPerformed() {
1024                CodeableConceptDt newType = new CodeableConceptDt();
1025                getReasonNotPerformed().add(newType);
1026                return newType; 
1027        }
1028
1029        /**
1030         * Adds a given new value for <b>reasonNotPerformed</b> ()
1031         *
1032         * <p>
1033         * <b>Definition:</b>
1034         * A code indicating why the procedure was not performed.
1035         * </p>
1036         * @param theValue The reasonNotPerformed to add (must not be <code>null</code>)
1037         */
1038        public Procedure addReasonNotPerformed(CodeableConceptDt theValue) {
1039                if (theValue == null) {
1040                        throw new NullPointerException("theValue must not be null");
1041                }
1042                getReasonNotPerformed().add(theValue);
1043                return this;
1044        }
1045
1046        /**
1047         * Gets the first repetition for <b>reasonNotPerformed</b> (),
1048         * creating it if it does not already exist.
1049         *
1050     * <p>
1051     * <b>Definition:</b>
1052     * A code indicating why the procedure was not performed.
1053     * </p> 
1054         */
1055        public CodeableConceptDt getReasonNotPerformedFirstRep() {
1056                if (getReasonNotPerformed().isEmpty()) {
1057                        return addReasonNotPerformed();
1058                }
1059                return getReasonNotPerformed().get(0); 
1060        }
1061  
1062        /**
1063         * Gets the value(s) for <b>bodySite</b> ().
1064         * creating it if it does
1065         * not exist. Will not return <code>null</code>.
1066         *
1067     * <p>
1068     * <b>Definition:</b>
1069     * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion
1070     * </p> 
1071         */
1072        public java.util.List<CodeableConceptDt> getBodySite() {  
1073                if (myBodySite == null) {
1074                        myBodySite = new java.util.ArrayList<CodeableConceptDt>();
1075                }
1076                return myBodySite;
1077        }
1078
1079        /**
1080         * Sets the value(s) for <b>bodySite</b> ()
1081         *
1082     * <p>
1083     * <b>Definition:</b>
1084     * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion
1085     * </p> 
1086         */
1087        public Procedure setBodySite(java.util.List<CodeableConceptDt> theValue) {
1088                myBodySite = theValue;
1089                return this;
1090        }
1091        
1092        
1093
1094        /**
1095         * Adds and returns a new value for <b>bodySite</b> ()
1096         *
1097     * <p>
1098     * <b>Definition:</b>
1099     * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion
1100     * </p> 
1101         */
1102        public CodeableConceptDt addBodySite() {
1103                CodeableConceptDt newType = new CodeableConceptDt();
1104                getBodySite().add(newType);
1105                return newType; 
1106        }
1107
1108        /**
1109         * Adds a given new value for <b>bodySite</b> ()
1110         *
1111         * <p>
1112         * <b>Definition:</b>
1113         * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion
1114         * </p>
1115         * @param theValue The bodySite to add (must not be <code>null</code>)
1116         */
1117        public Procedure addBodySite(CodeableConceptDt theValue) {
1118                if (theValue == null) {
1119                        throw new NullPointerException("theValue must not be null");
1120                }
1121                getBodySite().add(theValue);
1122                return this;
1123        }
1124
1125        /**
1126         * Gets the first repetition for <b>bodySite</b> (),
1127         * creating it if it does not already exist.
1128         *
1129     * <p>
1130     * <b>Definition:</b>
1131     * Detailed and structured anatomical location information. Multiple locations are allowed - e.g. multiple punch biopsies of a lesion
1132     * </p> 
1133         */
1134        public CodeableConceptDt getBodySiteFirstRep() {
1135                if (getBodySite().isEmpty()) {
1136                        return addBodySite();
1137                }
1138                return getBodySite().get(0); 
1139        }
1140  
1141        /**
1142         * Gets the value(s) for <b>reason[x]</b> ().
1143         * creating it if it does
1144         * not exist. Will not return <code>null</code>.
1145         *
1146     * <p>
1147     * <b>Definition:</b>
1148     * The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text
1149     * </p> 
1150         */
1151        public IDatatype getReason() {  
1152                return myReason;
1153        }
1154
1155        /**
1156         * Sets the value(s) for <b>reason[x]</b> ()
1157         *
1158     * <p>
1159     * <b>Definition:</b>
1160     * The reason why the procedure was performed. This may be due to a Condition, may be coded entity of some type, or may simply be present as text
1161     * </p> 
1162         */
1163        public Procedure setReason(IDatatype theValue) {
1164                myReason = theValue;
1165                return this;
1166        }
1167        
1168        
1169
1170  
1171        /**
1172         * Gets the value(s) for <b>performer</b> ().
1173         * creating it if it does
1174         * not exist. Will not return <code>null</code>.
1175         *
1176     * <p>
1177     * <b>Definition:</b>
1178     * Limited to 'real' people rather than equipment
1179     * </p> 
1180         */
1181        public java.util.List<Performer> getPerformer() {  
1182                if (myPerformer == null) {
1183                        myPerformer = new java.util.ArrayList<Performer>();
1184                }
1185                return myPerformer;
1186        }
1187
1188        /**
1189         * Sets the value(s) for <b>performer</b> ()
1190         *
1191     * <p>
1192     * <b>Definition:</b>
1193     * Limited to 'real' people rather than equipment
1194     * </p> 
1195         */
1196        public Procedure setPerformer(java.util.List<Performer> theValue) {
1197                myPerformer = theValue;
1198                return this;
1199        }
1200        
1201        
1202
1203        /**
1204         * Adds and returns a new value for <b>performer</b> ()
1205         *
1206     * <p>
1207     * <b>Definition:</b>
1208     * Limited to 'real' people rather than equipment
1209     * </p> 
1210         */
1211        public Performer addPerformer() {
1212                Performer newType = new Performer();
1213                getPerformer().add(newType);
1214                return newType; 
1215        }
1216
1217        /**
1218         * Adds a given new value for <b>performer</b> ()
1219         *
1220         * <p>
1221         * <b>Definition:</b>
1222         * Limited to 'real' people rather than equipment
1223         * </p>
1224         * @param theValue The performer to add (must not be <code>null</code>)
1225         */
1226        public Procedure addPerformer(Performer theValue) {
1227                if (theValue == null) {
1228                        throw new NullPointerException("theValue must not be null");
1229                }
1230                getPerformer().add(theValue);
1231                return this;
1232        }
1233
1234        /**
1235         * Gets the first repetition for <b>performer</b> (),
1236         * creating it if it does not already exist.
1237         *
1238     * <p>
1239     * <b>Definition:</b>
1240     * Limited to 'real' people rather than equipment
1241     * </p> 
1242         */
1243        public Performer getPerformerFirstRep() {
1244                if (getPerformer().isEmpty()) {
1245                        return addPerformer();
1246                }
1247                return getPerformer().get(0); 
1248        }
1249  
1250        /**
1251         * Gets the value(s) for <b>performed[x]</b> (when.done).
1252         * creating it if it does
1253         * not exist. Will not return <code>null</code>.
1254         *
1255     * <p>
1256     * <b>Definition:</b>
1257     * The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.
1258     * </p> 
1259         */
1260        public IDatatype getPerformed() {  
1261                return myPerformed;
1262        }
1263
1264        /**
1265         * Sets the value(s) for <b>performed[x]</b> (when.done)
1266         *
1267     * <p>
1268     * <b>Definition:</b>
1269     * The date(time)/period over which the procedure was performed. Allows a period to support complex procedures that span more than one date, and also allows for the length of the procedure to be captured.
1270     * </p> 
1271         */
1272        public Procedure setPerformed(IDatatype theValue) {
1273                myPerformed = theValue;
1274                return this;
1275        }
1276        
1277        
1278
1279  
1280        /**
1281         * Gets the value(s) for <b>encounter</b> (context).
1282         * creating it if it does
1283         * not exist. Will not return <code>null</code>.
1284         *
1285     * <p>
1286     * <b>Definition:</b>
1287     * The encounter during which the procedure was performed
1288     * </p> 
1289         */
1290        public ResourceReferenceDt getEncounter() {  
1291                if (myEncounter == null) {
1292                        myEncounter = new ResourceReferenceDt();
1293                }
1294                return myEncounter;
1295        }
1296
1297        /**
1298         * Sets the value(s) for <b>encounter</b> (context)
1299         *
1300     * <p>
1301     * <b>Definition:</b>
1302     * The encounter during which the procedure was performed
1303     * </p> 
1304         */
1305        public Procedure setEncounter(ResourceReferenceDt theValue) {
1306                myEncounter = theValue;
1307                return this;
1308        }
1309        
1310        
1311
1312  
1313        /**
1314         * Gets the value(s) for <b>location</b> (where).
1315         * creating it if it does
1316         * not exist. Will not return <code>null</code>.
1317         *
1318     * <p>
1319     * <b>Definition:</b>
1320     * The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant
1321     * </p> 
1322         */
1323        public ResourceReferenceDt getLocation() {  
1324                if (myLocation == null) {
1325                        myLocation = new ResourceReferenceDt();
1326                }
1327                return myLocation;
1328        }
1329
1330        /**
1331         * Sets the value(s) for <b>location</b> (where)
1332         *
1333     * <p>
1334     * <b>Definition:</b>
1335     * The location where the procedure actually happened.  E.g. a newborn at home, a tracheostomy at a restaurant
1336     * </p> 
1337         */
1338        public Procedure setLocation(ResourceReferenceDt theValue) {
1339                myLocation = theValue;
1340                return this;
1341        }
1342        
1343        
1344
1345  
1346        /**
1347         * Gets the value(s) for <b>outcome</b> ().
1348         * creating it if it does
1349         * not exist. Will not return <code>null</code>.
1350         *
1351     * <p>
1352     * <b>Definition:</b>
1353     * The outcome of the procedure - did it resolve reasons for the procedure being performed?
1354     * </p> 
1355         */
1356        public CodeableConceptDt getOutcome() {  
1357                if (myOutcome == null) {
1358                        myOutcome = new CodeableConceptDt();
1359                }
1360                return myOutcome;
1361        }
1362
1363        /**
1364         * Sets the value(s) for <b>outcome</b> ()
1365         *
1366     * <p>
1367     * <b>Definition:</b>
1368     * The outcome of the procedure - did it resolve reasons for the procedure being performed?
1369     * </p> 
1370         */
1371        public Procedure setOutcome(CodeableConceptDt theValue) {
1372                myOutcome = theValue;
1373                return this;
1374        }
1375        
1376        
1377
1378  
1379        /**
1380         * Gets the value(s) for <b>report</b> ().
1381         * creating it if it does
1382         * not exist. Will not return <code>null</code>.
1383         *
1384     * <p>
1385     * <b>Definition:</b>
1386     * This could be a histology result, pathology report, surgical report, etc..
1387     * </p> 
1388         */
1389        public java.util.List<ResourceReferenceDt> getReport() {  
1390                if (myReport == null) {
1391                        myReport = new java.util.ArrayList<ResourceReferenceDt>();
1392                }
1393                return myReport;
1394        }
1395
1396        /**
1397         * Sets the value(s) for <b>report</b> ()
1398         *
1399     * <p>
1400     * <b>Definition:</b>
1401     * This could be a histology result, pathology report, surgical report, etc..
1402     * </p> 
1403         */
1404        public Procedure setReport(java.util.List<ResourceReferenceDt> theValue) {
1405                myReport = theValue;
1406                return this;
1407        }
1408        
1409        
1410
1411        /**
1412         * Adds and returns a new value for <b>report</b> ()
1413         *
1414     * <p>
1415     * <b>Definition:</b>
1416     * This could be a histology result, pathology report, surgical report, etc..
1417     * </p> 
1418         */
1419        public ResourceReferenceDt addReport() {
1420                ResourceReferenceDt newType = new ResourceReferenceDt();
1421                getReport().add(newType);
1422                return newType; 
1423        }
1424  
1425        /**
1426         * Gets the value(s) for <b>complication</b> ().
1427         * creating it if it does
1428         * not exist. Will not return <code>null</code>.
1429         *
1430     * <p>
1431     * <b>Definition:</b>
1432     * Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues
1433     * </p> 
1434         */
1435        public java.util.List<CodeableConceptDt> getComplication() {  
1436                if (myComplication == null) {
1437                        myComplication = new java.util.ArrayList<CodeableConceptDt>();
1438                }
1439                return myComplication;
1440        }
1441
1442        /**
1443         * Sets the value(s) for <b>complication</b> ()
1444         *
1445     * <p>
1446     * <b>Definition:</b>
1447     * Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues
1448     * </p> 
1449         */
1450        public Procedure setComplication(java.util.List<CodeableConceptDt> theValue) {
1451                myComplication = theValue;
1452                return this;
1453        }
1454        
1455        
1456
1457        /**
1458         * Adds and returns a new value for <b>complication</b> ()
1459         *
1460     * <p>
1461     * <b>Definition:</b>
1462     * Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues
1463     * </p> 
1464         */
1465        public CodeableConceptDt addComplication() {
1466                CodeableConceptDt newType = new CodeableConceptDt();
1467                getComplication().add(newType);
1468                return newType; 
1469        }
1470
1471        /**
1472         * Adds a given new value for <b>complication</b> ()
1473         *
1474         * <p>
1475         * <b>Definition:</b>
1476         * Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues
1477         * </p>
1478         * @param theValue The complication to add (must not be <code>null</code>)
1479         */
1480        public Procedure addComplication(CodeableConceptDt theValue) {
1481                if (theValue == null) {
1482                        throw new NullPointerException("theValue must not be null");
1483                }
1484                getComplication().add(theValue);
1485                return this;
1486        }
1487
1488        /**
1489         * Gets the first repetition for <b>complication</b> (),
1490         * creating it if it does not already exist.
1491         *
1492     * <p>
1493     * <b>Definition:</b>
1494     * Any complications that occurred during the procedure, or in the immediate post-performance period. These are generally tracked separately from the notes, which will typically describe the procedure itself rather than any 'post procedure' issues
1495     * </p> 
1496         */
1497        public CodeableConceptDt getComplicationFirstRep() {
1498                if (getComplication().isEmpty()) {
1499                        return addComplication();
1500                }
1501                return getComplication().get(0); 
1502        }
1503  
1504        /**
1505         * Gets the value(s) for <b>followUp</b> ().
1506         * creating it if it does
1507         * not exist. Will not return <code>null</code>.
1508         *
1509     * <p>
1510     * <b>Definition:</b>
1511     * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used
1512     * </p> 
1513         */
1514        public java.util.List<CodeableConceptDt> getFollowUp() {  
1515                if (myFollowUp == null) {
1516                        myFollowUp = new java.util.ArrayList<CodeableConceptDt>();
1517                }
1518                return myFollowUp;
1519        }
1520
1521        /**
1522         * Sets the value(s) for <b>followUp</b> ()
1523         *
1524     * <p>
1525     * <b>Definition:</b>
1526     * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used
1527     * </p> 
1528         */
1529        public Procedure setFollowUp(java.util.List<CodeableConceptDt> theValue) {
1530                myFollowUp = theValue;
1531                return this;
1532        }
1533        
1534        
1535
1536        /**
1537         * Adds and returns a new value for <b>followUp</b> ()
1538         *
1539     * <p>
1540     * <b>Definition:</b>
1541     * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used
1542     * </p> 
1543         */
1544        public CodeableConceptDt addFollowUp() {
1545                CodeableConceptDt newType = new CodeableConceptDt();
1546                getFollowUp().add(newType);
1547                return newType; 
1548        }
1549
1550        /**
1551         * Adds a given new value for <b>followUp</b> ()
1552         *
1553         * <p>
1554         * <b>Definition:</b>
1555         * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used
1556         * </p>
1557         * @param theValue The followUp to add (must not be <code>null</code>)
1558         */
1559        public Procedure addFollowUp(CodeableConceptDt theValue) {
1560                if (theValue == null) {
1561                        throw new NullPointerException("theValue must not be null");
1562                }
1563                getFollowUp().add(theValue);
1564                return this;
1565        }
1566
1567        /**
1568         * Gets the first repetition for <b>followUp</b> (),
1569         * creating it if it does not already exist.
1570         *
1571     * <p>
1572     * <b>Definition:</b>
1573     * If the procedure required specific follow up - e.g. removal of sutures. The followup may be represented as a simple note, or could potentially be more complex in which case the CarePlan resource can be used
1574     * </p> 
1575         */
1576        public CodeableConceptDt getFollowUpFirstRep() {
1577                if (getFollowUp().isEmpty()) {
1578                        return addFollowUp();
1579                }
1580                return getFollowUp().get(0); 
1581        }
1582  
1583        /**
1584         * Gets the value(s) for <b>request</b> ().
1585         * creating it if it does
1586         * not exist. Will not return <code>null</code>.
1587         *
1588     * <p>
1589     * <b>Definition:</b>
1590     * A reference to a resource that contains details of the request for this procedure.
1591     * </p> 
1592         */
1593        public ResourceReferenceDt getRequest() {  
1594                if (myRequest == null) {
1595                        myRequest = new ResourceReferenceDt();
1596                }
1597                return myRequest;
1598        }
1599
1600        /**
1601         * Sets the value(s) for <b>request</b> ()
1602         *
1603     * <p>
1604     * <b>Definition:</b>
1605     * A reference to a resource that contains details of the request for this procedure.
1606     * </p> 
1607         */
1608        public Procedure setRequest(ResourceReferenceDt theValue) {
1609                myRequest = theValue;
1610                return this;
1611        }
1612        
1613        
1614
1615  
1616        /**
1617         * Gets the value(s) for <b>notes</b> ().
1618         * creating it if it does
1619         * not exist. Will not return <code>null</code>.
1620         *
1621     * <p>
1622     * <b>Definition:</b>
1623     * Any other notes about the procedure.  E.g. the operative notes
1624     * </p> 
1625         */
1626        public java.util.List<AnnotationDt> getNotes() {  
1627                if (myNotes == null) {
1628                        myNotes = new java.util.ArrayList<AnnotationDt>();
1629                }
1630                return myNotes;
1631        }
1632
1633        /**
1634         * Sets the value(s) for <b>notes</b> ()
1635         *
1636     * <p>
1637     * <b>Definition:</b>
1638     * Any other notes about the procedure.  E.g. the operative notes
1639     * </p> 
1640         */
1641        public Procedure setNotes(java.util.List<AnnotationDt> theValue) {
1642                myNotes = theValue;
1643                return this;
1644        }
1645        
1646        
1647
1648        /**
1649         * Adds and returns a new value for <b>notes</b> ()
1650         *
1651     * <p>
1652     * <b>Definition:</b>
1653     * Any other notes about the procedure.  E.g. the operative notes
1654     * </p> 
1655         */
1656        public AnnotationDt addNotes() {
1657                AnnotationDt newType = new AnnotationDt();
1658                getNotes().add(newType);
1659                return newType; 
1660        }
1661
1662        /**
1663         * Adds a given new value for <b>notes</b> ()
1664         *
1665         * <p>
1666         * <b>Definition:</b>
1667         * Any other notes about the procedure.  E.g. the operative notes
1668         * </p>
1669         * @param theValue The notes to add (must not be <code>null</code>)
1670         */
1671        public Procedure addNotes(AnnotationDt theValue) {
1672                if (theValue == null) {
1673                        throw new NullPointerException("theValue must not be null");
1674                }
1675                getNotes().add(theValue);
1676                return this;
1677        }
1678
1679        /**
1680         * Gets the first repetition for <b>notes</b> (),
1681         * creating it if it does not already exist.
1682         *
1683     * <p>
1684     * <b>Definition:</b>
1685     * Any other notes about the procedure.  E.g. the operative notes
1686     * </p> 
1687         */
1688        public AnnotationDt getNotesFirstRep() {
1689                if (getNotes().isEmpty()) {
1690                        return addNotes();
1691                }
1692                return getNotes().get(0); 
1693        }
1694  
1695        /**
1696         * Gets the value(s) for <b>focalDevice</b> ().
1697         * creating it if it does
1698         * not exist. Will not return <code>null</code>.
1699         *
1700     * <p>
1701     * <b>Definition:</b>
1702     * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.
1703     * </p> 
1704         */
1705        public java.util.List<FocalDevice> getFocalDevice() {  
1706                if (myFocalDevice == null) {
1707                        myFocalDevice = new java.util.ArrayList<FocalDevice>();
1708                }
1709                return myFocalDevice;
1710        }
1711
1712        /**
1713         * Sets the value(s) for <b>focalDevice</b> ()
1714         *
1715     * <p>
1716     * <b>Definition:</b>
1717     * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.
1718     * </p> 
1719         */
1720        public Procedure setFocalDevice(java.util.List<FocalDevice> theValue) {
1721                myFocalDevice = theValue;
1722                return this;
1723        }
1724        
1725        
1726
1727        /**
1728         * Adds and returns a new value for <b>focalDevice</b> ()
1729         *
1730     * <p>
1731     * <b>Definition:</b>
1732     * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.
1733     * </p> 
1734         */
1735        public FocalDevice addFocalDevice() {
1736                FocalDevice newType = new FocalDevice();
1737                getFocalDevice().add(newType);
1738                return newType; 
1739        }
1740
1741        /**
1742         * Adds a given new value for <b>focalDevice</b> ()
1743         *
1744         * <p>
1745         * <b>Definition:</b>
1746         * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.
1747         * </p>
1748         * @param theValue The focalDevice to add (must not be <code>null</code>)
1749         */
1750        public Procedure addFocalDevice(FocalDevice theValue) {
1751                if (theValue == null) {
1752                        throw new NullPointerException("theValue must not be null");
1753                }
1754                getFocalDevice().add(theValue);
1755                return this;
1756        }
1757
1758        /**
1759         * Gets the first repetition for <b>focalDevice</b> (),
1760         * creating it if it does not already exist.
1761         *
1762     * <p>
1763     * <b>Definition:</b>
1764     * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.
1765     * </p> 
1766         */
1767        public FocalDevice getFocalDeviceFirstRep() {
1768                if (getFocalDevice().isEmpty()) {
1769                        return addFocalDevice();
1770                }
1771                return getFocalDevice().get(0); 
1772        }
1773  
1774        /**
1775         * Gets the value(s) for <b>used</b> ().
1776         * creating it if it does
1777         * not exist. Will not return <code>null</code>.
1778         *
1779     * <p>
1780     * <b>Definition:</b>
1781     * Identifies medications, devices and any other substance used as part of the procedure
1782     * </p> 
1783         */
1784        public java.util.List<ResourceReferenceDt> getUsed() {  
1785                if (myUsed == null) {
1786                        myUsed = new java.util.ArrayList<ResourceReferenceDt>();
1787                }
1788                return myUsed;
1789        }
1790
1791        /**
1792         * Sets the value(s) for <b>used</b> ()
1793         *
1794     * <p>
1795     * <b>Definition:</b>
1796     * Identifies medications, devices and any other substance used as part of the procedure
1797     * </p> 
1798         */
1799        public Procedure setUsed(java.util.List<ResourceReferenceDt> theValue) {
1800                myUsed = theValue;
1801                return this;
1802        }
1803        
1804        
1805
1806        /**
1807         * Adds and returns a new value for <b>used</b> ()
1808         *
1809     * <p>
1810     * <b>Definition:</b>
1811     * Identifies medications, devices and any other substance used as part of the procedure
1812     * </p> 
1813         */
1814        public ResourceReferenceDt addUsed() {
1815                ResourceReferenceDt newType = new ResourceReferenceDt();
1816                getUsed().add(newType);
1817                return newType; 
1818        }
1819  
1820        /**
1821         * Block class for child element: <b>Procedure.performer</b> ()
1822         *
1823     * <p>
1824     * <b>Definition:</b>
1825     * Limited to 'real' people rather than equipment
1826     * </p> 
1827         */
1828        @Block()        
1829        public static class Performer 
1830            extends  BaseIdentifiableElement        implements IResourceBlock {
1831        
1832        @Child(name="actor", order=0, min=0, max=1, summary=true, modifier=false, type={
1833                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    })
1834        @Description(
1835                shortDefinition="who.actor",
1836                formalDefinition="The practitioner who was involved in the procedure"
1837        )
1838        private ResourceReferenceDt myActor;
1839        
1840        @Child(name="role", type=CodeableConceptDt.class, order=1, min=0, max=1, summary=true, modifier=false)  
1841        @Description(
1842                shortDefinition="",
1843                formalDefinition="For example: surgeon, anaethetist, endoscopist"
1844        )
1845        private CodeableConceptDt myRole;
1846        
1847
1848        @Override
1849        public boolean isEmpty() {
1850                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myActor,  myRole);
1851        }
1852        
1853        @Override
1854        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1855                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myActor, myRole);
1856        }
1857
1858        /**
1859         * Gets the value(s) for <b>actor</b> (who.actor).
1860         * creating it if it does
1861         * not exist. Will not return <code>null</code>.
1862         *
1863     * <p>
1864     * <b>Definition:</b>
1865     * The practitioner who was involved in the procedure
1866     * </p> 
1867         */
1868        public ResourceReferenceDt getActor() {  
1869                if (myActor == null) {
1870                        myActor = new ResourceReferenceDt();
1871                }
1872                return myActor;
1873        }
1874
1875        /**
1876         * Sets the value(s) for <b>actor</b> (who.actor)
1877         *
1878     * <p>
1879     * <b>Definition:</b>
1880     * The practitioner who was involved in the procedure
1881     * </p> 
1882         */
1883        public Performer setActor(ResourceReferenceDt theValue) {
1884                myActor = theValue;
1885                return this;
1886        }
1887        
1888        
1889
1890  
1891        /**
1892         * Gets the value(s) for <b>role</b> ().
1893         * creating it if it does
1894         * not exist. Will not return <code>null</code>.
1895         *
1896     * <p>
1897     * <b>Definition:</b>
1898     * For example: surgeon, anaethetist, endoscopist
1899     * </p> 
1900         */
1901        public CodeableConceptDt getRole() {  
1902                if (myRole == null) {
1903                        myRole = new CodeableConceptDt();
1904                }
1905                return myRole;
1906        }
1907
1908        /**
1909         * Sets the value(s) for <b>role</b> ()
1910         *
1911     * <p>
1912     * <b>Definition:</b>
1913     * For example: surgeon, anaethetist, endoscopist
1914     * </p> 
1915         */
1916        public Performer setRole(CodeableConceptDt theValue) {
1917                myRole = theValue;
1918                return this;
1919        }
1920        
1921        
1922
1923  
1924
1925
1926        }
1927
1928
1929        /**
1930         * Block class for child element: <b>Procedure.focalDevice</b> ()
1931         *
1932     * <p>
1933     * <b>Definition:</b>
1934     * A device that is implanted, removed or otherwise manipulated (calibration, battery replacement, fitting a prosthesis, attaching a wound-vac, etc.) as a focal portion of the Procedure.
1935     * </p> 
1936         */
1937        @Block()        
1938        public static class FocalDevice 
1939            extends  BaseIdentifiableElement        implements IResourceBlock {
1940        
1941        @Child(name="action", type=CodeableConceptDt.class, order=0, min=0, max=1, summary=false, modifier=false)       
1942        @Description(
1943                shortDefinition="",
1944                formalDefinition="The kind of change that happened to the device during the procedure"
1945        )
1946        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/valueset-device-action")
1947        private CodeableConceptDt myAction;
1948        
1949        @Child(name="manipulated", order=1, min=1, max=1, summary=false, modifier=false, type={
1950                ca.uhn.fhir.model.dstu2.resource.Device.class   })
1951        @Description(
1952                shortDefinition="",
1953                formalDefinition="The device that was manipulated (changed) during the procedure"
1954        )
1955        private ResourceReferenceDt myManipulated;
1956        
1957
1958        @Override
1959        public boolean isEmpty() {
1960                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myAction,  myManipulated);
1961        }
1962        
1963        @Override
1964        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1965                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myAction, myManipulated);
1966        }
1967
1968        /**
1969         * Gets the value(s) for <b>action</b> ().
1970         * creating it if it does
1971         * not exist. Will not return <code>null</code>.
1972         *
1973     * <p>
1974     * <b>Definition:</b>
1975     * The kind of change that happened to the device during the procedure
1976     * </p> 
1977         */
1978        public CodeableConceptDt getAction() {  
1979                if (myAction == null) {
1980                        myAction = new CodeableConceptDt();
1981                }
1982                return myAction;
1983        }
1984
1985        /**
1986         * Sets the value(s) for <b>action</b> ()
1987         *
1988     * <p>
1989     * <b>Definition:</b>
1990     * The kind of change that happened to the device during the procedure
1991     * </p> 
1992         */
1993        public FocalDevice setAction(CodeableConceptDt theValue) {
1994                myAction = theValue;
1995                return this;
1996        }
1997        
1998        
1999
2000  
2001        /**
2002         * Gets the value(s) for <b>manipulated</b> ().
2003         * creating it if it does
2004         * not exist. Will not return <code>null</code>.
2005         *
2006     * <p>
2007     * <b>Definition:</b>
2008     * The device that was manipulated (changed) during the procedure
2009     * </p> 
2010         */
2011        public ResourceReferenceDt getManipulated() {  
2012                if (myManipulated == null) {
2013                        myManipulated = new ResourceReferenceDt();
2014                }
2015                return myManipulated;
2016        }
2017
2018        /**
2019         * Sets the value(s) for <b>manipulated</b> ()
2020         *
2021     * <p>
2022     * <b>Definition:</b>
2023     * The device that was manipulated (changed) during the procedure
2024     * </p> 
2025         */
2026        public FocalDevice setManipulated(ResourceReferenceDt theValue) {
2027                myManipulated = theValue;
2028                return this;
2029        }
2030        
2031        
2032
2033  
2034
2035
2036        }
2037
2038
2039
2040
2041    @Override
2042    public String getResourceName() {
2043        return "Procedure";
2044    }
2045    
2046    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2047        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2048    }
2049
2050
2051}