001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
052 */
053@ResourceDef(name="ActivityDefinition", profile="http://hl7.org/fhir/StructureDefinition/ActivityDefinition")
054public class ActivityDefinition extends MetadataResource {
055
056    public enum RequestResourceType {
057        /**
058         * 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).
059         */
060        APPOINTMENT, 
061        /**
062         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
063         */
064        APPOINTMENTRESPONSE, 
065        /**
066         * Healthcare plan for patient or group.
067         */
068        CAREPLAN, 
069        /**
070         * Claim, Pre-determination or Pre-authorization.
071         */
072        CLAIM, 
073        /**
074         * A request for information to be sent to a receiver.
075         */
076        COMMUNICATIONREQUEST, 
077        /**
078         * Legal Agreement.
079         */
080        CONTRACT, 
081        /**
082         * Medical device request.
083         */
084        DEVICEREQUEST, 
085        /**
086         * Enrollment request.
087         */
088        ENROLLMENTREQUEST, 
089        /**
090         * Guidance or advice relating to an immunization.
091         */
092        IMMUNIZATIONRECOMMENDATION, 
093        /**
094         * Ordering of medication for patient or group.
095         */
096        MEDICATIONREQUEST, 
097        /**
098         * Diet, formula or nutritional supplement request.
099         */
100        NUTRITIONORDER, 
101        /**
102         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
103         */
104        SERVICEREQUEST, 
105        /**
106         * Request for a medication, substance or device.
107         */
108        SUPPLYREQUEST, 
109        /**
110         * A task to be performed.
111         */
112        TASK, 
113        /**
114         * Prescription for vision correction products for a patient.
115         */
116        VISIONPRESCRIPTION, 
117        /**
118         * added to help the parsers with the generic types
119         */
120        NULL;
121        public static RequestResourceType fromCode(String codeString) throws FHIRException {
122            if (codeString == null || "".equals(codeString))
123                return null;
124        if ("Appointment".equals(codeString))
125          return APPOINTMENT;
126        if ("AppointmentResponse".equals(codeString))
127          return APPOINTMENTRESPONSE;
128        if ("CarePlan".equals(codeString))
129          return CAREPLAN;
130        if ("Claim".equals(codeString))
131          return CLAIM;
132        if ("CommunicationRequest".equals(codeString))
133          return COMMUNICATIONREQUEST;
134        if ("Contract".equals(codeString))
135          return CONTRACT;
136        if ("DeviceRequest".equals(codeString))
137          return DEVICEREQUEST;
138        if ("EnrollmentRequest".equals(codeString))
139          return ENROLLMENTREQUEST;
140        if ("ImmunizationRecommendation".equals(codeString))
141          return IMMUNIZATIONRECOMMENDATION;
142        if ("MedicationRequest".equals(codeString))
143          return MEDICATIONREQUEST;
144        if ("NutritionOrder".equals(codeString))
145          return NUTRITIONORDER;
146        if ("ServiceRequest".equals(codeString))
147          return SERVICEREQUEST;
148        if ("SupplyRequest".equals(codeString))
149          return SUPPLYREQUEST;
150        if ("Task".equals(codeString))
151          return TASK;
152        if ("VisionPrescription".equals(codeString))
153          return VISIONPRESCRIPTION;
154        if (Configuration.isAcceptInvalidEnums())
155          return null;
156        else
157          throw new FHIRException("Unknown RequestResourceType code '"+codeString+"'");
158        }
159        public String toCode() {
160          switch (this) {
161            case APPOINTMENT: return "Appointment";
162            case APPOINTMENTRESPONSE: return "AppointmentResponse";
163            case CAREPLAN: return "CarePlan";
164            case CLAIM: return "Claim";
165            case COMMUNICATIONREQUEST: return "CommunicationRequest";
166            case CONTRACT: return "Contract";
167            case DEVICEREQUEST: return "DeviceRequest";
168            case ENROLLMENTREQUEST: return "EnrollmentRequest";
169            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
170            case MEDICATIONREQUEST: return "MedicationRequest";
171            case NUTRITIONORDER: return "NutritionOrder";
172            case SERVICEREQUEST: return "ServiceRequest";
173            case SUPPLYREQUEST: return "SupplyRequest";
174            case TASK: return "Task";
175            case VISIONPRESCRIPTION: return "VisionPrescription";
176            default: return "?";
177          }
178        }
179        public String getSystem() {
180          switch (this) {
181            case APPOINTMENT: return "http://hl7.org/fhir/request-resource-types";
182            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/request-resource-types";
183            case CAREPLAN: return "http://hl7.org/fhir/request-resource-types";
184            case CLAIM: return "http://hl7.org/fhir/request-resource-types";
185            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/request-resource-types";
186            case CONTRACT: return "http://hl7.org/fhir/request-resource-types";
187            case DEVICEREQUEST: return "http://hl7.org/fhir/request-resource-types";
188            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/request-resource-types";
189            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/request-resource-types";
190            case MEDICATIONREQUEST: return "http://hl7.org/fhir/request-resource-types";
191            case NUTRITIONORDER: return "http://hl7.org/fhir/request-resource-types";
192            case SERVICEREQUEST: return "http://hl7.org/fhir/request-resource-types";
193            case SUPPLYREQUEST: return "http://hl7.org/fhir/request-resource-types";
194            case TASK: return "http://hl7.org/fhir/request-resource-types";
195            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/request-resource-types";
196            default: return "?";
197          }
198        }
199        public String getDefinition() {
200          switch (this) {
201            case APPOINTMENT: 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).";
202            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
203            case CAREPLAN: return "Healthcare plan for patient or group.";
204            case CLAIM: return "Claim, Pre-determination or Pre-authorization.";
205            case COMMUNICATIONREQUEST: return "A request for information to be sent to a receiver.";
206            case CONTRACT: return "Legal Agreement.";
207            case DEVICEREQUEST: return "Medical device request.";
208            case ENROLLMENTREQUEST: return "Enrollment request.";
209            case IMMUNIZATIONRECOMMENDATION: return "Guidance or advice relating to an immunization.";
210            case MEDICATIONREQUEST: return "Ordering of medication for patient or group.";
211            case NUTRITIONORDER: return "Diet, formula or nutritional supplement request.";
212            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
213            case SUPPLYREQUEST: return "Request for a medication, substance or device.";
214            case TASK: return "A task to be performed.";
215            case VISIONPRESCRIPTION: return "Prescription for vision correction products for a patient.";
216            default: return "?";
217          }
218        }
219        public String getDisplay() {
220          switch (this) {
221            case APPOINTMENT: return "Appointment";
222            case APPOINTMENTRESPONSE: return "AppointmentResponse";
223            case CAREPLAN: return "CarePlan";
224            case CLAIM: return "Claim";
225            case COMMUNICATIONREQUEST: return "CommunicationRequest";
226            case CONTRACT: return "Contract";
227            case DEVICEREQUEST: return "DeviceRequest";
228            case ENROLLMENTREQUEST: return "EnrollmentRequest";
229            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
230            case MEDICATIONREQUEST: return "MedicationRequest";
231            case NUTRITIONORDER: return "NutritionOrder";
232            case SERVICEREQUEST: return "ServiceRequest";
233            case SUPPLYREQUEST: return "SupplyRequest";
234            case TASK: return "Task";
235            case VISIONPRESCRIPTION: return "VisionPrescription";
236            default: return "?";
237          }
238        }
239    }
240
241  public static class RequestResourceTypeEnumFactory implements EnumFactory<RequestResourceType> {
242    public RequestResourceType fromCode(String codeString) throws IllegalArgumentException {
243      if (codeString == null || "".equals(codeString))
244            if (codeString == null || "".equals(codeString))
245                return null;
246        if ("Appointment".equals(codeString))
247          return RequestResourceType.APPOINTMENT;
248        if ("AppointmentResponse".equals(codeString))
249          return RequestResourceType.APPOINTMENTRESPONSE;
250        if ("CarePlan".equals(codeString))
251          return RequestResourceType.CAREPLAN;
252        if ("Claim".equals(codeString))
253          return RequestResourceType.CLAIM;
254        if ("CommunicationRequest".equals(codeString))
255          return RequestResourceType.COMMUNICATIONREQUEST;
256        if ("Contract".equals(codeString))
257          return RequestResourceType.CONTRACT;
258        if ("DeviceRequest".equals(codeString))
259          return RequestResourceType.DEVICEREQUEST;
260        if ("EnrollmentRequest".equals(codeString))
261          return RequestResourceType.ENROLLMENTREQUEST;
262        if ("ImmunizationRecommendation".equals(codeString))
263          return RequestResourceType.IMMUNIZATIONRECOMMENDATION;
264        if ("MedicationRequest".equals(codeString))
265          return RequestResourceType.MEDICATIONREQUEST;
266        if ("NutritionOrder".equals(codeString))
267          return RequestResourceType.NUTRITIONORDER;
268        if ("ServiceRequest".equals(codeString))
269          return RequestResourceType.SERVICEREQUEST;
270        if ("SupplyRequest".equals(codeString))
271          return RequestResourceType.SUPPLYREQUEST;
272        if ("Task".equals(codeString))
273          return RequestResourceType.TASK;
274        if ("VisionPrescription".equals(codeString))
275          return RequestResourceType.VISIONPRESCRIPTION;
276        throw new IllegalArgumentException("Unknown RequestResourceType code '"+codeString+"'");
277        }
278        public Enumeration<RequestResourceType> fromType(Base code) throws FHIRException {
279          if (code == null)
280            return null;
281          if (code.isEmpty())
282            return new Enumeration<RequestResourceType>(this);
283          String codeString = ((PrimitiveType) code).asStringValue();
284          if (codeString == null || "".equals(codeString))
285            return null;
286        if ("Appointment".equals(codeString))
287          return new Enumeration<RequestResourceType>(this, RequestResourceType.APPOINTMENT);
288        if ("AppointmentResponse".equals(codeString))
289          return new Enumeration<RequestResourceType>(this, RequestResourceType.APPOINTMENTRESPONSE);
290        if ("CarePlan".equals(codeString))
291          return new Enumeration<RequestResourceType>(this, RequestResourceType.CAREPLAN);
292        if ("Claim".equals(codeString))
293          return new Enumeration<RequestResourceType>(this, RequestResourceType.CLAIM);
294        if ("CommunicationRequest".equals(codeString))
295          return new Enumeration<RequestResourceType>(this, RequestResourceType.COMMUNICATIONREQUEST);
296        if ("Contract".equals(codeString))
297          return new Enumeration<RequestResourceType>(this, RequestResourceType.CONTRACT);
298        if ("DeviceRequest".equals(codeString))
299          return new Enumeration<RequestResourceType>(this, RequestResourceType.DEVICEREQUEST);
300        if ("EnrollmentRequest".equals(codeString))
301          return new Enumeration<RequestResourceType>(this, RequestResourceType.ENROLLMENTREQUEST);
302        if ("ImmunizationRecommendation".equals(codeString))
303          return new Enumeration<RequestResourceType>(this, RequestResourceType.IMMUNIZATIONRECOMMENDATION);
304        if ("MedicationRequest".equals(codeString))
305          return new Enumeration<RequestResourceType>(this, RequestResourceType.MEDICATIONREQUEST);
306        if ("NutritionOrder".equals(codeString))
307          return new Enumeration<RequestResourceType>(this, RequestResourceType.NUTRITIONORDER);
308        if ("ServiceRequest".equals(codeString))
309          return new Enumeration<RequestResourceType>(this, RequestResourceType.SERVICEREQUEST);
310        if ("SupplyRequest".equals(codeString))
311          return new Enumeration<RequestResourceType>(this, RequestResourceType.SUPPLYREQUEST);
312        if ("Task".equals(codeString))
313          return new Enumeration<RequestResourceType>(this, RequestResourceType.TASK);
314        if ("VisionPrescription".equals(codeString))
315          return new Enumeration<RequestResourceType>(this, RequestResourceType.VISIONPRESCRIPTION);
316        throw new FHIRException("Unknown RequestResourceType code '"+codeString+"'");
317        }
318    public String toCode(RequestResourceType code) {
319      if (code == RequestResourceType.APPOINTMENT)
320        return "Appointment";
321      if (code == RequestResourceType.APPOINTMENTRESPONSE)
322        return "AppointmentResponse";
323      if (code == RequestResourceType.CAREPLAN)
324        return "CarePlan";
325      if (code == RequestResourceType.CLAIM)
326        return "Claim";
327      if (code == RequestResourceType.COMMUNICATIONREQUEST)
328        return "CommunicationRequest";
329      if (code == RequestResourceType.CONTRACT)
330        return "Contract";
331      if (code == RequestResourceType.DEVICEREQUEST)
332        return "DeviceRequest";
333      if (code == RequestResourceType.ENROLLMENTREQUEST)
334        return "EnrollmentRequest";
335      if (code == RequestResourceType.IMMUNIZATIONRECOMMENDATION)
336        return "ImmunizationRecommendation";
337      if (code == RequestResourceType.MEDICATIONREQUEST)
338        return "MedicationRequest";
339      if (code == RequestResourceType.NUTRITIONORDER)
340        return "NutritionOrder";
341      if (code == RequestResourceType.SERVICEREQUEST)
342        return "ServiceRequest";
343      if (code == RequestResourceType.SUPPLYREQUEST)
344        return "SupplyRequest";
345      if (code == RequestResourceType.TASK)
346        return "Task";
347      if (code == RequestResourceType.VISIONPRESCRIPTION)
348        return "VisionPrescription";
349      return "?";
350      }
351    public String toSystem(RequestResourceType code) {
352      return code.getSystem();
353      }
354    }
355
356    @Block()
357    public static class ActivityDefinitionParticipantComponent extends BackboneElement implements IBaseBackboneElement {
358        /**
359         * The type of participant in the action.
360         */
361        @Child(name = "type", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
362        @Description(shortDefinition="careteam | device | group | healthcareservice | location | organization | patient | practitioner | practitionerrole | relatedperson", formalDefinition="The type of participant in the action." )
363        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-type")
364        protected Enumeration<ActionParticipantType> type;
365
366        /**
367         * The type of participant in the action.
368         */
369        @Child(name = "typeReference", type = {CareTeam.class, Device.class, Group.class, HealthcareService.class, Location.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=false)
370        @Description(shortDefinition="Who or what can participate", formalDefinition="The type of participant in the action." )
371        protected Reference typeReference;
372
373        /**
374         * The role the participant should play in performing the described action.
375         */
376        @Child(name = "role", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
377        @Description(shortDefinition="E.g. Nurse, Surgeon, Parent, etc.", formalDefinition="The role the participant should play in performing the described action." )
378        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://terminology.hl7.org/ValueSet/action-participant-role")
379        protected CodeableConcept role;
380
381        /**
382         * Indicates how the actor will be involved in the action - author, reviewer, witness, etc.
383         */
384        @Child(name = "function", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
385        @Description(shortDefinition="E.g. Author, Reviewer, Witness, etc.", formalDefinition="Indicates how the actor will be involved in the action - author, reviewer, witness, etc." )
386        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-function")
387        protected CodeableConcept function;
388
389        private static final long serialVersionUID = -136836616L;
390
391    /**
392     * Constructor
393     */
394      public ActivityDefinitionParticipantComponent() {
395        super();
396      }
397
398        /**
399         * @return {@link #type} (The type of participant in the action.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
400         */
401        public Enumeration<ActionParticipantType> getTypeElement() { 
402          if (this.type == null)
403            if (Configuration.errorOnAutoCreate())
404              throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.type");
405            else if (Configuration.doAutoCreate())
406              this.type = new Enumeration<ActionParticipantType>(new ActionParticipantTypeEnumFactory()); // bb
407          return this.type;
408        }
409
410        public boolean hasTypeElement() { 
411          return this.type != null && !this.type.isEmpty();
412        }
413
414        public boolean hasType() { 
415          return this.type != null && !this.type.isEmpty();
416        }
417
418        /**
419         * @param value {@link #type} (The type of participant in the action.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
420         */
421        public ActivityDefinitionParticipantComponent setTypeElement(Enumeration<ActionParticipantType> value) { 
422          this.type = value;
423          return this;
424        }
425
426        /**
427         * @return The type of participant in the action.
428         */
429        public ActionParticipantType getType() { 
430          return this.type == null ? null : this.type.getValue();
431        }
432
433        /**
434         * @param value The type of participant in the action.
435         */
436        public ActivityDefinitionParticipantComponent setType(ActionParticipantType value) { 
437          if (value == null)
438            this.type = null;
439          else {
440            if (this.type == null)
441              this.type = new Enumeration<ActionParticipantType>(new ActionParticipantTypeEnumFactory());
442            this.type.setValue(value);
443          }
444          return this;
445        }
446
447        /**
448         * @return {@link #typeReference} (The type of participant in the action.)
449         */
450        public Reference getTypeReference() { 
451          if (this.typeReference == null)
452            if (Configuration.errorOnAutoCreate())
453              throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.typeReference");
454            else if (Configuration.doAutoCreate())
455              this.typeReference = new Reference(); // cc
456          return this.typeReference;
457        }
458
459        public boolean hasTypeReference() { 
460          return this.typeReference != null && !this.typeReference.isEmpty();
461        }
462
463        /**
464         * @param value {@link #typeReference} (The type of participant in the action.)
465         */
466        public ActivityDefinitionParticipantComponent setTypeReference(Reference value) { 
467          this.typeReference = value;
468          return this;
469        }
470
471        /**
472         * @return {@link #role} (The role the participant should play in performing the described action.)
473         */
474        public CodeableConcept getRole() { 
475          if (this.role == null)
476            if (Configuration.errorOnAutoCreate())
477              throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.role");
478            else if (Configuration.doAutoCreate())
479              this.role = new CodeableConcept(); // cc
480          return this.role;
481        }
482
483        public boolean hasRole() { 
484          return this.role != null && !this.role.isEmpty();
485        }
486
487        /**
488         * @param value {@link #role} (The role the participant should play in performing the described action.)
489         */
490        public ActivityDefinitionParticipantComponent setRole(CodeableConcept value) { 
491          this.role = value;
492          return this;
493        }
494
495        /**
496         * @return {@link #function} (Indicates how the actor will be involved in the action - author, reviewer, witness, etc.)
497         */
498        public CodeableConcept getFunction() { 
499          if (this.function == null)
500            if (Configuration.errorOnAutoCreate())
501              throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.function");
502            else if (Configuration.doAutoCreate())
503              this.function = new CodeableConcept(); // cc
504          return this.function;
505        }
506
507        public boolean hasFunction() { 
508          return this.function != null && !this.function.isEmpty();
509        }
510
511        /**
512         * @param value {@link #function} (Indicates how the actor will be involved in the action - author, reviewer, witness, etc.)
513         */
514        public ActivityDefinitionParticipantComponent setFunction(CodeableConcept value) { 
515          this.function = value;
516          return this;
517        }
518
519        protected void listChildren(List<Property> children) {
520          super.listChildren(children);
521          children.add(new Property("type", "code", "The type of participant in the action.", 0, 1, type));
522          children.add(new Property("typeReference", "Reference(CareTeam|Device|Group|HealthcareService|Location|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The type of participant in the action.", 0, 1, typeReference));
523          children.add(new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role));
524          children.add(new Property("function", "CodeableConcept", "Indicates how the actor will be involved in the action - author, reviewer, witness, etc.", 0, 1, function));
525        }
526
527        @Override
528        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
529          switch (_hash) {
530          case 3575610: /*type*/  return new Property("type", "code", "The type of participant in the action.", 0, 1, type);
531          case 2074825009: /*typeReference*/  return new Property("typeReference", "Reference(CareTeam|Device|Group|HealthcareService|Location|Organization|Patient|Practitioner|PractitionerRole|RelatedPerson)", "The type of participant in the action.", 0, 1, typeReference);
532          case 3506294: /*role*/  return new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role);
533          case 1380938712: /*function*/  return new Property("function", "CodeableConcept", "Indicates how the actor will be involved in the action - author, reviewer, witness, etc.", 0, 1, function);
534          default: return super.getNamedProperty(_hash, _name, _checkValid);
535          }
536
537        }
538
539      @Override
540      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
541        switch (hash) {
542        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ActionParticipantType>
543        case 2074825009: /*typeReference*/ return this.typeReference == null ? new Base[0] : new Base[] {this.typeReference}; // Reference
544        case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
545        case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept
546        default: return super.getProperty(hash, name, checkValid);
547        }
548
549      }
550
551      @Override
552      public Base setProperty(int hash, String name, Base value) throws FHIRException {
553        switch (hash) {
554        case 3575610: // type
555          value = new ActionParticipantTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
556          this.type = (Enumeration) value; // Enumeration<ActionParticipantType>
557          return value;
558        case 2074825009: // typeReference
559          this.typeReference = TypeConvertor.castToReference(value); // Reference
560          return value;
561        case 3506294: // role
562          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
563          return value;
564        case 1380938712: // function
565          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
566          return value;
567        default: return super.setProperty(hash, name, value);
568        }
569
570      }
571
572      @Override
573      public Base setProperty(String name, Base value) throws FHIRException {
574        if (name.equals("type")) {
575          value = new ActionParticipantTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
576          this.type = (Enumeration) value; // Enumeration<ActionParticipantType>
577        } else if (name.equals("typeReference")) {
578          this.typeReference = TypeConvertor.castToReference(value); // Reference
579        } else if (name.equals("role")) {
580          this.role = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
581        } else if (name.equals("function")) {
582          this.function = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
583        } else
584          return super.setProperty(name, value);
585        return value;
586      }
587
588      @Override
589      public Base makeProperty(int hash, String name) throws FHIRException {
590        switch (hash) {
591        case 3575610:  return getTypeElement();
592        case 2074825009:  return getTypeReference();
593        case 3506294:  return getRole();
594        case 1380938712:  return getFunction();
595        default: return super.makeProperty(hash, name);
596        }
597
598      }
599
600      @Override
601      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
602        switch (hash) {
603        case 3575610: /*type*/ return new String[] {"code"};
604        case 2074825009: /*typeReference*/ return new String[] {"Reference"};
605        case 3506294: /*role*/ return new String[] {"CodeableConcept"};
606        case 1380938712: /*function*/ return new String[] {"CodeableConcept"};
607        default: return super.getTypesForProperty(hash, name);
608        }
609
610      }
611
612      @Override
613      public Base addChild(String name) throws FHIRException {
614        if (name.equals("type")) {
615          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.participant.type");
616        }
617        else if (name.equals("typeReference")) {
618          this.typeReference = new Reference();
619          return this.typeReference;
620        }
621        else if (name.equals("role")) {
622          this.role = new CodeableConcept();
623          return this.role;
624        }
625        else if (name.equals("function")) {
626          this.function = new CodeableConcept();
627          return this.function;
628        }
629        else
630          return super.addChild(name);
631      }
632
633      public ActivityDefinitionParticipantComponent copy() {
634        ActivityDefinitionParticipantComponent dst = new ActivityDefinitionParticipantComponent();
635        copyValues(dst);
636        return dst;
637      }
638
639      public void copyValues(ActivityDefinitionParticipantComponent dst) {
640        super.copyValues(dst);
641        dst.type = type == null ? null : type.copy();
642        dst.typeReference = typeReference == null ? null : typeReference.copy();
643        dst.role = role == null ? null : role.copy();
644        dst.function = function == null ? null : function.copy();
645      }
646
647      @Override
648      public boolean equalsDeep(Base other_) {
649        if (!super.equalsDeep(other_))
650          return false;
651        if (!(other_ instanceof ActivityDefinitionParticipantComponent))
652          return false;
653        ActivityDefinitionParticipantComponent o = (ActivityDefinitionParticipantComponent) other_;
654        return compareDeep(type, o.type, true) && compareDeep(typeReference, o.typeReference, true) && compareDeep(role, o.role, true)
655           && compareDeep(function, o.function, true);
656      }
657
658      @Override
659      public boolean equalsShallow(Base other_) {
660        if (!super.equalsShallow(other_))
661          return false;
662        if (!(other_ instanceof ActivityDefinitionParticipantComponent))
663          return false;
664        ActivityDefinitionParticipantComponent o = (ActivityDefinitionParticipantComponent) other_;
665        return compareValues(type, o.type, true);
666      }
667
668      public boolean isEmpty() {
669        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, typeReference, role
670          , function);
671      }
672
673  public String fhirType() {
674    return "ActivityDefinition.participant";
675
676  }
677
678  }
679
680    @Block()
681    public static class ActivityDefinitionDynamicValueComponent extends BackboneElement implements IBaseBackboneElement {
682        /**
683         * 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).
684         */
685        @Child(name = "path", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
686        @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)." )
687        protected StringType path;
688
689        /**
690         * An expression specifying the value of the customized element.
691         */
692        @Child(name = "expression", type = {Expression.class}, order=2, min=1, max=1, modifier=false, summary=false)
693        @Description(shortDefinition="An expression that provides the dynamic value for the customization", formalDefinition="An expression specifying the value of the customized element." )
694        protected Expression expression;
695
696        private static final long serialVersionUID = 1064529082L;
697
698    /**
699     * Constructor
700     */
701      public ActivityDefinitionDynamicValueComponent() {
702        super();
703      }
704
705    /**
706     * Constructor
707     */
708      public ActivityDefinitionDynamicValueComponent(String path, Expression expression) {
709        super();
710        this.setPath(path);
711        this.setExpression(expression);
712      }
713
714        /**
715         * @return {@link #path} (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).). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
716         */
717        public StringType getPathElement() { 
718          if (this.path == null)
719            if (Configuration.errorOnAutoCreate())
720              throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.path");
721            else if (Configuration.doAutoCreate())
722              this.path = new StringType(); // bb
723          return this.path;
724        }
725
726        public boolean hasPathElement() { 
727          return this.path != null && !this.path.isEmpty();
728        }
729
730        public boolean hasPath() { 
731          return this.path != null && !this.path.isEmpty();
732        }
733
734        /**
735         * @param value {@link #path} (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).). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
736         */
737        public ActivityDefinitionDynamicValueComponent setPathElement(StringType value) { 
738          this.path = value;
739          return this;
740        }
741
742        /**
743         * @return 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).
744         */
745        public String getPath() { 
746          return this.path == null ? null : this.path.getValue();
747        }
748
749        /**
750         * @param value 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).
751         */
752        public ActivityDefinitionDynamicValueComponent setPath(String value) { 
753            if (this.path == null)
754              this.path = new StringType();
755            this.path.setValue(value);
756          return this;
757        }
758
759        /**
760         * @return {@link #expression} (An expression specifying the value of the customized element.)
761         */
762        public Expression getExpression() { 
763          if (this.expression == null)
764            if (Configuration.errorOnAutoCreate())
765              throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.expression");
766            else if (Configuration.doAutoCreate())
767              this.expression = new Expression(); // cc
768          return this.expression;
769        }
770
771        public boolean hasExpression() { 
772          return this.expression != null && !this.expression.isEmpty();
773        }
774
775        /**
776         * @param value {@link #expression} (An expression specifying the value of the customized element.)
777         */
778        public ActivityDefinitionDynamicValueComponent setExpression(Expression value) { 
779          this.expression = value;
780          return this;
781        }
782
783        protected void listChildren(List<Property> children) {
784          super.listChildren(children);
785          children.add(new Property("path", "string", "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).", 0, 1, path));
786          children.add(new Property("expression", "Expression", "An expression specifying the value of the customized element.", 0, 1, expression));
787        }
788
789        @Override
790        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
791          switch (_hash) {
792          case 3433509: /*path*/  return new Property("path", "string", "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).", 0, 1, path);
793          case -1795452264: /*expression*/  return new Property("expression", "Expression", "An expression specifying the value of the customized element.", 0, 1, expression);
794          default: return super.getNamedProperty(_hash, _name, _checkValid);
795          }
796
797        }
798
799      @Override
800      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
801        switch (hash) {
802        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
803        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // Expression
804        default: return super.getProperty(hash, name, checkValid);
805        }
806
807      }
808
809      @Override
810      public Base setProperty(int hash, String name, Base value) throws FHIRException {
811        switch (hash) {
812        case 3433509: // path
813          this.path = TypeConvertor.castToString(value); // StringType
814          return value;
815        case -1795452264: // expression
816          this.expression = TypeConvertor.castToExpression(value); // Expression
817          return value;
818        default: return super.setProperty(hash, name, value);
819        }
820
821      }
822
823      @Override
824      public Base setProperty(String name, Base value) throws FHIRException {
825        if (name.equals("path")) {
826          this.path = TypeConvertor.castToString(value); // StringType
827        } else if (name.equals("expression")) {
828          this.expression = TypeConvertor.castToExpression(value); // Expression
829        } else
830          return super.setProperty(name, value);
831        return value;
832      }
833
834      @Override
835      public Base makeProperty(int hash, String name) throws FHIRException {
836        switch (hash) {
837        case 3433509:  return getPathElement();
838        case -1795452264:  return getExpression();
839        default: return super.makeProperty(hash, name);
840        }
841
842      }
843
844      @Override
845      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
846        switch (hash) {
847        case 3433509: /*path*/ return new String[] {"string"};
848        case -1795452264: /*expression*/ return new String[] {"Expression"};
849        default: return super.getTypesForProperty(hash, name);
850        }
851
852      }
853
854      @Override
855      public Base addChild(String name) throws FHIRException {
856        if (name.equals("path")) {
857          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.dynamicValue.path");
858        }
859        else if (name.equals("expression")) {
860          this.expression = new Expression();
861          return this.expression;
862        }
863        else
864          return super.addChild(name);
865      }
866
867      public ActivityDefinitionDynamicValueComponent copy() {
868        ActivityDefinitionDynamicValueComponent dst = new ActivityDefinitionDynamicValueComponent();
869        copyValues(dst);
870        return dst;
871      }
872
873      public void copyValues(ActivityDefinitionDynamicValueComponent dst) {
874        super.copyValues(dst);
875        dst.path = path == null ? null : path.copy();
876        dst.expression = expression == null ? null : expression.copy();
877      }
878
879      @Override
880      public boolean equalsDeep(Base other_) {
881        if (!super.equalsDeep(other_))
882          return false;
883        if (!(other_ instanceof ActivityDefinitionDynamicValueComponent))
884          return false;
885        ActivityDefinitionDynamicValueComponent o = (ActivityDefinitionDynamicValueComponent) other_;
886        return compareDeep(path, o.path, true) && compareDeep(expression, o.expression, true);
887      }
888
889      @Override
890      public boolean equalsShallow(Base other_) {
891        if (!super.equalsShallow(other_))
892          return false;
893        if (!(other_ instanceof ActivityDefinitionDynamicValueComponent))
894          return false;
895        ActivityDefinitionDynamicValueComponent o = (ActivityDefinitionDynamicValueComponent) other_;
896        return compareValues(path, o.path, true);
897      }
898
899      public boolean isEmpty() {
900        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(path, expression);
901      }
902
903  public String fhirType() {
904    return "ActivityDefinition.dynamicValue";
905
906  }
907
908  }
909
910    /**
911     * 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.
912     */
913    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
914    @Description(shortDefinition="Canonical identifier for this activity definition, represented as a URI (globally unique)", formalDefinition="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." )
915    protected UriType url;
916
917    /**
918     * 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.
919     */
920    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
921    @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." )
922    protected List<Identifier> identifier;
923
924    /**
925     * 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.
926     */
927    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
928    @Description(shortDefinition="Business version of the activity definition", formalDefinition="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." )
929    protected StringType version;
930
931    /**
932     * 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.
933     */
934    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
935    @Description(shortDefinition="Name for this activity definition (computer friendly)", formalDefinition="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." )
936    protected StringType name;
937
938    /**
939     * A short, descriptive, user-friendly title for the activity definition.
940     */
941    @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true)
942    @Description(shortDefinition="Name for this activity definition (human friendly)", formalDefinition="A short, descriptive, user-friendly title for the activity definition." )
943    protected StringType title;
944
945    /**
946     * An explanatory or alternate title for the activity definition giving additional information about its content.
947     */
948    @Child(name = "subtitle", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
949    @Description(shortDefinition="Subordinate title of the activity definition", formalDefinition="An explanatory or alternate title for the activity definition giving additional information about its content." )
950    protected StringType subtitle;
951
952    /**
953     * The status of this activity definition. Enables tracking the life-cycle of the content.
954     */
955    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
956    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this activity definition. Enables tracking the life-cycle of the content." )
957    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
958    protected Enumeration<PublicationStatus> status;
959
960    /**
961     * 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.
962     */
963    @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=true)
964    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="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." )
965    protected BooleanType experimental;
966
967    /**
968     * A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.
969     */
970    @Child(name = "subject", type = {CodeableConcept.class, Group.class, CanonicalType.class}, order=8, min=0, max=1, modifier=false, summary=false)
971    @Description(shortDefinition="Type of individual the activity definition is intended for", formalDefinition="A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource." )
972    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subject-type")
973    protected DataType subject;
974
975    /**
976     * 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.
977     */
978    @Child(name = "date", type = {DateTimeType.class}, order=9, min=0, max=1, modifier=false, summary=true)
979    @Description(shortDefinition="Date last changed", formalDefinition="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." )
980    protected DateTimeType date;
981
982    /**
983     * The name of the organization or individual that published the activity definition.
984     */
985    @Child(name = "publisher", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true)
986    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the activity definition." )
987    protected StringType publisher;
988
989    /**
990     * Contact details to assist a user in finding and communicating with the publisher.
991     */
992    @Child(name = "contact", type = {ContactDetail.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
993    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
994    protected List<ContactDetail> contact;
995
996    /**
997     * A free text natural language description of the activity definition from a consumer's perspective.
998     */
999    @Child(name = "description", type = {MarkdownType.class}, order=12, min=0, max=1, modifier=false, summary=true)
1000    @Description(shortDefinition="Natural language description of the activity definition", formalDefinition="A free text natural language description of the activity definition from a consumer's perspective." )
1001    protected MarkdownType description;
1002
1003    /**
1004     * 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.
1005     */
1006    @Child(name = "useContext", type = {UsageContext.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1007    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="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." )
1008    protected List<UsageContext> useContext;
1009
1010    /**
1011     * A legal or geographic region in which the activity definition is intended to be used.
1012     */
1013    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1014    @Description(shortDefinition="Intended jurisdiction for activity definition (if applicable)", formalDefinition="A legal or geographic region in which the activity definition is intended to be used." )
1015    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
1016    protected List<CodeableConcept> jurisdiction;
1017
1018    /**
1019     * Explanation of why this activity definition is needed and why it has been designed as it has.
1020     */
1021    @Child(name = "purpose", type = {MarkdownType.class}, order=15, min=0, max=1, modifier=false, summary=false)
1022    @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." )
1023    protected MarkdownType purpose;
1024
1025    /**
1026     * A detailed description of how the activity definition is used from a clinical perspective.
1027     */
1028    @Child(name = "usage", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false)
1029    @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." )
1030    protected StringType usage;
1031
1032    /**
1033     * 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.
1034     */
1035    @Child(name = "copyright", type = {MarkdownType.class}, order=17, min=0, max=1, modifier=false, summary=false)
1036    @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." )
1037    protected MarkdownType copyright;
1038
1039    /**
1040     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1041     */
1042    @Child(name = "approvalDate", type = {DateType.class}, order=18, min=0, max=1, modifier=false, summary=false)
1043    @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." )
1044    protected DateType approvalDate;
1045
1046    /**
1047     * The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
1048     */
1049    @Child(name = "lastReviewDate", type = {DateType.class}, order=19, min=0, max=1, modifier=false, summary=false)
1050    @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." )
1051    protected DateType lastReviewDate;
1052
1053    /**
1054     * The period during which the activity definition content was or is planned to be in active use.
1055     */
1056    @Child(name = "effectivePeriod", type = {Period.class}, order=20, min=0, max=1, modifier=false, summary=true)
1057    @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." )
1058    protected Period effectivePeriod;
1059
1060    /**
1061     * 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.
1062     */
1063    @Child(name = "topic", type = {CodeableConcept.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1064    @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." )
1065    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
1066    protected List<CodeableConcept> topic;
1067
1068    /**
1069     * An individiual or organization primarily involved in the creation and maintenance of the content.
1070     */
1071    @Child(name = "author", type = {ContactDetail.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1072    @Description(shortDefinition="Who authored the content", formalDefinition="An individiual or organization primarily involved in the creation and maintenance of the content." )
1073    protected List<ContactDetail> author;
1074
1075    /**
1076     * An individual or organization primarily responsible for internal coherence of the content.
1077     */
1078    @Child(name = "editor", type = {ContactDetail.class}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1079    @Description(shortDefinition="Who edited the content", formalDefinition="An individual or organization primarily responsible for internal coherence of the content." )
1080    protected List<ContactDetail> editor;
1081
1082    /**
1083     * An individual or organization primarily responsible for review of some aspect of the content.
1084     */
1085    @Child(name = "reviewer", type = {ContactDetail.class}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1086    @Description(shortDefinition="Who reviewed the content", formalDefinition="An individual or organization primarily responsible for review of some aspect of the content." )
1087    protected List<ContactDetail> reviewer;
1088
1089    /**
1090     * An individual or organization responsible for officially endorsing the content for use in some setting.
1091     */
1092    @Child(name = "endorser", type = {ContactDetail.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1093    @Description(shortDefinition="Who endorsed the content", formalDefinition="An individual or organization responsible for officially endorsing the content for use in some setting." )
1094    protected List<ContactDetail> endorser;
1095
1096    /**
1097     * Related artifacts such as additional documentation, justification, or bibliographic references.
1098     */
1099    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=26, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1100    @Description(shortDefinition="Additional documentation, citations, etc.", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
1101    protected List<RelatedArtifact> relatedArtifact;
1102
1103    /**
1104     * A reference to a Library resource containing any formal logic used by the activity definition.
1105     */
1106    @Child(name = "library", type = {CanonicalType.class}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1107    @Description(shortDefinition="Logic used by the activity definition", formalDefinition="A reference to a Library resource containing any formal logic used by the activity definition." )
1108    protected List<CanonicalType> library;
1109
1110    /**
1111     * 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.
1112     */
1113    @Child(name = "kind", type = {CodeType.class}, order=28, min=0, max=1, modifier=false, summary=true)
1114    @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." )
1115    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-resource-types")
1116    protected Enumeration<RequestResourceType> kind;
1117
1118    /**
1119     * A profile to which the target of the activity definition is expected to conform.
1120     */
1121    @Child(name = "profile", type = {CanonicalType.class}, order=29, min=0, max=1, modifier=false, summary=false)
1122    @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." )
1123    protected CanonicalType profile;
1124
1125    /**
1126     * Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.
1127     */
1128    @Child(name = "code", type = {CodeableConcept.class}, order=30, min=0, max=1, modifier=false, summary=true)
1129    @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." )
1130    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code")
1131    protected CodeableConcept code;
1132
1133    /**
1134     * Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.
1135     */
1136    @Child(name = "intent", type = {CodeType.class}, order=31, min=0, max=1, modifier=false, summary=false)
1137    @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." )
1138    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent")
1139    protected Enumeration<RequestIntent> intent;
1140
1141    /**
1142     * Indicates how quickly the activity  should be addressed with respect to other requests.
1143     */
1144    @Child(name = "priority", type = {CodeType.class}, order=32, min=0, max=1, modifier=false, summary=false)
1145    @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the activity  should be addressed with respect to other requests." )
1146    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority")
1147    protected Enumeration<RequestPriority> priority;
1148
1149    /**
1150     * 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.
1151     */
1152    @Child(name = "doNotPerform", type = {BooleanType.class}, order=33, min=0, max=1, modifier=true, summary=true)
1153    @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." )
1154    protected BooleanType doNotPerform;
1155
1156    /**
1157     * The timing or frequency upon which the described activity is to occur.
1158     */
1159    @Child(name = "timing", type = {Timing.class, Age.class, Range.class, Duration.class}, order=34, min=0, max=1, modifier=false, summary=false)
1160    @Description(shortDefinition="When activity is to occur", formalDefinition="The timing or frequency upon which the described activity is to occur." )
1161    protected DataType timing;
1162
1163    /**
1164     * Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.
1165     */
1166    @Child(name = "location", type = {CodeableReference.class}, order=35, min=0, max=1, modifier=false, summary=false)
1167    @Description(shortDefinition="Where it should happen", formalDefinition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." )
1168    protected CodeableReference location;
1169
1170    /**
1171     * Indicates who should participate in performing the action described.
1172     */
1173    @Child(name = "participant", type = {}, order=36, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1174    @Description(shortDefinition="Who should participate in the action", formalDefinition="Indicates who should participate in performing the action described." )
1175    protected List<ActivityDefinitionParticipantComponent> participant;
1176
1177    /**
1178     * Identifies the food, drug or other product being consumed or supplied in the activity.
1179     */
1180    @Child(name = "product", type = {Medication.class, Substance.class, Ingredient.class, CodeableConcept.class}, order=37, min=0, max=1, modifier=false, summary=false)
1181    @Description(shortDefinition="What's administered/supplied", formalDefinition="Identifies the food, drug or other product being consumed or supplied in the activity." )
1182    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes")
1183    protected DataType product;
1184
1185    /**
1186     * Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).
1187     */
1188    @Child(name = "quantity", type = {Quantity.class}, order=38, min=0, max=1, modifier=false, summary=false)
1189    @Description(shortDefinition="How much is administered/consumed/supplied", formalDefinition="Identifies the quantity expected to be consumed at once (per dose, per meal, etc.)." )
1190    protected Quantity quantity;
1191
1192    /**
1193     * Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.
1194     */
1195    @Child(name = "dosage", type = {Dosage.class}, order=39, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1196    @Description(shortDefinition="Detailed dosage instructions", formalDefinition="Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources." )
1197    protected List<Dosage> dosage;
1198
1199    /**
1200     * Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).
1201     */
1202    @Child(name = "bodySite", type = {CodeableConcept.class}, order=40, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1203    @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)." )
1204    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
1205    protected List<CodeableConcept> bodySite;
1206
1207    /**
1208     * Defines specimen requirements for the action to be performed, such as required specimens for a lab test.
1209     */
1210    @Child(name = "specimenRequirement", type = {SpecimenDefinition.class}, order=41, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1211    @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." )
1212    protected List<Reference> specimenRequirement;
1213
1214    /**
1215     * Defines observation requirements for the action to be performed, such as body weight or surface area.
1216     */
1217    @Child(name = "observationRequirement", type = {ObservationDefinition.class}, order=42, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1218    @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." )
1219    protected List<Reference> observationRequirement;
1220
1221    /**
1222     * Defines the observations that are expected to be produced by the action.
1223     */
1224    @Child(name = "observationResultRequirement", type = {ObservationDefinition.class}, order=43, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1225    @Description(shortDefinition="What observations must be produced by this action", formalDefinition="Defines the observations that are expected to be produced by the action." )
1226    protected List<Reference> observationResultRequirement;
1227
1228    /**
1229     * 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.
1230     */
1231    @Child(name = "transform", type = {CanonicalType.class}, order=44, min=0, max=1, modifier=false, summary=false)
1232    @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." )
1233    protected CanonicalType transform;
1234
1235    /**
1236     * 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.
1237     */
1238    @Child(name = "dynamicValue", type = {}, order=45, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1239    @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." )
1240    protected List<ActivityDefinitionDynamicValueComponent> dynamicValue;
1241
1242    private static final long serialVersionUID = 173439425L;
1243
1244  /**
1245   * Constructor
1246   */
1247    public ActivityDefinition() {
1248      super();
1249    }
1250
1251  /**
1252   * Constructor
1253   */
1254    public ActivityDefinition(PublicationStatus status) {
1255      super();
1256      this.setStatus(status);
1257    }
1258
1259    /**
1260     * @return {@link #url} (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.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1261     */
1262    public UriType getUrlElement() { 
1263      if (this.url == null)
1264        if (Configuration.errorOnAutoCreate())
1265          throw new Error("Attempt to auto-create ActivityDefinition.url");
1266        else if (Configuration.doAutoCreate())
1267          this.url = new UriType(); // bb
1268      return this.url;
1269    }
1270
1271    public boolean hasUrlElement() { 
1272      return this.url != null && !this.url.isEmpty();
1273    }
1274
1275    public boolean hasUrl() { 
1276      return this.url != null && !this.url.isEmpty();
1277    }
1278
1279    /**
1280     * @param value {@link #url} (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.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1281     */
1282    public ActivityDefinition setUrlElement(UriType value) { 
1283      this.url = value;
1284      return this;
1285    }
1286
1287    /**
1288     * @return 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.
1289     */
1290    public String getUrl() { 
1291      return this.url == null ? null : this.url.getValue();
1292    }
1293
1294    /**
1295     * @param value 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.
1296     */
1297    public ActivityDefinition setUrl(String value) { 
1298      if (Utilities.noString(value))
1299        this.url = null;
1300      else {
1301        if (this.url == null)
1302          this.url = new UriType();
1303        this.url.setValue(value);
1304      }
1305      return this;
1306    }
1307
1308    /**
1309     * @return {@link #identifier} (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.)
1310     */
1311    public List<Identifier> getIdentifier() { 
1312      if (this.identifier == null)
1313        this.identifier = new ArrayList<Identifier>();
1314      return this.identifier;
1315    }
1316
1317    /**
1318     * @return Returns a reference to <code>this</code> for easy method chaining
1319     */
1320    public ActivityDefinition setIdentifier(List<Identifier> theIdentifier) { 
1321      this.identifier = theIdentifier;
1322      return this;
1323    }
1324
1325    public boolean hasIdentifier() { 
1326      if (this.identifier == null)
1327        return false;
1328      for (Identifier item : this.identifier)
1329        if (!item.isEmpty())
1330          return true;
1331      return false;
1332    }
1333
1334    public Identifier addIdentifier() { //3
1335      Identifier t = new Identifier();
1336      if (this.identifier == null)
1337        this.identifier = new ArrayList<Identifier>();
1338      this.identifier.add(t);
1339      return t;
1340    }
1341
1342    public ActivityDefinition addIdentifier(Identifier t) { //3
1343      if (t == null)
1344        return this;
1345      if (this.identifier == null)
1346        this.identifier = new ArrayList<Identifier>();
1347      this.identifier.add(t);
1348      return this;
1349    }
1350
1351    /**
1352     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1353     */
1354    public Identifier getIdentifierFirstRep() { 
1355      if (getIdentifier().isEmpty()) {
1356        addIdentifier();
1357      }
1358      return getIdentifier().get(0);
1359    }
1360
1361    /**
1362     * @return {@link #version} (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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1363     */
1364    public StringType getVersionElement() { 
1365      if (this.version == null)
1366        if (Configuration.errorOnAutoCreate())
1367          throw new Error("Attempt to auto-create ActivityDefinition.version");
1368        else if (Configuration.doAutoCreate())
1369          this.version = new StringType(); // bb
1370      return this.version;
1371    }
1372
1373    public boolean hasVersionElement() { 
1374      return this.version != null && !this.version.isEmpty();
1375    }
1376
1377    public boolean hasVersion() { 
1378      return this.version != null && !this.version.isEmpty();
1379    }
1380
1381    /**
1382     * @param value {@link #version} (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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1383     */
1384    public ActivityDefinition setVersionElement(StringType value) { 
1385      this.version = value;
1386      return this;
1387    }
1388
1389    /**
1390     * @return 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.
1391     */
1392    public String getVersion() { 
1393      return this.version == null ? null : this.version.getValue();
1394    }
1395
1396    /**
1397     * @param value 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.
1398     */
1399    public ActivityDefinition setVersion(String value) { 
1400      if (Utilities.noString(value))
1401        this.version = null;
1402      else {
1403        if (this.version == null)
1404          this.version = new StringType();
1405        this.version.setValue(value);
1406      }
1407      return this;
1408    }
1409
1410    /**
1411     * @return {@link #name} (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.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1412     */
1413    public StringType getNameElement() { 
1414      if (this.name == null)
1415        if (Configuration.errorOnAutoCreate())
1416          throw new Error("Attempt to auto-create ActivityDefinition.name");
1417        else if (Configuration.doAutoCreate())
1418          this.name = new StringType(); // bb
1419      return this.name;
1420    }
1421
1422    public boolean hasNameElement() { 
1423      return this.name != null && !this.name.isEmpty();
1424    }
1425
1426    public boolean hasName() { 
1427      return this.name != null && !this.name.isEmpty();
1428    }
1429
1430    /**
1431     * @param value {@link #name} (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.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1432     */
1433    public ActivityDefinition setNameElement(StringType value) { 
1434      this.name = value;
1435      return this;
1436    }
1437
1438    /**
1439     * @return 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.
1440     */
1441    public String getName() { 
1442      return this.name == null ? null : this.name.getValue();
1443    }
1444
1445    /**
1446     * @param value 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.
1447     */
1448    public ActivityDefinition setName(String value) { 
1449      if (Utilities.noString(value))
1450        this.name = null;
1451      else {
1452        if (this.name == null)
1453          this.name = new StringType();
1454        this.name.setValue(value);
1455      }
1456      return this;
1457    }
1458
1459    /**
1460     * @return {@link #title} (A short, descriptive, user-friendly title for the activity definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1461     */
1462    public StringType getTitleElement() { 
1463      if (this.title == null)
1464        if (Configuration.errorOnAutoCreate())
1465          throw new Error("Attempt to auto-create ActivityDefinition.title");
1466        else if (Configuration.doAutoCreate())
1467          this.title = new StringType(); // bb
1468      return this.title;
1469    }
1470
1471    public boolean hasTitleElement() { 
1472      return this.title != null && !this.title.isEmpty();
1473    }
1474
1475    public boolean hasTitle() { 
1476      return this.title != null && !this.title.isEmpty();
1477    }
1478
1479    /**
1480     * @param value {@link #title} (A short, descriptive, user-friendly title for the activity definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1481     */
1482    public ActivityDefinition setTitleElement(StringType value) { 
1483      this.title = value;
1484      return this;
1485    }
1486
1487    /**
1488     * @return A short, descriptive, user-friendly title for the activity definition.
1489     */
1490    public String getTitle() { 
1491      return this.title == null ? null : this.title.getValue();
1492    }
1493
1494    /**
1495     * @param value A short, descriptive, user-friendly title for the activity definition.
1496     */
1497    public ActivityDefinition setTitle(String value) { 
1498      if (Utilities.noString(value))
1499        this.title = null;
1500      else {
1501        if (this.title == null)
1502          this.title = new StringType();
1503        this.title.setValue(value);
1504      }
1505      return this;
1506    }
1507
1508    /**
1509     * @return {@link #subtitle} (An explanatory or alternate title for the activity definition giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
1510     */
1511    public StringType getSubtitleElement() { 
1512      if (this.subtitle == null)
1513        if (Configuration.errorOnAutoCreate())
1514          throw new Error("Attempt to auto-create ActivityDefinition.subtitle");
1515        else if (Configuration.doAutoCreate())
1516          this.subtitle = new StringType(); // bb
1517      return this.subtitle;
1518    }
1519
1520    public boolean hasSubtitleElement() { 
1521      return this.subtitle != null && !this.subtitle.isEmpty();
1522    }
1523
1524    public boolean hasSubtitle() { 
1525      return this.subtitle != null && !this.subtitle.isEmpty();
1526    }
1527
1528    /**
1529     * @param value {@link #subtitle} (An explanatory or alternate title for the activity definition giving additional information about its content.). This is the underlying object with id, value and extensions. The accessor "getSubtitle" gives direct access to the value
1530     */
1531    public ActivityDefinition setSubtitleElement(StringType value) { 
1532      this.subtitle = value;
1533      return this;
1534    }
1535
1536    /**
1537     * @return An explanatory or alternate title for the activity definition giving additional information about its content.
1538     */
1539    public String getSubtitle() { 
1540      return this.subtitle == null ? null : this.subtitle.getValue();
1541    }
1542
1543    /**
1544     * @param value An explanatory or alternate title for the activity definition giving additional information about its content.
1545     */
1546    public ActivityDefinition setSubtitle(String value) { 
1547      if (Utilities.noString(value))
1548        this.subtitle = null;
1549      else {
1550        if (this.subtitle == null)
1551          this.subtitle = new StringType();
1552        this.subtitle.setValue(value);
1553      }
1554      return this;
1555    }
1556
1557    /**
1558     * @return {@link #status} (The status of this activity definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1559     */
1560    public Enumeration<PublicationStatus> getStatusElement() { 
1561      if (this.status == null)
1562        if (Configuration.errorOnAutoCreate())
1563          throw new Error("Attempt to auto-create ActivityDefinition.status");
1564        else if (Configuration.doAutoCreate())
1565          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1566      return this.status;
1567    }
1568
1569    public boolean hasStatusElement() { 
1570      return this.status != null && !this.status.isEmpty();
1571    }
1572
1573    public boolean hasStatus() { 
1574      return this.status != null && !this.status.isEmpty();
1575    }
1576
1577    /**
1578     * @param value {@link #status} (The status of this activity definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1579     */
1580    public ActivityDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
1581      this.status = value;
1582      return this;
1583    }
1584
1585    /**
1586     * @return The status of this activity definition. Enables tracking the life-cycle of the content.
1587     */
1588    public PublicationStatus getStatus() { 
1589      return this.status == null ? null : this.status.getValue();
1590    }
1591
1592    /**
1593     * @param value The status of this activity definition. Enables tracking the life-cycle of the content.
1594     */
1595    public ActivityDefinition setStatus(PublicationStatus value) { 
1596        if (this.status == null)
1597          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1598        this.status.setValue(value);
1599      return this;
1600    }
1601
1602    /**
1603     * @return {@link #experimental} (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.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1604     */
1605    public BooleanType getExperimentalElement() { 
1606      if (this.experimental == null)
1607        if (Configuration.errorOnAutoCreate())
1608          throw new Error("Attempt to auto-create ActivityDefinition.experimental");
1609        else if (Configuration.doAutoCreate())
1610          this.experimental = new BooleanType(); // bb
1611      return this.experimental;
1612    }
1613
1614    public boolean hasExperimentalElement() { 
1615      return this.experimental != null && !this.experimental.isEmpty();
1616    }
1617
1618    public boolean hasExperimental() { 
1619      return this.experimental != null && !this.experimental.isEmpty();
1620    }
1621
1622    /**
1623     * @param value {@link #experimental} (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.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1624     */
1625    public ActivityDefinition setExperimentalElement(BooleanType value) { 
1626      this.experimental = value;
1627      return this;
1628    }
1629
1630    /**
1631     * @return 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.
1632     */
1633    public boolean getExperimental() { 
1634      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
1635    }
1636
1637    /**
1638     * @param value 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.
1639     */
1640    public ActivityDefinition setExperimental(boolean value) { 
1641        if (this.experimental == null)
1642          this.experimental = new BooleanType();
1643        this.experimental.setValue(value);
1644      return this;
1645    }
1646
1647    /**
1648     * @return {@link #subject} (A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.)
1649     */
1650    public DataType getSubject() { 
1651      return this.subject;
1652    }
1653
1654    /**
1655     * @return {@link #subject} (A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.)
1656     */
1657    public CodeableConcept getSubjectCodeableConcept() throws FHIRException { 
1658      if (this.subject == null)
1659        this.subject = new CodeableConcept();
1660      if (!(this.subject instanceof CodeableConcept))
1661        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.subject.getClass().getName()+" was encountered");
1662      return (CodeableConcept) this.subject;
1663    }
1664
1665    public boolean hasSubjectCodeableConcept() { 
1666      return this != null && this.subject instanceof CodeableConcept;
1667    }
1668
1669    /**
1670     * @return {@link #subject} (A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.)
1671     */
1672    public Reference getSubjectReference() throws FHIRException { 
1673      if (this.subject == null)
1674        this.subject = new Reference();
1675      if (!(this.subject instanceof Reference))
1676        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.subject.getClass().getName()+" was encountered");
1677      return (Reference) this.subject;
1678    }
1679
1680    public boolean hasSubjectReference() { 
1681      return this != null && this.subject instanceof Reference;
1682    }
1683
1684    /**
1685     * @return {@link #subject} (A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.)
1686     */
1687    public CanonicalType getSubjectCanonicalType() throws FHIRException { 
1688      if (this.subject == null)
1689        this.subject = new CanonicalType();
1690      if (!(this.subject instanceof CanonicalType))
1691        throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.subject.getClass().getName()+" was encountered");
1692      return (CanonicalType) this.subject;
1693    }
1694
1695    public boolean hasSubjectCanonicalType() { 
1696      return this != null && this.subject instanceof CanonicalType;
1697    }
1698
1699    public boolean hasSubject() { 
1700      return this.subject != null && !this.subject.isEmpty();
1701    }
1702
1703    /**
1704     * @param value {@link #subject} (A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.)
1705     */
1706    public ActivityDefinition setSubject(DataType value) { 
1707      if (value != null && !(value instanceof CodeableConcept || value instanceof Reference || value instanceof CanonicalType))
1708        throw new Error("Not the right type for ActivityDefinition.subject[x]: "+value.fhirType());
1709      this.subject = value;
1710      return this;
1711    }
1712
1713    /**
1714     * @return {@link #date} (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.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1715     */
1716    public DateTimeType getDateElement() { 
1717      if (this.date == null)
1718        if (Configuration.errorOnAutoCreate())
1719          throw new Error("Attempt to auto-create ActivityDefinition.date");
1720        else if (Configuration.doAutoCreate())
1721          this.date = new DateTimeType(); // bb
1722      return this.date;
1723    }
1724
1725    public boolean hasDateElement() { 
1726      return this.date != null && !this.date.isEmpty();
1727    }
1728
1729    public boolean hasDate() { 
1730      return this.date != null && !this.date.isEmpty();
1731    }
1732
1733    /**
1734     * @param value {@link #date} (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.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1735     */
1736    public ActivityDefinition setDateElement(DateTimeType value) { 
1737      this.date = value;
1738      return this;
1739    }
1740
1741    /**
1742     * @return 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.
1743     */
1744    public Date getDate() { 
1745      return this.date == null ? null : this.date.getValue();
1746    }
1747
1748    /**
1749     * @param value 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.
1750     */
1751    public ActivityDefinition setDate(Date value) { 
1752      if (value == null)
1753        this.date = null;
1754      else {
1755        if (this.date == null)
1756          this.date = new DateTimeType();
1757        this.date.setValue(value);
1758      }
1759      return this;
1760    }
1761
1762    /**
1763     * @return {@link #publisher} (The name of the organization or individual that published the activity definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1764     */
1765    public StringType getPublisherElement() { 
1766      if (this.publisher == null)
1767        if (Configuration.errorOnAutoCreate())
1768          throw new Error("Attempt to auto-create ActivityDefinition.publisher");
1769        else if (Configuration.doAutoCreate())
1770          this.publisher = new StringType(); // bb
1771      return this.publisher;
1772    }
1773
1774    public boolean hasPublisherElement() { 
1775      return this.publisher != null && !this.publisher.isEmpty();
1776    }
1777
1778    public boolean hasPublisher() { 
1779      return this.publisher != null && !this.publisher.isEmpty();
1780    }
1781
1782    /**
1783     * @param value {@link #publisher} (The name of the organization or individual that published the activity definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
1784     */
1785    public ActivityDefinition setPublisherElement(StringType value) { 
1786      this.publisher = value;
1787      return this;
1788    }
1789
1790    /**
1791     * @return The name of the organization or individual that published the activity definition.
1792     */
1793    public String getPublisher() { 
1794      return this.publisher == null ? null : this.publisher.getValue();
1795    }
1796
1797    /**
1798     * @param value The name of the organization or individual that published the activity definition.
1799     */
1800    public ActivityDefinition setPublisher(String value) { 
1801      if (Utilities.noString(value))
1802        this.publisher = null;
1803      else {
1804        if (this.publisher == null)
1805          this.publisher = new StringType();
1806        this.publisher.setValue(value);
1807      }
1808      return this;
1809    }
1810
1811    /**
1812     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
1813     */
1814    public List<ContactDetail> getContact() { 
1815      if (this.contact == null)
1816        this.contact = new ArrayList<ContactDetail>();
1817      return this.contact;
1818    }
1819
1820    /**
1821     * @return Returns a reference to <code>this</code> for easy method chaining
1822     */
1823    public ActivityDefinition setContact(List<ContactDetail> theContact) { 
1824      this.contact = theContact;
1825      return this;
1826    }
1827
1828    public boolean hasContact() { 
1829      if (this.contact == null)
1830        return false;
1831      for (ContactDetail item : this.contact)
1832        if (!item.isEmpty())
1833          return true;
1834      return false;
1835    }
1836
1837    public ContactDetail addContact() { //3
1838      ContactDetail t = new ContactDetail();
1839      if (this.contact == null)
1840        this.contact = new ArrayList<ContactDetail>();
1841      this.contact.add(t);
1842      return t;
1843    }
1844
1845    public ActivityDefinition addContact(ContactDetail t) { //3
1846      if (t == null)
1847        return this;
1848      if (this.contact == null)
1849        this.contact = new ArrayList<ContactDetail>();
1850      this.contact.add(t);
1851      return this;
1852    }
1853
1854    /**
1855     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
1856     */
1857    public ContactDetail getContactFirstRep() { 
1858      if (getContact().isEmpty()) {
1859        addContact();
1860      }
1861      return getContact().get(0);
1862    }
1863
1864    /**
1865     * @return {@link #description} (A free text natural language description of the activity definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1866     */
1867    public MarkdownType getDescriptionElement() { 
1868      if (this.description == null)
1869        if (Configuration.errorOnAutoCreate())
1870          throw new Error("Attempt to auto-create ActivityDefinition.description");
1871        else if (Configuration.doAutoCreate())
1872          this.description = new MarkdownType(); // bb
1873      return this.description;
1874    }
1875
1876    public boolean hasDescriptionElement() { 
1877      return this.description != null && !this.description.isEmpty();
1878    }
1879
1880    public boolean hasDescription() { 
1881      return this.description != null && !this.description.isEmpty();
1882    }
1883
1884    /**
1885     * @param value {@link #description} (A free text natural language description of the activity definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1886     */
1887    public ActivityDefinition setDescriptionElement(MarkdownType value) { 
1888      this.description = value;
1889      return this;
1890    }
1891
1892    /**
1893     * @return A free text natural language description of the activity definition from a consumer's perspective.
1894     */
1895    public String getDescription() { 
1896      return this.description == null ? null : this.description.getValue();
1897    }
1898
1899    /**
1900     * @param value A free text natural language description of the activity definition from a consumer's perspective.
1901     */
1902    public ActivityDefinition setDescription(String value) { 
1903      if (value == null)
1904        this.description = null;
1905      else {
1906        if (this.description == null)
1907          this.description = new MarkdownType();
1908        this.description.setValue(value);
1909      }
1910      return this;
1911    }
1912
1913    /**
1914     * @return {@link #useContext} (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.)
1915     */
1916    public List<UsageContext> getUseContext() { 
1917      if (this.useContext == null)
1918        this.useContext = new ArrayList<UsageContext>();
1919      return this.useContext;
1920    }
1921
1922    /**
1923     * @return Returns a reference to <code>this</code> for easy method chaining
1924     */
1925    public ActivityDefinition setUseContext(List<UsageContext> theUseContext) { 
1926      this.useContext = theUseContext;
1927      return this;
1928    }
1929
1930    public boolean hasUseContext() { 
1931      if (this.useContext == null)
1932        return false;
1933      for (UsageContext item : this.useContext)
1934        if (!item.isEmpty())
1935          return true;
1936      return false;
1937    }
1938
1939    public UsageContext addUseContext() { //3
1940      UsageContext t = new UsageContext();
1941      if (this.useContext == null)
1942        this.useContext = new ArrayList<UsageContext>();
1943      this.useContext.add(t);
1944      return t;
1945    }
1946
1947    public ActivityDefinition addUseContext(UsageContext t) { //3
1948      if (t == null)
1949        return this;
1950      if (this.useContext == null)
1951        this.useContext = new ArrayList<UsageContext>();
1952      this.useContext.add(t);
1953      return this;
1954    }
1955
1956    /**
1957     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
1958     */
1959    public UsageContext getUseContextFirstRep() { 
1960      if (getUseContext().isEmpty()) {
1961        addUseContext();
1962      }
1963      return getUseContext().get(0);
1964    }
1965
1966    /**
1967     * @return {@link #jurisdiction} (A legal or geographic region in which the activity definition is intended to be used.)
1968     */
1969    public List<CodeableConcept> getJurisdiction() { 
1970      if (this.jurisdiction == null)
1971        this.jurisdiction = new ArrayList<CodeableConcept>();
1972      return this.jurisdiction;
1973    }
1974
1975    /**
1976     * @return Returns a reference to <code>this</code> for easy method chaining
1977     */
1978    public ActivityDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
1979      this.jurisdiction = theJurisdiction;
1980      return this;
1981    }
1982
1983    public boolean hasJurisdiction() { 
1984      if (this.jurisdiction == null)
1985        return false;
1986      for (CodeableConcept item : this.jurisdiction)
1987        if (!item.isEmpty())
1988          return true;
1989      return false;
1990    }
1991
1992    public CodeableConcept addJurisdiction() { //3
1993      CodeableConcept t = new CodeableConcept();
1994      if (this.jurisdiction == null)
1995        this.jurisdiction = new ArrayList<CodeableConcept>();
1996      this.jurisdiction.add(t);
1997      return t;
1998    }
1999
2000    public ActivityDefinition addJurisdiction(CodeableConcept t) { //3
2001      if (t == null)
2002        return this;
2003      if (this.jurisdiction == null)
2004        this.jurisdiction = new ArrayList<CodeableConcept>();
2005      this.jurisdiction.add(t);
2006      return this;
2007    }
2008
2009    /**
2010     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
2011     */
2012    public CodeableConcept getJurisdictionFirstRep() { 
2013      if (getJurisdiction().isEmpty()) {
2014        addJurisdiction();
2015      }
2016      return getJurisdiction().get(0);
2017    }
2018
2019    /**
2020     * @return {@link #purpose} (Explanation of why this activity definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2021     */
2022    public MarkdownType getPurposeElement() { 
2023      if (this.purpose == null)
2024        if (Configuration.errorOnAutoCreate())
2025          throw new Error("Attempt to auto-create ActivityDefinition.purpose");
2026        else if (Configuration.doAutoCreate())
2027          this.purpose = new MarkdownType(); // bb
2028      return this.purpose;
2029    }
2030
2031    public boolean hasPurposeElement() { 
2032      return this.purpose != null && !this.purpose.isEmpty();
2033    }
2034
2035    public boolean hasPurpose() { 
2036      return this.purpose != null && !this.purpose.isEmpty();
2037    }
2038
2039    /**
2040     * @param value {@link #purpose} (Explanation of why this activity definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2041     */
2042    public ActivityDefinition setPurposeElement(MarkdownType value) { 
2043      this.purpose = value;
2044      return this;
2045    }
2046
2047    /**
2048     * @return Explanation of why this activity definition is needed and why it has been designed as it has.
2049     */
2050    public String getPurpose() { 
2051      return this.purpose == null ? null : this.purpose.getValue();
2052    }
2053
2054    /**
2055     * @param value Explanation of why this activity definition is needed and why it has been designed as it has.
2056     */
2057    public ActivityDefinition setPurpose(String value) { 
2058      if (value == null)
2059        this.purpose = null;
2060      else {
2061        if (this.purpose == null)
2062          this.purpose = new MarkdownType();
2063        this.purpose.setValue(value);
2064      }
2065      return this;
2066    }
2067
2068    /**
2069     * @return {@link #usage} (A detailed description of how the activity definition is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
2070     */
2071    public StringType getUsageElement() { 
2072      if (this.usage == null)
2073        if (Configuration.errorOnAutoCreate())
2074          throw new Error("Attempt to auto-create ActivityDefinition.usage");
2075        else if (Configuration.doAutoCreate())
2076          this.usage = new StringType(); // bb
2077      return this.usage;
2078    }
2079
2080    public boolean hasUsageElement() { 
2081      return this.usage != null && !this.usage.isEmpty();
2082    }
2083
2084    public boolean hasUsage() { 
2085      return this.usage != null && !this.usage.isEmpty();
2086    }
2087
2088    /**
2089     * @param value {@link #usage} (A detailed description of how the activity definition is used from a clinical perspective.). This is the underlying object with id, value and extensions. The accessor "getUsage" gives direct access to the value
2090     */
2091    public ActivityDefinition setUsageElement(StringType value) { 
2092      this.usage = value;
2093      return this;
2094    }
2095
2096    /**
2097     * @return A detailed description of how the activity definition is used from a clinical perspective.
2098     */
2099    public String getUsage() { 
2100      return this.usage == null ? null : this.usage.getValue();
2101    }
2102
2103    /**
2104     * @param value A detailed description of how the activity definition is used from a clinical perspective.
2105     */
2106    public ActivityDefinition setUsage(String value) { 
2107      if (Utilities.noString(value))
2108        this.usage = null;
2109      else {
2110        if (this.usage == null)
2111          this.usage = new StringType();
2112        this.usage.setValue(value);
2113      }
2114      return this;
2115    }
2116
2117    /**
2118     * @return {@link #copyright} (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.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2119     */
2120    public MarkdownType getCopyrightElement() { 
2121      if (this.copyright == null)
2122        if (Configuration.errorOnAutoCreate())
2123          throw new Error("Attempt to auto-create ActivityDefinition.copyright");
2124        else if (Configuration.doAutoCreate())
2125          this.copyright = new MarkdownType(); // bb
2126      return this.copyright;
2127    }
2128
2129    public boolean hasCopyrightElement() { 
2130      return this.copyright != null && !this.copyright.isEmpty();
2131    }
2132
2133    public boolean hasCopyright() { 
2134      return this.copyright != null && !this.copyright.isEmpty();
2135    }
2136
2137    /**
2138     * @param value {@link #copyright} (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.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2139     */
2140    public ActivityDefinition setCopyrightElement(MarkdownType value) { 
2141      this.copyright = value;
2142      return this;
2143    }
2144
2145    /**
2146     * @return 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.
2147     */
2148    public String getCopyright() { 
2149      return this.copyright == null ? null : this.copyright.getValue();
2150    }
2151
2152    /**
2153     * @param value 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.
2154     */
2155    public ActivityDefinition setCopyright(String value) { 
2156      if (value == null)
2157        this.copyright = null;
2158      else {
2159        if (this.copyright == null)
2160          this.copyright = new MarkdownType();
2161        this.copyright.setValue(value);
2162      }
2163      return this;
2164    }
2165
2166    /**
2167     * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2168     */
2169    public DateType getApprovalDateElement() { 
2170      if (this.approvalDate == null)
2171        if (Configuration.errorOnAutoCreate())
2172          throw new Error("Attempt to auto-create ActivityDefinition.approvalDate");
2173        else if (Configuration.doAutoCreate())
2174          this.approvalDate = new DateType(); // bb
2175      return this.approvalDate;
2176    }
2177
2178    public boolean hasApprovalDateElement() { 
2179      return this.approvalDate != null && !this.approvalDate.isEmpty();
2180    }
2181
2182    public boolean hasApprovalDate() { 
2183      return this.approvalDate != null && !this.approvalDate.isEmpty();
2184    }
2185
2186    /**
2187     * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2188     */
2189    public ActivityDefinition setApprovalDateElement(DateType value) { 
2190      this.approvalDate = value;
2191      return this;
2192    }
2193
2194    /**
2195     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2196     */
2197    public Date getApprovalDate() { 
2198      return this.approvalDate == null ? null : this.approvalDate.getValue();
2199    }
2200
2201    /**
2202     * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2203     */
2204    public ActivityDefinition setApprovalDate(Date value) { 
2205      if (value == null)
2206        this.approvalDate = null;
2207      else {
2208        if (this.approvalDate == null)
2209          this.approvalDate = new DateType();
2210        this.approvalDate.setValue(value);
2211      }
2212      return this;
2213    }
2214
2215    /**
2216     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2217     */
2218    public DateType getLastReviewDateElement() { 
2219      if (this.lastReviewDate == null)
2220        if (Configuration.errorOnAutoCreate())
2221          throw new Error("Attempt to auto-create ActivityDefinition.lastReviewDate");
2222        else if (Configuration.doAutoCreate())
2223          this.lastReviewDate = new DateType(); // bb
2224      return this.lastReviewDate;
2225    }
2226
2227    public boolean hasLastReviewDateElement() { 
2228      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2229    }
2230
2231    public boolean hasLastReviewDate() { 
2232      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2233    }
2234
2235    /**
2236     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2237     */
2238    public ActivityDefinition setLastReviewDateElement(DateType value) { 
2239      this.lastReviewDate = value;
2240      return this;
2241    }
2242
2243    /**
2244     * @return The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
2245     */
2246    public Date getLastReviewDate() { 
2247      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
2248    }
2249
2250    /**
2251     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.
2252     */
2253    public ActivityDefinition setLastReviewDate(Date value) { 
2254      if (value == null)
2255        this.lastReviewDate = null;
2256      else {
2257        if (this.lastReviewDate == null)
2258          this.lastReviewDate = new DateType();
2259        this.lastReviewDate.setValue(value);
2260      }
2261      return this;
2262    }
2263
2264    /**
2265     * @return {@link #effectivePeriod} (The period during which the activity definition content was or is planned to be in active use.)
2266     */
2267    public Period getEffectivePeriod() { 
2268      if (this.effectivePeriod == null)
2269        if (Configuration.errorOnAutoCreate())
2270          throw new Error("Attempt to auto-create ActivityDefinition.effectivePeriod");
2271        else if (Configuration.doAutoCreate())
2272          this.effectivePeriod = new Period(); // cc
2273      return this.effectivePeriod;
2274    }
2275
2276    public boolean hasEffectivePeriod() { 
2277      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
2278    }
2279
2280    /**
2281     * @param value {@link #effectivePeriod} (The period during which the activity definition content was or is planned to be in active use.)
2282     */
2283    public ActivityDefinition setEffectivePeriod(Period value) { 
2284      this.effectivePeriod = value;
2285      return this;
2286    }
2287
2288    /**
2289     * @return {@link #topic} (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.)
2290     */
2291    public List<CodeableConcept> getTopic() { 
2292      if (this.topic == null)
2293        this.topic = new ArrayList<CodeableConcept>();
2294      return this.topic;
2295    }
2296
2297    /**
2298     * @return Returns a reference to <code>this</code> for easy method chaining
2299     */
2300    public ActivityDefinition setTopic(List<CodeableConcept> theTopic) { 
2301      this.topic = theTopic;
2302      return this;
2303    }
2304
2305    public boolean hasTopic() { 
2306      if (this.topic == null)
2307        return false;
2308      for (CodeableConcept item : this.topic)
2309        if (!item.isEmpty())
2310          return true;
2311      return false;
2312    }
2313
2314    public CodeableConcept addTopic() { //3
2315      CodeableConcept t = new CodeableConcept();
2316      if (this.topic == null)
2317        this.topic = new ArrayList<CodeableConcept>();
2318      this.topic.add(t);
2319      return t;
2320    }
2321
2322    public ActivityDefinition addTopic(CodeableConcept t) { //3
2323      if (t == null)
2324        return this;
2325      if (this.topic == null)
2326        this.topic = new ArrayList<CodeableConcept>();
2327      this.topic.add(t);
2328      return this;
2329    }
2330
2331    /**
2332     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist {3}
2333     */
2334    public CodeableConcept getTopicFirstRep() { 
2335      if (getTopic().isEmpty()) {
2336        addTopic();
2337      }
2338      return getTopic().get(0);
2339    }
2340
2341    /**
2342     * @return {@link #author} (An individiual or organization primarily involved in the creation and maintenance of the content.)
2343     */
2344    public List<ContactDetail> getAuthor() { 
2345      if (this.author == null)
2346        this.author = new ArrayList<ContactDetail>();
2347      return this.author;
2348    }
2349
2350    /**
2351     * @return Returns a reference to <code>this</code> for easy method chaining
2352     */
2353    public ActivityDefinition setAuthor(List<ContactDetail> theAuthor) { 
2354      this.author = theAuthor;
2355      return this;
2356    }
2357
2358    public boolean hasAuthor() { 
2359      if (this.author == null)
2360        return false;
2361      for (ContactDetail item : this.author)
2362        if (!item.isEmpty())
2363          return true;
2364      return false;
2365    }
2366
2367    public ContactDetail addAuthor() { //3
2368      ContactDetail t = new ContactDetail();
2369      if (this.author == null)
2370        this.author = new ArrayList<ContactDetail>();
2371      this.author.add(t);
2372      return t;
2373    }
2374
2375    public ActivityDefinition addAuthor(ContactDetail t) { //3
2376      if (t == null)
2377        return this;
2378      if (this.author == null)
2379        this.author = new ArrayList<ContactDetail>();
2380      this.author.add(t);
2381      return this;
2382    }
2383
2384    /**
2385     * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3}
2386     */
2387    public ContactDetail getAuthorFirstRep() { 
2388      if (getAuthor().isEmpty()) {
2389        addAuthor();
2390      }
2391      return getAuthor().get(0);
2392    }
2393
2394    /**
2395     * @return {@link #editor} (An individual or organization primarily responsible for internal coherence of the content.)
2396     */
2397    public List<ContactDetail> getEditor() { 
2398      if (this.editor == null)
2399        this.editor = new ArrayList<ContactDetail>();
2400      return this.editor;
2401    }
2402
2403    /**
2404     * @return Returns a reference to <code>this</code> for easy method chaining
2405     */
2406    public ActivityDefinition setEditor(List<ContactDetail> theEditor) { 
2407      this.editor = theEditor;
2408      return this;
2409    }
2410
2411    public boolean hasEditor() { 
2412      if (this.editor == null)
2413        return false;
2414      for (ContactDetail item : this.editor)
2415        if (!item.isEmpty())
2416          return true;
2417      return false;
2418    }
2419
2420    public ContactDetail addEditor() { //3
2421      ContactDetail t = new ContactDetail();
2422      if (this.editor == null)
2423        this.editor = new ArrayList<ContactDetail>();
2424      this.editor.add(t);
2425      return t;
2426    }
2427
2428    public ActivityDefinition addEditor(ContactDetail t) { //3
2429      if (t == null)
2430        return this;
2431      if (this.editor == null)
2432        this.editor = new ArrayList<ContactDetail>();
2433      this.editor.add(t);
2434      return this;
2435    }
2436
2437    /**
2438     * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {3}
2439     */
2440    public ContactDetail getEditorFirstRep() { 
2441      if (getEditor().isEmpty()) {
2442        addEditor();
2443      }
2444      return getEditor().get(0);
2445    }
2446
2447    /**
2448     * @return {@link #reviewer} (An individual or organization primarily responsible for review of some aspect of the content.)
2449     */
2450    public List<ContactDetail> getReviewer() { 
2451      if (this.reviewer == null)
2452        this.reviewer = new ArrayList<ContactDetail>();
2453      return this.reviewer;
2454    }
2455
2456    /**
2457     * @return Returns a reference to <code>this</code> for easy method chaining
2458     */
2459    public ActivityDefinition setReviewer(List<ContactDetail> theReviewer) { 
2460      this.reviewer = theReviewer;
2461      return this;
2462    }
2463
2464    public boolean hasReviewer() { 
2465      if (this.reviewer == null)
2466        return false;
2467      for (ContactDetail item : this.reviewer)
2468        if (!item.isEmpty())
2469          return true;
2470      return false;
2471    }
2472
2473    public ContactDetail addReviewer() { //3
2474      ContactDetail t = new ContactDetail();
2475      if (this.reviewer == null)
2476        this.reviewer = new ArrayList<ContactDetail>();
2477      this.reviewer.add(t);
2478      return t;
2479    }
2480
2481    public ActivityDefinition addReviewer(ContactDetail t) { //3
2482      if (t == null)
2483        return this;
2484      if (this.reviewer == null)
2485        this.reviewer = new ArrayList<ContactDetail>();
2486      this.reviewer.add(t);
2487      return this;
2488    }
2489
2490    /**
2491     * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {3}
2492     */
2493    public ContactDetail getReviewerFirstRep() { 
2494      if (getReviewer().isEmpty()) {
2495        addReviewer();
2496      }
2497      return getReviewer().get(0);
2498    }
2499
2500    /**
2501     * @return {@link #endorser} (An individual or organization responsible for officially endorsing the content for use in some setting.)
2502     */
2503    public List<ContactDetail> getEndorser() { 
2504      if (this.endorser == null)
2505        this.endorser = new ArrayList<ContactDetail>();
2506      return this.endorser;
2507    }
2508
2509    /**
2510     * @return Returns a reference to <code>this</code> for easy method chaining
2511     */
2512    public ActivityDefinition setEndorser(List<ContactDetail> theEndorser) { 
2513      this.endorser = theEndorser;
2514      return this;
2515    }
2516
2517    public boolean hasEndorser() { 
2518      if (this.endorser == null)
2519        return false;
2520      for (ContactDetail item : this.endorser)
2521        if (!item.isEmpty())
2522          return true;
2523      return false;
2524    }
2525
2526    public ContactDetail addEndorser() { //3
2527      ContactDetail t = new ContactDetail();
2528      if (this.endorser == null)
2529        this.endorser = new ArrayList<ContactDetail>();
2530      this.endorser.add(t);
2531      return t;
2532    }
2533
2534    public ActivityDefinition addEndorser(ContactDetail t) { //3
2535      if (t == null)
2536        return this;
2537      if (this.endorser == null)
2538        this.endorser = new ArrayList<ContactDetail>();
2539      this.endorser.add(t);
2540      return this;
2541    }
2542
2543    /**
2544     * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {3}
2545     */
2546    public ContactDetail getEndorserFirstRep() { 
2547      if (getEndorser().isEmpty()) {
2548        addEndorser();
2549      }
2550      return getEndorser().get(0);
2551    }
2552
2553    /**
2554     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.)
2555     */
2556    public List<RelatedArtifact> getRelatedArtifact() { 
2557      if (this.relatedArtifact == null)
2558        this.relatedArtifact = new ArrayList<RelatedArtifact>();
2559      return this.relatedArtifact;
2560    }
2561
2562    /**
2563     * @return Returns a reference to <code>this</code> for easy method chaining
2564     */
2565    public ActivityDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
2566      this.relatedArtifact = theRelatedArtifact;
2567      return this;
2568    }
2569
2570    public boolean hasRelatedArtifact() { 
2571      if (this.relatedArtifact == null)
2572        return false;
2573      for (RelatedArtifact item : this.relatedArtifact)
2574        if (!item.isEmpty())
2575          return true;
2576      return false;
2577    }
2578
2579    public RelatedArtifact addRelatedArtifact() { //3
2580      RelatedArtifact t = new RelatedArtifact();
2581      if (this.relatedArtifact == null)
2582        this.relatedArtifact = new ArrayList<RelatedArtifact>();
2583      this.relatedArtifact.add(t);
2584      return t;
2585    }
2586
2587    public ActivityDefinition addRelatedArtifact(RelatedArtifact t) { //3
2588      if (t == null)
2589        return this;
2590      if (this.relatedArtifact == null)
2591        this.relatedArtifact = new ArrayList<RelatedArtifact>();
2592      this.relatedArtifact.add(t);
2593      return this;
2594    }
2595
2596    /**
2597     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3}
2598     */
2599    public RelatedArtifact getRelatedArtifactFirstRep() { 
2600      if (getRelatedArtifact().isEmpty()) {
2601        addRelatedArtifact();
2602      }
2603      return getRelatedArtifact().get(0);
2604    }
2605
2606    /**
2607     * @return {@link #library} (A reference to a Library resource containing any formal logic used by the activity definition.)
2608     */
2609    public List<CanonicalType> getLibrary() { 
2610      if (this.library == null)
2611        this.library = new ArrayList<CanonicalType>();
2612      return this.library;
2613    }
2614
2615    /**
2616     * @return Returns a reference to <code>this</code> for easy method chaining
2617     */
2618    public ActivityDefinition setLibrary(List<CanonicalType> theLibrary) { 
2619      this.library = theLibrary;
2620      return this;
2621    }
2622
2623    public boolean hasLibrary() { 
2624      if (this.library == null)
2625        return false;
2626      for (CanonicalType item : this.library)
2627        if (!item.isEmpty())
2628          return true;
2629      return false;
2630    }
2631
2632    /**
2633     * @return {@link #library} (A reference to a Library resource containing any formal logic used by the activity definition.)
2634     */
2635    public CanonicalType addLibraryElement() {//2 
2636      CanonicalType t = new CanonicalType();
2637      if (this.library == null)
2638        this.library = new ArrayList<CanonicalType>();
2639      this.library.add(t);
2640      return t;
2641    }
2642
2643    /**
2644     * @param value {@link #library} (A reference to a Library resource containing any formal logic used by the activity definition.)
2645     */
2646    public ActivityDefinition addLibrary(String value) { //1
2647      CanonicalType t = new CanonicalType();
2648      t.setValue(value);
2649      if (this.library == null)
2650        this.library = new ArrayList<CanonicalType>();
2651      this.library.add(t);
2652      return this;
2653    }
2654
2655    /**
2656     * @param value {@link #library} (A reference to a Library resource containing any formal logic used by the activity definition.)
2657     */
2658    public boolean hasLibrary(String value) { 
2659      if (this.library == null)
2660        return false;
2661      for (CanonicalType v : this.library)
2662        if (v.getValue().equals(value)) // canonical
2663          return true;
2664      return false;
2665    }
2666
2667    /**
2668     * @return {@link #kind} (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.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
2669     */
2670    public Enumeration<RequestResourceType> getKindElement() { 
2671      if (this.kind == null)
2672        if (Configuration.errorOnAutoCreate())
2673          throw new Error("Attempt to auto-create ActivityDefinition.kind");
2674        else if (Configuration.doAutoCreate())
2675          this.kind = new Enumeration<RequestResourceType>(new RequestResourceTypeEnumFactory()); // bb
2676      return this.kind;
2677    }
2678
2679    public boolean hasKindElement() { 
2680      return this.kind != null && !this.kind.isEmpty();
2681    }
2682
2683    public boolean hasKind() { 
2684      return this.kind != null && !this.kind.isEmpty();
2685    }
2686
2687    /**
2688     * @param value {@link #kind} (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.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
2689     */
2690    public ActivityDefinition setKindElement(Enumeration<RequestResourceType> value) { 
2691      this.kind = value;
2692      return this;
2693    }
2694
2695    /**
2696     * @return 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.
2697     */
2698    public RequestResourceType getKind() { 
2699      return this.kind == null ? null : this.kind.getValue();
2700    }
2701
2702    /**
2703     * @param value 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.
2704     */
2705    public ActivityDefinition setKind(RequestResourceType value) { 
2706      if (value == null)
2707        this.kind = null;
2708      else {
2709        if (this.kind == null)
2710          this.kind = new Enumeration<RequestResourceType>(new RequestResourceTypeEnumFactory());
2711        this.kind.setValue(value);
2712      }
2713      return this;
2714    }
2715
2716    /**
2717     * @return {@link #profile} (A profile to which the target of the activity definition is expected to conform.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value
2718     */
2719    public CanonicalType getProfileElement() { 
2720      if (this.profile == null)
2721        if (Configuration.errorOnAutoCreate())
2722          throw new Error("Attempt to auto-create ActivityDefinition.profile");
2723        else if (Configuration.doAutoCreate())
2724          this.profile = new CanonicalType(); // bb
2725      return this.profile;
2726    }
2727
2728    public boolean hasProfileElement() { 
2729      return this.profile != null && !this.profile.isEmpty();
2730    }
2731
2732    public boolean hasProfile() { 
2733      return this.profile != null && !this.profile.isEmpty();
2734    }
2735
2736    /**
2737     * @param value {@link #profile} (A profile to which the target of the activity definition is expected to conform.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value
2738     */
2739    public ActivityDefinition setProfileElement(CanonicalType value) { 
2740      this.profile = value;
2741      return this;
2742    }
2743
2744    /**
2745     * @return A profile to which the target of the activity definition is expected to conform.
2746     */
2747    public String getProfile() { 
2748      return this.profile == null ? null : this.profile.getValue();
2749    }
2750
2751    /**
2752     * @param value A profile to which the target of the activity definition is expected to conform.
2753     */
2754    public ActivityDefinition setProfile(String value) { 
2755      if (Utilities.noString(value))
2756        this.profile = null;
2757      else {
2758        if (this.profile == null)
2759          this.profile = new CanonicalType();
2760        this.profile.setValue(value);
2761      }
2762      return this;
2763    }
2764
2765    /**
2766     * @return {@link #code} (Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.)
2767     */
2768    public CodeableConcept getCode() { 
2769      if (this.code == null)
2770        if (Configuration.errorOnAutoCreate())
2771          throw new Error("Attempt to auto-create ActivityDefinition.code");
2772        else if (Configuration.doAutoCreate())
2773          this.code = new CodeableConcept(); // cc
2774      return this.code;
2775    }
2776
2777    public boolean hasCode() { 
2778      return this.code != null && !this.code.isEmpty();
2779    }
2780
2781    /**
2782     * @param value {@link #code} (Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.)
2783     */
2784    public ActivityDefinition setCode(CodeableConcept value) { 
2785      this.code = value;
2786      return this;
2787    }
2788
2789    /**
2790     * @return {@link #intent} (Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
2791     */
2792    public Enumeration<RequestIntent> getIntentElement() { 
2793      if (this.intent == null)
2794        if (Configuration.errorOnAutoCreate())
2795          throw new Error("Attempt to auto-create ActivityDefinition.intent");
2796        else if (Configuration.doAutoCreate())
2797          this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); // bb
2798      return this.intent;
2799    }
2800
2801    public boolean hasIntentElement() { 
2802      return this.intent != null && !this.intent.isEmpty();
2803    }
2804
2805    public boolean hasIntent() { 
2806      return this.intent != null && !this.intent.isEmpty();
2807    }
2808
2809    /**
2810     * @param value {@link #intent} (Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.). This is the underlying object with id, value and extensions. The accessor "getIntent" gives direct access to the value
2811     */
2812    public ActivityDefinition setIntentElement(Enumeration<RequestIntent> value) { 
2813      this.intent = value;
2814      return this;
2815    }
2816
2817    /**
2818     * @return Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.
2819     */
2820    public RequestIntent getIntent() { 
2821      return this.intent == null ? null : this.intent.getValue();
2822    }
2823
2824    /**
2825     * @param value Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.
2826     */
2827    public ActivityDefinition setIntent(RequestIntent value) { 
2828      if (value == null)
2829        this.intent = null;
2830      else {
2831        if (this.intent == null)
2832          this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory());
2833        this.intent.setValue(value);
2834      }
2835      return this;
2836    }
2837
2838    /**
2839     * @return {@link #priority} (Indicates how quickly the activity  should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
2840     */
2841    public Enumeration<RequestPriority> getPriorityElement() { 
2842      if (this.priority == null)
2843        if (Configuration.errorOnAutoCreate())
2844          throw new Error("Attempt to auto-create ActivityDefinition.priority");
2845        else if (Configuration.doAutoCreate())
2846          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb
2847      return this.priority;
2848    }
2849
2850    public boolean hasPriorityElement() { 
2851      return this.priority != null && !this.priority.isEmpty();
2852    }
2853
2854    public boolean hasPriority() { 
2855      return this.priority != null && !this.priority.isEmpty();
2856    }
2857
2858    /**
2859     * @param value {@link #priority} (Indicates how quickly the activity  should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value
2860     */
2861    public ActivityDefinition setPriorityElement(Enumeration<RequestPriority> value) { 
2862      this.priority = value;
2863      return this;
2864    }
2865
2866    /**
2867     * @return Indicates how quickly the activity  should be addressed with respect to other requests.
2868     */
2869    public RequestPriority getPriority() { 
2870      return this.priority == null ? null : this.priority.getValue();
2871    }
2872
2873    /**
2874     * @param value Indicates how quickly the activity  should be addressed with respect to other requests.
2875     */
2876    public ActivityDefinition setPriority(RequestPriority value) { 
2877      if (value == null)
2878        this.priority = null;
2879      else {
2880        if (this.priority == null)
2881          this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory());
2882        this.priority.setValue(value);
2883      }
2884      return this;
2885    }
2886
2887    /**
2888     * @return {@link #doNotPerform} (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.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
2889     */
2890    public BooleanType getDoNotPerformElement() { 
2891      if (this.doNotPerform == null)
2892        if (Configuration.errorOnAutoCreate())
2893          throw new Error("Attempt to auto-create ActivityDefinition.doNotPerform");
2894        else if (Configuration.doAutoCreate())
2895          this.doNotPerform = new BooleanType(); // bb
2896      return this.doNotPerform;
2897    }
2898
2899    public boolean hasDoNotPerformElement() { 
2900      return this.doNotPerform != null && !this.doNotPerform.isEmpty();
2901    }
2902
2903    public boolean hasDoNotPerform() { 
2904      return this.doNotPerform != null && !this.doNotPerform.isEmpty();
2905    }
2906
2907    /**
2908     * @param value {@link #doNotPerform} (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.). This is the underlying object with id, value and extensions. The accessor "getDoNotPerform" gives direct access to the value
2909     */
2910    public ActivityDefinition setDoNotPerformElement(BooleanType value) { 
2911      this.doNotPerform = value;
2912      return this;
2913    }
2914
2915    /**
2916     * @return 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.
2917     */
2918    public boolean getDoNotPerform() { 
2919      return this.doNotPerform == null || this.doNotPerform.isEmpty() ? false : this.doNotPerform.getValue();
2920    }
2921
2922    /**
2923     * @param value 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.
2924     */
2925    public ActivityDefinition setDoNotPerform(boolean value) { 
2926        if (this.doNotPerform == null)
2927          this.doNotPerform = new BooleanType();
2928        this.doNotPerform.setValue(value);
2929      return this;
2930    }
2931
2932    /**
2933     * @return {@link #timing} (The timing or frequency upon which the described activity is to occur.)
2934     */
2935    public DataType getTiming() { 
2936      return this.timing;
2937    }
2938
2939    /**
2940     * @return {@link #timing} (The timing or frequency upon which the described activity is to occur.)
2941     */
2942    public Timing getTimingTiming() throws FHIRException { 
2943      if (this.timing == null)
2944        this.timing = new Timing();
2945      if (!(this.timing instanceof Timing))
2946        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered");
2947      return (Timing) this.timing;
2948    }
2949
2950    public boolean hasTimingTiming() { 
2951      return this != null && this.timing instanceof Timing;
2952    }
2953
2954    /**
2955     * @return {@link #timing} (The timing or frequency upon which the described activity is to occur.)
2956     */
2957    public Age getTimingAge() throws FHIRException { 
2958      if (this.timing == null)
2959        this.timing = new Age();
2960      if (!(this.timing instanceof Age))
2961        throw new FHIRException("Type mismatch: the type Age was expected, but "+this.timing.getClass().getName()+" was encountered");
2962      return (Age) this.timing;
2963    }
2964
2965    public boolean hasTimingAge() { 
2966      return this != null && this.timing instanceof Age;
2967    }
2968
2969    /**
2970     * @return {@link #timing} (The timing or frequency upon which the described activity is to occur.)
2971     */
2972    public Range getTimingRange() throws FHIRException { 
2973      if (this.timing == null)
2974        this.timing = new Range();
2975      if (!(this.timing instanceof Range))
2976        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered");
2977      return (Range) this.timing;
2978    }
2979
2980    public boolean hasTimingRange() { 
2981      return this != null && this.timing instanceof Range;
2982    }
2983
2984    /**
2985     * @return {@link #timing} (The timing or frequency upon which the described activity is to occur.)
2986     */
2987    public Duration getTimingDuration() throws FHIRException { 
2988      if (this.timing == null)
2989        this.timing = new Duration();
2990      if (!(this.timing instanceof Duration))
2991        throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered");
2992      return (Duration) this.timing;
2993    }
2994
2995    public boolean hasTimingDuration() { 
2996      return this != null && this.timing instanceof Duration;
2997    }
2998
2999    public boolean hasTiming() { 
3000      return this.timing != null && !this.timing.isEmpty();
3001    }
3002
3003    /**
3004     * @param value {@link #timing} (The timing or frequency upon which the described activity is to occur.)
3005     */
3006    public ActivityDefinition setTiming(DataType value) { 
3007      if (value != null && !(value instanceof Timing || value instanceof Age || value instanceof Range || value instanceof Duration))
3008        throw new Error("Not the right type for ActivityDefinition.timing[x]: "+value.fhirType());
3009      this.timing = value;
3010      return this;
3011    }
3012
3013    /**
3014     * @return {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
3015     */
3016    public CodeableReference getLocation() { 
3017      if (this.location == null)
3018        if (Configuration.errorOnAutoCreate())
3019          throw new Error("Attempt to auto-create ActivityDefinition.location");
3020        else if (Configuration.doAutoCreate())
3021          this.location = new CodeableReference(); // cc
3022      return this.location;
3023    }
3024
3025    public boolean hasLocation() { 
3026      return this.location != null && !this.location.isEmpty();
3027    }
3028
3029    /**
3030     * @param value {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
3031     */
3032    public ActivityDefinition setLocation(CodeableReference value) { 
3033      this.location = value;
3034      return this;
3035    }
3036
3037    /**
3038     * @return {@link #participant} (Indicates who should participate in performing the action described.)
3039     */
3040    public List<ActivityDefinitionParticipantComponent> getParticipant() { 
3041      if (this.participant == null)
3042        this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
3043      return this.participant;
3044    }
3045
3046    /**
3047     * @return Returns a reference to <code>this</code> for easy method chaining
3048     */
3049    public ActivityDefinition setParticipant(List<ActivityDefinitionParticipantComponent> theParticipant) { 
3050      this.participant = theParticipant;
3051      return this;
3052    }
3053
3054    public boolean hasParticipant() { 
3055      if (this.participant == null)
3056        return false;
3057      for (ActivityDefinitionParticipantComponent item : this.participant)
3058        if (!item.isEmpty())
3059          return true;
3060      return false;
3061    }
3062
3063    public ActivityDefinitionParticipantComponent addParticipant() { //3
3064      ActivityDefinitionParticipantComponent t = new ActivityDefinitionParticipantComponent();
3065      if (this.participant == null)
3066        this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
3067      this.participant.add(t);
3068      return t;
3069    }
3070
3071    public ActivityDefinition addParticipant(ActivityDefinitionParticipantComponent t) { //3
3072      if (t == null)
3073        return this;
3074      if (this.participant == null)
3075        this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
3076      this.participant.add(t);
3077      return this;
3078    }
3079
3080    /**
3081     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist {3}
3082     */
3083    public ActivityDefinitionParticipantComponent getParticipantFirstRep() { 
3084      if (getParticipant().isEmpty()) {
3085        addParticipant();
3086      }
3087      return getParticipant().get(0);
3088    }
3089
3090    /**
3091     * @return {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
3092     */
3093    public DataType getProduct() { 
3094      return this.product;
3095    }
3096
3097    /**
3098     * @return {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
3099     */
3100    public Reference getProductReference() throws FHIRException { 
3101      if (this.product == null)
3102        this.product = new Reference();
3103      if (!(this.product instanceof Reference))
3104        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.product.getClass().getName()+" was encountered");
3105      return (Reference) this.product;
3106    }
3107
3108    public boolean hasProductReference() { 
3109      return this != null && this.product instanceof Reference;
3110    }
3111
3112    /**
3113     * @return {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
3114     */
3115    public CodeableConcept getProductCodeableConcept() throws FHIRException { 
3116      if (this.product == null)
3117        this.product = new CodeableConcept();
3118      if (!(this.product instanceof CodeableConcept))
3119        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.product.getClass().getName()+" was encountered");
3120      return (CodeableConcept) this.product;
3121    }
3122
3123    public boolean hasProductCodeableConcept() { 
3124      return this != null && this.product instanceof CodeableConcept;
3125    }
3126
3127    public boolean hasProduct() { 
3128      return this.product != null && !this.product.isEmpty();
3129    }
3130
3131    /**
3132     * @param value {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
3133     */
3134    public ActivityDefinition setProduct(DataType value) { 
3135      if (value != null && !(value instanceof Reference || value instanceof CodeableConcept))
3136        throw new Error("Not the right type for ActivityDefinition.product[x]: "+value.fhirType());
3137      this.product = value;
3138      return this;
3139    }
3140
3141    /**
3142     * @return {@link #quantity} (Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).)
3143     */
3144    public Quantity getQuantity() { 
3145      if (this.quantity == null)
3146        if (Configuration.errorOnAutoCreate())
3147          throw new Error("Attempt to auto-create ActivityDefinition.quantity");
3148        else if (Configuration.doAutoCreate())
3149          this.quantity = new Quantity(); // cc
3150      return this.quantity;
3151    }
3152
3153    public boolean hasQuantity() { 
3154      return this.quantity != null && !this.quantity.isEmpty();
3155    }
3156
3157    /**
3158     * @param value {@link #quantity} (Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).)
3159     */
3160    public ActivityDefinition setQuantity(Quantity value) { 
3161      this.quantity = value;
3162      return this;
3163    }
3164
3165    /**
3166     * @return {@link #dosage} (Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.)
3167     */
3168    public List<Dosage> getDosage() { 
3169      if (this.dosage == null)
3170        this.dosage = new ArrayList<Dosage>();
3171      return this.dosage;
3172    }
3173
3174    /**
3175     * @return Returns a reference to <code>this</code> for easy method chaining
3176     */
3177    public ActivityDefinition setDosage(List<Dosage> theDosage) { 
3178      this.dosage = theDosage;
3179      return this;
3180    }
3181
3182    public boolean hasDosage() { 
3183      if (this.dosage == null)
3184        return false;
3185      for (Dosage item : this.dosage)
3186        if (!item.isEmpty())
3187          return true;
3188      return false;
3189    }
3190
3191    public Dosage addDosage() { //3
3192      Dosage t = new Dosage();
3193      if (this.dosage == null)
3194        this.dosage = new ArrayList<Dosage>();
3195      this.dosage.add(t);
3196      return t;
3197    }
3198
3199    public ActivityDefinition addDosage(Dosage t) { //3
3200      if (t == null)
3201        return this;
3202      if (this.dosage == null)
3203        this.dosage = new ArrayList<Dosage>();
3204      this.dosage.add(t);
3205      return this;
3206    }
3207
3208    /**
3209     * @return The first repetition of repeating field {@link #dosage}, creating it if it does not already exist {3}
3210     */
3211    public Dosage getDosageFirstRep() { 
3212      if (getDosage().isEmpty()) {
3213        addDosage();
3214      }
3215      return getDosage().get(0);
3216    }
3217
3218    /**
3219     * @return {@link #bodySite} (Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).)
3220     */
3221    public List<CodeableConcept> getBodySite() { 
3222      if (this.bodySite == null)
3223        this.bodySite = new ArrayList<CodeableConcept>();
3224      return this.bodySite;
3225    }
3226
3227    /**
3228     * @return Returns a reference to <code>this</code> for easy method chaining
3229     */
3230    public ActivityDefinition setBodySite(List<CodeableConcept> theBodySite) { 
3231      this.bodySite = theBodySite;
3232      return this;
3233    }
3234
3235    public boolean hasBodySite() { 
3236      if (this.bodySite == null)
3237        return false;
3238      for (CodeableConcept item : this.bodySite)
3239        if (!item.isEmpty())
3240          return true;
3241      return false;
3242    }
3243
3244    public CodeableConcept addBodySite() { //3
3245      CodeableConcept t = new CodeableConcept();
3246      if (this.bodySite == null)
3247        this.bodySite = new ArrayList<CodeableConcept>();
3248      this.bodySite.add(t);
3249      return t;
3250    }
3251
3252    public ActivityDefinition addBodySite(CodeableConcept t) { //3
3253      if (t == null)
3254        return this;
3255      if (this.bodySite == null)
3256        this.bodySite = new ArrayList<CodeableConcept>();
3257      this.bodySite.add(t);
3258      return this;
3259    }
3260
3261    /**
3262     * @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist {3}
3263     */
3264    public CodeableConcept getBodySiteFirstRep() { 
3265      if (getBodySite().isEmpty()) {
3266        addBodySite();
3267      }
3268      return getBodySite().get(0);
3269    }
3270
3271    /**
3272     * @return {@link #specimenRequirement} (Defines specimen requirements for the action to be performed, such as required specimens for a lab test.)
3273     */
3274    public List<Reference> getSpecimenRequirement() { 
3275      if (this.specimenRequirement == null)
3276        this.specimenRequirement = new ArrayList<Reference>();
3277      return this.specimenRequirement;
3278    }
3279
3280    /**
3281     * @return Returns a reference to <code>this</code> for easy method chaining
3282     */
3283    public ActivityDefinition setSpecimenRequirement(List<Reference> theSpecimenRequirement) { 
3284      this.specimenRequirement = theSpecimenRequirement;
3285      return this;
3286    }
3287
3288    public boolean hasSpecimenRequirement() { 
3289      if (this.specimenRequirement == null)
3290        return false;
3291      for (Reference item : this.specimenRequirement)
3292        if (!item.isEmpty())
3293          return true;
3294      return false;
3295    }
3296
3297    public Reference addSpecimenRequirement() { //3
3298      Reference t = new Reference();
3299      if (this.specimenRequirement == null)
3300        this.specimenRequirement = new ArrayList<Reference>();
3301      this.specimenRequirement.add(t);
3302      return t;
3303    }
3304
3305    public ActivityDefinition addSpecimenRequirement(Reference t) { //3
3306      if (t == null)
3307        return this;
3308      if (this.specimenRequirement == null)
3309        this.specimenRequirement = new ArrayList<Reference>();
3310      this.specimenRequirement.add(t);
3311      return this;
3312    }
3313
3314    /**
3315     * @return The first repetition of repeating field {@link #specimenRequirement}, creating it if it does not already exist {3}
3316     */
3317    public Reference getSpecimenRequirementFirstRep() { 
3318      if (getSpecimenRequirement().isEmpty()) {
3319        addSpecimenRequirement();
3320      }
3321      return getSpecimenRequirement().get(0);
3322    }
3323
3324    /**
3325     * @return {@link #observationRequirement} (Defines observation requirements for the action to be performed, such as body weight or surface area.)
3326     */
3327    public List<Reference> getObservationRequirement() { 
3328      if (this.observationRequirement == null)
3329        this.observationRequirement = new ArrayList<Reference>();
3330      return this.observationRequirement;
3331    }
3332
3333    /**
3334     * @return Returns a reference to <code>this</code> for easy method chaining
3335     */
3336    public ActivityDefinition setObservationRequirement(List<Reference> theObservationRequirement) { 
3337      this.observationRequirement = theObservationRequirement;
3338      return this;
3339    }
3340
3341    public boolean hasObservationRequirement() { 
3342      if (this.observationRequirement == null)
3343        return false;
3344      for (Reference item : this.observationRequirement)
3345        if (!item.isEmpty())
3346          return true;
3347      return false;
3348    }
3349
3350    public Reference addObservationRequirement() { //3
3351      Reference t = new Reference();
3352      if (this.observationRequirement == null)
3353        this.observationRequirement = new ArrayList<Reference>();
3354      this.observationRequirement.add(t);
3355      return t;
3356    }
3357
3358    public ActivityDefinition addObservationRequirement(Reference t) { //3
3359      if (t == null)
3360        return this;
3361      if (this.observationRequirement == null)
3362        this.observationRequirement = new ArrayList<Reference>();
3363      this.observationRequirement.add(t);
3364      return this;
3365    }
3366
3367    /**
3368     * @return The first repetition of repeating field {@link #observationRequirement}, creating it if it does not already exist {3}
3369     */
3370    public Reference getObservationRequirementFirstRep() { 
3371      if (getObservationRequirement().isEmpty()) {
3372        addObservationRequirement();
3373      }
3374      return getObservationRequirement().get(0);
3375    }
3376
3377    /**
3378     * @return {@link #observationResultRequirement} (Defines the observations that are expected to be produced by the action.)
3379     */
3380    public List<Reference> getObservationResultRequirement() { 
3381      if (this.observationResultRequirement == null)
3382        this.observationResultRequirement = new ArrayList<Reference>();
3383      return this.observationResultRequirement;
3384    }
3385
3386    /**
3387     * @return Returns a reference to <code>this</code> for easy method chaining
3388     */
3389    public ActivityDefinition setObservationResultRequirement(List<Reference> theObservationResultRequirement) { 
3390      this.observationResultRequirement = theObservationResultRequirement;
3391      return this;
3392    }
3393
3394    public boolean hasObservationResultRequirement() { 
3395      if (this.observationResultRequirement == null)
3396        return false;
3397      for (Reference item : this.observationResultRequirement)
3398        if (!item.isEmpty())
3399          return true;
3400      return false;
3401    }
3402
3403    public Reference addObservationResultRequirement() { //3
3404      Reference t = new Reference();
3405      if (this.observationResultRequirement == null)
3406        this.observationResultRequirement = new ArrayList<Reference>();
3407      this.observationResultRequirement.add(t);
3408      return t;
3409    }
3410
3411    public ActivityDefinition addObservationResultRequirement(Reference t) { //3
3412      if (t == null)
3413        return this;
3414      if (this.observationResultRequirement == null)
3415        this.observationResultRequirement = new ArrayList<Reference>();
3416      this.observationResultRequirement.add(t);
3417      return this;
3418    }
3419
3420    /**
3421     * @return The first repetition of repeating field {@link #observationResultRequirement}, creating it if it does not already exist {3}
3422     */
3423    public Reference getObservationResultRequirementFirstRep() { 
3424      if (getObservationResultRequirement().isEmpty()) {
3425        addObservationResultRequirement();
3426      }
3427      return getObservationResultRequirement().get(0);
3428    }
3429
3430    /**
3431     * @return {@link #transform} (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.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value
3432     */
3433    public CanonicalType getTransformElement() { 
3434      if (this.transform == null)
3435        if (Configuration.errorOnAutoCreate())
3436          throw new Error("Attempt to auto-create ActivityDefinition.transform");
3437        else if (Configuration.doAutoCreate())
3438          this.transform = new CanonicalType(); // bb
3439      return this.transform;
3440    }
3441
3442    public boolean hasTransformElement() { 
3443      return this.transform != null && !this.transform.isEmpty();
3444    }
3445
3446    public boolean hasTransform() { 
3447      return this.transform != null && !this.transform.isEmpty();
3448    }
3449
3450    /**
3451     * @param value {@link #transform} (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.). This is the underlying object with id, value and extensions. The accessor "getTransform" gives direct access to the value
3452     */
3453    public ActivityDefinition setTransformElement(CanonicalType value) { 
3454      this.transform = value;
3455      return this;
3456    }
3457
3458    /**
3459     * @return 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.
3460     */
3461    public String getTransform() { 
3462      return this.transform == null ? null : this.transform.getValue();
3463    }
3464
3465    /**
3466     * @param value 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.
3467     */
3468    public ActivityDefinition setTransform(String value) { 
3469      if (Utilities.noString(value))
3470        this.transform = null;
3471      else {
3472        if (this.transform == null)
3473          this.transform = new CanonicalType();
3474        this.transform.setValue(value);
3475      }
3476      return this;
3477    }
3478
3479    /**
3480     * @return {@link #dynamicValue} (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.)
3481     */
3482    public List<ActivityDefinitionDynamicValueComponent> getDynamicValue() { 
3483      if (this.dynamicValue == null)
3484        this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
3485      return this.dynamicValue;
3486    }
3487
3488    /**
3489     * @return Returns a reference to <code>this</code> for easy method chaining
3490     */
3491    public ActivityDefinition setDynamicValue(List<ActivityDefinitionDynamicValueComponent> theDynamicValue) { 
3492      this.dynamicValue = theDynamicValue;
3493      return this;
3494    }
3495
3496    public boolean hasDynamicValue() { 
3497      if (this.dynamicValue == null)
3498        return false;
3499      for (ActivityDefinitionDynamicValueComponent item : this.dynamicValue)
3500        if (!item.isEmpty())
3501          return true;
3502      return false;
3503    }
3504
3505    public ActivityDefinitionDynamicValueComponent addDynamicValue() { //3
3506      ActivityDefinitionDynamicValueComponent t = new ActivityDefinitionDynamicValueComponent();
3507      if (this.dynamicValue == null)
3508        this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
3509      this.dynamicValue.add(t);
3510      return t;
3511    }
3512
3513    public ActivityDefinition addDynamicValue(ActivityDefinitionDynamicValueComponent t) { //3
3514      if (t == null)
3515        return this;
3516      if (this.dynamicValue == null)
3517        this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
3518      this.dynamicValue.add(t);
3519      return this;
3520    }
3521
3522    /**
3523     * @return The first repetition of repeating field {@link #dynamicValue}, creating it if it does not already exist {3}
3524     */
3525    public ActivityDefinitionDynamicValueComponent getDynamicValueFirstRep() { 
3526      if (getDynamicValue().isEmpty()) {
3527        addDynamicValue();
3528      }
3529      return getDynamicValue().get(0);
3530    }
3531
3532      protected void listChildren(List<Property> children) {
3533        super.listChildren(children);
3534        children.add(new Property("url", "uri", "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.", 0, 1, url));
3535        children.add(new Property("identifier", "Identifier", "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.", 0, java.lang.Integer.MAX_VALUE, identifier));
3536        children.add(new Property("version", "string", "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.", 0, 1, version));
3537        children.add(new Property("name", "string", "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.", 0, 1, name));
3538        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the activity definition.", 0, 1, title));
3539        children.add(new Property("subtitle", "string", "An explanatory or alternate title for the activity definition giving additional information about its content.", 0, 1, subtitle));
3540        children.add(new Property("status", "code", "The status of this activity definition. Enables tracking the life-cycle of the content.", 0, 1, status));
3541        children.add(new Property("experimental", "boolean", "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.", 0, 1, experimental));
3542        children.add(new Property("subject[x]", "CodeableConcept|Reference(Group)|canonical", "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.", 0, 1, subject));
3543        children.add(new Property("date", "dateTime", "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.", 0, 1, date));
3544        children.add(new Property("publisher", "string", "The name of the organization or individual that published the activity definition.", 0, 1, publisher));
3545        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
3546        children.add(new Property("description", "markdown", "A free text natural language description of the activity definition from a consumer's perspective.", 0, 1, description));
3547        children.add(new Property("useContext", "UsageContext", "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.", 0, java.lang.Integer.MAX_VALUE, useContext));
3548        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the activity definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
3549        children.add(new Property("purpose", "markdown", "Explanation of why this activity definition is needed and why it has been designed as it has.", 0, 1, purpose));
3550        children.add(new Property("usage", "string", "A detailed description of how the activity definition is used from a clinical perspective.", 0, 1, usage));
3551        children.add(new Property("copyright", "markdown", "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.", 0, 1, copyright));
3552        children.add(new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
3553        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate));
3554        children.add(new Property("effectivePeriod", "Period", "The period during which the activity definition content was or is planned to be in active use.", 0, 1, effectivePeriod));
3555        children.add(new Property("topic", "CodeableConcept", "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.", 0, java.lang.Integer.MAX_VALUE, topic));
3556        children.add(new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author));
3557        children.add(new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor));
3558        children.add(new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer));
3559        children.add(new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser));
3560        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
3561        children.add(new Property("library", "canonical(Library)", "A reference to a Library resource containing any formal logic used by the activity definition.", 0, java.lang.Integer.MAX_VALUE, library));
3562        children.add(new Property("kind", "code", "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.", 0, 1, kind));
3563        children.add(new Property("profile", "canonical(StructureDefinition)", "A profile to which the target of the activity definition is expected to conform.", 0, 1, profile));
3564        children.add(new Property("code", "CodeableConcept", "Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.", 0, 1, code));
3565        children.add(new Property("intent", "code", "Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.", 0, 1, intent));
3566        children.add(new Property("priority", "code", "Indicates how quickly the activity  should be addressed with respect to other requests.", 0, 1, priority));
3567        children.add(new Property("doNotPerform", "boolean", "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.", 0, 1, doNotPerform));
3568        children.add(new Property("timing[x]", "Timing|Age|Range|Duration", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing));
3569        children.add(new Property("location", "CodeableReference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, location));
3570        children.add(new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant));
3571        children.add(new Property("product[x]", "Reference(Medication|Substance|Ingredient)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product));
3572        children.add(new Property("quantity", "Quantity", "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).", 0, 1, quantity));
3573        children.add(new Property("dosage", "Dosage", "Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.", 0, java.lang.Integer.MAX_VALUE, dosage));
3574        children.add(new Property("bodySite", "CodeableConcept", "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", 0, java.lang.Integer.MAX_VALUE, bodySite));
3575        children.add(new Property("specimenRequirement", "Reference(SpecimenDefinition)", "Defines specimen requirements for the action to be performed, such as required specimens for a lab test.", 0, java.lang.Integer.MAX_VALUE, specimenRequirement));
3576        children.add(new Property("observationRequirement", "Reference(ObservationDefinition)", "Defines observation requirements for the action to be performed, such as body weight or surface area.", 0, java.lang.Integer.MAX_VALUE, observationRequirement));
3577        children.add(new Property("observationResultRequirement", "Reference(ObservationDefinition)", "Defines the observations that are expected to be produced by the action.", 0, java.lang.Integer.MAX_VALUE, observationResultRequirement));
3578        children.add(new Property("transform", "canonical(StructureMap)", "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.", 0, 1, transform));
3579        children.add(new Property("dynamicValue", "", "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.", 0, java.lang.Integer.MAX_VALUE, dynamicValue));
3580      }
3581
3582      @Override
3583      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3584        switch (_hash) {
3585        case 116079: /*url*/  return new Property("url", "uri", "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.", 0, 1, url);
3586        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "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.", 0, java.lang.Integer.MAX_VALUE, identifier);
3587        case 351608024: /*version*/  return new Property("version", "string", "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.", 0, 1, version);
3588        case 3373707: /*name*/  return new Property("name", "string", "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.", 0, 1, name);
3589        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the activity definition.", 0, 1, title);
3590        case -2060497896: /*subtitle*/  return new Property("subtitle", "string", "An explanatory or alternate title for the activity definition giving additional information about its content.", 0, 1, subtitle);
3591        case -892481550: /*status*/  return new Property("status", "code", "The status of this activity definition. Enables tracking the life-cycle of the content.", 0, 1, status);
3592        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "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.", 0, 1, experimental);
3593        case -573640748: /*subject[x]*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)|canonical", "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.", 0, 1, subject);
3594        case -1867885268: /*subject*/  return new Property("subject[x]", "CodeableConcept|Reference(Group)|canonical", "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.", 0, 1, subject);
3595        case -1257122603: /*subjectCodeableConcept*/  return new Property("subject[x]", "CodeableConcept", "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.", 0, 1, subject);
3596        case 772938623: /*subjectReference*/  return new Property("subject[x]", "Reference(Group)", "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.", 0, 1, subject);
3597        case -1768521432: /*subjectCanonical*/  return new Property("subject[x]", "canonical", "A code, group definition, or canonical reference that describes  or identifies the intended subject of the activity being defined.  Canonical references are allowed to support the definition of protocols for drug and substance quality specifications, and is allowed to reference a MedicinalProductDefinition, SubstanceDefinition, AdministrableProductDefinition, ManufacturedItemDefinition, or PackagedProductDefinition resource.", 0, 1, subject);
3598        case 3076014: /*date*/  return new Property("date", "dateTime", "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.", 0, 1, date);
3599        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the activity definition.", 0, 1, publisher);
3600        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
3601        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the activity definition from a consumer's perspective.", 0, 1, description);
3602        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "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.", 0, java.lang.Integer.MAX_VALUE, useContext);
3603        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the activity definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
3604        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this activity definition is needed and why it has been designed as it has.", 0, 1, purpose);
3605        case 111574433: /*usage*/  return new Property("usage", "string", "A detailed description of how the activity definition is used from a clinical perspective.", 0, 1, usage);
3606        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "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.", 0, 1, copyright);
3607        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
3608        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.", 0, 1, lastReviewDate);
3609        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the activity definition content was or is planned to be in active use.", 0, 1, effectivePeriod);
3610        case 110546223: /*topic*/  return new Property("topic", "CodeableConcept", "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.", 0, java.lang.Integer.MAX_VALUE, topic);
3611        case -1406328437: /*author*/  return new Property("author", "ContactDetail", "An individiual or organization primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author);
3612        case -1307827859: /*editor*/  return new Property("editor", "ContactDetail", "An individual or organization primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor);
3613        case -261190139: /*reviewer*/  return new Property("reviewer", "ContactDetail", "An individual or organization primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer);
3614        case 1740277666: /*endorser*/  return new Property("endorser", "ContactDetail", "An individual or organization responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser);
3615        case 666807069: /*relatedArtifact*/  return new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact);
3616        case 166208699: /*library*/  return new Property("library", "canonical(Library)", "A reference to a Library resource containing any formal logic used by the activity definition.", 0, java.lang.Integer.MAX_VALUE, library);
3617        case 3292052: /*kind*/  return new Property("kind", "code", "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.", 0, 1, kind);
3618        case -309425751: /*profile*/  return new Property("profile", "canonical(StructureDefinition)", "A profile to which the target of the activity definition is expected to conform.", 0, 1, profile);
3619        case 3059181: /*code*/  return new Property("code", "CodeableConcept", "Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.", 0, 1, code);
3620        case -1183762788: /*intent*/  return new Property("intent", "code", "Indicates the level of authority/intentionality associated with the activity and where the request should fit into the workflow chain.", 0, 1, intent);
3621        case -1165461084: /*priority*/  return new Property("priority", "code", "Indicates how quickly the activity  should be addressed with respect to other requests.", 0, 1, priority);
3622        case -1788508167: /*doNotPerform*/  return new Property("doNotPerform", "boolean", "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.", 0, 1, doNotPerform);
3623        case 164632566: /*timing[x]*/  return new Property("timing[x]", "Timing|Age|Range|Duration", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing);
3624        case -873664438: /*timing*/  return new Property("timing[x]", "Timing|Age|Range|Duration", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing);
3625        case -497554124: /*timingTiming*/  return new Property("timing[x]", "Timing", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing);
3626        case 164607061: /*timingAge*/  return new Property("timing[x]", "Age", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing);
3627        case -710871277: /*timingRange*/  return new Property("timing[x]", "Range", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing);
3628        case -1327253506: /*timingDuration*/  return new Property("timing[x]", "Duration", "The timing or frequency upon which the described activity is to occur.", 0, 1, timing);
3629        case 1901043637: /*location*/  return new Property("location", "CodeableReference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, location);
3630        case 767422259: /*participant*/  return new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant);
3631        case 1753005361: /*product[x]*/  return new Property("product[x]", "Reference(Medication|Substance|Ingredient)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
3632        case -309474065: /*product*/  return new Property("product[x]", "Reference(Medication|Substance|Ingredient)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
3633        case -669667556: /*productReference*/  return new Property("product[x]", "Reference(Medication|Substance|Ingredient)", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
3634        case 906854066: /*productCodeableConcept*/  return new Property("product[x]", "CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
3635        case -1285004149: /*quantity*/  return new Property("quantity", "Quantity", "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).", 0, 1, quantity);
3636        case -1326018889: /*dosage*/  return new Property("dosage", "Dosage", "Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.", 0, java.lang.Integer.MAX_VALUE, dosage);
3637        case 1702620169: /*bodySite*/  return new Property("bodySite", "CodeableConcept", "Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).", 0, java.lang.Integer.MAX_VALUE, bodySite);
3638        case 1498467355: /*specimenRequirement*/  return new Property("specimenRequirement", "Reference(SpecimenDefinition)", "Defines specimen requirements for the action to be performed, such as required specimens for a lab test.", 0, java.lang.Integer.MAX_VALUE, specimenRequirement);
3639        case 362354807: /*observationRequirement*/  return new Property("observationRequirement", "Reference(ObservationDefinition)", "Defines observation requirements for the action to be performed, such as body weight or surface area.", 0, java.lang.Integer.MAX_VALUE, observationRequirement);
3640        case 395230490: /*observationResultRequirement*/  return new Property("observationResultRequirement", "Reference(ObservationDefinition)", "Defines the observations that are expected to be produced by the action.", 0, java.lang.Integer.MAX_VALUE, observationResultRequirement);
3641        case 1052666732: /*transform*/  return new Property("transform", "canonical(StructureMap)", "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.", 0, 1, transform);
3642        case 572625010: /*dynamicValue*/  return new Property("dynamicValue", "", "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.", 0, java.lang.Integer.MAX_VALUE, dynamicValue);
3643        default: return super.getNamedProperty(_hash, _name, _checkValid);
3644        }
3645
3646      }
3647
3648      @Override
3649      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3650        switch (hash) {
3651        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3652        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
3653        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3654        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3655        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3656        case -2060497896: /*subtitle*/ return this.subtitle == null ? new Base[0] : new Base[] {this.subtitle}; // StringType
3657        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3658        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3659        case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // DataType
3660        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3661        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3662        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3663        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3664        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3665        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3666        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
3667        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
3668        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
3669        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
3670        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
3671        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
3672        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
3673        case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail
3674        case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail
3675        case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail
3676        case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail
3677        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
3678        case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // CanonicalType
3679        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<RequestResourceType>
3680        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // CanonicalType
3681        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
3682        case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<RequestIntent>
3683        case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority>
3684        case -1788508167: /*doNotPerform*/ return this.doNotPerform == null ? new Base[0] : new Base[] {this.doNotPerform}; // BooleanType
3685        case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // DataType
3686        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // CodeableReference
3687        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // ActivityDefinitionParticipantComponent
3688        case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // DataType
3689        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity
3690        case -1326018889: /*dosage*/ return this.dosage == null ? new Base[0] : this.dosage.toArray(new Base[this.dosage.size()]); // Dosage
3691        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // CodeableConcept
3692        case 1498467355: /*specimenRequirement*/ return this.specimenRequirement == null ? new Base[0] : this.specimenRequirement.toArray(new Base[this.specimenRequirement.size()]); // Reference
3693        case 362354807: /*observationRequirement*/ return this.observationRequirement == null ? new Base[0] : this.observationRequirement.toArray(new Base[this.observationRequirement.size()]); // Reference
3694        case 395230490: /*observationResultRequirement*/ return this.observationResultRequirement == null ? new Base[0] : this.observationResultRequirement.toArray(new Base[this.observationResultRequirement.size()]); // Reference
3695        case 1052666732: /*transform*/ return this.transform == null ? new Base[0] : new Base[] {this.transform}; // CanonicalType
3696        case 572625010: /*dynamicValue*/ return this.dynamicValue == null ? new Base[0] : this.dynamicValue.toArray(new Base[this.dynamicValue.size()]); // ActivityDefinitionDynamicValueComponent
3697        default: return super.getProperty(hash, name, checkValid);
3698        }
3699
3700      }
3701
3702      @Override
3703      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3704        switch (hash) {
3705        case 116079: // url
3706          this.url = TypeConvertor.castToUri(value); // UriType
3707          return value;
3708        case -1618432855: // identifier
3709          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
3710          return value;
3711        case 351608024: // version
3712          this.version = TypeConvertor.castToString(value); // StringType
3713          return value;
3714        case 3373707: // name
3715          this.name = TypeConvertor.castToString(value); // StringType
3716          return value;
3717        case 110371416: // title
3718          this.title = TypeConvertor.castToString(value); // StringType
3719          return value;
3720        case -2060497896: // subtitle
3721          this.subtitle = TypeConvertor.castToString(value); // StringType
3722          return value;
3723        case -892481550: // status
3724          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3725          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3726          return value;
3727        case -404562712: // experimental
3728          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3729          return value;
3730        case -1867885268: // subject
3731          this.subject = TypeConvertor.castToType(value); // DataType
3732          return value;
3733        case 3076014: // date
3734          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3735          return value;
3736        case 1447404028: // publisher
3737          this.publisher = TypeConvertor.castToString(value); // StringType
3738          return value;
3739        case 951526432: // contact
3740          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3741          return value;
3742        case -1724546052: // description
3743          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3744          return value;
3745        case -669707736: // useContext
3746          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
3747          return value;
3748        case -507075711: // jurisdiction
3749          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3750          return value;
3751        case -220463842: // purpose
3752          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
3753          return value;
3754        case 111574433: // usage
3755          this.usage = TypeConvertor.castToString(value); // StringType
3756          return value;
3757        case 1522889671: // copyright
3758          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
3759          return value;
3760        case 223539345: // approvalDate
3761          this.approvalDate = TypeConvertor.castToDate(value); // DateType
3762          return value;
3763        case -1687512484: // lastReviewDate
3764          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
3765          return value;
3766        case -403934648: // effectivePeriod
3767          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
3768          return value;
3769        case 110546223: // topic
3770          this.getTopic().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3771          return value;
3772        case -1406328437: // author
3773          this.getAuthor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3774          return value;
3775        case -1307827859: // editor
3776          this.getEditor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3777          return value;
3778        case -261190139: // reviewer
3779          this.getReviewer().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3780          return value;
3781        case 1740277666: // endorser
3782          this.getEndorser().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
3783          return value;
3784        case 666807069: // relatedArtifact
3785          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact
3786          return value;
3787        case 166208699: // library
3788          this.getLibrary().add(TypeConvertor.castToCanonical(value)); // CanonicalType
3789          return value;
3790        case 3292052: // kind
3791          value = new RequestResourceTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
3792          this.kind = (Enumeration) value; // Enumeration<RequestResourceType>
3793          return value;
3794        case -309425751: // profile
3795          this.profile = TypeConvertor.castToCanonical(value); // CanonicalType
3796          return value;
3797        case 3059181: // code
3798          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3799          return value;
3800        case -1183762788: // intent
3801          value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
3802          this.intent = (Enumeration) value; // Enumeration<RequestIntent>
3803          return value;
3804        case -1165461084: // priority
3805          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
3806          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
3807          return value;
3808        case -1788508167: // doNotPerform
3809          this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType
3810          return value;
3811        case -873664438: // timing
3812          this.timing = TypeConvertor.castToType(value); // DataType
3813          return value;
3814        case 1901043637: // location
3815          this.location = TypeConvertor.castToCodeableReference(value); // CodeableReference
3816          return value;
3817        case 767422259: // participant
3818          this.getParticipant().add((ActivityDefinitionParticipantComponent) value); // ActivityDefinitionParticipantComponent
3819          return value;
3820        case -309474065: // product
3821          this.product = TypeConvertor.castToType(value); // DataType
3822          return value;
3823        case -1285004149: // quantity
3824          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
3825          return value;
3826        case -1326018889: // dosage
3827          this.getDosage().add(TypeConvertor.castToDosage(value)); // Dosage
3828          return value;
3829        case 1702620169: // bodySite
3830          this.getBodySite().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
3831          return value;
3832        case 1498467355: // specimenRequirement
3833          this.getSpecimenRequirement().add(TypeConvertor.castToReference(value)); // Reference
3834          return value;
3835        case 362354807: // observationRequirement
3836          this.getObservationRequirement().add(TypeConvertor.castToReference(value)); // Reference
3837          return value;
3838        case 395230490: // observationResultRequirement
3839          this.getObservationResultRequirement().add(TypeConvertor.castToReference(value)); // Reference
3840          return value;
3841        case 1052666732: // transform
3842          this.transform = TypeConvertor.castToCanonical(value); // CanonicalType
3843          return value;
3844        case 572625010: // dynamicValue
3845          this.getDynamicValue().add((ActivityDefinitionDynamicValueComponent) value); // ActivityDefinitionDynamicValueComponent
3846          return value;
3847        default: return super.setProperty(hash, name, value);
3848        }
3849
3850      }
3851
3852      @Override
3853      public Base setProperty(String name, Base value) throws FHIRException {
3854        if (name.equals("url")) {
3855          this.url = TypeConvertor.castToUri(value); // UriType
3856        } else if (name.equals("identifier")) {
3857          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
3858        } else if (name.equals("version")) {
3859          this.version = TypeConvertor.castToString(value); // StringType
3860        } else if (name.equals("name")) {
3861          this.name = TypeConvertor.castToString(value); // StringType
3862        } else if (name.equals("title")) {
3863          this.title = TypeConvertor.castToString(value); // StringType
3864        } else if (name.equals("subtitle")) {
3865          this.subtitle = TypeConvertor.castToString(value); // StringType
3866        } else if (name.equals("status")) {
3867          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
3868          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3869        } else if (name.equals("experimental")) {
3870          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
3871        } else if (name.equals("subject[x]")) {
3872          this.subject = TypeConvertor.castToType(value); // DataType
3873        } else if (name.equals("date")) {
3874          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
3875        } else if (name.equals("publisher")) {
3876          this.publisher = TypeConvertor.castToString(value); // StringType
3877        } else if (name.equals("contact")) {
3878          this.getContact().add(TypeConvertor.castToContactDetail(value));
3879        } else if (name.equals("description")) {
3880          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3881        } else if (name.equals("useContext")) {
3882          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
3883        } else if (name.equals("jurisdiction")) {
3884          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
3885        } else if (name.equals("purpose")) {
3886          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
3887        } else if (name.equals("usage")) {
3888          this.usage = TypeConvertor.castToString(value); // StringType
3889        } else if (name.equals("copyright")) {
3890          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
3891        } else if (name.equals("approvalDate")) {
3892          this.approvalDate = TypeConvertor.castToDate(value); // DateType
3893        } else if (name.equals("lastReviewDate")) {
3894          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
3895        } else if (name.equals("effectivePeriod")) {
3896          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
3897        } else if (name.equals("topic")) {
3898          this.getTopic().add(TypeConvertor.castToCodeableConcept(value));
3899        } else if (name.equals("author")) {
3900          this.getAuthor().add(TypeConvertor.castToContactDetail(value));
3901        } else if (name.equals("editor")) {
3902          this.getEditor().add(TypeConvertor.castToContactDetail(value));
3903        } else if (name.equals("reviewer")) {
3904          this.getReviewer().add(TypeConvertor.castToContactDetail(value));
3905        } else if (name.equals("endorser")) {
3906          this.getEndorser().add(TypeConvertor.castToContactDetail(value));
3907        } else if (name.equals("relatedArtifact")) {
3908          this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value));
3909        } else if (name.equals("library")) {
3910          this.getLibrary().add(TypeConvertor.castToCanonical(value));
3911        } else if (name.equals("kind")) {
3912          value = new RequestResourceTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
3913          this.kind = (Enumeration) value; // Enumeration<RequestResourceType>
3914        } else if (name.equals("profile")) {
3915          this.profile = TypeConvertor.castToCanonical(value); // CanonicalType
3916        } else if (name.equals("code")) {
3917          this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
3918        } else if (name.equals("intent")) {
3919          value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value));
3920          this.intent = (Enumeration) value; // Enumeration<RequestIntent>
3921        } else if (name.equals("priority")) {
3922          value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value));
3923          this.priority = (Enumeration) value; // Enumeration<RequestPriority>
3924        } else if (name.equals("doNotPerform")) {
3925          this.doNotPerform = TypeConvertor.castToBoolean(value); // BooleanType
3926        } else if (name.equals("timing[x]")) {
3927          this.timing = TypeConvertor.castToType(value); // DataType
3928        } else if (name.equals("location")) {
3929          this.location = TypeConvertor.castToCodeableReference(value); // CodeableReference
3930        } else if (name.equals("participant")) {
3931          this.getParticipant().add((ActivityDefinitionParticipantComponent) value);
3932        } else if (name.equals("product[x]")) {
3933          this.product = TypeConvertor.castToType(value); // DataType
3934        } else if (name.equals("quantity")) {
3935          this.quantity = TypeConvertor.castToQuantity(value); // Quantity
3936        } else if (name.equals("dosage")) {
3937          this.getDosage().add(TypeConvertor.castToDosage(value));
3938        } else if (name.equals("bodySite")) {
3939          this.getBodySite().add(TypeConvertor.castToCodeableConcept(value));
3940        } else if (name.equals("specimenRequirement")) {
3941          this.getSpecimenRequirement().add(TypeConvertor.castToReference(value));
3942        } else if (name.equals("observationRequirement")) {
3943          this.getObservationRequirement().add(TypeConvertor.castToReference(value));
3944        } else if (name.equals("observationResultRequirement")) {
3945          this.getObservationResultRequirement().add(TypeConvertor.castToReference(value));
3946        } else if (name.equals("transform")) {
3947          this.transform = TypeConvertor.castToCanonical(value); // CanonicalType
3948        } else if (name.equals("dynamicValue")) {
3949          this.getDynamicValue().add((ActivityDefinitionDynamicValueComponent) value);
3950        } else
3951          return super.setProperty(name, value);
3952        return value;
3953      }
3954
3955      @Override
3956      public Base makeProperty(int hash, String name) throws FHIRException {
3957        switch (hash) {
3958        case 116079:  return getUrlElement();
3959        case -1618432855:  return addIdentifier(); 
3960        case 351608024:  return getVersionElement();
3961        case 3373707:  return getNameElement();
3962        case 110371416:  return getTitleElement();
3963        case -2060497896:  return getSubtitleElement();
3964        case -892481550:  return getStatusElement();
3965        case -404562712:  return getExperimentalElement();
3966        case -573640748:  return getSubject();
3967        case -1867885268:  return getSubject();
3968        case 3076014:  return getDateElement();
3969        case 1447404028:  return getPublisherElement();
3970        case 951526432:  return addContact(); 
3971        case -1724546052:  return getDescriptionElement();
3972        case -669707736:  return addUseContext(); 
3973        case -507075711:  return addJurisdiction(); 
3974        case -220463842:  return getPurposeElement();
3975        case 111574433:  return getUsageElement();
3976        case 1522889671:  return getCopyrightElement();
3977        case 223539345:  return getApprovalDateElement();
3978        case -1687512484:  return getLastReviewDateElement();
3979        case -403934648:  return getEffectivePeriod();
3980        case 110546223:  return addTopic(); 
3981        case -1406328437:  return addAuthor(); 
3982        case -1307827859:  return addEditor(); 
3983        case -261190139:  return addReviewer(); 
3984        case 1740277666:  return addEndorser(); 
3985        case 666807069:  return addRelatedArtifact(); 
3986        case 166208699:  return addLibraryElement();
3987        case 3292052:  return getKindElement();
3988        case -309425751:  return getProfileElement();
3989        case 3059181:  return getCode();
3990        case -1183762788:  return getIntentElement();
3991        case -1165461084:  return getPriorityElement();
3992        case -1788508167:  return getDoNotPerformElement();
3993        case 164632566:  return getTiming();
3994        case -873664438:  return getTiming();
3995        case 1901043637:  return getLocation();
3996        case 767422259:  return addParticipant(); 
3997        case 1753005361:  return getProduct();
3998        case -309474065:  return getProduct();
3999        case -1285004149:  return getQuantity();
4000        case -1326018889:  return addDosage(); 
4001        case 1702620169:  return addBodySite(); 
4002        case 1498467355:  return addSpecimenRequirement(); 
4003        case 362354807:  return addObservationRequirement(); 
4004        case 395230490:  return addObservationResultRequirement(); 
4005        case 1052666732:  return getTransformElement();
4006        case 572625010:  return addDynamicValue(); 
4007        default: return super.makeProperty(hash, name);
4008        }
4009
4010      }
4011
4012      @Override
4013      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4014        switch (hash) {
4015        case 116079: /*url*/ return new String[] {"uri"};
4016        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
4017        case 351608024: /*version*/ return new String[] {"string"};
4018        case 3373707: /*name*/ return new String[] {"string"};
4019        case 110371416: /*title*/ return new String[] {"string"};
4020        case -2060497896: /*subtitle*/ return new String[] {"string"};
4021        case -892481550: /*status*/ return new String[] {"code"};
4022        case -404562712: /*experimental*/ return new String[] {"boolean"};
4023        case -1867885268: /*subject*/ return new String[] {"CodeableConcept", "Reference", "canonical"};
4024        case 3076014: /*date*/ return new String[] {"dateTime"};
4025        case 1447404028: /*publisher*/ return new String[] {"string"};
4026        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
4027        case -1724546052: /*description*/ return new String[] {"markdown"};
4028        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
4029        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
4030        case -220463842: /*purpose*/ return new String[] {"markdown"};
4031        case 111574433: /*usage*/ return new String[] {"string"};
4032        case 1522889671: /*copyright*/ return new String[] {"markdown"};
4033        case 223539345: /*approvalDate*/ return new String[] {"date"};
4034        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
4035        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
4036        case 110546223: /*topic*/ return new String[] {"CodeableConcept"};
4037        case -1406328437: /*author*/ return new String[] {"ContactDetail"};
4038        case -1307827859: /*editor*/ return new String[] {"ContactDetail"};
4039        case -261190139: /*reviewer*/ return new String[] {"ContactDetail"};
4040        case 1740277666: /*endorser*/ return new String[] {"ContactDetail"};
4041        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
4042        case 166208699: /*library*/ return new String[] {"canonical"};
4043        case 3292052: /*kind*/ return new String[] {"code"};
4044        case -309425751: /*profile*/ return new String[] {"canonical"};
4045        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
4046        case -1183762788: /*intent*/ return new String[] {"code"};
4047        case -1165461084: /*priority*/ return new String[] {"code"};
4048        case -1788508167: /*doNotPerform*/ return new String[] {"boolean"};
4049        case -873664438: /*timing*/ return new String[] {"Timing", "Age", "Range", "Duration"};
4050        case 1901043637: /*location*/ return new String[] {"CodeableReference"};
4051        case 767422259: /*participant*/ return new String[] {};
4052        case -309474065: /*product*/ return new String[] {"Reference", "CodeableConcept"};
4053        case -1285004149: /*quantity*/ return new String[] {"Quantity"};
4054        case -1326018889: /*dosage*/ return new String[] {"Dosage"};
4055        case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"};
4056        case 1498467355: /*specimenRequirement*/ return new String[] {"Reference"};
4057        case 362354807: /*observationRequirement*/ return new String[] {"Reference"};
4058        case 395230490: /*observationResultRequirement*/ return new String[] {"Reference"};
4059        case 1052666732: /*transform*/ return new String[] {"canonical"};
4060        case 572625010: /*dynamicValue*/ return new String[] {};
4061        default: return super.getTypesForProperty(hash, name);
4062        }
4063
4064      }
4065
4066      @Override
4067      public Base addChild(String name) throws FHIRException {
4068        if (name.equals("url")) {
4069          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.url");
4070        }
4071        else if (name.equals("identifier")) {
4072          return addIdentifier();
4073        }
4074        else if (name.equals("version")) {
4075          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.version");
4076        }
4077        else if (name.equals("name")) {
4078          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.name");
4079        }
4080        else if (name.equals("title")) {
4081          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.title");
4082        }
4083        else if (name.equals("subtitle")) {
4084          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.subtitle");
4085        }
4086        else if (name.equals("status")) {
4087          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.status");
4088        }
4089        else if (name.equals("experimental")) {
4090          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.experimental");
4091        }
4092        else if (name.equals("subjectCodeableConcept")) {
4093          this.subject = new CodeableConcept();
4094          return this.subject;
4095        }
4096        else if (name.equals("subjectReference")) {
4097          this.subject = new Reference();
4098          return this.subject;
4099        }
4100        else if (name.equals("subjectCanonical")) {
4101          this.subject = new CanonicalType();
4102          return this.subject;
4103        }
4104        else if (name.equals("date")) {
4105          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.date");
4106        }
4107        else if (name.equals("publisher")) {
4108          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.publisher");
4109        }
4110        else if (name.equals("contact")) {
4111          return addContact();
4112        }
4113        else if (name.equals("description")) {
4114          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.description");
4115        }
4116        else if (name.equals("useContext")) {
4117          return addUseContext();
4118        }
4119        else if (name.equals("jurisdiction")) {
4120          return addJurisdiction();
4121        }
4122        else if (name.equals("purpose")) {
4123          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.purpose");
4124        }
4125        else if (name.equals("usage")) {
4126          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.usage");
4127        }
4128        else if (name.equals("copyright")) {
4129          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.copyright");
4130        }
4131        else if (name.equals("approvalDate")) {
4132          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.approvalDate");
4133        }
4134        else if (name.equals("lastReviewDate")) {
4135          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.lastReviewDate");
4136        }
4137        else if (name.equals("effectivePeriod")) {
4138          this.effectivePeriod = new Period();
4139          return this.effectivePeriod;
4140        }
4141        else if (name.equals("topic")) {
4142          return addTopic();
4143        }
4144        else if (name.equals("author")) {
4145          return addAuthor();
4146        }
4147        else if (name.equals("editor")) {
4148          return addEditor();
4149        }
4150        else if (name.equals("reviewer")) {
4151          return addReviewer();
4152        }
4153        else if (name.equals("endorser")) {
4154          return addEndorser();
4155        }
4156        else if (name.equals("relatedArtifact")) {
4157          return addRelatedArtifact();
4158        }
4159        else if (name.equals("library")) {
4160          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.library");
4161        }
4162        else if (name.equals("kind")) {
4163          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.kind");
4164        }
4165        else if (name.equals("profile")) {
4166          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.profile");
4167        }
4168        else if (name.equals("code")) {
4169          this.code = new CodeableConcept();
4170          return this.code;
4171        }
4172        else if (name.equals("intent")) {
4173          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.intent");
4174        }
4175        else if (name.equals("priority")) {
4176          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.priority");
4177        }
4178        else if (name.equals("doNotPerform")) {
4179          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.doNotPerform");
4180        }
4181        else if (name.equals("timingTiming")) {
4182          this.timing = new Timing();
4183          return this.timing;
4184        }
4185        else if (name.equals("timingAge")) {
4186          this.timing = new Age();
4187          return this.timing;
4188        }
4189        else if (name.equals("timingRange")) {
4190          this.timing = new Range();
4191          return this.timing;
4192        }
4193        else if (name.equals("timingDuration")) {
4194          this.timing = new Duration();
4195          return this.timing;
4196        }
4197        else if (name.equals("location")) {
4198          this.location = new CodeableReference();
4199          return this.location;
4200        }
4201        else if (name.equals("participant")) {
4202          return addParticipant();
4203        }
4204        else if (name.equals("productReference")) {
4205          this.product = new Reference();
4206          return this.product;
4207        }
4208        else if (name.equals("productCodeableConcept")) {
4209          this.product = new CodeableConcept();
4210          return this.product;
4211        }
4212        else if (name.equals("quantity")) {
4213          this.quantity = new Quantity();
4214          return this.quantity;
4215        }
4216        else if (name.equals("dosage")) {
4217          return addDosage();
4218        }
4219        else if (name.equals("bodySite")) {
4220          return addBodySite();
4221        }
4222        else if (name.equals("specimenRequirement")) {
4223          return addSpecimenRequirement();
4224        }
4225        else if (name.equals("observationRequirement")) {
4226          return addObservationRequirement();
4227        }
4228        else if (name.equals("observationResultRequirement")) {
4229          return addObservationResultRequirement();
4230        }
4231        else if (name.equals("transform")) {
4232          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.transform");
4233        }
4234        else if (name.equals("dynamicValue")) {
4235          return addDynamicValue();
4236        }
4237        else
4238          return super.addChild(name);
4239      }
4240
4241  public String fhirType() {
4242    return "ActivityDefinition";
4243
4244  }
4245
4246      public ActivityDefinition copy() {
4247        ActivityDefinition dst = new ActivityDefinition();
4248        copyValues(dst);
4249        return dst;
4250      }
4251
4252      public void copyValues(ActivityDefinition dst) {
4253        super.copyValues(dst);
4254        dst.url = url == null ? null : url.copy();
4255        if (identifier != null) {
4256          dst.identifier = new ArrayList<Identifier>();
4257          for (Identifier i : identifier)
4258            dst.identifier.add(i.copy());
4259        };
4260        dst.version = version == null ? null : version.copy();
4261        dst.name = name == null ? null : name.copy();
4262        dst.title = title == null ? null : title.copy();
4263        dst.subtitle = subtitle == null ? null : subtitle.copy();
4264        dst.status = status == null ? null : status.copy();
4265        dst.experimental = experimental == null ? null : experimental.copy();
4266        dst.subject = subject == null ? null : subject.copy();
4267        dst.date = date == null ? null : date.copy();
4268        dst.publisher = publisher == null ? null : publisher.copy();
4269        if (contact != null) {
4270          dst.contact = new ArrayList<ContactDetail>();
4271          for (ContactDetail i : contact)
4272            dst.contact.add(i.copy());
4273        };
4274        dst.description = description == null ? null : description.copy();
4275        if (useContext != null) {
4276          dst.useContext = new ArrayList<UsageContext>();
4277          for (UsageContext i : useContext)
4278            dst.useContext.add(i.copy());
4279        };
4280        if (jurisdiction != null) {
4281          dst.jurisdiction = new ArrayList<CodeableConcept>();
4282          for (CodeableConcept i : jurisdiction)
4283            dst.jurisdiction.add(i.copy());
4284        };
4285        dst.purpose = purpose == null ? null : purpose.copy();
4286        dst.usage = usage == null ? null : usage.copy();
4287        dst.copyright = copyright == null ? null : copyright.copy();
4288        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
4289        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
4290        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
4291        if (topic != null) {
4292          dst.topic = new ArrayList<CodeableConcept>();
4293          for (CodeableConcept i : topic)
4294            dst.topic.add(i.copy());
4295        };
4296        if (author != null) {
4297          dst.author = new ArrayList<ContactDetail>();
4298          for (ContactDetail i : author)
4299            dst.author.add(i.copy());
4300        };
4301        if (editor != null) {
4302          dst.editor = new ArrayList<ContactDetail>();
4303          for (ContactDetail i : editor)
4304            dst.editor.add(i.copy());
4305        };
4306        if (reviewer != null) {
4307          dst.reviewer = new ArrayList<ContactDetail>();
4308          for (ContactDetail i : reviewer)
4309            dst.reviewer.add(i.copy());
4310        };
4311        if (endorser != null) {
4312          dst.endorser = new ArrayList<ContactDetail>();
4313          for (ContactDetail i : endorser)
4314            dst.endorser.add(i.copy());
4315        };
4316        if (relatedArtifact != null) {
4317          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
4318          for (RelatedArtifact i : relatedArtifact)
4319            dst.relatedArtifact.add(i.copy());
4320        };
4321        if (library != null) {
4322          dst.library = new ArrayList<CanonicalType>();
4323          for (CanonicalType i : library)
4324            dst.library.add(i.copy());
4325        };
4326        dst.kind = kind == null ? null : kind.copy();
4327        dst.profile = profile == null ? null : profile.copy();
4328        dst.code = code == null ? null : code.copy();
4329        dst.intent = intent == null ? null : intent.copy();
4330        dst.priority = priority == null ? null : priority.copy();
4331        dst.doNotPerform = doNotPerform == null ? null : doNotPerform.copy();
4332        dst.timing = timing == null ? null : timing.copy();
4333        dst.location = location == null ? null : location.copy();
4334        if (participant != null) {
4335          dst.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4336          for (ActivityDefinitionParticipantComponent i : participant)
4337            dst.participant.add(i.copy());
4338        };
4339        dst.product = product == null ? null : product.copy();
4340        dst.quantity = quantity == null ? null : quantity.copy();
4341        if (dosage != null) {
4342          dst.dosage = new ArrayList<Dosage>();
4343          for (Dosage i : dosage)
4344            dst.dosage.add(i.copy());
4345        };
4346        if (bodySite != null) {
4347          dst.bodySite = new ArrayList<CodeableConcept>();
4348          for (CodeableConcept i : bodySite)
4349            dst.bodySite.add(i.copy());
4350        };
4351        if (specimenRequirement != null) {
4352          dst.specimenRequirement = new ArrayList<Reference>();
4353          for (Reference i : specimenRequirement)
4354            dst.specimenRequirement.add(i.copy());
4355        };
4356        if (observationRequirement != null) {
4357          dst.observationRequirement = new ArrayList<Reference>();
4358          for (Reference i : observationRequirement)
4359            dst.observationRequirement.add(i.copy());
4360        };
4361        if (observationResultRequirement != null) {
4362          dst.observationResultRequirement = new ArrayList<Reference>();
4363          for (Reference i : observationResultRequirement)
4364            dst.observationResultRequirement.add(i.copy());
4365        };
4366        dst.transform = transform == null ? null : transform.copy();
4367        if (dynamicValue != null) {
4368          dst.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4369          for (ActivityDefinitionDynamicValueComponent i : dynamicValue)
4370            dst.dynamicValue.add(i.copy());
4371        };
4372      }
4373
4374      protected ActivityDefinition typedCopy() {
4375        return copy();
4376      }
4377
4378      @Override
4379      public boolean equalsDeep(Base other_) {
4380        if (!super.equalsDeep(other_))
4381          return false;
4382        if (!(other_ instanceof ActivityDefinition))
4383          return false;
4384        ActivityDefinition o = (ActivityDefinition) other_;
4385        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
4386           && compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(subtitle, o.subtitle, true)
4387           && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(subject, o.subject, true)
4388           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
4389           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
4390           && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true)
4391           && compareDeep(copyright, o.copyright, true) && compareDeep(approvalDate, o.approvalDate, true)
4392           && compareDeep(lastReviewDate, o.lastReviewDate, true) && compareDeep(effectivePeriod, o.effectivePeriod, true)
4393           && compareDeep(topic, o.topic, true) && compareDeep(author, o.author, true) && compareDeep(editor, o.editor, true)
4394           && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
4395           && compareDeep(library, o.library, true) && compareDeep(kind, o.kind, true) && compareDeep(profile, o.profile, true)
4396           && compareDeep(code, o.code, true) && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true)
4397           && compareDeep(doNotPerform, o.doNotPerform, true) && compareDeep(timing, o.timing, true) && compareDeep(location, o.location, true)
4398           && compareDeep(participant, o.participant, true) && compareDeep(product, o.product, true) && compareDeep(quantity, o.quantity, true)
4399           && compareDeep(dosage, o.dosage, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(specimenRequirement, o.specimenRequirement, true)
4400           && compareDeep(observationRequirement, o.observationRequirement, true) && compareDeep(observationResultRequirement, o.observationResultRequirement, true)
4401           && compareDeep(transform, o.transform, true) && compareDeep(dynamicValue, o.dynamicValue, true)
4402          ;
4403      }
4404
4405      @Override
4406      public boolean equalsShallow(Base other_) {
4407        if (!super.equalsShallow(other_))
4408          return false;
4409        if (!(other_ instanceof ActivityDefinition))
4410          return false;
4411        ActivityDefinition o = (ActivityDefinition) other_;
4412        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
4413           && compareValues(title, o.title, true) && compareValues(subtitle, o.subtitle, true) && compareValues(status, o.status, true)
4414           && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true) && compareValues(publisher, o.publisher, true)
4415           && compareValues(description, o.description, true) && compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true)
4416           && compareValues(copyright, o.copyright, true) && compareValues(approvalDate, o.approvalDate, true)
4417           && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(library, o.library, true)
4418           && compareValues(kind, o.kind, true) && compareValues(profile, o.profile, true) && compareValues(intent, o.intent, true)
4419           && compareValues(priority, o.priority, true) && compareValues(doNotPerform, o.doNotPerform, true) && compareValues(transform, o.transform, true)
4420          ;
4421      }
4422
4423      public boolean isEmpty() {
4424        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
4425          , name, title, subtitle, status, experimental, subject, date, publisher, contact
4426          , description, useContext, jurisdiction, purpose, usage, copyright, approvalDate
4427          , lastReviewDate, effectivePeriod, topic, author, editor, reviewer, endorser, relatedArtifact
4428          , library, kind, profile, code, intent, priority, doNotPerform, timing, location
4429          , participant, product, quantity, dosage, bodySite, specimenRequirement, observationRequirement
4430          , observationResultRequirement, transform, dynamicValue);
4431      }
4432
4433  @Override
4434  public ResourceType getResourceType() {
4435    return ResourceType.ActivityDefinition;
4436   }
4437
4438 /**
4439   * Search parameter: <b>composed-of</b>
4440   * <p>
4441   * Description: <b>What resource is being referenced</b><br>
4442   * Type: <b>reference</b><br>
4443   * Path: <b>ActivityDefinition.relatedArtifact.where(type='composed-of').resource</b><br>
4444   * </p>
4445   */
4446  @SearchParamDefinition(name="composed-of", path="ActivityDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4447  public static final String SP_COMPOSED_OF = "composed-of";
4448 /**
4449   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
4450   * <p>
4451   * Description: <b>What resource is being referenced</b><br>
4452   * Type: <b>reference</b><br>
4453   * Path: <b>ActivityDefinition.relatedArtifact.where(type='composed-of').resource</b><br>
4454   * </p>
4455   */
4456  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
4457
4458/**
4459   * Constant for fluent queries to be used to add include statements. Specifies
4460   * the path value of "<b>ActivityDefinition:composed-of</b>".
4461   */
4462  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("ActivityDefinition:composed-of").toLocked();
4463
4464 /**
4465   * Search parameter: <b>context-quantity</b>
4466   * <p>
4467   * Description: <b>A quantity- or range-valued use context assigned to the activity definition</b><br>
4468   * Type: <b>quantity</b><br>
4469   * Path: <b>(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)</b><br>
4470   * </p>
4471   */
4472  @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" )
4473  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
4474 /**
4475   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
4476   * <p>
4477   * Description: <b>A quantity- or range-valued use context assigned to the activity definition</b><br>
4478   * Type: <b>quantity</b><br>
4479   * Path: <b>(ActivityDefinition.useContext.value as Quantity) | (ActivityDefinition.useContext.value as Range)</b><br>
4480   * </p>
4481   */
4482  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
4483
4484 /**
4485   * Search parameter: <b>context-type-quantity</b>
4486   * <p>
4487   * Description: <b>A use context type and quantity- or range-based value assigned to the activity definition</b><br>
4488   * Type: <b>composite</b><br>
4489   * Path: <b>ActivityDefinition.useContext</b><br>
4490   * </p>
4491   */
4492  @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={"context-type", "context-quantity"} )
4493  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
4494 /**
4495   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
4496   * <p>
4497   * Description: <b>A use context type and quantity- or range-based value assigned to the activity definition</b><br>
4498   * Type: <b>composite</b><br>
4499   * Path: <b>ActivityDefinition.useContext</b><br>
4500   * </p>
4501   */
4502  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>(SP_CONTEXT_TYPE_QUANTITY);
4503
4504 /**
4505   * Search parameter: <b>context-type-value</b>
4506   * <p>
4507   * Description: <b>A use context type and value assigned to the activity definition</b><br>
4508   * Type: <b>composite</b><br>
4509   * Path: <b>ActivityDefinition.useContext</b><br>
4510   * </p>
4511   */
4512  @SearchParamDefinition(name="context-type-value", path="ActivityDefinition.useContext", description="A use context type and value assigned to the activity definition", type="composite", compositeOf={"context-type", "context"} )
4513  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
4514 /**
4515   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
4516   * <p>
4517   * Description: <b>A use context type and value assigned to the activity definition</b><br>
4518   * Type: <b>composite</b><br>
4519   * Path: <b>ActivityDefinition.useContext</b><br>
4520   * </p>
4521   */
4522  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>(SP_CONTEXT_TYPE_VALUE);
4523
4524 /**
4525   * Search parameter: <b>context-type</b>
4526   * <p>
4527   * Description: <b>A type of use context assigned to the activity definition</b><br>
4528   * Type: <b>token</b><br>
4529   * Path: <b>ActivityDefinition.useContext.code</b><br>
4530   * </p>
4531   */
4532  @SearchParamDefinition(name="context-type", path="ActivityDefinition.useContext.code", description="A type of use context assigned to the activity definition", type="token" )
4533  public static final String SP_CONTEXT_TYPE = "context-type";
4534 /**
4535   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
4536   * <p>
4537   * Description: <b>A type of use context assigned to the activity definition</b><br>
4538   * Type: <b>token</b><br>
4539   * Path: <b>ActivityDefinition.useContext.code</b><br>
4540   * </p>
4541   */
4542  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
4543
4544 /**
4545   * Search parameter: <b>context</b>
4546   * <p>
4547   * Description: <b>A use context assigned to the activity definition</b><br>
4548   * Type: <b>token</b><br>
4549   * Path: <b>(ActivityDefinition.useContext.value as CodeableConcept)</b><br>
4550   * </p>
4551   */
4552  @SearchParamDefinition(name="context", path="(ActivityDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the activity definition", type="token" )
4553  public static final String SP_CONTEXT = "context";
4554 /**
4555   * <b>Fluent Client</b> search parameter constant for <b>context</b>
4556   * <p>
4557   * Description: <b>A use context assigned to the activity definition</b><br>
4558   * Type: <b>token</b><br>
4559   * Path: <b>(ActivityDefinition.useContext.value as CodeableConcept)</b><br>
4560   * </p>
4561   */
4562  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
4563
4564 /**
4565   * Search parameter: <b>date</b>
4566   * <p>
4567   * Description: <b>The activity definition publication date</b><br>
4568   * Type: <b>date</b><br>
4569   * Path: <b>ActivityDefinition.date</b><br>
4570   * </p>
4571   */
4572  @SearchParamDefinition(name="date", path="ActivityDefinition.date", description="The activity definition publication date", type="date" )
4573  public static final String SP_DATE = "date";
4574 /**
4575   * <b>Fluent Client</b> search parameter constant for <b>date</b>
4576   * <p>
4577   * Description: <b>The activity definition publication date</b><br>
4578   * Type: <b>date</b><br>
4579   * Path: <b>ActivityDefinition.date</b><br>
4580   * </p>
4581   */
4582  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
4583
4584 /**
4585   * Search parameter: <b>depends-on</b>
4586   * <p>
4587   * Description: <b>What resource is being referenced</b><br>
4588   * Type: <b>reference</b><br>
4589   * Path: <b>ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library</b><br>
4590   * </p>
4591   */
4592  @SearchParamDefinition(name="depends-on", path="ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4593  public static final String SP_DEPENDS_ON = "depends-on";
4594 /**
4595   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
4596   * <p>
4597   * Description: <b>What resource is being referenced</b><br>
4598   * Type: <b>reference</b><br>
4599   * Path: <b>ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library</b><br>
4600   * </p>
4601   */
4602  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
4603
4604/**
4605   * Constant for fluent queries to be used to add include statements. Specifies
4606   * the path value of "<b>ActivityDefinition:depends-on</b>".
4607   */
4608  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ActivityDefinition:depends-on").toLocked();
4609
4610 /**
4611   * Search parameter: <b>derived-from</b>
4612   * <p>
4613   * Description: <b>What resource is being referenced</b><br>
4614   * Type: <b>reference</b><br>
4615   * Path: <b>ActivityDefinition.relatedArtifact.where(type='derived-from').resource</b><br>
4616   * </p>
4617   */
4618  @SearchParamDefinition(name="derived-from", path="ActivityDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4619  public static final String SP_DERIVED_FROM = "derived-from";
4620 /**
4621   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
4622   * <p>
4623   * Description: <b>What resource is being referenced</b><br>
4624   * Type: <b>reference</b><br>
4625   * Path: <b>ActivityDefinition.relatedArtifact.where(type='derived-from').resource</b><br>
4626   * </p>
4627   */
4628  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
4629
4630/**
4631   * Constant for fluent queries to be used to add include statements. Specifies
4632   * the path value of "<b>ActivityDefinition:derived-from</b>".
4633   */
4634  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("ActivityDefinition:derived-from").toLocked();
4635
4636 /**
4637   * Search parameter: <b>description</b>
4638   * <p>
4639   * Description: <b>The description of the activity definition</b><br>
4640   * Type: <b>string</b><br>
4641   * Path: <b>ActivityDefinition.description</b><br>
4642   * </p>
4643   */
4644  @SearchParamDefinition(name="description", path="ActivityDefinition.description", description="The description of the activity definition", type="string" )
4645  public static final String SP_DESCRIPTION = "description";
4646 /**
4647   * <b>Fluent Client</b> search parameter constant for <b>description</b>
4648   * <p>
4649   * Description: <b>The description of the activity definition</b><br>
4650   * Type: <b>string</b><br>
4651   * Path: <b>ActivityDefinition.description</b><br>
4652   * </p>
4653   */
4654  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
4655
4656 /**
4657   * Search parameter: <b>effective</b>
4658   * <p>
4659   * Description: <b>The time during which the activity definition is intended to be in use</b><br>
4660   * Type: <b>date</b><br>
4661   * Path: <b>ActivityDefinition.effectivePeriod</b><br>
4662   * </p>
4663   */
4664  @SearchParamDefinition(name="effective", path="ActivityDefinition.effectivePeriod", description="The time during which the activity definition is intended to be in use", type="date" )
4665  public static final String SP_EFFECTIVE = "effective";
4666 /**
4667   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
4668   * <p>
4669   * Description: <b>The time during which the activity definition is intended to be in use</b><br>
4670   * Type: <b>date</b><br>
4671   * Path: <b>ActivityDefinition.effectivePeriod</b><br>
4672   * </p>
4673   */
4674  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
4675
4676 /**
4677   * Search parameter: <b>identifier</b>
4678   * <p>
4679   * Description: <b>External identifier for the activity definition</b><br>
4680   * Type: <b>token</b><br>
4681   * Path: <b>ActivityDefinition.identifier</b><br>
4682   * </p>
4683   */
4684  @SearchParamDefinition(name="identifier", path="ActivityDefinition.identifier", description="External identifier for the activity definition", type="token" )
4685  public static final String SP_IDENTIFIER = "identifier";
4686 /**
4687   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
4688   * <p>
4689   * Description: <b>External identifier for the activity definition</b><br>
4690   * Type: <b>token</b><br>
4691   * Path: <b>ActivityDefinition.identifier</b><br>
4692   * </p>
4693   */
4694  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
4695
4696 /**
4697   * Search parameter: <b>jurisdiction</b>
4698   * <p>
4699   * Description: <b>Intended jurisdiction for the activity definition</b><br>
4700   * Type: <b>token</b><br>
4701   * Path: <b>ActivityDefinition.jurisdiction</b><br>
4702   * </p>
4703   */
4704  @SearchParamDefinition(name="jurisdiction", path="ActivityDefinition.jurisdiction", description="Intended jurisdiction for the activity definition", type="token" )
4705  public static final String SP_JURISDICTION = "jurisdiction";
4706 /**
4707   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
4708   * <p>
4709   * Description: <b>Intended jurisdiction for the activity definition</b><br>
4710   * Type: <b>token</b><br>
4711   * Path: <b>ActivityDefinition.jurisdiction</b><br>
4712   * </p>
4713   */
4714  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
4715
4716 /**
4717   * Search parameter: <b>kind</b>
4718   * <p>
4719   * Description: <b>The kind of activity definition</b><br>
4720   * Type: <b>token</b><br>
4721   * Path: <b>ActivityDefinition.kind</b><br>
4722   * </p>
4723   */
4724  @SearchParamDefinition(name="kind", path="ActivityDefinition.kind", description="The kind of activity definition", type="token" )
4725  public static final String SP_KIND = "kind";
4726 /**
4727   * <b>Fluent Client</b> search parameter constant for <b>kind</b>
4728   * <p>
4729   * Description: <b>The kind of activity definition</b><br>
4730   * Type: <b>token</b><br>
4731   * Path: <b>ActivityDefinition.kind</b><br>
4732   * </p>
4733   */
4734  public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_KIND);
4735
4736 /**
4737   * Search parameter: <b>name</b>
4738   * <p>
4739   * Description: <b>Computationally friendly name of the activity definition</b><br>
4740   * Type: <b>string</b><br>
4741   * Path: <b>ActivityDefinition.name</b><br>
4742   * </p>
4743   */
4744  @SearchParamDefinition(name="name", path="ActivityDefinition.name", description="Computationally friendly name of the activity definition", type="string" )
4745  public static final String SP_NAME = "name";
4746 /**
4747   * <b>Fluent Client</b> search parameter constant for <b>name</b>
4748   * <p>
4749   * Description: <b>Computationally friendly name of the activity definition</b><br>
4750   * Type: <b>string</b><br>
4751   * Path: <b>ActivityDefinition.name</b><br>
4752   * </p>
4753   */
4754  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
4755
4756 /**
4757   * Search parameter: <b>predecessor</b>
4758   * <p>
4759   * Description: <b>What resource is being referenced</b><br>
4760   * Type: <b>reference</b><br>
4761   * Path: <b>ActivityDefinition.relatedArtifact.where(type='predecessor').resource</b><br>
4762   * </p>
4763   */
4764  @SearchParamDefinition(name="predecessor", path="ActivityDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4765  public static final String SP_PREDECESSOR = "predecessor";
4766 /**
4767   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
4768   * <p>
4769   * Description: <b>What resource is being referenced</b><br>
4770   * Type: <b>reference</b><br>
4771   * Path: <b>ActivityDefinition.relatedArtifact.where(type='predecessor').resource</b><br>
4772   * </p>
4773   */
4774  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
4775
4776/**
4777   * Constant for fluent queries to be used to add include statements. Specifies
4778   * the path value of "<b>ActivityDefinition:predecessor</b>".
4779   */
4780  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("ActivityDefinition:predecessor").toLocked();
4781
4782 /**
4783   * Search parameter: <b>publisher</b>
4784   * <p>
4785   * Description: <b>Name of the publisher of the activity definition</b><br>
4786   * Type: <b>string</b><br>
4787   * Path: <b>ActivityDefinition.publisher</b><br>
4788   * </p>
4789   */
4790  @SearchParamDefinition(name="publisher", path="ActivityDefinition.publisher", description="Name of the publisher of the activity definition", type="string" )
4791  public static final String SP_PUBLISHER = "publisher";
4792 /**
4793   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
4794   * <p>
4795   * Description: <b>Name of the publisher of the activity definition</b><br>
4796   * Type: <b>string</b><br>
4797   * Path: <b>ActivityDefinition.publisher</b><br>
4798   * </p>
4799   */
4800  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
4801
4802 /**
4803   * Search parameter: <b>status</b>
4804   * <p>
4805   * Description: <b>The current status of the activity definition</b><br>
4806   * Type: <b>token</b><br>
4807   * Path: <b>ActivityDefinition.status</b><br>
4808   * </p>
4809   */
4810  @SearchParamDefinition(name="status", path="ActivityDefinition.status", description="The current status of the activity definition", type="token" )
4811  public static final String SP_STATUS = "status";
4812 /**
4813   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4814   * <p>
4815   * Description: <b>The current status of the activity definition</b><br>
4816   * Type: <b>token</b><br>
4817   * Path: <b>ActivityDefinition.status</b><br>
4818   * </p>
4819   */
4820  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4821
4822 /**
4823   * Search parameter: <b>successor</b>
4824   * <p>
4825   * Description: <b>What resource is being referenced</b><br>
4826   * Type: <b>reference</b><br>
4827   * Path: <b>ActivityDefinition.relatedArtifact.where(type='successor').resource</b><br>
4828   * </p>
4829   */
4830  @SearchParamDefinition(name="successor", path="ActivityDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference", target={Account.class, ActivityDefinition.class, AdministrableProductDefinition.class, AdverseEvent.class, AllergyIntolerance.class, Appointment.class, AppointmentResponse.class, ArtifactAssessment.class, AuditEvent.class, Basic.class, Binary.class, BiologicallyDerivedProduct.class, BodyStructure.class, Bundle.class, CapabilityStatement.class, CapabilityStatement2.class, CarePlan.class, CareTeam.class, ChargeItem.class, ChargeItemDefinition.class, Citation.class, Claim.class, ClaimResponse.class, ClinicalImpression.class, ClinicalUseDefinition.class, ClinicalUseIssue.class, CodeSystem.class, Communication.class, CommunicationRequest.class, CompartmentDefinition.class, Composition.class, ConceptMap.class, ConceptMap2.class, Condition.class, ConditionDefinition.class, Consent.class, Contract.class, Coverage.class, CoverageEligibilityRequest.class, CoverageEligibilityResponse.class, DetectedIssue.class, Device.class, DeviceDefinition.class, DeviceDispense.class, DeviceMetric.class, DeviceRequest.class, DeviceUsage.class, DiagnosticReport.class, DocumentManifest.class, DocumentReference.class, Encounter.class, Endpoint.class, EnrollmentRequest.class, EnrollmentResponse.class, EpisodeOfCare.class, EventDefinition.class, Evidence.class, EvidenceReport.class, EvidenceVariable.class, ExampleScenario.class, ExplanationOfBenefit.class, FamilyMemberHistory.class, Flag.class, Goal.class, GraphDefinition.class, Group.class, GuidanceResponse.class, HealthcareService.class, ImagingSelection.class, ImagingStudy.class, Immunization.class, ImmunizationEvaluation.class, ImmunizationRecommendation.class, ImplementationGuide.class, Ingredient.class, InsurancePlan.class, InventoryReport.class, Invoice.class, Library.class, Linkage.class, ListResource.class, Location.class, ManufacturedItemDefinition.class, Measure.class, MeasureReport.class, Medication.class, MedicationAdministration.class, MedicationDispense.class, MedicationKnowledge.class, MedicationRequest.class, MedicationUsage.class, MedicinalProductDefinition.class, MessageDefinition.class, MessageHeader.class, MolecularSequence.class, NamingSystem.class, NutritionIntake.class, NutritionOrder.class, NutritionProduct.class, Observation.class, ObservationDefinition.class, OperationDefinition.class, OperationOutcome.class, Organization.class, OrganizationAffiliation.class, PackagedProductDefinition.class, Patient.class, PaymentNotice.class, PaymentReconciliation.class, Permission.class, Person.class, PlanDefinition.class, Practitioner.class, PractitionerRole.class, Procedure.class, Provenance.class, Questionnaire.class, QuestionnaireResponse.class, RegulatedAuthorization.class, RelatedPerson.class, RequestGroup.class, ResearchStudy.class, ResearchSubject.class, RiskAssessment.class, Schedule.class, SearchParameter.class, ServiceRequest.class, Slot.class, Specimen.class, SpecimenDefinition.class, StructureDefinition.class, StructureMap.class, Subscription.class, SubscriptionStatus.class, SubscriptionTopic.class, Substance.class, SubstanceDefinition.class, SubstanceNucleicAcid.class, SubstancePolymer.class, SubstanceProtein.class, SubstanceReferenceInformation.class, SubstanceSourceMaterial.class, SupplyDelivery.class, SupplyRequest.class, Task.class, TerminologyCapabilities.class, TestReport.class, TestScript.class, ValueSet.class, VerificationResult.class, VisionPrescription.class } )
4831  public static final String SP_SUCCESSOR = "successor";
4832 /**
4833   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
4834   * <p>
4835   * Description: <b>What resource is being referenced</b><br>
4836   * Type: <b>reference</b><br>
4837   * Path: <b>ActivityDefinition.relatedArtifact.where(type='successor').resource</b><br>
4838   * </p>
4839   */
4840  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
4841
4842/**
4843   * Constant for fluent queries to be used to add include statements. Specifies
4844   * the path value of "<b>ActivityDefinition:successor</b>".
4845   */
4846  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("ActivityDefinition:successor").toLocked();
4847
4848 /**
4849   * Search parameter: <b>title</b>
4850   * <p>
4851   * Description: <b>The human-friendly name of the activity definition</b><br>
4852   * Type: <b>string</b><br>
4853   * Path: <b>ActivityDefinition.title</b><br>
4854   * </p>
4855   */
4856  @SearchParamDefinition(name="title", path="ActivityDefinition.title", description="The human-friendly name of the activity definition", type="string" )
4857  public static final String SP_TITLE = "title";
4858 /**
4859   * <b>Fluent Client</b> search parameter constant for <b>title</b>
4860   * <p>
4861   * Description: <b>The human-friendly name of the activity definition</b><br>
4862   * Type: <b>string</b><br>
4863   * Path: <b>ActivityDefinition.title</b><br>
4864   * </p>
4865   */
4866  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
4867
4868 /**
4869   * Search parameter: <b>topic</b>
4870   * <p>
4871   * Description: <b>Topics associated with the module</b><br>
4872   * Type: <b>token</b><br>
4873   * Path: <b>ActivityDefinition.topic</b><br>
4874   * </p>
4875   */
4876  @SearchParamDefinition(name="topic", path="ActivityDefinition.topic", description="Topics associated with the module", type="token" )
4877  public static final String SP_TOPIC = "topic";
4878 /**
4879   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
4880   * <p>
4881   * Description: <b>Topics associated with the module</b><br>
4882   * Type: <b>token</b><br>
4883   * Path: <b>ActivityDefinition.topic</b><br>
4884   * </p>
4885   */
4886  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
4887
4888 /**
4889   * Search parameter: <b>url</b>
4890   * <p>
4891   * Description: <b>The uri that identifies the activity definition</b><br>
4892   * Type: <b>uri</b><br>
4893   * Path: <b>ActivityDefinition.url</b><br>
4894   * </p>
4895   */
4896  @SearchParamDefinition(name="url", path="ActivityDefinition.url", description="The uri that identifies the activity definition", type="uri" )
4897  public static final String SP_URL = "url";
4898 /**
4899   * <b>Fluent Client</b> search parameter constant for <b>url</b>
4900   * <p>
4901   * Description: <b>The uri that identifies the activity definition</b><br>
4902   * Type: <b>uri</b><br>
4903   * Path: <b>ActivityDefinition.url</b><br>
4904   * </p>
4905   */
4906  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
4907
4908 /**
4909   * Search parameter: <b>version</b>
4910   * <p>
4911   * Description: <b>The business version of the activity definition</b><br>
4912   * Type: <b>token</b><br>
4913   * Path: <b>ActivityDefinition.version</b><br>
4914   * </p>
4915   */
4916  @SearchParamDefinition(name="version", path="ActivityDefinition.version", description="The business version of the activity definition", type="token" )
4917  public static final String SP_VERSION = "version";
4918 /**
4919   * <b>Fluent Client</b> search parameter constant for <b>version</b>
4920   * <p>
4921   * Description: <b>The business version of the activity definition</b><br>
4922   * Type: <b>token</b><br>
4923   * Path: <b>ActivityDefinition.version</b><br>
4924   * </p>
4925   */
4926  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
4927
4928
4929}
4930