001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037import org.hl7.fhir.exceptions.FHIRException;
038import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
039import org.hl7.fhir.r4.model.Enumerations.PublicationStatus;
040import org.hl7.fhir.r4.model.Enumerations.PublicationStatusEnumFactory;
041import org.hl7.fhir.utilities.Utilities;
042
043import ca.uhn.fhir.model.api.annotation.Block;
044import ca.uhn.fhir.model.api.annotation.Child;
045import ca.uhn.fhir.model.api.annotation.ChildOrder;
046import ca.uhn.fhir.model.api.annotation.Description;
047import ca.uhn.fhir.model.api.annotation.ResourceDef;
048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
049
050/**
051 * This resource allows for the definition of some activity to be performed,
052 * independent of a particular patient, practitioner, or other performance
053 * context.
054 */
055@ResourceDef(name = "ActivityDefinition", profile = "http://hl7.org/fhir/StructureDefinition/ActivityDefinition")
056@ChildOrder(names = { "url", "identifier", "version", "name", "title", "subtitle", "status", "experimental",
057    "subject[x]", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "usage",
058    "copyright", "approvalDate", "lastReviewDate", "effectivePeriod", "topic", "author", "editor", "reviewer",
059    "endorser", "relatedArtifact", "library", "kind", "profile", "code", "intent", "priority", "doNotPerform",
060    "timing[x]", "location", "participant", "product[x]", "quantity", "dosage", "bodySite", "specimenRequirement",
061    "observationRequirement", "observationResultRequirement", "transform", "dynamicValue" })
062public class ActivityDefinition extends MetadataResource {
063
064  public enum ActivityDefinitionKind {
065    /**
066     * A booking of a healthcare event among patient(s), practitioner(s), related
067     * person(s) and/or device(s) for a specific date/time. This may result in one
068     * or more Encounter(s).
069     */
070    APPOINTMENT,
071    /**
072     * A reply to an appointment request for a patient and/or practitioner(s), such
073     * as a confirmation or rejection.
074     */
075    APPOINTMENTRESPONSE,
076    /**
077     * Healthcare plan for patient or group.
078     */
079    CAREPLAN,
080    /**
081     * Claim, Pre-determination or Pre-authorization.
082     */
083    CLAIM,
084    /**
085     * A request for information to be sent to a receiver.
086     */
087    COMMUNICATIONREQUEST,
088    /**
089     * Legal Agreement.
090     */
091    CONTRACT,
092    /**
093     * Medical device request.
094     */
095    DEVICEREQUEST,
096    /**
097     * Enrollment request.
098     */
099    ENROLLMENTREQUEST,
100    /**
101     * Guidance or advice relating to an immunization.
102     */
103    IMMUNIZATIONRECOMMENDATION,
104    /**
105     * Ordering of medication for patient or group.
106     */
107    MEDICATIONREQUEST,
108    /**
109     * Diet, formula or nutritional supplement request.
110     */
111    NUTRITIONORDER,
112    /**
113     * A record of a request for service such as diagnostic investigations,
114     * treatments, or operations to be performed.
115     */
116    SERVICEREQUEST,
117    /**
118     * Request for a medication, substance or device.
119     */
120    SUPPLYREQUEST,
121    /**
122     * A task to be performed.
123     */
124    TASK,
125    /**
126     * Prescription for vision correction products for a patient.
127     */
128    VISIONPRESCRIPTION,
129    /**
130     * added to help the parsers with the generic types
131     */
132    NULL;
133
134    public static ActivityDefinitionKind fromCode(String codeString) throws FHIRException {
135      if (codeString == null || "".equals(codeString))
136        return null;
137      if ("Appointment".equals(codeString))
138        return APPOINTMENT;
139      if ("AppointmentResponse".equals(codeString))
140        return APPOINTMENTRESPONSE;
141      if ("CarePlan".equals(codeString))
142        return CAREPLAN;
143      if ("Claim".equals(codeString))
144        return CLAIM;
145      if ("CommunicationRequest".equals(codeString))
146        return COMMUNICATIONREQUEST;
147      if ("Contract".equals(codeString))
148        return CONTRACT;
149      if ("DeviceRequest".equals(codeString))
150        return DEVICEREQUEST;
151      if ("EnrollmentRequest".equals(codeString))
152        return ENROLLMENTREQUEST;
153      if ("ImmunizationRecommendation".equals(codeString))
154        return IMMUNIZATIONRECOMMENDATION;
155      if ("MedicationRequest".equals(codeString))
156        return MEDICATIONREQUEST;
157      if ("NutritionOrder".equals(codeString))
158        return NUTRITIONORDER;
159      if ("ServiceRequest".equals(codeString))
160        return SERVICEREQUEST;
161      if ("SupplyRequest".equals(codeString))
162        return SUPPLYREQUEST;
163      if ("Task".equals(codeString))
164        return TASK;
165      if ("VisionPrescription".equals(codeString))
166        return VISIONPRESCRIPTION;
167      if (Configuration.isAcceptInvalidEnums())
168        return null;
169      else
170        throw new FHIRException("Unknown ActivityDefinitionKind code '" + codeString + "'");
171    }
172
173    public String toCode() {
174      switch (this) {
175      case APPOINTMENT:
176        return "Appointment";
177      case APPOINTMENTRESPONSE:
178        return "AppointmentResponse";
179      case CAREPLAN:
180        return "CarePlan";
181      case CLAIM:
182        return "Claim";
183      case COMMUNICATIONREQUEST:
184        return "CommunicationRequest";
185      case CONTRACT:
186        return "Contract";
187      case DEVICEREQUEST:
188        return "DeviceRequest";
189      case ENROLLMENTREQUEST:
190        return "EnrollmentRequest";
191      case IMMUNIZATIONRECOMMENDATION:
192        return "ImmunizationRecommendation";
193      case MEDICATIONREQUEST:
194        return "MedicationRequest";
195      case NUTRITIONORDER:
196        return "NutritionOrder";
197      case SERVICEREQUEST:
198        return "ServiceRequest";
199      case SUPPLYREQUEST:
200        return "SupplyRequest";
201      case TASK:
202        return "Task";
203      case VISIONPRESCRIPTION:
204        return "VisionPrescription";
205      case NULL:
206        return null;
207      default:
208        return "?";
209      }
210    }
211
212    public String getSystem() {
213      switch (this) {
214      case APPOINTMENT:
215        return "http://hl7.org/fhir/request-resource-types";
216      case APPOINTMENTRESPONSE:
217        return "http://hl7.org/fhir/request-resource-types";
218      case CAREPLAN:
219        return "http://hl7.org/fhir/request-resource-types";
220      case CLAIM:
221        return "http://hl7.org/fhir/request-resource-types";
222      case COMMUNICATIONREQUEST:
223        return "http://hl7.org/fhir/request-resource-types";
224      case CONTRACT:
225        return "http://hl7.org/fhir/request-resource-types";
226      case DEVICEREQUEST:
227        return "http://hl7.org/fhir/request-resource-types";
228      case ENROLLMENTREQUEST:
229        return "http://hl7.org/fhir/request-resource-types";
230      case IMMUNIZATIONRECOMMENDATION:
231        return "http://hl7.org/fhir/request-resource-types";
232      case MEDICATIONREQUEST:
233        return "http://hl7.org/fhir/request-resource-types";
234      case NUTRITIONORDER:
235        return "http://hl7.org/fhir/request-resource-types";
236      case SERVICEREQUEST:
237        return "http://hl7.org/fhir/request-resource-types";
238      case SUPPLYREQUEST:
239        return "http://hl7.org/fhir/request-resource-types";
240      case TASK:
241        return "http://hl7.org/fhir/request-resource-types";
242      case VISIONPRESCRIPTION:
243        return "http://hl7.org/fhir/request-resource-types";
244      case NULL:
245        return null;
246      default:
247        return "?";
248      }
249    }
250
251    public String getDefinition() {
252      switch (this) {
253      case APPOINTMENT:
254        return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s).";
255      case APPOINTMENTRESPONSE:
256        return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
257      case CAREPLAN:
258        return "Healthcare plan for patient or group.";
259      case CLAIM:
260        return "Claim, Pre-determination or Pre-authorization.";
261      case COMMUNICATIONREQUEST:
262        return "A request for information to be sent to a receiver.";
263      case CONTRACT:
264        return "Legal Agreement.";
265      case DEVICEREQUEST:
266        return "Medical device request.";
267      case ENROLLMENTREQUEST:
268        return "Enrollment request.";
269      case IMMUNIZATIONRECOMMENDATION:
270        return "Guidance or advice relating to an immunization.";
271      case MEDICATIONREQUEST:
272        return "Ordering of medication for patient or group.";
273      case NUTRITIONORDER:
274        return "Diet, formula or nutritional supplement request.";
275      case SERVICEREQUEST:
276        return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
277      case SUPPLYREQUEST:
278        return "Request for a medication, substance or device.";
279      case TASK:
280        return "A task to be performed.";
281      case VISIONPRESCRIPTION:
282        return "Prescription for vision correction products for a patient.";
283      case NULL:
284        return null;
285      default:
286        return "?";
287      }
288    }
289
290    public String getDisplay() {
291      switch (this) {
292      case APPOINTMENT:
293        return "Appointment";
294      case APPOINTMENTRESPONSE:
295        return "AppointmentResponse";
296      case CAREPLAN:
297        return "CarePlan";
298      case CLAIM:
299        return "Claim";
300      case COMMUNICATIONREQUEST:
301        return "CommunicationRequest";
302      case CONTRACT:
303        return "Contract";
304      case DEVICEREQUEST:
305        return "DeviceRequest";
306      case ENROLLMENTREQUEST:
307        return "EnrollmentRequest";
308      case IMMUNIZATIONRECOMMENDATION:
309        return "ImmunizationRecommendation";
310      case MEDICATIONREQUEST:
311        return "MedicationRequest";
312      case NUTRITIONORDER:
313        return "NutritionOrder";
314      case SERVICEREQUEST:
315        return "ServiceRequest";
316      case SUPPLYREQUEST:
317        return "SupplyRequest";
318      case TASK:
319        return "Task";
320      case VISIONPRESCRIPTION:
321        return "VisionPrescription";
322      case NULL:
323        return null;
324      default:
325        return "?";
326      }
327    }
328  }
329
330  public static class ActivityDefinitionKindEnumFactory implements EnumFactory<ActivityDefinitionKind> {
331    public ActivityDefinitionKind fromCode(String codeString) throws IllegalArgumentException {
332      if (codeString == null || "".equals(codeString))
333        if (codeString == null || "".equals(codeString))
334          return null;
335      if ("Appointment".equals(codeString))
336        return ActivityDefinitionKind.APPOINTMENT;
337      if ("AppointmentResponse".equals(codeString))
338        return ActivityDefinitionKind.APPOINTMENTRESPONSE;
339      if ("CarePlan".equals(codeString))
340        return ActivityDefinitionKind.CAREPLAN;
341      if ("Claim".equals(codeString))
342        return ActivityDefinitionKind.CLAIM;
343      if ("CommunicationRequest".equals(codeString))
344        return ActivityDefinitionKind.COMMUNICATIONREQUEST;
345      if ("Contract".equals(codeString))
346        return ActivityDefinitionKind.CONTRACT;
347      if ("DeviceRequest".equals(codeString))
348        return ActivityDefinitionKind.DEVICEREQUEST;
349      if ("EnrollmentRequest".equals(codeString))
350        return ActivityDefinitionKind.ENROLLMENTREQUEST;
351      if ("ImmunizationRecommendation".equals(codeString))
352        return ActivityDefinitionKind.IMMUNIZATIONRECOMMENDATION;
353      if ("MedicationRequest".equals(codeString))
354        return ActivityDefinitionKind.MEDICATIONREQUEST;
355      if ("NutritionOrder".equals(codeString))
356        return ActivityDefinitionKind.NUTRITIONORDER;
357      if ("ServiceRequest".equals(codeString))
358        return ActivityDefinitionKind.SERVICEREQUEST;
359      if ("SupplyRequest".equals(codeString))
360        return ActivityDefinitionKind.SUPPLYREQUEST;
361      if ("Task".equals(codeString))
362        return ActivityDefinitionKind.TASK;
363      if ("VisionPrescription".equals(codeString))
364        return ActivityDefinitionKind.VISIONPRESCRIPTION;
365      throw new IllegalArgumentException("Unknown ActivityDefinitionKind code '" + codeString + "'");
366    }
367
368    public Enumeration<ActivityDefinitionKind> fromType(PrimitiveType<?> code) throws FHIRException {
369      if (code == null)
370        return null;
371      if (code.isEmpty())
372        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.NULL, code);
373      String codeString = code.asStringValue();
374      if (codeString == null || "".equals(codeString))
375        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.NULL, code);
376      if ("Appointment".equals(codeString))
377        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.APPOINTMENT, code);
378      if ("AppointmentResponse".equals(codeString))
379        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.APPOINTMENTRESPONSE, code);
380      if ("CarePlan".equals(codeString))
381        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CAREPLAN, code);
382      if ("Claim".equals(codeString))
383        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CLAIM, code);
384      if ("CommunicationRequest".equals(codeString))
385        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.COMMUNICATIONREQUEST, code);
386      if ("Contract".equals(codeString))
387        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CONTRACT, code);
388      if ("DeviceRequest".equals(codeString))
389        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DEVICEREQUEST, code);
390      if ("EnrollmentRequest".equals(codeString))
391        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ENROLLMENTREQUEST, code);
392      if ("ImmunizationRecommendation".equals(codeString))
393        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.IMMUNIZATIONRECOMMENDATION, code);
394      if ("MedicationRequest".equals(codeString))
395        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDICATIONREQUEST, code);
396      if ("NutritionOrder".equals(codeString))
397        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.NUTRITIONORDER, code);
398      if ("ServiceRequest".equals(codeString))
399        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SERVICEREQUEST, code);
400      if ("SupplyRequest".equals(codeString))
401        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SUPPLYREQUEST, code);
402      if ("Task".equals(codeString))
403        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.TASK, code);
404      if ("VisionPrescription".equals(codeString))
405        return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.VISIONPRESCRIPTION, code);
406      throw new FHIRException("Unknown ActivityDefinitionKind code '" + codeString + "'");
407    }
408
409    public String toCode(ActivityDefinitionKind code) {
410      if (code == ActivityDefinitionKind.APPOINTMENT)
411        return "Appointment";
412      if (code == ActivityDefinitionKind.APPOINTMENTRESPONSE)
413        return "AppointmentResponse";
414      if (code == ActivityDefinitionKind.CAREPLAN)
415        return "CarePlan";
416      if (code == ActivityDefinitionKind.CLAIM)
417        return "Claim";
418      if (code == ActivityDefinitionKind.COMMUNICATIONREQUEST)
419        return "CommunicationRequest";
420      if (code == ActivityDefinitionKind.CONTRACT)
421        return "Contract";
422      if (code == ActivityDefinitionKind.DEVICEREQUEST)
423        return "DeviceRequest";
424      if (code == ActivityDefinitionKind.ENROLLMENTREQUEST)
425        return "EnrollmentRequest";
426      if (code == ActivityDefinitionKind.IMMUNIZATIONRECOMMENDATION)
427        return "ImmunizationRecommendation";
428      if (code == ActivityDefinitionKind.MEDICATIONREQUEST)
429        return "MedicationRequest";
430      if (code == ActivityDefinitionKind.NUTRITIONORDER)
431        return "NutritionOrder";
432      if (code == ActivityDefinitionKind.SERVICEREQUEST)
433        return "ServiceRequest";
434      if (code == ActivityDefinitionKind.SUPPLYREQUEST)
435        return "SupplyRequest";
436      if (code == ActivityDefinitionKind.TASK)
437        return "Task";
438      if (code == ActivityDefinitionKind.VISIONPRESCRIPTION)
439        return "VisionPrescription";
440      return "?";
441    }
442
443    public String toSystem(ActivityDefinitionKind code) {
444      return code.getSystem();
445    }
446  }
447
448  public enum RequestIntent {
449    /**
450     * The request is a suggestion made by someone/something that does not have an
451     * intention to ensure it occurs and without providing an authorization to act.
452     */
453    PROPOSAL,
454    /**
455     * The request represents an intention to ensure something occurs without
456     * providing an authorization for others to act.
457     */
458    PLAN,
459    /**
460     * The request represents a legally binding instruction authored by a Patient or
461     * RelatedPerson.
462     */
463    DIRECTIVE,
464    /**
465     * The request represents a request/demand and authorization for action by a
466     * Practitioner.
467     */
468    ORDER,
469    /**
470     * The request represents an original authorization for action.
471     */
472    ORIGINALORDER,
473    /**
474     * The request represents an automatically generated supplemental authorization
475     * for action based on a parent authorization together with initial results of
476     * the action taken against that parent authorization.
477     */
478    REFLEXORDER,
479    /**
480     * The request represents the view of an authorization instantiated by a
481     * fulfilling system representing the details of the fulfiller's intention to
482     * act upon a submitted order.
483     */
484    FILLERORDER,
485    /**
486     * An order created in fulfillment of a broader order that represents the
487     * authorization for a single activity occurrence. E.g. The administration of a
488     * single dose of a drug.
489     */
490    INSTANCEORDER,
491    /**
492     * The request represents a component or option for a RequestGroup that
493     * establishes timing, conditionality and/or other constraints among a set of
494     * requests. Refer to [[[RequestGroup]]] for additional information on how this
495     * status is used.
496     */
497    OPTION,
498    /**
499     * added to help the parsers with the generic types
500     */
501    NULL;
502
503    public static RequestIntent fromCode(String codeString) throws FHIRException {
504      if (codeString == null || "".equals(codeString))
505        return null;
506      if ("proposal".equals(codeString))
507        return PROPOSAL;
508      if ("plan".equals(codeString))
509        return PLAN;
510      if ("directive".equals(codeString))
511        return DIRECTIVE;
512      if ("order".equals(codeString))
513        return ORDER;
514      if ("original-order".equals(codeString))
515        return ORIGINALORDER;
516      if ("reflex-order".equals(codeString))
517        return REFLEXORDER;
518      if ("filler-order".equals(codeString))
519        return FILLERORDER;
520      if ("instance-order".equals(codeString))
521        return INSTANCEORDER;
522      if ("option".equals(codeString))
523        return OPTION;
524      if (Configuration.isAcceptInvalidEnums())
525        return null;
526      else
527        throw new FHIRException("Unknown RequestIntent code '" + codeString + "'");
528    }
529
530    public String toCode() {
531      switch (this) {
532      case PROPOSAL:
533        return "proposal";
534      case PLAN:
535        return "plan";
536      case DIRECTIVE:
537        return "directive";
538      case ORDER:
539        return "order";
540      case ORIGINALORDER:
541        return "original-order";
542      case REFLEXORDER:
543        return "reflex-order";
544      case FILLERORDER:
545        return "filler-order";
546      case INSTANCEORDER:
547        return "instance-order";
548      case OPTION:
549        return "option";
550      case NULL:
551        return null;
552      default:
553        return "?";
554      }
555    }
556
557    public String getSystem() {
558      switch (this) {
559      case PROPOSAL:
560        return "http://hl7.org/fhir/request-intent";
561      case PLAN:
562        return "http://hl7.org/fhir/request-intent";
563      case DIRECTIVE:
564        return "http://hl7.org/fhir/request-intent";
565      case ORDER:
566        return "http://hl7.org/fhir/request-intent";
567      case ORIGINALORDER:
568        return "http://hl7.org/fhir/request-intent";
569      case REFLEXORDER:
570        return "http://hl7.org/fhir/request-intent";
571      case FILLERORDER:
572        return "http://hl7.org/fhir/request-intent";
573      case INSTANCEORDER:
574        return "http://hl7.org/fhir/request-intent";
575      case OPTION:
576        return "http://hl7.org/fhir/request-intent";
577      case NULL:
578        return null;
579      default:
580        return "?";
581      }
582    }
583
584    public String getDefinition() {
585      switch (this) {
586      case PROPOSAL:
587        return "The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act.";
588      case PLAN:
589        return "The request represents an intention to ensure something occurs without providing an authorization for others to act.";
590      case DIRECTIVE:
591        return "The request represents a legally binding instruction authored by a Patient or RelatedPerson.";
592      case ORDER:
593        return "The request represents a request/demand and authorization for action by a Practitioner.";
594      case ORIGINALORDER:
595        return "The request represents an original authorization for action.";
596      case REFLEXORDER:
597        return "The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.";
598      case FILLERORDER:
599        return "The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order.";
600      case INSTANCEORDER:
601        return "An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug.";
602      case OPTION:
603        return "The request represents a component or option for a RequestGroup that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestGroup]]] for additional information on how this status is used.";
604      case NULL:
605        return null;
606      default:
607        return "?";
608      }
609    }
610
611    public String getDisplay() {
612      switch (this) {
613      case PROPOSAL:
614        return "Proposal";
615      case PLAN:
616        return "Plan";
617      case DIRECTIVE:
618        return "Directive";
619      case ORDER:
620        return "Order";
621      case ORIGINALORDER:
622        return "Original Order";
623      case REFLEXORDER:
624        return "Reflex Order";
625      case FILLERORDER:
626        return "Filler Order";
627      case INSTANCEORDER:
628        return "Instance Order";
629      case OPTION:
630        return "Option";
631      case NULL:
632        return null;
633      default:
634        return "?";
635      }
636    }
637  }
638
639  public static class RequestIntentEnumFactory implements EnumFactory<RequestIntent> {
640    public RequestIntent fromCode(String codeString) throws IllegalArgumentException {
641      if (codeString == null || "".equals(codeString))
642        if (codeString == null || "".equals(codeString))
643          return null;
644      if ("proposal".equals(codeString))
645        return RequestIntent.PROPOSAL;
646      if ("plan".equals(codeString))
647        return RequestIntent.PLAN;
648      if ("directive".equals(codeString))
649        return RequestIntent.DIRECTIVE;
650      if ("order".equals(codeString))
651        return RequestIntent.ORDER;
652      if ("original-order".equals(codeString))
653        return RequestIntent.ORIGINALORDER;
654      if ("reflex-order".equals(codeString))
655        return RequestIntent.REFLEXORDER;
656      if ("filler-order".equals(codeString))
657        return RequestIntent.FILLERORDER;
658      if ("instance-order".equals(codeString))
659        return RequestIntent.INSTANCEORDER;
660      if ("option".equals(codeString))
661        return RequestIntent.OPTION;
662      throw new IllegalArgumentException("Unknown RequestIntent code '" + codeString + "'");
663    }
664
665    public Enumeration<RequestIntent> fromType(PrimitiveType<?> code) throws FHIRException {
666      if (code == null)
667        return null;
668      if (code.isEmpty())
669        return new Enumeration<RequestIntent>(this, RequestIntent.NULL, code);
670      String codeString = code.asStringValue();
671      if (codeString == null || "".equals(codeString))
672        return new Enumeration<RequestIntent>(this, RequestIntent.NULL, code);
673      if ("proposal".equals(codeString))
674        return new Enumeration<RequestIntent>(this, RequestIntent.PROPOSAL, code);
675      if ("plan".equals(codeString))
676        return new Enumeration<RequestIntent>(this, RequestIntent.PLAN, code);
677      if ("directive".equals(codeString))
678        return new Enumeration<RequestIntent>(this, RequestIntent.DIRECTIVE, code);
679      if ("order".equals(codeString))
680        return new Enumeration<RequestIntent>(this, RequestIntent.ORDER, code);
681      if ("original-order".equals(codeString))
682        return new Enumeration<RequestIntent>(this, RequestIntent.ORIGINALORDER, code);
683      if ("reflex-order".equals(codeString))
684        return new Enumeration<RequestIntent>(this, RequestIntent.REFLEXORDER, code);
685      if ("filler-order".equals(codeString))
686        return new Enumeration<RequestIntent>(this, RequestIntent.FILLERORDER, code);
687      if ("instance-order".equals(codeString))
688        return new Enumeration<RequestIntent>(this, RequestIntent.INSTANCEORDER, code);
689      if ("option".equals(codeString))
690        return new Enumeration<RequestIntent>(this, RequestIntent.OPTION, code);
691      throw new FHIRException("Unknown RequestIntent code '" + codeString + "'");
692    }
693
694    public String toCode(RequestIntent code) {
695      if (code == RequestIntent.PROPOSAL)
696        return "proposal";
697      if (code == RequestIntent.PLAN)
698        return "plan";
699      if (code == RequestIntent.DIRECTIVE)
700        return "directive";
701      if (code == RequestIntent.ORDER)
702        return "order";
703      if (code == RequestIntent.ORIGINALORDER)
704        return "original-order";
705      if (code == RequestIntent.REFLEXORDER)
706        return "reflex-order";
707      if (code == RequestIntent.FILLERORDER)
708        return "filler-order";
709      if (code == RequestIntent.INSTANCEORDER)
710        return "instance-order";
711      if (code == RequestIntent.OPTION)
712        return "option";
713      return "?";
714    }
715
716    public String toSystem(RequestIntent code) {
717      return code.getSystem();
718    }
719  }
720
721  public enum RequestPriority {
722    /**
723     * The request has normal priority.
724     */
725    ROUTINE,
726    /**
727     * The request should be actioned promptly - higher priority than routine.
728     */
729    URGENT,
730    /**
731     * The request should be actioned as soon as possible - higher priority than
732     * urgent.
733     */
734    ASAP,
735    /**
736     * The request should be actioned immediately - highest possible priority. E.g.
737     * an emergency.
738     */
739    STAT,
740    /**
741     * added to help the parsers with the generic types
742     */
743    NULL;
744
745    public static RequestPriority fromCode(String codeString) throws FHIRException {
746      if (codeString == null || "".equals(codeString))
747        return null;
748      if ("routine".equals(codeString))
749        return ROUTINE;
750      if ("urgent".equals(codeString))
751        return URGENT;
752      if ("asap".equals(codeString))
753        return ASAP;
754      if ("stat".equals(codeString))
755        return STAT;
756      if (Configuration.isAcceptInvalidEnums())
757        return null;
758      else
759        throw new FHIRException("Unknown RequestPriority code '" + codeString + "'");
760    }
761
762    public String toCode() {
763      switch (this) {
764      case ROUTINE:
765        return "routine";
766      case URGENT:
767        return "urgent";
768      case ASAP:
769        return "asap";
770      case STAT:
771        return "stat";
772      case NULL:
773        return null;
774      default:
775        return "?";
776      }
777    }
778
779    public String getSystem() {
780      switch (this) {
781      case ROUTINE:
782        return "http://hl7.org/fhir/request-priority";
783      case URGENT:
784        return "http://hl7.org/fhir/request-priority";
785      case ASAP:
786        return "http://hl7.org/fhir/request-priority";
787      case STAT:
788        return "http://hl7.org/fhir/request-priority";
789      case NULL:
790        return null;
791      default:
792        return "?";
793      }
794    }
795
796    public String getDefinition() {
797      switch (this) {
798      case ROUTINE:
799        return "The request has normal priority.";
800      case URGENT:
801        return "The request should be actioned promptly - higher priority than routine.";
802      case ASAP:
803        return "The request should be actioned as soon as possible - higher priority than urgent.";
804      case STAT:
805        return "The request should be actioned immediately - highest possible priority.  E.g. an emergency.";
806      case NULL:
807        return null;
808      default:
809        return "?";
810      }
811    }
812
813    public String getDisplay() {
814      switch (this) {
815      case ROUTINE:
816        return "Routine";
817      case URGENT:
818        return "Urgent";
819      case ASAP:
820        return "ASAP";
821      case STAT:
822        return "STAT";
823      case NULL:
824        return null;
825      default:
826        return "?";
827      }
828    }
829  }
830
831  public static class RequestPriorityEnumFactory implements EnumFactory<RequestPriority> {
832    public RequestPriority fromCode(String codeString) throws IllegalArgumentException {
833      if (codeString == null || "".equals(codeString))
834        if (codeString == null || "".equals(codeString))
835          return null;
836      if ("routine".equals(codeString))
837        return RequestPriority.ROUTINE;
838      if ("urgent".equals(codeString))
839        return RequestPriority.URGENT;
840      if ("asap".equals(codeString))
841        return RequestPriority.ASAP;
842      if ("stat".equals(codeString))
843        return RequestPriority.STAT;
844      throw new IllegalArgumentException("Unknown RequestPriority code '" + codeString + "'");
845    }
846
847    public Enumeration<RequestPriority> fromType(PrimitiveType<?> code) throws FHIRException {
848      if (code == null)
849        return null;
850      if (code.isEmpty())
851        return new Enumeration<RequestPriority>(this, RequestPriority.NULL, code);
852      String codeString = code.asStringValue();
853      if (codeString == null || "".equals(codeString))
854        return new Enumeration<RequestPriority>(this, RequestPriority.NULL, code);
855      if ("routine".equals(codeString))
856        return new Enumeration<RequestPriority>(this, RequestPriority.ROUTINE, code);
857      if ("urgent".equals(codeString))
858        return new Enumeration<RequestPriority>(this, RequestPriority.URGENT, code);
859      if ("asap".equals(codeString))
860        return new Enumeration<RequestPriority>(this, RequestPriority.ASAP, code);
861      if ("stat".equals(codeString))
862        return new Enumeration<RequestPriority>(this, RequestPriority.STAT, code);
863      throw new FHIRException("Unknown RequestPriority code '" + codeString + "'");
864    }
865
866    public String toCode(RequestPriority code) {
867      if (code == RequestPriority.ROUTINE)
868        return "routine";
869      if (code == RequestPriority.URGENT)
870        return "urgent";
871      if (code == RequestPriority.ASAP)
872        return "asap";
873      if (code == RequestPriority.STAT)
874        return "stat";
875      return "?";
876    }
877
878    public String toSystem(RequestPriority code) {
879      return code.getSystem();
880    }
881  }
882
883  public enum ActivityParticipantType {
884    /**
885     * The participant is the patient under evaluation.
886     */
887    PATIENT,
888    /**
889     * The participant is a practitioner involved in the patient's care.
890     */
891    PRACTITIONER,
892    /**
893     * The participant is a person related to the patient.
894     */
895    RELATEDPERSON,
896    /**
897     * The participant is a system or device used in the care of the patient.
898     */
899    DEVICE,
900    /**
901     * added to help the parsers with the generic types
902     */
903    NULL;
904
905    public static ActivityParticipantType fromCode(String codeString) throws FHIRException {
906      if (codeString == null || "".equals(codeString))
907        return null;
908      if ("patient".equals(codeString))
909        return PATIENT;
910      if ("practitioner".equals(codeString))
911        return PRACTITIONER;
912      if ("related-person".equals(codeString))
913        return RELATEDPERSON;
914      if ("device".equals(codeString))
915        return DEVICE;
916      if (Configuration.isAcceptInvalidEnums())
917        return null;
918      else
919        throw new FHIRException("Unknown ActivityParticipantType code '" + codeString + "'");
920    }
921
922    public String toCode() {
923      switch (this) {
924      case PATIENT:
925        return "patient";
926      case PRACTITIONER:
927        return "practitioner";
928      case RELATEDPERSON:
929        return "related-person";
930      case DEVICE:
931        return "device";
932      case NULL:
933        return null;
934      default:
935        return "?";
936      }
937    }
938
939    public String getSystem() {
940      switch (this) {
941      case PATIENT:
942        return "http://hl7.org/fhir/action-participant-type";
943      case PRACTITIONER:
944        return "http://hl7.org/fhir/action-participant-type";
945      case RELATEDPERSON:
946        return "http://hl7.org/fhir/action-participant-type";
947      case DEVICE:
948        return "http://hl7.org/fhir/action-participant-type";
949      case NULL:
950        return null;
951      default:
952        return "?";
953      }
954    }
955
956    public String getDefinition() {
957      switch (this) {
958      case PATIENT:
959        return "The participant is the patient under evaluation.";
960      case PRACTITIONER:
961        return "The participant is a practitioner involved in the patient's care.";
962      case RELATEDPERSON:
963        return "The participant is a person related to the patient.";
964      case DEVICE:
965        return "The participant is a system or device used in the care of the patient.";
966      case NULL:
967        return null;
968      default:
969        return "?";
970      }
971    }
972
973    public String getDisplay() {
974      switch (this) {
975      case PATIENT:
976        return "Patient";
977      case PRACTITIONER:
978        return "Practitioner";
979      case RELATEDPERSON:
980        return "Related Person";
981      case DEVICE:
982        return "Device";
983      case NULL:
984        return null;
985      default:
986        return "?";
987      }
988    }
989  }
990
991  public static class ActivityParticipantTypeEnumFactory implements EnumFactory<ActivityParticipantType> {
992    public ActivityParticipantType fromCode(String codeString) throws IllegalArgumentException {
993      if (codeString == null || "".equals(codeString))
994        if (codeString == null || "".equals(codeString))
995          return null;
996      if ("patient".equals(codeString))
997        return ActivityParticipantType.PATIENT;
998      if ("practitioner".equals(codeString))
999        return ActivityParticipantType.PRACTITIONER;
1000      if ("related-person".equals(codeString))
1001        return ActivityParticipantType.RELATEDPERSON;
1002      if ("device".equals(codeString))
1003        return ActivityParticipantType.DEVICE;
1004      throw new IllegalArgumentException("Unknown ActivityParticipantType code '" + codeString + "'");
1005    }
1006
1007    public Enumeration<ActivityParticipantType> fromType(PrimitiveType<?> code) throws FHIRException {
1008      if (code == null)
1009        return null;
1010      if (code.isEmpty())
1011        return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.NULL, code);
1012      String codeString = code.asStringValue();
1013      if (codeString == null || "".equals(codeString))
1014        return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.NULL, code);
1015      if ("patient".equals(codeString))
1016        return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.PATIENT, code);
1017      if ("practitioner".equals(codeString))
1018        return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.PRACTITIONER, code);
1019      if ("related-person".equals(codeString))
1020        return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.RELATEDPERSON, code);
1021      if ("device".equals(codeString))
1022        return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.DEVICE, code);
1023      throw new FHIRException("Unknown ActivityParticipantType code '" + codeString + "'");
1024    }
1025
1026    public String toCode(ActivityParticipantType code) {
1027      if (code == ActivityParticipantType.PATIENT)
1028        return "patient";
1029      if (code == ActivityParticipantType.PRACTITIONER)
1030        return "practitioner";
1031      if (code == ActivityParticipantType.RELATEDPERSON)
1032        return "related-person";
1033      if (code == ActivityParticipantType.DEVICE)
1034        return "device";
1035      return "?";
1036    }
1037
1038    public String toSystem(ActivityParticipantType code) {
1039      return code.getSystem();
1040    }
1041  }
1042
1043  @Block()
1044  public static class ActivityDefinitionParticipantComponent extends BackboneElement implements IBaseBackboneElement {
1045    /**
1046     * The type of participant in the action.
1047     */
1048    @Child(name = "type", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1049    @Description(shortDefinition = "patient | practitioner | related-person | device", formalDefinition = "The type of participant in the action.")
1050    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/action-participant-type")
1051    protected Enumeration<ActivityParticipantType> type;
1052
1053    /**
1054     * The role the participant should play in performing the described action.
1055     */
1056    @Child(name = "role", type = {
1057        CodeableConcept.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
1058    @Description(shortDefinition = "E.g. Nurse, Surgeon, Parent, etc.", formalDefinition = "The role the participant should play in performing the described action.")
1059    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/action-participant-role")
1060    protected CodeableConcept role;
1061
1062    private static final long serialVersionUID = -1450932564L;
1063
1064    /**
1065     * Constructor
1066     */
1067    public ActivityDefinitionParticipantComponent() {
1068      super();
1069    }
1070
1071    /**
1072     * Constructor
1073     */
1074    public ActivityDefinitionParticipantComponent(Enumeration<ActivityParticipantType> type) {
1075      super();
1076      this.type = type;
1077    }
1078
1079    /**
1080     * @return {@link #type} (The type of participant in the action.). This is the
1081     *         underlying object with id, value and extensions. The accessor
1082     *         "getType" gives direct access to the value
1083     */
1084    public Enumeration<ActivityParticipantType> getTypeElement() {
1085      if (this.type == null)
1086        if (Configuration.errorOnAutoCreate())
1087          throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.type");
1088        else if (Configuration.doAutoCreate())
1089          this.type = new Enumeration<ActivityParticipantType>(new ActivityParticipantTypeEnumFactory()); // bb
1090      return this.type;
1091    }
1092
1093    public boolean hasTypeElement() {
1094      return this.type != null && !this.type.isEmpty();
1095    }
1096
1097    public boolean hasType() {
1098      return this.type != null && !this.type.isEmpty();
1099    }
1100
1101    /**
1102     * @param value {@link #type} (The type of participant in the action.). This is
1103     *              the underlying object with id, value and extensions. The
1104     *              accessor "getType" gives direct access to the value
1105     */
1106    public ActivityDefinitionParticipantComponent setTypeElement(Enumeration<ActivityParticipantType> value) {
1107      this.type = value;
1108      return this;
1109    }
1110
1111    /**
1112     * @return The type of participant in the action.
1113     */
1114    public ActivityParticipantType getType() {
1115      return this.type == null ? null : this.type.getValue();
1116    }
1117
1118    /**
1119     * @param value The type of participant in the action.
1120     */
1121    public ActivityDefinitionParticipantComponent setType(ActivityParticipantType value) {
1122      if (this.type == null)
1123        this.type = new Enumeration<ActivityParticipantType>(new ActivityParticipantTypeEnumFactory());
1124      this.type.setValue(value);
1125      return this;
1126    }
1127
1128    /**
1129     * @return {@link #role} (The role the participant should play in performing the
1130     *         described action.)
1131     */
1132    public CodeableConcept getRole() {
1133      if (this.role == null)
1134        if (Configuration.errorOnAutoCreate())
1135          throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.role");
1136        else if (Configuration.doAutoCreate())
1137          this.role = new CodeableConcept(); // cc
1138      return this.role;
1139    }
1140
1141    public boolean hasRole() {
1142      return this.role != null && !this.role.isEmpty();
1143    }
1144
1145    /**
1146     * @param value {@link #role} (The role the participant should play in
1147     *              performing the described action.)
1148     */
1149    public ActivityDefinitionParticipantComponent setRole(CodeableConcept value) {
1150      this.role = value;
1151      return this;
1152    }
1153
1154    protected void listChildren(List<Property> children) {
1155      super.listChildren(children);
1156      children.add(new Property("type", "code", "The type of participant in the action.", 0, 1, type));
1157      children.add(new Property("role", "CodeableConcept",
1158          "The role the participant should play in performing the described action.", 0, 1, role));
1159    }
1160
1161    @Override
1162    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1163      switch (_hash) {
1164      case 3575610:
1165        /* type */ return new Property("type", "code", "The type of participant in the action.", 0, 1, type);
1166      case 3506294:
1167        /* role */ return new Property("role", "CodeableConcept",
1168            "The role the participant should play in performing the described action.", 0, 1, role);
1169      default:
1170        return super.getNamedProperty(_hash, _name, _checkValid);
1171      }
1172
1173    }
1174
1175    @Override
1176    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1177      switch (hash) {
1178      case 3575610:
1179        /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // Enumeration<ActivityParticipantType>
1180      case 3506294:
1181        /* role */ return this.role == null ? new Base[0] : new Base[] { this.role }; // CodeableConcept
1182      default:
1183        return super.getProperty(hash, name, checkValid);
1184      }
1185
1186    }
1187
1188    @Override
1189    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1190      switch (hash) {
1191      case 3575610: // type
1192        value = new ActivityParticipantTypeEnumFactory().fromType(castToCode(value));
1193        this.type = (Enumeration) value; // Enumeration<ActivityParticipantType>
1194        return value;
1195      case 3506294: // role
1196        this.role = castToCodeableConcept(value); // CodeableConcept
1197        return value;
1198      default:
1199        return super.setProperty(hash, name, value);
1200      }
1201
1202    }
1203
1204    @Override
1205    public Base setProperty(String name, Base value) throws FHIRException {
1206      if (name.equals("type")) {
1207        value = new ActivityParticipantTypeEnumFactory().fromType(castToCode(value));
1208        this.type = (Enumeration) value; // Enumeration<ActivityParticipantType>
1209      } else if (name.equals("role")) {
1210        this.role = castToCodeableConcept(value); // CodeableConcept
1211      } else
1212        return super.setProperty(name, value);
1213      return value;
1214    }
1215
1216  @Override
1217  public void removeChild(String name, Base value) throws FHIRException {
1218      if (name.equals("type")) {
1219        this.type = null;
1220      } else if (name.equals("role")) {
1221        this.role = null;
1222      } else
1223        super.removeChild(name, value);
1224      
1225    }
1226
1227    @Override
1228    public Base makeProperty(int hash, String name) throws FHIRException {
1229      switch (hash) {
1230      case 3575610:
1231        return getTypeElement();
1232      case 3506294:
1233        return getRole();
1234      default:
1235        return super.makeProperty(hash, name);
1236      }
1237
1238    }
1239
1240    @Override
1241    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1242      switch (hash) {
1243      case 3575610:
1244        /* type */ return new String[] { "code" };
1245      case 3506294:
1246        /* role */ return new String[] { "CodeableConcept" };
1247      default:
1248        return super.getTypesForProperty(hash, name);
1249      }
1250
1251    }
1252
1253    @Override
1254    public Base addChild(String name) throws FHIRException {
1255      if (name.equals("type")) {
1256        throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.type");
1257      } else if (name.equals("role")) {
1258        this.role = new CodeableConcept();
1259        return this.role;
1260      } else
1261        return super.addChild(name);
1262    }
1263
1264    public ActivityDefinitionParticipantComponent copy() {
1265      ActivityDefinitionParticipantComponent dst = new ActivityDefinitionParticipantComponent();
1266      copyValues(dst);
1267      return dst;
1268    }
1269
1270    public void copyValues(ActivityDefinitionParticipantComponent dst) {
1271      super.copyValues(dst);
1272      dst.type = type == null ? null : type.copy();
1273      dst.role = role == null ? null : role.copy();
1274    }
1275
1276    @Override
1277    public boolean equalsDeep(Base other_) {
1278      if (!super.equalsDeep(other_))
1279        return false;
1280      if (!(other_ instanceof ActivityDefinitionParticipantComponent))
1281        return false;
1282      ActivityDefinitionParticipantComponent o = (ActivityDefinitionParticipantComponent) other_;
1283      return compareDeep(type, o.type, true) && compareDeep(role, o.role, true);
1284    }
1285
1286    @Override
1287    public boolean equalsShallow(Base other_) {
1288      if (!super.equalsShallow(other_))
1289        return false;
1290      if (!(other_ instanceof ActivityDefinitionParticipantComponent))
1291        return false;
1292      ActivityDefinitionParticipantComponent o = (ActivityDefinitionParticipantComponent) other_;
1293      return compareValues(type, o.type, true);
1294    }
1295
1296    public boolean isEmpty() {
1297      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role);
1298    }
1299
1300    public String fhirType() {
1301      return "ActivityDefinition.participant";
1302
1303    }
1304
1305  }
1306
1307  @Block()
1308  public static class ActivityDefinitionDynamicValueComponent extends BackboneElement implements IBaseBackboneElement {
1309    /**
1310     * The path to the element to be customized. This is the path on the resource
1311     * that will hold the result of the calculation defined by the expression. The
1312     * specified path SHALL be a FHIRPath resolveable on the specified target type
1313     * of the ActivityDefinition, and SHALL consist only of identifiers, constant
1314     * indexers, and a restricted subset of functions. The path is allowed to
1315     * contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to
1316     * traverse multiple-cardinality sub-elements (see the [Simple FHIRPath
1317     * Profile](fhirpath.html#simple) for full details).
1318     */
1319    @Child(name = "path", type = { StringType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1320    @Description(shortDefinition = "The path to the element to be set dynamically", formalDefinition = "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).")
1321    protected StringType path;
1322
1323    /**
1324     * An expression specifying the value of the customized element.
1325     */
1326    @Child(name = "expression", type = {
1327        Expression.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
1328    @Description(shortDefinition = "An expression that provides the dynamic value for the customization", formalDefinition = "An expression specifying the value of the customized element.")
1329    protected Expression expression;
1330
1331    private static final long serialVersionUID = 1064529082L;
1332
1333    /**
1334     * Constructor
1335     */
1336    public ActivityDefinitionDynamicValueComponent() {
1337      super();
1338    }
1339
1340    /**
1341     * Constructor
1342     */
1343    public ActivityDefinitionDynamicValueComponent(StringType path, Expression expression) {
1344      super();
1345      this.path = path;
1346      this.expression = expression;
1347    }
1348
1349    /**
1350     * @return {@link #path} (The path to the element to be customized. This is the
1351     *         path on the resource that will hold the result of the calculation
1352     *         defined by the expression. The specified path SHALL be a FHIRPath
1353     *         resolveable on the specified target type of the ActivityDefinition,
1354     *         and SHALL consist only of identifiers, constant indexers, and a
1355     *         restricted subset of functions. The path is allowed to contain
1356     *         qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to
1357     *         traverse multiple-cardinality sub-elements (see the [Simple FHIRPath
1358     *         Profile](fhirpath.html#simple) for full details).). This is the
1359     *         underlying object with id, value and extensions. The accessor
1360     *         "getPath" gives direct access to the value
1361     */
1362    public StringType getPathElement() {
1363      if (this.path == null)
1364        if (Configuration.errorOnAutoCreate())
1365          throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.path");
1366        else if (Configuration.doAutoCreate())
1367          this.path = new StringType(); // bb
1368      return this.path;
1369    }
1370
1371    public boolean hasPathElement() {
1372      return this.path != null && !this.path.isEmpty();
1373    }
1374
1375    public boolean hasPath() {
1376      return this.path != null && !this.path.isEmpty();
1377    }
1378
1379    /**
1380     * @param value {@link #path} (The path to the element to be customized. This is
1381     *              the path on the resource that will hold the result of the
1382     *              calculation defined by the expression. The specified path SHALL
1383     *              be a FHIRPath resolveable on the specified target type of the
1384     *              ActivityDefinition, and SHALL consist only of identifiers,
1385     *              constant indexers, and a restricted subset of functions. The
1386     *              path is allowed to contain qualifiers (.) to traverse
1387     *              sub-elements, as well as indexers ([x]) to traverse
1388     *              multiple-cardinality sub-elements (see the [Simple FHIRPath
1389     *              Profile](fhirpath.html#simple) for full details).). This is the
1390     *              underlying object with id, value and extensions. The accessor
1391     *              "getPath" gives direct access to the value
1392     */
1393    public ActivityDefinitionDynamicValueComponent setPathElement(StringType value) {
1394      this.path = value;
1395      return this;
1396    }
1397
1398    /**
1399     * @return The path to the element to be customized. This is the path on the
1400     *         resource that will hold the result of the calculation defined by the
1401     *         expression. The specified path SHALL be a FHIRPath resolveable on the
1402     *         specified target type of the ActivityDefinition, and SHALL consist
1403     *         only of identifiers, constant indexers, and a restricted subset of
1404     *         functions. The path is allowed to contain qualifiers (.) to traverse
1405     *         sub-elements, as well as indexers ([x]) to traverse
1406     *         multiple-cardinality sub-elements (see the [Simple FHIRPath
1407     *         Profile](fhirpath.html#simple) for full details).
1408     */
1409    public String getPath() {
1410      return this.path == null ? null : this.path.getValue();
1411    }
1412
1413    /**
1414     * @param value The path to the element to be customized. This is the path on
1415     *              the resource that will hold the result of the calculation
1416     *              defined by the expression. The specified path SHALL be a
1417     *              FHIRPath resolveable on the specified target type of the
1418     *              ActivityDefinition, and SHALL consist only of identifiers,
1419     *              constant indexers, and a restricted subset of functions. The
1420     *              path is allowed to contain qualifiers (.) to traverse
1421     *              sub-elements, as well as indexers ([x]) to traverse
1422     *              multiple-cardinality sub-elements (see the [Simple FHIRPath
1423     *              Profile](fhirpath.html#simple) for full details).
1424     */
1425    public ActivityDefinitionDynamicValueComponent setPath(String value) {
1426      if (this.path == null)
1427        this.path = new StringType();
1428      this.path.setValue(value);
1429      return this;
1430    }
1431
1432    /**
1433     * @return {@link #expression} (An expression specifying the value of the
1434     *         customized element.)
1435     */
1436    public Expression getExpression() {
1437      if (this.expression == null)
1438        if (Configuration.errorOnAutoCreate())
1439          throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.expression");
1440        else if (Configuration.doAutoCreate())
1441          this.expression = new Expression(); // cc
1442      return this.expression;
1443    }
1444
1445    public boolean hasExpression() {
1446      return this.expression != null && !this.expression.isEmpty();
1447    }
1448
1449    /**
1450     * @param value {@link #expression} (An expression specifying the value of the
1451     *              customized element.)
1452     */
1453    public ActivityDefinitionDynamicValueComponent setExpression(Expression value) {
1454      this.expression = value;
1455      return this;
1456    }
1457
1458    protected void listChildren(List<Property> children) {
1459      super.listChildren(children);
1460      children.add(new Property("path", "string",
1461          "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).",
1462          0, 1, path));
1463      children.add(new Property("expression", "Expression",
1464          "An expression specifying the value of the customized element.", 0, 1, expression));
1465    }
1466
1467    @Override
1468    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1469      switch (_hash) {
1470      case 3433509:
1471        /* path */ return new Property("path", "string",
1472            "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression. The specified path SHALL be a FHIRPath resolveable on the specified target type of the ActivityDefinition, and SHALL consist only of identifiers, constant indexers, and a restricted subset of functions. The path is allowed to contain qualifiers (.) to traverse sub-elements, as well as indexers ([x]) to traverse multiple-cardinality sub-elements (see the [Simple FHIRPath Profile](fhirpath.html#simple) for full details).",
1473            0, 1, path);
1474      case -1795452264:
1475        /* expression */ return new Property("expression", "Expression",
1476            "An expression specifying the value of the customized element.", 0, 1, expression);
1477      default:
1478        return super.getNamedProperty(_hash, _name, _checkValid);
1479      }
1480
1481    }
1482
1483    @Override
1484    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1485      switch (hash) {
1486      case 3433509:
1487        /* path */ return this.path == null ? new Base[0] : new Base[] { this.path }; // StringType
1488      case -1795452264:
1489        /* expression */ return this.expression == null ? new Base[0] : new Base[] { this.expression }; // Expression
1490      default:
1491        return super.getProperty(hash, name, checkValid);
1492      }
1493
1494    }
1495
1496    @Override
1497    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1498      switch (hash) {
1499      case 3433509: // path
1500        this.path = castToString(value); // StringType
1501        return value;
1502      case -1795452264: // expression
1503        this.expression = castToExpression(value); // Expression
1504        return value;
1505      default:
1506        return super.setProperty(hash, name, value);
1507      }
1508
1509    }
1510
1511    @Override
1512    public Base setProperty(String name, Base value) throws FHIRException {
1513      if (name.equals("path")) {
1514        this.path = castToString(value); // StringType
1515      } else if (name.equals("expression")) {
1516        this.expression = castToExpression(value); // Expression
1517      } else
1518        return super.setProperty(name, value);
1519      return value;
1520    }
1521
1522  @Override
1523  public void removeChild(String name, Base value) throws FHIRException {
1524      if (name.equals("path")) {
1525        this.path = null;
1526      } else if (name.equals("expression")) {
1527        this.expression = null;
1528      } else
1529        super.removeChild(name, value);
1530      
1531    }
1532
1533    @Override
1534    public Base makeProperty(int hash, String name) throws FHIRException {
1535      switch (hash) {
1536      case 3433509:
1537        return getPathElement();
1538      case -1795452264:
1539        return getExpression();
1540      default:
1541        return super.makeProperty(hash, name);
1542      }
1543
1544    }
1545
1546    @Override
1547    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1548      switch (hash) {
1549      case 3433509:
1550        /* path */ return new String[] { "string" };
1551      case -1795452264:
1552        /* expression */ return new String[] { "Expression" };
1553      default:
1554        return super.getTypesForProperty(hash, name);
1555      }
1556
1557    }
1558
1559    @Override
1560    public Base addChild(String name) throws FHIRException {
1561      if (name.equals("path")) {
1562        throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.path");
1563      } else if (name.equals("expression")) {
1564        this.expression = new Expression();
1565        return this.expression;
1566      } else
1567        return super.addChild(name);
1568    }
1569
1570    public ActivityDefinitionDynamicValueComponent copy() {
1571      ActivityDefinitionDynamicValueComponent dst = new ActivityDefinitionDynamicValueComponent();
1572      copyValues(dst);
1573      return dst;
1574    }
1575
1576    public void copyValues(ActivityDefinitionDynamicValueComponent dst) {
1577      super.copyValues(dst);
1578      dst.path = path == null ? null : path.copy();
1579      dst.expression = expression == null ? null : expression.copy();
1580    }
1581
1582    @Override
1583    public boolean equalsDeep(Base other_) {
1584      if (!super.equalsDeep(other_))
1585        return false;
1586      if (!(other_ instanceof ActivityDefinitionDynamicValueComponent))
1587        return false;
1588      ActivityDefinitionDynamicValueComponent o = (ActivityDefinitionDynamicValueComponent) other_;
1589      return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true);
1590    }
1591
1592    @Override
1593    public boolean equalsShallow(Base other_) {
1594      if (!super.equalsShallow(other_))
1595        return false;
1596      if (!(other_ instanceof ActivityDefinitionDynamicValueComponent))
1597        return false;
1598      ActivityDefinitionDynamicValueComponent o = (ActivityDefinitionDynamicValueComponent) other_;
1599      return compareValues(path, o.path, true);
1600    }
1601
1602    public boolean isEmpty() {
1603      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, expression);
1604    }
1605
1606    public String fhirType() {
1607      return "ActivityDefinition.dynamicValue";
1608
1609    }
1610
1611  }
1612
1613  /**
1614   * A formal identifier that is used to identify this activity definition when it
1615   * is represented in other formats, or referenced in a specification, model,
1616   * design or an instance.
1617   */
1618  @Child(name = "identifier", type = {
1619      Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true)
1620  @Description(shortDefinition = "Additional identifier for the activity definition", formalDefinition = "A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.")
1621  protected List<Identifier> identifier;
1622
1623  /**
1624   * An explanatory or alternate title for the activity definition giving
1625   * additional information about its content.
1626   */
1627  @Child(name = "subtitle", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
1628  @Description(shortDefinition = "Subordinate title of the activity definition", formalDefinition = "An explanatory or alternate title for the activity definition giving additional information about its content.")
1629  protected StringType subtitle;
1630
1631  /**
1632   * A code or group definition that describes the intended subject of the
1633   * activity being defined.
1634   */
1635  @Child(name = "subject", type = { CodeableConcept.class,
1636      Group.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
1637  @Description(shortDefinition = "Type of individual the activity definition is intended for", formalDefinition = "A code or group definition that describes the intended subject of the activity being defined.")
1638  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/subject-type")
1639  protected Type subject;
1640
1641  /**
1642   * Explanation of why this activity definition is needed and why it has been
1643   * designed as it has.
1644   */
1645  @Child(name = "purpose", type = {
1646      MarkdownType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
1647  @Description(shortDefinition = "Why this activity definition is defined", formalDefinition = "Explanation of why this activity definition is needed and why it has been designed as it has.")
1648  protected MarkdownType purpose;
1649
1650  /**
1651   * A detailed description of how the activity definition is used from a clinical
1652   * perspective.
1653   */
1654  @Child(name = "usage", type = { StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
1655  @Description(shortDefinition = "Describes the clinical usage of the activity definition", formalDefinition = "A detailed description of how the activity definition is used from a clinical perspective.")
1656  protected StringType usage;
1657
1658  /**
1659   * A copyright statement relating to the activity definition and/or its
1660   * contents. Copyright statements are generally legal restrictions on the use
1661   * and publishing of the activity definition.
1662   */
1663  @Child(name = "copyright", type = {
1664      MarkdownType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
1665  @Description(shortDefinition = "Use and/or publishing restrictions", formalDefinition = "A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.")
1666  protected MarkdownType copyright;
1667
1668  /**
1669   * The date on which the resource content was approved by the publisher.
1670   * Approval happens once when the content is officially approved for usage.
1671   */
1672  @Child(name = "approvalDate", type = {
1673      DateType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
1674  @Description(shortDefinition = "When the activity definition was approved by publisher", formalDefinition = "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.")
1675  protected DateType approvalDate;
1676
1677  /**
1678   * The date on which the resource content was last reviewed. Review happens
1679   * periodically after approval but does not change the original approval date.
1680   */
1681  @Child(name = "lastReviewDate", type = {
1682      DateType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
1683  @Description(shortDefinition = "When the activity definition was last reviewed", formalDefinition = "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.")
1684  protected DateType lastReviewDate;
1685
1686  /**
1687   * The period during which the activity definition content was or is planned to
1688   * be in active use.
1689   */
1690  @Child(name = "effectivePeriod", type = {
1691      Period.class }, order = 8, min = 0, max = 1, modifier = false, summary = true)
1692  @Description(shortDefinition = "When the activity definition is expected to be used", formalDefinition = "The period during which the activity definition content was or is planned to be in active use.")
1693  protected Period effectivePeriod;
1694
1695  /**
1696   * Descriptive topics related to the content of the activity. Topics provide a
1697   * high-level categorization of the activity that can be useful for filtering
1698   * and searching.
1699   */
1700  @Child(name = "topic", type = {
1701      CodeableConcept.class }, order = 9, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1702  @Description(shortDefinition = "E.g. Education, Treatment, Assessment, etc.", formalDefinition = "Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.")
1703  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/definition-topic")
1704  protected List<CodeableConcept> topic;
1705
1706  /**
1707   * An individiual or organization primarily involved in the creation and
1708   * maintenance of the content.
1709   */
1710  @Child(name = "author", type = {
1711      ContactDetail.class }, order = 10, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1712  @Description(shortDefinition = "Who authored the content", formalDefinition = "An individiual or organization primarily involved in the creation and maintenance of the content.")
1713  protected List<ContactDetail> author;
1714
1715  /**
1716   * An individual or organization primarily responsible for internal coherence of
1717   * the content.
1718   */
1719  @Child(name = "editor", type = {
1720      ContactDetail.class }, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1721  @Description(shortDefinition = "Who edited the content", formalDefinition = "An individual or organization primarily responsible for internal coherence of the content.")
1722  protected List<ContactDetail> editor;
1723
1724  /**
1725   * An individual or organization primarily responsible for review of some aspect
1726   * of the content.
1727   */
1728  @Child(name = "reviewer", type = {
1729      ContactDetail.class }, order = 12, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1730  @Description(shortDefinition = "Who reviewed the content", formalDefinition = "An individual or organization primarily responsible for review of some aspect of the content.")
1731  protected List<ContactDetail> reviewer;
1732
1733  /**
1734   * An individual or organization responsible for officially endorsing the
1735   * content for use in some setting.
1736   */
1737  @Child(name = "endorser", type = {
1738      ContactDetail.class }, order = 13, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1739  @Description(shortDefinition = "Who endorsed the content", formalDefinition = "An individual or organization responsible for officially endorsing the content for use in some setting.")
1740  protected List<ContactDetail> endorser;
1741
1742  /**
1743   * Related artifacts such as additional documentation, justification, or
1744   * bibliographic references.
1745   */
1746  @Child(name = "relatedArtifact", type = {
1747      RelatedArtifact.class }, order = 14, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1748  @Description(shortDefinition = "Additional documentation, citations, etc.", formalDefinition = "Related artifacts such as additional documentation, justification, or bibliographic references.")
1749  protected List<RelatedArtifact> relatedArtifact;
1750
1751  /**
1752   * A reference to a Library resource containing any formal logic used by the
1753   * activity definition.
1754   */
1755  @Child(name = "library", type = {
1756      CanonicalType.class }, order = 15, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1757  @Description(shortDefinition = "Logic used by the activity definition", formalDefinition = "A reference to a Library resource containing any formal logic used by the activity definition.")
1758  protected List<CanonicalType> library;
1759
1760  /**
1761   * A description of the kind of resource the activity definition is
1762   * representing. For example, a MedicationRequest, a ServiceRequest, or a
1763   * CommunicationRequest. Typically, but not always, this is a Request resource.
1764   */
1765  @Child(name = "kind", type = { CodeType.class }, order = 16, min = 0, max = 1, modifier = false, summary = true)
1766  @Description(shortDefinition = "Kind of resource", formalDefinition = "A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.")
1767  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/request-resource-types")
1768  protected Enumeration<ActivityDefinitionKind> kind;
1769
1770  /**
1771   * A profile to which the target of the activity definition is expected to
1772   * conform.
1773   */
1774  @Child(name = "profile", type = {
1775      CanonicalType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false)
1776  @Description(shortDefinition = "What profile the resource needs to conform to", formalDefinition = "A profile to which the target of the activity definition is expected to conform.")
1777  protected CanonicalType profile;
1778
1779  /**
1780   * Detailed description of the type of activity; e.g. What lab test, what
1781   * procedure, what kind of encounter.
1782   */
1783  @Child(name = "code", type = {
1784      CodeableConcept.class }, order = 18, min = 0, max = 1, modifier = false, summary = true)
1785  @Description(shortDefinition = "Detail type of activity", formalDefinition = "Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.")
1786  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/procedure-code")
1787  protected CodeableConcept code;
1788
1789  /**
1790   * Indicates the level of authority/intentionality associated with the activity
1791   * and where the request should fit into the workflow chain.
1792   */
1793  @Child(name = "intent", type = { CodeType.class }, order = 19, min = 0, max = 1, modifier = false, summary = false)
1794  @Description(shortDefinition = "proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option", formalDefinition = "Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.")
1795  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/request-intent")
1796  protected Enumeration<RequestIntent> intent;
1797
1798  /**
1799   * Indicates how quickly the activity should be addressed with respect to other
1800   * requests.
1801   */
1802  @Child(name = "priority", type = { CodeType.class }, order = 20, min = 0, max = 1, modifier = false, summary = false)
1803  @Description(shortDefinition = "routine | urgent | asap | stat", formalDefinition = "Indicates how quickly the activity  should be addressed with respect to other requests.")
1804  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/request-priority")
1805  protected Enumeration<RequestPriority> priority;
1806
1807  /**
1808   * Set this to true if the definition is to indicate that a particular activity
1809   * should NOT be performed. If true, this element should be interpreted to
1810   * reinforce a negative coding. For example NPO as a code with a doNotPerform of
1811   * true would still indicate to NOT perform the action.
1812   */
1813  @Child(name = "doNotPerform", type = {
1814      BooleanType.class }, order = 21, min = 0, max = 1, modifier = true, summary = true)
1815  @Description(shortDefinition = "True if the activity should not be performed", formalDefinition = "Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.")
1816  protected BooleanType doNotPerform;
1817
1818  /**
1819   * The period, timing or frequency upon which the described activity is to
1820   * occur.
1821   */
1822  @Child(name = "timing", type = { Timing.class, DateTimeType.class, Age.class, Period.class, Range.class,
1823      Duration.class }, order = 22, min = 0, max = 1, modifier = false, summary = false)
1824  @Description(shortDefinition = "When activity is to occur", formalDefinition = "The period, timing or frequency upon which the described activity is to occur.")
1825  protected Type timing;
1826
1827  /**
1828   * Identifies the facility where the activity will occur; e.g. home, hospital,
1829   * specific clinic, etc.
1830   */
1831  @Child(name = "location", type = { Location.class }, order = 23, min = 0, max = 1, modifier = false, summary = false)
1832  @Description(shortDefinition = "Where it should happen", formalDefinition = "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.")
1833  protected Reference location;
1834
1835  /**
1836   * The actual object that is the target of the reference (Identifies the
1837   * facility where the activity will occur; e.g. home, hospital, specific clinic,
1838   * etc.)
1839   */
1840  protected Location locationTarget;
1841
1842  /**
1843   * Indicates who should participate in performing the action described.
1844   */
1845  @Child(name = "participant", type = {}, order = 24, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1846  @Description(shortDefinition = "Who should participate in the action", formalDefinition = "Indicates who should participate in performing the action described.")
1847  protected List<ActivityDefinitionParticipantComponent> participant;
1848
1849  /**
1850   * Identifies the food, drug or other product being consumed or supplied in the
1851   * activity.
1852   */
1853  @Child(name = "product", type = { Medication.class, Substance.class,
1854      CodeableConcept.class }, order = 25, min = 0, max = 1, modifier = false, summary = false)
1855  @Description(shortDefinition = "What's administered/supplied", formalDefinition = "Identifies the food, drug or other product being consumed or supplied in the activity.")
1856  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/medication-codes")
1857  protected Type product;
1858
1859  /**
1860   * Identifies the quantity expected to be consumed at once (per dose, per meal,
1861   * etc.).
1862   */
1863  @Child(name = "quantity", type = { Quantity.class }, order = 26, min = 0, max = 1, modifier = false, summary = false)
1864  @Description(shortDefinition = "How much is administered/consumed/supplied", formalDefinition = "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).")
1865  protected Quantity quantity;
1866
1867  /**
1868   * Provides detailed dosage instructions in the same way that they are described
1869   * for MedicationRequest resources.
1870   */
1871  @Child(name = "dosage", type = {
1872      Dosage.class }, order = 27, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1873  @Description(shortDefinition = "Detailed dosage instructions", formalDefinition = "Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.")
1874  protected List<Dosage> dosage;
1875
1876  /**
1877   * Indicates the sites on the subject's body where the procedure should be
1878   * performed (I.e. the target sites).
1879   */
1880  @Child(name = "bodySite", type = {
1881      CodeableConcept.class }, order = 28, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1882  @Description(shortDefinition = "What part of body to perform on", formalDefinition = "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).")
1883  @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/body-site")
1884  protected List<CodeableConcept> bodySite;
1885
1886  /**
1887   * Defines specimen requirements for the action to be performed, such as
1888   * required specimens for a lab test.
1889   */
1890  @Child(name = "specimenRequirement", type = {
1891      SpecimenDefinition.class }, order = 29, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1892  @Description(shortDefinition = "What specimens are required to perform this action", formalDefinition = "Defines specimen requirements for the action to be performed, such as required specimens for a lab test.")
1893  protected List<Reference> specimenRequirement;
1894  /**
1895   * The actual objects that are the target of the reference (Defines specimen
1896   * requirements for the action to be performed, such as required specimens for a
1897   * lab test.)
1898   */
1899  protected List<SpecimenDefinition> specimenRequirementTarget;
1900
1901  /**
1902   * Defines observation requirements for the action to be performed, such as body
1903   * weight or surface area.
1904   */
1905  @Child(name = "observationRequirement", type = {
1906      ObservationDefinition.class }, order = 30, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1907  @Description(shortDefinition = "What observations are required to perform this action", formalDefinition = "Defines observation requirements for the action to be performed, such as body weight or surface area.")
1908  protected List<Reference> observationRequirement;
1909  /**
1910   * The actual objects that are the target of the reference (Defines observation
1911   * requirements for the action to be performed, such as body weight or surface
1912   * area.)
1913   */
1914  protected List<ObservationDefinition> observationRequirementTarget;
1915
1916  /**
1917   * Defines the observations that are expected to be produced by the action.
1918   */
1919  @Child(name = "observationResultRequirement", type = {
1920      ObservationDefinition.class }, order = 31, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1921  @Description(shortDefinition = "What observations must be produced by this action", formalDefinition = "Defines the observations that are expected to be produced by the action.")
1922  protected List<Reference> observationResultRequirement;
1923  /**
1924   * The actual objects that are the target of the reference (Defines the
1925   * observations that are expected to be produced by the action.)
1926   */
1927  protected List<ObservationDefinition> observationResultRequirementTarget;
1928
1929  /**
1930   * A reference to a StructureMap resource that defines a transform that can be
1931   * executed to produce the intent resource using the ActivityDefinition instance
1932   * as the input.
1933   */
1934  @Child(name = "transform", type = {
1935      CanonicalType.class }, order = 32, min = 0, max = 1, modifier = false, summary = false)
1936  @Description(shortDefinition = "Transform to apply the template", formalDefinition = "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.")
1937  protected CanonicalType transform;
1938
1939  /**
1940   * Dynamic values that will be evaluated to produce values for elements of the
1941   * resulting resource. For example, if the dosage of a medication must be
1942   * computed based on the patient's weight, a dynamic value would be used to
1943   * specify an expression that calculated the weight, and the path on the request
1944   * resource that would contain the result.
1945   */
1946  @Child(name = "dynamicValue", type = {}, order = 33, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1947  @Description(shortDefinition = "Dynamic aspects of the definition", formalDefinition = "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.")
1948  protected List<ActivityDefinitionDynamicValueComponent> dynamicValue;
1949
1950  private static final long serialVersionUID = 1488459022L;
1951
1952  /**
1953   * Constructor
1954   */
1955  public ActivityDefinition() {
1956    super();
1957  }
1958
1959  /**
1960   * Constructor
1961   */
1962  public ActivityDefinition(Enumeration<PublicationStatus> status) {
1963    super();
1964    this.status = status;
1965  }
1966
1967  /**
1968   * @return {@link #url} (An absolute URI that is used to identify this activity
1969   *         definition when it is referenced in a specification, model, design or
1970   *         an instance; also called its canonical identifier. This SHOULD be
1971   *         globally unique and SHOULD be a literal address at which at which an
1972   *         authoritative instance of this activity definition is (or will be)
1973   *         published. This URL can be the target of a canonical reference. It
1974   *         SHALL remain the same when the activity definition is stored on
1975   *         different servers.). This is the underlying object with id, value and
1976   *         extensions. The accessor "getUrl" gives direct access to the value
1977   */
1978  public UriType getUrlElement() {
1979    if (this.url == null)
1980      if (Configuration.errorOnAutoCreate())
1981        throw new Error("Attempt to auto-create ActivityDefinition.url");
1982      else if (Configuration.doAutoCreate())
1983        this.url = new UriType(); // bb
1984    return this.url;
1985  }
1986
1987  public boolean hasUrlElement() {
1988    return this.url != null && !this.url.isEmpty();
1989  }
1990
1991  public boolean hasUrl() {
1992    return this.url != null && !this.url.isEmpty();
1993  }
1994
1995  /**
1996   * @param value {@link #url} (An absolute URI that is used to identify this
1997   *              activity definition when it is referenced in a specification,
1998   *              model, design or an instance; also called its canonical
1999   *              identifier. This SHOULD be globally unique and SHOULD be a
2000   *              literal address at which at which an authoritative instance of
2001   *              this activity definition is (or will be) published. This URL can
2002   *              be the target of a canonical reference. It SHALL remain the same
2003   *              when the activity definition is stored on different servers.).
2004   *              This is the underlying object with id, value and extensions. The
2005   *              accessor "getUrl" gives direct access to the value
2006   */
2007  public ActivityDefinition setUrlElement(UriType value) {
2008    this.url = value;
2009    return this;
2010  }
2011
2012  /**
2013   * @return An absolute URI that is used to identify this activity definition
2014   *         when it is referenced in a specification, model, design or an
2015   *         instance; also called its canonical identifier. This SHOULD be
2016   *         globally unique and SHOULD be a literal address at which at which an
2017   *         authoritative instance of this activity definition is (or will be)
2018   *         published. This URL can be the target of a canonical reference. It
2019   *         SHALL remain the same when the activity definition is stored on
2020   *         different servers.
2021   */
2022  public String getUrl() {
2023    return this.url == null ? null : this.url.getValue();
2024  }
2025
2026  /**
2027   * @param value An absolute URI that is used to identify this activity
2028   *              definition when it is referenced in a specification, model,
2029   *              design or an instance; also called its canonical identifier.
2030   *              This SHOULD be globally unique and SHOULD be a literal address
2031   *              at which at which an authoritative instance of this activity
2032   *              definition is (or will be) published. This URL can be the target
2033   *              of a canonical reference. It SHALL remain the same when the
2034   *              activity definition is stored on different servers.
2035   */
2036  public ActivityDefinition setUrl(String value) {
2037    if (Utilities.noString(value))
2038      this.url = null;
2039    else {
2040      if (this.url == null)
2041        this.url = new UriType();
2042      this.url.setValue(value);
2043    }
2044    return this;
2045  }
2046
2047  /**
2048   * @return {@link #identifier} (A formal identifier that is used to identify
2049   *         this activity definition when it is represented in other formats, or
2050   *         referenced in a specification, model, design or an instance.)
2051   */
2052  public List<Identifier> getIdentifier() {
2053    if (this.identifier == null)
2054      this.identifier = new ArrayList<Identifier>();
2055    return this.identifier;
2056  }
2057
2058  /**
2059   * @return Returns a reference to <code>this</code> for easy method chaining
2060   */
2061  public ActivityDefinition setIdentifier(List<Identifier> theIdentifier) {
2062    this.identifier = theIdentifier;
2063    return this;
2064  }
2065
2066  public boolean hasIdentifier() {
2067    if (this.identifier == null)
2068      return false;
2069    for (Identifier item : this.identifier)
2070      if (!item.isEmpty())
2071        return true;
2072    return false;
2073  }
2074
2075  public Identifier addIdentifier() { // 3
2076    Identifier t = new Identifier();
2077    if (this.identifier == null)
2078      this.identifier = new ArrayList<Identifier>();
2079    this.identifier.add(t);
2080    return t;
2081  }
2082
2083  public ActivityDefinition addIdentifier(Identifier t) { // 3
2084    if (t == null)
2085      return this;
2086    if (this.identifier == null)
2087      this.identifier = new ArrayList<Identifier>();
2088    this.identifier.add(t);
2089    return this;
2090  }
2091
2092  /**
2093   * @return The first repetition of repeating field {@link #identifier}, creating
2094   *         it if it does not already exist
2095   */
2096  public Identifier getIdentifierFirstRep() {
2097    if (getIdentifier().isEmpty()) {
2098      addIdentifier();
2099    }
2100    return getIdentifier().get(0);
2101  }
2102
2103  /**
2104   * @return {@link #version} (The identifier that is used to identify this
2105   *         version of the activity definition when it is referenced in a
2106   *         specification, model, design or instance. This is an arbitrary value
2107   *         managed by the activity definition author and is not expected to be
2108   *         globally unique. For example, it might be a timestamp (e.g. yyyymmdd)
2109   *         if a managed version is not available. There is also no expectation
2110   *         that versions can be placed in a lexicographical sequence. To provide
2111   *         a version consistent with the Decision Support Service specification,
2112   *         use the format Major.Minor.Revision (e.g. 1.0.0). For more
2113   *         information on versioning knowledge assets, refer to the Decision
2114   *         Support Service specification. Note that a version is required for
2115   *         non-experimental active assets.). This is the underlying object with
2116   *         id, value and extensions. The accessor "getVersion" gives direct
2117   *         access to the value
2118   */
2119  public StringType getVersionElement() {
2120    if (this.version == null)
2121      if (Configuration.errorOnAutoCreate())
2122        throw new Error("Attempt to auto-create ActivityDefinition.version");
2123      else if (Configuration.doAutoCreate())
2124        this.version = new StringType(); // bb
2125    return this.version;
2126  }
2127
2128  public boolean hasVersionElement() {
2129    return this.version != null && !this.version.isEmpty();
2130  }
2131
2132  public boolean hasVersion() {
2133    return this.version != null && !this.version.isEmpty();
2134  }
2135
2136  /**
2137   * @param value {@link #version} (The identifier that is used to identify this
2138   *              version of the activity definition when it is referenced in a
2139   *              specification, model, design or instance. This is an arbitrary
2140   *              value managed by the activity definition author and is not
2141   *              expected to be globally unique. For example, it might be a
2142   *              timestamp (e.g. yyyymmdd) if a managed version is not available.
2143   *              There is also no expectation that versions can be placed in a
2144   *              lexicographical sequence. To provide a version consistent with
2145   *              the Decision Support Service specification, use the format
2146   *              Major.Minor.Revision (e.g. 1.0.0). For more information on
2147   *              versioning knowledge assets, refer to the Decision Support
2148   *              Service specification. Note that a version is required for
2149   *              non-experimental active assets.). This is the underlying object
2150   *              with id, value and extensions. The accessor "getVersion" gives
2151   *              direct access to the value
2152   */
2153  public ActivityDefinition setVersionElement(StringType value) {
2154    this.version = value;
2155    return this;
2156  }
2157
2158  /**
2159   * @return The identifier that is used to identify this version of the activity
2160   *         definition when it is referenced in a specification, model, design or
2161   *         instance. This is an arbitrary value managed by the activity
2162   *         definition author and is not expected to be globally unique. For
2163   *         example, it might be a timestamp (e.g. yyyymmdd) if a managed version
2164   *         is not available. There is also no expectation that versions can be
2165   *         placed in a lexicographical sequence. To provide a version consistent
2166   *         with the Decision Support Service specification, use the format
2167   *         Major.Minor.Revision (e.g. 1.0.0). For more information on versioning
2168   *         knowledge assets, refer to the Decision Support Service
2169   *         specification. Note that a version is required for non-experimental
2170   *         active assets.
2171   */
2172  public String getVersion() {
2173    return this.version == null ? null : this.version.getValue();
2174  }
2175
2176  /**
2177   * @param value The identifier that is used to identify this version of the
2178   *              activity definition when it is referenced in a specification,
2179   *              model, design or instance. This is an arbitrary value managed by
2180   *              the activity definition author and is not expected to be
2181   *              globally unique. For example, it might be a timestamp (e.g.
2182   *              yyyymmdd) if a managed version is not available. There is also
2183   *              no expectation that versions can be placed in a lexicographical
2184   *              sequence. To provide a version consistent with the Decision
2185   *              Support Service specification, use the format
2186   *              Major.Minor.Revision (e.g. 1.0.0). For more information on
2187   *              versioning knowledge assets, refer to the Decision Support
2188   *              Service specification. Note that a version is required for
2189   *              non-experimental active assets.
2190   */
2191  public ActivityDefinition setVersion(String value) {
2192    if (Utilities.noString(value))
2193      this.version = null;
2194    else {
2195      if (this.version == null)
2196        this.version = new StringType();
2197      this.version.setValue(value);
2198    }
2199    return this;
2200  }
2201
2202  /**
2203   * @return {@link #name} (A natural language name identifying the activity
2204   *         definition. This name should be usable as an identifier for the
2205   *         module by machine processing applications such as code generation.).
2206   *         This is the underlying object with id, value and extensions. The
2207   *         accessor "getName" gives direct access to the value
2208   */
2209  public StringType getNameElement() {
2210    if (this.name == null)
2211      if (Configuration.errorOnAutoCreate())
2212        throw new Error("Attempt to auto-create ActivityDefinition.name");
2213      else if (Configuration.doAutoCreate())
2214        this.name = new StringType(); // bb
2215    return this.name;
2216  }
2217
2218  public boolean hasNameElement() {
2219    return this.name != null && !this.name.isEmpty();
2220  }
2221
2222  public boolean hasName() {
2223    return this.name != null && !this.name.isEmpty();
2224  }
2225
2226  /**
2227   * @param value {@link #name} (A natural language name identifying the activity
2228   *              definition. This name should be usable as an identifier for the
2229   *              module by machine processing applications such as code
2230   *              generation.). This is the underlying object with id, value and
2231   *              extensions. The accessor "getName" gives direct access to the
2232   *              value
2233   */
2234  public ActivityDefinition setNameElement(StringType value) {
2235    this.name = value;
2236    return this;
2237  }
2238
2239  /**
2240   * @return A natural language name identifying the activity definition. This
2241   *         name should be usable as an identifier for the module by machine
2242   *         processing applications such as code generation.
2243   */
2244  public String getName() {
2245    return this.name == null ? null : this.name.getValue();
2246  }
2247
2248  /**
2249   * @param value A natural language name identifying the activity definition.
2250   *              This name should be usable as an identifier for the module by
2251   *              machine processing applications such as code generation.
2252   */
2253  public ActivityDefinition setName(String value) {
2254    if (Utilities.noString(value))
2255      this.name = null;
2256    else {
2257      if (this.name == null)
2258        this.name = new StringType();
2259      this.name.setValue(value);
2260    }
2261    return this;
2262  }
2263
2264  /**
2265   * @return {@link #title} (A short, descriptive, user-friendly title for the
2266   *         activity definition.). This is the underlying object with id, value
2267   *         and extensions. The accessor "getTitle" gives direct access to the
2268   *         value
2269   */
2270  public StringType getTitleElement() {
2271    if (this.title == null)
2272      if (Configuration.errorOnAutoCreate())
2273        throw new Error("Attempt to auto-create ActivityDefinition.title");
2274      else if (Configuration.doAutoCreate())
2275        this.title = new StringType(); // bb
2276    return this.title;
2277  }
2278
2279  public boolean hasTitleElement() {
2280    return this.title != null && !this.title.isEmpty();
2281  }
2282
2283  public boolean hasTitle() {
2284    return this.title != null && !this.title.isEmpty();
2285  }
2286
2287  /**
2288   * @param value {@link #title} (A short, descriptive, user-friendly title for
2289   *              the activity definition.). This is the underlying object with
2290   *              id, value and extensions. The accessor "getTitle" gives direct
2291   *              access to the value
2292   */
2293  public ActivityDefinition setTitleElement(StringType value) {
2294    this.title = value;
2295    return this;
2296  }
2297
2298  /**
2299   * @return A short, descriptive, user-friendly title for the activity
2300   *         definition.
2301   */
2302  public String getTitle() {
2303    return this.title == null ? null : this.title.getValue();
2304  }
2305
2306  /**
2307   * @param value A short, descriptive, user-friendly title for the activity
2308   *              definition.
2309   */
2310  public ActivityDefinition setTitle(String value) {
2311    if (Utilities.noString(value))
2312      this.title = null;
2313    else {
2314      if (this.title == null)
2315        this.title = new StringType();
2316      this.title.setValue(value);
2317    }
2318    return this;
2319  }
2320
2321  /**
2322   * @return {@link #subtitle} (An explanatory or alternate title for the activity
2323   *         definition giving additional information about its content.). This is
2324   *         the underlying object with id, value and extensions. The accessor
2325   *         "getSubtitle" gives direct access to the value
2326   */
2327  public StringType getSubtitleElement() {
2328    if (this.subtitle == null)
2329      if (Configuration.errorOnAutoCreate())
2330        throw new Error("Attempt to auto-create ActivityDefinition.subtitle");
2331      else if (Configuration.doAutoCreate())
2332        this.subtitle = new StringType(); // bb
2333    return this.subtitle;
2334  }
2335
2336  public boolean hasSubtitleElement() {
2337    return this.subtitle != null && !this.subtitle.isEmpty();
2338  }
2339
2340  public boolean hasSubtitle() {
2341    return this.subtitle != null && !this.subtitle.isEmpty();
2342  }
2343
2344  /**
2345   * @param value {@link #subtitle} (An explanatory or alternate title for the
2346   *              activity definition giving additional information about its
2347   *              content.). This is the underlying object with id, value and
2348   *              extensions. The accessor "getSubtitle" gives direct access to
2349   *              the value
2350   */
2351  public ActivityDefinition setSubtitleElement(StringType value) {
2352    this.subtitle = value;
2353    return this;
2354  }
2355
2356  /**
2357   * @return An explanatory or alternate title for the activity definition giving
2358   *         additional information about its content.
2359   */
2360  public String getSubtitle() {
2361    return this.subtitle == null ? null : this.subtitle.getValue();
2362  }
2363
2364  /**
2365   * @param value An explanatory or alternate title for the activity definition
2366   *              giving additional information about its content.
2367   */
2368  public ActivityDefinition setSubtitle(String value) {
2369    if (Utilities.noString(value))
2370      this.subtitle = null;
2371    else {
2372      if (this.subtitle == null)
2373        this.subtitle = new StringType();
2374      this.subtitle.setValue(value);
2375    }
2376    return this;
2377  }
2378
2379  /**
2380   * @return {@link #status} (The status of this activity definition. Enables
2381   *         tracking the life-cycle of the content.). This is the underlying
2382   *         object with id, value and extensions. The accessor "getStatus" gives
2383   *         direct access to the value
2384   */
2385  public Enumeration<PublicationStatus> getStatusElement() {
2386    if (this.status == null)
2387      if (Configuration.errorOnAutoCreate())
2388        throw new Error("Attempt to auto-create ActivityDefinition.status");
2389      else if (Configuration.doAutoCreate())
2390        this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2391    return this.status;
2392  }
2393
2394  public boolean hasStatusElement() {
2395    return this.status != null && !this.status.isEmpty();
2396  }
2397
2398  public boolean hasStatus() {
2399    return this.status != null && !this.status.isEmpty();
2400  }
2401
2402  /**
2403   * @param value {@link #status} (The status of this activity definition. Enables
2404   *              tracking the life-cycle of the content.). This is the underlying
2405   *              object with id, value and extensions. The accessor "getStatus"
2406   *              gives direct access to the value
2407   */
2408  public ActivityDefinition setStatusElement(Enumeration<PublicationStatus> value) {
2409    this.status = value;
2410    return this;
2411  }
2412
2413  /**
2414   * @return The status of this activity definition. Enables tracking the
2415   *         life-cycle of the content.
2416   */
2417  public PublicationStatus getStatus() {
2418    return this.status == null ? null : this.status.getValue();
2419  }
2420
2421  /**
2422   * @param value The status of this activity definition. Enables tracking the
2423   *              life-cycle of the content.
2424   */
2425  public ActivityDefinition setStatus(PublicationStatus value) {
2426    if (this.status == null)
2427      this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2428    this.status.setValue(value);
2429    return this;
2430  }
2431
2432  /**
2433   * @return {@link #experimental} (A Boolean value to indicate that this activity
2434   *         definition is authored for testing purposes (or
2435   *         education/evaluation/marketing) and is not intended to be used for
2436   *         genuine usage.). This is the underlying object with id, value and
2437   *         extensions. The accessor "getExperimental" gives direct access to the
2438   *         value
2439   */
2440  public BooleanType getExperimentalElement() {
2441    if (this.experimental == null)
2442      if (Configuration.errorOnAutoCreate())
2443        throw new Error("Attempt to auto-create ActivityDefinition.experimental");
2444      else if (Configuration.doAutoCreate())
2445        this.experimental = new BooleanType(); // bb
2446    return this.experimental;
2447  }
2448
2449  public boolean hasExperimentalElement() {
2450    return this.experimental != null && !this.experimental.isEmpty();
2451  }
2452
2453  public boolean hasExperimental() {
2454    return this.experimental != null && !this.experimental.isEmpty();
2455  }
2456
2457  /**
2458   * @param value {@link #experimental} (A Boolean value to indicate that this
2459   *              activity definition is authored for testing purposes (or
2460   *              education/evaluation/marketing) and is not intended to be used
2461   *              for genuine usage.). This is the underlying object with id,
2462   *              value and extensions. The accessor "getExperimental" gives
2463   *              direct access to the value
2464   */
2465  public ActivityDefinition setExperimentalElement(BooleanType value) {
2466    this.experimental = value;
2467    return this;
2468  }
2469
2470  /**
2471   * @return A Boolean value to indicate that this activity definition is authored
2472   *         for testing purposes (or education/evaluation/marketing) and is not
2473   *         intended to be used for genuine usage.
2474   */
2475  public boolean getExperimental() {
2476    return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2477  }
2478
2479  /**
2480   * @param value A Boolean value to indicate that this activity definition is
2481   *              authored for testing purposes (or
2482   *              education/evaluation/marketing) and is not intended to be used
2483   *              for genuine usage.
2484   */
2485  public ActivityDefinition setExperimental(boolean value) {
2486    if (this.experimental == null)
2487      this.experimental = new BooleanType();
2488    this.experimental.setValue(value);
2489    return this;
2490  }
2491
2492  /**
2493   * @return {@link #subject} (A code or group definition that describes the
2494   *         intended subject of the activity being defined.)
2495   */
2496  public Type getSubject() {
2497    return this.subject;
2498  }
2499
2500  /**
2501   * @return {@link #subject} (A code or group definition that describes the
2502   *         intended subject of the activity being defined.)
2503   */
2504  public CodeableConcept getSubjectCodeableConcept() throws FHIRException {
2505    if (this.subject == null)
2506      this.subject = new CodeableConcept();
2507    if (!(this.subject instanceof CodeableConcept))
2508      throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "
2509          + this.subject.getClass().getName() + " was encountered");
2510    return (CodeableConcept) this.subject;
2511  }
2512
2513  public boolean hasSubjectCodeableConcept() {
2514    return this != null && this.subject instanceof CodeableConcept;
2515  }
2516
2517  /**
2518   * @return {@link #subject} (A code or group definition that describes the
2519   *         intended subject of the activity being defined.)
2520   */
2521  public Reference getSubjectReference() throws FHIRException {
2522    if (this.subject == null)
2523      this.subject = new Reference();
2524    if (!(this.subject instanceof Reference))
2525      throw new FHIRException("Type mismatch: the type Reference was expected, but " + this.subject.getClass().getName()
2526          + " was encountered");
2527    return (Reference) this.subject;
2528  }
2529
2530  public boolean hasSubjectReference() {
2531    return this != null && this.subject instanceof Reference;
2532  }
2533
2534  public boolean hasSubject() {
2535    return this.subject != null && !this.subject.isEmpty();
2536  }
2537
2538  /**
2539   * @param value {@link #subject} (A code or group definition that describes the
2540   *              intended subject of the activity being defined.)
2541   */
2542  public ActivityDefinition setSubject(Type value) {
2543    if (value != null && !(value instanceof CodeableConcept || value instanceof Reference))
2544      throw new Error("Not the right type for ActivityDefinition.subject[x]: " + value.fhirType());
2545    this.subject = value;
2546    return this;
2547  }
2548
2549  /**
2550   * @return {@link #date} (The date (and optionally time) when the activity
2551   *         definition was published. The date must change when the business
2552   *         version changes and it must change if the status code changes. In
2553   *         addition, it should change when the substantive content of the
2554   *         activity definition changes.). This is the underlying object with id,
2555   *         value and extensions. The accessor "getDate" gives direct access to
2556   *         the value
2557   */
2558  public DateTimeType getDateElement() {
2559    if (this.date == null)
2560      if (Configuration.errorOnAutoCreate())
2561        throw new Error("Attempt to auto-create ActivityDefinition.date");
2562      else if (Configuration.doAutoCreate())
2563        this.date = new DateTimeType(); // bb
2564    return this.date;
2565  }
2566
2567  public boolean hasDateElement() {
2568    return this.date != null && !this.date.isEmpty();
2569  }
2570
2571  public boolean hasDate() {
2572    return this.date != null && !this.date.isEmpty();
2573  }
2574
2575  /**
2576   * @param value {@link #date} (The date (and optionally time) when the activity
2577   *              definition was published. The date must change when the business
2578   *              version changes and it must change if the status code changes.
2579   *              In addition, it should change when the substantive content of
2580   *              the activity definition changes.). This is the underlying object
2581   *              with id, value and extensions. The accessor "getDate" gives
2582   *              direct access to the value
2583   */
2584  public ActivityDefinition setDateElement(DateTimeType value) {
2585    this.date = value;
2586    return this;
2587  }
2588
2589  /**
2590   * @return The date (and optionally time) when the activity definition was
2591   *         published. The date must change when the business version changes and
2592   *         it must change if the status code changes. In addition, it should
2593   *         change when the substantive content of the activity definition
2594   *         changes.
2595   */
2596  public Date getDate() {
2597    return this.date == null ? null : this.date.getValue();
2598  }
2599
2600  /**
2601   * @param value The date (and optionally time) when the activity definition was
2602   *              published. The date must change when the business version
2603   *              changes and it must change if the status code changes. In
2604   *              addition, it should change when the substantive content of the
2605   *              activity definition changes.
2606   */
2607  public ActivityDefinition setDate(Date value) {
2608    if (value == null)
2609      this.date = null;
2610    else {
2611      if (this.date == null)
2612        this.date = new DateTimeType();
2613      this.date.setValue(value);
2614    }
2615    return this;
2616  }
2617
2618  /**
2619   * @return {@link #publisher} (The name of the organization or individual that
2620   *         published the activity definition.). This is the underlying object
2621   *         with id, value and extensions. The accessor "getPublisher" gives
2622   *         direct access to the value
2623   */
2624  public StringType getPublisherElement() {
2625    if (this.publisher == null)
2626      if (Configuration.errorOnAutoCreate())
2627        throw new Error("Attempt to auto-create ActivityDefinition.publisher");
2628      else if (Configuration.doAutoCreate())
2629        this.publisher = new StringType(); // bb
2630    return this.publisher;
2631  }
2632
2633  public boolean hasPublisherElement() {
2634    return this.publisher != null && !this.publisher.isEmpty();
2635  }
2636
2637  public boolean hasPublisher() {
2638    return this.publisher != null && !this.publisher.isEmpty();
2639  }
2640
2641  /**
2642   * @param value {@link #publisher} (The name of the organization or individual
2643   *              that published the activity definition.). This is the underlying
2644   *              object with id, value and extensions. The accessor
2645   *              "getPublisher" gives direct access to the value
2646   */
2647  public ActivityDefinition setPublisherElement(StringType value) {
2648    this.publisher = value;
2649    return this;
2650  }
2651
2652  /**
2653   * @return The name of the organization or individual that published the
2654   *         activity definition.
2655   */
2656  public String getPublisher() {
2657    return this.publisher == null ? null : this.publisher.getValue();
2658  }
2659
2660  /**
2661   * @param value The name of the organization or individual that published the
2662   *              activity definition.
2663   */
2664  public ActivityDefinition setPublisher(String value) {
2665    if (Utilities.noString(value))
2666      this.publisher = null;
2667    else {
2668      if (this.publisher == null)
2669        this.publisher = new StringType();
2670      this.publisher.setValue(value);
2671    }
2672    return this;
2673  }
2674
2675  /**
2676   * @return {@link #contact} (Contact details to assist a user in finding and
2677   *         communicating with the publisher.)
2678   */
2679  public List<ContactDetail> getContact() {
2680    if (this.contact == null)
2681      this.contact = new ArrayList<ContactDetail>();
2682    return this.contact;
2683  }
2684
2685  /**
2686   * @return Returns a reference to <code>this</code> for easy method chaining
2687   */
2688  public ActivityDefinition setContact(List<ContactDetail> theContact) {
2689    this.contact = theContact;
2690    return this;
2691  }
2692
2693  public boolean hasContact() {
2694    if (this.contact == null)
2695      return false;
2696    for (ContactDetail item : this.contact)
2697      if (!item.isEmpty())
2698        return true;
2699    return false;
2700  }
2701
2702  public ContactDetail addContact() { // 3
2703    ContactDetail t = new ContactDetail();
2704    if (this.contact == null)
2705      this.contact = new ArrayList<ContactDetail>();
2706    this.contact.add(t);
2707    return t;
2708  }
2709
2710  public ActivityDefinition addContact(ContactDetail t) { // 3
2711    if (t == null)
2712      return this;
2713    if (this.contact == null)
2714      this.contact = new ArrayList<ContactDetail>();
2715    this.contact.add(t);
2716    return this;
2717  }
2718
2719  /**
2720   * @return The first repetition of repeating field {@link #contact}, creating it
2721   *         if it does not already exist
2722   */
2723  public ContactDetail getContactFirstRep() {
2724    if (getContact().isEmpty()) {
2725      addContact();
2726    }
2727    return getContact().get(0);
2728  }
2729
2730  /**
2731   * @return {@link #description} (A free text natural language description of the
2732   *         activity definition from a consumer's perspective.). This is the
2733   *         underlying object with id, value and extensions. The accessor
2734   *         "getDescription" gives direct access to the value
2735   */
2736  public MarkdownType getDescriptionElement() {
2737    if (this.description == null)
2738      if (Configuration.errorOnAutoCreate())
2739        throw new Error("Attempt to auto-create ActivityDefinition.description");
2740      else if (Configuration.doAutoCreate())
2741        this.description = new MarkdownType(); // bb
2742    return this.description;
2743  }
2744
2745  public boolean hasDescriptionElement() {
2746    return this.description != null && !this.description.isEmpty();
2747  }
2748
2749  public boolean hasDescription() {
2750    return this.description != null && !this.description.isEmpty();
2751  }
2752
2753  /**
2754   * @param value {@link #description} (A free text natural language description
2755   *              of the activity definition from a consumer's perspective.). This
2756   *              is the underlying object with id, value and extensions. The
2757   *              accessor "getDescription" gives direct access to the value
2758   */
2759  public ActivityDefinition setDescriptionElement(MarkdownType value) {
2760    this.description = value;
2761    return this;
2762  }
2763
2764  /**
2765   * @return A free text natural language description of the activity definition
2766   *         from a consumer's perspective.
2767   */
2768  public String getDescription() {
2769    return this.description == null ? null : this.description.getValue();
2770  }
2771
2772  /**
2773   * @param value A free text natural language description of the activity
2774   *              definition from a consumer's perspective.
2775   */
2776  public ActivityDefinition setDescription(String value) {
2777    if (value == null)
2778      this.description = null;
2779    else {
2780      if (this.description == null)
2781        this.description = new MarkdownType();
2782      this.description.setValue(value);
2783    }
2784    return this;
2785  }
2786
2787  /**
2788   * @return {@link #useContext} (The content was developed with a focus and
2789   *         intent of supporting the contexts that are listed. These contexts may
2790   *         be general categories (gender, age, ...) or may be references to
2791   *         specific programs (insurance plans, studies, ...) and may be used to
2792   *         assist with indexing and searching for appropriate activity
2793   *         definition instances.)
2794   */
2795  public List<UsageContext> getUseContext() {
2796    if (this.useContext == null)
2797      this.useContext = new ArrayList<UsageContext>();
2798    return this.useContext;
2799  }
2800
2801  /**
2802   * @return Returns a reference to <code>this</code> for easy method chaining
2803   */
2804  public ActivityDefinition setUseContext(List<UsageContext> theUseContext) {
2805    this.useContext = theUseContext;
2806    return this;
2807  }
2808
2809  public boolean hasUseContext() {
2810    if (this.useContext == null)
2811      return false;
2812    for (UsageContext item : this.useContext)
2813      if (!item.isEmpty())
2814        return true;
2815    return false;
2816  }
2817
2818  public UsageContext addUseContext() { // 3
2819    UsageContext t = new UsageContext();
2820    if (this.useContext == null)
2821      this.useContext = new ArrayList<UsageContext>();
2822    this.useContext.add(t);
2823    return t;
2824  }
2825
2826  public ActivityDefinition addUseContext(UsageContext t) { // 3
2827    if (t == null)
2828      return this;
2829    if (this.useContext == null)
2830      this.useContext = new ArrayList<UsageContext>();
2831    this.useContext.add(t);
2832    return this;
2833  }
2834
2835  /**
2836   * @return The first repetition of repeating field {@link #useContext}, creating
2837   *         it if it does not already exist
2838   */
2839  public UsageContext getUseContextFirstRep() {
2840    if (getUseContext().isEmpty()) {
2841      addUseContext();
2842    }
2843    return getUseContext().get(0);
2844  }
2845
2846  /**
2847   * @return {@link #jurisdiction} (A legal or geographic region in which the
2848   *         activity definition is intended to be used.)
2849   */
2850  public List<CodeableConcept> getJurisdiction() {
2851    if (this.jurisdiction == null)
2852      this.jurisdiction = new ArrayList<CodeableConcept>();
2853    return this.jurisdiction;
2854  }
2855
2856  /**
2857   * @return Returns a reference to <code>this</code> for easy method chaining
2858   */
2859  public ActivityDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) {
2860    this.jurisdiction = theJurisdiction;
2861    return this;
2862  }
2863
2864  public boolean hasJurisdiction() {
2865    if (this.jurisdiction == null)
2866      return false;
2867    for (CodeableConcept item : this.jurisdiction)
2868      if (!item.isEmpty())
2869        return true;
2870    return false;
2871  }
2872
2873  public CodeableConcept addJurisdiction() { // 3
2874    CodeableConcept t = new CodeableConcept();
2875    if (this.jurisdiction == null)
2876      this.jurisdiction = new ArrayList<CodeableConcept>();
2877    this.jurisdiction.add(t);
2878    return t;
2879  }
2880
2881  public ActivityDefinition addJurisdiction(CodeableConcept t) { // 3
2882    if (t == null)
2883      return this;
2884    if (this.jurisdiction == null)
2885      this.jurisdiction = new ArrayList<CodeableConcept>();
2886    this.jurisdiction.add(t);
2887    return this;
2888  }
2889
2890  /**
2891   * @return The first repetition of repeating field {@link #jurisdiction},
2892   *         creating it if it does not already exist
2893   */
2894  public CodeableConcept getJurisdictionFirstRep() {
2895    if (getJurisdiction().isEmpty()) {
2896      addJurisdiction();
2897    }
2898    return getJurisdiction().get(0);
2899  }
2900
2901  /**
2902   * @return {@link #purpose} (Explanation of why this activity definition is
2903   *         needed and why it has been designed as it has.). This is the
2904   *         underlying object with id, value and extensions. The accessor
2905   *         "getPurpose" gives direct access to the value
2906   */
2907  public MarkdownType getPurposeElement() {
2908    if (this.purpose == null)
2909      if (Configuration.errorOnAutoCreate())
2910        throw new Error("Attempt to auto-create ActivityDefinition.purpose");
2911      else if (Configuration.doAutoCreate())
2912        this.purpose = new MarkdownType(); // bb
2913    return this.purpose;
2914  }
2915
2916  public boolean hasPurposeElement() {
2917    return this.purpose != null && !this.purpose.isEmpty();
2918  }
2919
2920  public boolean hasPurpose() {
2921    return this.purpose != null && !this.purpose.isEmpty();
2922  }
2923
2924  /**
2925   * @param value {@link #purpose} (Explanation of why this activity definition is
2926   *              needed and why it has been designed as it has.). This is the
2927   *              underlying object with id, value and extensions. The accessor
2928   *              "getPurpose" gives direct access to the value
2929   */
2930  public ActivityDefinition setPurposeElement(MarkdownType value) {
2931    this.purpose = value;
2932    return this;
2933  }
2934
2935  /**
2936   * @return Explanation of why this activity definition is needed and why it has
2937   *         been designed as it has.
2938   */
2939  public String getPurpose() {
2940    return this.purpose == null ? null : this.purpose.getValue();
2941  }
2942
2943  /**
2944   * @param value Explanation of why this activity definition is needed and why it
2945   *              has been designed as it has.
2946   */
2947  public ActivityDefinition setPurpose(String value) {
2948    if (value == null)
2949      this.purpose = null;
2950    else {
2951      if (this.purpose == null)
2952        this.purpose = new MarkdownType();
2953      this.purpose.setValue(value);
2954    }
2955    return this;
2956  }
2957
2958  /**
2959   * @return {@link #usage} (A detailed description of how the activity definition
2960   *         is used from a clinical perspective.). This is the underlying object
2961   *         with id, value and extensions. The accessor "getUsage" gives direct
2962   *         access to the value
2963   */
2964  public StringType getUsageElement() {
2965    if (this.usage == null)
2966      if (Configuration.errorOnAutoCreate())
2967        throw new Error("Attempt to auto-create ActivityDefinition.usage");
2968      else if (Configuration.doAutoCreate())
2969        this.usage = new StringType(); // bb
2970    return this.usage;
2971  }
2972
2973  public boolean hasUsageElement() {
2974    return this.usage != null && !this.usage.isEmpty();
2975  }
2976
2977  public boolean hasUsage() {
2978    return this.usage != null && !this.usage.isEmpty();
2979  }
2980
2981  /**
2982   * @param value {@link #usage} (A detailed description of how the activity
2983   *              definition is used from a clinical perspective.). This is the
2984   *              underlying object with id, value and extensions. The accessor
2985   *              "getUsage" gives direct access to the value
2986   */
2987  public ActivityDefinition setUsageElement(StringType value) {
2988    this.usage = value;
2989    return this;
2990  }
2991
2992  /**
2993   * @return A detailed description of how the activity definition is used from a
2994   *         clinical perspective.
2995   */
2996  public String getUsage() {
2997    return this.usage == null ? null : this.usage.getValue();
2998  }
2999
3000  /**
3001   * @param value A detailed description of how the activity definition is used
3002   *              from a clinical perspective.
3003   */
3004  public ActivityDefinition setUsage(String value) {
3005    if (Utilities.noString(value))
3006      this.usage = null;
3007    else {
3008      if (this.usage == null)
3009        this.usage = new StringType();
3010      this.usage.setValue(value);
3011    }
3012    return this;
3013  }
3014
3015  /**
3016   * @return {@link #copyright} (A copyright statement relating to the activity
3017   *         definition and/or its contents. Copyright statements are generally
3018   *         legal restrictions on the use and publishing of the activity
3019   *         definition.). This is the underlying object with id, value and
3020   *         extensions. The accessor "getCopyright" gives direct access to the
3021   *         value
3022   */
3023  public MarkdownType getCopyrightElement() {
3024    if (this.copyright == null)
3025      if (Configuration.errorOnAutoCreate())
3026        throw new Error("Attempt to auto-create ActivityDefinition.copyright");
3027      else if (Configuration.doAutoCreate())
3028        this.copyright = new MarkdownType(); // bb
3029    return this.copyright;
3030  }
3031
3032  public boolean hasCopyrightElement() {
3033    return this.copyright != null && !this.copyright.isEmpty();
3034  }
3035
3036  public boolean hasCopyright() {
3037    return this.copyright != null && !this.copyright.isEmpty();
3038  }
3039
3040  /**
3041   * @param value {@link #copyright} (A copyright statement relating to the
3042   *              activity definition and/or its contents. Copyright statements
3043   *              are generally legal restrictions on the use and publishing of
3044   *              the activity definition.). This is the underlying object with
3045   *              id, value and extensions. The accessor "getCopyright" gives
3046   *              direct access to the value
3047   */
3048  public ActivityDefinition setCopyrightElement(MarkdownType value) {
3049    this.copyright = value;
3050    return this;
3051  }
3052
3053  /**
3054   * @return A copyright statement relating to the activity definition and/or its
3055   *         contents. Copyright statements are generally legal restrictions on
3056   *         the use and publishing of the activity definition.
3057   */
3058  public String getCopyright() {
3059    return this.copyright == null ? null : this.copyright.getValue();
3060  }
3061
3062  /**
3063   * @param value A copyright statement relating to the activity definition and/or
3064   *              its contents. Copyright statements are generally legal
3065   *              restrictions on the use and publishing of the activity
3066   *              definition.
3067   */
3068  public ActivityDefinition setCopyright(String value) {
3069    if (value == null)
3070      this.copyright = null;
3071    else {
3072      if (this.copyright == null)
3073        this.copyright = new MarkdownType();
3074      this.copyright.setValue(value);
3075    }
3076    return this;
3077  }
3078
3079  /**
3080   * @return {@link #approvalDate} (The date on which the resource content was
3081   *         approved by the publisher. Approval happens once when the content is
3082   *         officially approved for usage.). This is the underlying object with
3083   *         id, value and extensions. The accessor "getApprovalDate" gives direct
3084   *         access to the value
3085   */
3086  public DateType getApprovalDateElement() {
3087    if (this.approvalDate == null)
3088      if (Configuration.errorOnAutoCreate())
3089        throw new Error("Attempt to auto-create ActivityDefinition.approvalDate");
3090      else if (Configuration.doAutoCreate())
3091        this.approvalDate = new DateType(); // bb
3092    return this.approvalDate;
3093  }
3094
3095  public boolean hasApprovalDateElement() {
3096    return this.approvalDate != null && !this.approvalDate.isEmpty();
3097  }
3098
3099  public boolean hasApprovalDate() {
3100    return this.approvalDate != null && !this.approvalDate.isEmpty();
3101  }
3102
3103  /**
3104   * @param value {@link #approvalDate} (The date on which the resource content
3105   *              was approved by the publisher. Approval happens once when the
3106   *              content is officially approved for usage.). This is the
3107   *              underlying object with id, value and extensions. The accessor
3108   *              "getApprovalDate" gives direct access to the value
3109   */
3110  public ActivityDefinition setApprovalDateElement(DateType value) {
3111    this.approvalDate = value;
3112    return this;
3113  }
3114
3115  /**
3116   * @return The date on which the resource content was approved by the publisher.
3117   *         Approval happens once when the content is officially approved for
3118   *         usage.
3119   */
3120  public Date getApprovalDate() {
3121    return this.approvalDate == null ? null : this.approvalDate.getValue();
3122  }
3123
3124  /**
3125   * @param value The date on which the resource content was approved by the
3126   *              publisher. Approval happens once when the content is officially
3127   *              approved for usage.
3128   */
3129  public ActivityDefinition setApprovalDate(Date value) {
3130    if (value == null)
3131      this.approvalDate = null;
3132    else {
3133      if (this.approvalDate == null)
3134        this.approvalDate = new DateType();
3135      this.approvalDate.setValue(value);
3136    }
3137    return this;
3138  }
3139
3140  /**
3141   * @return {@link #lastReviewDate} (The date on which the resource content was
3142   *         last reviewed. Review happens periodically after approval but does
3143   *         not change the original approval date.). This is the underlying
3144   *         object with id, value and extensions. The accessor
3145   *         "getLastReviewDate" gives direct access to the value
3146   */
3147  public DateType getLastReviewDateElement() {
3148    if (this.lastReviewDate == null)
3149      if (Configuration.errorOnAutoCreate())
3150        throw new Error("Attempt to auto-create ActivityDefinition.lastReviewDate");
3151      else if (Configuration.doAutoCreate())
3152        this.lastReviewDate = new DateType(); // bb
3153    return this.lastReviewDate;
3154  }
3155
3156  public boolean hasLastReviewDateElement() {
3157    return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3158  }
3159
3160  public boolean hasLastReviewDate() {
3161    return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3162  }
3163
3164  /**
3165   * @param value {@link #lastReviewDate} (The date on which the resource content
3166   *              was last reviewed. Review happens periodically after approval
3167   *              but does not change the original approval date.). This is the
3168   *              underlying object with id, value and extensions. The accessor
3169   *              "getLastReviewDate" gives direct access to the value
3170   */
3171  public ActivityDefinition setLastReviewDateElement(DateType value) {
3172    this.lastReviewDate = value;
3173    return this;
3174  }
3175
3176  /**
3177   * @return The date on which the resource content was last reviewed. Review
3178   *         happens periodically after approval but does not change the original
3179   *         approval date.
3180   */
3181  public Date getLastReviewDate() {
3182    return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
3183  }
3184
3185  /**
3186   * @param value The date on which the resource content was last reviewed. Review
3187   *              happens periodically after approval but does not change the
3188   *              original approval date.
3189   */
3190  public ActivityDefinition setLastReviewDate(Date value) {
3191    if (value == null)
3192      this.lastReviewDate = null;
3193    else {
3194      if (this.lastReviewDate == null)
3195        this.lastReviewDate = new DateType();
3196      this.lastReviewDate.setValue(value);
3197    }
3198    return this;
3199  }
3200
3201  /**
3202   * @return {@link #effectivePeriod} (The period during which the activity
3203   *         definition content was or is planned to be in active use.)
3204   */
3205  public Period getEffectivePeriod() {
3206    if (this.effectivePeriod == null)
3207      if (Configuration.errorOnAutoCreate())
3208        throw new Error("Attempt to auto-create ActivityDefinition.effectivePeriod");
3209      else if (Configuration.doAutoCreate())
3210        this.effectivePeriod = new Period(); // cc
3211    return this.effectivePeriod;
3212  }
3213
3214  public boolean hasEffectivePeriod() {
3215    return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
3216  }
3217
3218  /**
3219   * @param value {@link #effectivePeriod} (The period during which the activity
3220   *              definition content was or is planned to be in active use.)
3221   */
3222  public ActivityDefinition setEffectivePeriod(Period value) {
3223    this.effectivePeriod = value;
3224    return this;
3225  }
3226
3227  /**
3228   * @return {@link #topic} (Descriptive topics related to the content of the
3229   *         activity. Topics provide a high-level categorization of the activity
3230   *         that can be useful for filtering and searching.)
3231   */
3232  public List<CodeableConcept> getTopic() {
3233    if (this.topic == null)
3234      this.topic = new ArrayList<CodeableConcept>();
3235    return this.topic;
3236  }
3237
3238  /**
3239   * @return Returns a reference to <code>this</code> for easy method chaining
3240   */
3241  public ActivityDefinition setTopic(List<CodeableConcept> theTopic) {
3242    this.topic = theTopic;
3243    return this;
3244  }
3245
3246  public boolean hasTopic() {
3247    if (this.topic == null)
3248      return false;
3249    for (CodeableConcept item : this.topic)
3250      if (!item.isEmpty())
3251        return true;
3252    return false;
3253  }
3254
3255  public CodeableConcept addTopic() { // 3
3256    CodeableConcept t = new CodeableConcept();
3257    if (this.topic == null)
3258      this.topic = new ArrayList<CodeableConcept>();
3259    this.topic.add(t);
3260    return t;
3261  }
3262
3263  public ActivityDefinition addTopic(CodeableConcept t) { // 3
3264    if (t == null)
3265      return this;
3266    if (this.topic == null)
3267      this.topic = new ArrayList<CodeableConcept>();
3268    this.topic.add(t);
3269    return this;
3270  }
3271
3272  /**
3273   * @return The first repetition of repeating field {@link #topic}, creating it
3274   *         if it does not already exist
3275   */
3276  public CodeableConcept getTopicFirstRep() {
3277    if (getTopic().isEmpty()) {
3278      addTopic();
3279    }
3280    return getTopic().get(0);
3281  }
3282
3283  /**
3284   * @return {@link #author} (An individiual or organization primarily involved in
3285   *         the creation and maintenance of the content.)
3286   */
3287  public List<ContactDetail> getAuthor() {
3288    if (this.author == null)
3289      this.author = new ArrayList<ContactDetail>();
3290    return this.author;
3291  }
3292
3293  /**
3294   * @return Returns a reference to <code>this</code> for easy method chaining
3295   */
3296  public ActivityDefinition setAuthor(List<ContactDetail> theAuthor) {
3297    this.author = theAuthor;
3298    return this;
3299  }
3300
3301  public boolean hasAuthor() {
3302    if (this.author == null)
3303      return false;
3304    for (ContactDetail item : this.author)
3305      if (!item.isEmpty())
3306        return true;
3307    return false;
3308  }
3309
3310  public ContactDetail addAuthor() { // 3
3311    ContactDetail t = new ContactDetail();
3312    if (this.author == null)
3313      this.author = new ArrayList<ContactDetail>();
3314    this.author.add(t);
3315    return t;
3316  }
3317
3318  public ActivityDefinition addAuthor(ContactDetail t) { // 3
3319    if (t == null)
3320      return this;
3321    if (this.author == null)
3322      this.author = new ArrayList<ContactDetail>();
3323    this.author.add(t);
3324    return this;
3325  }
3326
3327  /**
3328   * @return The first repetition of repeating field {@link #author}, creating it
3329   *         if it does not already exist
3330   */
3331  public ContactDetail getAuthorFirstRep() {
3332    if (getAuthor().isEmpty()) {
3333      addAuthor();
3334    }
3335    return getAuthor().get(0);
3336  }
3337
3338  /**
3339   * @return {@link #editor} (An individual or organization primarily responsible
3340   *         for internal coherence of the content.)
3341   */
3342  public List<ContactDetail> getEditor() {
3343    if (this.editor == null)
3344      this.editor = new ArrayList<ContactDetail>();
3345    return this.editor;
3346  }
3347
3348  /**
3349   * @return Returns a reference to <code>this</code> for easy method chaining
3350   */
3351  public ActivityDefinition setEditor(List<ContactDetail> theEditor) {
3352    this.editor = theEditor;
3353    return this;
3354  }
3355
3356  public boolean hasEditor() {
3357    if (this.editor == null)
3358      return false;
3359    for (ContactDetail item : this.editor)
3360      if (!item.isEmpty())
3361        return true;
3362    return false;
3363  }
3364
3365  public ContactDetail addEditor() { // 3
3366    ContactDetail t = new ContactDetail();
3367    if (this.editor == null)
3368      this.editor = new ArrayList<ContactDetail>();
3369    this.editor.add(t);
3370    return t;
3371  }
3372
3373  public ActivityDefinition addEditor(ContactDetail t) { // 3
3374    if (t == null)
3375      return this;
3376    if (this.editor == null)
3377      this.editor = new ArrayList<ContactDetail>();
3378    this.editor.add(t);
3379    return this;
3380  }
3381
3382  /**
3383   * @return The first repetition of repeating field {@link #editor}, creating it
3384   *         if it does not already exist
3385   */
3386  public ContactDetail getEditorFirstRep() {
3387    if (getEditor().isEmpty()) {
3388      addEditor();
3389    }
3390    return getEditor().get(0);
3391  }
3392
3393  /**
3394   * @return {@link #reviewer} (An individual or organization primarily
3395   *         responsible for review of some aspect of the content.)
3396   */
3397  public List<ContactDetail> getReviewer() {
3398    if (this.reviewer == null)
3399      this.reviewer = new ArrayList<ContactDetail>();
3400    return this.reviewer;
3401  }
3402
3403  /**
3404   * @return Returns a reference to <code>this</code> for easy method chaining
3405   */
3406  public ActivityDefinition setReviewer(List<ContactDetail> theReviewer) {
3407    this.reviewer = theReviewer;
3408    return this;
3409  }
3410
3411  public boolean hasReviewer() {
3412    if (this.reviewer == null)
3413      return false;
3414    for (ContactDetail item : this.reviewer)
3415      if (!item.isEmpty())
3416        return true;
3417    return false;
3418  }
3419
3420  public ContactDetail addReviewer() { // 3
3421    ContactDetail t = new ContactDetail();
3422    if (this.reviewer == null)
3423      this.reviewer = new ArrayList<ContactDetail>();
3424    this.reviewer.add(t);
3425    return t;
3426  }
3427
3428  public ActivityDefinition addReviewer(ContactDetail t) { // 3
3429    if (t == null)
3430      return this;
3431    if (this.reviewer == null)
3432      this.reviewer = new ArrayList<ContactDetail>();
3433    this.reviewer.add(t);
3434    return this;
3435  }
3436
3437  /**
3438   * @return The first repetition of repeating field {@link #reviewer}, creating
3439   *         it if it does not already exist
3440   */
3441  public ContactDetail getReviewerFirstRep() {
3442    if (getReviewer().isEmpty()) {
3443      addReviewer();
3444    }
3445    return getReviewer().get(0);
3446  }
3447
3448  /**
3449   * @return {@link #endorser} (An individual or organization responsible for
3450   *         officially endorsing the content for use in some setting.)
3451   */
3452  public List<ContactDetail> getEndorser() {
3453    if (this.endorser == null)
3454      this.endorser = new ArrayList<ContactDetail>();
3455    return this.endorser;
3456  }
3457
3458  /**
3459   * @return Returns a reference to <code>this</code> for easy method chaining
3460   */
3461  public ActivityDefinition setEndorser(List<ContactDetail> theEndorser) {
3462    this.endorser = theEndorser;
3463    return this;
3464  }
3465
3466  public boolean hasEndorser() {
3467    if (this.endorser == null)
3468      return false;
3469    for (ContactDetail item : this.endorser)
3470      if (!item.isEmpty())
3471        return true;
3472    return false;
3473  }
3474
3475  public ContactDetail addEndorser() { // 3
3476    ContactDetail t = new ContactDetail();
3477    if (this.endorser == null)
3478      this.endorser = new ArrayList<ContactDetail>();
3479    this.endorser.add(t);
3480    return t;
3481  }
3482
3483  public ActivityDefinition addEndorser(ContactDetail t) { // 3
3484    if (t == null)
3485      return this;
3486    if (this.endorser == null)
3487      this.endorser = new ArrayList<ContactDetail>();
3488    this.endorser.add(t);
3489    return this;
3490  }
3491
3492  /**
3493   * @return The first repetition of repeating field {@link #endorser}, creating
3494   *         it if it does not already exist
3495   */
3496  public ContactDetail getEndorserFirstRep() {
3497    if (getEndorser().isEmpty()) {
3498      addEndorser();
3499    }
3500    return getEndorser().get(0);
3501  }
3502
3503  /**
3504   * @return {@link #relatedArtifact} (Related artifacts such as additional
3505   *         documentation, justification, or bibliographic references.)
3506   */
3507  public List<RelatedArtifact> getRelatedArtifact() {
3508    if (this.relatedArtifact == null)
3509      this.relatedArtifact = new ArrayList<RelatedArtifact>();
3510    return this.relatedArtifact;
3511  }
3512
3513  /**
3514   * @return Returns a reference to <code>this</code> for easy method chaining
3515   */
3516  public ActivityDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) {
3517    this.relatedArtifact = theRelatedArtifact;
3518    return this;
3519  }
3520
3521  public boolean hasRelatedArtifact() {
3522    if (this.relatedArtifact == null)
3523      return false;
3524    for (RelatedArtifact item : this.relatedArtifact)
3525      if (!item.isEmpty())
3526        return true;
3527    return false;
3528  }
3529
3530  public RelatedArtifact addRelatedArtifact() { // 3
3531    RelatedArtifact t = new RelatedArtifact();
3532    if (this.relatedArtifact == null)
3533      this.relatedArtifact = new ArrayList<RelatedArtifact>();
3534    this.relatedArtifact.add(t);
3535    return t;
3536  }
3537
3538  public ActivityDefinition addRelatedArtifact(RelatedArtifact t) { // 3
3539    if (t == null)
3540      return this;
3541    if (this.relatedArtifact == null)
3542      this.relatedArtifact = new ArrayList<RelatedArtifact>();
3543    this.relatedArtifact.add(t);
3544    return this;
3545  }
3546
3547  /**
3548   * @return The first repetition of repeating field {@link #relatedArtifact},
3549   *         creating it if it does not already exist
3550   */
3551  public RelatedArtifact getRelatedArtifactFirstRep() {
3552    if (getRelatedArtifact().isEmpty()) {
3553      addRelatedArtifact();
3554    }
3555    return getRelatedArtifact().get(0);
3556  }
3557
3558  /**
3559   * @return {@link #library} (A reference to a Library resource containing any
3560   *         formal logic used by the activity definition.)
3561   */
3562  public List<CanonicalType> getLibrary() {
3563    if (this.library == null)
3564      this.library = new ArrayList<CanonicalType>();
3565    return this.library;
3566  }
3567
3568  /**
3569   * @return Returns a reference to <code>this</code> for easy method chaining
3570   */
3571  public ActivityDefinition setLibrary(List<CanonicalType> theLibrary) {
3572    this.library = theLibrary;
3573    return this;
3574  }
3575
3576  public boolean hasLibrary() {
3577    if (this.library == null)
3578      return false;
3579    for (CanonicalType item : this.library)
3580      if (!item.isEmpty())
3581        return true;
3582    return false;
3583  }
3584
3585  /**
3586   * @return {@link #library} (A reference to a Library resource containing any
3587   *         formal logic used by the activity definition.)
3588   */
3589  public CanonicalType addLibraryElement() {// 2
3590    CanonicalType t = new CanonicalType();
3591    if (this.library == null)
3592      this.library = new ArrayList<CanonicalType>();
3593    this.library.add(t);
3594    return t;
3595  }
3596
3597  /**
3598   * @param value {@link #library} (A reference to a Library resource containing
3599   *              any formal logic used by the activity definition.)
3600   */
3601  public ActivityDefinition addLibrary(String value) { // 1
3602    CanonicalType t = new CanonicalType();
3603    t.setValue(value);
3604    if (this.library == null)
3605      this.library = new ArrayList<CanonicalType>();
3606    this.library.add(t);
3607    return this;
3608  }
3609
3610  /**
3611   * @param value {@link #library} (A reference to a Library resource containing
3612   *              any formal logic used by the activity definition.)
3613   */
3614  public boolean hasLibrary(String value) {
3615    if (this.library == null)
3616      return false;
3617    for (CanonicalType v : this.library)
3618      if (v.getValue().equals(value)) // canonical(Library)
3619        return true;
3620    return false;
3621  }
3622
3623  /**
3624   * @return {@link #kind} (A description of the kind of resource the activity
3625   *         definition is representing. For example, a MedicationRequest, a
3626   *         ServiceRequest, or a CommunicationRequest. Typically, but not always,
3627   *         this is a Request resource.). This is the underlying object with id,
3628   *         value and extensions. The accessor "getKind" gives direct access to
3629   *         the value
3630   */
3631  public Enumeration<ActivityDefinitionKind> getKindElement() {
3632    if (this.kind == null)
3633      if (Configuration.errorOnAutoCreate())
3634        throw new Error("Attempt to auto-create ActivityDefinition.kind");
3635      else if (Configuration.doAutoCreate())
3636        this.kind = new Enumeration<ActivityDefinitionKind>(new ActivityDefinitionKindEnumFactory()); // bb
3637    return this.kind;
3638  }
3639
3640  public boolean hasKindElement() {
3641    return this.kind != null && !this.kind.isEmpty();
3642  }
3643
3644  public boolean hasKind() {
3645    return this.kind != null && !this.kind.isEmpty();
3646  }
3647
3648  /**
3649   * @param value {@link #kind} (A description of the kind of resource the
3650   *              activity definition is representing. For example, a
3651   *              MedicationRequest, a ServiceRequest, or a CommunicationRequest.
3652   *              Typically, but not always, this is a Request resource.). This is
3653   *              the underlying object with id, value and extensions. The
3654   *              accessor "getKind" gives direct access to the value
3655   */
3656  public ActivityDefinition setKindElement(Enumeration<ActivityDefinitionKind> value) {
3657    this.kind = value;
3658    return this;
3659  }
3660
3661  /**
3662   * @return A description of the kind of resource the activity definition is
3663   *         representing. For example, a MedicationRequest, a ServiceRequest, or
3664   *         a CommunicationRequest. Typically, but not always, this is a Request
3665   *         resource.
3666   */
3667  public ActivityDefinitionKind getKind() {
3668    return this.kind == null ? null : this.kind.getValue();
3669  }
3670
3671  /**
3672   * @param value A description of the kind of resource the activity definition is
3673   *              representing. For example, a MedicationRequest, a
3674   *              ServiceRequest, or a CommunicationRequest. Typically, but not
3675   *              always, this is a Request resource.
3676   */
3677  public ActivityDefinition setKind(ActivityDefinitionKind value) {
3678    if (value == null)
3679      this.kind = null;
3680    else {
3681      if (this.kind == null)
3682        this.kind = new Enumeration<ActivityDefinitionKind>(new ActivityDefinitionKindEnumFactory());
3683      this.kind.setValue(value);
3684    }
3685    return this;
3686  }
3687
3688  /**
3689   * @return {@link #profile} (A profile to which the target of the activity
3690   *         definition is expected to conform.). This is the underlying object
3691   *         with id, value and extensions. The accessor "getProfile" gives direct
3692   *         access to the value
3693   */
3694  public CanonicalType getProfileElement() {
3695    if (this.profile == null)
3696      if (Configuration.errorOnAutoCreate())
3697        throw new Error("Attempt to auto-create ActivityDefinition.profile");
3698      else if (Configuration.doAutoCreate())
3699        this.profile = new CanonicalType(); // bb
3700    return this.profile;
3701  }
3702
3703  public boolean hasProfileElement() {
3704    return this.profile != null && !this.profile.isEmpty();
3705  }
3706
3707  public boolean hasProfile() {
3708    return this.profile != null && !this.profile.isEmpty();
3709  }
3710
3711  /**
3712   * @param value {@link #profile} (A profile to which the target of the activity
3713   *              definition is expected to conform.). This is the underlying
3714   *              object with id, value and extensions. The accessor "getProfile"
3715   *              gives direct access to the value
3716   */
3717  public ActivityDefinition setProfileElement(CanonicalType value) {
3718    this.profile = value;
3719    return this;
3720  }
3721
3722  /**
3723   * @return A profile to which the target of the activity definition is expected
3724   *         to conform.
3725   */
3726  public String getProfile() {
3727    return this.profile == null ? null : this.profile.getValue();
3728  }
3729
3730  /**
3731   * @param value A profile to which the target of the activity definition is
3732   *              expected to conform.
3733   */
3734  public ActivityDefinition setProfile(String value) {
3735    if (Utilities.noString(value))
3736      this.profile = null;
3737    else {
3738      if (this.profile == null)
3739        this.profile = new CanonicalType();
3740      this.profile.setValue(value);
3741    }
3742    return this;
3743  }
3744
3745  /**
3746   * @return {@link #code} (Detailed description of the type of activity; e.g.
3747   *         What lab test, what procedure, what kind of encounter.)
3748   */
3749  public CodeableConcept getCode() {
3750    if (this.code == null)
3751      if (Configuration.errorOnAutoCreate())
3752        throw new Error("Attempt to auto-create ActivityDefinition.code");
3753      else if (Configuration.doAutoCreate())
3754        this.code = new CodeableConcept(); // cc
3755    return this.code;
3756  }
3757
3758  public boolean hasCode() {
3759    return this.code != null && !this.code.isEmpty();
3760  }
3761
3762  /**
3763   * @param value {@link #code} (Detailed description of the type of activity;
3764   *              e.g. What lab test, what procedure, what kind of encounter.)
3765   */
3766  public ActivityDefinition setCode(CodeableConcept value) {
3767    this.code = value;
3768    return this;
3769  }
3770
3771  /**
3772   * @return {@link #intent} (Indicates the level of authority/intentionality
3773   *         associated with the activity and where the request should fit into
3774   *         the workflow chain.). This is the underlying object with id, value
3775   *         and extensions. The accessor "getIntent" gives direct access to the
3776   *         value
3777   */
3778  public Enumeration<RequestIntent> getIntentElement() {
3779    if (this.intent == null)
3780      if (Configuration.errorOnAutoCreate())
3781        throw new Error("Attempt to auto-create ActivityDefinition.intent");
3782      else if (Configuration.doAutoCreate())
3783        this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); // bb
3784    return this.intent;
3785  }
3786
3787  public boolean hasIntentElement() {
3788    return this.intent != null && !this.intent.isEmpty();
3789  }
3790
3791  public boolean hasIntent() {
3792    return this.intent != null && !this.intent.isEmpty();
3793  }
3794
3795  /**
3796   * @param value {@link #intent} (Indicates the level of authority/intentionality
3797   *              associated with the activity and where the request should fit
3798   *              into the workflow chain.). This is the underlying object with
3799   *              id, value and extensions. The accessor "getIntent" gives direct
3800   *              access to the value
3801   */
3802  public ActivityDefinition setIntentElement(Enumeration<RequestIntent> value) {
3803    this.intent = value;
3804    return this;
3805  }
3806
3807  /**
3808   * @return Indicates the level of authority/intentionality associated with the
3809   *         activity and where the request should fit into the workflow chain.
3810   */
3811  public RequestIntent getIntent() {
3812    return this.intent == null ? null : this.intent.getValue();
3813  }
3814
3815  /**
3816   * @param value Indicates the level of authority/intentionality associated with
3817   *              the activity and where the request should fit into the workflow
3818   *              chain.
3819   */
3820  public ActivityDefinition setIntent(RequestIntent value) {
3821    if (value == null)
3822      this.intent = null;
3823    else {
3824      if (this.intent == null)
3825        this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory());
3826      this.intent.setValue(value);
3827    }
3828    return this;
3829  }
3830
3831  /**
3832   * @return {@link #priority} (Indicates how quickly the activity should be
3833   *         addressed with respect to other requests.). This is the underlying
3834   *         object with id, value and extensions. The accessor "getPriority"
3835   *         gives direct access to the value
3836   */
3837  public Enumeration<RequestPriority> getPriorityElement() {
3838    if (this.priority == null)
3839      if (Configuration.errorOnAutoCreate())
3840        throw new Error("Attempt to auto-create ActivityDefinition.priority");
3841      else if (Configuration.doAutoCreate())
3842        this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
3843    return this.priority;
3844  }
3845
3846  public boolean hasPriorityElement() {
3847    return this.priority != null && !this.priority.isEmpty();
3848  }
3849
3850  public boolean hasPriority() {
3851    return this.priority != null && !this.priority.isEmpty();
3852  }
3853
3854  /**
3855   * @param value {@link #priority} (Indicates how quickly the activity should be
3856   *              addressed with respect to other requests.). This is the
3857   *              underlying object with id, value and extensions. The accessor
3858   *              "getPriority" gives direct access to the value
3859   */
3860  public ActivityDefinition setPriorityElement(Enumeration<RequestPriority> value) {
3861    this.priority = value;
3862    return this;
3863  }
3864
3865  /**
3866   * @return Indicates how quickly the activity should be addressed with respect
3867   *         to other requests.
3868   */
3869  public RequestPriority getPriority() {
3870    return this.priority == null ? null : this.priority.getValue();
3871  }
3872
3873  /**
3874   * @param value Indicates how quickly the activity should be addressed with
3875   *              respect to other requests.
3876   */
3877  public ActivityDefinition setPriority(RequestPriority value) {
3878    if (value == null)
3879      this.priority = null;
3880    else {
3881      if (this.priority == null)
3882        this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
3883      this.priority.setValue(value);
3884    }
3885    return this;
3886  }
3887
3888  /**
3889   * @return {@link #doNotPerform} (Set this to true if the definition is to
3890   *         indicate that a particular activity should NOT be performed. If true,
3891   *         this element should be interpreted to reinforce a negative coding.
3892   *         For example NPO as a code with a doNotPerform of true would still
3893   *         indicate to NOT perform the action.). This is the underlying object
3894   *         with id, value and extensions. The accessor "getDoNotPerform" gives
3895   *         direct access to the value
3896   */
3897  public BooleanType getDoNotPerformElement() {
3898    if (this.doNotPerform == null)
3899      if (Configuration.errorOnAutoCreate())
3900        throw new Error("Attempt to auto-create ActivityDefinition.doNotPerform");
3901      else if (Configuration.doAutoCreate())
3902        this.doNotPerform = new BooleanType(); // bb
3903    return this.doNotPerform;
3904  }
3905
3906  public boolean hasDoNotPerformElement() {
3907    return this.doNotPerform != null && !this.doNotPerform.isEmpty();
3908  }
3909
3910  public boolean hasDoNotPerform() {
3911    return this.doNotPerform != null && !this.doNotPerform.isEmpty();
3912  }
3913
3914  /**
3915   * @param value {@link #doNotPerform} (Set this to true if the definition is to
3916   *              indicate that a particular activity should NOT be performed. If
3917   *              true, this element should be interpreted to reinforce a negative
3918   *              coding. For example NPO as a code with a doNotPerform of true
3919   *              would still indicate to NOT perform the action.). This is the
3920   *              underlying object with id, value and extensions. The accessor
3921   *              "getDoNotPerform" gives direct access to the value
3922   */
3923  public ActivityDefinition setDoNotPerformElement(BooleanType value) {
3924    this.doNotPerform = value;
3925    return this;
3926  }
3927
3928  /**
3929   * @return Set this to true if the definition is to indicate that a particular
3930   *         activity should NOT be performed. If true, this element should be
3931   *         interpreted to reinforce a negative coding. For example NPO as a code
3932   *         with a doNotPerform of true would still indicate to NOT perform the
3933   *         action.
3934   */
3935  public boolean getDoNotPerform() {
3936    return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue();
3937  }
3938
3939  /**
3940   * @param value Set this to true if the definition is to indicate that a
3941   *              particular activity should NOT be performed. If true, this
3942   *              element should be interpreted to reinforce a negative coding.
3943   *              For example NPO as a code with a doNotPerform of true would
3944   *              still indicate to NOT perform the action.
3945   */
3946  public ActivityDefinition setDoNotPerform(boolean value) {
3947    if (this.doNotPerform == null)
3948      this.doNotPerform = new BooleanType();
3949    this.doNotPerform.setValue(value);
3950    return this;
3951  }
3952
3953  /**
3954   * @return {@link #timing} (The period, timing or frequency upon which the
3955   *         described activity is to occur.)
3956   */
3957  public Type getTiming() {
3958    return this.timing;
3959  }
3960
3961  /**
3962   * @return {@link #timing} (The period, timing or frequency upon which the
3963   *         described activity is to occur.)
3964   */
3965  public Timing getTimingTiming() throws FHIRException {
3966    if (this.timing == null)
3967      this.timing = new Timing();
3968    if (!(this.timing instanceof Timing))
3969      throw new FHIRException(
3970          "Type mismatch: the type Timing was expected, but " + this.timing.getClass().getName() + " was encountered");
3971    return (Timing) this.timing;
3972  }
3973
3974  public boolean hasTimingTiming() {
3975    return this != null && this.timing instanceof Timing;
3976  }
3977
3978  /**
3979   * @return {@link #timing} (The period, timing or frequency upon which the
3980   *         described activity is to occur.)
3981   */
3982  public DateTimeType getTimingDateTimeType() throws FHIRException {
3983    if (this.timing == null)
3984      this.timing = new DateTimeType();
3985    if (!(this.timing instanceof DateTimeType))
3986      throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "
3987          + this.timing.getClass().getName() + " was encountered");
3988    return (DateTimeType) this.timing;
3989  }
3990
3991  public boolean hasTimingDateTimeType() {
3992    return this != null && this.timing instanceof DateTimeType;
3993  }
3994
3995  /**
3996   * @return {@link #timing} (The period, timing or frequency upon which the
3997   *         described activity is to occur.)
3998   */
3999  public Age getTimingAge() throws FHIRException {
4000    if (this.timing == null)
4001      this.timing = new Age();
4002    if (!(this.timing instanceof Age))
4003      throw new FHIRException(
4004          "Type mismatch: the type Age was expected, but " + this.timing.getClass().getName() + " was encountered");
4005    return (Age) this.timing;
4006  }
4007
4008  public boolean hasTimingAge() {
4009    return this != null && this.timing instanceof Age;
4010  }
4011
4012  /**
4013   * @return {@link #timing} (The period, timing or frequency upon which the
4014   *         described activity is to occur.)
4015   */
4016  public Period getTimingPeriod() throws FHIRException {
4017    if (this.timing == null)
4018      this.timing = new Period();
4019    if (!(this.timing instanceof Period))
4020      throw new FHIRException(
4021          "Type mismatch: the type Period was expected, but " + this.timing.getClass().getName() + " was encountered");
4022    return (Period) this.timing;
4023  }
4024
4025  public boolean hasTimingPeriod() {
4026    return this != null && this.timing instanceof Period;
4027  }
4028
4029  /**
4030   * @return {@link #timing} (The period, timing or frequency upon which the
4031   *         described activity is to occur.)
4032   */
4033  public Range getTimingRange() throws FHIRException {
4034    if (this.timing == null)
4035      this.timing = new Range();
4036    if (!(this.timing instanceof Range))
4037      throw new FHIRException(
4038          "Type mismatch: the type Range was expected, but " + this.timing.getClass().getName() + " was encountered");
4039    return (Range) this.timing;
4040  }
4041
4042  public boolean hasTimingRange() {
4043    return this != null && this.timing instanceof Range;
4044  }
4045
4046  /**
4047   * @return {@link #timing} (The period, timing or frequency upon which the
4048   *         described activity is to occur.)
4049   */
4050  public Duration getTimingDuration() throws FHIRException {
4051    if (this.timing == null)
4052      this.timing = new Duration();
4053    if (!(this.timing instanceof Duration))
4054      throw new FHIRException("Type mismatch: the type Duration was expected, but " + this.timing.getClass().getName()
4055          + " was encountered");
4056    return (Duration) this.timing;
4057  }
4058
4059  public boolean hasTimingDuration() {
4060    return this != null && this.timing instanceof Duration;
4061  }
4062
4063  public boolean hasTiming() {
4064    return this.timing != null && !this.timing.isEmpty();
4065  }
4066
4067  /**
4068   * @param value {@link #timing} (The period, timing or frequency upon which the
4069   *              described activity is to occur.)
4070   */
4071  public ActivityDefinition setTiming(Type value) {
4072    if (value != null && !(value instanceof Timing || value instanceof DateTimeType || value instanceof Age
4073        || value instanceof Period || value instanceof Range || value instanceof Duration))
4074      throw new Error("Not the right type for ActivityDefinition.timing[x]: " + value.fhirType());
4075    this.timing = value;
4076    return this;
4077  }
4078
4079  /**
4080   * @return {@link #location} (Identifies the facility where the activity will
4081   *         occur; e.g. home, hospital, specific clinic, etc.)
4082   */
4083  public Reference getLocation() {
4084    if (this.location == null)
4085      if (Configuration.errorOnAutoCreate())
4086        throw new Error("Attempt to auto-create ActivityDefinition.location");
4087      else if (Configuration.doAutoCreate())
4088        this.location = new Reference(); // cc
4089    return this.location;
4090  }
4091
4092  public boolean hasLocation() {
4093    return this.location != null && !this.location.isEmpty();
4094  }
4095
4096  /**
4097   * @param value {@link #location} (Identifies the facility where the activity
4098   *              will occur; e.g. home, hospital, specific clinic, etc.)
4099   */
4100  public ActivityDefinition setLocation(Reference value) {
4101    this.location = value;
4102    return this;
4103  }
4104
4105  /**
4106   * @return {@link #location} The actual object that is the target of the
4107   *         reference. The reference library doesn't populate this, but you can
4108   *         use it to hold the resource if you resolve it. (Identifies the
4109   *         facility where the activity will occur; e.g. home, hospital, specific
4110   *         clinic, etc.)
4111   */
4112  public Location getLocationTarget() {
4113    if (this.locationTarget == null)
4114      if (Configuration.errorOnAutoCreate())
4115        throw new Error("Attempt to auto-create ActivityDefinition.location");
4116      else if (Configuration.doAutoCreate())
4117        this.locationTarget = new Location(); // aa
4118    return this.locationTarget;
4119  }
4120
4121  /**
4122   * @param value {@link #location} The actual object that is the target of the
4123   *              reference. The reference library doesn't use these, but you can
4124   *              use it to hold the resource if you resolve it. (Identifies the
4125   *              facility where the activity will occur; e.g. home, hospital,
4126   *              specific clinic, etc.)
4127   */
4128  public ActivityDefinition setLocationTarget(Location value) {
4129    this.locationTarget = value;
4130    return this;
4131  }
4132
4133  /**
4134   * @return {@link #participant} (Indicates who should participate in performing
4135   *         the action described.)
4136   */
4137  public List<ActivityDefinitionParticipantComponent> getParticipant() {
4138    if (this.participant == null)
4139      this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4140    return this.participant;
4141  }
4142
4143  /**
4144   * @return Returns a reference to <code>this</code> for easy method chaining
4145   */
4146  public ActivityDefinition setParticipant(List<ActivityDefinitionParticipantComponent> theParticipant) {
4147    this.participant = theParticipant;
4148    return this;
4149  }
4150
4151  public boolean hasParticipant() {
4152    if (this.participant == null)
4153      return false;
4154    for (ActivityDefinitionParticipantComponent item : this.participant)
4155      if (!item.isEmpty())
4156        return true;
4157    return false;
4158  }
4159
4160  public ActivityDefinitionParticipantComponent addParticipant() { // 3
4161    ActivityDefinitionParticipantComponent t = new ActivityDefinitionParticipantComponent();
4162    if (this.participant == null)
4163      this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4164    this.participant.add(t);
4165    return t;
4166  }
4167
4168  public ActivityDefinition addParticipant(ActivityDefinitionParticipantComponent t) { // 3
4169    if (t == null)
4170      return this;
4171    if (this.participant == null)
4172      this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4173    this.participant.add(t);
4174    return this;
4175  }
4176
4177  /**
4178   * @return The first repetition of repeating field {@link #participant},
4179   *         creating it if it does not already exist
4180   */
4181  public ActivityDefinitionParticipantComponent getParticipantFirstRep() {
4182    if (getParticipant().isEmpty()) {
4183      addParticipant();
4184    }
4185    return getParticipant().get(0);
4186  }
4187
4188  /**
4189   * @return {@link #product} (Identifies the food, drug or other product being
4190   *         consumed or supplied in the activity.)
4191   */
4192  public Type getProduct() {
4193    return this.product;
4194  }
4195
4196  /**
4197   * @return {@link #product} (Identifies the food, drug or other product being
4198   *         consumed or supplied in the activity.)
4199   */
4200  public Reference getProductReference() throws FHIRException {
4201    if (this.product == null)
4202      this.product = new Reference();
4203    if (!(this.product instanceof Reference))
4204      throw new FHIRException("Type mismatch: the type Reference was expected, but " + this.product.getClass().getName()
4205          + " was encountered");
4206    return (Reference) this.product;
4207  }
4208
4209  public boolean hasProductReference() {
4210    return this != null && this.product instanceof Reference;
4211  }
4212
4213  /**
4214   * @return {@link #product} (Identifies the food, drug or other product being
4215   *         consumed or supplied in the activity.)
4216   */
4217  public CodeableConcept getProductCodeableConcept() throws FHIRException {
4218    if (this.product == null)
4219      this.product = new CodeableConcept();
4220    if (!(this.product instanceof CodeableConcept))
4221      throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "
4222          + this.product.getClass().getName() + " was encountered");
4223    return (CodeableConcept) this.product;
4224  }
4225
4226  public boolean hasProductCodeableConcept() {
4227    return this != null && this.product instanceof CodeableConcept;
4228  }
4229
4230  public boolean hasProduct() {
4231    return this.product != null && !this.product.isEmpty();
4232  }
4233
4234  /**
4235   * @param value {@link #product} (Identifies the food, drug or other product
4236   *              being consumed or supplied in the activity.)
4237   */
4238  public ActivityDefinition setProduct(Type value) {
4239    if (value != null && !(value instanceof Reference || value instanceof CodeableConcept))
4240      throw new Error("Not the right type for ActivityDefinition.product[x]: " + value.fhirType());
4241    this.product = value;
4242    return this;
4243  }
4244
4245  /**
4246   * @return {@link #quantity} (Identifies the quantity expected to be consumed at
4247   *         once (per dose, per meal, etc.).)
4248   */
4249  public Quantity getQuantity() {
4250    if (this.quantity == null)
4251      if (Configuration.errorOnAutoCreate())
4252        throw new Error("Attempt to auto-create ActivityDefinition.quantity");
4253      else if (Configuration.doAutoCreate())
4254        this.quantity = new Quantity(); // cc
4255    return this.quantity;
4256  }
4257
4258  public boolean hasQuantity() {
4259    return this.quantity != null && !this.quantity.isEmpty();
4260  }
4261
4262  /**
4263   * @param value {@link #quantity} (Identifies the quantity expected to be
4264   *              consumed at once (per dose, per meal, etc.).)
4265   */
4266  public ActivityDefinition setQuantity(Quantity value) {
4267    this.quantity = value;
4268    return this;
4269  }
4270
4271  /**
4272   * @return {@link #dosage} (Provides detailed dosage instructions in the same
4273   *         way that they are described for MedicationRequest resources.)
4274   */
4275  public List<Dosage> getDosage() {
4276    if (this.dosage == null)
4277      this.dosage = new ArrayList<Dosage>();
4278    return this.dosage;
4279  }
4280
4281  /**
4282   * @return Returns a reference to <code>this</code> for easy method chaining
4283   */
4284  public ActivityDefinition setDosage(List<Dosage> theDosage) {
4285    this.dosage = theDosage;
4286    return this;
4287  }
4288
4289  public boolean hasDosage() {
4290    if (this.dosage == null)
4291      return false;
4292    for (Dosage item : this.dosage)
4293      if (!item.isEmpty())
4294        return true;
4295    return false;
4296  }
4297
4298  public Dosage addDosage() { // 3
4299    Dosage t = new Dosage();
4300    if (this.dosage == null)
4301      this.dosage = new ArrayList<Dosage>();
4302    this.dosage.add(t);
4303    return t;
4304  }
4305
4306  public ActivityDefinition addDosage(Dosage t) { // 3
4307    if (t == null)
4308      return this;
4309    if (this.dosage == null)
4310      this.dosage = new ArrayList<Dosage>();
4311    this.dosage.add(t);
4312    return this;
4313  }
4314
4315  /**
4316   * @return The first repetition of repeating field {@link #dosage}, creating it
4317   *         if it does not already exist
4318   */
4319  public Dosage getDosageFirstRep() {
4320    if (getDosage().isEmpty()) {
4321      addDosage();
4322    }
4323    return getDosage().get(0);
4324  }
4325
4326  /**
4327   * @return {@link #bodySite} (Indicates the sites on the subject's body where
4328   *         the procedure should be performed (I.e. the target sites).)
4329   */
4330  public List<CodeableConcept> getBodySite() {
4331    if (this.bodySite == null)
4332      this.bodySite = new ArrayList<CodeableConcept>();
4333    return this.bodySite;
4334  }
4335
4336  /**
4337   * @return Returns a reference to <code>this</code> for easy method chaining
4338   */
4339  public ActivityDefinition setBodySite(List<CodeableConcept> theBodySite) {
4340    this.bodySite = theBodySite;
4341    return this;
4342  }
4343
4344  public boolean hasBodySite() {
4345    if (this.bodySite == null)
4346      return false;
4347    for (CodeableConcept item : this.bodySite)
4348      if (!item.isEmpty())
4349        return true;
4350    return false;
4351  }
4352
4353  public CodeableConcept addBodySite() { // 3
4354    CodeableConcept t = new CodeableConcept();
4355    if (this.bodySite == null)
4356      this.bodySite = new ArrayList<CodeableConcept>();
4357    this.bodySite.add(t);
4358    return t;
4359  }
4360
4361  public ActivityDefinition addBodySite(CodeableConcept t) { // 3
4362    if (t == null)
4363      return this;
4364    if (this.bodySite == null)
4365      this.bodySite = new ArrayList<CodeableConcept>();
4366    this.bodySite.add(t);
4367    return this;
4368  }
4369
4370  /**
4371   * @return The first repetition of repeating field {@link #bodySite}, creating
4372   *         it if it does not already exist
4373   */
4374  public CodeableConcept getBodySiteFirstRep() {
4375    if (getBodySite().isEmpty()) {
4376      addBodySite();
4377    }
4378    return getBodySite().get(0);
4379  }
4380
4381  /**
4382   * @return {@link #specimenRequirement} (Defines specimen requirements for the
4383   *         action to be performed, such as required specimens for a lab test.)
4384   */
4385  public List<Reference> getSpecimenRequirement() {
4386    if (this.specimenRequirement == null)
4387      this.specimenRequirement = new ArrayList<Reference>();
4388    return this.specimenRequirement;
4389  }
4390
4391  /**
4392   * @return Returns a reference to <code>this</code> for easy method chaining
4393   */
4394  public ActivityDefinition setSpecimenRequirement(List<Reference> theSpecimenRequirement) {
4395    this.specimenRequirement = theSpecimenRequirement;
4396    return this;
4397  }
4398
4399  public boolean hasSpecimenRequirement() {
4400    if (this.specimenRequirement == null)
4401      return false;
4402    for (Reference item : this.specimenRequirement)
4403      if (!item.isEmpty())
4404        return true;
4405    return false;
4406  }
4407
4408  public Reference addSpecimenRequirement() { // 3
4409    Reference t = new Reference();
4410    if (this.specimenRequirement == null)
4411      this.specimenRequirement = new ArrayList<Reference>();
4412    this.specimenRequirement.add(t);
4413    return t;
4414  }
4415
4416  public ActivityDefinition addSpecimenRequirement(Reference t) { // 3
4417    if (t == null)
4418      return this;
4419    if (this.specimenRequirement == null)
4420      this.specimenRequirement = new ArrayList<Reference>();
4421    this.specimenRequirement.add(t);
4422    return this;
4423  }
4424
4425  /**
4426   * @return The first repetition of repeating field {@link #specimenRequirement},
4427   *         creating it if it does not already exist
4428   */
4429  public Reference getSpecimenRequirementFirstRep() {
4430    if (getSpecimenRequirement().isEmpty()) {
4431      addSpecimenRequirement();
4432    }
4433    return getSpecimenRequirement().get(0);
4434  }
4435
4436  /**
4437   * @deprecated Use Reference#setResource(IBaseResource) instead
4438   */
4439  @Deprecated
4440  public List<SpecimenDefinition> getSpecimenRequirementTarget() {
4441    if (this.specimenRequirementTarget == null)
4442      this.specimenRequirementTarget = new ArrayList<SpecimenDefinition>();
4443    return this.specimenRequirementTarget;
4444  }
4445
4446  /**
4447   * @deprecated Use Reference#setResource(IBaseResource) instead
4448   */
4449  @Deprecated
4450  public SpecimenDefinition addSpecimenRequirementTarget() {
4451    SpecimenDefinition r = new SpecimenDefinition();
4452    if (this.specimenRequirementTarget == null)
4453      this.specimenRequirementTarget = new ArrayList<SpecimenDefinition>();
4454    this.specimenRequirementTarget.add(r);
4455    return r;
4456  }
4457
4458  /**
4459   * @return {@link #observationRequirement} (Defines observation requirements for
4460   *         the action to be performed, such as body weight or surface area.)
4461   */
4462  public List<Reference> getObservationRequirement() {
4463    if (this.observationRequirement == null)
4464      this.observationRequirement = new ArrayList<Reference>();
4465    return this.observationRequirement;
4466  }
4467
4468  /**
4469   * @return Returns a reference to <code>this</code> for easy method chaining
4470   */
4471  public ActivityDefinition setObservationRequirement(List<Reference> theObservationRequirement) {
4472    this.observationRequirement = theObservationRequirement;
4473    return this;
4474  }
4475
4476  public boolean hasObservationRequirement() {
4477    if (this.observationRequirement == null)
4478      return false;
4479    for (Reference item : this.observationRequirement)
4480      if (!item.isEmpty())
4481        return true;
4482    return false;
4483  }
4484
4485  public Reference addObservationRequirement() { // 3
4486    Reference t = new Reference();
4487    if (this.observationRequirement == null)
4488      this.observationRequirement = new ArrayList<Reference>();
4489    this.observationRequirement.add(t);
4490    return t;
4491  }
4492
4493  public ActivityDefinition addObservationRequirement(Reference t) { // 3
4494    if (t == null)
4495      return this;
4496    if (this.observationRequirement == null)
4497      this.observationRequirement = new ArrayList<Reference>();
4498    this.observationRequirement.add(t);
4499    return this;
4500  }
4501
4502  /**
4503   * @return The first repetition of repeating field
4504   *         {@link #observationRequirement}, creating it if it does not already
4505   *         exist
4506   */
4507  public Reference getObservationRequirementFirstRep() {
4508    if (getObservationRequirement().isEmpty()) {
4509      addObservationRequirement();
4510    }
4511    return getObservationRequirement().get(0);
4512  }
4513
4514  /**
4515   * @deprecated Use Reference#setResource(IBaseResource) instead
4516   */
4517  @Deprecated
4518  public List<ObservationDefinition> getObservationRequirementTarget() {
4519    if (this.observationRequirementTarget == null)
4520      this.observationRequirementTarget = new ArrayList<ObservationDefinition>();
4521    return this.observationRequirementTarget;
4522  }
4523
4524  /**
4525   * @deprecated Use Reference#setResource(IBaseResource) instead
4526   */
4527  @Deprecated
4528  public ObservationDefinition addObservationRequirementTarget() {
4529    ObservationDefinition r = new ObservationDefinition();
4530    if (this.observationRequirementTarget == null)
4531      this.observationRequirementTarget = new ArrayList<ObservationDefinition>();
4532    this.observationRequirementTarget.add(r);
4533    return r;
4534  }
4535
4536  /**
4537   * @return {@link #observationResultRequirement} (Defines the observations that
4538   *         are expected to be produced by the action.)
4539   */
4540  public List<Reference> getObservationResultRequirement() {
4541    if (this.observationResultRequirement == null)
4542      this.observationResultRequirement = new ArrayList<Reference>();
4543    return this.observationResultRequirement;
4544  }
4545
4546  /**
4547   * @return Returns a reference to <code>this</code> for easy method chaining
4548   */
4549  public ActivityDefinition setObservationResultRequirement(List<Reference> theObservationResultRequirement) {
4550    this.observationResultRequirement = theObservationResultRequirement;
4551    return this;
4552  }
4553
4554  public boolean hasObservationResultRequirement() {
4555    if (this.observationResultRequirement == null)
4556      return false;
4557    for (Reference item : this.observationResultRequirement)
4558      if (!item.isEmpty())
4559        return true;
4560    return false;
4561  }
4562
4563  public Reference addObservationResultRequirement() { // 3
4564    Reference t = new Reference();
4565    if (this.observationResultRequirement == null)
4566      this.observationResultRequirement = new ArrayList<Reference>();
4567    this.observationResultRequirement.add(t);
4568    return t;
4569  }
4570
4571  public ActivityDefinition addObservationResultRequirement(Reference t) { // 3
4572    if (t == null)
4573      return this;
4574    if (this.observationResultRequirement == null)
4575      this.observationResultRequirement = new ArrayList<Reference>();
4576    this.observationResultRequirement.add(t);
4577    return this;
4578  }
4579
4580  /**
4581   * @return The first repetition of repeating field
4582   *         {@link #observationResultRequirement}, creating it if it does not
4583   *         already exist
4584   */
4585  public Reference getObservationResultRequirementFirstRep() {
4586    if (getObservationResultRequirement().isEmpty()) {
4587      addObservationResultRequirement();
4588    }
4589    return getObservationResultRequirement().get(0);
4590  }
4591
4592  /**
4593   * @deprecated Use Reference#setResource(IBaseResource) instead
4594   */
4595  @Deprecated
4596  public List<ObservationDefinition> getObservationResultRequirementTarget() {
4597    if (this.observationResultRequirementTarget == null)
4598      this.observationResultRequirementTarget = new ArrayList<ObservationDefinition>();
4599    return this.observationResultRequirementTarget;
4600  }
4601
4602  /**
4603   * @deprecated Use Reference#setResource(IBaseResource) instead
4604   */
4605  @Deprecated
4606  public ObservationDefinition addObservationResultRequirementTarget() {
4607    ObservationDefinition r = new ObservationDefinition();
4608    if (this.observationResultRequirementTarget == null)
4609      this.observationResultRequirementTarget = new ArrayList<ObservationDefinition>();
4610    this.observationResultRequirementTarget.add(r);
4611    return r;
4612  }
4613
4614  /**
4615   * @return {@link #transform} (A reference to a StructureMap resource that
4616   *         defines a transform that can be executed to produce the intent
4617   *         resource using the ActivityDefinition instance as the input.). This
4618   *         is the underlying object with id, value and extensions. The accessor
4619   *         "getTransform" gives direct access to the value
4620   */
4621  public CanonicalType getTransformElement() {
4622    if (this.transform == null)
4623      if (Configuration.errorOnAutoCreate())
4624        throw new Error("Attempt to auto-create ActivityDefinition.transform");
4625      else if (Configuration.doAutoCreate())
4626        this.transform = new CanonicalType(); // bb
4627    return this.transform;
4628  }
4629
4630  public boolean hasTransformElement() {
4631    return this.transform != null && !this.transform.isEmpty();
4632  }
4633
4634  public boolean hasTransform() {
4635    return this.transform != null && !this.transform.isEmpty();
4636  }
4637
4638  /**
4639   * @param value {@link #transform} (A reference to a StructureMap resource that
4640   *              defines a transform that can be executed to produce the intent
4641   *              resource using the ActivityDefinition instance as the input.).
4642   *              This is the underlying object with id, value and extensions. The
4643   *              accessor "getTransform" gives direct access to the value
4644   */
4645  public ActivityDefinition setTransformElement(CanonicalType value) {
4646    this.transform = value;
4647    return this;
4648  }
4649
4650  /**
4651   * @return A reference to a StructureMap resource that defines a transform that
4652   *         can be executed to produce the intent resource using the
4653   *         ActivityDefinition instance as the input.
4654   */
4655  public String getTransform() {
4656    return this.transform == null ? null : this.transform.getValue();
4657  }
4658
4659  /**
4660   * @param value A reference to a StructureMap resource that defines a transform
4661   *              that can be executed to produce the intent resource using the
4662   *              ActivityDefinition instance as the input.
4663   */
4664  public ActivityDefinition setTransform(String value) {
4665    if (Utilities.noString(value))
4666      this.transform = null;
4667    else {
4668      if (this.transform == null)
4669        this.transform = new CanonicalType();
4670      this.transform.setValue(value);
4671    }
4672    return this;
4673  }
4674
4675  /**
4676   * @return {@link #dynamicValue} (Dynamic values that will be evaluated to
4677   *         produce values for elements of the resulting resource. For example,
4678   *         if the dosage of a medication must be computed based on the patient's
4679   *         weight, a dynamic value would be used to specify an expression that
4680   *         calculated the weight, and the path on the request resource that
4681   *         would contain the result.)
4682   */
4683  public List<ActivityDefinitionDynamicValueComponent> getDynamicValue() {
4684    if (this.dynamicValue == null)
4685      this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4686    return this.dynamicValue;
4687  }
4688
4689  /**
4690   * @return Returns a reference to <code>this</code> for easy method chaining
4691   */
4692  public ActivityDefinition setDynamicValue(List<ActivityDefinitionDynamicValueComponent> theDynamicValue) {
4693    this.dynamicValue = theDynamicValue;
4694    return this;
4695  }
4696
4697  public boolean hasDynamicValue() {
4698    if (this.dynamicValue == null)
4699      return false;
4700    for (ActivityDefinitionDynamicValueComponent item : this.dynamicValue)
4701      if (!item.isEmpty())
4702        return true;
4703    return false;
4704  }
4705
4706  public ActivityDefinitionDynamicValueComponent addDynamicValue() { // 3
4707    ActivityDefinitionDynamicValueComponent t = new ActivityDefinitionDynamicValueComponent();
4708    if (this.dynamicValue == null)
4709      this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4710    this.dynamicValue.add(t);
4711    return t;
4712  }
4713
4714  public ActivityDefinition addDynamicValue(ActivityDefinitionDynamicValueComponent t) { // 3
4715    if (t == null)
4716      return this;
4717    if (this.dynamicValue == null)
4718      this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4719    this.dynamicValue.add(t);
4720    return this;
4721  }
4722
4723  /**
4724   * @return The first repetition of repeating field {@link #dynamicValue},
4725   *         creating it if it does not already exist
4726   */
4727  public ActivityDefinitionDynamicValueComponent getDynamicValueFirstRep() {
4728    if (getDynamicValue().isEmpty()) {
4729      addDynamicValue();
4730    }
4731    return getDynamicValue().get(0);
4732  }
4733
4734  protected void listChildren(List<Property> children) {
4735    super.listChildren(children);
4736    children.add(new Property("url", "uri",
4737        "An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.",
4738        0, 1, url));
4739    children.add(new Property("identifier", "Identifier",
4740        "A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.",
4741        0, java.lang.Integer.MAX_VALUE, identifier));
4742    children.add(new Property("version", "string",
4743        "The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.",
4744        0, 1, version));
4745    children.add(new Property("name", "string",
4746        "A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
4747        0, 1, name));
4748    children.add(new Property("title", "string",
4749        "A short, descriptive, user-friendly title for the activity definition.", 0, 1, title));
4750    children.add(new Property("subtitle", "string",
4751        "An explanatory or alternate title for the activity definition giving additional information about its content.",
4752        0, 1, subtitle));
4753    children.add(new Property("status", "code",
4754        "The status of this activity definition. Enables tracking the life-cycle of the content.", 0, 1, status));
4755    children.add(new Property("experimental", "boolean",
4756        "A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
4757        0, 1, experimental));
4758    children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)",
4759        "A code or group definition that describes the intended subject of the activity being defined.", 0, 1,
4760        subject));
4761    children.add(new Property("date", "dateTime",
4762        "The date  (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.",
4763        0, 1, date));
4764    children.add(new Property("publisher", "string",
4765        "The name of the organization or individual that published the activity definition.", 0, 1, publisher));
4766    children.add(new Property("contact", "ContactDetail",
4767        "Contact details to assist a user in finding and communicating with the publisher.", 0,
4768        java.lang.Integer.MAX_VALUE, contact));
4769    children.add(new Property("description", "markdown",
4770        "A free text natural language description of the activity definition from a consumer's perspective.", 0, 1,
4771        description));
4772    children.add(new Property("useContext", "UsageContext",
4773        "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.",
4774        0, java.lang.Integer.MAX_VALUE, useContext));
4775    children.add(new Property("jurisdiction", "CodeableConcept",
4776        "A legal or geographic region in which the activity definition is intended to be used.", 0,
4777        java.lang.Integer.MAX_VALUE, jurisdiction));
4778    children.add(new Property("purpose", "markdown",
4779        "Explanation of why this activity definition is needed and why it has been designed as it has.", 0, 1,
4780        purpose));
4781    children.add(new Property("usage", "string",
4782        "A detailed description of how the activity definition is used from a clinical perspective.", 0, 1, usage));
4783    children.add(new Property("copyright", "markdown",
4784        "A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.",
4785        0, 1, copyright));
4786    children.add(new Property("approvalDate", "date",
4787        "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.",
4788        0, 1, approvalDate));
4789    children.add(new Property("lastReviewDate", "date",
4790        "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.",
4791        0, 1, lastReviewDate));
4792    children.add(new Property("effectivePeriod", "Period",
4793        "The period during which the activity definition content was or is planned to be in active use.", 0, 1,
4794        effectivePeriod));
4795    children.add(new Property("topic", "CodeableConcept",
4796        "Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.",
4797        0, java.lang.Integer.MAX_VALUE, topic));
4798    children.add(new Property("author", "ContactDetail",
4799        "An individiual or organization primarily involved in the creation and maintenance of the content.", 0,
4800        java.lang.Integer.MAX_VALUE, author));
4801    children.add(new Property("editor", "ContactDetail",
4802        "An individual or organization primarily responsible for internal coherence of the content.", 0,
4803        java.lang.Integer.MAX_VALUE, editor));
4804    children.add(new Property("reviewer", "ContactDetail",
4805        "An individual or organization primarily responsible for review of some aspect of the content.", 0,
4806        java.lang.Integer.MAX_VALUE, reviewer));
4807    children.add(new Property("endorser", "ContactDetail",
4808        "An individual or organization responsible for officially endorsing the content for use in some setting.", 0,
4809        java.lang.Integer.MAX_VALUE, endorser));
4810    children.add(new Property("relatedArtifact", "RelatedArtifact",
4811        "Related artifacts such as additional documentation, justification, or bibliographic references.", 0,
4812        java.lang.Integer.MAX_VALUE, relatedArtifact));
4813    children.add(new Property("library", "canonical(Library)",
4814        "A reference to a Library resource containing any formal logic used by the activity definition.", 0,
4815        java.lang.Integer.MAX_VALUE, library));
4816    children.add(new Property("kind", "code",
4817        "A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.",
4818        0, 1, kind));
4819    children.add(new Property("profile", "canonical(StructureDefinition)",
4820        "A profile to which the target of the activity definition is expected to conform.", 0, 1, profile));
4821    children.add(new Property("code", "CodeableConcept",
4822        "Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.", 0,
4823        1, code));
4824    children.add(new Property("intent", "code",
4825        "Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.",
4826        0, 1, intent));
4827    children.add(new Property("priority", "code",
4828        "Indicates how quickly the activity  should be addressed with respect to other requests.", 0, 1, priority));
4829    children.add(new Property("doNotPerform", "boolean",
4830        "Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.",
4831        0, 1, doNotPerform));
4832    children.add(new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
4833        "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing));
4834    children.add(new Property("location", "Reference(Location)",
4835        "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1,
4836        location));
4837    children.add(new Property("participant", "", "Indicates who should participate in performing the action described.",
4838        0, java.lang.Integer.MAX_VALUE, participant));
4839    children.add(new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept",
4840        "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product));
4841    children.add(new Property("quantity", "SimpleQuantity",
4842        "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).", 0, 1, quantity));
4843    children.add(new Property("dosage", "Dosage",
4844        "Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.",
4845        0, java.lang.Integer.MAX_VALUE, dosage));
4846    children.add(new Property("bodySite", "CodeableConcept",
4847        "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", 0,
4848        java.lang.Integer.MAX_VALUE, bodySite));
4849    children.add(new Property("specimenRequirement", "Reference(SpecimenDefinition)",
4850        "Defines specimen requirements for the action to be performed, such as required specimens for a lab test.", 0,
4851        java.lang.Integer.MAX_VALUE, specimenRequirement));
4852    children.add(new Property("observationRequirement", "Reference(ObservationDefinition)",
4853        "Defines observation requirements for the action to be performed, such as body weight or surface area.", 0,
4854        java.lang.Integer.MAX_VALUE, observationRequirement));
4855    children.add(new Property("observationResultRequirement", "Reference(ObservationDefinition)",
4856        "Defines the observations that are expected to be produced by the action.", 0, java.lang.Integer.MAX_VALUE,
4857        observationResultRequirement));
4858    children.add(new Property("transform", "canonical(StructureMap)",
4859        "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.",
4860        0, 1, transform));
4861    children.add(new Property("dynamicValue", "",
4862        "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.",
4863        0, java.lang.Integer.MAX_VALUE, dynamicValue));
4864  }
4865
4866  @Override
4867  public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4868    switch (_hash) {
4869    case 116079:
4870      /* url */ return new Property("url", "uri",
4871          "An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers.",
4872          0, 1, url);
4873    case -1618432855:
4874      /* identifier */ return new Property("identifier", "Identifier",
4875          "A formal identifier that is used to identify this activity definition when it is represented in other formats, or referenced in a specification, model, design or an instance.",
4876          0, java.lang.Integer.MAX_VALUE, identifier);
4877    case 351608024:
4878      /* version */ return new Property("version", "string",
4879          "The identifier that is used to identify this version of the activity definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the activity definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active assets.",
4880          0, 1, version);
4881    case 3373707:
4882      /* name */ return new Property("name", "string",
4883          "A natural language name identifying the activity definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
4884          0, 1, name);
4885    case 110371416:
4886      /* title */ return new Property("title", "string",
4887          "A short, descriptive, user-friendly title for the activity definition.", 0, 1, title);
4888    case -2060497896:
4889      /* subtitle */ return new Property("subtitle", "string",
4890          "An explanatory or alternate title for the activity definition giving additional information about its content.",
4891          0, 1, subtitle);
4892    case -892481550:
4893      /* status */ return new Property("status", "code",
4894          "The status of this activity definition. Enables tracking the life-cycle of the content.", 0, 1, status);
4895    case -404562712:
4896      /* experimental */ return new Property("experimental", "boolean",
4897          "A Boolean value to indicate that this activity definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
4898          0, 1, experimental);
4899    case -573640748:
4900      /* subject[x] */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
4901          "A code or group definition that describes the intended subject of the activity being defined.", 0, 1,
4902          subject);
4903    case -1867885268:
4904      /* subject */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
4905          "A code or group definition that describes the intended subject of the activity being defined.", 0, 1,
4906          subject);
4907    case -1257122603:
4908      /* subjectCodeableConcept */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
4909          "A code or group definition that describes the intended subject of the activity being defined.", 0, 1,
4910          subject);
4911    case 772938623:
4912      /* subjectReference */ return new Property("subject[x]", "CodeableConcept|Reference(Group)",
4913          "A code or group definition that describes the intended subject of the activity being defined.", 0, 1,
4914          subject);
4915    case 3076014:
4916      /* date */ return new Property("date", "dateTime",
4917          "The date  (and optionally time) when the activity definition was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the activity definition changes.",
4918          0, 1, date);
4919    case 1447404028:
4920      /* publisher */ return new Property("publisher", "string",
4921          "The name of the organization or individual that published the activity definition.", 0, 1, publisher);
4922    case 951526432:
4923      /* contact */ return new Property("contact", "ContactDetail",
4924          "Contact details to assist a user in finding and communicating with the publisher.", 0,
4925          java.lang.Integer.MAX_VALUE, contact);
4926    case -1724546052:
4927      /* description */ return new Property("description", "markdown",
4928          "A free text natural language description of the activity definition from a consumer's perspective.", 0, 1,
4929          description);
4930    case -669707736:
4931      /* useContext */ return new Property("useContext", "UsageContext",
4932          "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate activity definition instances.",
4933          0, java.lang.Integer.MAX_VALUE, useContext);
4934    case -507075711:
4935      /* jurisdiction */ return new Property("jurisdiction", "CodeableConcept",
4936          "A legal or geographic region in which the activity definition is intended to be used.", 0,
4937          java.lang.Integer.MAX_VALUE, jurisdiction);
4938    case -220463842:
4939      /* purpose */ return new Property("purpose", "markdown",
4940          "Explanation of why this activity definition is needed and why it has been designed as it has.", 0, 1,
4941          purpose);
4942    case 111574433:
4943      /* usage */ return new Property("usage", "string",
4944          "A detailed description of how the activity definition is used from a clinical perspective.", 0, 1, usage);
4945    case 1522889671:
4946      /* copyright */ return new Property("copyright", "markdown",
4947          "A copyright statement relating to the activity definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the activity definition.",
4948          0, 1, copyright);
4949    case 223539345:
4950      /* approvalDate */ return new Property("approvalDate", "date",
4951          "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.",
4952          0, 1, approvalDate);
4953    case -1687512484:
4954      /* lastReviewDate */ return new Property("lastReviewDate", "date",
4955          "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.",
4956          0, 1, lastReviewDate);
4957    case -403934648:
4958      /* effectivePeriod */ return new Property("effectivePeriod", "Period",
4959          "The period during which the activity definition content was or is planned to be in active use.", 0, 1,
4960          effectivePeriod);
4961    case 110546223:
4962      /* topic */ return new Property("topic", "CodeableConcept",
4963          "Descriptive topics related to the content of the activity. Topics provide a high-level categorization of the activity that can be useful for filtering and searching.",
4964          0, java.lang.Integer.MAX_VALUE, topic);
4965    case -1406328437:
4966      /* author */ return new Property("author", "ContactDetail",
4967          "An individiual or organization primarily involved in the creation and maintenance of the content.", 0,
4968          java.lang.Integer.MAX_VALUE, author);
4969    case -1307827859:
4970      /* editor */ return new Property("editor", "ContactDetail",
4971          "An individual or organization primarily responsible for internal coherence of the content.", 0,
4972          java.lang.Integer.MAX_VALUE, editor);
4973    case -261190139:
4974      /* reviewer */ return new Property("reviewer", "ContactDetail",
4975          "An individual or organization primarily responsible for review of some aspect of the content.", 0,
4976          java.lang.Integer.MAX_VALUE, reviewer);
4977    case 1740277666:
4978      /* endorser */ return new Property("endorser", "ContactDetail",
4979          "An individual or organization responsible for officially endorsing the content for use in some setting.", 0,
4980          java.lang.Integer.MAX_VALUE, endorser);
4981    case 666807069:
4982      /* relatedArtifact */ return new Property("relatedArtifact", "RelatedArtifact",
4983          "Related artifacts such as additional documentation, justification, or bibliographic references.", 0,
4984          java.lang.Integer.MAX_VALUE, relatedArtifact);
4985    case 166208699:
4986      /* library */ return new Property("library", "canonical(Library)",
4987          "A reference to a Library resource containing any formal logic used by the activity definition.", 0,
4988          java.lang.Integer.MAX_VALUE, library);
4989    case 3292052:
4990      /* kind */ return new Property("kind", "code",
4991          "A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.",
4992          0, 1, kind);
4993    case -309425751:
4994      /* profile */ return new Property("profile", "canonical(StructureDefinition)",
4995          "A profile to which the target of the activity definition is expected to conform.", 0, 1, profile);
4996    case 3059181:
4997      /* code */ return new Property("code", "CodeableConcept",
4998          "Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.",
4999          0, 1, code);
5000    case -1183762788:
5001      /* intent */ return new Property("intent", "code",
5002          "Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.",
5003          0, 1, intent);
5004    case -1165461084:
5005      /* priority */ return new Property("priority", "code",
5006          "Indicates how quickly the activity  should be addressed with respect to other requests.", 0, 1, priority);
5007    case -1788508167:
5008      /* doNotPerform */ return new Property("doNotPerform", "boolean",
5009          "Set this to true if the definition is to indicate that a particular activity should NOT be performed. If true, this element should be interpreted to reinforce a negative coding. For example NPO as a code with a doNotPerform of true would still indicate to NOT perform the action.",
5010          0, 1, doNotPerform);
5011    case 164632566:
5012      /* timing[x] */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5013          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5014    case -873664438:
5015      /* timing */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5016          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5017    case -497554124:
5018      /* timingTiming */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5019          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5020    case -1837458939:
5021      /* timingDateTime */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5022          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5023    case 164607061:
5024      /* timingAge */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5025          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5026    case -615615829:
5027      /* timingPeriod */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5028          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5029    case -710871277:
5030      /* timingRange */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5031          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5032    case -1327253506:
5033      /* timingDuration */ return new Property("timing[x]", "Timing|dateTime|Age|Period|Range|Duration",
5034          "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
5035    case 1901043637:
5036      /* location */ return new Property("location", "Reference(Location)",
5037          "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1,
5038          location);
5039    case 767422259:
5040      /* participant */ return new Property("participant", "",
5041          "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE,
5042          participant);
5043    case 1753005361:
5044      /* product[x] */ return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept",
5045          "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
5046    case -309474065:
5047      /* product */ return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept",
5048          "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
5049    case -669667556:
5050      /* productReference */ return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept",
5051          "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
5052    case 906854066:
5053      /* productCodeableConcept */ return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept",
5054          "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
5055    case -1285004149:
5056      /* quantity */ return new Property("quantity", "SimpleQuantity",
5057          "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).", 0, 1, quantity);
5058    case -1326018889:
5059      /* dosage */ return new Property("dosage", "Dosage",
5060          "Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.",
5061          0, java.lang.Integer.MAX_VALUE, dosage);
5062    case 1702620169:
5063      /* bodySite */ return new Property("bodySite", "CodeableConcept",
5064          "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).",
5065          0, java.lang.Integer.MAX_VALUE, bodySite);
5066    case 1498467355:
5067      /* specimenRequirement */ return new Property("specimenRequirement", "Reference(SpecimenDefinition)",
5068          "Defines specimen requirements for the action to be performed, such as required specimens for a lab test.", 0,
5069          java.lang.Integer.MAX_VALUE, specimenRequirement);
5070    case 362354807:
5071      /* observationRequirement */ return new Property("observationRequirement", "Reference(ObservationDefinition)",
5072          "Defines observation requirements for the action to be performed, such as body weight or surface area.", 0,
5073          java.lang.Integer.MAX_VALUE, observationRequirement);
5074    case 395230490:
5075      /* observationResultRequirement */ return new Property("observationResultRequirement",
5076          "Reference(ObservationDefinition)",
5077          "Defines the observations that are expected to be produced by the action.", 0, java.lang.Integer.MAX_VALUE,
5078          observationResultRequirement);
5079    case 1052666732:
5080      /* transform */ return new Property("transform", "canonical(StructureMap)",
5081          "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.",
5082          0, 1, transform);
5083    case 572625010:
5084      /* dynamicValue */ return new Property("dynamicValue", "",
5085          "Dynamic values that will be evaluated to produce values for elements of the resulting resource. For example, if the dosage of a medication must be computed based on the patient's weight, a dynamic value would be used to specify an expression that calculated the weight, and the path on the request resource that would contain the result.",
5086          0, java.lang.Integer.MAX_VALUE, dynamicValue);
5087    default:
5088      return super.getNamedProperty(_hash, _name, _checkValid);
5089    }
5090
5091  }
5092
5093  @Override
5094  public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5095    switch (hash) {
5096    case 116079:
5097      /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType
5098    case -1618432855:
5099      /* identifier */ return this.identifier == null ? new Base[0]
5100          : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
5101    case 351608024:
5102      /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType
5103    case 3373707:
5104      /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
5105    case 110371416:
5106      /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType
5107    case -2060497896:
5108      /* subtitle */ return this.subtitle == null ? new Base[0] : new Base[] { this.subtitle }; // StringType
5109    case -892481550:
5110      /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<PublicationStatus>
5111    case -404562712:
5112      /* experimental */ return this.experimental == null ? new Base[0] : new Base[] { this.experimental }; // BooleanType
5113    case -1867885268:
5114      /* subject */ return this.subject == null ? new Base[0] : new Base[] { this.subject }; // Type
5115    case 3076014:
5116      /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType
5117    case 1447404028:
5118      /* publisher */ return this.publisher == null ? new Base[0] : new Base[] { this.publisher }; // StringType
5119    case 951526432:
5120      /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
5121    case -1724546052:
5122      /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // MarkdownType
5123    case -669707736:
5124      /* useContext */ return this.useContext == null ? new Base[0]
5125          : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
5126    case -507075711:
5127      /* jurisdiction */ return this.jurisdiction == null ? new Base[0]
5128          : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
5129    case -220463842:
5130      /* purpose */ return this.purpose == null ? new Base[0] : new Base[] { this.purpose }; // MarkdownType
5131    case 111574433:
5132      /* usage */ return this.usage == null ? new Base[0] : new Base[] { this.usage }; // StringType
5133    case 1522889671:
5134      /* copyright */ return this.copyright == null ? new Base[0] : new Base[] { this.copyright }; // MarkdownType
5135    case 223539345:
5136      /* approvalDate */ return this.approvalDate == null ? new Base[0] : new Base[] { this.approvalDate }; // DateType
5137    case -1687512484:
5138      /* lastReviewDate */ return this.lastReviewDate == null ? new Base[0] : new Base[] { this.lastReviewDate }; // DateType
5139    case -403934648:
5140      /* effectivePeriod */ return this.effectivePeriod == null ? new Base[0] : new Base[] { this.effectivePeriod }; // Period
5141    case 110546223:
5142      /* topic */ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
5143    case -1406328437:
5144      /* author */ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
5145    case -1307827859:
5146      /* editor */ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
5147    case -261190139:
5148      /* reviewer */ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
5149    case 1740277666:
5150      /* endorser */ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
5151    case 666807069:
5152      /* relatedArtifact */ return this.relatedArtifact == null ? new Base[0]
5153          : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
5154    case 166208699:
5155      /* library */ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // CanonicalType
5156    case 3292052:
5157      /* kind */ return this.kind == null ? new Base[0] : new Base[] { this.kind }; // Enumeration<ActivityDefinitionKind>
5158    case -309425751:
5159      /* profile */ return this.profile == null ? new Base[0] : new Base[] { this.profile }; // CanonicalType
5160    case 3059181:
5161      /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeableConcept
5162    case -1183762788:
5163      /* intent */ return this.intent == null ? new Base[0] : new Base[] { this.intent }; // Enumeration<RequestIntent>
5164    case -1165461084:
5165      /* priority */ return this.priority == null ? new Base[0] : new Base[] { this.priority }; // Enumeration<RequestPriority>
5166    case -1788508167:
5167      /* doNotPerform */ return this.doNotPerform == null ? new Base[0] : new Base[] { this.doNotPerform }; // BooleanType
5168    case -873664438:
5169      /* timing */ return this.timing == null ? new Base[0] : new Base[] { this.timing }; // Type
5170    case 1901043637:
5171      /* location */ return this.location == null ? new Base[0] : new Base[] { this.location }; // Reference
5172    case 767422259:
5173      /* participant */ return this.participant == null ? new Base[0]
5174          : this.participant.toArray(new Base[this.participant.size()]); // ActivityDefinitionParticipantComponent
5175    case -309474065:
5176      /* product */ return this.product == null ? new Base[0] : new Base[] { this.product }; // Type
5177    case -1285004149:
5178      /* quantity */ return this.quantity == null ? new Base[0] : new Base[] { this.quantity }; // Quantity
5179    case -1326018889:
5180      /* dosage */ return this.dosage == null ? new Base[0] : this.dosage.toArray(new Base[this.dosage.size()]); // Dosage
5181    case 1702620169:
5182      /* bodySite */ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // CodeableConcept
5183    case 1498467355:
5184      /* specimenRequirement */ return this.specimenRequirement == null ? new Base[0]
5185          : this.specimenRequirement.toArray(new Base[this.specimenRequirement.size()]); // Reference
5186    case 362354807:
5187      /* observationRequirement */ return this.observationRequirement == null ? new Base[0]
5188          : this.observationRequirement.toArray(new Base[this.observationRequirement.size()]); // Reference
5189    case 395230490:
5190      /* observationResultRequirement */ return this.observationResultRequirement == null ? new Base[0]
5191          : this.observationResultRequirement.toArray(new Base[this.observationResultRequirement.size()]); // Reference
5192    case 1052666732:
5193      /* transform */ return this.transform == null ? new Base[0] : new Base[] { this.transform }; // CanonicalType
5194    case 572625010:
5195      /* dynamicValue */ return this.dynamicValue == null ? new Base[0]
5196          : this.dynamicValue.toArray(new Base[this.dynamicValue.size()]); // ActivityDefinitionDynamicValueComponent
5197    default:
5198      return super.getProperty(hash, name, checkValid);
5199    }
5200
5201  }
5202
5203  @Override
5204  public Base setProperty(int hash, String name, Base value) throws FHIRException {
5205    switch (hash) {
5206    case 116079: // url
5207      this.url = castToUri(value); // UriType
5208      return value;
5209    case -1618432855: // identifier
5210      this.getIdentifier().add(castToIdentifier(value)); // Identifier
5211      return value;
5212    case 351608024: // version
5213      this.version = castToString(value); // StringType
5214      return value;
5215    case 3373707: // name
5216      this.name = castToString(value); // StringType
5217      return value;
5218    case 110371416: // title
5219      this.title = castToString(value); // StringType
5220      return value;
5221    case -2060497896: // subtitle
5222      this.subtitle = castToString(value); // StringType
5223      return value;
5224    case -892481550: // status
5225      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
5226      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
5227      return value;
5228    case -404562712: // experimental
5229      this.experimental = castToBoolean(value); // BooleanType
5230      return value;
5231    case -1867885268: // subject
5232      this.subject = castToType(value); // Type
5233      return value;
5234    case 3076014: // date
5235      this.date = castToDateTime(value); // DateTimeType
5236      return value;
5237    case 1447404028: // publisher
5238      this.publisher = castToString(value); // StringType
5239      return value;
5240    case 951526432: // contact
5241      this.getContact().add(castToContactDetail(value)); // ContactDetail
5242      return value;
5243    case -1724546052: // description
5244      this.description = castToMarkdown(value); // MarkdownType
5245      return value;
5246    case -669707736: // useContext
5247      this.getUseContext().add(castToUsageContext(value)); // UsageContext
5248      return value;
5249    case -507075711: // jurisdiction
5250      this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
5251      return value;
5252    case -220463842: // purpose
5253      this.purpose = castToMarkdown(value); // MarkdownType
5254      return value;
5255    case 111574433: // usage
5256      this.usage = castToString(value); // StringType
5257      return value;
5258    case 1522889671: // copyright
5259      this.copyright = castToMarkdown(value); // MarkdownType
5260      return value;
5261    case 223539345: // approvalDate
5262      this.approvalDate = castToDate(value); // DateType
5263      return value;
5264    case -1687512484: // lastReviewDate
5265      this.lastReviewDate = castToDate(value); // DateType
5266      return value;
5267    case -403934648: // effectivePeriod
5268      this.effectivePeriod = castToPeriod(value); // Period
5269      return value;
5270    case 110546223: // topic
5271      this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept
5272      return value;
5273    case -1406328437: // author
5274      this.getAuthor().add(castToContactDetail(value)); // ContactDetail
5275      return value;
5276    case -1307827859: // editor
5277      this.getEditor().add(castToContactDetail(value)); // ContactDetail
5278      return value;
5279    case -261190139: // reviewer
5280      this.getReviewer().add(castToContactDetail(value)); // ContactDetail
5281      return value;
5282    case 1740277666: // endorser
5283      this.getEndorser().add(castToContactDetail(value)); // ContactDetail
5284      return value;
5285    case 666807069: // relatedArtifact
5286      this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact
5287      return value;
5288    case 166208699: // library
5289      this.getLibrary().add(castToCanonical(value)); // CanonicalType
5290      return value;
5291    case 3292052: // kind
5292      value = new ActivityDefinitionKindEnumFactory().fromType(castToCode(value));
5293      this.kind = (Enumeration) value; // Enumeration<ActivityDefinitionKind>
5294      return value;
5295    case -309425751: // profile
5296      this.profile = castToCanonical(value); // CanonicalType
5297      return value;
5298    case 3059181: // code
5299      this.code = castToCodeableConcept(value); // CodeableConcept
5300      return value;
5301    case -1183762788: // intent
5302      value = new RequestIntentEnumFactory().fromType(castToCode(value));
5303      this.intent = (Enumeration) value; // Enumeration<RequestIntent>
5304      return value;
5305    case -1165461084: // priority
5306      value = new RequestPriorityEnumFactory().fromType(castToCode(value));
5307      this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5308      return value;
5309    case -1788508167: // doNotPerform
5310      this.doNotPerform = castToBoolean(value); // BooleanType
5311      return value;
5312    case -873664438: // timing
5313      this.timing = castToType(value); // Type
5314      return value;
5315    case 1901043637: // location
5316      this.location = castToReference(value); // Reference
5317      return value;
5318    case 767422259: // participant
5319      this.getParticipant().add((ActivityDefinitionParticipantComponent) value); // ActivityDefinitionParticipantComponent
5320      return value;
5321    case -309474065: // product
5322      this.product = castToType(value); // Type
5323      return value;
5324    case -1285004149: // quantity
5325      this.quantity = castToQuantity(value); // Quantity
5326      return value;
5327    case -1326018889: // dosage
5328      this.getDosage().add(castToDosage(value)); // Dosage
5329      return value;
5330    case 1702620169: // bodySite
5331      this.getBodySite().add(castToCodeableConcept(value)); // CodeableConcept
5332      return value;
5333    case 1498467355: // specimenRequirement
5334      this.getSpecimenRequirement().add(castToReference(value)); // Reference
5335      return value;
5336    case 362354807: // observationRequirement
5337      this.getObservationRequirement().add(castToReference(value)); // Reference
5338      return value;
5339    case 395230490: // observationResultRequirement
5340      this.getObservationResultRequirement().add(castToReference(value)); // Reference
5341      return value;
5342    case 1052666732: // transform
5343      this.transform = castToCanonical(value); // CanonicalType
5344      return value;
5345    case 572625010: // dynamicValue
5346      this.getDynamicValue().add((ActivityDefinitionDynamicValueComponent) value); // ActivityDefinitionDynamicValueComponent
5347      return value;
5348    default:
5349      return super.setProperty(hash, name, value);
5350    }
5351
5352  }
5353
5354  @Override
5355  public Base setProperty(String name, Base value) throws FHIRException {
5356    if (name.equals("url")) {
5357      this.url = castToUri(value); // UriType
5358    } else if (name.equals("identifier")) {
5359      this.getIdentifier().add(castToIdentifier(value));
5360    } else if (name.equals("version")) {
5361      this.version = castToString(value); // StringType
5362    } else if (name.equals("name")) {
5363      this.name = castToString(value); // StringType
5364    } else if (name.equals("title")) {
5365      this.title = castToString(value); // StringType
5366    } else if (name.equals("subtitle")) {
5367      this.subtitle = castToString(value); // StringType
5368    } else if (name.equals("status")) {
5369      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
5370      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
5371    } else if (name.equals("experimental")) {
5372      this.experimental = castToBoolean(value); // BooleanType
5373    } else if (name.equals("subject[x]")) {
5374      this.subject = castToType(value); // Type
5375    } else if (name.equals("date")) {
5376      this.date = castToDateTime(value); // DateTimeType
5377    } else if (name.equals("publisher")) {
5378      this.publisher = castToString(value); // StringType
5379    } else if (name.equals("contact")) {
5380      this.getContact().add(castToContactDetail(value));
5381    } else if (name.equals("description")) {
5382      this.description = castToMarkdown(value); // MarkdownType
5383    } else if (name.equals("useContext")) {
5384      this.getUseContext().add(castToUsageContext(value));
5385    } else if (name.equals("jurisdiction")) {
5386      this.getJurisdiction().add(castToCodeableConcept(value));
5387    } else if (name.equals("purpose")) {
5388      this.purpose = castToMarkdown(value); // MarkdownType
5389    } else if (name.equals("usage")) {
5390      this.usage = castToString(value); // StringType
5391    } else if (name.equals("copyright")) {
5392      this.copyright = castToMarkdown(value); // MarkdownType
5393    } else if (name.equals("approvalDate")) {
5394      this.approvalDate = castToDate(value); // DateType
5395    } else if (name.equals("lastReviewDate")) {
5396      this.lastReviewDate = castToDate(value); // DateType
5397    } else if (name.equals("effectivePeriod")) {
5398      this.effectivePeriod = castToPeriod(value); // Period
5399    } else if (name.equals("topic")) {
5400      this.getTopic().add(castToCodeableConcept(value));
5401    } else if (name.equals("author")) {
5402      this.getAuthor().add(castToContactDetail(value));
5403    } else if (name.equals("editor")) {
5404      this.getEditor().add(castToContactDetail(value));
5405    } else if (name.equals("reviewer")) {
5406      this.getReviewer().add(castToContactDetail(value));
5407    } else if (name.equals("endorser")) {
5408      this.getEndorser().add(castToContactDetail(value));
5409    } else if (name.equals("relatedArtifact")) {
5410      this.getRelatedArtifact().add(castToRelatedArtifact(value));
5411    } else if (name.equals("library")) {
5412      this.getLibrary().add(castToCanonical(value));
5413    } else if (name.equals("kind")) {
5414      value = new ActivityDefinitionKindEnumFactory().fromType(castToCode(value));
5415      this.kind = (Enumeration) value; // Enumeration<ActivityDefinitionKind>
5416    } else if (name.equals("profile")) {
5417      this.profile = castToCanonical(value); // CanonicalType
5418    } else if (name.equals("code")) {
5419      this.code = castToCodeableConcept(value); // CodeableConcept
5420    } else if (name.equals("intent")) {
5421      value = new RequestIntentEnumFactory().fromType(castToCode(value));
5422      this.intent = (Enumeration) value; // Enumeration<RequestIntent>
5423    } else if (name.equals("priority")) {
5424      value = new RequestPriorityEnumFactory().fromType(castToCode(value));
5425      this.priority = (Enumeration) value; // Enumeration<RequestPriority>
5426    } else if (name.equals("doNotPerform")) {
5427      this.doNotPerform = castToBoolean(value); // BooleanType
5428    } else if (name.equals("timing[x]")) {
5429      this.timing = castToType(value); // Type
5430    } else if (name.equals("location")) {
5431      this.location = castToReference(value); // Reference
5432    } else if (name.equals("participant")) {
5433      this.getParticipant().add((ActivityDefinitionParticipantComponent) value);
5434    } else if (name.equals("product[x]")) {
5435      this.product = castToType(value); // Type
5436    } else if (name.equals("quantity")) {
5437      this.quantity = castToQuantity(value); // Quantity
5438    } else if (name.equals("dosage")) {
5439      this.getDosage().add(castToDosage(value));
5440    } else if (name.equals("bodySite")) {
5441      this.getBodySite().add(castToCodeableConcept(value));
5442    } else if (name.equals("specimenRequirement")) {
5443      this.getSpecimenRequirement().add(castToReference(value));
5444    } else if (name.equals("observationRequirement")) {
5445      this.getObservationRequirement().add(castToReference(value));
5446    } else if (name.equals("observationResultRequirement")) {
5447      this.getObservationResultRequirement().add(castToReference(value));
5448    } else if (name.equals("transform")) {
5449      this.transform = castToCanonical(value); // CanonicalType
5450    } else if (name.equals("dynamicValue")) {
5451      this.getDynamicValue().add((ActivityDefinitionDynamicValueComponent) value);
5452    } else
5453      return super.setProperty(name, value);
5454    return value;
5455  }
5456
5457  @Override
5458  public void removeChild(String name, Base value) throws FHIRException {
5459    if (name.equals("url")) {
5460      this.url = null;
5461    } else if (name.equals("identifier")) {
5462      this.getIdentifier().remove(castToIdentifier(value));
5463    } else if (name.equals("version")) {
5464      this.version = null;
5465    } else if (name.equals("name")) {
5466      this.name = null;
5467    } else if (name.equals("title")) {
5468      this.title = null;
5469    } else if (name.equals("subtitle")) {
5470      this.subtitle = null;
5471    } else if (name.equals("status")) {
5472      this.status = null;
5473    } else if (name.equals("experimental")) {
5474      this.experimental = null;
5475    } else if (name.equals("subject[x]")) {
5476      this.subject = null;
5477    } else if (name.equals("date")) {
5478      this.date = null;
5479    } else if (name.equals("publisher")) {
5480      this.publisher = null;
5481    } else if (name.equals("contact")) {
5482      this.getContact().remove(castToContactDetail(value));
5483    } else if (name.equals("description")) {
5484      this.description = null;
5485    } else if (name.equals("useContext")) {
5486      this.getUseContext().remove(castToUsageContext(value));
5487    } else if (name.equals("jurisdiction")) {
5488      this.getJurisdiction().remove(castToCodeableConcept(value));
5489    } else if (name.equals("purpose")) {
5490      this.purpose = null;
5491    } else if (name.equals("usage")) {
5492      this.usage = null;
5493    } else if (name.equals("copyright")) {
5494      this.copyright = null;
5495    } else if (name.equals("approvalDate")) {
5496      this.approvalDate = null;
5497    } else if (name.equals("lastReviewDate")) {
5498      this.lastReviewDate = null;
5499    } else if (name.equals("effectivePeriod")) {
5500      this.effectivePeriod = null;
5501    } else if (name.equals("topic")) {
5502      this.getTopic().remove(castToCodeableConcept(value));
5503    } else if (name.equals("author")) {
5504      this.getAuthor().remove(castToContactDetail(value));
5505    } else if (name.equals("editor")) {
5506      this.getEditor().remove(castToContactDetail(value));
5507    } else if (name.equals("reviewer")) {
5508      this.getReviewer().remove(castToContactDetail(value));
5509    } else if (name.equals("endorser")) {
5510      this.getEndorser().remove(castToContactDetail(value));
5511    } else if (name.equals("relatedArtifact")) {
5512      this.getRelatedArtifact().remove(castToRelatedArtifact(value));
5513    } else if (name.equals("library")) {
5514      this.getLibrary().remove(castToCanonical(value));
5515    } else if (name.equals("kind")) {
5516      this.kind = null;
5517    } else if (name.equals("profile")) {
5518      this.profile = null;
5519    } else if (name.equals("code")) {
5520      this.code = null;
5521    } else if (name.equals("intent")) {
5522      this.intent = null;
5523    } else if (name.equals("priority")) {
5524      this.priority = null;
5525    } else if (name.equals("doNotPerform")) {
5526      this.doNotPerform = null;
5527    } else if (name.equals("timing[x]")) {
5528      this.timing = null;
5529    } else if (name.equals("location")) {
5530      this.location = null;
5531    } else if (name.equals("participant")) {
5532      this.getParticipant().remove((ActivityDefinitionParticipantComponent) value);
5533    } else if (name.equals("product[x]")) {
5534      this.product = null;
5535    } else if (name.equals("quantity")) {
5536      this.quantity = null;
5537    } else if (name.equals("dosage")) {
5538      this.getDosage().remove(castToDosage(value));
5539    } else if (name.equals("bodySite")) {
5540      this.getBodySite().remove(castToCodeableConcept(value));
5541    } else if (name.equals("specimenRequirement")) {
5542      this.getSpecimenRequirement().remove(castToReference(value));
5543    } else if (name.equals("observationRequirement")) {
5544      this.getObservationRequirement().remove(castToReference(value));
5545    } else if (name.equals("observationResultRequirement")) {
5546      this.getObservationResultRequirement().remove(castToReference(value));
5547    } else if (name.equals("transform")) {
5548      this.transform = null;
5549    } else if (name.equals("dynamicValue")) {
5550      this.getDynamicValue().remove((ActivityDefinitionDynamicValueComponent) value);
5551    } else
5552      super.removeChild(name, value);
5553    
5554  }
5555
5556  @Override
5557  public Base makeProperty(int hash, String name) throws FHIRException {
5558    switch (hash) {
5559    case 116079:
5560      return getUrlElement();
5561    case -1618432855:
5562      return addIdentifier();
5563    case 351608024:
5564      return getVersionElement();
5565    case 3373707:
5566      return getNameElement();
5567    case 110371416:
5568      return getTitleElement();
5569    case -2060497896:
5570      return getSubtitleElement();
5571    case -892481550:
5572      return getStatusElement();
5573    case -404562712:
5574      return getExperimentalElement();
5575    case -573640748:
5576      return getSubject();
5577    case -1867885268:
5578      return getSubject();
5579    case 3076014:
5580      return getDateElement();
5581    case 1447404028:
5582      return getPublisherElement();
5583    case 951526432:
5584      return addContact();
5585    case -1724546052:
5586      return getDescriptionElement();
5587    case -669707736:
5588      return addUseContext();
5589    case -507075711:
5590      return addJurisdiction();
5591    case -220463842:
5592      return getPurposeElement();
5593    case 111574433:
5594      return getUsageElement();
5595    case 1522889671:
5596      return getCopyrightElement();
5597    case 223539345:
5598      return getApprovalDateElement();
5599    case -1687512484:
5600      return getLastReviewDateElement();
5601    case -403934648:
5602      return getEffectivePeriod();
5603    case 110546223:
5604      return addTopic();
5605    case -1406328437:
5606      return addAuthor();
5607    case -1307827859:
5608      return addEditor();
5609    case -261190139:
5610      return addReviewer();
5611    case 1740277666:
5612      return addEndorser();
5613    case 666807069:
5614      return addRelatedArtifact();
5615    case 166208699:
5616      return addLibraryElement();
5617    case 3292052:
5618      return getKindElement();
5619    case -309425751:
5620      return getProfileElement();
5621    case 3059181:
5622      return getCode();
5623    case -1183762788:
5624      return getIntentElement();
5625    case -1165461084:
5626      return getPriorityElement();
5627    case -1788508167:
5628      return getDoNotPerformElement();
5629    case 164632566:
5630      return getTiming();
5631    case -873664438:
5632      return getTiming();
5633    case 1901043637:
5634      return getLocation();
5635    case 767422259:
5636      return addParticipant();
5637    case 1753005361:
5638      return getProduct();
5639    case -309474065:
5640      return getProduct();
5641    case -1285004149:
5642      return getQuantity();
5643    case -1326018889:
5644      return addDosage();
5645    case 1702620169:
5646      return addBodySite();
5647    case 1498467355:
5648      return addSpecimenRequirement();
5649    case 362354807:
5650      return addObservationRequirement();
5651    case 395230490:
5652      return addObservationResultRequirement();
5653    case 1052666732:
5654      return getTransformElement();
5655    case 572625010:
5656      return addDynamicValue();
5657    default:
5658      return super.makeProperty(hash, name);
5659    }
5660
5661  }
5662
5663  @Override
5664  public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5665    switch (hash) {
5666    case 116079:
5667      /* url */ return new String[] { "uri" };
5668    case -1618432855:
5669      /* identifier */ return new String[] { "Identifier" };
5670    case 351608024:
5671      /* version */ return new String[] { "string" };
5672    case 3373707:
5673      /* name */ return new String[] { "string" };
5674    case 110371416:
5675      /* title */ return new String[] { "string" };
5676    case -2060497896:
5677      /* subtitle */ return new String[] { "string" };
5678    case -892481550:
5679      /* status */ return new String[] { "code" };
5680    case -404562712:
5681      /* experimental */ return new String[] { "boolean" };
5682    case -1867885268:
5683      /* subject */ return new String[] { "CodeableConcept", "Reference" };
5684    case 3076014:
5685      /* date */ return new String[] { "dateTime" };
5686    case 1447404028:
5687      /* publisher */ return new String[] { "string" };
5688    case 951526432:
5689      /* contact */ return new String[] { "ContactDetail" };
5690    case -1724546052:
5691      /* description */ return new String[] { "markdown" };
5692    case -669707736:
5693      /* useContext */ return new String[] { "UsageContext" };
5694    case -507075711:
5695      /* jurisdiction */ return new String[] { "CodeableConcept" };
5696    case -220463842:
5697      /* purpose */ return new String[] { "markdown" };
5698    case 111574433:
5699      /* usage */ return new String[] { "string" };
5700    case 1522889671:
5701      /* copyright */ return new String[] { "markdown" };
5702    case 223539345:
5703      /* approvalDate */ return new String[] { "date" };
5704    case -1687512484:
5705      /* lastReviewDate */ return new String[] { "date" };
5706    case -403934648:
5707      /* effectivePeriod */ return new String[] { "Period" };
5708    case 110546223:
5709      /* topic */ return new String[] { "CodeableConcept" };
5710    case -1406328437:
5711      /* author */ return new String[] { "ContactDetail" };
5712    case -1307827859:
5713      /* editor */ return new String[] { "ContactDetail" };
5714    case -261190139:
5715      /* reviewer */ return new String[] { "ContactDetail" };
5716    case 1740277666:
5717      /* endorser */ return new String[] { "ContactDetail" };
5718    case 666807069:
5719      /* relatedArtifact */ return new String[] { "RelatedArtifact" };
5720    case 166208699:
5721      /* library */ return new String[] { "canonical" };
5722    case 3292052:
5723      /* kind */ return new String[] { "code" };
5724    case -309425751:
5725      /* profile */ return new String[] { "canonical" };
5726    case 3059181:
5727      /* code */ return new String[] { "CodeableConcept" };
5728    case -1183762788:
5729      /* intent */ return new String[] { "code" };
5730    case -1165461084:
5731      /* priority */ return new String[] { "code" };
5732    case -1788508167:
5733      /* doNotPerform */ return new String[] { "boolean" };
5734    case -873664438:
5735      /* timing */ return new String[] { "Timing", "dateTime", "Age", "Period", "Range", "Duration" };
5736    case 1901043637:
5737      /* location */ return new String[] { "Reference" };
5738    case 767422259:
5739      /* participant */ return new String[] {};
5740    case -309474065:
5741      /* product */ return new String[] { "Reference", "CodeableConcept" };
5742    case -1285004149:
5743      /* quantity */ return new String[] { "SimpleQuantity" };
5744    case -1326018889:
5745      /* dosage */ return new String[] { "Dosage" };
5746    case 1702620169:
5747      /* bodySite */ return new String[] { "CodeableConcept" };
5748    case 1498467355:
5749      /* specimenRequirement */ return new String[] { "Reference" };
5750    case 362354807:
5751      /* observationRequirement */ return new String[] { "Reference" };
5752    case 395230490:
5753      /* observationResultRequirement */ return new String[] { "Reference" };
5754    case 1052666732:
5755      /* transform */ return new String[] { "canonical" };
5756    case 572625010:
5757      /* dynamicValue */ return new String[] {};
5758    default:
5759      return super.getTypesForProperty(hash, name);
5760    }
5761
5762  }
5763
5764  @Override
5765  public Base addChild(String name) throws FHIRException {
5766    if (name.equals("url")) {
5767      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.url");
5768    } else if (name.equals("identifier")) {
5769      return addIdentifier();
5770    } else if (name.equals("version")) {
5771      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.version");
5772    } else if (name.equals("name")) {
5773      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.name");
5774    } else if (name.equals("title")) {
5775      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.title");
5776    } else if (name.equals("subtitle")) {
5777      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.subtitle");
5778    } else if (name.equals("status")) {
5779      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.status");
5780    } else if (name.equals("experimental")) {
5781      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.experimental");
5782    } else if (name.equals("subjectCodeableConcept")) {
5783      this.subject = new CodeableConcept();
5784      return this.subject;
5785    } else if (name.equals("subjectReference")) {
5786      this.subject = new Reference();
5787      return this.subject;
5788    } else if (name.equals("date")) {
5789      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.date");
5790    } else if (name.equals("publisher")) {
5791      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.publisher");
5792    } else if (name.equals("contact")) {
5793      return addContact();
5794    } else if (name.equals("description")) {
5795      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.description");
5796    } else if (name.equals("useContext")) {
5797      return addUseContext();
5798    } else if (name.equals("jurisdiction")) {
5799      return addJurisdiction();
5800    } else if (name.equals("purpose")) {
5801      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.purpose");
5802    } else if (name.equals("usage")) {
5803      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.usage");
5804    } else if (name.equals("copyright")) {
5805      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.copyright");
5806    } else if (name.equals("approvalDate")) {
5807      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.approvalDate");
5808    } else if (name.equals("lastReviewDate")) {
5809      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.lastReviewDate");
5810    } else if (name.equals("effectivePeriod")) {
5811      this.effectivePeriod = new Period();
5812      return this.effectivePeriod;
5813    } else if (name.equals("topic")) {
5814      return addTopic();
5815    } else if (name.equals("author")) {
5816      return addAuthor();
5817    } else if (name.equals("editor")) {
5818      return addEditor();
5819    } else if (name.equals("reviewer")) {
5820      return addReviewer();
5821    } else if (name.equals("endorser")) {
5822      return addEndorser();
5823    } else if (name.equals("relatedArtifact")) {
5824      return addRelatedArtifact();
5825    } else if (name.equals("library")) {
5826      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.library");
5827    } else if (name.equals("kind")) {
5828      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.kind");
5829    } else if (name.equals("profile")) {
5830      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.profile");
5831    } else if (name.equals("code")) {
5832      this.code = new CodeableConcept();
5833      return this.code;
5834    } else if (name.equals("intent")) {
5835      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.intent");
5836    } else if (name.equals("priority")) {
5837      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.priority");
5838    } else if (name.equals("doNotPerform")) {
5839      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.doNotPerform");
5840    } else if (name.equals("timingTiming")) {
5841      this.timing = new Timing();
5842      return this.timing;
5843    } else if (name.equals("timingDateTime")) {
5844      this.timing = new DateTimeType();
5845      return this.timing;
5846    } else if (name.equals("timingAge")) {
5847      this.timing = new Age();
5848      return this.timing;
5849    } else if (name.equals("timingPeriod")) {
5850      this.timing = new Period();
5851      return this.timing;
5852    } else if (name.equals("timingRange")) {
5853      this.timing = new Range();
5854      return this.timing;
5855    } else if (name.equals("timingDuration")) {
5856      this.timing = new Duration();
5857      return this.timing;
5858    } else if (name.equals("location")) {
5859      this.location = new Reference();
5860      return this.location;
5861    } else if (name.equals("participant")) {
5862      return addParticipant();
5863    } else if (name.equals("productReference")) {
5864      this.product = new Reference();
5865      return this.product;
5866    } else if (name.equals("productCodeableConcept")) {
5867      this.product = new CodeableConcept();
5868      return this.product;
5869    } else if (name.equals("quantity")) {
5870      this.quantity = new Quantity();
5871      return this.quantity;
5872    } else if (name.equals("dosage")) {
5873      return addDosage();
5874    } else if (name.equals("bodySite")) {
5875      return addBodySite();
5876    } else if (name.equals("specimenRequirement")) {
5877      return addSpecimenRequirement();
5878    } else if (name.equals("observationRequirement")) {
5879      return addObservationRequirement();
5880    } else if (name.equals("observationResultRequirement")) {
5881      return addObservationResultRequirement();
5882    } else if (name.equals("transform")) {
5883      throw new FHIRException("Cannot call addChild on a singleton property ActivityDefinition.transform");
5884    } else if (name.equals("dynamicValue")) {
5885      return addDynamicValue();
5886    } else
5887      return super.addChild(name);
5888  }
5889
5890  public String fhirType() {
5891    return "ActivityDefinition";
5892
5893  }
5894
5895  public ActivityDefinition copy() {
5896    ActivityDefinition dst = new ActivityDefinition();
5897    copyValues(dst);
5898    return dst;
5899  }
5900
5901  public void copyValues(ActivityDefinition dst) {
5902    super.copyValues(dst);
5903    dst.url = url == null ? null : url.copy();
5904    if (identifier != null) {
5905      dst.identifier = new ArrayList<Identifier>();
5906      for (Identifier i : identifier)
5907        dst.identifier.add(i.copy());
5908    }
5909    ;
5910    dst.version = version == null ? null : version.copy();
5911    dst.name = name == null ? null : name.copy();
5912    dst.title = title == null ? null : title.copy();
5913    dst.subtitle = subtitle == null ? null : subtitle.copy();
5914    dst.status = status == null ? null : status.copy();
5915    dst.experimental = experimental == null ? null : experimental.copy();
5916    dst.subject = subject == null ? null : subject.copy();
5917    dst.date = date == null ? null : date.copy();
5918    dst.publisher = publisher == null ? null : publisher.copy();
5919    if (contact != null) {
5920      dst.contact = new ArrayList<ContactDetail>();
5921      for (ContactDetail i : contact)
5922        dst.contact.add(i.copy());
5923    }
5924    ;
5925    dst.description = description == null ? null : description.copy();
5926    if (useContext != null) {
5927      dst.useContext = new ArrayList<UsageContext>();
5928      for (UsageContext i : useContext)
5929        dst.useContext.add(i.copy());
5930    }
5931    ;
5932    if (jurisdiction != null) {
5933      dst.jurisdiction = new ArrayList<CodeableConcept>();
5934      for (CodeableConcept i : jurisdiction)
5935        dst.jurisdiction.add(i.copy());
5936    }
5937    ;
5938    dst.purpose = purpose == null ? null : purpose.copy();
5939    dst.usage = usage == null ? null : usage.copy();
5940    dst.copyright = copyright == null ? null : copyright.copy();
5941    dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
5942    dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
5943    dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
5944    if (topic != null) {
5945      dst.topic = new ArrayList<CodeableConcept>();
5946      for (CodeableConcept i : topic)
5947        dst.topic.add(i.copy());
5948    }
5949    ;
5950    if (author != null) {
5951      dst.author = new ArrayList<ContactDetail>();
5952      for (ContactDetail i : author)
5953        dst.author.add(i.copy());
5954    }
5955    ;
5956    if (editor != null) {
5957      dst.editor = new ArrayList<ContactDetail>();
5958      for (ContactDetail i : editor)
5959        dst.editor.add(i.copy());
5960    }
5961    ;
5962    if (reviewer != null) {
5963      dst.reviewer = new ArrayList<ContactDetail>();
5964      for (ContactDetail i : reviewer)
5965        dst.reviewer.add(i.copy());
5966    }
5967    ;
5968    if (endorser != null) {
5969      dst.endorser = new ArrayList<ContactDetail>();
5970      for (ContactDetail i : endorser)
5971        dst.endorser.add(i.copy());
5972    }
5973    ;
5974    if (relatedArtifact != null) {
5975      dst.relatedArtifact = new ArrayList<RelatedArtifact>();
5976      for (RelatedArtifact i : relatedArtifact)
5977        dst.relatedArtifact.add(i.copy());
5978    }
5979    ;
5980    if (library != null) {
5981      dst.library = new ArrayList<CanonicalType>();
5982      for (CanonicalType i : library)
5983        dst.library.add(i.copy());
5984    }
5985    ;
5986    dst.kind = kind == null ? null : kind.copy();
5987    dst.profile = profile == null ? null : profile.copy();
5988    dst.code = code == null ? null : code.copy();
5989    dst.intent = intent == null ? null : intent.copy();
5990    dst.priority = priority == null ? null : priority.copy();
5991    dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy();
5992    dst.timing = timing == null ? null : timing.copy();
5993    dst.location = location == null ? null : location.copy();
5994    if (participant != null) {
5995      dst.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
5996      for (ActivityDefinitionParticipantComponent i : participant)
5997        dst.participant.add(i.copy());
5998    }
5999    ;
6000    dst.product = product == null ? null : product.copy();
6001    dst.quantity = quantity == null ? null : quantity.copy();
6002    if (dosage != null) {
6003      dst.dosage = new ArrayList<Dosage>();
6004      for (Dosage i : dosage)
6005        dst.dosage.add(i.copy());
6006    }
6007    ;
6008    if (bodySite != null) {
6009      dst.bodySite = new ArrayList<CodeableConcept>();
6010      for (CodeableConcept i : bodySite)
6011        dst.bodySite.add(i.copy());
6012    }
6013    ;
6014    if (specimenRequirement != null) {
6015      dst.specimenRequirement = new ArrayList<Reference>();
6016      for (Reference i : specimenRequirement)
6017        dst.specimenRequirement.add(i.copy());
6018    }
6019    ;
6020    if (observationRequirement != null) {
6021      dst.observationRequirement = new ArrayList<Reference>();
6022      for (Reference i : observationRequirement)
6023        dst.observationRequirement.add(i.copy());
6024    }
6025    ;
6026    if (observationResultRequirement != null) {
6027      dst.observationResultRequirement = new ArrayList<Reference>();
6028      for (Reference i : observationResultRequirement)
6029        dst.observationResultRequirement.add(i.copy());
6030    }
6031    ;
6032    dst.transform = transform == null ? null : transform.copy();
6033    if (dynamicValue != null) {
6034      dst.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
6035      for (ActivityDefinitionDynamicValueComponent i : dynamicValue)
6036        dst.dynamicValue.add(i.copy());
6037    }
6038    ;
6039  }
6040
6041  protected ActivityDefinition typedCopy() {
6042    return copy();
6043  }
6044
6045  @Override
6046  public boolean equalsDeep(Base other_) {
6047    if (!super.equalsDeep(other_))
6048      return false;
6049    if (!(other_ instanceof ActivityDefinition))
6050      return false;
6051    ActivityDefinition o = (ActivityDefinition) other_;
6052    return compareDeep(identifier, o.identifier, true) && compareDeep(subtitle, o.subtitle, true)
6053        && compareDeep(subject, o.subject, true) && compareDeep(purpose, o.purpose, true)
6054        && compareDeep(usage, o.usage, true) && compareDeep(copyright, o.copyright, true)
6055        && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
6056        && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(topic, o.topic, true)
6057        && compareDeep(author, o.author, true) && compareDeep(editor, o.editor, true)
6058        && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true)
6059        && compareDeep(relatedArtifact, o.relatedArtifact, true) && compareDeep(library, o.library, true)
6060        && compareDeep(kind, o.kind, true) && compareDeep(profile, o.profile, true) && compareDeep(code, o.code, true)
6061        && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true)
6062        && compareDeep(doNotPerform, o.doNotPerform, true) && compareDeep(timing, o.timing, true)
6063        && compareDeep(location, o.location, true) && compareDeep(participant, o.participant, true)
6064        && compareDeep(product, o.product, true) && compareDeep(quantity, o.quantity, true)
6065        && compareDeep(dosage, o.dosage, true) && compareDeep(bodySite, o.bodySite, true)
6066        && compareDeep(specimenRequirement, o.specimenRequirement, true)
6067        && compareDeep(observationRequirement, o.observationRequirement, true)
6068        && compareDeep(observationResultRequirement, o.observationResultRequirement, true)
6069        && compareDeep(transform, o.transform, true) && compareDeep(dynamicValue, o.dynamicValue, true);
6070  }
6071
6072  @Override
6073  public boolean equalsShallow(Base other_) {
6074    if (!super.equalsShallow(other_))
6075      return false;
6076    if (!(other_ instanceof ActivityDefinition))
6077      return false;
6078    ActivityDefinition o = (ActivityDefinition) other_;
6079    return compareValues(subtitle, o.subtitle, true) && compareValues(purpose, o.purpose, true)
6080        && compareValues(usage, o.usage, true) && compareValues(copyright, o.copyright, true)
6081        && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
6082        && compareValues(kind, o.kind, true) && compareValues(intent, o.intent, true)
6083        && compareValues(priority, o.priority, true) && compareValues(doNotPerform, o.doNotPerform, true);
6084  }
6085
6086  public boolean isEmpty() {
6087    return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, subtitle, subject, purpose, usage,
6088        copyright, approvalDate, lastReviewDate, effectivePeriod, topic, author, editor, reviewer, endorser,
6089        relatedArtifact, library, kind, profile, code, intent, priority, doNotPerform, timing, location, participant,
6090        product, quantity, dosage, bodySite, specimenRequirement, observationRequirement, observationResultRequirement,
6091        transform, dynamicValue);
6092  }
6093
6094  @Override
6095  public ResourceType getResourceType() {
6096    return ResourceType.ActivityDefinition;
6097  }
6098
6099  /**
6100   * Search parameter: <b>date</b>
6101   * <p>
6102   * Description: <b>The activity definition publication date</b><br>
6103   * Type: <b>date</b><br>
6104   * Path: <b>ActivityDefinition.date</b><br>
6105   * </p>
6106   */
6107  @SearchParamDefinition(name = "date", path = "ActivityDefinition.date", description = "The activity definition publication date", type = "date")
6108  public static final String SP_DATE = "date";
6109  /**
6110   * <b>Fluent Client</b> search parameter constant for <b>date</b>
6111   * <p>
6112   * Description: <b>The activity definition publication date</b><br>
6113   * Type: <b>date</b><br>
6114   * Path: <b>ActivityDefinition.date</b><br>
6115   * </p>
6116   */
6117  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(
6118      SP_DATE);
6119
6120  /**
6121   * Search parameter: <b>identifier</b>
6122   * <p>
6123   * Description: <b>External identifier for the activity definition</b><br>
6124   * Type: <b>token</b><br>
6125   * Path: <b>ActivityDefinition.identifier</b><br>
6126   * </p>
6127   */
6128  @SearchParamDefinition(name = "identifier", path = "ActivityDefinition.identifier", description = "External identifier for the activity definition", type = "token")
6129  public static final String SP_IDENTIFIER = "identifier";
6130  /**
6131   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
6132   * <p>
6133   * Description: <b>External identifier for the activity definition</b><br>
6134   * Type: <b>token</b><br>
6135   * Path: <b>ActivityDefinition.identifier</b><br>
6136   * </p>
6137   */
6138  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6139      SP_IDENTIFIER);
6140
6141  /**
6142   * Search parameter: <b>successor</b>
6143   * <p>
6144   * Description: <b>What resource is being referenced</b><br>
6145   * Type: <b>reference</b><br>
6146   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6147   * </p>
6148   */
6149  @SearchParamDefinition(name = "successor", path = "ActivityDefinition.relatedArtifact.where(type='successor').resource", description = "What resource is being referenced", type = "reference")
6150  public static final String SP_SUCCESSOR = "successor";
6151  /**
6152   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
6153   * <p>
6154   * Description: <b>What resource is being referenced</b><br>
6155   * Type: <b>reference</b><br>
6156   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6157   * </p>
6158   */
6159  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
6160      SP_SUCCESSOR);
6161
6162  /**
6163   * Constant for fluent queries to be used to add include statements. Specifies
6164   * the path value of "<b>ActivityDefinition:successor</b>".
6165   */
6166  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include(
6167      "ActivityDefinition:successor").toLocked();
6168
6169  /**
6170   * Search parameter: <b>context-type-value</b>
6171   * <p>
6172   * Description: <b>A use context type and value assigned to the activity
6173   * definition</b><br>
6174   * Type: <b>composite</b><br>
6175   * Path: <b></b><br>
6176   * </p>
6177   */
6178  @SearchParamDefinition(name = "context-type-value", path = "ActivityDefinition.useContext", description = "A use context type and value assigned to the activity definition", type = "composite", compositeOf = {
6179      "context-type", "context" })
6180  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
6181  /**
6182   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
6183   * <p>
6184   * Description: <b>A use context type and value assigned to the activity
6185   * definition</b><br>
6186   * Type: <b>composite</b><br>
6187   * Path: <b></b><br>
6188   * </p>
6189   */
6190  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(
6191      SP_CONTEXT_TYPE_VALUE);
6192
6193  /**
6194   * Search parameter: <b>jurisdiction</b>
6195   * <p>
6196   * Description: <b>Intended jurisdiction for the activity definition</b><br>
6197   * Type: <b>token</b><br>
6198   * Path: <b>ActivityDefinition.jurisdiction</b><br>
6199   * </p>
6200   */
6201  @SearchParamDefinition(name = "jurisdiction", path = "ActivityDefinition.jurisdiction", description = "Intended jurisdiction for the activity definition", type = "token")
6202  public static final String SP_JURISDICTION = "jurisdiction";
6203  /**
6204   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
6205   * <p>
6206   * Description: <b>Intended jurisdiction for the activity definition</b><br>
6207   * Type: <b>token</b><br>
6208   * Path: <b>ActivityDefinition.jurisdiction</b><br>
6209   * </p>
6210   */
6211  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6212      SP_JURISDICTION);
6213
6214  /**
6215   * Search parameter: <b>description</b>
6216   * <p>
6217   * Description: <b>The description of the activity definition</b><br>
6218   * Type: <b>string</b><br>
6219   * Path: <b>ActivityDefinition.description</b><br>
6220   * </p>
6221   */
6222  @SearchParamDefinition(name = "description", path = "ActivityDefinition.description", description = "The description of the activity definition", type = "string")
6223  public static final String SP_DESCRIPTION = "description";
6224  /**
6225   * <b>Fluent Client</b> search parameter constant for <b>description</b>
6226   * <p>
6227   * Description: <b>The description of the activity definition</b><br>
6228   * Type: <b>string</b><br>
6229   * Path: <b>ActivityDefinition.description</b><br>
6230   * </p>
6231   */
6232  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(
6233      SP_DESCRIPTION);
6234
6235  /**
6236   * Search parameter: <b>derived-from</b>
6237   * <p>
6238   * Description: <b>What resource is being referenced</b><br>
6239   * Type: <b>reference</b><br>
6240   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6241   * </p>
6242   */
6243  @SearchParamDefinition(name = "derived-from", path = "ActivityDefinition.relatedArtifact.where(type='derived-from').resource", description = "What resource is being referenced", type = "reference")
6244  public static final String SP_DERIVED_FROM = "derived-from";
6245  /**
6246   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
6247   * <p>
6248   * Description: <b>What resource is being referenced</b><br>
6249   * Type: <b>reference</b><br>
6250   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6251   * </p>
6252   */
6253  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
6254      SP_DERIVED_FROM);
6255
6256  /**
6257   * Constant for fluent queries to be used to add include statements. Specifies
6258   * the path value of "<b>ActivityDefinition:derived-from</b>".
6259   */
6260  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include(
6261      "ActivityDefinition:derived-from").toLocked();
6262
6263  /**
6264   * Search parameter: <b>context-type</b>
6265   * <p>
6266   * Description: <b>A type of use context assigned to the activity
6267   * definition</b><br>
6268   * Type: <b>token</b><br>
6269   * Path: <b>ActivityDefinition.useContext.code</b><br>
6270   * </p>
6271   */
6272  @SearchParamDefinition(name = "context-type", path = "ActivityDefinition.useContext.code", description = "A type of use context assigned to the activity definition", type = "token")
6273  public static final String SP_CONTEXT_TYPE = "context-type";
6274  /**
6275   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
6276   * <p>
6277   * Description: <b>A type of use context assigned to the activity
6278   * definition</b><br>
6279   * Type: <b>token</b><br>
6280   * Path: <b>ActivityDefinition.useContext.code</b><br>
6281   * </p>
6282   */
6283  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6284      SP_CONTEXT_TYPE);
6285
6286  /**
6287   * Search parameter: <b>predecessor</b>
6288   * <p>
6289   * Description: <b>What resource is being referenced</b><br>
6290   * Type: <b>reference</b><br>
6291   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6292   * </p>
6293   */
6294  @SearchParamDefinition(name = "predecessor", path = "ActivityDefinition.relatedArtifact.where(type='predecessor').resource", description = "What resource is being referenced", type = "reference")
6295  public static final String SP_PREDECESSOR = "predecessor";
6296  /**
6297   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
6298   * <p>
6299   * Description: <b>What resource is being referenced</b><br>
6300   * Type: <b>reference</b><br>
6301   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6302   * </p>
6303   */
6304  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
6305      SP_PREDECESSOR);
6306
6307  /**
6308   * Constant for fluent queries to be used to add include statements. Specifies
6309   * the path value of "<b>ActivityDefinition:predecessor</b>".
6310   */
6311  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include(
6312      "ActivityDefinition:predecessor").toLocked();
6313
6314  /**
6315   * Search parameter: <b>title</b>
6316   * <p>
6317   * Description: <b>The human-friendly name of the activity definition</b><br>
6318   * Type: <b>string</b><br>
6319   * Path: <b>ActivityDefinition.title</b><br>
6320   * </p>
6321   */
6322  @SearchParamDefinition(name = "title", path = "ActivityDefinition.title", description = "The human-friendly name of the activity definition", type = "string")
6323  public static final String SP_TITLE = "title";
6324  /**
6325   * <b>Fluent Client</b> search parameter constant for <b>title</b>
6326   * <p>
6327   * Description: <b>The human-friendly name of the activity definition</b><br>
6328   * Type: <b>string</b><br>
6329   * Path: <b>ActivityDefinition.title</b><br>
6330   * </p>
6331   */
6332  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(
6333      SP_TITLE);
6334
6335  /**
6336   * Search parameter: <b>composed-of</b>
6337   * <p>
6338   * Description: <b>What resource is being referenced</b><br>
6339   * Type: <b>reference</b><br>
6340   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6341   * </p>
6342   */
6343  @SearchParamDefinition(name = "composed-of", path = "ActivityDefinition.relatedArtifact.where(type='composed-of').resource", description = "What resource is being referenced", type = "reference")
6344  public static final String SP_COMPOSED_OF = "composed-of";
6345  /**
6346   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
6347   * <p>
6348   * Description: <b>What resource is being referenced</b><br>
6349   * Type: <b>reference</b><br>
6350   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
6351   * </p>
6352   */
6353  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
6354      SP_COMPOSED_OF);
6355
6356  /**
6357   * Constant for fluent queries to be used to add include statements. Specifies
6358   * the path value of "<b>ActivityDefinition:composed-of</b>".
6359   */
6360  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include(
6361      "ActivityDefinition:composed-of").toLocked();
6362
6363  /**
6364   * Search parameter: <b>version</b>
6365   * <p>
6366   * Description: <b>The business version of the activity definition</b><br>
6367   * Type: <b>token</b><br>
6368   * Path: <b>ActivityDefinition.version</b><br>
6369   * </p>
6370   */
6371  @SearchParamDefinition(name = "version", path = "ActivityDefinition.version", description = "The business version of the activity definition", type = "token")
6372  public static final String SP_VERSION = "version";
6373  /**
6374   * <b>Fluent Client</b> search parameter constant for <b>version</b>
6375   * <p>
6376   * Description: <b>The business version of the activity definition</b><br>
6377   * Type: <b>token</b><br>
6378   * Path: <b>ActivityDefinition.version</b><br>
6379   * </p>
6380   */
6381  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6382      SP_VERSION);
6383
6384  /**
6385   * Search parameter: <b>url</b>
6386   * <p>
6387   * Description: <b>The uri that identifies the activity definition</b><br>
6388   * Type: <b>uri</b><br>
6389   * Path: <b>ActivityDefinition.url</b><br>
6390   * </p>
6391   */
6392  @SearchParamDefinition(name = "url", path = "ActivityDefinition.url", description = "The uri that identifies the activity definition", type = "uri")
6393  public static final String SP_URL = "url";
6394  /**
6395   * <b>Fluent Client</b> search parameter constant for <b>url</b>
6396   * <p>
6397   * Description: <b>The uri that identifies the activity definition</b><br>
6398   * Type: <b>uri</b><br>
6399   * Path: <b>ActivityDefinition.url</b><br>
6400   * </p>
6401   */
6402  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
6403
6404  /**
6405   * Search parameter: <b>context-quantity</b>
6406   * <p>
6407   * Description: <b>A quantity- or range-valued use context assigned to the
6408   * activity definition</b><br>
6409   * Type: <b>quantity</b><br>
6410   * Path: <b>ActivityDefinition.useContext.valueQuantity,
6411   * ActivityDefinition.useContext.valueRange</b><br>
6412   * </p>
6413   */
6414  @SearchParamDefinition(name = "context-quantity", path = "(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)", description = "A quantity- or range-valued use context assigned to the activity definition", type = "quantity")
6415  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
6416  /**
6417   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
6418   * <p>
6419   * Description: <b>A quantity- or range-valued use context assigned to the
6420   * activity definition</b><br>
6421   * Type: <b>quantity</b><br>
6422   * Path: <b>ActivityDefinition.useContext.valueQuantity,
6423   * ActivityDefinition.useContext.valueRange</b><br>
6424   * </p>
6425   */
6426  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(
6427      SP_CONTEXT_QUANTITY);
6428
6429  /**
6430   * Search parameter: <b>effective</b>
6431   * <p>
6432   * Description: <b>The time during which the activity definition is intended to
6433   * be in use</b><br>
6434   * Type: <b>date</b><br>
6435   * Path: <b>ActivityDefinition.effectivePeriod</b><br>
6436   * </p>
6437   */
6438  @SearchParamDefinition(name = "effective", path = "ActivityDefinition.effectivePeriod", description = "The time during which the activity definition is intended to be in use", type = "date")
6439  public static final String SP_EFFECTIVE = "effective";
6440  /**
6441   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
6442   * <p>
6443   * Description: <b>The time during which the activity definition is intended to
6444   * be in use</b><br>
6445   * Type: <b>date</b><br>
6446   * Path: <b>ActivityDefinition.effectivePeriod</b><br>
6447   * </p>
6448   */
6449  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(
6450      SP_EFFECTIVE);
6451
6452  /**
6453   * Search parameter: <b>depends-on</b>
6454   * <p>
6455   * Description: <b>What resource is being referenced</b><br>
6456   * Type: <b>reference</b><br>
6457   * Path: <b>ActivityDefinition.relatedArtifact.resource,
6458   * ActivityDefinition.library</b><br>
6459   * </p>
6460   */
6461  @SearchParamDefinition(name = "depends-on", path = "ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library", description = "What resource is being referenced", type = "reference")
6462  public static final String SP_DEPENDS_ON = "depends-on";
6463  /**
6464   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
6465   * <p>
6466   * Description: <b>What resource is being referenced</b><br>
6467   * Type: <b>reference</b><br>
6468   * Path: <b>ActivityDefinition.relatedArtifact.resource,
6469   * ActivityDefinition.library</b><br>
6470   * </p>
6471   */
6472  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(
6473      SP_DEPENDS_ON);
6474
6475  /**
6476   * Constant for fluent queries to be used to add include statements. Specifies
6477   * the path value of "<b>ActivityDefinition:depends-on</b>".
6478   */
6479  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include(
6480      "ActivityDefinition:depends-on").toLocked();
6481
6482  /**
6483   * Search parameter: <b>name</b>
6484   * <p>
6485   * Description: <b>Computationally friendly name of the activity
6486   * definition</b><br>
6487   * Type: <b>string</b><br>
6488   * Path: <b>ActivityDefinition.name</b><br>
6489   * </p>
6490   */
6491  @SearchParamDefinition(name = "name", path = "ActivityDefinition.name", description = "Computationally friendly name of the activity definition", type = "string")
6492  public static final String SP_NAME = "name";
6493  /**
6494   * <b>Fluent Client</b> search parameter constant for <b>name</b>
6495   * <p>
6496   * Description: <b>Computationally friendly name of the activity
6497   * definition</b><br>
6498   * Type: <b>string</b><br>
6499   * Path: <b>ActivityDefinition.name</b><br>
6500   * </p>
6501   */
6502  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(
6503      SP_NAME);
6504
6505  /**
6506   * Search parameter: <b>context</b>
6507   * <p>
6508   * Description: <b>A use context assigned to the activity definition</b><br>
6509   * Type: <b>token</b><br>
6510   * Path: <b>ActivityDefinition.useContext.valueCodeableConcept</b><br>
6511   * </p>
6512   */
6513  @SearchParamDefinition(name = "context", path = "(ActivityDefinition.useContext.value as CodeableConcept)", description = "A use context assigned to the activity definition", type = "token")
6514  public static final String SP_CONTEXT = "context";
6515  /**
6516   * <b>Fluent Client</b> search parameter constant for <b>context</b>
6517   * <p>
6518   * Description: <b>A use context assigned to the activity definition</b><br>
6519   * Type: <b>token</b><br>
6520   * Path: <b>ActivityDefinition.useContext.valueCodeableConcept</b><br>
6521   * </p>
6522   */
6523  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6524      SP_CONTEXT);
6525
6526  /**
6527   * Search parameter: <b>publisher</b>
6528   * <p>
6529   * Description: <b>Name of the publisher of the activity definition</b><br>
6530   * Type: <b>string</b><br>
6531   * Path: <b>ActivityDefinition.publisher</b><br>
6532   * </p>
6533   */
6534  @SearchParamDefinition(name = "publisher", path = "ActivityDefinition.publisher", description = "Name of the publisher of the activity definition", type = "string")
6535  public static final String SP_PUBLISHER = "publisher";
6536  /**
6537   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
6538   * <p>
6539   * Description: <b>Name of the publisher of the activity definition</b><br>
6540   * Type: <b>string</b><br>
6541   * Path: <b>ActivityDefinition.publisher</b><br>
6542   * </p>
6543   */
6544  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(
6545      SP_PUBLISHER);
6546
6547  /**
6548   * Search parameter: <b>topic</b>
6549   * <p>
6550   * Description: <b>Topics associated with the module</b><br>
6551   * Type: <b>token</b><br>
6552   * Path: <b>ActivityDefinition.topic</b><br>
6553   * </p>
6554   */
6555  @SearchParamDefinition(name = "topic", path = "ActivityDefinition.topic", description = "Topics associated with the module", type = "token")
6556  public static final String SP_TOPIC = "topic";
6557  /**
6558   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
6559   * <p>
6560   * Description: <b>Topics associated with the module</b><br>
6561   * Type: <b>token</b><br>
6562   * Path: <b>ActivityDefinition.topic</b><br>
6563   * </p>
6564   */
6565  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6566      SP_TOPIC);
6567
6568  /**
6569   * Search parameter: <b>context-type-quantity</b>
6570   * <p>
6571   * Description: <b>A use context type and quantity- or range-based value
6572   * assigned to the activity definition</b><br>
6573   * Type: <b>composite</b><br>
6574   * Path: <b></b><br>
6575   * </p>
6576   */
6577  @SearchParamDefinition(name = "context-type-quantity", path = "ActivityDefinition.useContext", description = "A use context type and quantity- or range-based value assigned to the activity definition", type = "composite", compositeOf = {
6578      "context-type", "context-quantity" })
6579  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
6580  /**
6581   * <b>Fluent Client</b> search parameter constant for
6582   * <b>context-type-quantity</b>
6583   * <p>
6584   * Description: <b>A use context type and quantity- or range-based value
6585   * assigned to the activity definition</b><br>
6586   * Type: <b>composite</b><br>
6587   * Path: <b></b><br>
6588   * </p>
6589   */
6590  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(
6591      SP_CONTEXT_TYPE_QUANTITY);
6592
6593  /**
6594   * Search parameter: <b>status</b>
6595   * <p>
6596   * Description: <b>The current status of the activity definition</b><br>
6597   * Type: <b>token</b><br>
6598   * Path: <b>ActivityDefinition.status</b><br>
6599   * </p>
6600   */
6601  @SearchParamDefinition(name = "status", path = "ActivityDefinition.status", description = "The current status of the activity definition", type = "token")
6602  public static final String SP_STATUS = "status";
6603  /**
6604   * <b>Fluent Client</b> search parameter constant for <b>status</b>
6605   * <p>
6606   * Description: <b>The current status of the activity definition</b><br>
6607   * Type: <b>token</b><br>
6608   * Path: <b>ActivityDefinition.status</b><br>
6609   * </p>
6610   */
6611  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(
6612      SP_STATUS);
6613
6614}