001package org.hl7.fhir.dstu3.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.dstu3
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
054import java.util.ArrayList;
055import java.util.Date;
056import java.util.List;
057
058import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
059import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory;
060import org.hl7.fhir.exceptions.FHIRException;
061import org.hl7.fhir.exceptions.FHIRFormatError;
062import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
063import org.hl7.fhir.utilities.Utilities;
064
065import ca.uhn.fhir.model.api.annotation.Block;
066import ca.uhn.fhir.model.api.annotation.Child;
067import ca.uhn.fhir.model.api.annotation.ChildOrder;
068import ca.uhn.fhir.model.api.annotation.Description;
069import ca.uhn.fhir.model.api.annotation.ResourceDef;
070import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
071/**
072 * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
073 */
074@ResourceDef(name="ActivityDefinition", profile="http://hl7.org/fhir/Profile/ActivityDefinition")
075@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "description", "purpose", "usage", "approvalDate", "lastReviewDate", "effectivePeriod", "useContext", "jurisdiction", "topic", "contributor", "contact", "copyright", "relatedArtifact", "library", "kind", "code", "timing[x]", "location", "participant", "product[x]", "quantity", "dosage", "bodySite", "transform", "dynamicValue"})
076public class ActivityDefinition extends MetadataResource {
077
078    public enum ActivityDefinitionKind {
079        /**
080         * A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.
081         */
082        ACCOUNT, 
083        /**
084         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
085         */
086        ACTIVITYDEFINITION, 
087        /**
088         * Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.
089         */
090        ADVERSEEVENT, 
091        /**
092         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
093         */
094        ALLERGYINTOLERANCE, 
095        /**
096         * 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).
097         */
098        APPOINTMENT, 
099        /**
100         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
101         */
102        APPOINTMENTRESPONSE, 
103        /**
104         * A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
105         */
106        AUDITEVENT, 
107        /**
108         * Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.
109         */
110        BASIC, 
111        /**
112         * A binary resource can contain any content, whether text, image, pdf, zip archive, etc.
113         */
114        BINARY, 
115        /**
116         * Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
117         */
118        BODYSITE, 
119        /**
120         * A container for a collection of resources.
121         */
122        BUNDLE, 
123        /**
124         * A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.
125         */
126        CAPABILITYSTATEMENT, 
127        /**
128         * Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.
129         */
130        CAREPLAN, 
131        /**
132         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
133         */
134        CARETEAM, 
135        /**
136         * The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.
137         */
138        CHARGEITEM, 
139        /**
140         * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.
141         */
142        CLAIM, 
143        /**
144         * This resource provides the adjudication details from the processing of a Claim resource.
145         */
146        CLAIMRESPONSE, 
147        /**
148         * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score.
149         */
150        CLINICALIMPRESSION, 
151        /**
152         * A code system resource specifies a set of codes drawn from one or more code systems.
153         */
154        CODESYSTEM, 
155        /**
156         * An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.
157         */
158        COMMUNICATION, 
159        /**
160         * A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.
161         */
162        COMMUNICATIONREQUEST, 
163        /**
164         * A compartment definition that defines how resources are accessed on a server.
165         */
166        COMPARTMENTDEFINITION, 
167        /**
168         * A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.
169         */
170        COMPOSITION, 
171        /**
172         * A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.
173         */
174        CONCEPTMAP, 
175        /**
176         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
177         */
178        CONDITION, 
179        /**
180         * A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
181         */
182        CONSENT, 
183        /**
184         * A formal agreement between parties regarding the conduct of business, exchange of information or other matters.
185         */
186        CONTRACT, 
187        /**
188         * Financial instrument which may be used to reimburse or pay for health care products and services.
189         */
190        COVERAGE, 
191        /**
192         * The formal description of a single piece of information that can be gathered and reported.
193         */
194        DATAELEMENT, 
195        /**
196         * Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.
197         */
198        DETECTEDISSUE, 
199        /**
200         * This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.  Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.
201         */
202        DEVICE, 
203        /**
204         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
205         */
206        DEVICECOMPONENT, 
207        /**
208         * Describes a measurement, calculation or setting capability of a medical device.
209         */
210        DEVICEMETRIC, 
211        /**
212         * Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.
213         */
214        DEVICEREQUEST, 
215        /**
216         * A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.
217         */
218        DEVICEUSESTATEMENT, 
219        /**
220         * The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.
221         */
222        DIAGNOSTICREPORT, 
223        /**
224         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
225         */
226        DOCUMENTMANIFEST, 
227        /**
228         * A reference to a document.
229         */
230        DOCUMENTREFERENCE, 
231        /**
232         * A resource that includes narrative, extensions, and contained resources.
233         */
234        DOMAINRESOURCE, 
235        /**
236         * The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
237         */
238        ELIGIBILITYREQUEST, 
239        /**
240         * This resource provides eligibility and plan details from the processing of an Eligibility resource.
241         */
242        ELIGIBILITYRESPONSE, 
243        /**
244         * An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.
245         */
246        ENCOUNTER, 
247        /**
248         * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.
249         */
250        ENDPOINT, 
251        /**
252         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
253         */
254        ENROLLMENTREQUEST, 
255        /**
256         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
257         */
258        ENROLLMENTRESPONSE, 
259        /**
260         * An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.
261         */
262        EPISODEOFCARE, 
263        /**
264         * Resource to define constraints on the Expansion of a FHIR ValueSet.
265         */
266        EXPANSIONPROFILE, 
267        /**
268         * This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.
269         */
270        EXPLANATIONOFBENEFIT, 
271        /**
272         * Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.
273         */
274        FAMILYMEMBERHISTORY, 
275        /**
276         * Prospective warnings of potential issues when providing care to the patient.
277         */
278        FLAG, 
279        /**
280         * Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
281         */
282        GOAL, 
283        /**
284         * A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.
285         */
286        GRAPHDEFINITION, 
287        /**
288         * Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.
289         */
290        GROUP, 
291        /**
292         * A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.
293         */
294        GUIDANCERESPONSE, 
295        /**
296         * The details of a healthcare service available at a location.
297         */
298        HEALTHCARESERVICE, 
299        /**
300         * A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.
301         */
302        IMAGINGMANIFEST, 
303        /**
304         * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.
305         */
306        IMAGINGSTUDY, 
307        /**
308         * Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.
309         */
310        IMMUNIZATION, 
311        /**
312         * A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.
313         */
314        IMMUNIZATIONRECOMMENDATION, 
315        /**
316         * A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.
317         */
318        IMPLEMENTATIONGUIDE, 
319        /**
320         * The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.
321         */
322        LIBRARY, 
323        /**
324         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
325         */
326        LINKAGE, 
327        /**
328         * A set of information summarized from a list of other resources.
329         */
330        LIST, 
331        /**
332         * Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.
333         */
334        LOCATION, 
335        /**
336         * The Measure resource provides the definition of a quality measure.
337         */
338        MEASURE, 
339        /**
340         * The MeasureReport resource contains the results of evaluating a measure.
341         */
342        MEASUREREPORT, 
343        /**
344         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
345         */
346        MEDIA, 
347        /**
348         * This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
349         */
350        MEDICATION, 
351        /**
352         * Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.
353         */
354        MEDICATIONADMINISTRATION, 
355        /**
356         * Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.
357         */
358        MEDICATIONDISPENSE, 
359        /**
360         * An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.
361         */
362        MEDICATIONREQUEST, 
363        /**
364         * A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains 
365
366The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.
367         */
368        MEDICATIONSTATEMENT, 
369        /**
370         * Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.
371         */
372        MESSAGEDEFINITION, 
373        /**
374         * The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.
375         */
376        MESSAGEHEADER, 
377        /**
378         * A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types.
379         */
380        NAMINGSYSTEM, 
381        /**
382         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
383         */
384        NUTRITIONORDER, 
385        /**
386         * Measurements and simple assertions made about a patient, device or other subject.
387         */
388        OBSERVATION, 
389        /**
390         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
391         */
392        OPERATIONDEFINITION, 
393        /**
394         * A collection of error, warning or information messages that result from a system action.
395         */
396        OPERATIONOUTCOME, 
397        /**
398         * A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.
399         */
400        ORGANIZATION, 
401        /**
402         * This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.
403         */
404        PARAMETERS, 
405        /**
406         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
407         */
408        PATIENT, 
409        /**
410         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
411         */
412        PAYMENTNOTICE, 
413        /**
414         * This resource provides payment details and claim references supporting a bulk payment.
415         */
416        PAYMENTRECONCILIATION, 
417        /**
418         * Demographics and administrative information about a person independent of a specific health-related context.
419         */
420        PERSON, 
421        /**
422         * This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.
423         */
424        PLANDEFINITION, 
425        /**
426         * A person who is directly or indirectly involved in the provisioning of healthcare.
427         */
428        PRACTITIONER, 
429        /**
430         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
431         */
432        PRACTITIONERROLE, 
433        /**
434         * An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.
435         */
436        PROCEDURE, 
437        /**
438         * A record of a request for diagnostic investigations, treatments, or operations to be performed.
439         */
440        PROCEDUREREQUEST, 
441        /**
442         * This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.
443         */
444        PROCESSREQUEST, 
445        /**
446         * This resource provides processing status, errors and notes from the processing of a resource.
447         */
448        PROCESSRESPONSE, 
449        /**
450         * Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.
451         */
452        PROVENANCE, 
453        /**
454         * A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.
455         */
456        QUESTIONNAIRE, 
457        /**
458         * A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.
459         */
460        QUESTIONNAIRERESPONSE, 
461        /**
462         * Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.
463         */
464        REFERRALREQUEST, 
465        /**
466         * Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.
467         */
468        RELATEDPERSON, 
469        /**
470         * A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one".
471         */
472        REQUESTGROUP, 
473        /**
474         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
475         */
476        RESEARCHSTUDY, 
477        /**
478         * A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.
479         */
480        RESEARCHSUBJECT, 
481        /**
482         * This is the base resource type for everything.
483         */
484        RESOURCE, 
485        /**
486         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
487         */
488        RISKASSESSMENT, 
489        /**
490         * A container for slots of time that may be available for booking appointments.
491         */
492        SCHEDULE, 
493        /**
494         * A search parameter that defines a named search item that can be used to search/filter on a resource.
495         */
496        SEARCHPARAMETER, 
497        /**
498         * Raw data describing a biological sequence.
499         */
500        SEQUENCE, 
501        /**
502         * The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.
503         */
504        SERVICEDEFINITION, 
505        /**
506         * A slot of time on a schedule that may be available for booking appointments.
507         */
508        SLOT, 
509        /**
510         * A sample to be used for analysis.
511         */
512        SPECIMEN, 
513        /**
514         * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.
515         */
516        STRUCTUREDEFINITION, 
517        /**
518         * A Map of relationships between 2 structures that can be used to transform data.
519         */
520        STRUCTUREMAP, 
521        /**
522         * The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system is able to take an appropriate action.
523         */
524        SUBSCRIPTION, 
525        /**
526         * A homogeneous material with a definite composition.
527         */
528        SUBSTANCE, 
529        /**
530         * Record of delivery of what is supplied.
531         */
532        SUPPLYDELIVERY, 
533        /**
534         * A record of a request for a medication, substance or device used in the healthcare setting.
535         */
536        SUPPLYREQUEST, 
537        /**
538         * A task to be performed.
539         */
540        TASK, 
541        /**
542         * A summary of information based on the results of executing a TestScript.
543         */
544        TESTREPORT, 
545        /**
546         * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.
547         */
548        TESTSCRIPT, 
549        /**
550         * A value set specifies a set of codes drawn from one or more code systems.
551         */
552        VALUESET, 
553        /**
554         * An authorization for the supply of glasses and/or contact lenses to a patient.
555         */
556        VISIONPRESCRIPTION, 
557        /**
558         * added to help the parsers with the generic types
559         */
560        NULL;
561        public static ActivityDefinitionKind fromCode(String codeString) throws FHIRException {
562            if (codeString == null || "".equals(codeString))
563                return null;
564        if ("Account".equals(codeString))
565          return ACCOUNT;
566        if ("ActivityDefinition".equals(codeString))
567          return ACTIVITYDEFINITION;
568        if ("AdverseEvent".equals(codeString))
569          return ADVERSEEVENT;
570        if ("AllergyIntolerance".equals(codeString))
571          return ALLERGYINTOLERANCE;
572        if ("Appointment".equals(codeString))
573          return APPOINTMENT;
574        if ("AppointmentResponse".equals(codeString))
575          return APPOINTMENTRESPONSE;
576        if ("AuditEvent".equals(codeString))
577          return AUDITEVENT;
578        if ("Basic".equals(codeString))
579          return BASIC;
580        if ("Binary".equals(codeString))
581          return BINARY;
582        if ("BodySite".equals(codeString))
583          return BODYSITE;
584        if ("Bundle".equals(codeString))
585          return BUNDLE;
586        if ("CapabilityStatement".equals(codeString))
587          return CAPABILITYSTATEMENT;
588        if ("CarePlan".equals(codeString))
589          return CAREPLAN;
590        if ("CareTeam".equals(codeString))
591          return CARETEAM;
592        if ("ChargeItem".equals(codeString))
593          return CHARGEITEM;
594        if ("Claim".equals(codeString))
595          return CLAIM;
596        if ("ClaimResponse".equals(codeString))
597          return CLAIMRESPONSE;
598        if ("ClinicalImpression".equals(codeString))
599          return CLINICALIMPRESSION;
600        if ("CodeSystem".equals(codeString))
601          return CODESYSTEM;
602        if ("Communication".equals(codeString))
603          return COMMUNICATION;
604        if ("CommunicationRequest".equals(codeString))
605          return COMMUNICATIONREQUEST;
606        if ("CompartmentDefinition".equals(codeString))
607          return COMPARTMENTDEFINITION;
608        if ("Composition".equals(codeString))
609          return COMPOSITION;
610        if ("ConceptMap".equals(codeString))
611          return CONCEPTMAP;
612        if ("Condition".equals(codeString))
613          return CONDITION;
614        if ("Consent".equals(codeString))
615          return CONSENT;
616        if ("Contract".equals(codeString))
617          return CONTRACT;
618        if ("Coverage".equals(codeString))
619          return COVERAGE;
620        if ("DataElement".equals(codeString))
621          return DATAELEMENT;
622        if ("DetectedIssue".equals(codeString))
623          return DETECTEDISSUE;
624        if ("Device".equals(codeString))
625          return DEVICE;
626        if ("DeviceComponent".equals(codeString))
627          return DEVICECOMPONENT;
628        if ("DeviceMetric".equals(codeString))
629          return DEVICEMETRIC;
630        if ("DeviceRequest".equals(codeString))
631          return DEVICEREQUEST;
632        if ("DeviceUseStatement".equals(codeString))
633          return DEVICEUSESTATEMENT;
634        if ("DiagnosticReport".equals(codeString))
635          return DIAGNOSTICREPORT;
636        if ("DocumentManifest".equals(codeString))
637          return DOCUMENTMANIFEST;
638        if ("DocumentReference".equals(codeString))
639          return DOCUMENTREFERENCE;
640        if ("DomainResource".equals(codeString))
641          return DOMAINRESOURCE;
642        if ("EligibilityRequest".equals(codeString))
643          return ELIGIBILITYREQUEST;
644        if ("EligibilityResponse".equals(codeString))
645          return ELIGIBILITYRESPONSE;
646        if ("Encounter".equals(codeString))
647          return ENCOUNTER;
648        if ("Endpoint".equals(codeString))
649          return ENDPOINT;
650        if ("EnrollmentRequest".equals(codeString))
651          return ENROLLMENTREQUEST;
652        if ("EnrollmentResponse".equals(codeString))
653          return ENROLLMENTRESPONSE;
654        if ("EpisodeOfCare".equals(codeString))
655          return EPISODEOFCARE;
656        if ("ExpansionProfile".equals(codeString))
657          return EXPANSIONPROFILE;
658        if ("ExplanationOfBenefit".equals(codeString))
659          return EXPLANATIONOFBENEFIT;
660        if ("FamilyMemberHistory".equals(codeString))
661          return FAMILYMEMBERHISTORY;
662        if ("Flag".equals(codeString))
663          return FLAG;
664        if ("Goal".equals(codeString))
665          return GOAL;
666        if ("GraphDefinition".equals(codeString))
667          return GRAPHDEFINITION;
668        if ("Group".equals(codeString))
669          return GROUP;
670        if ("GuidanceResponse".equals(codeString))
671          return GUIDANCERESPONSE;
672        if ("HealthcareService".equals(codeString))
673          return HEALTHCARESERVICE;
674        if ("ImagingManifest".equals(codeString))
675          return IMAGINGMANIFEST;
676        if ("ImagingStudy".equals(codeString))
677          return IMAGINGSTUDY;
678        if ("Immunization".equals(codeString))
679          return IMMUNIZATION;
680        if ("ImmunizationRecommendation".equals(codeString))
681          return IMMUNIZATIONRECOMMENDATION;
682        if ("ImplementationGuide".equals(codeString))
683          return IMPLEMENTATIONGUIDE;
684        if ("Library".equals(codeString))
685          return LIBRARY;
686        if ("Linkage".equals(codeString))
687          return LINKAGE;
688        if ("List".equals(codeString))
689          return LIST;
690        if ("Location".equals(codeString))
691          return LOCATION;
692        if ("Measure".equals(codeString))
693          return MEASURE;
694        if ("MeasureReport".equals(codeString))
695          return MEASUREREPORT;
696        if ("Media".equals(codeString))
697          return MEDIA;
698        if ("Medication".equals(codeString))
699          return MEDICATION;
700        if ("MedicationAdministration".equals(codeString))
701          return MEDICATIONADMINISTRATION;
702        if ("MedicationDispense".equals(codeString))
703          return MEDICATIONDISPENSE;
704        if ("MedicationRequest".equals(codeString))
705          return MEDICATIONREQUEST;
706        if ("MedicationStatement".equals(codeString))
707          return MEDICATIONSTATEMENT;
708        if ("MessageDefinition".equals(codeString))
709          return MESSAGEDEFINITION;
710        if ("MessageHeader".equals(codeString))
711          return MESSAGEHEADER;
712        if ("NamingSystem".equals(codeString))
713          return NAMINGSYSTEM;
714        if ("NutritionOrder".equals(codeString))
715          return NUTRITIONORDER;
716        if ("Observation".equals(codeString))
717          return OBSERVATION;
718        if ("OperationDefinition".equals(codeString))
719          return OPERATIONDEFINITION;
720        if ("OperationOutcome".equals(codeString))
721          return OPERATIONOUTCOME;
722        if ("Organization".equals(codeString))
723          return ORGANIZATION;
724        if ("Parameters".equals(codeString))
725          return PARAMETERS;
726        if ("Patient".equals(codeString))
727          return PATIENT;
728        if ("PaymentNotice".equals(codeString))
729          return PAYMENTNOTICE;
730        if ("PaymentReconciliation".equals(codeString))
731          return PAYMENTRECONCILIATION;
732        if ("Person".equals(codeString))
733          return PERSON;
734        if ("PlanDefinition".equals(codeString))
735          return PLANDEFINITION;
736        if ("Practitioner".equals(codeString))
737          return PRACTITIONER;
738        if ("PractitionerRole".equals(codeString))
739          return PRACTITIONERROLE;
740        if ("Procedure".equals(codeString))
741          return PROCEDURE;
742        if ("ProcedureRequest".equals(codeString))
743          return PROCEDUREREQUEST;
744        if ("ProcessRequest".equals(codeString))
745          return PROCESSREQUEST;
746        if ("ProcessResponse".equals(codeString))
747          return PROCESSRESPONSE;
748        if ("Provenance".equals(codeString))
749          return PROVENANCE;
750        if ("Questionnaire".equals(codeString))
751          return QUESTIONNAIRE;
752        if ("QuestionnaireResponse".equals(codeString))
753          return QUESTIONNAIRERESPONSE;
754        if ("ReferralRequest".equals(codeString))
755          return REFERRALREQUEST;
756        if ("RelatedPerson".equals(codeString))
757          return RELATEDPERSON;
758        if ("RequestGroup".equals(codeString))
759          return REQUESTGROUP;
760        if ("ResearchStudy".equals(codeString))
761          return RESEARCHSTUDY;
762        if ("ResearchSubject".equals(codeString))
763          return RESEARCHSUBJECT;
764        if ("Resource".equals(codeString))
765          return RESOURCE;
766        if ("RiskAssessment".equals(codeString))
767          return RISKASSESSMENT;
768        if ("Schedule".equals(codeString))
769          return SCHEDULE;
770        if ("SearchParameter".equals(codeString))
771          return SEARCHPARAMETER;
772        if ("Sequence".equals(codeString))
773          return SEQUENCE;
774        if ("ServiceDefinition".equals(codeString))
775          return SERVICEDEFINITION;
776        if ("Slot".equals(codeString))
777          return SLOT;
778        if ("Specimen".equals(codeString))
779          return SPECIMEN;
780        if ("StructureDefinition".equals(codeString))
781          return STRUCTUREDEFINITION;
782        if ("StructureMap".equals(codeString))
783          return STRUCTUREMAP;
784        if ("Subscription".equals(codeString))
785          return SUBSCRIPTION;
786        if ("Substance".equals(codeString))
787          return SUBSTANCE;
788        if ("SupplyDelivery".equals(codeString))
789          return SUPPLYDELIVERY;
790        if ("SupplyRequest".equals(codeString))
791          return SUPPLYREQUEST;
792        if ("Task".equals(codeString))
793          return TASK;
794        if ("TestReport".equals(codeString))
795          return TESTREPORT;
796        if ("TestScript".equals(codeString))
797          return TESTSCRIPT;
798        if ("ValueSet".equals(codeString))
799          return VALUESET;
800        if ("VisionPrescription".equals(codeString))
801          return VISIONPRESCRIPTION;
802        if (Configuration.isAcceptInvalidEnums())
803          return null;
804        else
805          throw new FHIRException("Unknown ActivityDefinitionKind code '"+codeString+"'");
806        }
807        public String toCode() {
808          switch (this) {
809            case ACCOUNT: return "Account";
810            case ACTIVITYDEFINITION: return "ActivityDefinition";
811            case ADVERSEEVENT: return "AdverseEvent";
812            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
813            case APPOINTMENT: return "Appointment";
814            case APPOINTMENTRESPONSE: return "AppointmentResponse";
815            case AUDITEVENT: return "AuditEvent";
816            case BASIC: return "Basic";
817            case BINARY: return "Binary";
818            case BODYSITE: return "BodySite";
819            case BUNDLE: return "Bundle";
820            case CAPABILITYSTATEMENT: return "CapabilityStatement";
821            case CAREPLAN: return "CarePlan";
822            case CARETEAM: return "CareTeam";
823            case CHARGEITEM: return "ChargeItem";
824            case CLAIM: return "Claim";
825            case CLAIMRESPONSE: return "ClaimResponse";
826            case CLINICALIMPRESSION: return "ClinicalImpression";
827            case CODESYSTEM: return "CodeSystem";
828            case COMMUNICATION: return "Communication";
829            case COMMUNICATIONREQUEST: return "CommunicationRequest";
830            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
831            case COMPOSITION: return "Composition";
832            case CONCEPTMAP: return "ConceptMap";
833            case CONDITION: return "Condition";
834            case CONSENT: return "Consent";
835            case CONTRACT: return "Contract";
836            case COVERAGE: return "Coverage";
837            case DATAELEMENT: return "DataElement";
838            case DETECTEDISSUE: return "DetectedIssue";
839            case DEVICE: return "Device";
840            case DEVICECOMPONENT: return "DeviceComponent";
841            case DEVICEMETRIC: return "DeviceMetric";
842            case DEVICEREQUEST: return "DeviceRequest";
843            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
844            case DIAGNOSTICREPORT: return "DiagnosticReport";
845            case DOCUMENTMANIFEST: return "DocumentManifest";
846            case DOCUMENTREFERENCE: return "DocumentReference";
847            case DOMAINRESOURCE: return "DomainResource";
848            case ELIGIBILITYREQUEST: return "EligibilityRequest";
849            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
850            case ENCOUNTER: return "Encounter";
851            case ENDPOINT: return "Endpoint";
852            case ENROLLMENTREQUEST: return "EnrollmentRequest";
853            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
854            case EPISODEOFCARE: return "EpisodeOfCare";
855            case EXPANSIONPROFILE: return "ExpansionProfile";
856            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
857            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
858            case FLAG: return "Flag";
859            case GOAL: return "Goal";
860            case GRAPHDEFINITION: return "GraphDefinition";
861            case GROUP: return "Group";
862            case GUIDANCERESPONSE: return "GuidanceResponse";
863            case HEALTHCARESERVICE: return "HealthcareService";
864            case IMAGINGMANIFEST: return "ImagingManifest";
865            case IMAGINGSTUDY: return "ImagingStudy";
866            case IMMUNIZATION: return "Immunization";
867            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
868            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
869            case LIBRARY: return "Library";
870            case LINKAGE: return "Linkage";
871            case LIST: return "List";
872            case LOCATION: return "Location";
873            case MEASURE: return "Measure";
874            case MEASUREREPORT: return "MeasureReport";
875            case MEDIA: return "Media";
876            case MEDICATION: return "Medication";
877            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
878            case MEDICATIONDISPENSE: return "MedicationDispense";
879            case MEDICATIONREQUEST: return "MedicationRequest";
880            case MEDICATIONSTATEMENT: return "MedicationStatement";
881            case MESSAGEDEFINITION: return "MessageDefinition";
882            case MESSAGEHEADER: return "MessageHeader";
883            case NAMINGSYSTEM: return "NamingSystem";
884            case NUTRITIONORDER: return "NutritionOrder";
885            case OBSERVATION: return "Observation";
886            case OPERATIONDEFINITION: return "OperationDefinition";
887            case OPERATIONOUTCOME: return "OperationOutcome";
888            case ORGANIZATION: return "Organization";
889            case PARAMETERS: return "Parameters";
890            case PATIENT: return "Patient";
891            case PAYMENTNOTICE: return "PaymentNotice";
892            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
893            case PERSON: return "Person";
894            case PLANDEFINITION: return "PlanDefinition";
895            case PRACTITIONER: return "Practitioner";
896            case PRACTITIONERROLE: return "PractitionerRole";
897            case PROCEDURE: return "Procedure";
898            case PROCEDUREREQUEST: return "ProcedureRequest";
899            case PROCESSREQUEST: return "ProcessRequest";
900            case PROCESSRESPONSE: return "ProcessResponse";
901            case PROVENANCE: return "Provenance";
902            case QUESTIONNAIRE: return "Questionnaire";
903            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
904            case REFERRALREQUEST: return "ReferralRequest";
905            case RELATEDPERSON: return "RelatedPerson";
906            case REQUESTGROUP: return "RequestGroup";
907            case RESEARCHSTUDY: return "ResearchStudy";
908            case RESEARCHSUBJECT: return "ResearchSubject";
909            case RESOURCE: return "Resource";
910            case RISKASSESSMENT: return "RiskAssessment";
911            case SCHEDULE: return "Schedule";
912            case SEARCHPARAMETER: return "SearchParameter";
913            case SEQUENCE: return "Sequence";
914            case SERVICEDEFINITION: return "ServiceDefinition";
915            case SLOT: return "Slot";
916            case SPECIMEN: return "Specimen";
917            case STRUCTUREDEFINITION: return "StructureDefinition";
918            case STRUCTUREMAP: return "StructureMap";
919            case SUBSCRIPTION: return "Subscription";
920            case SUBSTANCE: return "Substance";
921            case SUPPLYDELIVERY: return "SupplyDelivery";
922            case SUPPLYREQUEST: return "SupplyRequest";
923            case TASK: return "Task";
924            case TESTREPORT: return "TestReport";
925            case TESTSCRIPT: return "TestScript";
926            case VALUESET: return "ValueSet";
927            case VISIONPRESCRIPTION: return "VisionPrescription";
928            default: return "?";
929          }
930        }
931        public String getSystem() {
932          switch (this) {
933            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
934            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
935            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
936            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
937            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
938            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
939            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
940            case BASIC: return "http://hl7.org/fhir/resource-types";
941            case BINARY: return "http://hl7.org/fhir/resource-types";
942            case BODYSITE: return "http://hl7.org/fhir/resource-types";
943            case BUNDLE: return "http://hl7.org/fhir/resource-types";
944            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
945            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
946            case CARETEAM: return "http://hl7.org/fhir/resource-types";
947            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
948            case CLAIM: return "http://hl7.org/fhir/resource-types";
949            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
950            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
951            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
952            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
953            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
954            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
955            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
956            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
957            case CONDITION: return "http://hl7.org/fhir/resource-types";
958            case CONSENT: return "http://hl7.org/fhir/resource-types";
959            case CONTRACT: return "http://hl7.org/fhir/resource-types";
960            case COVERAGE: return "http://hl7.org/fhir/resource-types";
961            case DATAELEMENT: return "http://hl7.org/fhir/resource-types";
962            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
963            case DEVICE: return "http://hl7.org/fhir/resource-types";
964            case DEVICECOMPONENT: return "http://hl7.org/fhir/resource-types";
965            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
966            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
967            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
968            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
969            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
970            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
971            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
972            case ELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
973            case ELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
974            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
975            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
976            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
977            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
978            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
979            case EXPANSIONPROFILE: return "http://hl7.org/fhir/resource-types";
980            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
981            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
982            case FLAG: return "http://hl7.org/fhir/resource-types";
983            case GOAL: return "http://hl7.org/fhir/resource-types";
984            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
985            case GROUP: return "http://hl7.org/fhir/resource-types";
986            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
987            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
988            case IMAGINGMANIFEST: return "http://hl7.org/fhir/resource-types";
989            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
990            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
991            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
992            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
993            case LIBRARY: return "http://hl7.org/fhir/resource-types";
994            case LINKAGE: return "http://hl7.org/fhir/resource-types";
995            case LIST: return "http://hl7.org/fhir/resource-types";
996            case LOCATION: return "http://hl7.org/fhir/resource-types";
997            case MEASURE: return "http://hl7.org/fhir/resource-types";
998            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
999            case MEDIA: return "http://hl7.org/fhir/resource-types";
1000            case MEDICATION: return "http://hl7.org/fhir/resource-types";
1001            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
1002            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
1003            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
1004            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
1005            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
1006            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
1007            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
1008            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
1009            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
1010            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
1011            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
1012            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
1013            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
1014            case PATIENT: return "http://hl7.org/fhir/resource-types";
1015            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
1016            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
1017            case PERSON: return "http://hl7.org/fhir/resource-types";
1018            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
1019            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
1020            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
1021            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
1022            case PROCEDUREREQUEST: return "http://hl7.org/fhir/resource-types";
1023            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
1024            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
1025            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
1026            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
1027            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
1028            case REFERRALREQUEST: return "http://hl7.org/fhir/resource-types";
1029            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
1030            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
1031            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
1032            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
1033            case RESOURCE: return "http://hl7.org/fhir/resource-types";
1034            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
1035            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
1036            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
1037            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
1038            case SERVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
1039            case SLOT: return "http://hl7.org/fhir/resource-types";
1040            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
1041            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
1042            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
1043            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
1044            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
1045            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
1046            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
1047            case TASK: return "http://hl7.org/fhir/resource-types";
1048            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
1049            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
1050            case VALUESET: return "http://hl7.org/fhir/resource-types";
1051            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
1052            default: return "?";
1053          }
1054        }
1055        public String getDefinition() {
1056          switch (this) {
1057            case ACCOUNT: return "A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc.";
1058            case ACTIVITYDEFINITION: return "This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.";
1059            case ADVERSEEVENT: return "Actual or  potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death.";
1060            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
1061            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).";
1062            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
1063            case AUDITEVENT: return "A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.";
1064            case BASIC: return "Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification.";
1065            case BINARY: return "A binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
1066            case BODYSITE: return "Record details about the anatomical location of a specimen or body part.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
1067            case BUNDLE: return "A container for a collection of resources.";
1068            case CAPABILITYSTATEMENT: return "A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation.";
1069            case CAREPLAN: return "Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions.";
1070            case CARETEAM: return "The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.";
1071            case CHARGEITEM: return "The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation.";
1072            case CLAIM: return "A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery.";
1073            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
1074            case CLINICALIMPRESSION: return "A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called \"ClinicalImpression\" rather than \"ClinicalAssessment\" to avoid confusion with the recording of assessment tools such as Apgar score.";
1075            case CODESYSTEM: return "A code system resource specifies a set of codes drawn from one or more code systems.";
1076            case COMMUNICATION: return "An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency was notified about a reportable condition.";
1077            case COMMUNICATIONREQUEST: return "A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition.";
1078            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
1079            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical document that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in a Bundle, of which the Composition is the first resource contained.";
1080            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either code systems or data elements, or classes in class models.";
1081            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
1082            case CONSENT: return "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.";
1083            case CONTRACT: return "A formal agreement between parties regarding the conduct of business, exchange of information or other matters.";
1084            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services.";
1085            case DATAELEMENT: return "The formal description of a single piece of information that can be gathered and reported.";
1086            case DETECTEDISSUE: return "Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc.";
1087            case DEVICE: return "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.  Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.";
1088            case DEVICECOMPONENT: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
1089            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
1090            case DEVICEREQUEST: return "Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker.";
1091            case DEVICEUSESTATEMENT: return "A record of a device being used by a patient where the record is the result of a report from the patient or another clinician.";
1092            case DIAGNOSTICREPORT: return "The findings and interpretation of diagnostic  tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports.";
1093            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
1094            case DOCUMENTREFERENCE: return "A reference to a document.";
1095            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
1096            case ELIGIBILITYREQUEST: return "The EligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an EligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
1097            case ELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an Eligibility resource.";
1098            case ENCOUNTER: return "An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient.";
1099            case ENDPOINT: return "The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information.";
1100            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
1101            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
1102            case EPISODEOFCARE: return "An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time.";
1103            case EXPANSIONPROFILE: return "Resource to define constraints on the Expansion of a FHIR ValueSet.";
1104            case EXPLANATIONOFBENEFIT: return "This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.";
1105            case FAMILYMEMBERHISTORY: return "Significant health events and conditions for a person related to the patient relevant in the context of care for the patient.";
1106            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
1107            case GOAL: return "Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.";
1108            case GRAPHDEFINITION: return "A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set.";
1109            case GROUP: return "Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization.";
1110            case GUIDANCERESPONSE: return "A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken.";
1111            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
1112            case IMAGINGMANIFEST: return "A text description of the DICOM SOP instances selected in the ImagingManifest; or the reason for, or significance of, the selection.";
1113            case IMAGINGSTUDY: return "Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities.";
1114            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed.";
1115            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time immunization and recommendation (i.e. forecasting a patient's immunization eligibility according to a published schedule) with optional supporting justification.";
1116            case IMPLEMENTATIONGUIDE: return "A set of rules of how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts.";
1117            case LIBRARY: return "The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.";
1118            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
1119            case LIST: return "A set of information summarized from a list of other resources.";
1120            case LOCATION: return "Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated.";
1121            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
1122            case MEASUREREPORT: return "The MeasureReport resource contains the results of evaluating a measure.";
1123            case MEDIA: return "A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.";
1124            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.";
1125            case MEDICATIONADMINISTRATION: return "Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion.  Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner.";
1126            case MEDICATIONDISPENSE: return "Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order.";
1127            case MEDICATIONREQUEST: return "An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called \"MedicationRequest\" rather than \"MedicationPrescription\" or \"MedicationOrder\" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns.";
1128            case MEDICATIONSTATEMENT: return "A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now, or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains \r\rThe primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medication statement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.";
1129            case MESSAGEDEFINITION: return "Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted.";
1130            case MESSAGEHEADER: return "The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.";
1131            case NAMINGSYSTEM: return "A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a \"System\" used within the Identifier and Coding data types.";
1132            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
1133            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
1134            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
1135            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
1136            case ORGANIZATION: return "A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.";
1137            case PARAMETERS: return "This special resource type is used to represent an operation request and response (operations.html). It has no other use, and there is no RESTful endpoint associated with it.";
1138            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
1139            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
1140            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
1141            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
1142            case PLANDEFINITION: return "This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.";
1143            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
1144            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
1145            case PROCEDURE: return "An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy.";
1146            case PROCEDUREREQUEST: return "A record of a request for diagnostic investigations, treatments, or operations to be performed.";
1147            case PROCESSREQUEST: return "This resource provides the target, request and response, and action details for an action to be performed by the target on or about existing resources.";
1148            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
1149            case PROVENANCE: return "Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies.";
1150            case QUESTIONNAIRE: return "A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection.";
1151            case QUESTIONNAIRERESPONSE: return "A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to.";
1152            case REFERRALREQUEST: return "Used to record and send details about a request for referral service or transfer of a patient to the care of another provider or provider organization.";
1153            case RELATEDPERSON: return "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.";
1154            case REQUESTGROUP: return "A group of related requests that can be used to capture intended activities that have inter-dependencies such as \"give this medication after that one\".";
1155            case RESEARCHSTUDY: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
1156            case RESEARCHSUBJECT: return "A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge.  This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques.  A ResearchStudy involves the gathering of information about human or animal subjects.";
1157            case RESOURCE: return "This is the base resource type for everything.";
1158            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
1159            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
1160            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
1161            case SEQUENCE: return "Raw data describing a biological sequence.";
1162            case SERVICEDEFINITION: return "The ServiceDefinition describes a unit of decision support functionality that is made available as a service, such as immunization modules or drug-drug interaction checking.";
1163            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
1164            case SPECIMEN: return "A sample to be used for analysis.";
1165            case STRUCTUREDEFINITION: return "A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types.";
1166            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
1167            case SUBSCRIPTION: return "The subscription resource is used to define a push based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined \"channel\" so that another system is able to take an appropriate action.";
1168            case SUBSTANCE: return "A homogeneous material with a definite composition.";
1169            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
1170            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
1171            case TASK: return "A task to be performed.";
1172            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
1173            case TESTSCRIPT: return "A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.";
1174            case VALUESET: return "A value set specifies a set of codes drawn from one or more code systems.";
1175            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
1176            default: return "?";
1177          }
1178        }
1179        public String getDisplay() {
1180          switch (this) {
1181            case ACCOUNT: return "Account";
1182            case ACTIVITYDEFINITION: return "ActivityDefinition";
1183            case ADVERSEEVENT: return "AdverseEvent";
1184            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
1185            case APPOINTMENT: return "Appointment";
1186            case APPOINTMENTRESPONSE: return "AppointmentResponse";
1187            case AUDITEVENT: return "AuditEvent";
1188            case BASIC: return "Basic";
1189            case BINARY: return "Binary";
1190            case BODYSITE: return "BodySite";
1191            case BUNDLE: return "Bundle";
1192            case CAPABILITYSTATEMENT: return "CapabilityStatement";
1193            case CAREPLAN: return "CarePlan";
1194            case CARETEAM: return "CareTeam";
1195            case CHARGEITEM: return "ChargeItem";
1196            case CLAIM: return "Claim";
1197            case CLAIMRESPONSE: return "ClaimResponse";
1198            case CLINICALIMPRESSION: return "ClinicalImpression";
1199            case CODESYSTEM: return "CodeSystem";
1200            case COMMUNICATION: return "Communication";
1201            case COMMUNICATIONREQUEST: return "CommunicationRequest";
1202            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
1203            case COMPOSITION: return "Composition";
1204            case CONCEPTMAP: return "ConceptMap";
1205            case CONDITION: return "Condition";
1206            case CONSENT: return "Consent";
1207            case CONTRACT: return "Contract";
1208            case COVERAGE: return "Coverage";
1209            case DATAELEMENT: return "DataElement";
1210            case DETECTEDISSUE: return "DetectedIssue";
1211            case DEVICE: return "Device";
1212            case DEVICECOMPONENT: return "DeviceComponent";
1213            case DEVICEMETRIC: return "DeviceMetric";
1214            case DEVICEREQUEST: return "DeviceRequest";
1215            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
1216            case DIAGNOSTICREPORT: return "DiagnosticReport";
1217            case DOCUMENTMANIFEST: return "DocumentManifest";
1218            case DOCUMENTREFERENCE: return "DocumentReference";
1219            case DOMAINRESOURCE: return "DomainResource";
1220            case ELIGIBILITYREQUEST: return "EligibilityRequest";
1221            case ELIGIBILITYRESPONSE: return "EligibilityResponse";
1222            case ENCOUNTER: return "Encounter";
1223            case ENDPOINT: return "Endpoint";
1224            case ENROLLMENTREQUEST: return "EnrollmentRequest";
1225            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
1226            case EPISODEOFCARE: return "EpisodeOfCare";
1227            case EXPANSIONPROFILE: return "ExpansionProfile";
1228            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
1229            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
1230            case FLAG: return "Flag";
1231            case GOAL: return "Goal";
1232            case GRAPHDEFINITION: return "GraphDefinition";
1233            case GROUP: return "Group";
1234            case GUIDANCERESPONSE: return "GuidanceResponse";
1235            case HEALTHCARESERVICE: return "HealthcareService";
1236            case IMAGINGMANIFEST: return "ImagingManifest";
1237            case IMAGINGSTUDY: return "ImagingStudy";
1238            case IMMUNIZATION: return "Immunization";
1239            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
1240            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
1241            case LIBRARY: return "Library";
1242            case LINKAGE: return "Linkage";
1243            case LIST: return "List";
1244            case LOCATION: return "Location";
1245            case MEASURE: return "Measure";
1246            case MEASUREREPORT: return "MeasureReport";
1247            case MEDIA: return "Media";
1248            case MEDICATION: return "Medication";
1249            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
1250            case MEDICATIONDISPENSE: return "MedicationDispense";
1251            case MEDICATIONREQUEST: return "MedicationRequest";
1252            case MEDICATIONSTATEMENT: return "MedicationStatement";
1253            case MESSAGEDEFINITION: return "MessageDefinition";
1254            case MESSAGEHEADER: return "MessageHeader";
1255            case NAMINGSYSTEM: return "NamingSystem";
1256            case NUTRITIONORDER: return "NutritionOrder";
1257            case OBSERVATION: return "Observation";
1258            case OPERATIONDEFINITION: return "OperationDefinition";
1259            case OPERATIONOUTCOME: return "OperationOutcome";
1260            case ORGANIZATION: return "Organization";
1261            case PARAMETERS: return "Parameters";
1262            case PATIENT: return "Patient";
1263            case PAYMENTNOTICE: return "PaymentNotice";
1264            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
1265            case PERSON: return "Person";
1266            case PLANDEFINITION: return "PlanDefinition";
1267            case PRACTITIONER: return "Practitioner";
1268            case PRACTITIONERROLE: return "PractitionerRole";
1269            case PROCEDURE: return "Procedure";
1270            case PROCEDUREREQUEST: return "ProcedureRequest";
1271            case PROCESSREQUEST: return "ProcessRequest";
1272            case PROCESSRESPONSE: return "ProcessResponse";
1273            case PROVENANCE: return "Provenance";
1274            case QUESTIONNAIRE: return "Questionnaire";
1275            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
1276            case REFERRALREQUEST: return "ReferralRequest";
1277            case RELATEDPERSON: return "RelatedPerson";
1278            case REQUESTGROUP: return "RequestGroup";
1279            case RESEARCHSTUDY: return "ResearchStudy";
1280            case RESEARCHSUBJECT: return "ResearchSubject";
1281            case RESOURCE: return "Resource";
1282            case RISKASSESSMENT: return "RiskAssessment";
1283            case SCHEDULE: return "Schedule";
1284            case SEARCHPARAMETER: return "SearchParameter";
1285            case SEQUENCE: return "Sequence";
1286            case SERVICEDEFINITION: return "ServiceDefinition";
1287            case SLOT: return "Slot";
1288            case SPECIMEN: return "Specimen";
1289            case STRUCTUREDEFINITION: return "StructureDefinition";
1290            case STRUCTUREMAP: return "StructureMap";
1291            case SUBSCRIPTION: return "Subscription";
1292            case SUBSTANCE: return "Substance";
1293            case SUPPLYDELIVERY: return "SupplyDelivery";
1294            case SUPPLYREQUEST: return "SupplyRequest";
1295            case TASK: return "Task";
1296            case TESTREPORT: return "TestReport";
1297            case TESTSCRIPT: return "TestScript";
1298            case VALUESET: return "ValueSet";
1299            case VISIONPRESCRIPTION: return "VisionPrescription";
1300            default: return "?";
1301          }
1302        }
1303    }
1304
1305  public static class ActivityDefinitionKindEnumFactory implements EnumFactory<ActivityDefinitionKind> {
1306    public ActivityDefinitionKind fromCode(String codeString) throws IllegalArgumentException {
1307      if (codeString == null || "".equals(codeString))
1308            if (codeString == null || "".equals(codeString))
1309                return null;
1310        if ("Account".equals(codeString))
1311          return ActivityDefinitionKind.ACCOUNT;
1312        if ("ActivityDefinition".equals(codeString))
1313          return ActivityDefinitionKind.ACTIVITYDEFINITION;
1314        if ("AdverseEvent".equals(codeString))
1315          return ActivityDefinitionKind.ADVERSEEVENT;
1316        if ("AllergyIntolerance".equals(codeString))
1317          return ActivityDefinitionKind.ALLERGYINTOLERANCE;
1318        if ("Appointment".equals(codeString))
1319          return ActivityDefinitionKind.APPOINTMENT;
1320        if ("AppointmentResponse".equals(codeString))
1321          return ActivityDefinitionKind.APPOINTMENTRESPONSE;
1322        if ("AuditEvent".equals(codeString))
1323          return ActivityDefinitionKind.AUDITEVENT;
1324        if ("Basic".equals(codeString))
1325          return ActivityDefinitionKind.BASIC;
1326        if ("Binary".equals(codeString))
1327          return ActivityDefinitionKind.BINARY;
1328        if ("BodySite".equals(codeString))
1329          return ActivityDefinitionKind.BODYSITE;
1330        if ("Bundle".equals(codeString))
1331          return ActivityDefinitionKind.BUNDLE;
1332        if ("CapabilityStatement".equals(codeString))
1333          return ActivityDefinitionKind.CAPABILITYSTATEMENT;
1334        if ("CarePlan".equals(codeString))
1335          return ActivityDefinitionKind.CAREPLAN;
1336        if ("CareTeam".equals(codeString))
1337          return ActivityDefinitionKind.CARETEAM;
1338        if ("ChargeItem".equals(codeString))
1339          return ActivityDefinitionKind.CHARGEITEM;
1340        if ("Claim".equals(codeString))
1341          return ActivityDefinitionKind.CLAIM;
1342        if ("ClaimResponse".equals(codeString))
1343          return ActivityDefinitionKind.CLAIMRESPONSE;
1344        if ("ClinicalImpression".equals(codeString))
1345          return ActivityDefinitionKind.CLINICALIMPRESSION;
1346        if ("CodeSystem".equals(codeString))
1347          return ActivityDefinitionKind.CODESYSTEM;
1348        if ("Communication".equals(codeString))
1349          return ActivityDefinitionKind.COMMUNICATION;
1350        if ("CommunicationRequest".equals(codeString))
1351          return ActivityDefinitionKind.COMMUNICATIONREQUEST;
1352        if ("CompartmentDefinition".equals(codeString))
1353          return ActivityDefinitionKind.COMPARTMENTDEFINITION;
1354        if ("Composition".equals(codeString))
1355          return ActivityDefinitionKind.COMPOSITION;
1356        if ("ConceptMap".equals(codeString))
1357          return ActivityDefinitionKind.CONCEPTMAP;
1358        if ("Condition".equals(codeString))
1359          return ActivityDefinitionKind.CONDITION;
1360        if ("Consent".equals(codeString))
1361          return ActivityDefinitionKind.CONSENT;
1362        if ("Contract".equals(codeString))
1363          return ActivityDefinitionKind.CONTRACT;
1364        if ("Coverage".equals(codeString))
1365          return ActivityDefinitionKind.COVERAGE;
1366        if ("DataElement".equals(codeString))
1367          return ActivityDefinitionKind.DATAELEMENT;
1368        if ("DetectedIssue".equals(codeString))
1369          return ActivityDefinitionKind.DETECTEDISSUE;
1370        if ("Device".equals(codeString))
1371          return ActivityDefinitionKind.DEVICE;
1372        if ("DeviceComponent".equals(codeString))
1373          return ActivityDefinitionKind.DEVICECOMPONENT;
1374        if ("DeviceMetric".equals(codeString))
1375          return ActivityDefinitionKind.DEVICEMETRIC;
1376        if ("DeviceRequest".equals(codeString))
1377          return ActivityDefinitionKind.DEVICEREQUEST;
1378        if ("DeviceUseStatement".equals(codeString))
1379          return ActivityDefinitionKind.DEVICEUSESTATEMENT;
1380        if ("DiagnosticReport".equals(codeString))
1381          return ActivityDefinitionKind.DIAGNOSTICREPORT;
1382        if ("DocumentManifest".equals(codeString))
1383          return ActivityDefinitionKind.DOCUMENTMANIFEST;
1384        if ("DocumentReference".equals(codeString))
1385          return ActivityDefinitionKind.DOCUMENTREFERENCE;
1386        if ("DomainResource".equals(codeString))
1387          return ActivityDefinitionKind.DOMAINRESOURCE;
1388        if ("EligibilityRequest".equals(codeString))
1389          return ActivityDefinitionKind.ELIGIBILITYREQUEST;
1390        if ("EligibilityResponse".equals(codeString))
1391          return ActivityDefinitionKind.ELIGIBILITYRESPONSE;
1392        if ("Encounter".equals(codeString))
1393          return ActivityDefinitionKind.ENCOUNTER;
1394        if ("Endpoint".equals(codeString))
1395          return ActivityDefinitionKind.ENDPOINT;
1396        if ("EnrollmentRequest".equals(codeString))
1397          return ActivityDefinitionKind.ENROLLMENTREQUEST;
1398        if ("EnrollmentResponse".equals(codeString))
1399          return ActivityDefinitionKind.ENROLLMENTRESPONSE;
1400        if ("EpisodeOfCare".equals(codeString))
1401          return ActivityDefinitionKind.EPISODEOFCARE;
1402        if ("ExpansionProfile".equals(codeString))
1403          return ActivityDefinitionKind.EXPANSIONPROFILE;
1404        if ("ExplanationOfBenefit".equals(codeString))
1405          return ActivityDefinitionKind.EXPLANATIONOFBENEFIT;
1406        if ("FamilyMemberHistory".equals(codeString))
1407          return ActivityDefinitionKind.FAMILYMEMBERHISTORY;
1408        if ("Flag".equals(codeString))
1409          return ActivityDefinitionKind.FLAG;
1410        if ("Goal".equals(codeString))
1411          return ActivityDefinitionKind.GOAL;
1412        if ("GraphDefinition".equals(codeString))
1413          return ActivityDefinitionKind.GRAPHDEFINITION;
1414        if ("Group".equals(codeString))
1415          return ActivityDefinitionKind.GROUP;
1416        if ("GuidanceResponse".equals(codeString))
1417          return ActivityDefinitionKind.GUIDANCERESPONSE;
1418        if ("HealthcareService".equals(codeString))
1419          return ActivityDefinitionKind.HEALTHCARESERVICE;
1420        if ("ImagingManifest".equals(codeString))
1421          return ActivityDefinitionKind.IMAGINGMANIFEST;
1422        if ("ImagingStudy".equals(codeString))
1423          return ActivityDefinitionKind.IMAGINGSTUDY;
1424        if ("Immunization".equals(codeString))
1425          return ActivityDefinitionKind.IMMUNIZATION;
1426        if ("ImmunizationRecommendation".equals(codeString))
1427          return ActivityDefinitionKind.IMMUNIZATIONRECOMMENDATION;
1428        if ("ImplementationGuide".equals(codeString))
1429          return ActivityDefinitionKind.IMPLEMENTATIONGUIDE;
1430        if ("Library".equals(codeString))
1431          return ActivityDefinitionKind.LIBRARY;
1432        if ("Linkage".equals(codeString))
1433          return ActivityDefinitionKind.LINKAGE;
1434        if ("List".equals(codeString))
1435          return ActivityDefinitionKind.LIST;
1436        if ("Location".equals(codeString))
1437          return ActivityDefinitionKind.LOCATION;
1438        if ("Measure".equals(codeString))
1439          return ActivityDefinitionKind.MEASURE;
1440        if ("MeasureReport".equals(codeString))
1441          return ActivityDefinitionKind.MEASUREREPORT;
1442        if ("Media".equals(codeString))
1443          return ActivityDefinitionKind.MEDIA;
1444        if ("Medication".equals(codeString))
1445          return ActivityDefinitionKind.MEDICATION;
1446        if ("MedicationAdministration".equals(codeString))
1447          return ActivityDefinitionKind.MEDICATIONADMINISTRATION;
1448        if ("MedicationDispense".equals(codeString))
1449          return ActivityDefinitionKind.MEDICATIONDISPENSE;
1450        if ("MedicationRequest".equals(codeString))
1451          return ActivityDefinitionKind.MEDICATIONREQUEST;
1452        if ("MedicationStatement".equals(codeString))
1453          return ActivityDefinitionKind.MEDICATIONSTATEMENT;
1454        if ("MessageDefinition".equals(codeString))
1455          return ActivityDefinitionKind.MESSAGEDEFINITION;
1456        if ("MessageHeader".equals(codeString))
1457          return ActivityDefinitionKind.MESSAGEHEADER;
1458        if ("NamingSystem".equals(codeString))
1459          return ActivityDefinitionKind.NAMINGSYSTEM;
1460        if ("NutritionOrder".equals(codeString))
1461          return ActivityDefinitionKind.NUTRITIONORDER;
1462        if ("Observation".equals(codeString))
1463          return ActivityDefinitionKind.OBSERVATION;
1464        if ("OperationDefinition".equals(codeString))
1465          return ActivityDefinitionKind.OPERATIONDEFINITION;
1466        if ("OperationOutcome".equals(codeString))
1467          return ActivityDefinitionKind.OPERATIONOUTCOME;
1468        if ("Organization".equals(codeString))
1469          return ActivityDefinitionKind.ORGANIZATION;
1470        if ("Parameters".equals(codeString))
1471          return ActivityDefinitionKind.PARAMETERS;
1472        if ("Patient".equals(codeString))
1473          return ActivityDefinitionKind.PATIENT;
1474        if ("PaymentNotice".equals(codeString))
1475          return ActivityDefinitionKind.PAYMENTNOTICE;
1476        if ("PaymentReconciliation".equals(codeString))
1477          return ActivityDefinitionKind.PAYMENTRECONCILIATION;
1478        if ("Person".equals(codeString))
1479          return ActivityDefinitionKind.PERSON;
1480        if ("PlanDefinition".equals(codeString))
1481          return ActivityDefinitionKind.PLANDEFINITION;
1482        if ("Practitioner".equals(codeString))
1483          return ActivityDefinitionKind.PRACTITIONER;
1484        if ("PractitionerRole".equals(codeString))
1485          return ActivityDefinitionKind.PRACTITIONERROLE;
1486        if ("Procedure".equals(codeString))
1487          return ActivityDefinitionKind.PROCEDURE;
1488        if ("ProcedureRequest".equals(codeString))
1489          return ActivityDefinitionKind.PROCEDUREREQUEST;
1490        if ("ProcessRequest".equals(codeString))
1491          return ActivityDefinitionKind.PROCESSREQUEST;
1492        if ("ProcessResponse".equals(codeString))
1493          return ActivityDefinitionKind.PROCESSRESPONSE;
1494        if ("Provenance".equals(codeString))
1495          return ActivityDefinitionKind.PROVENANCE;
1496        if ("Questionnaire".equals(codeString))
1497          return ActivityDefinitionKind.QUESTIONNAIRE;
1498        if ("QuestionnaireResponse".equals(codeString))
1499          return ActivityDefinitionKind.QUESTIONNAIRERESPONSE;
1500        if ("ReferralRequest".equals(codeString))
1501          return ActivityDefinitionKind.REFERRALREQUEST;
1502        if ("RelatedPerson".equals(codeString))
1503          return ActivityDefinitionKind.RELATEDPERSON;
1504        if ("RequestGroup".equals(codeString))
1505          return ActivityDefinitionKind.REQUESTGROUP;
1506        if ("ResearchStudy".equals(codeString))
1507          return ActivityDefinitionKind.RESEARCHSTUDY;
1508        if ("ResearchSubject".equals(codeString))
1509          return ActivityDefinitionKind.RESEARCHSUBJECT;
1510        if ("Resource".equals(codeString))
1511          return ActivityDefinitionKind.RESOURCE;
1512        if ("RiskAssessment".equals(codeString))
1513          return ActivityDefinitionKind.RISKASSESSMENT;
1514        if ("Schedule".equals(codeString))
1515          return ActivityDefinitionKind.SCHEDULE;
1516        if ("SearchParameter".equals(codeString))
1517          return ActivityDefinitionKind.SEARCHPARAMETER;
1518        if ("Sequence".equals(codeString))
1519          return ActivityDefinitionKind.SEQUENCE;
1520        if ("ServiceDefinition".equals(codeString))
1521          return ActivityDefinitionKind.SERVICEDEFINITION;
1522        if ("Slot".equals(codeString))
1523          return ActivityDefinitionKind.SLOT;
1524        if ("Specimen".equals(codeString))
1525          return ActivityDefinitionKind.SPECIMEN;
1526        if ("StructureDefinition".equals(codeString))
1527          return ActivityDefinitionKind.STRUCTUREDEFINITION;
1528        if ("StructureMap".equals(codeString))
1529          return ActivityDefinitionKind.STRUCTUREMAP;
1530        if ("Subscription".equals(codeString))
1531          return ActivityDefinitionKind.SUBSCRIPTION;
1532        if ("Substance".equals(codeString))
1533          return ActivityDefinitionKind.SUBSTANCE;
1534        if ("SupplyDelivery".equals(codeString))
1535          return ActivityDefinitionKind.SUPPLYDELIVERY;
1536        if ("SupplyRequest".equals(codeString))
1537          return ActivityDefinitionKind.SUPPLYREQUEST;
1538        if ("Task".equals(codeString))
1539          return ActivityDefinitionKind.TASK;
1540        if ("TestReport".equals(codeString))
1541          return ActivityDefinitionKind.TESTREPORT;
1542        if ("TestScript".equals(codeString))
1543          return ActivityDefinitionKind.TESTSCRIPT;
1544        if ("ValueSet".equals(codeString))
1545          return ActivityDefinitionKind.VALUESET;
1546        if ("VisionPrescription".equals(codeString))
1547          return ActivityDefinitionKind.VISIONPRESCRIPTION;
1548        throw new IllegalArgumentException("Unknown ActivityDefinitionKind code '"+codeString+"'");
1549        }
1550        public Enumeration<ActivityDefinitionKind> fromType(Base code) throws FHIRException {
1551          if (code == null)
1552            return null;
1553          if (code.isEmpty())
1554            return new Enumeration<ActivityDefinitionKind>(this);
1555          String codeString = ((PrimitiveType) code).asStringValue();
1556          if (codeString == null || "".equals(codeString))
1557            return null;
1558        if ("Account".equals(codeString))
1559          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ACCOUNT);
1560        if ("ActivityDefinition".equals(codeString))
1561          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ACTIVITYDEFINITION);
1562        if ("AdverseEvent".equals(codeString))
1563          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ADVERSEEVENT);
1564        if ("AllergyIntolerance".equals(codeString))
1565          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ALLERGYINTOLERANCE);
1566        if ("Appointment".equals(codeString))
1567          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.APPOINTMENT);
1568        if ("AppointmentResponse".equals(codeString))
1569          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.APPOINTMENTRESPONSE);
1570        if ("AuditEvent".equals(codeString))
1571          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.AUDITEVENT);
1572        if ("Basic".equals(codeString))
1573          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.BASIC);
1574        if ("Binary".equals(codeString))
1575          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.BINARY);
1576        if ("BodySite".equals(codeString))
1577          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.BODYSITE);
1578        if ("Bundle".equals(codeString))
1579          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.BUNDLE);
1580        if ("CapabilityStatement".equals(codeString))
1581          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CAPABILITYSTATEMENT);
1582        if ("CarePlan".equals(codeString))
1583          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CAREPLAN);
1584        if ("CareTeam".equals(codeString))
1585          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CARETEAM);
1586        if ("ChargeItem".equals(codeString))
1587          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CHARGEITEM);
1588        if ("Claim".equals(codeString))
1589          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CLAIM);
1590        if ("ClaimResponse".equals(codeString))
1591          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CLAIMRESPONSE);
1592        if ("ClinicalImpression".equals(codeString))
1593          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CLINICALIMPRESSION);
1594        if ("CodeSystem".equals(codeString))
1595          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CODESYSTEM);
1596        if ("Communication".equals(codeString))
1597          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.COMMUNICATION);
1598        if ("CommunicationRequest".equals(codeString))
1599          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.COMMUNICATIONREQUEST);
1600        if ("CompartmentDefinition".equals(codeString))
1601          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.COMPARTMENTDEFINITION);
1602        if ("Composition".equals(codeString))
1603          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.COMPOSITION);
1604        if ("ConceptMap".equals(codeString))
1605          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CONCEPTMAP);
1606        if ("Condition".equals(codeString))
1607          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CONDITION);
1608        if ("Consent".equals(codeString))
1609          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CONSENT);
1610        if ("Contract".equals(codeString))
1611          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.CONTRACT);
1612        if ("Coverage".equals(codeString))
1613          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.COVERAGE);
1614        if ("DataElement".equals(codeString))
1615          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DATAELEMENT);
1616        if ("DetectedIssue".equals(codeString))
1617          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DETECTEDISSUE);
1618        if ("Device".equals(codeString))
1619          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DEVICE);
1620        if ("DeviceComponent".equals(codeString))
1621          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DEVICECOMPONENT);
1622        if ("DeviceMetric".equals(codeString))
1623          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DEVICEMETRIC);
1624        if ("DeviceRequest".equals(codeString))
1625          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DEVICEREQUEST);
1626        if ("DeviceUseStatement".equals(codeString))
1627          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DEVICEUSESTATEMENT);
1628        if ("DiagnosticReport".equals(codeString))
1629          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DIAGNOSTICREPORT);
1630        if ("DocumentManifest".equals(codeString))
1631          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DOCUMENTMANIFEST);
1632        if ("DocumentReference".equals(codeString))
1633          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DOCUMENTREFERENCE);
1634        if ("DomainResource".equals(codeString))
1635          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.DOMAINRESOURCE);
1636        if ("EligibilityRequest".equals(codeString))
1637          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ELIGIBILITYREQUEST);
1638        if ("EligibilityResponse".equals(codeString))
1639          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ELIGIBILITYRESPONSE);
1640        if ("Encounter".equals(codeString))
1641          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ENCOUNTER);
1642        if ("Endpoint".equals(codeString))
1643          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ENDPOINT);
1644        if ("EnrollmentRequest".equals(codeString))
1645          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ENROLLMENTREQUEST);
1646        if ("EnrollmentResponse".equals(codeString))
1647          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ENROLLMENTRESPONSE);
1648        if ("EpisodeOfCare".equals(codeString))
1649          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.EPISODEOFCARE);
1650        if ("ExpansionProfile".equals(codeString))
1651          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.EXPANSIONPROFILE);
1652        if ("ExplanationOfBenefit".equals(codeString))
1653          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.EXPLANATIONOFBENEFIT);
1654        if ("FamilyMemberHistory".equals(codeString))
1655          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.FAMILYMEMBERHISTORY);
1656        if ("Flag".equals(codeString))
1657          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.FLAG);
1658        if ("Goal".equals(codeString))
1659          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.GOAL);
1660        if ("GraphDefinition".equals(codeString))
1661          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.GRAPHDEFINITION);
1662        if ("Group".equals(codeString))
1663          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.GROUP);
1664        if ("GuidanceResponse".equals(codeString))
1665          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.GUIDANCERESPONSE);
1666        if ("HealthcareService".equals(codeString))
1667          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.HEALTHCARESERVICE);
1668        if ("ImagingManifest".equals(codeString))
1669          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.IMAGINGMANIFEST);
1670        if ("ImagingStudy".equals(codeString))
1671          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.IMAGINGSTUDY);
1672        if ("Immunization".equals(codeString))
1673          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.IMMUNIZATION);
1674        if ("ImmunizationRecommendation".equals(codeString))
1675          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.IMMUNIZATIONRECOMMENDATION);
1676        if ("ImplementationGuide".equals(codeString))
1677          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.IMPLEMENTATIONGUIDE);
1678        if ("Library".equals(codeString))
1679          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.LIBRARY);
1680        if ("Linkage".equals(codeString))
1681          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.LINKAGE);
1682        if ("List".equals(codeString))
1683          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.LIST);
1684        if ("Location".equals(codeString))
1685          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.LOCATION);
1686        if ("Measure".equals(codeString))
1687          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEASURE);
1688        if ("MeasureReport".equals(codeString))
1689          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEASUREREPORT);
1690        if ("Media".equals(codeString))
1691          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDIA);
1692        if ("Medication".equals(codeString))
1693          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDICATION);
1694        if ("MedicationAdministration".equals(codeString))
1695          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDICATIONADMINISTRATION);
1696        if ("MedicationDispense".equals(codeString))
1697          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDICATIONDISPENSE);
1698        if ("MedicationRequest".equals(codeString))
1699          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDICATIONREQUEST);
1700        if ("MedicationStatement".equals(codeString))
1701          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MEDICATIONSTATEMENT);
1702        if ("MessageDefinition".equals(codeString))
1703          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MESSAGEDEFINITION);
1704        if ("MessageHeader".equals(codeString))
1705          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.MESSAGEHEADER);
1706        if ("NamingSystem".equals(codeString))
1707          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.NAMINGSYSTEM);
1708        if ("NutritionOrder".equals(codeString))
1709          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.NUTRITIONORDER);
1710        if ("Observation".equals(codeString))
1711          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.OBSERVATION);
1712        if ("OperationDefinition".equals(codeString))
1713          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.OPERATIONDEFINITION);
1714        if ("OperationOutcome".equals(codeString))
1715          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.OPERATIONOUTCOME);
1716        if ("Organization".equals(codeString))
1717          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.ORGANIZATION);
1718        if ("Parameters".equals(codeString))
1719          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PARAMETERS);
1720        if ("Patient".equals(codeString))
1721          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PATIENT);
1722        if ("PaymentNotice".equals(codeString))
1723          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PAYMENTNOTICE);
1724        if ("PaymentReconciliation".equals(codeString))
1725          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PAYMENTRECONCILIATION);
1726        if ("Person".equals(codeString))
1727          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PERSON);
1728        if ("PlanDefinition".equals(codeString))
1729          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PLANDEFINITION);
1730        if ("Practitioner".equals(codeString))
1731          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PRACTITIONER);
1732        if ("PractitionerRole".equals(codeString))
1733          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PRACTITIONERROLE);
1734        if ("Procedure".equals(codeString))
1735          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PROCEDURE);
1736        if ("ProcedureRequest".equals(codeString))
1737          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PROCEDUREREQUEST);
1738        if ("ProcessRequest".equals(codeString))
1739          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PROCESSREQUEST);
1740        if ("ProcessResponse".equals(codeString))
1741          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PROCESSRESPONSE);
1742        if ("Provenance".equals(codeString))
1743          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.PROVENANCE);
1744        if ("Questionnaire".equals(codeString))
1745          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.QUESTIONNAIRE);
1746        if ("QuestionnaireResponse".equals(codeString))
1747          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.QUESTIONNAIRERESPONSE);
1748        if ("ReferralRequest".equals(codeString))
1749          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.REFERRALREQUEST);
1750        if ("RelatedPerson".equals(codeString))
1751          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.RELATEDPERSON);
1752        if ("RequestGroup".equals(codeString))
1753          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.REQUESTGROUP);
1754        if ("ResearchStudy".equals(codeString))
1755          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.RESEARCHSTUDY);
1756        if ("ResearchSubject".equals(codeString))
1757          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.RESEARCHSUBJECT);
1758        if ("Resource".equals(codeString))
1759          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.RESOURCE);
1760        if ("RiskAssessment".equals(codeString))
1761          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.RISKASSESSMENT);
1762        if ("Schedule".equals(codeString))
1763          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SCHEDULE);
1764        if ("SearchParameter".equals(codeString))
1765          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SEARCHPARAMETER);
1766        if ("Sequence".equals(codeString))
1767          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SEQUENCE);
1768        if ("ServiceDefinition".equals(codeString))
1769          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SERVICEDEFINITION);
1770        if ("Slot".equals(codeString))
1771          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SLOT);
1772        if ("Specimen".equals(codeString))
1773          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SPECIMEN);
1774        if ("StructureDefinition".equals(codeString))
1775          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.STRUCTUREDEFINITION);
1776        if ("StructureMap".equals(codeString))
1777          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.STRUCTUREMAP);
1778        if ("Subscription".equals(codeString))
1779          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SUBSCRIPTION);
1780        if ("Substance".equals(codeString))
1781          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SUBSTANCE);
1782        if ("SupplyDelivery".equals(codeString))
1783          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SUPPLYDELIVERY);
1784        if ("SupplyRequest".equals(codeString))
1785          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.SUPPLYREQUEST);
1786        if ("Task".equals(codeString))
1787          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.TASK);
1788        if ("TestReport".equals(codeString))
1789          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.TESTREPORT);
1790        if ("TestScript".equals(codeString))
1791          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.TESTSCRIPT);
1792        if ("ValueSet".equals(codeString))
1793          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.VALUESET);
1794        if ("VisionPrescription".equals(codeString))
1795          return new Enumeration<ActivityDefinitionKind>(this, ActivityDefinitionKind.VISIONPRESCRIPTION);
1796        throw new FHIRException("Unknown ActivityDefinitionKind code '"+codeString+"'");
1797        }
1798    public String toCode(ActivityDefinitionKind code) {
1799      if (code == ActivityDefinitionKind.ACCOUNT)
1800        return "Account";
1801      if (code == ActivityDefinitionKind.ACTIVITYDEFINITION)
1802        return "ActivityDefinition";
1803      if (code == ActivityDefinitionKind.ADVERSEEVENT)
1804        return "AdverseEvent";
1805      if (code == ActivityDefinitionKind.ALLERGYINTOLERANCE)
1806        return "AllergyIntolerance";
1807      if (code == ActivityDefinitionKind.APPOINTMENT)
1808        return "Appointment";
1809      if (code == ActivityDefinitionKind.APPOINTMENTRESPONSE)
1810        return "AppointmentResponse";
1811      if (code == ActivityDefinitionKind.AUDITEVENT)
1812        return "AuditEvent";
1813      if (code == ActivityDefinitionKind.BASIC)
1814        return "Basic";
1815      if (code == ActivityDefinitionKind.BINARY)
1816        return "Binary";
1817      if (code == ActivityDefinitionKind.BODYSITE)
1818        return "BodySite";
1819      if (code == ActivityDefinitionKind.BUNDLE)
1820        return "Bundle";
1821      if (code == ActivityDefinitionKind.CAPABILITYSTATEMENT)
1822        return "CapabilityStatement";
1823      if (code == ActivityDefinitionKind.CAREPLAN)
1824        return "CarePlan";
1825      if (code == ActivityDefinitionKind.CARETEAM)
1826        return "CareTeam";
1827      if (code == ActivityDefinitionKind.CHARGEITEM)
1828        return "ChargeItem";
1829      if (code == ActivityDefinitionKind.CLAIM)
1830        return "Claim";
1831      if (code == ActivityDefinitionKind.CLAIMRESPONSE)
1832        return "ClaimResponse";
1833      if (code == ActivityDefinitionKind.CLINICALIMPRESSION)
1834        return "ClinicalImpression";
1835      if (code == ActivityDefinitionKind.CODESYSTEM)
1836        return "CodeSystem";
1837      if (code == ActivityDefinitionKind.COMMUNICATION)
1838        return "Communication";
1839      if (code == ActivityDefinitionKind.COMMUNICATIONREQUEST)
1840        return "CommunicationRequest";
1841      if (code == ActivityDefinitionKind.COMPARTMENTDEFINITION)
1842        return "CompartmentDefinition";
1843      if (code == ActivityDefinitionKind.COMPOSITION)
1844        return "Composition";
1845      if (code == ActivityDefinitionKind.CONCEPTMAP)
1846        return "ConceptMap";
1847      if (code == ActivityDefinitionKind.CONDITION)
1848        return "Condition";
1849      if (code == ActivityDefinitionKind.CONSENT)
1850        return "Consent";
1851      if (code == ActivityDefinitionKind.CONTRACT)
1852        return "Contract";
1853      if (code == ActivityDefinitionKind.COVERAGE)
1854        return "Coverage";
1855      if (code == ActivityDefinitionKind.DATAELEMENT)
1856        return "DataElement";
1857      if (code == ActivityDefinitionKind.DETECTEDISSUE)
1858        return "DetectedIssue";
1859      if (code == ActivityDefinitionKind.DEVICE)
1860        return "Device";
1861      if (code == ActivityDefinitionKind.DEVICECOMPONENT)
1862        return "DeviceComponent";
1863      if (code == ActivityDefinitionKind.DEVICEMETRIC)
1864        return "DeviceMetric";
1865      if (code == ActivityDefinitionKind.DEVICEREQUEST)
1866        return "DeviceRequest";
1867      if (code == ActivityDefinitionKind.DEVICEUSESTATEMENT)
1868        return "DeviceUseStatement";
1869      if (code == ActivityDefinitionKind.DIAGNOSTICREPORT)
1870        return "DiagnosticReport";
1871      if (code == ActivityDefinitionKind.DOCUMENTMANIFEST)
1872        return "DocumentManifest";
1873      if (code == ActivityDefinitionKind.DOCUMENTREFERENCE)
1874        return "DocumentReference";
1875      if (code == ActivityDefinitionKind.DOMAINRESOURCE)
1876        return "DomainResource";
1877      if (code == ActivityDefinitionKind.ELIGIBILITYREQUEST)
1878        return "EligibilityRequest";
1879      if (code == ActivityDefinitionKind.ELIGIBILITYRESPONSE)
1880        return "EligibilityResponse";
1881      if (code == ActivityDefinitionKind.ENCOUNTER)
1882        return "Encounter";
1883      if (code == ActivityDefinitionKind.ENDPOINT)
1884        return "Endpoint";
1885      if (code == ActivityDefinitionKind.ENROLLMENTREQUEST)
1886        return "EnrollmentRequest";
1887      if (code == ActivityDefinitionKind.ENROLLMENTRESPONSE)
1888        return "EnrollmentResponse";
1889      if (code == ActivityDefinitionKind.EPISODEOFCARE)
1890        return "EpisodeOfCare";
1891      if (code == ActivityDefinitionKind.EXPANSIONPROFILE)
1892        return "ExpansionProfile";
1893      if (code == ActivityDefinitionKind.EXPLANATIONOFBENEFIT)
1894        return "ExplanationOfBenefit";
1895      if (code == ActivityDefinitionKind.FAMILYMEMBERHISTORY)
1896        return "FamilyMemberHistory";
1897      if (code == ActivityDefinitionKind.FLAG)
1898        return "Flag";
1899      if (code == ActivityDefinitionKind.GOAL)
1900        return "Goal";
1901      if (code == ActivityDefinitionKind.GRAPHDEFINITION)
1902        return "GraphDefinition";
1903      if (code == ActivityDefinitionKind.GROUP)
1904        return "Group";
1905      if (code == ActivityDefinitionKind.GUIDANCERESPONSE)
1906        return "GuidanceResponse";
1907      if (code == ActivityDefinitionKind.HEALTHCARESERVICE)
1908        return "HealthcareService";
1909      if (code == ActivityDefinitionKind.IMAGINGMANIFEST)
1910        return "ImagingManifest";
1911      if (code == ActivityDefinitionKind.IMAGINGSTUDY)
1912        return "ImagingStudy";
1913      if (code == ActivityDefinitionKind.IMMUNIZATION)
1914        return "Immunization";
1915      if (code == ActivityDefinitionKind.IMMUNIZATIONRECOMMENDATION)
1916        return "ImmunizationRecommendation";
1917      if (code == ActivityDefinitionKind.IMPLEMENTATIONGUIDE)
1918        return "ImplementationGuide";
1919      if (code == ActivityDefinitionKind.LIBRARY)
1920        return "Library";
1921      if (code == ActivityDefinitionKind.LINKAGE)
1922        return "Linkage";
1923      if (code == ActivityDefinitionKind.LIST)
1924        return "List";
1925      if (code == ActivityDefinitionKind.LOCATION)
1926        return "Location";
1927      if (code == ActivityDefinitionKind.MEASURE)
1928        return "Measure";
1929      if (code == ActivityDefinitionKind.MEASUREREPORT)
1930        return "MeasureReport";
1931      if (code == ActivityDefinitionKind.MEDIA)
1932        return "Media";
1933      if (code == ActivityDefinitionKind.MEDICATION)
1934        return "Medication";
1935      if (code == ActivityDefinitionKind.MEDICATIONADMINISTRATION)
1936        return "MedicationAdministration";
1937      if (code == ActivityDefinitionKind.MEDICATIONDISPENSE)
1938        return "MedicationDispense";
1939      if (code == ActivityDefinitionKind.MEDICATIONREQUEST)
1940        return "MedicationRequest";
1941      if (code == ActivityDefinitionKind.MEDICATIONSTATEMENT)
1942        return "MedicationStatement";
1943      if (code == ActivityDefinitionKind.MESSAGEDEFINITION)
1944        return "MessageDefinition";
1945      if (code == ActivityDefinitionKind.MESSAGEHEADER)
1946        return "MessageHeader";
1947      if (code == ActivityDefinitionKind.NAMINGSYSTEM)
1948        return "NamingSystem";
1949      if (code == ActivityDefinitionKind.NUTRITIONORDER)
1950        return "NutritionOrder";
1951      if (code == ActivityDefinitionKind.OBSERVATION)
1952        return "Observation";
1953      if (code == ActivityDefinitionKind.OPERATIONDEFINITION)
1954        return "OperationDefinition";
1955      if (code == ActivityDefinitionKind.OPERATIONOUTCOME)
1956        return "OperationOutcome";
1957      if (code == ActivityDefinitionKind.ORGANIZATION)
1958        return "Organization";
1959      if (code == ActivityDefinitionKind.PARAMETERS)
1960        return "Parameters";
1961      if (code == ActivityDefinitionKind.PATIENT)
1962        return "Patient";
1963      if (code == ActivityDefinitionKind.PAYMENTNOTICE)
1964        return "PaymentNotice";
1965      if (code == ActivityDefinitionKind.PAYMENTRECONCILIATION)
1966        return "PaymentReconciliation";
1967      if (code == ActivityDefinitionKind.PERSON)
1968        return "Person";
1969      if (code == ActivityDefinitionKind.PLANDEFINITION)
1970        return "PlanDefinition";
1971      if (code == ActivityDefinitionKind.PRACTITIONER)
1972        return "Practitioner";
1973      if (code == ActivityDefinitionKind.PRACTITIONERROLE)
1974        return "PractitionerRole";
1975      if (code == ActivityDefinitionKind.PROCEDURE)
1976        return "Procedure";
1977      if (code == ActivityDefinitionKind.PROCEDUREREQUEST)
1978        return "ProcedureRequest";
1979      if (code == ActivityDefinitionKind.PROCESSREQUEST)
1980        return "ProcessRequest";
1981      if (code == ActivityDefinitionKind.PROCESSRESPONSE)
1982        return "ProcessResponse";
1983      if (code == ActivityDefinitionKind.PROVENANCE)
1984        return "Provenance";
1985      if (code == ActivityDefinitionKind.QUESTIONNAIRE)
1986        return "Questionnaire";
1987      if (code == ActivityDefinitionKind.QUESTIONNAIRERESPONSE)
1988        return "QuestionnaireResponse";
1989      if (code == ActivityDefinitionKind.REFERRALREQUEST)
1990        return "ReferralRequest";
1991      if (code == ActivityDefinitionKind.RELATEDPERSON)
1992        return "RelatedPerson";
1993      if (code == ActivityDefinitionKind.REQUESTGROUP)
1994        return "RequestGroup";
1995      if (code == ActivityDefinitionKind.RESEARCHSTUDY)
1996        return "ResearchStudy";
1997      if (code == ActivityDefinitionKind.RESEARCHSUBJECT)
1998        return "ResearchSubject";
1999      if (code == ActivityDefinitionKind.RESOURCE)
2000        return "Resource";
2001      if (code == ActivityDefinitionKind.RISKASSESSMENT)
2002        return "RiskAssessment";
2003      if (code == ActivityDefinitionKind.SCHEDULE)
2004        return "Schedule";
2005      if (code == ActivityDefinitionKind.SEARCHPARAMETER)
2006        return "SearchParameter";
2007      if (code == ActivityDefinitionKind.SEQUENCE)
2008        return "Sequence";
2009      if (code == ActivityDefinitionKind.SERVICEDEFINITION)
2010        return "ServiceDefinition";
2011      if (code == ActivityDefinitionKind.SLOT)
2012        return "Slot";
2013      if (code == ActivityDefinitionKind.SPECIMEN)
2014        return "Specimen";
2015      if (code == ActivityDefinitionKind.STRUCTUREDEFINITION)
2016        return "StructureDefinition";
2017      if (code == ActivityDefinitionKind.STRUCTUREMAP)
2018        return "StructureMap";
2019      if (code == ActivityDefinitionKind.SUBSCRIPTION)
2020        return "Subscription";
2021      if (code == ActivityDefinitionKind.SUBSTANCE)
2022        return "Substance";
2023      if (code == ActivityDefinitionKind.SUPPLYDELIVERY)
2024        return "SupplyDelivery";
2025      if (code == ActivityDefinitionKind.SUPPLYREQUEST)
2026        return "SupplyRequest";
2027      if (code == ActivityDefinitionKind.TASK)
2028        return "Task";
2029      if (code == ActivityDefinitionKind.TESTREPORT)
2030        return "TestReport";
2031      if (code == ActivityDefinitionKind.TESTSCRIPT)
2032        return "TestScript";
2033      if (code == ActivityDefinitionKind.VALUESET)
2034        return "ValueSet";
2035      if (code == ActivityDefinitionKind.VISIONPRESCRIPTION)
2036        return "VisionPrescription";
2037      return "?";
2038      }
2039    public String toSystem(ActivityDefinitionKind code) {
2040      return code.getSystem();
2041      }
2042    }
2043
2044    public enum ActivityParticipantType {
2045        /**
2046         * The participant is the patient under evaluation
2047         */
2048        PATIENT, 
2049        /**
2050         * The participant is a practitioner involved in the patient's care
2051         */
2052        PRACTITIONER, 
2053        /**
2054         * The participant is a person related to the patient
2055         */
2056        RELATEDPERSON, 
2057        /**
2058         * added to help the parsers with the generic types
2059         */
2060        NULL;
2061        public static ActivityParticipantType fromCode(String codeString) throws FHIRException {
2062            if (codeString == null || "".equals(codeString))
2063                return null;
2064        if ("patient".equals(codeString))
2065          return PATIENT;
2066        if ("practitioner".equals(codeString))
2067          return PRACTITIONER;
2068        if ("related-person".equals(codeString))
2069          return RELATEDPERSON;
2070        if (Configuration.isAcceptInvalidEnums())
2071          return null;
2072        else
2073          throw new FHIRException("Unknown ActivityParticipantType code '"+codeString+"'");
2074        }
2075        public String toCode() {
2076          switch (this) {
2077            case PATIENT: return "patient";
2078            case PRACTITIONER: return "practitioner";
2079            case RELATEDPERSON: return "related-person";
2080            default: return "?";
2081          }
2082        }
2083        public String getSystem() {
2084          switch (this) {
2085            case PATIENT: return "http://hl7.org/fhir/action-participant-type";
2086            case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type";
2087            case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type";
2088            default: return "?";
2089          }
2090        }
2091        public String getDefinition() {
2092          switch (this) {
2093            case PATIENT: return "The participant is the patient under evaluation";
2094            case PRACTITIONER: return "The participant is a practitioner involved in the patient's care";
2095            case RELATEDPERSON: return "The participant is a person related to the patient";
2096            default: return "?";
2097          }
2098        }
2099        public String getDisplay() {
2100          switch (this) {
2101            case PATIENT: return "Patient";
2102            case PRACTITIONER: return "Practitioner";
2103            case RELATEDPERSON: return "Related Person";
2104            default: return "?";
2105          }
2106        }
2107    }
2108
2109  public static class ActivityParticipantTypeEnumFactory implements EnumFactory<ActivityParticipantType> {
2110    public ActivityParticipantType fromCode(String codeString) throws IllegalArgumentException {
2111      if (codeString == null || "".equals(codeString))
2112            if (codeString == null || "".equals(codeString))
2113                return null;
2114        if ("patient".equals(codeString))
2115          return ActivityParticipantType.PATIENT;
2116        if ("practitioner".equals(codeString))
2117          return ActivityParticipantType.PRACTITIONER;
2118        if ("related-person".equals(codeString))
2119          return ActivityParticipantType.RELATEDPERSON;
2120        throw new IllegalArgumentException("Unknown ActivityParticipantType code '"+codeString+"'");
2121        }
2122        public Enumeration<ActivityParticipantType> fromType(Base code) throws FHIRException {
2123          if (code == null)
2124            return null;
2125          if (code.isEmpty())
2126            return new Enumeration<ActivityParticipantType>(this);
2127          String codeString = ((PrimitiveType) code).asStringValue();
2128          if (codeString == null || "".equals(codeString))
2129            return null;
2130        if ("patient".equals(codeString))
2131          return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.PATIENT);
2132        if ("practitioner".equals(codeString))
2133          return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.PRACTITIONER);
2134        if ("related-person".equals(codeString))
2135          return new Enumeration<ActivityParticipantType>(this, ActivityParticipantType.RELATEDPERSON);
2136        throw new FHIRException("Unknown ActivityParticipantType code '"+codeString+"'");
2137        }
2138    public String toCode(ActivityParticipantType code) {
2139      if (code == ActivityParticipantType.PATIENT)
2140        return "patient";
2141      if (code == ActivityParticipantType.PRACTITIONER)
2142        return "practitioner";
2143      if (code == ActivityParticipantType.RELATEDPERSON)
2144        return "related-person";
2145      return "?";
2146      }
2147    public String toSystem(ActivityParticipantType code) {
2148      return code.getSystem();
2149      }
2150    }
2151
2152    @Block()
2153    public static class ActivityDefinitionParticipantComponent extends BackboneElement implements IBaseBackboneElement {
2154        /**
2155         * The type of participant in the action.
2156         */
2157        @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2158        @Description(shortDefinition="patient | practitioner | related-person", formalDefinition="The type of participant in the action." )
2159        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-type")
2160        protected Enumeration<ActivityParticipantType> type;
2161
2162        /**
2163         * The role the participant should play in performing the described action.
2164         */
2165        @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
2166        @Description(shortDefinition="E.g. Nurse, Surgeon, Parent, etc", formalDefinition="The role the participant should play in performing the described action." )
2167        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-role")
2168        protected CodeableConcept role;
2169
2170        private static final long serialVersionUID = -1450932564L;
2171
2172    /**
2173     * Constructor
2174     */
2175      public ActivityDefinitionParticipantComponent() {
2176        super();
2177      }
2178
2179    /**
2180     * Constructor
2181     */
2182      public ActivityDefinitionParticipantComponent(Enumeration<ActivityParticipantType> type) {
2183        super();
2184        this.type = type;
2185      }
2186
2187        /**
2188         * @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
2189         */
2190        public Enumeration<ActivityParticipantType> getTypeElement() { 
2191          if (this.type == null)
2192            if (Configuration.errorOnAutoCreate())
2193              throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.type");
2194            else if (Configuration.doAutoCreate())
2195              this.type = new Enumeration<ActivityParticipantType>(new ActivityParticipantTypeEnumFactory()); // bb
2196          return this.type;
2197        }
2198
2199        public boolean hasTypeElement() { 
2200          return this.type != null && !this.type.isEmpty();
2201        }
2202
2203        public boolean hasType() { 
2204          return this.type != null && !this.type.isEmpty();
2205        }
2206
2207        /**
2208         * @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
2209         */
2210        public ActivityDefinitionParticipantComponent setTypeElement(Enumeration<ActivityParticipantType> value) { 
2211          this.type = value;
2212          return this;
2213        }
2214
2215        /**
2216         * @return The type of participant in the action.
2217         */
2218        public ActivityParticipantType getType() { 
2219          return this.type == null ? null : this.type.getValue();
2220        }
2221
2222        /**
2223         * @param value The type of participant in the action.
2224         */
2225        public ActivityDefinitionParticipantComponent setType(ActivityParticipantType value) { 
2226            if (this.type == null)
2227              this.type = new Enumeration<ActivityParticipantType>(new ActivityParticipantTypeEnumFactory());
2228            this.type.setValue(value);
2229          return this;
2230        }
2231
2232        /**
2233         * @return {@link #role} (The role the participant should play in performing the described action.)
2234         */
2235        public CodeableConcept getRole() { 
2236          if (this.role == null)
2237            if (Configuration.errorOnAutoCreate())
2238              throw new Error("Attempt to auto-create ActivityDefinitionParticipantComponent.role");
2239            else if (Configuration.doAutoCreate())
2240              this.role = new CodeableConcept(); // cc
2241          return this.role;
2242        }
2243
2244        public boolean hasRole() { 
2245          return this.role != null && !this.role.isEmpty();
2246        }
2247
2248        /**
2249         * @param value {@link #role} (The role the participant should play in performing the described action.)
2250         */
2251        public ActivityDefinitionParticipantComponent setRole(CodeableConcept value)  { 
2252          this.role = value;
2253          return this;
2254        }
2255
2256        protected void listChildren(List<Property> children) {
2257          super.listChildren(children);
2258          children.add(new Property("type", "code", "The type of participant in the action.", 0, 1, type));
2259          children.add(new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role));
2260        }
2261
2262        @Override
2263        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2264          switch (_hash) {
2265          case 3575610: /*type*/  return new Property("type", "code", "The type of participant in the action.", 0, 1, type);
2266          case 3506294: /*role*/  return new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role);
2267          default: return super.getNamedProperty(_hash, _name, _checkValid);
2268          }
2269
2270        }
2271
2272      @Override
2273      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2274        switch (hash) {
2275        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ActivityParticipantType>
2276        case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
2277        default: return super.getProperty(hash, name, checkValid);
2278        }
2279
2280      }
2281
2282      @Override
2283      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2284        switch (hash) {
2285        case 3575610: // type
2286          value = new ActivityParticipantTypeEnumFactory().fromType(castToCode(value));
2287          this.type = (Enumeration) value; // Enumeration<ActivityParticipantType>
2288          return value;
2289        case 3506294: // role
2290          this.role = castToCodeableConcept(value); // CodeableConcept
2291          return value;
2292        default: return super.setProperty(hash, name, value);
2293        }
2294
2295      }
2296
2297      @Override
2298      public Base setProperty(String name, Base value) throws FHIRException {
2299        if (name.equals("type")) {
2300          value = new ActivityParticipantTypeEnumFactory().fromType(castToCode(value));
2301          this.type = (Enumeration) value; // Enumeration<ActivityParticipantType>
2302        } else if (name.equals("role")) {
2303          this.role = castToCodeableConcept(value); // CodeableConcept
2304        } else
2305          return super.setProperty(name, value);
2306        return value;
2307      }
2308
2309      @Override
2310      public Base makeProperty(int hash, String name) throws FHIRException {
2311        switch (hash) {
2312        case 3575610:  return getTypeElement();
2313        case 3506294:  return getRole(); 
2314        default: return super.makeProperty(hash, name);
2315        }
2316
2317      }
2318
2319      @Override
2320      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2321        switch (hash) {
2322        case 3575610: /*type*/ return new String[] {"code"};
2323        case 3506294: /*role*/ return new String[] {"CodeableConcept"};
2324        default: return super.getTypesForProperty(hash, name);
2325        }
2326
2327      }
2328
2329      @Override
2330      public Base addChild(String name) throws FHIRException {
2331        if (name.equals("type")) {
2332          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.type");
2333        }
2334        else if (name.equals("role")) {
2335          this.role = new CodeableConcept();
2336          return this.role;
2337        }
2338        else
2339          return super.addChild(name);
2340      }
2341
2342      public ActivityDefinitionParticipantComponent copy() {
2343        ActivityDefinitionParticipantComponent dst = new ActivityDefinitionParticipantComponent();
2344        copyValues(dst);
2345        dst.type = type == null ? null : type.copy();
2346        dst.role = role == null ? null : role.copy();
2347        return dst;
2348      }
2349
2350      @Override
2351      public boolean equalsDeep(Base other_) {
2352        if (!super.equalsDeep(other_))
2353          return false;
2354        if (!(other_ instanceof ActivityDefinitionParticipantComponent))
2355          return false;
2356        ActivityDefinitionParticipantComponent o = (ActivityDefinitionParticipantComponent) other_;
2357        return compareDeep(type, o.type, true) && compareDeep(role, o.role, true);
2358      }
2359
2360      @Override
2361      public boolean equalsShallow(Base other_) {
2362        if (!super.equalsShallow(other_))
2363          return false;
2364        if (!(other_ instanceof ActivityDefinitionParticipantComponent))
2365          return false;
2366        ActivityDefinitionParticipantComponent o = (ActivityDefinitionParticipantComponent) other_;
2367        return compareValues(type, o.type, true);
2368      }
2369
2370      public boolean isEmpty() {
2371        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role);
2372      }
2373
2374  public String fhirType() {
2375    return "ActivityDefinition.participant";
2376
2377  }
2378
2379  }
2380
2381    @Block()
2382    public static class ActivityDefinitionDynamicValueComponent extends BackboneElement implements IBaseBackboneElement {
2383        /**
2384         * A brief, natural language description of the intended semantics of the dynamic value.
2385         */
2386        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
2387        @Description(shortDefinition="Natural language description of the dynamic value", formalDefinition="A brief, natural language description of the intended semantics of the dynamic value." )
2388        protected StringType description;
2389
2390        /**
2391         * 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.
2392         */
2393        @Child(name = "path", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2394        @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." )
2395        protected StringType path;
2396
2397        /**
2398         * The media type of the language for the expression.
2399         */
2400        @Child(name = "language", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2401        @Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression." )
2402        protected StringType language;
2403
2404        /**
2405         * An expression specifying the value of the customized element.
2406         */
2407        @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2408        @Description(shortDefinition="An expression that provides the dynamic value for the customization", formalDefinition="An expression specifying the value of the customized element." )
2409        protected StringType expression;
2410
2411        private static final long serialVersionUID = 448404361L;
2412
2413    /**
2414     * Constructor
2415     */
2416      public ActivityDefinitionDynamicValueComponent() {
2417        super();
2418      }
2419
2420        /**
2421         * @return {@link #description} (A brief, natural language description of the intended semantics of the dynamic value.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2422         */
2423        public StringType getDescriptionElement() { 
2424          if (this.description == null)
2425            if (Configuration.errorOnAutoCreate())
2426              throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.description");
2427            else if (Configuration.doAutoCreate())
2428              this.description = new StringType(); // bb
2429          return this.description;
2430        }
2431
2432        public boolean hasDescriptionElement() { 
2433          return this.description != null && !this.description.isEmpty();
2434        }
2435
2436        public boolean hasDescription() { 
2437          return this.description != null && !this.description.isEmpty();
2438        }
2439
2440        /**
2441         * @param value {@link #description} (A brief, natural language description of the intended semantics of the dynamic value.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2442         */
2443        public ActivityDefinitionDynamicValueComponent setDescriptionElement(StringType value) { 
2444          this.description = value;
2445          return this;
2446        }
2447
2448        /**
2449         * @return A brief, natural language description of the intended semantics of the dynamic value.
2450         */
2451        public String getDescription() { 
2452          return this.description == null ? null : this.description.getValue();
2453        }
2454
2455        /**
2456         * @param value A brief, natural language description of the intended semantics of the dynamic value.
2457         */
2458        public ActivityDefinitionDynamicValueComponent setDescription(String value) { 
2459          if (Utilities.noString(value))
2460            this.description = null;
2461          else {
2462            if (this.description == null)
2463              this.description = new StringType();
2464            this.description.setValue(value);
2465          }
2466          return this;
2467        }
2468
2469        /**
2470         * @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.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
2471         */
2472        public StringType getPathElement() { 
2473          if (this.path == null)
2474            if (Configuration.errorOnAutoCreate())
2475              throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.path");
2476            else if (Configuration.doAutoCreate())
2477              this.path = new StringType(); // bb
2478          return this.path;
2479        }
2480
2481        public boolean hasPathElement() { 
2482          return this.path != null && !this.path.isEmpty();
2483        }
2484
2485        public boolean hasPath() { 
2486          return this.path != null && !this.path.isEmpty();
2487        }
2488
2489        /**
2490         * @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.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
2491         */
2492        public ActivityDefinitionDynamicValueComponent setPathElement(StringType value) { 
2493          this.path = value;
2494          return this;
2495        }
2496
2497        /**
2498         * @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.
2499         */
2500        public String getPath() { 
2501          return this.path == null ? null : this.path.getValue();
2502        }
2503
2504        /**
2505         * @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.
2506         */
2507        public ActivityDefinitionDynamicValueComponent setPath(String value) { 
2508          if (Utilities.noString(value))
2509            this.path = null;
2510          else {
2511            if (this.path == null)
2512              this.path = new StringType();
2513            this.path.setValue(value);
2514          }
2515          return this;
2516        }
2517
2518        /**
2519         * @return {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
2520         */
2521        public StringType getLanguageElement() { 
2522          if (this.language == null)
2523            if (Configuration.errorOnAutoCreate())
2524              throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.language");
2525            else if (Configuration.doAutoCreate())
2526              this.language = new StringType(); // bb
2527          return this.language;
2528        }
2529
2530        public boolean hasLanguageElement() { 
2531          return this.language != null && !this.language.isEmpty();
2532        }
2533
2534        public boolean hasLanguage() { 
2535          return this.language != null && !this.language.isEmpty();
2536        }
2537
2538        /**
2539         * @param value {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
2540         */
2541        public ActivityDefinitionDynamicValueComponent setLanguageElement(StringType value) { 
2542          this.language = value;
2543          return this;
2544        }
2545
2546        /**
2547         * @return The media type of the language for the expression.
2548         */
2549        public String getLanguage() { 
2550          return this.language == null ? null : this.language.getValue();
2551        }
2552
2553        /**
2554         * @param value The media type of the language for the expression.
2555         */
2556        public ActivityDefinitionDynamicValueComponent setLanguage(String value) { 
2557          if (Utilities.noString(value))
2558            this.language = null;
2559          else {
2560            if (this.language == null)
2561              this.language = new StringType();
2562            this.language.setValue(value);
2563          }
2564          return this;
2565        }
2566
2567        /**
2568         * @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
2569         */
2570        public StringType getExpressionElement() { 
2571          if (this.expression == null)
2572            if (Configuration.errorOnAutoCreate())
2573              throw new Error("Attempt to auto-create ActivityDefinitionDynamicValueComponent.expression");
2574            else if (Configuration.doAutoCreate())
2575              this.expression = new StringType(); // bb
2576          return this.expression;
2577        }
2578
2579        public boolean hasExpressionElement() { 
2580          return this.expression != null && !this.expression.isEmpty();
2581        }
2582
2583        public boolean hasExpression() { 
2584          return this.expression != null && !this.expression.isEmpty();
2585        }
2586
2587        /**
2588         * @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
2589         */
2590        public ActivityDefinitionDynamicValueComponent setExpressionElement(StringType value) { 
2591          this.expression = value;
2592          return this;
2593        }
2594
2595        /**
2596         * @return An expression specifying the value of the customized element.
2597         */
2598        public String getExpression() { 
2599          return this.expression == null ? null : this.expression.getValue();
2600        }
2601
2602        /**
2603         * @param value An expression specifying the value of the customized element.
2604         */
2605        public ActivityDefinitionDynamicValueComponent setExpression(String value) { 
2606          if (Utilities.noString(value))
2607            this.expression = null;
2608          else {
2609            if (this.expression == null)
2610              this.expression = new StringType();
2611            this.expression.setValue(value);
2612          }
2613          return this;
2614        }
2615
2616        protected void listChildren(List<Property> children) {
2617          super.listChildren(children);
2618          children.add(new Property("description", "string", "A brief, natural language description of the intended semantics of the dynamic value.", 0, 1, description));
2619          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.", 0, 1, path));
2620          children.add(new Property("language", "string", "The media type of the language for the expression.", 0, 1, language));
2621          children.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, 1, expression));
2622        }
2623
2624        @Override
2625        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2626          switch (_hash) {
2627          case -1724546052: /*description*/  return new Property("description", "string", "A brief, natural language description of the intended semantics of the dynamic value.", 0, 1, description);
2628          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.", 0, 1, path);
2629          case -1613589672: /*language*/  return new Property("language", "string", "The media type of the language for the expression.", 0, 1, language);
2630          case -1795452264: /*expression*/  return new Property("expression", "string", "An expression specifying the value of the customized element.", 0, 1, expression);
2631          default: return super.getNamedProperty(_hash, _name, _checkValid);
2632          }
2633
2634        }
2635
2636      @Override
2637      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2638        switch (hash) {
2639        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2640        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
2641        case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // StringType
2642        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
2643        default: return super.getProperty(hash, name, checkValid);
2644        }
2645
2646      }
2647
2648      @Override
2649      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2650        switch (hash) {
2651        case -1724546052: // description
2652          this.description = castToString(value); // StringType
2653          return value;
2654        case 3433509: // path
2655          this.path = castToString(value); // StringType
2656          return value;
2657        case -1613589672: // language
2658          this.language = castToString(value); // StringType
2659          return value;
2660        case -1795452264: // expression
2661          this.expression = castToString(value); // StringType
2662          return value;
2663        default: return super.setProperty(hash, name, value);
2664        }
2665
2666      }
2667
2668      @Override
2669      public Base setProperty(String name, Base value) throws FHIRException {
2670        if (name.equals("description")) {
2671          this.description = castToString(value); // StringType
2672        } else if (name.equals("path")) {
2673          this.path = castToString(value); // StringType
2674        } else if (name.equals("language")) {
2675          this.language = castToString(value); // StringType
2676        } else if (name.equals("expression")) {
2677          this.expression = castToString(value); // StringType
2678        } else
2679          return super.setProperty(name, value);
2680        return value;
2681      }
2682
2683      @Override
2684      public Base makeProperty(int hash, String name) throws FHIRException {
2685        switch (hash) {
2686        case -1724546052:  return getDescriptionElement();
2687        case 3433509:  return getPathElement();
2688        case -1613589672:  return getLanguageElement();
2689        case -1795452264:  return getExpressionElement();
2690        default: return super.makeProperty(hash, name);
2691        }
2692
2693      }
2694
2695      @Override
2696      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2697        switch (hash) {
2698        case -1724546052: /*description*/ return new String[] {"string"};
2699        case 3433509: /*path*/ return new String[] {"string"};
2700        case -1613589672: /*language*/ return new String[] {"string"};
2701        case -1795452264: /*expression*/ return new String[] {"string"};
2702        default: return super.getTypesForProperty(hash, name);
2703        }
2704
2705      }
2706
2707      @Override
2708      public Base addChild(String name) throws FHIRException {
2709        if (name.equals("description")) {
2710          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.description");
2711        }
2712        else if (name.equals("path")) {
2713          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.path");
2714        }
2715        else if (name.equals("language")) {
2716          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.language");
2717        }
2718        else if (name.equals("expression")) {
2719          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.expression");
2720        }
2721        else
2722          return super.addChild(name);
2723      }
2724
2725      public ActivityDefinitionDynamicValueComponent copy() {
2726        ActivityDefinitionDynamicValueComponent dst = new ActivityDefinitionDynamicValueComponent();
2727        copyValues(dst);
2728        dst.description = description == null ? null : description.copy();
2729        dst.path = path == null ? null : path.copy();
2730        dst.language = language == null ? null : language.copy();
2731        dst.expression = expression == null ? null : expression.copy();
2732        return dst;
2733      }
2734
2735      @Override
2736      public boolean equalsDeep(Base other_) {
2737        if (!super.equalsDeep(other_))
2738          return false;
2739        if (!(other_ instanceof ActivityDefinitionDynamicValueComponent))
2740          return false;
2741        ActivityDefinitionDynamicValueComponent o = (ActivityDefinitionDynamicValueComponent) other_;
2742        return compareDeep(description, o.description, true) && compareDeep(path, o.path, true) && compareDeep(language, o.language, true)
2743           && compareDeep(expression, o.expression, true);
2744      }
2745
2746      @Override
2747      public boolean equalsShallow(Base other_) {
2748        if (!super.equalsShallow(other_))
2749          return false;
2750        if (!(other_ instanceof ActivityDefinitionDynamicValueComponent))
2751          return false;
2752        ActivityDefinitionDynamicValueComponent o = (ActivityDefinitionDynamicValueComponent) other_;
2753        return compareValues(description, o.description, true) && compareValues(path, o.path, true) && compareValues(language, o.language, true)
2754           && compareValues(expression, o.expression, true);
2755      }
2756
2757      public boolean isEmpty() {
2758        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, path, language
2759          , expression);
2760      }
2761
2762  public String fhirType() {
2763    return "ActivityDefinition.dynamicValue";
2764
2765  }
2766
2767  }
2768
2769    /**
2770     * 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.
2771     */
2772    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
2773    @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." )
2774    protected List<Identifier> identifier;
2775
2776    /**
2777     * Explaination of why this activity definition is needed and why it has been designed as it has.
2778     */
2779    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
2780    @Description(shortDefinition="Why this activity definition is defined", formalDefinition="Explaination of why this activity definition is needed and why it has been designed as it has." )
2781    protected MarkdownType purpose;
2782
2783    /**
2784     * A detailed description of how the asset is used from a clinical perspective.
2785     */
2786    @Child(name = "usage", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2787    @Description(shortDefinition="Describes the clinical usage of the asset", formalDefinition="A detailed description of how the asset is used from a clinical perspective." )
2788    protected StringType usage;
2789
2790    /**
2791     * The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2792     */
2793    @Child(name = "approvalDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2794    @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." )
2795    protected DateType approvalDate;
2796
2797    /**
2798     * The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
2799     */
2800    @Child(name = "lastReviewDate", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2801    @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 doesn't change the original approval date." )
2802    protected DateType lastReviewDate;
2803
2804    /**
2805     * The period during which the activity definition content was or is planned to be in active use.
2806     */
2807    @Child(name = "effectivePeriod", type = {Period.class}, order=5, min=0, max=1, modifier=false, summary=true)
2808    @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." )
2809    protected Period effectivePeriod;
2810
2811    /**
2812     * 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.
2813     */
2814    @Child(name = "topic", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2815    @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." )
2816    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
2817    protected List<CodeableConcept> topic;
2818
2819    /**
2820     * A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.
2821     */
2822    @Child(name = "contributor", type = {Contributor.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2823    @Description(shortDefinition="A content contributor", formalDefinition="A contributor to the content of the asset, including authors, editors, reviewers, and endorsers." )
2824    protected List<Contributor> contributor;
2825
2826    /**
2827     * 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.
2828     */
2829    @Child(name = "copyright", type = {MarkdownType.class}, order=8, min=0, max=1, modifier=false, summary=false)
2830    @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." )
2831    protected MarkdownType copyright;
2832
2833    /**
2834     * Related artifacts such as additional documentation, justification, or bibliographic references.
2835     */
2836    @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2837    @Description(shortDefinition="Additional documentation, citations, etc", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
2838    protected List<RelatedArtifact> relatedArtifact;
2839
2840    /**
2841     * A reference to a Library resource containing any formal logic used by the asset.
2842     */
2843    @Child(name = "library", type = {Library.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2844    @Description(shortDefinition="Logic used by the asset", formalDefinition="A reference to a Library resource containing any formal logic used by the asset." )
2845    protected List<Reference> library;
2846    /**
2847     * The actual objects that are the target of the reference (A reference to a Library resource containing any formal logic used by the asset.)
2848     */
2849    protected List<Library> libraryTarget;
2850
2851
2852    /**
2853     * A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.
2854     */
2855    @Child(name = "kind", type = {CodeType.class}, order=11, min=0, max=1, modifier=false, summary=false)
2856    @Description(shortDefinition="Kind of resource", formalDefinition="A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource." )
2857    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
2858    protected Enumeration<ActivityDefinitionKind> kind;
2859
2860    /**
2861     * Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.
2862     */
2863    @Child(name = "code", type = {CodeableConcept.class}, order=12, min=0, max=1, modifier=false, summary=false)
2864    @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." )
2865    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-code")
2866    protected CodeableConcept code;
2867
2868    /**
2869     * The period, timing or frequency upon which the described activity is to occur.
2870     */
2871    @Child(name = "timing", type = {Timing.class, DateTimeType.class, Period.class, Range.class}, order=13, min=0, max=1, modifier=false, summary=false)
2872    @Description(shortDefinition="When activity is to occur", formalDefinition="The period, timing or frequency upon which the described activity is to occur." )
2873    protected Type timing;
2874
2875    /**
2876     * Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.
2877     */
2878    @Child(name = "location", type = {Location.class}, order=14, min=0, max=1, modifier=false, summary=false)
2879    @Description(shortDefinition="Where it should happen", formalDefinition="Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc." )
2880    protected Reference location;
2881
2882    /**
2883     * The actual object that is the target of the reference (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
2884     */
2885    protected Location locationTarget;
2886
2887    /**
2888     * Indicates who should participate in performing the action described.
2889     */
2890    @Child(name = "participant", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2891    @Description(shortDefinition="Who should participate in the action", formalDefinition="Indicates who should participate in performing the action described." )
2892    protected List<ActivityDefinitionParticipantComponent> participant;
2893
2894    /**
2895     * Identifies the food, drug or other product being consumed or supplied in the activity.
2896     */
2897    @Child(name = "product", type = {Medication.class, Substance.class, CodeableConcept.class}, order=16, min=0, max=1, modifier=false, summary=false)
2898    @Description(shortDefinition="What's administered/supplied", formalDefinition="Identifies the food, drug or other product being consumed or supplied in the activity." )
2899    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-codes")
2900    protected Type product;
2901
2902    /**
2903     * Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).
2904     */
2905    @Child(name = "quantity", type = {SimpleQuantity.class}, order=17, min=0, max=1, modifier=false, summary=false)
2906    @Description(shortDefinition="How much is administered/consumed/supplied", formalDefinition="Identifies the quantity expected to be consumed at once (per dose, per meal, etc.)." )
2907    protected SimpleQuantity quantity;
2908
2909    /**
2910     * Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.
2911     */
2912    @Child(name = "dosage", type = {Dosage.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2913    @Description(shortDefinition="Detailed dosage instructions", formalDefinition="Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources." )
2914    protected List<Dosage> dosage;
2915
2916    /**
2917     * Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).
2918     */
2919    @Child(name = "bodySite", type = {CodeableConcept.class}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2920    @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)." )
2921    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site")
2922    protected List<CodeableConcept> bodySite;
2923
2924    /**
2925     * 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.
2926     */
2927    @Child(name = "transform", type = {StructureMap.class}, order=20, min=0, max=1, modifier=false, summary=false)
2928    @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." )
2929    protected Reference transform;
2930
2931    /**
2932     * The actual object that is the target of the reference (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.)
2933     */
2934    protected StructureMap transformTarget;
2935
2936    /**
2937     * 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 intent resource that would contain the result.
2938     */
2939    @Child(name = "dynamicValue", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2940    @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 intent resource that would contain the result." )
2941    protected List<ActivityDefinitionDynamicValueComponent> dynamicValue;
2942
2943    private static final long serialVersionUID = 1741931476L;
2944
2945  /**
2946   * Constructor
2947   */
2948    public ActivityDefinition() {
2949      super();
2950    }
2951
2952  /**
2953   * Constructor
2954   */
2955    public ActivityDefinition(Enumeration<PublicationStatus> status) {
2956      super();
2957      this.status = status;
2958    }
2959
2960    /**
2961     * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2962     */
2963    public UriType getUrlElement() { 
2964      if (this.url == null)
2965        if (Configuration.errorOnAutoCreate())
2966          throw new Error("Attempt to auto-create ActivityDefinition.url");
2967        else if (Configuration.doAutoCreate())
2968          this.url = new UriType(); // bb
2969      return this.url;
2970    }
2971
2972    public boolean hasUrlElement() { 
2973      return this.url != null && !this.url.isEmpty();
2974    }
2975
2976    public boolean hasUrl() { 
2977      return this.url != null && !this.url.isEmpty();
2978    }
2979
2980    /**
2981     * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2982     */
2983    public ActivityDefinition setUrlElement(UriType value) { 
2984      this.url = value;
2985      return this;
2986    }
2987
2988    /**
2989     * @return An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).
2990     */
2991    public String getUrl() { 
2992      return this.url == null ? null : this.url.getValue();
2993    }
2994
2995    /**
2996     * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).
2997     */
2998    public ActivityDefinition setUrl(String value) { 
2999      if (Utilities.noString(value))
3000        this.url = null;
3001      else {
3002        if (this.url == null)
3003          this.url = new UriType();
3004        this.url.setValue(value);
3005      }
3006      return this;
3007    }
3008
3009    /**
3010     * @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.)
3011     */
3012    public List<Identifier> getIdentifier() { 
3013      if (this.identifier == null)
3014        this.identifier = new ArrayList<Identifier>();
3015      return this.identifier;
3016    }
3017
3018    /**
3019     * @return Returns a reference to <code>this</code> for easy method chaining
3020     */
3021    public ActivityDefinition setIdentifier(List<Identifier> theIdentifier) { 
3022      this.identifier = theIdentifier;
3023      return this;
3024    }
3025
3026    public boolean hasIdentifier() { 
3027      if (this.identifier == null)
3028        return false;
3029      for (Identifier item : this.identifier)
3030        if (!item.isEmpty())
3031          return true;
3032      return false;
3033    }
3034
3035    public Identifier addIdentifier() { //3
3036      Identifier t = new Identifier();
3037      if (this.identifier == null)
3038        this.identifier = new ArrayList<Identifier>();
3039      this.identifier.add(t);
3040      return t;
3041    }
3042
3043    public ActivityDefinition addIdentifier(Identifier t) { //3
3044      if (t == null)
3045        return this;
3046      if (this.identifier == null)
3047        this.identifier = new ArrayList<Identifier>();
3048      this.identifier.add(t);
3049      return this;
3050    }
3051
3052    /**
3053     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
3054     */
3055    public Identifier getIdentifierFirstRep() { 
3056      if (getIdentifier().isEmpty()) {
3057        addIdentifier();
3058      }
3059      return getIdentifier().get(0);
3060    }
3061
3062    /**
3063     * @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
3064     */
3065    public StringType getVersionElement() { 
3066      if (this.version == null)
3067        if (Configuration.errorOnAutoCreate())
3068          throw new Error("Attempt to auto-create ActivityDefinition.version");
3069        else if (Configuration.doAutoCreate())
3070          this.version = new StringType(); // bb
3071      return this.version;
3072    }
3073
3074    public boolean hasVersionElement() { 
3075      return this.version != null && !this.version.isEmpty();
3076    }
3077
3078    public boolean hasVersion() { 
3079      return this.version != null && !this.version.isEmpty();
3080    }
3081
3082    /**
3083     * @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
3084     */
3085    public ActivityDefinition setVersionElement(StringType value) { 
3086      this.version = value;
3087      return this;
3088    }
3089
3090    /**
3091     * @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.
3092     */
3093    public String getVersion() { 
3094      return this.version == null ? null : this.version.getValue();
3095    }
3096
3097    /**
3098     * @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.
3099     */
3100    public ActivityDefinition setVersion(String value) { 
3101      if (Utilities.noString(value))
3102        this.version = null;
3103      else {
3104        if (this.version == null)
3105          this.version = new StringType();
3106        this.version.setValue(value);
3107      }
3108      return this;
3109    }
3110
3111    /**
3112     * @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
3113     */
3114    public StringType getNameElement() { 
3115      if (this.name == null)
3116        if (Configuration.errorOnAutoCreate())
3117          throw new Error("Attempt to auto-create ActivityDefinition.name");
3118        else if (Configuration.doAutoCreate())
3119          this.name = new StringType(); // bb
3120      return this.name;
3121    }
3122
3123    public boolean hasNameElement() { 
3124      return this.name != null && !this.name.isEmpty();
3125    }
3126
3127    public boolean hasName() { 
3128      return this.name != null && !this.name.isEmpty();
3129    }
3130
3131    /**
3132     * @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
3133     */
3134    public ActivityDefinition setNameElement(StringType value) { 
3135      this.name = value;
3136      return this;
3137    }
3138
3139    /**
3140     * @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.
3141     */
3142    public String getName() { 
3143      return this.name == null ? null : this.name.getValue();
3144    }
3145
3146    /**
3147     * @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.
3148     */
3149    public ActivityDefinition setName(String value) { 
3150      if (Utilities.noString(value))
3151        this.name = null;
3152      else {
3153        if (this.name == null)
3154          this.name = new StringType();
3155        this.name.setValue(value);
3156      }
3157      return this;
3158    }
3159
3160    /**
3161     * @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
3162     */
3163    public StringType getTitleElement() { 
3164      if (this.title == null)
3165        if (Configuration.errorOnAutoCreate())
3166          throw new Error("Attempt to auto-create ActivityDefinition.title");
3167        else if (Configuration.doAutoCreate())
3168          this.title = new StringType(); // bb
3169      return this.title;
3170    }
3171
3172    public boolean hasTitleElement() { 
3173      return this.title != null && !this.title.isEmpty();
3174    }
3175
3176    public boolean hasTitle() { 
3177      return this.title != null && !this.title.isEmpty();
3178    }
3179
3180    /**
3181     * @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
3182     */
3183    public ActivityDefinition setTitleElement(StringType value) { 
3184      this.title = value;
3185      return this;
3186    }
3187
3188    /**
3189     * @return A short, descriptive, user-friendly title for the activity definition.
3190     */
3191    public String getTitle() { 
3192      return this.title == null ? null : this.title.getValue();
3193    }
3194
3195    /**
3196     * @param value A short, descriptive, user-friendly title for the activity definition.
3197     */
3198    public ActivityDefinition setTitle(String value) { 
3199      if (Utilities.noString(value))
3200        this.title = null;
3201      else {
3202        if (this.title == null)
3203          this.title = new StringType();
3204        this.title.setValue(value);
3205      }
3206      return this;
3207    }
3208
3209    /**
3210     * @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
3211     */
3212    public Enumeration<PublicationStatus> getStatusElement() { 
3213      if (this.status == null)
3214        if (Configuration.errorOnAutoCreate())
3215          throw new Error("Attempt to auto-create ActivityDefinition.status");
3216        else if (Configuration.doAutoCreate())
3217          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
3218      return this.status;
3219    }
3220
3221    public boolean hasStatusElement() { 
3222      return this.status != null && !this.status.isEmpty();
3223    }
3224
3225    public boolean hasStatus() { 
3226      return this.status != null && !this.status.isEmpty();
3227    }
3228
3229    /**
3230     * @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
3231     */
3232    public ActivityDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
3233      this.status = value;
3234      return this;
3235    }
3236
3237    /**
3238     * @return The status of this activity definition. Enables tracking the life-cycle of the content.
3239     */
3240    public PublicationStatus getStatus() { 
3241      return this.status == null ? null : this.status.getValue();
3242    }
3243
3244    /**
3245     * @param value The status of this activity definition. Enables tracking the life-cycle of the content.
3246     */
3247    public ActivityDefinition setStatus(PublicationStatus value) { 
3248        if (this.status == null)
3249          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
3250        this.status.setValue(value);
3251      return this;
3252    }
3253
3254    /**
3255     * @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
3256     */
3257    public BooleanType getExperimentalElement() { 
3258      if (this.experimental == null)
3259        if (Configuration.errorOnAutoCreate())
3260          throw new Error("Attempt to auto-create ActivityDefinition.experimental");
3261        else if (Configuration.doAutoCreate())
3262          this.experimental = new BooleanType(); // bb
3263      return this.experimental;
3264    }
3265
3266    public boolean hasExperimentalElement() { 
3267      return this.experimental != null && !this.experimental.isEmpty();
3268    }
3269
3270    public boolean hasExperimental() { 
3271      return this.experimental != null && !this.experimental.isEmpty();
3272    }
3273
3274    /**
3275     * @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
3276     */
3277    public ActivityDefinition setExperimentalElement(BooleanType value) { 
3278      this.experimental = value;
3279      return this;
3280    }
3281
3282    /**
3283     * @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.
3284     */
3285    public boolean getExperimental() { 
3286      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
3287    }
3288
3289    /**
3290     * @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.
3291     */
3292    public ActivityDefinition setExperimental(boolean value) { 
3293        if (this.experimental == null)
3294          this.experimental = new BooleanType();
3295        this.experimental.setValue(value);
3296      return this;
3297    }
3298
3299    /**
3300     * @return {@link #date} (The date  (and optionally time) when the activity definition was published. The date must change if and 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
3301     */
3302    public DateTimeType getDateElement() { 
3303      if (this.date == null)
3304        if (Configuration.errorOnAutoCreate())
3305          throw new Error("Attempt to auto-create ActivityDefinition.date");
3306        else if (Configuration.doAutoCreate())
3307          this.date = new DateTimeType(); // bb
3308      return this.date;
3309    }
3310
3311    public boolean hasDateElement() { 
3312      return this.date != null && !this.date.isEmpty();
3313    }
3314
3315    public boolean hasDate() { 
3316      return this.date != null && !this.date.isEmpty();
3317    }
3318
3319    /**
3320     * @param value {@link #date} (The date  (and optionally time) when the activity definition was published. The date must change if and 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
3321     */
3322    public ActivityDefinition setDateElement(DateTimeType value) { 
3323      this.date = value;
3324      return this;
3325    }
3326
3327    /**
3328     * @return The date  (and optionally time) when the activity definition was published. The date must change if and 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.
3329     */
3330    public Date getDate() { 
3331      return this.date == null ? null : this.date.getValue();
3332    }
3333
3334    /**
3335     * @param value The date  (and optionally time) when the activity definition was published. The date must change if and 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.
3336     */
3337    public ActivityDefinition setDate(Date value) { 
3338      if (value == null)
3339        this.date = null;
3340      else {
3341        if (this.date == null)
3342          this.date = new DateTimeType();
3343        this.date.setValue(value);
3344      }
3345      return this;
3346    }
3347
3348    /**
3349     * @return {@link #publisher} (The name of the individual or organization that published the activity definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
3350     */
3351    public StringType getPublisherElement() { 
3352      if (this.publisher == null)
3353        if (Configuration.errorOnAutoCreate())
3354          throw new Error("Attempt to auto-create ActivityDefinition.publisher");
3355        else if (Configuration.doAutoCreate())
3356          this.publisher = new StringType(); // bb
3357      return this.publisher;
3358    }
3359
3360    public boolean hasPublisherElement() { 
3361      return this.publisher != null && !this.publisher.isEmpty();
3362    }
3363
3364    public boolean hasPublisher() { 
3365      return this.publisher != null && !this.publisher.isEmpty();
3366    }
3367
3368    /**
3369     * @param value {@link #publisher} (The name of the individual or organization that published the activity definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
3370     */
3371    public ActivityDefinition setPublisherElement(StringType value) { 
3372      this.publisher = value;
3373      return this;
3374    }
3375
3376    /**
3377     * @return The name of the individual or organization that published the activity definition.
3378     */
3379    public String getPublisher() { 
3380      return this.publisher == null ? null : this.publisher.getValue();
3381    }
3382
3383    /**
3384     * @param value The name of the individual or organization that published the activity definition.
3385     */
3386    public ActivityDefinition setPublisher(String value) { 
3387      if (Utilities.noString(value))
3388        this.publisher = null;
3389      else {
3390        if (this.publisher == null)
3391          this.publisher = new StringType();
3392        this.publisher.setValue(value);
3393      }
3394      return this;
3395    }
3396
3397    /**
3398     * @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
3399     */
3400    public MarkdownType getDescriptionElement() { 
3401      if (this.description == null)
3402        if (Configuration.errorOnAutoCreate())
3403          throw new Error("Attempt to auto-create ActivityDefinition.description");
3404        else if (Configuration.doAutoCreate())
3405          this.description = new MarkdownType(); // bb
3406      return this.description;
3407    }
3408
3409    public boolean hasDescriptionElement() { 
3410      return this.description != null && !this.description.isEmpty();
3411    }
3412
3413    public boolean hasDescription() { 
3414      return this.description != null && !this.description.isEmpty();
3415    }
3416
3417    /**
3418     * @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
3419     */
3420    public ActivityDefinition setDescriptionElement(MarkdownType value) { 
3421      this.description = value;
3422      return this;
3423    }
3424
3425    /**
3426     * @return A free text natural language description of the activity definition from a consumer's perspective.
3427     */
3428    public String getDescription() { 
3429      return this.description == null ? null : this.description.getValue();
3430    }
3431
3432    /**
3433     * @param value A free text natural language description of the activity definition from a consumer's perspective.
3434     */
3435    public ActivityDefinition setDescription(String value) { 
3436      if (value == null)
3437        this.description = null;
3438      else {
3439        if (this.description == null)
3440          this.description = new MarkdownType();
3441        this.description.setValue(value);
3442      }
3443      return this;
3444    }
3445
3446    /**
3447     * @return {@link #purpose} (Explaination 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
3448     */
3449    public MarkdownType getPurposeElement() { 
3450      if (this.purpose == null)
3451        if (Configuration.errorOnAutoCreate())
3452          throw new Error("Attempt to auto-create ActivityDefinition.purpose");
3453        else if (Configuration.doAutoCreate())
3454          this.purpose = new MarkdownType(); // bb
3455      return this.purpose;
3456    }
3457
3458    public boolean hasPurposeElement() { 
3459      return this.purpose != null && !this.purpose.isEmpty();
3460    }
3461
3462    public boolean hasPurpose() { 
3463      return this.purpose != null && !this.purpose.isEmpty();
3464    }
3465
3466    /**
3467     * @param value {@link #purpose} (Explaination 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
3468     */
3469    public ActivityDefinition setPurposeElement(MarkdownType value) { 
3470      this.purpose = value;
3471      return this;
3472    }
3473
3474    /**
3475     * @return Explaination of why this activity definition is needed and why it has been designed as it has.
3476     */
3477    public String getPurpose() { 
3478      return this.purpose == null ? null : this.purpose.getValue();
3479    }
3480
3481    /**
3482     * @param value Explaination of why this activity definition is needed and why it has been designed as it has.
3483     */
3484    public ActivityDefinition setPurpose(String value) { 
3485      if (value == null)
3486        this.purpose = null;
3487      else {
3488        if (this.purpose == null)
3489          this.purpose = new MarkdownType();
3490        this.purpose.setValue(value);
3491      }
3492      return this;
3493    }
3494
3495    /**
3496     * @return {@link #usage} (A detailed description of how the asset 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
3497     */
3498    public StringType getUsageElement() { 
3499      if (this.usage == null)
3500        if (Configuration.errorOnAutoCreate())
3501          throw new Error("Attempt to auto-create ActivityDefinition.usage");
3502        else if (Configuration.doAutoCreate())
3503          this.usage = new StringType(); // bb
3504      return this.usage;
3505    }
3506
3507    public boolean hasUsageElement() { 
3508      return this.usage != null && !this.usage.isEmpty();
3509    }
3510
3511    public boolean hasUsage() { 
3512      return this.usage != null && !this.usage.isEmpty();
3513    }
3514
3515    /**
3516     * @param value {@link #usage} (A detailed description of how the asset 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
3517     */
3518    public ActivityDefinition setUsageElement(StringType value) { 
3519      this.usage = value;
3520      return this;
3521    }
3522
3523    /**
3524     * @return A detailed description of how the asset is used from a clinical perspective.
3525     */
3526    public String getUsage() { 
3527      return this.usage == null ? null : this.usage.getValue();
3528    }
3529
3530    /**
3531     * @param value A detailed description of how the asset is used from a clinical perspective.
3532     */
3533    public ActivityDefinition setUsage(String value) { 
3534      if (Utilities.noString(value))
3535        this.usage = null;
3536      else {
3537        if (this.usage == null)
3538          this.usage = new StringType();
3539        this.usage.setValue(value);
3540      }
3541      return this;
3542    }
3543
3544    /**
3545     * @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
3546     */
3547    public DateType getApprovalDateElement() { 
3548      if (this.approvalDate == null)
3549        if (Configuration.errorOnAutoCreate())
3550          throw new Error("Attempt to auto-create ActivityDefinition.approvalDate");
3551        else if (Configuration.doAutoCreate())
3552          this.approvalDate = new DateType(); // bb
3553      return this.approvalDate;
3554    }
3555
3556    public boolean hasApprovalDateElement() { 
3557      return this.approvalDate != null && !this.approvalDate.isEmpty();
3558    }
3559
3560    public boolean hasApprovalDate() { 
3561      return this.approvalDate != null && !this.approvalDate.isEmpty();
3562    }
3563
3564    /**
3565     * @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
3566     */
3567    public ActivityDefinition setApprovalDateElement(DateType value) { 
3568      this.approvalDate = value;
3569      return this;
3570    }
3571
3572    /**
3573     * @return The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
3574     */
3575    public Date getApprovalDate() { 
3576      return this.approvalDate == null ? null : this.approvalDate.getValue();
3577    }
3578
3579    /**
3580     * @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.
3581     */
3582    public ActivityDefinition setApprovalDate(Date value) { 
3583      if (value == null)
3584        this.approvalDate = null;
3585      else {
3586        if (this.approvalDate == null)
3587          this.approvalDate = new DateType();
3588        this.approvalDate.setValue(value);
3589      }
3590      return this;
3591    }
3592
3593    /**
3594     * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
3595     */
3596    public DateType getLastReviewDateElement() { 
3597      if (this.lastReviewDate == null)
3598        if (Configuration.errorOnAutoCreate())
3599          throw new Error("Attempt to auto-create ActivityDefinition.lastReviewDate");
3600        else if (Configuration.doAutoCreate())
3601          this.lastReviewDate = new DateType(); // bb
3602      return this.lastReviewDate;
3603    }
3604
3605    public boolean hasLastReviewDateElement() { 
3606      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3607    }
3608
3609    public boolean hasLastReviewDate() { 
3610      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
3611    }
3612
3613    /**
3614     * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
3615     */
3616    public ActivityDefinition setLastReviewDateElement(DateType value) { 
3617      this.lastReviewDate = value;
3618      return this;
3619    }
3620
3621    /**
3622     * @return The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
3623     */
3624    public Date getLastReviewDate() { 
3625      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
3626    }
3627
3628    /**
3629     * @param value The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
3630     */
3631    public ActivityDefinition setLastReviewDate(Date value) { 
3632      if (value == null)
3633        this.lastReviewDate = null;
3634      else {
3635        if (this.lastReviewDate == null)
3636          this.lastReviewDate = new DateType();
3637        this.lastReviewDate.setValue(value);
3638      }
3639      return this;
3640    }
3641
3642    /**
3643     * @return {@link #effectivePeriod} (The period during which the activity definition content was or is planned to be in active use.)
3644     */
3645    public Period getEffectivePeriod() { 
3646      if (this.effectivePeriod == null)
3647        if (Configuration.errorOnAutoCreate())
3648          throw new Error("Attempt to auto-create ActivityDefinition.effectivePeriod");
3649        else if (Configuration.doAutoCreate())
3650          this.effectivePeriod = new Period(); // cc
3651      return this.effectivePeriod;
3652    }
3653
3654    public boolean hasEffectivePeriod() { 
3655      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
3656    }
3657
3658    /**
3659     * @param value {@link #effectivePeriod} (The period during which the activity definition content was or is planned to be in active use.)
3660     */
3661    public ActivityDefinition setEffectivePeriod(Period value)  { 
3662      this.effectivePeriod = value;
3663      return this;
3664    }
3665
3666    /**
3667     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate activity definition instances.)
3668     */
3669    public List<UsageContext> getUseContext() { 
3670      if (this.useContext == null)
3671        this.useContext = new ArrayList<UsageContext>();
3672      return this.useContext;
3673    }
3674
3675    /**
3676     * @return Returns a reference to <code>this</code> for easy method chaining
3677     */
3678    public ActivityDefinition setUseContext(List<UsageContext> theUseContext) { 
3679      this.useContext = theUseContext;
3680      return this;
3681    }
3682
3683    public boolean hasUseContext() { 
3684      if (this.useContext == null)
3685        return false;
3686      for (UsageContext item : this.useContext)
3687        if (!item.isEmpty())
3688          return true;
3689      return false;
3690    }
3691
3692    public UsageContext addUseContext() { //3
3693      UsageContext t = new UsageContext();
3694      if (this.useContext == null)
3695        this.useContext = new ArrayList<UsageContext>();
3696      this.useContext.add(t);
3697      return t;
3698    }
3699
3700    public ActivityDefinition addUseContext(UsageContext t) { //3
3701      if (t == null)
3702        return this;
3703      if (this.useContext == null)
3704        this.useContext = new ArrayList<UsageContext>();
3705      this.useContext.add(t);
3706      return this;
3707    }
3708
3709    /**
3710     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
3711     */
3712    public UsageContext getUseContextFirstRep() { 
3713      if (getUseContext().isEmpty()) {
3714        addUseContext();
3715      }
3716      return getUseContext().get(0);
3717    }
3718
3719    /**
3720     * @return {@link #jurisdiction} (A legal or geographic region in which the activity definition is intended to be used.)
3721     */
3722    public List<CodeableConcept> getJurisdiction() { 
3723      if (this.jurisdiction == null)
3724        this.jurisdiction = new ArrayList<CodeableConcept>();
3725      return this.jurisdiction;
3726    }
3727
3728    /**
3729     * @return Returns a reference to <code>this</code> for easy method chaining
3730     */
3731    public ActivityDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
3732      this.jurisdiction = theJurisdiction;
3733      return this;
3734    }
3735
3736    public boolean hasJurisdiction() { 
3737      if (this.jurisdiction == null)
3738        return false;
3739      for (CodeableConcept item : this.jurisdiction)
3740        if (!item.isEmpty())
3741          return true;
3742      return false;
3743    }
3744
3745    public CodeableConcept addJurisdiction() { //3
3746      CodeableConcept t = new CodeableConcept();
3747      if (this.jurisdiction == null)
3748        this.jurisdiction = new ArrayList<CodeableConcept>();
3749      this.jurisdiction.add(t);
3750      return t;
3751    }
3752
3753    public ActivityDefinition addJurisdiction(CodeableConcept t) { //3
3754      if (t == null)
3755        return this;
3756      if (this.jurisdiction == null)
3757        this.jurisdiction = new ArrayList<CodeableConcept>();
3758      this.jurisdiction.add(t);
3759      return this;
3760    }
3761
3762    /**
3763     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
3764     */
3765    public CodeableConcept getJurisdictionFirstRep() { 
3766      if (getJurisdiction().isEmpty()) {
3767        addJurisdiction();
3768      }
3769      return getJurisdiction().get(0);
3770    }
3771
3772    /**
3773     * @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.)
3774     */
3775    public List<CodeableConcept> getTopic() { 
3776      if (this.topic == null)
3777        this.topic = new ArrayList<CodeableConcept>();
3778      return this.topic;
3779    }
3780
3781    /**
3782     * @return Returns a reference to <code>this</code> for easy method chaining
3783     */
3784    public ActivityDefinition setTopic(List<CodeableConcept> theTopic) { 
3785      this.topic = theTopic;
3786      return this;
3787    }
3788
3789    public boolean hasTopic() { 
3790      if (this.topic == null)
3791        return false;
3792      for (CodeableConcept item : this.topic)
3793        if (!item.isEmpty())
3794          return true;
3795      return false;
3796    }
3797
3798    public CodeableConcept addTopic() { //3
3799      CodeableConcept t = new CodeableConcept();
3800      if (this.topic == null)
3801        this.topic = new ArrayList<CodeableConcept>();
3802      this.topic.add(t);
3803      return t;
3804    }
3805
3806    public ActivityDefinition addTopic(CodeableConcept t) { //3
3807      if (t == null)
3808        return this;
3809      if (this.topic == null)
3810        this.topic = new ArrayList<CodeableConcept>();
3811      this.topic.add(t);
3812      return this;
3813    }
3814
3815    /**
3816     * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist
3817     */
3818    public CodeableConcept getTopicFirstRep() { 
3819      if (getTopic().isEmpty()) {
3820        addTopic();
3821      }
3822      return getTopic().get(0);
3823    }
3824
3825    /**
3826     * @return {@link #contributor} (A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.)
3827     */
3828    public List<Contributor> getContributor() { 
3829      if (this.contributor == null)
3830        this.contributor = new ArrayList<Contributor>();
3831      return this.contributor;
3832    }
3833
3834    /**
3835     * @return Returns a reference to <code>this</code> for easy method chaining
3836     */
3837    public ActivityDefinition setContributor(List<Contributor> theContributor) { 
3838      this.contributor = theContributor;
3839      return this;
3840    }
3841
3842    public boolean hasContributor() { 
3843      if (this.contributor == null)
3844        return false;
3845      for (Contributor item : this.contributor)
3846        if (!item.isEmpty())
3847          return true;
3848      return false;
3849    }
3850
3851    public Contributor addContributor() { //3
3852      Contributor t = new Contributor();
3853      if (this.contributor == null)
3854        this.contributor = new ArrayList<Contributor>();
3855      this.contributor.add(t);
3856      return t;
3857    }
3858
3859    public ActivityDefinition addContributor(Contributor t) { //3
3860      if (t == null)
3861        return this;
3862      if (this.contributor == null)
3863        this.contributor = new ArrayList<Contributor>();
3864      this.contributor.add(t);
3865      return this;
3866    }
3867
3868    /**
3869     * @return The first repetition of repeating field {@link #contributor}, creating it if it does not already exist
3870     */
3871    public Contributor getContributorFirstRep() { 
3872      if (getContributor().isEmpty()) {
3873        addContributor();
3874      }
3875      return getContributor().get(0);
3876    }
3877
3878    /**
3879     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
3880     */
3881    public List<ContactDetail> getContact() { 
3882      if (this.contact == null)
3883        this.contact = new ArrayList<ContactDetail>();
3884      return this.contact;
3885    }
3886
3887    /**
3888     * @return Returns a reference to <code>this</code> for easy method chaining
3889     */
3890    public ActivityDefinition setContact(List<ContactDetail> theContact) { 
3891      this.contact = theContact;
3892      return this;
3893    }
3894
3895    public boolean hasContact() { 
3896      if (this.contact == null)
3897        return false;
3898      for (ContactDetail item : this.contact)
3899        if (!item.isEmpty())
3900          return true;
3901      return false;
3902    }
3903
3904    public ContactDetail addContact() { //3
3905      ContactDetail t = new ContactDetail();
3906      if (this.contact == null)
3907        this.contact = new ArrayList<ContactDetail>();
3908      this.contact.add(t);
3909      return t;
3910    }
3911
3912    public ActivityDefinition addContact(ContactDetail t) { //3
3913      if (t == null)
3914        return this;
3915      if (this.contact == null)
3916        this.contact = new ArrayList<ContactDetail>();
3917      this.contact.add(t);
3918      return this;
3919    }
3920
3921    /**
3922     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
3923     */
3924    public ContactDetail getContactFirstRep() { 
3925      if (getContact().isEmpty()) {
3926        addContact();
3927      }
3928      return getContact().get(0);
3929    }
3930
3931    /**
3932     * @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
3933     */
3934    public MarkdownType getCopyrightElement() { 
3935      if (this.copyright == null)
3936        if (Configuration.errorOnAutoCreate())
3937          throw new Error("Attempt to auto-create ActivityDefinition.copyright");
3938        else if (Configuration.doAutoCreate())
3939          this.copyright = new MarkdownType(); // bb
3940      return this.copyright;
3941    }
3942
3943    public boolean hasCopyrightElement() { 
3944      return this.copyright != null && !this.copyright.isEmpty();
3945    }
3946
3947    public boolean hasCopyright() { 
3948      return this.copyright != null && !this.copyright.isEmpty();
3949    }
3950
3951    /**
3952     * @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
3953     */
3954    public ActivityDefinition setCopyrightElement(MarkdownType value) { 
3955      this.copyright = value;
3956      return this;
3957    }
3958
3959    /**
3960     * @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.
3961     */
3962    public String getCopyright() { 
3963      return this.copyright == null ? null : this.copyright.getValue();
3964    }
3965
3966    /**
3967     * @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.
3968     */
3969    public ActivityDefinition setCopyright(String value) { 
3970      if (value == null)
3971        this.copyright = null;
3972      else {
3973        if (this.copyright == null)
3974          this.copyright = new MarkdownType();
3975        this.copyright.setValue(value);
3976      }
3977      return this;
3978    }
3979
3980    /**
3981     * @return {@link #relatedArtifact} (Related artifacts such as additional documentation, justification, or bibliographic references.)
3982     */
3983    public List<RelatedArtifact> getRelatedArtifact() { 
3984      if (this.relatedArtifact == null)
3985        this.relatedArtifact = new ArrayList<RelatedArtifact>();
3986      return this.relatedArtifact;
3987    }
3988
3989    /**
3990     * @return Returns a reference to <code>this</code> for easy method chaining
3991     */
3992    public ActivityDefinition setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 
3993      this.relatedArtifact = theRelatedArtifact;
3994      return this;
3995    }
3996
3997    public boolean hasRelatedArtifact() { 
3998      if (this.relatedArtifact == null)
3999        return false;
4000      for (RelatedArtifact item : this.relatedArtifact)
4001        if (!item.isEmpty())
4002          return true;
4003      return false;
4004    }
4005
4006    public RelatedArtifact addRelatedArtifact() { //3
4007      RelatedArtifact t = new RelatedArtifact();
4008      if (this.relatedArtifact == null)
4009        this.relatedArtifact = new ArrayList<RelatedArtifact>();
4010      this.relatedArtifact.add(t);
4011      return t;
4012    }
4013
4014    public ActivityDefinition addRelatedArtifact(RelatedArtifact t) { //3
4015      if (t == null)
4016        return this;
4017      if (this.relatedArtifact == null)
4018        this.relatedArtifact = new ArrayList<RelatedArtifact>();
4019      this.relatedArtifact.add(t);
4020      return this;
4021    }
4022
4023    /**
4024     * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist
4025     */
4026    public RelatedArtifact getRelatedArtifactFirstRep() { 
4027      if (getRelatedArtifact().isEmpty()) {
4028        addRelatedArtifact();
4029      }
4030      return getRelatedArtifact().get(0);
4031    }
4032
4033    /**
4034     * @return {@link #library} (A reference to a Library resource containing any formal logic used by the asset.)
4035     */
4036    public List<Reference> getLibrary() { 
4037      if (this.library == null)
4038        this.library = new ArrayList<Reference>();
4039      return this.library;
4040    }
4041
4042    /**
4043     * @return Returns a reference to <code>this</code> for easy method chaining
4044     */
4045    public ActivityDefinition setLibrary(List<Reference> theLibrary) { 
4046      this.library = theLibrary;
4047      return this;
4048    }
4049
4050    public boolean hasLibrary() { 
4051      if (this.library == null)
4052        return false;
4053      for (Reference item : this.library)
4054        if (!item.isEmpty())
4055          return true;
4056      return false;
4057    }
4058
4059    public Reference addLibrary() { //3
4060      Reference t = new Reference();
4061      if (this.library == null)
4062        this.library = new ArrayList<Reference>();
4063      this.library.add(t);
4064      return t;
4065    }
4066
4067    public ActivityDefinition addLibrary(Reference t) { //3
4068      if (t == null)
4069        return this;
4070      if (this.library == null)
4071        this.library = new ArrayList<Reference>();
4072      this.library.add(t);
4073      return this;
4074    }
4075
4076    /**
4077     * @return The first repetition of repeating field {@link #library}, creating it if it does not already exist
4078     */
4079    public Reference getLibraryFirstRep() { 
4080      if (getLibrary().isEmpty()) {
4081        addLibrary();
4082      }
4083      return getLibrary().get(0);
4084    }
4085
4086    /**
4087     * @deprecated Use Reference#setResource(IBaseResource) instead
4088     */
4089    @Deprecated
4090    public List<Library> getLibraryTarget() { 
4091      if (this.libraryTarget == null)
4092        this.libraryTarget = new ArrayList<Library>();
4093      return this.libraryTarget;
4094    }
4095
4096    /**
4097     * @deprecated Use Reference#setResource(IBaseResource) instead
4098     */
4099    @Deprecated
4100    public Library addLibraryTarget() { 
4101      Library r = new Library();
4102      if (this.libraryTarget == null)
4103        this.libraryTarget = new ArrayList<Library>();
4104      this.libraryTarget.add(r);
4105      return r;
4106    }
4107
4108    /**
4109     * @return {@link #kind} (A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, 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
4110     */
4111    public Enumeration<ActivityDefinitionKind> getKindElement() { 
4112      if (this.kind == null)
4113        if (Configuration.errorOnAutoCreate())
4114          throw new Error("Attempt to auto-create ActivityDefinition.kind");
4115        else if (Configuration.doAutoCreate())
4116          this.kind = new Enumeration<ActivityDefinitionKind>(new ActivityDefinitionKindEnumFactory()); // bb
4117      return this.kind;
4118    }
4119
4120    public boolean hasKindElement() { 
4121      return this.kind != null && !this.kind.isEmpty();
4122    }
4123
4124    public boolean hasKind() { 
4125      return this.kind != null && !this.kind.isEmpty();
4126    }
4127
4128    /**
4129     * @param value {@link #kind} (A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, 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
4130     */
4131    public ActivityDefinition setKindElement(Enumeration<ActivityDefinitionKind> value) { 
4132      this.kind = value;
4133      return this;
4134    }
4135
4136    /**
4137     * @return A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.
4138     */
4139    public ActivityDefinitionKind getKind() { 
4140      return this.kind == null ? null : this.kind.getValue();
4141    }
4142
4143    /**
4144     * @param value A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.
4145     */
4146    public ActivityDefinition setKind(ActivityDefinitionKind value) { 
4147      if (value == null)
4148        this.kind = null;
4149      else {
4150        if (this.kind == null)
4151          this.kind = new Enumeration<ActivityDefinitionKind>(new ActivityDefinitionKindEnumFactory());
4152        this.kind.setValue(value);
4153      }
4154      return this;
4155    }
4156
4157    /**
4158     * @return {@link #code} (Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.)
4159     */
4160    public CodeableConcept getCode() { 
4161      if (this.code == null)
4162        if (Configuration.errorOnAutoCreate())
4163          throw new Error("Attempt to auto-create ActivityDefinition.code");
4164        else if (Configuration.doAutoCreate())
4165          this.code = new CodeableConcept(); // cc
4166      return this.code;
4167    }
4168
4169    public boolean hasCode() { 
4170      return this.code != null && !this.code.isEmpty();
4171    }
4172
4173    /**
4174     * @param value {@link #code} (Detailed description of the type of activity; e.g. What lab test, what procedure, what kind of encounter.)
4175     */
4176    public ActivityDefinition setCode(CodeableConcept value)  { 
4177      this.code = value;
4178      return this;
4179    }
4180
4181    /**
4182     * @return {@link #timing} (The period, timing or frequency upon which the described activity is to occur.)
4183     */
4184    public Type getTiming() { 
4185      return this.timing;
4186    }
4187
4188    /**
4189     * @return {@link #timing} (The period, timing or frequency upon which the described activity is to occur.)
4190     */
4191    public Timing getTimingTiming() throws FHIRException { 
4192      if (this.timing == null)
4193        return null;
4194      if (!(this.timing instanceof Timing))
4195        throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered");
4196      return (Timing) this.timing;
4197    }
4198
4199    public boolean hasTimingTiming() { 
4200      return this != null && this.timing instanceof Timing;
4201    }
4202
4203    /**
4204     * @return {@link #timing} (The period, timing or frequency upon which the described activity is to occur.)
4205     */
4206    public DateTimeType getTimingDateTimeType() throws FHIRException { 
4207      if (this.timing == null)
4208        return null;
4209      if (!(this.timing instanceof DateTimeType))
4210        throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered");
4211      return (DateTimeType) this.timing;
4212    }
4213
4214    public boolean hasTimingDateTimeType() { 
4215      return this != null && this.timing instanceof DateTimeType;
4216    }
4217
4218    /**
4219     * @return {@link #timing} (The period, timing or frequency upon which the described activity is to occur.)
4220     */
4221    public Period getTimingPeriod() throws FHIRException { 
4222      if (this.timing == null)
4223        return null;
4224      if (!(this.timing instanceof Period))
4225        throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered");
4226      return (Period) this.timing;
4227    }
4228
4229    public boolean hasTimingPeriod() { 
4230      return this != null && this.timing instanceof Period;
4231    }
4232
4233    /**
4234     * @return {@link #timing} (The period, timing or frequency upon which the described activity is to occur.)
4235     */
4236    public Range getTimingRange() throws FHIRException { 
4237      if (this.timing == null)
4238        return null;
4239      if (!(this.timing instanceof Range))
4240        throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered");
4241      return (Range) this.timing;
4242    }
4243
4244    public boolean hasTimingRange() { 
4245      return this != null && this.timing instanceof Range;
4246    }
4247
4248    public boolean hasTiming() { 
4249      return this.timing != null && !this.timing.isEmpty();
4250    }
4251
4252    /**
4253     * @param value {@link #timing} (The period, timing or frequency upon which the described activity is to occur.)
4254     */
4255    public ActivityDefinition setTiming(Type value) throws FHIRFormatError { 
4256      if (value != null && !(value instanceof Timing || value instanceof DateTimeType || value instanceof Period || value instanceof Range))
4257        throw new FHIRFormatError("Not the right type for ActivityDefinition.timing[x]: "+value.fhirType());
4258      this.timing = value;
4259      return this;
4260    }
4261
4262    /**
4263     * @return {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
4264     */
4265    public Reference getLocation() { 
4266      if (this.location == null)
4267        if (Configuration.errorOnAutoCreate())
4268          throw new Error("Attempt to auto-create ActivityDefinition.location");
4269        else if (Configuration.doAutoCreate())
4270          this.location = new Reference(); // cc
4271      return this.location;
4272    }
4273
4274    public boolean hasLocation() { 
4275      return this.location != null && !this.location.isEmpty();
4276    }
4277
4278    /**
4279     * @param value {@link #location} (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
4280     */
4281    public ActivityDefinition setLocation(Reference value)  { 
4282      this.location = value;
4283      return this;
4284    }
4285
4286    /**
4287     * @return {@link #location} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
4288     */
4289    public Location getLocationTarget() { 
4290      if (this.locationTarget == null)
4291        if (Configuration.errorOnAutoCreate())
4292          throw new Error("Attempt to auto-create ActivityDefinition.location");
4293        else if (Configuration.doAutoCreate())
4294          this.locationTarget = new Location(); // aa
4295      return this.locationTarget;
4296    }
4297
4298    /**
4299     * @param value {@link #location} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.)
4300     */
4301    public ActivityDefinition setLocationTarget(Location value) { 
4302      this.locationTarget = value;
4303      return this;
4304    }
4305
4306    /**
4307     * @return {@link #participant} (Indicates who should participate in performing the action described.)
4308     */
4309    public List<ActivityDefinitionParticipantComponent> getParticipant() { 
4310      if (this.participant == null)
4311        this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4312      return this.participant;
4313    }
4314
4315    /**
4316     * @return Returns a reference to <code>this</code> for easy method chaining
4317     */
4318    public ActivityDefinition setParticipant(List<ActivityDefinitionParticipantComponent> theParticipant) { 
4319      this.participant = theParticipant;
4320      return this;
4321    }
4322
4323    public boolean hasParticipant() { 
4324      if (this.participant == null)
4325        return false;
4326      for (ActivityDefinitionParticipantComponent item : this.participant)
4327        if (!item.isEmpty())
4328          return true;
4329      return false;
4330    }
4331
4332    public ActivityDefinitionParticipantComponent addParticipant() { //3
4333      ActivityDefinitionParticipantComponent t = new ActivityDefinitionParticipantComponent();
4334      if (this.participant == null)
4335        this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4336      this.participant.add(t);
4337      return t;
4338    }
4339
4340    public ActivityDefinition addParticipant(ActivityDefinitionParticipantComponent t) { //3
4341      if (t == null)
4342        return this;
4343      if (this.participant == null)
4344        this.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
4345      this.participant.add(t);
4346      return this;
4347    }
4348
4349    /**
4350     * @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist
4351     */
4352    public ActivityDefinitionParticipantComponent getParticipantFirstRep() { 
4353      if (getParticipant().isEmpty()) {
4354        addParticipant();
4355      }
4356      return getParticipant().get(0);
4357    }
4358
4359    /**
4360     * @return {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
4361     */
4362    public Type getProduct() { 
4363      return this.product;
4364    }
4365
4366    /**
4367     * @return {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
4368     */
4369    public Reference getProductReference() throws FHIRException { 
4370      if (this.product == null)
4371        return null;
4372      if (!(this.product instanceof Reference))
4373        throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.product.getClass().getName()+" was encountered");
4374      return (Reference) this.product;
4375    }
4376
4377    public boolean hasProductReference() { 
4378      return this != null && this.product instanceof Reference;
4379    }
4380
4381    /**
4382     * @return {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
4383     */
4384    public CodeableConcept getProductCodeableConcept() throws FHIRException { 
4385      if (this.product == null)
4386        return null;
4387      if (!(this.product instanceof CodeableConcept))
4388        throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.product.getClass().getName()+" was encountered");
4389      return (CodeableConcept) this.product;
4390    }
4391
4392    public boolean hasProductCodeableConcept() { 
4393      return this != null && this.product instanceof CodeableConcept;
4394    }
4395
4396    public boolean hasProduct() { 
4397      return this.product != null && !this.product.isEmpty();
4398    }
4399
4400    /**
4401     * @param value {@link #product} (Identifies the food, drug or other product being consumed or supplied in the activity.)
4402     */
4403    public ActivityDefinition setProduct(Type value) throws FHIRFormatError { 
4404      if (value != null && !(value instanceof Reference || value instanceof CodeableConcept))
4405        throw new FHIRFormatError("Not the right type for ActivityDefinition.product[x]: "+value.fhirType());
4406      this.product = value;
4407      return this;
4408    }
4409
4410    /**
4411     * @return {@link #quantity} (Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).)
4412     */
4413    public SimpleQuantity getQuantity() { 
4414      if (this.quantity == null)
4415        if (Configuration.errorOnAutoCreate())
4416          throw new Error("Attempt to auto-create ActivityDefinition.quantity");
4417        else if (Configuration.doAutoCreate())
4418          this.quantity = new SimpleQuantity(); // cc
4419      return this.quantity;
4420    }
4421
4422    public boolean hasQuantity() { 
4423      return this.quantity != null && !this.quantity.isEmpty();
4424    }
4425
4426    /**
4427     * @param value {@link #quantity} (Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).)
4428     */
4429    public ActivityDefinition setQuantity(SimpleQuantity value)  { 
4430      this.quantity = value;
4431      return this;
4432    }
4433
4434    /**
4435     * @return {@link #dosage} (Provides detailed dosage instructions in the same way that they are described for MedicationRequest resources.)
4436     */
4437    public List<Dosage> getDosage() { 
4438      if (this.dosage == null)
4439        this.dosage = new ArrayList<Dosage>();
4440      return this.dosage;
4441    }
4442
4443    /**
4444     * @return Returns a reference to <code>this</code> for easy method chaining
4445     */
4446    public ActivityDefinition setDosage(List<Dosage> theDosage) { 
4447      this.dosage = theDosage;
4448      return this;
4449    }
4450
4451    public boolean hasDosage() { 
4452      if (this.dosage == null)
4453        return false;
4454      for (Dosage item : this.dosage)
4455        if (!item.isEmpty())
4456          return true;
4457      return false;
4458    }
4459
4460    public Dosage addDosage() { //3
4461      Dosage t = new Dosage();
4462      if (this.dosage == null)
4463        this.dosage = new ArrayList<Dosage>();
4464      this.dosage.add(t);
4465      return t;
4466    }
4467
4468    public ActivityDefinition addDosage(Dosage t) { //3
4469      if (t == null)
4470        return this;
4471      if (this.dosage == null)
4472        this.dosage = new ArrayList<Dosage>();
4473      this.dosage.add(t);
4474      return this;
4475    }
4476
4477    /**
4478     * @return The first repetition of repeating field {@link #dosage}, creating it if it does not already exist
4479     */
4480    public Dosage getDosageFirstRep() { 
4481      if (getDosage().isEmpty()) {
4482        addDosage();
4483      }
4484      return getDosage().get(0);
4485    }
4486
4487    /**
4488     * @return {@link #bodySite} (Indicates the sites on the subject's body where the procedure should be performed (I.e. the target sites).)
4489     */
4490    public List<CodeableConcept> getBodySite() { 
4491      if (this.bodySite == null)
4492        this.bodySite = new ArrayList<CodeableConcept>();
4493      return this.bodySite;
4494    }
4495
4496    /**
4497     * @return Returns a reference to <code>this</code> for easy method chaining
4498     */
4499    public ActivityDefinition setBodySite(List<CodeableConcept> theBodySite) { 
4500      this.bodySite = theBodySite;
4501      return this;
4502    }
4503
4504    public boolean hasBodySite() { 
4505      if (this.bodySite == null)
4506        return false;
4507      for (CodeableConcept item : this.bodySite)
4508        if (!item.isEmpty())
4509          return true;
4510      return false;
4511    }
4512
4513    public CodeableConcept addBodySite() { //3
4514      CodeableConcept t = new CodeableConcept();
4515      if (this.bodySite == null)
4516        this.bodySite = new ArrayList<CodeableConcept>();
4517      this.bodySite.add(t);
4518      return t;
4519    }
4520
4521    public ActivityDefinition addBodySite(CodeableConcept t) { //3
4522      if (t == null)
4523        return this;
4524      if (this.bodySite == null)
4525        this.bodySite = new ArrayList<CodeableConcept>();
4526      this.bodySite.add(t);
4527      return this;
4528    }
4529
4530    /**
4531     * @return The first repetition of repeating field {@link #bodySite}, creating it if it does not already exist
4532     */
4533    public CodeableConcept getBodySiteFirstRep() { 
4534      if (getBodySite().isEmpty()) {
4535        addBodySite();
4536      }
4537      return getBodySite().get(0);
4538    }
4539
4540    /**
4541     * @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.)
4542     */
4543    public Reference getTransform() { 
4544      if (this.transform == null)
4545        if (Configuration.errorOnAutoCreate())
4546          throw new Error("Attempt to auto-create ActivityDefinition.transform");
4547        else if (Configuration.doAutoCreate())
4548          this.transform = new Reference(); // cc
4549      return this.transform;
4550    }
4551
4552    public boolean hasTransform() { 
4553      return this.transform != null && !this.transform.isEmpty();
4554    }
4555
4556    /**
4557     * @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.)
4558     */
4559    public ActivityDefinition setTransform(Reference value)  { 
4560      this.transform = value;
4561      return this;
4562    }
4563
4564    /**
4565     * @return {@link #transform} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (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.)
4566     */
4567    public StructureMap getTransformTarget() { 
4568      if (this.transformTarget == null)
4569        if (Configuration.errorOnAutoCreate())
4570          throw new Error("Attempt to auto-create ActivityDefinition.transform");
4571        else if (Configuration.doAutoCreate())
4572          this.transformTarget = new StructureMap(); // aa
4573      return this.transformTarget;
4574    }
4575
4576    /**
4577     * @param value {@link #transform} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (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.)
4578     */
4579    public ActivityDefinition setTransformTarget(StructureMap value) { 
4580      this.transformTarget = value;
4581      return this;
4582    }
4583
4584    /**
4585     * @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 intent resource that would contain the result.)
4586     */
4587    public List<ActivityDefinitionDynamicValueComponent> getDynamicValue() { 
4588      if (this.dynamicValue == null)
4589        this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4590      return this.dynamicValue;
4591    }
4592
4593    /**
4594     * @return Returns a reference to <code>this</code> for easy method chaining
4595     */
4596    public ActivityDefinition setDynamicValue(List<ActivityDefinitionDynamicValueComponent> theDynamicValue) { 
4597      this.dynamicValue = theDynamicValue;
4598      return this;
4599    }
4600
4601    public boolean hasDynamicValue() { 
4602      if (this.dynamicValue == null)
4603        return false;
4604      for (ActivityDefinitionDynamicValueComponent item : this.dynamicValue)
4605        if (!item.isEmpty())
4606          return true;
4607      return false;
4608    }
4609
4610    public ActivityDefinitionDynamicValueComponent addDynamicValue() { //3
4611      ActivityDefinitionDynamicValueComponent t = new ActivityDefinitionDynamicValueComponent();
4612      if (this.dynamicValue == null)
4613        this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4614      this.dynamicValue.add(t);
4615      return t;
4616    }
4617
4618    public ActivityDefinition addDynamicValue(ActivityDefinitionDynamicValueComponent t) { //3
4619      if (t == null)
4620        return this;
4621      if (this.dynamicValue == null)
4622        this.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
4623      this.dynamicValue.add(t);
4624      return this;
4625    }
4626
4627    /**
4628     * @return The first repetition of repeating field {@link #dynamicValue}, creating it if it does not already exist
4629     */
4630    public ActivityDefinitionDynamicValueComponent getDynamicValueFirstRep() { 
4631      if (getDynamicValue().isEmpty()) {
4632        addDynamicValue();
4633      }
4634      return getDynamicValue().get(0);
4635    }
4636
4637      protected void listChildren(List<Property> children) {
4638        super.listChildren(children);
4639        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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url));
4640        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));
4641        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));
4642        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));
4643        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the activity definition.", 0, 1, title));
4644        children.add(new Property("status", "code", "The status of this activity definition. Enables tracking the life-cycle of the content.", 0, 1, status));
4645        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));
4646        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the activity definition was published. The date must change if and 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));
4647        children.add(new Property("publisher", "string", "The name of the individual or organization that published the activity definition.", 0, 1, publisher));
4648        children.add(new Property("description", "markdown", "A free text natural language description of the activity definition from a consumer's perspective.", 0, 1, description));
4649        children.add(new Property("purpose", "markdown", "Explaination of why this activity definition is needed and why it has been designed as it has.", 0, 1, purpose));
4650        children.add(new Property("usage", "string", "A detailed description of how the asset is used from a clinical perspective.", 0, 1, usage));
4651        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));
4652        children.add(new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, 1, lastReviewDate));
4653        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));
4654        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate activity definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
4655        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));
4656        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));
4657        children.add(new Property("contributor", "Contributor", "A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor));
4658        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));
4659        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));
4660        children.add(new Property("relatedArtifact", "RelatedArtifact", "Related artifacts such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact));
4661        children.add(new Property("library", "Reference(Library)", "A reference to a Library resource containing any formal logic used by the asset.", 0, java.lang.Integer.MAX_VALUE, library));
4662        children.add(new Property("kind", "code", "A description of the kind of resource the activity definition is representing. For example, a MedicationRequest, a ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.", 0, 1, kind));
4663        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));
4664        children.add(new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing));
4665        children.add(new Property("location", "Reference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, location));
4666        children.add(new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant));
4667        children.add(new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product));
4668        children.add(new Property("quantity", "SimpleQuantity", "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).", 0, 1, quantity));
4669        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));
4670        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));
4671        children.add(new Property("transform", "Reference(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));
4672        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 intent resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, dynamicValue));
4673      }
4674
4675      @Override
4676      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4677        switch (_hash) {
4678        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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this activity definition is (or will be) published. The URL SHOULD include the major version of the activity definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url);
4679        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);
4680        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);
4681        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);
4682        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the activity definition.", 0, 1, title);
4683        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);
4684        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);
4685        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the activity definition was published. The date must change if and 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);
4686        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the individual or organization that published the activity definition.", 0, 1, publisher);
4687        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);
4688        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explaination of why this activity definition is needed and why it has been designed as it has.", 0, 1, purpose);
4689        case 111574433: /*usage*/  return new Property("usage", "string", "A detailed description of how the asset is used from a clinical perspective.", 0, 1, usage);
4690        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);
4691        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.", 0, 1, lastReviewDate);
4692        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);
4693        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 terms may be used to assist with indexing and searching for appropriate activity definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
4694        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);
4695        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);
4696        case -1895276325: /*contributor*/  return new Property("contributor", "Contributor", "A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.", 0, java.lang.Integer.MAX_VALUE, contributor);
4697        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);
4698        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);
4699        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);
4700        case 166208699: /*library*/  return new Property("library", "Reference(Library)", "A reference to a Library resource containing any formal logic used by the asset.", 0, java.lang.Integer.MAX_VALUE, library);
4701        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 ProcedureRequest, or a CommunicationRequest. Typically, but not always, this is a Request resource.", 0, 1, kind);
4702        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);
4703        case 164632566: /*timing[x]*/  return new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
4704        case -873664438: /*timing*/  return new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
4705        case -497554124: /*timingTiming*/  return new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
4706        case -1837458939: /*timingDateTime*/  return new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
4707        case -615615829: /*timingPeriod*/  return new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
4708        case -710871277: /*timingRange*/  return new Property("timing[x]", "Timing|dateTime|Period|Range", "The period, timing or frequency upon which the described activity is to occur.", 0, 1, timing);
4709        case 1901043637: /*location*/  return new Property("location", "Reference(Location)", "Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.", 0, 1, location);
4710        case 767422259: /*participant*/  return new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant);
4711        case 1753005361: /*product[x]*/  return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
4712        case -309474065: /*product*/  return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
4713        case -669667556: /*productReference*/  return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
4714        case 906854066: /*productCodeableConcept*/  return new Property("product[x]", "Reference(Medication|Substance)|CodeableConcept", "Identifies the food, drug or other product being consumed or supplied in the activity.", 0, 1, product);
4715        case -1285004149: /*quantity*/  return new Property("quantity", "SimpleQuantity", "Identifies the quantity expected to be consumed at once (per dose, per meal, etc.).", 0, 1, quantity);
4716        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);
4717        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);
4718        case 1052666732: /*transform*/  return new Property("transform", "Reference(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);
4719        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 intent resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, dynamicValue);
4720        default: return super.getNamedProperty(_hash, _name, _checkValid);
4721        }
4722
4723      }
4724
4725      @Override
4726      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4727        switch (hash) {
4728        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
4729        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
4730        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
4731        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4732        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
4733        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
4734        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
4735        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
4736        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
4737        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
4738        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
4739        case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
4740        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
4741        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
4742        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
4743        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
4744        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
4745        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
4746        case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // Contributor
4747        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
4748        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
4749        case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact
4750        case 166208699: /*library*/ return this.library == null ? new Base[0] : this.library.toArray(new Base[this.library.size()]); // Reference
4751        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<ActivityDefinitionKind>
4752        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
4753        case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type
4754        case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference
4755        case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // ActivityDefinitionParticipantComponent
4756        case -309474065: /*product*/ return this.product == null ? new Base[0] : new Base[] {this.product}; // Type
4757        case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity
4758        case -1326018889: /*dosage*/ return this.dosage == null ? new Base[0] : this.dosage.toArray(new Base[this.dosage.size()]); // Dosage
4759        case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : this.bodySite.toArray(new Base[this.bodySite.size()]); // CodeableConcept
4760        case 1052666732: /*transform*/ return this.transform == null ? new Base[0] : new Base[] {this.transform}; // Reference
4761        case 572625010: /*dynamicValue*/ return this.dynamicValue == null ? new Base[0] : this.dynamicValue.toArray(new Base[this.dynamicValue.size()]); // ActivityDefinitionDynamicValueComponent
4762        default: return super.getProperty(hash, name, checkValid);
4763        }
4764
4765      }
4766
4767      @Override
4768      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4769        switch (hash) {
4770        case 116079: // url
4771          this.url = castToUri(value); // UriType
4772          return value;
4773        case -1618432855: // identifier
4774          this.getIdentifier().add(castToIdentifier(value)); // Identifier
4775          return value;
4776        case 351608024: // version
4777          this.version = castToString(value); // StringType
4778          return value;
4779        case 3373707: // name
4780          this.name = castToString(value); // StringType
4781          return value;
4782        case 110371416: // title
4783          this.title = castToString(value); // StringType
4784          return value;
4785        case -892481550: // status
4786          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
4787          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
4788          return value;
4789        case -404562712: // experimental
4790          this.experimental = castToBoolean(value); // BooleanType
4791          return value;
4792        case 3076014: // date
4793          this.date = castToDateTime(value); // DateTimeType
4794          return value;
4795        case 1447404028: // publisher
4796          this.publisher = castToString(value); // StringType
4797          return value;
4798        case -1724546052: // description
4799          this.description = castToMarkdown(value); // MarkdownType
4800          return value;
4801        case -220463842: // purpose
4802          this.purpose = castToMarkdown(value); // MarkdownType
4803          return value;
4804        case 111574433: // usage
4805          this.usage = castToString(value); // StringType
4806          return value;
4807        case 223539345: // approvalDate
4808          this.approvalDate = castToDate(value); // DateType
4809          return value;
4810        case -1687512484: // lastReviewDate
4811          this.lastReviewDate = castToDate(value); // DateType
4812          return value;
4813        case -403934648: // effectivePeriod
4814          this.effectivePeriod = castToPeriod(value); // Period
4815          return value;
4816        case -669707736: // useContext
4817          this.getUseContext().add(castToUsageContext(value)); // UsageContext
4818          return value;
4819        case -507075711: // jurisdiction
4820          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
4821          return value;
4822        case 110546223: // topic
4823          this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept
4824          return value;
4825        case -1895276325: // contributor
4826          this.getContributor().add(castToContributor(value)); // Contributor
4827          return value;
4828        case 951526432: // contact
4829          this.getContact().add(castToContactDetail(value)); // ContactDetail
4830          return value;
4831        case 1522889671: // copyright
4832          this.copyright = castToMarkdown(value); // MarkdownType
4833          return value;
4834        case 666807069: // relatedArtifact
4835          this.getRelatedArtifact().add(castToRelatedArtifact(value)); // RelatedArtifact
4836          return value;
4837        case 166208699: // library
4838          this.getLibrary().add(castToReference(value)); // Reference
4839          return value;
4840        case 3292052: // kind
4841          value = new ActivityDefinitionKindEnumFactory().fromType(castToCode(value));
4842          this.kind = (Enumeration) value; // Enumeration<ActivityDefinitionKind>
4843          return value;
4844        case 3059181: // code
4845          this.code = castToCodeableConcept(value); // CodeableConcept
4846          return value;
4847        case -873664438: // timing
4848          this.timing = castToType(value); // Type
4849          return value;
4850        case 1901043637: // location
4851          this.location = castToReference(value); // Reference
4852          return value;
4853        case 767422259: // participant
4854          this.getParticipant().add((ActivityDefinitionParticipantComponent) value); // ActivityDefinitionParticipantComponent
4855          return value;
4856        case -309474065: // product
4857          this.product = castToType(value); // Type
4858          return value;
4859        case -1285004149: // quantity
4860          this.quantity = castToSimpleQuantity(value); // SimpleQuantity
4861          return value;
4862        case -1326018889: // dosage
4863          this.getDosage().add(castToDosage(value)); // Dosage
4864          return value;
4865        case 1702620169: // bodySite
4866          this.getBodySite().add(castToCodeableConcept(value)); // CodeableConcept
4867          return value;
4868        case 1052666732: // transform
4869          this.transform = castToReference(value); // Reference
4870          return value;
4871        case 572625010: // dynamicValue
4872          this.getDynamicValue().add((ActivityDefinitionDynamicValueComponent) value); // ActivityDefinitionDynamicValueComponent
4873          return value;
4874        default: return super.setProperty(hash, name, value);
4875        }
4876
4877      }
4878
4879      @Override
4880      public Base setProperty(String name, Base value) throws FHIRException {
4881        if (name.equals("url")) {
4882          this.url = castToUri(value); // UriType
4883        } else if (name.equals("identifier")) {
4884          this.getIdentifier().add(castToIdentifier(value));
4885        } else if (name.equals("version")) {
4886          this.version = castToString(value); // StringType
4887        } else if (name.equals("name")) {
4888          this.name = castToString(value); // StringType
4889        } else if (name.equals("title")) {
4890          this.title = castToString(value); // StringType
4891        } else if (name.equals("status")) {
4892          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
4893          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
4894        } else if (name.equals("experimental")) {
4895          this.experimental = castToBoolean(value); // BooleanType
4896        } else if (name.equals("date")) {
4897          this.date = castToDateTime(value); // DateTimeType
4898        } else if (name.equals("publisher")) {
4899          this.publisher = castToString(value); // StringType
4900        } else if (name.equals("description")) {
4901          this.description = castToMarkdown(value); // MarkdownType
4902        } else if (name.equals("purpose")) {
4903          this.purpose = castToMarkdown(value); // MarkdownType
4904        } else if (name.equals("usage")) {
4905          this.usage = castToString(value); // StringType
4906        } else if (name.equals("approvalDate")) {
4907          this.approvalDate = castToDate(value); // DateType
4908        } else if (name.equals("lastReviewDate")) {
4909          this.lastReviewDate = castToDate(value); // DateType
4910        } else if (name.equals("effectivePeriod")) {
4911          this.effectivePeriod = castToPeriod(value); // Period
4912        } else if (name.equals("useContext")) {
4913          this.getUseContext().add(castToUsageContext(value));
4914        } else if (name.equals("jurisdiction")) {
4915          this.getJurisdiction().add(castToCodeableConcept(value));
4916        } else if (name.equals("topic")) {
4917          this.getTopic().add(castToCodeableConcept(value));
4918        } else if (name.equals("contributor")) {
4919          this.getContributor().add(castToContributor(value));
4920        } else if (name.equals("contact")) {
4921          this.getContact().add(castToContactDetail(value));
4922        } else if (name.equals("copyright")) {
4923          this.copyright = castToMarkdown(value); // MarkdownType
4924        } else if (name.equals("relatedArtifact")) {
4925          this.getRelatedArtifact().add(castToRelatedArtifact(value));
4926        } else if (name.equals("library")) {
4927          this.getLibrary().add(castToReference(value));
4928        } else if (name.equals("kind")) {
4929          value = new ActivityDefinitionKindEnumFactory().fromType(castToCode(value));
4930          this.kind = (Enumeration) value; // Enumeration<ActivityDefinitionKind>
4931        } else if (name.equals("code")) {
4932          this.code = castToCodeableConcept(value); // CodeableConcept
4933        } else if (name.equals("timing[x]")) {
4934          this.timing = castToType(value); // Type
4935        } else if (name.equals("location")) {
4936          this.location = castToReference(value); // Reference
4937        } else if (name.equals("participant")) {
4938          this.getParticipant().add((ActivityDefinitionParticipantComponent) value);
4939        } else if (name.equals("product[x]")) {
4940          this.product = castToType(value); // Type
4941        } else if (name.equals("quantity")) {
4942          this.quantity = castToSimpleQuantity(value); // SimpleQuantity
4943        } else if (name.equals("dosage")) {
4944          this.getDosage().add(castToDosage(value));
4945        } else if (name.equals("bodySite")) {
4946          this.getBodySite().add(castToCodeableConcept(value));
4947        } else if (name.equals("transform")) {
4948          this.transform = castToReference(value); // Reference
4949        } else if (name.equals("dynamicValue")) {
4950          this.getDynamicValue().add((ActivityDefinitionDynamicValueComponent) value);
4951        } else
4952          return super.setProperty(name, value);
4953        return value;
4954      }
4955
4956      @Override
4957      public Base makeProperty(int hash, String name) throws FHIRException {
4958        switch (hash) {
4959        case 116079:  return getUrlElement();
4960        case -1618432855:  return addIdentifier(); 
4961        case 351608024:  return getVersionElement();
4962        case 3373707:  return getNameElement();
4963        case 110371416:  return getTitleElement();
4964        case -892481550:  return getStatusElement();
4965        case -404562712:  return getExperimentalElement();
4966        case 3076014:  return getDateElement();
4967        case 1447404028:  return getPublisherElement();
4968        case -1724546052:  return getDescriptionElement();
4969        case -220463842:  return getPurposeElement();
4970        case 111574433:  return getUsageElement();
4971        case 223539345:  return getApprovalDateElement();
4972        case -1687512484:  return getLastReviewDateElement();
4973        case -403934648:  return getEffectivePeriod(); 
4974        case -669707736:  return addUseContext(); 
4975        case -507075711:  return addJurisdiction(); 
4976        case 110546223:  return addTopic(); 
4977        case -1895276325:  return addContributor(); 
4978        case 951526432:  return addContact(); 
4979        case 1522889671:  return getCopyrightElement();
4980        case 666807069:  return addRelatedArtifact(); 
4981        case 166208699:  return addLibrary(); 
4982        case 3292052:  return getKindElement();
4983        case 3059181:  return getCode(); 
4984        case 164632566:  return getTiming(); 
4985        case -873664438:  return getTiming(); 
4986        case 1901043637:  return getLocation(); 
4987        case 767422259:  return addParticipant(); 
4988        case 1753005361:  return getProduct(); 
4989        case -309474065:  return getProduct(); 
4990        case -1285004149:  return getQuantity(); 
4991        case -1326018889:  return addDosage(); 
4992        case 1702620169:  return addBodySite(); 
4993        case 1052666732:  return getTransform(); 
4994        case 572625010:  return addDynamicValue(); 
4995        default: return super.makeProperty(hash, name);
4996        }
4997
4998      }
4999
5000      @Override
5001      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5002        switch (hash) {
5003        case 116079: /*url*/ return new String[] {"uri"};
5004        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
5005        case 351608024: /*version*/ return new String[] {"string"};
5006        case 3373707: /*name*/ return new String[] {"string"};
5007        case 110371416: /*title*/ return new String[] {"string"};
5008        case -892481550: /*status*/ return new String[] {"code"};
5009        case -404562712: /*experimental*/ return new String[] {"boolean"};
5010        case 3076014: /*date*/ return new String[] {"dateTime"};
5011        case 1447404028: /*publisher*/ return new String[] {"string"};
5012        case -1724546052: /*description*/ return new String[] {"markdown"};
5013        case -220463842: /*purpose*/ return new String[] {"markdown"};
5014        case 111574433: /*usage*/ return new String[] {"string"};
5015        case 223539345: /*approvalDate*/ return new String[] {"date"};
5016        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
5017        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
5018        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
5019        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
5020        case 110546223: /*topic*/ return new String[] {"CodeableConcept"};
5021        case -1895276325: /*contributor*/ return new String[] {"Contributor"};
5022        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
5023        case 1522889671: /*copyright*/ return new String[] {"markdown"};
5024        case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"};
5025        case 166208699: /*library*/ return new String[] {"Reference"};
5026        case 3292052: /*kind*/ return new String[] {"code"};
5027        case 3059181: /*code*/ return new String[] {"CodeableConcept"};
5028        case -873664438: /*timing*/ return new String[] {"Timing", "dateTime", "Period", "Range"};
5029        case 1901043637: /*location*/ return new String[] {"Reference"};
5030        case 767422259: /*participant*/ return new String[] {};
5031        case -309474065: /*product*/ return new String[] {"Reference", "CodeableConcept"};
5032        case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"};
5033        case -1326018889: /*dosage*/ return new String[] {"Dosage"};
5034        case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"};
5035        case 1052666732: /*transform*/ return new String[] {"Reference"};
5036        case 572625010: /*dynamicValue*/ return new String[] {};
5037        default: return super.getTypesForProperty(hash, name);
5038        }
5039
5040      }
5041
5042      @Override
5043      public Base addChild(String name) throws FHIRException {
5044        if (name.equals("url")) {
5045          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.url");
5046        }
5047        else if (name.equals("identifier")) {
5048          return addIdentifier();
5049        }
5050        else if (name.equals("version")) {
5051          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.version");
5052        }
5053        else if (name.equals("name")) {
5054          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.name");
5055        }
5056        else if (name.equals("title")) {
5057          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.title");
5058        }
5059        else if (name.equals("status")) {
5060          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.status");
5061        }
5062        else if (name.equals("experimental")) {
5063          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.experimental");
5064        }
5065        else if (name.equals("date")) {
5066          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.date");
5067        }
5068        else if (name.equals("publisher")) {
5069          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.publisher");
5070        }
5071        else if (name.equals("description")) {
5072          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.description");
5073        }
5074        else if (name.equals("purpose")) {
5075          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.purpose");
5076        }
5077        else if (name.equals("usage")) {
5078          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.usage");
5079        }
5080        else if (name.equals("approvalDate")) {
5081          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.approvalDate");
5082        }
5083        else if (name.equals("lastReviewDate")) {
5084          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.lastReviewDate");
5085        }
5086        else if (name.equals("effectivePeriod")) {
5087          this.effectivePeriod = new Period();
5088          return this.effectivePeriod;
5089        }
5090        else if (name.equals("useContext")) {
5091          return addUseContext();
5092        }
5093        else if (name.equals("jurisdiction")) {
5094          return addJurisdiction();
5095        }
5096        else if (name.equals("topic")) {
5097          return addTopic();
5098        }
5099        else if (name.equals("contributor")) {
5100          return addContributor();
5101        }
5102        else if (name.equals("contact")) {
5103          return addContact();
5104        }
5105        else if (name.equals("copyright")) {
5106          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.copyright");
5107        }
5108        else if (name.equals("relatedArtifact")) {
5109          return addRelatedArtifact();
5110        }
5111        else if (name.equals("library")) {
5112          return addLibrary();
5113        }
5114        else if (name.equals("kind")) {
5115          throw new FHIRException("Cannot call addChild on a primitive type ActivityDefinition.kind");
5116        }
5117        else if (name.equals("code")) {
5118          this.code = new CodeableConcept();
5119          return this.code;
5120        }
5121        else if (name.equals("timingTiming")) {
5122          this.timing = new Timing();
5123          return this.timing;
5124        }
5125        else if (name.equals("timingDateTime")) {
5126          this.timing = new DateTimeType();
5127          return this.timing;
5128        }
5129        else if (name.equals("timingPeriod")) {
5130          this.timing = new Period();
5131          return this.timing;
5132        }
5133        else if (name.equals("timingRange")) {
5134          this.timing = new Range();
5135          return this.timing;
5136        }
5137        else if (name.equals("location")) {
5138          this.location = new Reference();
5139          return this.location;
5140        }
5141        else if (name.equals("participant")) {
5142          return addParticipant();
5143        }
5144        else if (name.equals("productReference")) {
5145          this.product = new Reference();
5146          return this.product;
5147        }
5148        else if (name.equals("productCodeableConcept")) {
5149          this.product = new CodeableConcept();
5150          return this.product;
5151        }
5152        else if (name.equals("quantity")) {
5153          this.quantity = new SimpleQuantity();
5154          return this.quantity;
5155        }
5156        else if (name.equals("dosage")) {
5157          return addDosage();
5158        }
5159        else if (name.equals("bodySite")) {
5160          return addBodySite();
5161        }
5162        else if (name.equals("transform")) {
5163          this.transform = new Reference();
5164          return this.transform;
5165        }
5166        else if (name.equals("dynamicValue")) {
5167          return addDynamicValue();
5168        }
5169        else
5170          return super.addChild(name);
5171      }
5172
5173  public String fhirType() {
5174    return "ActivityDefinition";
5175
5176  }
5177
5178      public ActivityDefinition copy() {
5179        ActivityDefinition dst = new ActivityDefinition();
5180        copyValues(dst);
5181        dst.url = url == null ? null : url.copy();
5182        if (identifier != null) {
5183          dst.identifier = new ArrayList<Identifier>();
5184          for (Identifier i : identifier)
5185            dst.identifier.add(i.copy());
5186        };
5187        dst.version = version == null ? null : version.copy();
5188        dst.name = name == null ? null : name.copy();
5189        dst.title = title == null ? null : title.copy();
5190        dst.status = status == null ? null : status.copy();
5191        dst.experimental = experimental == null ? null : experimental.copy();
5192        dst.date = date == null ? null : date.copy();
5193        dst.publisher = publisher == null ? null : publisher.copy();
5194        dst.description = description == null ? null : description.copy();
5195        dst.purpose = purpose == null ? null : purpose.copy();
5196        dst.usage = usage == null ? null : usage.copy();
5197        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
5198        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
5199        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
5200        if (useContext != null) {
5201          dst.useContext = new ArrayList<UsageContext>();
5202          for (UsageContext i : useContext)
5203            dst.useContext.add(i.copy());
5204        };
5205        if (jurisdiction != null) {
5206          dst.jurisdiction = new ArrayList<CodeableConcept>();
5207          for (CodeableConcept i : jurisdiction)
5208            dst.jurisdiction.add(i.copy());
5209        };
5210        if (topic != null) {
5211          dst.topic = new ArrayList<CodeableConcept>();
5212          for (CodeableConcept i : topic)
5213            dst.topic.add(i.copy());
5214        };
5215        if (contributor != null) {
5216          dst.contributor = new ArrayList<Contributor>();
5217          for (Contributor i : contributor)
5218            dst.contributor.add(i.copy());
5219        };
5220        if (contact != null) {
5221          dst.contact = new ArrayList<ContactDetail>();
5222          for (ContactDetail i : contact)
5223            dst.contact.add(i.copy());
5224        };
5225        dst.copyright = copyright == null ? null : copyright.copy();
5226        if (relatedArtifact != null) {
5227          dst.relatedArtifact = new ArrayList<RelatedArtifact>();
5228          for (RelatedArtifact i : relatedArtifact)
5229            dst.relatedArtifact.add(i.copy());
5230        };
5231        if (library != null) {
5232          dst.library = new ArrayList<Reference>();
5233          for (Reference i : library)
5234            dst.library.add(i.copy());
5235        };
5236        dst.kind = kind == null ? null : kind.copy();
5237        dst.code = code == null ? null : code.copy();
5238        dst.timing = timing == null ? null : timing.copy();
5239        dst.location = location == null ? null : location.copy();
5240        if (participant != null) {
5241          dst.participant = new ArrayList<ActivityDefinitionParticipantComponent>();
5242          for (ActivityDefinitionParticipantComponent i : participant)
5243            dst.participant.add(i.copy());
5244        };
5245        dst.product = product == null ? null : product.copy();
5246        dst.quantity = quantity == null ? null : quantity.copy();
5247        if (dosage != null) {
5248          dst.dosage = new ArrayList<Dosage>();
5249          for (Dosage i : dosage)
5250            dst.dosage.add(i.copy());
5251        };
5252        if (bodySite != null) {
5253          dst.bodySite = new ArrayList<CodeableConcept>();
5254          for (CodeableConcept i : bodySite)
5255            dst.bodySite.add(i.copy());
5256        };
5257        dst.transform = transform == null ? null : transform.copy();
5258        if (dynamicValue != null) {
5259          dst.dynamicValue = new ArrayList<ActivityDefinitionDynamicValueComponent>();
5260          for (ActivityDefinitionDynamicValueComponent i : dynamicValue)
5261            dst.dynamicValue.add(i.copy());
5262        };
5263        return dst;
5264      }
5265
5266      protected ActivityDefinition typedCopy() {
5267        return copy();
5268      }
5269
5270      @Override
5271      public boolean equalsDeep(Base other_) {
5272        if (!super.equalsDeep(other_))
5273          return false;
5274        if (!(other_ instanceof ActivityDefinition))
5275          return false;
5276        ActivityDefinition o = (ActivityDefinition) other_;
5277        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(usage, o.usage, true)
5278           && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
5279           && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(topic, o.topic, true) && compareDeep(contributor, o.contributor, true)
5280           && compareDeep(copyright, o.copyright, true) && compareDeep(relatedArtifact, o.relatedArtifact, true)
5281           && compareDeep(library, o.library, true) && compareDeep(kind, o.kind, true) && compareDeep(code, o.code, true)
5282           && compareDeep(timing, o.timing, true) && compareDeep(location, o.location, true) && compareDeep(participant, o.participant, true)
5283           && compareDeep(product, o.product, true) && compareDeep(quantity, o.quantity, true) && compareDeep(dosage, o.dosage, true)
5284           && compareDeep(bodySite, o.bodySite, true) && compareDeep(transform, o.transform, true) && compareDeep(dynamicValue, o.dynamicValue, true)
5285          ;
5286      }
5287
5288      @Override
5289      public boolean equalsShallow(Base other_) {
5290        if (!super.equalsShallow(other_))
5291          return false;
5292        if (!(other_ instanceof ActivityDefinition))
5293          return false;
5294        ActivityDefinition o = (ActivityDefinition) other_;
5295        return compareValues(purpose, o.purpose, true) && compareValues(usage, o.usage, true) && compareValues(approvalDate, o.approvalDate, true)
5296           && compareValues(lastReviewDate, o.lastReviewDate, true) && compareValues(copyright, o.copyright, true)
5297           && compareValues(kind, o.kind, true);
5298      }
5299
5300      public boolean isEmpty() {
5301        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, usage
5302          , approvalDate, lastReviewDate, effectivePeriod, topic, contributor, copyright, relatedArtifact
5303          , library, kind, code, timing, location, participant, product, quantity, dosage
5304          , bodySite, transform, dynamicValue);
5305      }
5306
5307  @Override
5308  public ResourceType getResourceType() {
5309    return ResourceType.ActivityDefinition;
5310   }
5311
5312 /**
5313   * Search parameter: <b>date</b>
5314   * <p>
5315   * Description: <b>The activity definition publication date</b><br>
5316   * Type: <b>date</b><br>
5317   * Path: <b>ActivityDefinition.date</b><br>
5318   * </p>
5319   */
5320  @SearchParamDefinition(name="date", path="ActivityDefinition.date", description="The activity definition publication date", type="date" )
5321  public static final String SP_DATE = "date";
5322 /**
5323   * <b>Fluent Client</b> search parameter constant for <b>date</b>
5324   * <p>
5325   * Description: <b>The activity definition publication date</b><br>
5326   * Type: <b>date</b><br>
5327   * Path: <b>ActivityDefinition.date</b><br>
5328   * </p>
5329   */
5330  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
5331
5332 /**
5333   * Search parameter: <b>identifier</b>
5334   * <p>
5335   * Description: <b>External identifier for the activity definition</b><br>
5336   * Type: <b>token</b><br>
5337   * Path: <b>ActivityDefinition.identifier</b><br>
5338   * </p>
5339   */
5340  @SearchParamDefinition(name="identifier", path="ActivityDefinition.identifier", description="External identifier for the activity definition", type="token" )
5341  public static final String SP_IDENTIFIER = "identifier";
5342 /**
5343   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5344   * <p>
5345   * Description: <b>External identifier for the activity definition</b><br>
5346   * Type: <b>token</b><br>
5347   * Path: <b>ActivityDefinition.identifier</b><br>
5348   * </p>
5349   */
5350  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5351
5352 /**
5353   * Search parameter: <b>successor</b>
5354   * <p>
5355   * Description: <b>What resource is being referenced</b><br>
5356   * Type: <b>reference</b><br>
5357   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5358   * </p>
5359   */
5360  @SearchParamDefinition(name="successor", path="ActivityDefinition.relatedArtifact.where(type='successor').resource", description="What resource is being referenced", type="reference" )
5361  public static final String SP_SUCCESSOR = "successor";
5362 /**
5363   * <b>Fluent Client</b> search parameter constant for <b>successor</b>
5364   * <p>
5365   * Description: <b>What resource is being referenced</b><br>
5366   * Type: <b>reference</b><br>
5367   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5368   * </p>
5369   */
5370  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUCCESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUCCESSOR);
5371
5372/**
5373   * Constant for fluent queries to be used to add include statements. Specifies
5374   * the path value of "<b>ActivityDefinition:successor</b>".
5375   */
5376  public static final ca.uhn.fhir.model.api.Include INCLUDE_SUCCESSOR = new ca.uhn.fhir.model.api.Include("ActivityDefinition:successor").toLocked();
5377
5378 /**
5379   * Search parameter: <b>jurisdiction</b>
5380   * <p>
5381   * Description: <b>Intended jurisdiction for the activity definition</b><br>
5382   * Type: <b>token</b><br>
5383   * Path: <b>ActivityDefinition.jurisdiction</b><br>
5384   * </p>
5385   */
5386  @SearchParamDefinition(name="jurisdiction", path="ActivityDefinition.jurisdiction", description="Intended jurisdiction for the activity definition", type="token" )
5387  public static final String SP_JURISDICTION = "jurisdiction";
5388 /**
5389   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
5390   * <p>
5391   * Description: <b>Intended jurisdiction for the activity definition</b><br>
5392   * Type: <b>token</b><br>
5393   * Path: <b>ActivityDefinition.jurisdiction</b><br>
5394   * </p>
5395   */
5396  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
5397
5398 /**
5399   * Search parameter: <b>description</b>
5400   * <p>
5401   * Description: <b>The description of the activity definition</b><br>
5402   * Type: <b>string</b><br>
5403   * Path: <b>ActivityDefinition.description</b><br>
5404   * </p>
5405   */
5406  @SearchParamDefinition(name="description", path="ActivityDefinition.description", description="The description of the activity definition", type="string" )
5407  public static final String SP_DESCRIPTION = "description";
5408 /**
5409   * <b>Fluent Client</b> search parameter constant for <b>description</b>
5410   * <p>
5411   * Description: <b>The description of the activity definition</b><br>
5412   * Type: <b>string</b><br>
5413   * Path: <b>ActivityDefinition.description</b><br>
5414   * </p>
5415   */
5416  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
5417
5418 /**
5419   * Search parameter: <b>derived-from</b>
5420   * <p>
5421   * Description: <b>What resource is being referenced</b><br>
5422   * Type: <b>reference</b><br>
5423   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5424   * </p>
5425   */
5426  @SearchParamDefinition(name="derived-from", path="ActivityDefinition.relatedArtifact.where(type='derived-from').resource", description="What resource is being referenced", type="reference" )
5427  public static final String SP_DERIVED_FROM = "derived-from";
5428 /**
5429   * <b>Fluent Client</b> search parameter constant for <b>derived-from</b>
5430   * <p>
5431   * Description: <b>What resource is being referenced</b><br>
5432   * Type: <b>reference</b><br>
5433   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5434   * </p>
5435   */
5436  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DERIVED_FROM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DERIVED_FROM);
5437
5438/**
5439   * Constant for fluent queries to be used to add include statements. Specifies
5440   * the path value of "<b>ActivityDefinition:derived-from</b>".
5441   */
5442  public static final ca.uhn.fhir.model.api.Include INCLUDE_DERIVED_FROM = new ca.uhn.fhir.model.api.Include("ActivityDefinition:derived-from").toLocked();
5443
5444 /**
5445   * Search parameter: <b>predecessor</b>
5446   * <p>
5447   * Description: <b>What resource is being referenced</b><br>
5448   * Type: <b>reference</b><br>
5449   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5450   * </p>
5451   */
5452  @SearchParamDefinition(name="predecessor", path="ActivityDefinition.relatedArtifact.where(type='predecessor').resource", description="What resource is being referenced", type="reference" )
5453  public static final String SP_PREDECESSOR = "predecessor";
5454 /**
5455   * <b>Fluent Client</b> search parameter constant for <b>predecessor</b>
5456   * <p>
5457   * Description: <b>What resource is being referenced</b><br>
5458   * Type: <b>reference</b><br>
5459   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5460   * </p>
5461   */
5462  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PREDECESSOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PREDECESSOR);
5463
5464/**
5465   * Constant for fluent queries to be used to add include statements. Specifies
5466   * the path value of "<b>ActivityDefinition:predecessor</b>".
5467   */
5468  public static final ca.uhn.fhir.model.api.Include INCLUDE_PREDECESSOR = new ca.uhn.fhir.model.api.Include("ActivityDefinition:predecessor").toLocked();
5469
5470 /**
5471   * Search parameter: <b>title</b>
5472   * <p>
5473   * Description: <b>The human-friendly name of the activity definition</b><br>
5474   * Type: <b>string</b><br>
5475   * Path: <b>ActivityDefinition.title</b><br>
5476   * </p>
5477   */
5478  @SearchParamDefinition(name="title", path="ActivityDefinition.title", description="The human-friendly name of the activity definition", type="string" )
5479  public static final String SP_TITLE = "title";
5480 /**
5481   * <b>Fluent Client</b> search parameter constant for <b>title</b>
5482   * <p>
5483   * Description: <b>The human-friendly name of the activity definition</b><br>
5484   * Type: <b>string</b><br>
5485   * Path: <b>ActivityDefinition.title</b><br>
5486   * </p>
5487   */
5488  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
5489
5490 /**
5491   * Search parameter: <b>composed-of</b>
5492   * <p>
5493   * Description: <b>What resource is being referenced</b><br>
5494   * Type: <b>reference</b><br>
5495   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5496   * </p>
5497   */
5498  @SearchParamDefinition(name="composed-of", path="ActivityDefinition.relatedArtifact.where(type='composed-of').resource", description="What resource is being referenced", type="reference" )
5499  public static final String SP_COMPOSED_OF = "composed-of";
5500 /**
5501   * <b>Fluent Client</b> search parameter constant for <b>composed-of</b>
5502   * <p>
5503   * Description: <b>What resource is being referenced</b><br>
5504   * Type: <b>reference</b><br>
5505   * Path: <b>ActivityDefinition.relatedArtifact.resource</b><br>
5506   * </p>
5507   */
5508  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSED_OF = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSED_OF);
5509
5510/**
5511   * Constant for fluent queries to be used to add include statements. Specifies
5512   * the path value of "<b>ActivityDefinition:composed-of</b>".
5513   */
5514  public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSED_OF = new ca.uhn.fhir.model.api.Include("ActivityDefinition:composed-of").toLocked();
5515
5516 /**
5517   * Search parameter: <b>version</b>
5518   * <p>
5519   * Description: <b>The business version of the activity definition</b><br>
5520   * Type: <b>token</b><br>
5521   * Path: <b>ActivityDefinition.version</b><br>
5522   * </p>
5523   */
5524  @SearchParamDefinition(name="version", path="ActivityDefinition.version", description="The business version of the activity definition", type="token" )
5525  public static final String SP_VERSION = "version";
5526 /**
5527   * <b>Fluent Client</b> search parameter constant for <b>version</b>
5528   * <p>
5529   * Description: <b>The business version of the activity definition</b><br>
5530   * Type: <b>token</b><br>
5531   * Path: <b>ActivityDefinition.version</b><br>
5532   * </p>
5533   */
5534  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
5535
5536 /**
5537   * Search parameter: <b>url</b>
5538   * <p>
5539   * Description: <b>The uri that identifies the activity definition</b><br>
5540   * Type: <b>uri</b><br>
5541   * Path: <b>ActivityDefinition.url</b><br>
5542   * </p>
5543   */
5544  @SearchParamDefinition(name="url", path="ActivityDefinition.url", description="The uri that identifies the activity definition", type="uri" )
5545  public static final String SP_URL = "url";
5546 /**
5547   * <b>Fluent Client</b> search parameter constant for <b>url</b>
5548   * <p>
5549   * Description: <b>The uri that identifies the activity definition</b><br>
5550   * Type: <b>uri</b><br>
5551   * Path: <b>ActivityDefinition.url</b><br>
5552   * </p>
5553   */
5554  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
5555
5556 /**
5557   * Search parameter: <b>effective</b>
5558   * <p>
5559   * Description: <b>The time during which the activity definition is intended to be in use</b><br>
5560   * Type: <b>date</b><br>
5561   * Path: <b>ActivityDefinition.effectivePeriod</b><br>
5562   * </p>
5563   */
5564  @SearchParamDefinition(name="effective", path="ActivityDefinition.effectivePeriod", description="The time during which the activity definition is intended to be in use", type="date" )
5565  public static final String SP_EFFECTIVE = "effective";
5566 /**
5567   * <b>Fluent Client</b> search parameter constant for <b>effective</b>
5568   * <p>
5569   * Description: <b>The time during which the activity definition is intended to be in use</b><br>
5570   * Type: <b>date</b><br>
5571   * Path: <b>ActivityDefinition.effectivePeriod</b><br>
5572   * </p>
5573   */
5574  public static final ca.uhn.fhir.rest.gclient.DateClientParam EFFECTIVE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_EFFECTIVE);
5575
5576 /**
5577   * Search parameter: <b>depends-on</b>
5578   * <p>
5579   * Description: <b>What resource is being referenced</b><br>
5580   * Type: <b>reference</b><br>
5581   * Path: <b>ActivityDefinition.relatedArtifact.resource, ActivityDefinition.library</b><br>
5582   * </p>
5583   */
5584  @SearchParamDefinition(name="depends-on", path="ActivityDefinition.relatedArtifact.where(type='depends-on').resource | ActivityDefinition.library", description="What resource is being referenced", type="reference" )
5585  public static final String SP_DEPENDS_ON = "depends-on";
5586 /**
5587   * <b>Fluent Client</b> search parameter constant for <b>depends-on</b>
5588   * <p>
5589   * Description: <b>What resource is being referenced</b><br>
5590   * Type: <b>reference</b><br>
5591   * Path: <b>ActivityDefinition.relatedArtifact.resource, ActivityDefinition.library</b><br>
5592   * </p>
5593   */
5594  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON);
5595
5596/**
5597   * Constant for fluent queries to be used to add include statements. Specifies
5598   * the path value of "<b>ActivityDefinition:depends-on</b>".
5599   */
5600  public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ActivityDefinition:depends-on").toLocked();
5601
5602 /**
5603   * Search parameter: <b>name</b>
5604   * <p>
5605   * Description: <b>Computationally friendly name of the activity definition</b><br>
5606   * Type: <b>string</b><br>
5607   * Path: <b>ActivityDefinition.name</b><br>
5608   * </p>
5609   */
5610  @SearchParamDefinition(name="name", path="ActivityDefinition.name", description="Computationally friendly name of the activity definition", type="string" )
5611  public static final String SP_NAME = "name";
5612 /**
5613   * <b>Fluent Client</b> search parameter constant for <b>name</b>
5614   * <p>
5615   * Description: <b>Computationally friendly name of the activity definition</b><br>
5616   * Type: <b>string</b><br>
5617   * Path: <b>ActivityDefinition.name</b><br>
5618   * </p>
5619   */
5620  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
5621
5622 /**
5623   * Search parameter: <b>publisher</b>
5624   * <p>
5625   * Description: <b>Name of the publisher of the activity definition</b><br>
5626   * Type: <b>string</b><br>
5627   * Path: <b>ActivityDefinition.publisher</b><br>
5628   * </p>
5629   */
5630  @SearchParamDefinition(name="publisher", path="ActivityDefinition.publisher", description="Name of the publisher of the activity definition", type="string" )
5631  public static final String SP_PUBLISHER = "publisher";
5632 /**
5633   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
5634   * <p>
5635   * Description: <b>Name of the publisher of the activity definition</b><br>
5636   * Type: <b>string</b><br>
5637   * Path: <b>ActivityDefinition.publisher</b><br>
5638   * </p>
5639   */
5640  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
5641
5642 /**
5643   * Search parameter: <b>topic</b>
5644   * <p>
5645   * Description: <b>Topics associated with the module</b><br>
5646   * Type: <b>token</b><br>
5647   * Path: <b>ActivityDefinition.topic</b><br>
5648   * </p>
5649   */
5650  @SearchParamDefinition(name="topic", path="ActivityDefinition.topic", description="Topics associated with the module", type="token" )
5651  public static final String SP_TOPIC = "topic";
5652 /**
5653   * <b>Fluent Client</b> search parameter constant for <b>topic</b>
5654   * <p>
5655   * Description: <b>Topics associated with the module</b><br>
5656   * Type: <b>token</b><br>
5657   * Path: <b>ActivityDefinition.topic</b><br>
5658   * </p>
5659   */
5660  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TOPIC = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TOPIC);
5661
5662 /**
5663   * Search parameter: <b>status</b>
5664   * <p>
5665   * Description: <b>The current status of the activity definition</b><br>
5666   * Type: <b>token</b><br>
5667   * Path: <b>ActivityDefinition.status</b><br>
5668   * </p>
5669   */
5670  @SearchParamDefinition(name="status", path="ActivityDefinition.status", description="The current status of the activity definition", type="token" )
5671  public static final String SP_STATUS = "status";
5672 /**
5673   * <b>Fluent Client</b> search parameter constant for <b>status</b>
5674   * <p>
5675   * Description: <b>The current status of the activity definition</b><br>
5676   * Type: <b>token</b><br>
5677   * Path: <b>ActivityDefinition.status</b><br>
5678   * </p>
5679   */
5680  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
5681
5682
5683}
5684