001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.r4.model.Enumerations.*;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046/**
047 * Example of workflow instance.
048 */
049@ResourceDef(name="ExampleScenario", profile="http://hl7.org/fhir/StructureDefinition/ExampleScenario")
050@ChildOrder(names={"url", "identifier", "version", "name", "status", "experimental", "date", "publisher", "contact", "useContext", "jurisdiction", "copyright", "purpose", "actor", "instance", "process", "workflow"})
051public class ExampleScenario extends MetadataResource {
052
053    public enum ExampleScenarioActorType {
054        /**
055         * A person.
056         */
057        PERSON, 
058        /**
059         * A system.
060         */
061        ENTITY, 
062        /**
063         * added to help the parsers with the generic types
064         */
065        NULL;
066        public static ExampleScenarioActorType fromCode(String codeString) throws FHIRException {
067            if (codeString == null || "".equals(codeString))
068                return null;
069        if ("person".equals(codeString))
070          return PERSON;
071        if ("entity".equals(codeString))
072          return ENTITY;
073        if (Configuration.isAcceptInvalidEnums())
074          return null;
075        else
076          throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'");
077        }
078        public String toCode() {
079          switch (this) {
080            case PERSON: return "person";
081            case ENTITY: return "entity";
082            default: return "?";
083          }
084        }
085        public String getSystem() {
086          switch (this) {
087            case PERSON: return "http://hl7.org/fhir/examplescenario-actor-type";
088            case ENTITY: return "http://hl7.org/fhir/examplescenario-actor-type";
089            default: return "?";
090          }
091        }
092        public String getDefinition() {
093          switch (this) {
094            case PERSON: return "A person.";
095            case ENTITY: return "A system.";
096            default: return "?";
097          }
098        }
099        public String getDisplay() {
100          switch (this) {
101            case PERSON: return "Person";
102            case ENTITY: return "System";
103            default: return "?";
104          }
105        }
106    }
107
108  public static class ExampleScenarioActorTypeEnumFactory implements EnumFactory<ExampleScenarioActorType> {
109    public ExampleScenarioActorType fromCode(String codeString) throws IllegalArgumentException {
110      if (codeString == null || "".equals(codeString))
111            if (codeString == null || "".equals(codeString))
112                return null;
113        if ("person".equals(codeString))
114          return ExampleScenarioActorType.PERSON;
115        if ("entity".equals(codeString))
116          return ExampleScenarioActorType.ENTITY;
117        throw new IllegalArgumentException("Unknown ExampleScenarioActorType code '"+codeString+"'");
118        }
119        public Enumeration<ExampleScenarioActorType> fromType(Base code) throws FHIRException {
120          if (code == null)
121            return null;
122          if (code.isEmpty())
123            return new Enumeration<ExampleScenarioActorType>(this);
124          String codeString = ((PrimitiveType) code).asStringValue();
125          if (codeString == null || "".equals(codeString))
126            return null;
127        if ("person".equals(codeString))
128          return new Enumeration<ExampleScenarioActorType>(this, ExampleScenarioActorType.PERSON);
129        if ("entity".equals(codeString))
130          return new Enumeration<ExampleScenarioActorType>(this, ExampleScenarioActorType.ENTITY);
131        throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'");
132        }
133    public String toCode(ExampleScenarioActorType code) {
134      if (code == ExampleScenarioActorType.PERSON)
135        return "person";
136      if (code == ExampleScenarioActorType.ENTITY)
137        return "entity";
138      return "?";
139      }
140    public String toSystem(ExampleScenarioActorType code) {
141      return code.getSystem();
142      }
143    }
144
145    public enum FHIRResourceType {
146        /**
147         * 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.
148         */
149        ACCOUNT, 
150        /**
151         * This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context.
152         */
153        ACTIVITYDEFINITION, 
154        /**
155         * 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.
156         */
157        ADVERSEEVENT, 
158        /**
159         * Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
160         */
161        ALLERGYINTOLERANCE, 
162        /**
163         * 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).
164         */
165        APPOINTMENT, 
166        /**
167         * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.
168         */
169        APPOINTMENTRESPONSE, 
170        /**
171         * 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.
172         */
173        AUDITEVENT, 
174        /**
175         * 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.
176         */
177        BASIC, 
178        /**
179         * A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
180         */
181        BINARY, 
182        /**
183         * A material substance originating from a biological entity intended to be transplanted or infused
184into another (possibly the same) biological entity.
185         */
186        BIOLOGICALLYDERIVEDPRODUCT, 
187        /**
188         * Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.
189         */
190        BODYSTRUCTURE, 
191        /**
192         * A container for a collection of resources.
193         */
194        BUNDLE, 
195        /**
196         * 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.
197         */
198        CAPABILITYSTATEMENT, 
199        /**
200         * 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.
201         */
202        CAREPLAN, 
203        /**
204         * The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient.
205         */
206        CARETEAM, 
207        /**
208         * Catalog entries are wrappers that contextualize items included in a catalog.
209         */
210        CATALOGENTRY, 
211        /**
212         * 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.
213         */
214        CHARGEITEM, 
215        /**
216         * The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.
217         */
218        CHARGEITEMDEFINITION, 
219        /**
220         * 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.
221         */
222        CLAIM, 
223        /**
224         * This resource provides the adjudication details from the processing of a Claim resource.
225         */
226        CLAIMRESPONSE, 
227        /**
228         * 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.
229         */
230        CLINICALIMPRESSION, 
231        /**
232         * The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.
233         */
234        CODESYSTEM, 
235        /**
236         * 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.
237         */
238        COMMUNICATION, 
239        /**
240         * 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.
241         */
242        COMMUNICATIONREQUEST, 
243        /**
244         * A compartment definition that defines how resources are accessed on a server.
245         */
246        COMPARTMENTDEFINITION, 
247        /**
248         * A set of healthcare-related information that is assembled together into a single logical package 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. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).
249         */
250        COMPOSITION, 
251        /**
252         * A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.
253         */
254        CONCEPTMAP, 
255        /**
256         * A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.
257         */
258        CONDITION, 
259        /**
260         * A record of a healthcare consumer’s  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.
261         */
262        CONSENT, 
263        /**
264         * Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.
265         */
266        CONTRACT, 
267        /**
268         * Financial instrument which may be used to reimburse or pay for health care products and services.
269         */
270        COVERAGE, 
271        /**
272         * The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.
273         */
274        COVERAGEELIGIBILITYREQUEST, 
275        /**
276         * This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.
277         */
278        COVERAGEELIGIBILITYRESPONSE, 
279        /**
280         * 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.
281         */
282        DETECTEDISSUE, 
283        /**
284         * This resource identifies 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. This is the catalog description of a device (not the specific instance).
285         */
286        DEVICE, 
287        /**
288         * The characteristics, operational status and capabilities of a medical-related component of a medical device.
289         */
290        DEVICEDEFINITION, 
291        /**
292         * Describes a measurement, calculation or setting capability of a medical device.
293         */
294        DEVICEMETRIC, 
295        /**
296         * 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.
297         */
298        DEVICEREQUEST, 
299        /**
300         * 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.
301         */
302        DEVICEUSESTATEMENT, 
303        /**
304         * 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.
305         */
306        DIAGNOSTICREPORT, 
307        /**
308         * A collection of documents compiled for a purpose together with metadata that applies to the collection.
309         */
310        DOCUMENTMANIFEST, 
311        /**
312         * A reference to a document.
313         */
314        DOCUMENTREFERENCE, 
315        /**
316         * A resource that includes narrative, extensions, and contained resources.
317         */
318        DOMAINRESOURCE, 
319        /**
320         * 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.
321         */
322        ENCOUNTER, 
323        /**
324         * 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.
325         */
326        ENDPOINT, 
327        /**
328         * This resource provides the insurance enrollment details to the insurer regarding a specified coverage.
329         */
330        ENROLLMENTREQUEST, 
331        /**
332         * This resource provides enrollment and plan details from the processing of an Enrollment resource.
333         */
334        ENROLLMENTRESPONSE, 
335        /**
336         * 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.
337         */
338        EPISODEOFCARE, 
339        /**
340         * The EventDefinition resource provides a reusable description of when a particular event can occur.
341         */
342        EVENTDEFINITION, 
343        /**
344         * Example of workflow instance.
345         */
346        EXAMPLESCENARIO, 
347        /**
348         * 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.
349         */
350        EXPLANATIONOFBENEFIT, 
351        /**
352         * Significant health conditions for a person related to the patient relevant in the context of care for the patient.
353         */
354        FAMILYMEMBERHISTORY, 
355        /**
356         * Prospective warnings of potential issues when providing care to the patient.
357         */
358        FLAG, 
359        /**
360         * 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.
361         */
362        GOAL, 
363        /**
364         * 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.
365         */
366        GRAPHDEFINITION, 
367        /**
368         * 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.
369         */
370        GROUP, 
371        /**
372         * 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.
373         */
374        GUIDANCERESPONSE, 
375        /**
376         * The details of a healthcare service available at a location.
377         */
378        HEALTHCARESERVICE, 
379        /**
380         * 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.
381         */
382        IMAGINGSTUDY, 
383        /**
384         * Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.
385         */
386        IMMUNIZATION, 
387        /**
388         * Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations.
389         */
390        IMMUNIZATIONEVALUATION, 
391        /**
392         * A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.
393         */
394        IMMUNIZATIONRECOMMENDATION, 
395        /**
396         * 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.
397         */
398        IMPLEMENTATIONGUIDE, 
399        /**
400         * Details of a Health Insurance product/plan provided by an organization.
401         */
402        INSURANCEPLAN, 
403        /**
404         * Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.
405         */
406        INVOICE, 
407        /**
408         * A physical, countable instance of an item, for example one box or one unit.
409         */
410        ITEMINSTANCE, 
411        /**
412         * 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.
413         */
414        LIBRARY, 
415        /**
416         * Identifies two or more records (resource instances) that are referring to the same real-world "occurrence".
417         */
418        LINKAGE, 
419        /**
420         * A set of information summarized from a list of other resources.
421         */
422        LIST, 
423        /**
424         * Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated.
425         */
426        LOCATION, 
427        /**
428         * The Measure resource provides the definition of a quality measure.
429         */
430        MEASURE, 
431        /**
432         * The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.
433         */
434        MEASUREREPORT, 
435        /**
436         * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
437         */
438        MEDIA, 
439        /**
440         * This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.
441         */
442        MEDICATION, 
443        /**
444         * 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.
445         */
446        MEDICATIONADMINISTRATION, 
447        /**
448         * 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.
449         */
450        MEDICATIONDISPENSE, 
451        /**
452         * Information about a medication that is used to support knowledge.
453         */
454        MEDICATIONKNOWLEDGE, 
455        /**
456         * 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.
457         */
458        MEDICATIONREQUEST, 
459        /**
460         * 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. 
461
462The 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.
463         */
464        MEDICATIONSTATEMENT, 
465        /**
466         * Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).
467         */
468        MEDICINALPRODUCT, 
469        /**
470         * The regulatory authorization of a medicinal product.
471         */
472        MEDICINALPRODUCTAUTHORIZATION, 
473        /**
474         * The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.
475         */
476        MEDICINALPRODUCTCLINICALS, 
477        /**
478         * The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.
479         */
480        MEDICINALPRODUCTCONTRAINDICATION, 
481        /**
482         * A detailed description of a device, typically as part of a regulated medicinal product. It is not intended to replace the Device resource, which covers use of device instances.
483         */
484        MEDICINALPRODUCTDEVICESPEC, 
485        /**
486         * Indication for the Medicinal Product.
487         */
488        MEDICINALPRODUCTINDICATION, 
489        /**
490         * An ingredient of a manufactured item or pharmaceutical product.
491         */
492        MEDICINALPRODUCTINGREDIENT, 
493        /**
494         * The interactions of the medicinal product with other medicinal products, or other forms of interactions.
495         */
496        MEDICINALPRODUCTINTERACTION, 
497        /**
498         * The manufactured item as contained in the packaged medicinal product.
499         */
500        MEDICINALPRODUCTMANUFACTURED, 
501        /**
502         * A medicinal product in a container or package.
503         */
504        MEDICINALPRODUCTPACKAGED, 
505        /**
506         * A pharmaceutical product described in terms of its composition and dose form.
507         */
508        MEDICINALPRODUCTPHARMACEUTICAL, 
509        /**
510         * Describe the undesirable effects of the medicinal product.
511         */
512        MEDICINALPRODUCTUNDESIRABLEEFFECT, 
513        /**
514         * 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.
515         */
516        MESSAGEDEFINITION, 
517        /**
518         * 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.
519         */
520        MESSAGEHEADER, 
521        /**
522         * 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.
523         */
524        NAMINGSYSTEM, 
525        /**
526         * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.
527         */
528        NUTRITIONORDER, 
529        /**
530         * Measurements and simple assertions made about a patient, device or other subject.
531         */
532        OBSERVATION, 
533        /**
534         * Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.
535         */
536        OBSERVATIONDEFINITION, 
537        /**
538         * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
539         */
540        OPERATIONDEFINITION, 
541        /**
542         * A collection of error, warning or information messages that result from a system action.
543         */
544        OPERATIONOUTCOME, 
545        /**
546         * 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, payer/insurer, etc.
547         */
548        ORGANIZATION, 
549        /**
550         * Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.
551         */
552        ORGANIZATIONAFFILIATION, 
553        /**
554         * 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.
555         */
556        PARAMETERS, 
557        /**
558         * Demographics and other administrative information about an individual or animal receiving care or other health-related services.
559         */
560        PATIENT, 
561        /**
562         * This resource provides the status of the payment for goods and services rendered, and the request and response resource references.
563         */
564        PAYMENTNOTICE, 
565        /**
566         * This resource provides payment details and claim references supporting a bulk payment.
567         */
568        PAYMENTRECONCILIATION, 
569        /**
570         * Demographics and administrative information about a person independent of a specific health-related context.
571         */
572        PERSON, 
573        /**
574         * 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.
575         */
576        PLANDEFINITION, 
577        /**
578         * A person who is directly or indirectly involved in the provisioning of healthcare.
579         */
580        PRACTITIONER, 
581        /**
582         * A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.
583         */
584        PRACTITIONERROLE, 
585        /**
586         * An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.
587         */
588        PROCEDURE, 
589        /**
590         * 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.
591         */
592        PROCESSREQUEST, 
593        /**
594         * This resource provides processing status, errors and notes from the processing of a resource.
595         */
596        PROCESSRESPONSE, 
597        /**
598         * 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.
599         */
600        PROVENANCE, 
601        /**
602         * 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.
603         */
604        QUESTIONNAIRE, 
605        /**
606         * 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.
607         */
608        QUESTIONNAIRERESPONSE, 
609        /**
610         * 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.
611         */
612        RELATEDPERSON, 
613        /**
614         * 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".
615         */
616        REQUESTGROUP, 
617        /**
618         * 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.
619         */
620        RESEARCHSTUDY, 
621        /**
622         * A physical entity which is the primary unit of operational and/or administrative interest in a study.
623         */
624        RESEARCHSUBJECT, 
625        /**
626         * This is the base resource type for everything.
627         */
628        RESOURCE, 
629        /**
630         * An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.
631         */
632        RISKASSESSMENT, 
633        /**
634         * A container for slots of time that may be available for booking appointments.
635         */
636        SCHEDULE, 
637        /**
638         * A search parameter that defines a named search item that can be used to search/filter on a resource.
639         */
640        SEARCHPARAMETER, 
641        /**
642         * Raw data describing a biological sequence.
643         */
644        SEQUENCE, 
645        /**
646         * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.
647         */
648        SERVICEREQUEST, 
649        /**
650         * A slot of time on a schedule that may be available for booking appointments.
651         */
652        SLOT, 
653        /**
654         * A sample to be used for analysis.
655         */
656        SPECIMEN, 
657        /**
658         * A kind of specimen with associated set of requirements.
659         */
660        SPECIMENDEFINITION, 
661        /**
662         * 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.
663         */
664        STRUCTUREDEFINITION, 
665        /**
666         * A Map of relationships between 2 structures that can be used to transform data.
667         */
668        STRUCTUREMAP, 
669        /**
670         * 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 can take an appropriate action.
671         */
672        SUBSCRIPTION, 
673        /**
674         * A homogeneous material with a definite composition.
675         */
676        SUBSTANCE, 
677        /**
678         * Todo.
679         */
680        SUBSTANCEPOLYMER, 
681        /**
682         * Todo.
683         */
684        SUBSTANCEREFERENCEINFORMATION, 
685        /**
686         * The detailed description of a substance, typically at a level beyond what is used for prescribing.
687         */
688        SUBSTANCESPECIFICATION, 
689        /**
690         * Record of delivery of what is supplied.
691         */
692        SUPPLYDELIVERY, 
693        /**
694         * A record of a request for a medication, substance or device used in the healthcare setting.
695         */
696        SUPPLYREQUEST, 
697        /**
698         * A task to be performed.
699         */
700        TASK, 
701        /**
702         * A Terminology Capabilities 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.
703         */
704        TERMINOLOGYCAPABILITIES, 
705        /**
706         * A summary of information based on the results of executing a TestScript.
707         */
708        TESTREPORT, 
709        /**
710         * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
711         */
712        TESTSCRIPT, 
713        /**
714         * Information about a user's current session.
715         */
716        USERSESSION, 
717        /**
718         * A ValueSet resource instances specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).
719         */
720        VALUESET, 
721        /**
722         * Describes validation requirements, source(s), status and dates for one or more elements.
723         */
724        VERIFICATIONRESULT, 
725        /**
726         * An authorization for the supply of glasses and/or contact lenses to a patient.
727         */
728        VISIONPRESCRIPTION, 
729        /**
730         * added to help the parsers with the generic types
731         */
732        NULL;
733        public static FHIRResourceType fromCode(String codeString) throws FHIRException {
734            if (codeString == null || "".equals(codeString))
735                return null;
736        if ("Account".equals(codeString))
737          return ACCOUNT;
738        if ("ActivityDefinition".equals(codeString))
739          return ACTIVITYDEFINITION;
740        if ("AdverseEvent".equals(codeString))
741          return ADVERSEEVENT;
742        if ("AllergyIntolerance".equals(codeString))
743          return ALLERGYINTOLERANCE;
744        if ("Appointment".equals(codeString))
745          return APPOINTMENT;
746        if ("AppointmentResponse".equals(codeString))
747          return APPOINTMENTRESPONSE;
748        if ("AuditEvent".equals(codeString))
749          return AUDITEVENT;
750        if ("Basic".equals(codeString))
751          return BASIC;
752        if ("Binary".equals(codeString))
753          return BINARY;
754        if ("BiologicallyDerivedProduct".equals(codeString))
755          return BIOLOGICALLYDERIVEDPRODUCT;
756        if ("BodyStructure".equals(codeString))
757          return BODYSTRUCTURE;
758        if ("Bundle".equals(codeString))
759          return BUNDLE;
760        if ("CapabilityStatement".equals(codeString))
761          return CAPABILITYSTATEMENT;
762        if ("CarePlan".equals(codeString))
763          return CAREPLAN;
764        if ("CareTeam".equals(codeString))
765          return CARETEAM;
766        if ("CatalogEntry".equals(codeString))
767          return CATALOGENTRY;
768        if ("ChargeItem".equals(codeString))
769          return CHARGEITEM;
770        if ("ChargeItemDefinition".equals(codeString))
771          return CHARGEITEMDEFINITION;
772        if ("Claim".equals(codeString))
773          return CLAIM;
774        if ("ClaimResponse".equals(codeString))
775          return CLAIMRESPONSE;
776        if ("ClinicalImpression".equals(codeString))
777          return CLINICALIMPRESSION;
778        if ("CodeSystem".equals(codeString))
779          return CODESYSTEM;
780        if ("Communication".equals(codeString))
781          return COMMUNICATION;
782        if ("CommunicationRequest".equals(codeString))
783          return COMMUNICATIONREQUEST;
784        if ("CompartmentDefinition".equals(codeString))
785          return COMPARTMENTDEFINITION;
786        if ("Composition".equals(codeString))
787          return COMPOSITION;
788        if ("ConceptMap".equals(codeString))
789          return CONCEPTMAP;
790        if ("Condition".equals(codeString))
791          return CONDITION;
792        if ("Consent".equals(codeString))
793          return CONSENT;
794        if ("Contract".equals(codeString))
795          return CONTRACT;
796        if ("Coverage".equals(codeString))
797          return COVERAGE;
798        if ("CoverageEligibilityRequest".equals(codeString))
799          return COVERAGEELIGIBILITYREQUEST;
800        if ("CoverageEligibilityResponse".equals(codeString))
801          return COVERAGEELIGIBILITYRESPONSE;
802        if ("DetectedIssue".equals(codeString))
803          return DETECTEDISSUE;
804        if ("Device".equals(codeString))
805          return DEVICE;
806        if ("DeviceDefinition".equals(codeString))
807          return DEVICEDEFINITION;
808        if ("DeviceMetric".equals(codeString))
809          return DEVICEMETRIC;
810        if ("DeviceRequest".equals(codeString))
811          return DEVICEREQUEST;
812        if ("DeviceUseStatement".equals(codeString))
813          return DEVICEUSESTATEMENT;
814        if ("DiagnosticReport".equals(codeString))
815          return DIAGNOSTICREPORT;
816        if ("DocumentManifest".equals(codeString))
817          return DOCUMENTMANIFEST;
818        if ("DocumentReference".equals(codeString))
819          return DOCUMENTREFERENCE;
820        if ("DomainResource".equals(codeString))
821          return DOMAINRESOURCE;
822        if ("Encounter".equals(codeString))
823          return ENCOUNTER;
824        if ("Endpoint".equals(codeString))
825          return ENDPOINT;
826        if ("EnrollmentRequest".equals(codeString))
827          return ENROLLMENTREQUEST;
828        if ("EnrollmentResponse".equals(codeString))
829          return ENROLLMENTRESPONSE;
830        if ("EpisodeOfCare".equals(codeString))
831          return EPISODEOFCARE;
832        if ("EventDefinition".equals(codeString))
833          return EVENTDEFINITION;
834        if ("ExampleScenario".equals(codeString))
835          return EXAMPLESCENARIO;
836        if ("ExplanationOfBenefit".equals(codeString))
837          return EXPLANATIONOFBENEFIT;
838        if ("FamilyMemberHistory".equals(codeString))
839          return FAMILYMEMBERHISTORY;
840        if ("Flag".equals(codeString))
841          return FLAG;
842        if ("Goal".equals(codeString))
843          return GOAL;
844        if ("GraphDefinition".equals(codeString))
845          return GRAPHDEFINITION;
846        if ("Group".equals(codeString))
847          return GROUP;
848        if ("GuidanceResponse".equals(codeString))
849          return GUIDANCERESPONSE;
850        if ("HealthcareService".equals(codeString))
851          return HEALTHCARESERVICE;
852        if ("ImagingStudy".equals(codeString))
853          return IMAGINGSTUDY;
854        if ("Immunization".equals(codeString))
855          return IMMUNIZATION;
856        if ("ImmunizationEvaluation".equals(codeString))
857          return IMMUNIZATIONEVALUATION;
858        if ("ImmunizationRecommendation".equals(codeString))
859          return IMMUNIZATIONRECOMMENDATION;
860        if ("ImplementationGuide".equals(codeString))
861          return IMPLEMENTATIONGUIDE;
862        if ("InsurancePlan".equals(codeString))
863          return INSURANCEPLAN;
864        if ("Invoice".equals(codeString))
865          return INVOICE;
866        if ("ItemInstance".equals(codeString))
867          return ITEMINSTANCE;
868        if ("Library".equals(codeString))
869          return LIBRARY;
870        if ("Linkage".equals(codeString))
871          return LINKAGE;
872        if ("List".equals(codeString))
873          return LIST;
874        if ("Location".equals(codeString))
875          return LOCATION;
876        if ("Measure".equals(codeString))
877          return MEASURE;
878        if ("MeasureReport".equals(codeString))
879          return MEASUREREPORT;
880        if ("Media".equals(codeString))
881          return MEDIA;
882        if ("Medication".equals(codeString))
883          return MEDICATION;
884        if ("MedicationAdministration".equals(codeString))
885          return MEDICATIONADMINISTRATION;
886        if ("MedicationDispense".equals(codeString))
887          return MEDICATIONDISPENSE;
888        if ("MedicationKnowledge".equals(codeString))
889          return MEDICATIONKNOWLEDGE;
890        if ("MedicationRequest".equals(codeString))
891          return MEDICATIONREQUEST;
892        if ("MedicationStatement".equals(codeString))
893          return MEDICATIONSTATEMENT;
894        if ("MedicinalProduct".equals(codeString))
895          return MEDICINALPRODUCT;
896        if ("MedicinalProductAuthorization".equals(codeString))
897          return MEDICINALPRODUCTAUTHORIZATION;
898        if ("MedicinalProductClinicals".equals(codeString))
899          return MEDICINALPRODUCTCLINICALS;
900        if ("MedicinalProductContraindication".equals(codeString))
901          return MEDICINALPRODUCTCONTRAINDICATION;
902        if ("MedicinalProductDeviceSpec".equals(codeString))
903          return MEDICINALPRODUCTDEVICESPEC;
904        if ("MedicinalProductIndication".equals(codeString))
905          return MEDICINALPRODUCTINDICATION;
906        if ("MedicinalProductIngredient".equals(codeString))
907          return MEDICINALPRODUCTINGREDIENT;
908        if ("MedicinalProductInteraction".equals(codeString))
909          return MEDICINALPRODUCTINTERACTION;
910        if ("MedicinalProductManufactured".equals(codeString))
911          return MEDICINALPRODUCTMANUFACTURED;
912        if ("MedicinalProductPackaged".equals(codeString))
913          return MEDICINALPRODUCTPACKAGED;
914        if ("MedicinalProductPharmaceutical".equals(codeString))
915          return MEDICINALPRODUCTPHARMACEUTICAL;
916        if ("MedicinalProductUndesirableEffect".equals(codeString))
917          return MEDICINALPRODUCTUNDESIRABLEEFFECT;
918        if ("MessageDefinition".equals(codeString))
919          return MESSAGEDEFINITION;
920        if ("MessageHeader".equals(codeString))
921          return MESSAGEHEADER;
922        if ("NamingSystem".equals(codeString))
923          return NAMINGSYSTEM;
924        if ("NutritionOrder".equals(codeString))
925          return NUTRITIONORDER;
926        if ("Observation".equals(codeString))
927          return OBSERVATION;
928        if ("ObservationDefinition".equals(codeString))
929          return OBSERVATIONDEFINITION;
930        if ("OperationDefinition".equals(codeString))
931          return OPERATIONDEFINITION;
932        if ("OperationOutcome".equals(codeString))
933          return OPERATIONOUTCOME;
934        if ("Organization".equals(codeString))
935          return ORGANIZATION;
936        if ("OrganizationAffiliation".equals(codeString))
937          return ORGANIZATIONAFFILIATION;
938        if ("Parameters".equals(codeString))
939          return PARAMETERS;
940        if ("Patient".equals(codeString))
941          return PATIENT;
942        if ("PaymentNotice".equals(codeString))
943          return PAYMENTNOTICE;
944        if ("PaymentReconciliation".equals(codeString))
945          return PAYMENTRECONCILIATION;
946        if ("Person".equals(codeString))
947          return PERSON;
948        if ("PlanDefinition".equals(codeString))
949          return PLANDEFINITION;
950        if ("Practitioner".equals(codeString))
951          return PRACTITIONER;
952        if ("PractitionerRole".equals(codeString))
953          return PRACTITIONERROLE;
954        if ("Procedure".equals(codeString))
955          return PROCEDURE;
956        if ("ProcessRequest".equals(codeString))
957          return PROCESSREQUEST;
958        if ("ProcessResponse".equals(codeString))
959          return PROCESSRESPONSE;
960        if ("Provenance".equals(codeString))
961          return PROVENANCE;
962        if ("Questionnaire".equals(codeString))
963          return QUESTIONNAIRE;
964        if ("QuestionnaireResponse".equals(codeString))
965          return QUESTIONNAIRERESPONSE;
966        if ("RelatedPerson".equals(codeString))
967          return RELATEDPERSON;
968        if ("RequestGroup".equals(codeString))
969          return REQUESTGROUP;
970        if ("ResearchStudy".equals(codeString))
971          return RESEARCHSTUDY;
972        if ("ResearchSubject".equals(codeString))
973          return RESEARCHSUBJECT;
974        if ("Resource".equals(codeString))
975          return RESOURCE;
976        if ("RiskAssessment".equals(codeString))
977          return RISKASSESSMENT;
978        if ("Schedule".equals(codeString))
979          return SCHEDULE;
980        if ("SearchParameter".equals(codeString))
981          return SEARCHPARAMETER;
982        if ("Sequence".equals(codeString))
983          return SEQUENCE;
984        if ("ServiceRequest".equals(codeString))
985          return SERVICEREQUEST;
986        if ("Slot".equals(codeString))
987          return SLOT;
988        if ("Specimen".equals(codeString))
989          return SPECIMEN;
990        if ("SpecimenDefinition".equals(codeString))
991          return SPECIMENDEFINITION;
992        if ("StructureDefinition".equals(codeString))
993          return STRUCTUREDEFINITION;
994        if ("StructureMap".equals(codeString))
995          return STRUCTUREMAP;
996        if ("Subscription".equals(codeString))
997          return SUBSCRIPTION;
998        if ("Substance".equals(codeString))
999          return SUBSTANCE;
1000        if ("SubstancePolymer".equals(codeString))
1001          return SUBSTANCEPOLYMER;
1002        if ("SubstanceReferenceInformation".equals(codeString))
1003          return SUBSTANCEREFERENCEINFORMATION;
1004        if ("SubstanceSpecification".equals(codeString))
1005          return SUBSTANCESPECIFICATION;
1006        if ("SupplyDelivery".equals(codeString))
1007          return SUPPLYDELIVERY;
1008        if ("SupplyRequest".equals(codeString))
1009          return SUPPLYREQUEST;
1010        if ("Task".equals(codeString))
1011          return TASK;
1012        if ("TerminologyCapabilities".equals(codeString))
1013          return TERMINOLOGYCAPABILITIES;
1014        if ("TestReport".equals(codeString))
1015          return TESTREPORT;
1016        if ("TestScript".equals(codeString))
1017          return TESTSCRIPT;
1018        if ("UserSession".equals(codeString))
1019          return USERSESSION;
1020        if ("ValueSet".equals(codeString))
1021          return VALUESET;
1022        if ("VerificationResult".equals(codeString))
1023          return VERIFICATIONRESULT;
1024        if ("VisionPrescription".equals(codeString))
1025          return VISIONPRESCRIPTION;
1026        if (Configuration.isAcceptInvalidEnums())
1027          return null;
1028        else
1029          throw new FHIRException("Unknown FHIRResourceType code '"+codeString+"'");
1030        }
1031        public String toCode() {
1032          switch (this) {
1033            case ACCOUNT: return "Account";
1034            case ACTIVITYDEFINITION: return "ActivityDefinition";
1035            case ADVERSEEVENT: return "AdverseEvent";
1036            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
1037            case APPOINTMENT: return "Appointment";
1038            case APPOINTMENTRESPONSE: return "AppointmentResponse";
1039            case AUDITEVENT: return "AuditEvent";
1040            case BASIC: return "Basic";
1041            case BINARY: return "Binary";
1042            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
1043            case BODYSTRUCTURE: return "BodyStructure";
1044            case BUNDLE: return "Bundle";
1045            case CAPABILITYSTATEMENT: return "CapabilityStatement";
1046            case CAREPLAN: return "CarePlan";
1047            case CARETEAM: return "CareTeam";
1048            case CATALOGENTRY: return "CatalogEntry";
1049            case CHARGEITEM: return "ChargeItem";
1050            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
1051            case CLAIM: return "Claim";
1052            case CLAIMRESPONSE: return "ClaimResponse";
1053            case CLINICALIMPRESSION: return "ClinicalImpression";
1054            case CODESYSTEM: return "CodeSystem";
1055            case COMMUNICATION: return "Communication";
1056            case COMMUNICATIONREQUEST: return "CommunicationRequest";
1057            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
1058            case COMPOSITION: return "Composition";
1059            case CONCEPTMAP: return "ConceptMap";
1060            case CONDITION: return "Condition";
1061            case CONSENT: return "Consent";
1062            case CONTRACT: return "Contract";
1063            case COVERAGE: return "Coverage";
1064            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
1065            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
1066            case DETECTEDISSUE: return "DetectedIssue";
1067            case DEVICE: return "Device";
1068            case DEVICEDEFINITION: return "DeviceDefinition";
1069            case DEVICEMETRIC: return "DeviceMetric";
1070            case DEVICEREQUEST: return "DeviceRequest";
1071            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
1072            case DIAGNOSTICREPORT: return "DiagnosticReport";
1073            case DOCUMENTMANIFEST: return "DocumentManifest";
1074            case DOCUMENTREFERENCE: return "DocumentReference";
1075            case DOMAINRESOURCE: return "DomainResource";
1076            case ENCOUNTER: return "Encounter";
1077            case ENDPOINT: return "Endpoint";
1078            case ENROLLMENTREQUEST: return "EnrollmentRequest";
1079            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
1080            case EPISODEOFCARE: return "EpisodeOfCare";
1081            case EVENTDEFINITION: return "EventDefinition";
1082            case EXAMPLESCENARIO: return "ExampleScenario";
1083            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
1084            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
1085            case FLAG: return "Flag";
1086            case GOAL: return "Goal";
1087            case GRAPHDEFINITION: return "GraphDefinition";
1088            case GROUP: return "Group";
1089            case GUIDANCERESPONSE: return "GuidanceResponse";
1090            case HEALTHCARESERVICE: return "HealthcareService";
1091            case IMAGINGSTUDY: return "ImagingStudy";
1092            case IMMUNIZATION: return "Immunization";
1093            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
1094            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
1095            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
1096            case INSURANCEPLAN: return "InsurancePlan";
1097            case INVOICE: return "Invoice";
1098            case ITEMINSTANCE: return "ItemInstance";
1099            case LIBRARY: return "Library";
1100            case LINKAGE: return "Linkage";
1101            case LIST: return "List";
1102            case LOCATION: return "Location";
1103            case MEASURE: return "Measure";
1104            case MEASUREREPORT: return "MeasureReport";
1105            case MEDIA: return "Media";
1106            case MEDICATION: return "Medication";
1107            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
1108            case MEDICATIONDISPENSE: return "MedicationDispense";
1109            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
1110            case MEDICATIONREQUEST: return "MedicationRequest";
1111            case MEDICATIONSTATEMENT: return "MedicationStatement";
1112            case MEDICINALPRODUCT: return "MedicinalProduct";
1113            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
1114            case MEDICINALPRODUCTCLINICALS: return "MedicinalProductClinicals";
1115            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
1116            case MEDICINALPRODUCTDEVICESPEC: return "MedicinalProductDeviceSpec";
1117            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
1118            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
1119            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
1120            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
1121            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
1122            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
1123            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
1124            case MESSAGEDEFINITION: return "MessageDefinition";
1125            case MESSAGEHEADER: return "MessageHeader";
1126            case NAMINGSYSTEM: return "NamingSystem";
1127            case NUTRITIONORDER: return "NutritionOrder";
1128            case OBSERVATION: return "Observation";
1129            case OBSERVATIONDEFINITION: return "ObservationDefinition";
1130            case OPERATIONDEFINITION: return "OperationDefinition";
1131            case OPERATIONOUTCOME: return "OperationOutcome";
1132            case ORGANIZATION: return "Organization";
1133            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
1134            case PARAMETERS: return "Parameters";
1135            case PATIENT: return "Patient";
1136            case PAYMENTNOTICE: return "PaymentNotice";
1137            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
1138            case PERSON: return "Person";
1139            case PLANDEFINITION: return "PlanDefinition";
1140            case PRACTITIONER: return "Practitioner";
1141            case PRACTITIONERROLE: return "PractitionerRole";
1142            case PROCEDURE: return "Procedure";
1143            case PROCESSREQUEST: return "ProcessRequest";
1144            case PROCESSRESPONSE: return "ProcessResponse";
1145            case PROVENANCE: return "Provenance";
1146            case QUESTIONNAIRE: return "Questionnaire";
1147            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
1148            case RELATEDPERSON: return "RelatedPerson";
1149            case REQUESTGROUP: return "RequestGroup";
1150            case RESEARCHSTUDY: return "ResearchStudy";
1151            case RESEARCHSUBJECT: return "ResearchSubject";
1152            case RESOURCE: return "Resource";
1153            case RISKASSESSMENT: return "RiskAssessment";
1154            case SCHEDULE: return "Schedule";
1155            case SEARCHPARAMETER: return "SearchParameter";
1156            case SEQUENCE: return "Sequence";
1157            case SERVICEREQUEST: return "ServiceRequest";
1158            case SLOT: return "Slot";
1159            case SPECIMEN: return "Specimen";
1160            case SPECIMENDEFINITION: return "SpecimenDefinition";
1161            case STRUCTUREDEFINITION: return "StructureDefinition";
1162            case STRUCTUREMAP: return "StructureMap";
1163            case SUBSCRIPTION: return "Subscription";
1164            case SUBSTANCE: return "Substance";
1165            case SUBSTANCEPOLYMER: return "SubstancePolymer";
1166            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
1167            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
1168            case SUPPLYDELIVERY: return "SupplyDelivery";
1169            case SUPPLYREQUEST: return "SupplyRequest";
1170            case TASK: return "Task";
1171            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
1172            case TESTREPORT: return "TestReport";
1173            case TESTSCRIPT: return "TestScript";
1174            case USERSESSION: return "UserSession";
1175            case VALUESET: return "ValueSet";
1176            case VERIFICATIONRESULT: return "VerificationResult";
1177            case VISIONPRESCRIPTION: return "VisionPrescription";
1178            default: return "?";
1179          }
1180        }
1181        public String getSystem() {
1182          switch (this) {
1183            case ACCOUNT: return "http://hl7.org/fhir/resource-types";
1184            case ACTIVITYDEFINITION: return "http://hl7.org/fhir/resource-types";
1185            case ADVERSEEVENT: return "http://hl7.org/fhir/resource-types";
1186            case ALLERGYINTOLERANCE: return "http://hl7.org/fhir/resource-types";
1187            case APPOINTMENT: return "http://hl7.org/fhir/resource-types";
1188            case APPOINTMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
1189            case AUDITEVENT: return "http://hl7.org/fhir/resource-types";
1190            case BASIC: return "http://hl7.org/fhir/resource-types";
1191            case BINARY: return "http://hl7.org/fhir/resource-types";
1192            case BIOLOGICALLYDERIVEDPRODUCT: return "http://hl7.org/fhir/resource-types";
1193            case BODYSTRUCTURE: return "http://hl7.org/fhir/resource-types";
1194            case BUNDLE: return "http://hl7.org/fhir/resource-types";
1195            case CAPABILITYSTATEMENT: return "http://hl7.org/fhir/resource-types";
1196            case CAREPLAN: return "http://hl7.org/fhir/resource-types";
1197            case CARETEAM: return "http://hl7.org/fhir/resource-types";
1198            case CATALOGENTRY: return "http://hl7.org/fhir/resource-types";
1199            case CHARGEITEM: return "http://hl7.org/fhir/resource-types";
1200            case CHARGEITEMDEFINITION: return "http://hl7.org/fhir/resource-types";
1201            case CLAIM: return "http://hl7.org/fhir/resource-types";
1202            case CLAIMRESPONSE: return "http://hl7.org/fhir/resource-types";
1203            case CLINICALIMPRESSION: return "http://hl7.org/fhir/resource-types";
1204            case CODESYSTEM: return "http://hl7.org/fhir/resource-types";
1205            case COMMUNICATION: return "http://hl7.org/fhir/resource-types";
1206            case COMMUNICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
1207            case COMPARTMENTDEFINITION: return "http://hl7.org/fhir/resource-types";
1208            case COMPOSITION: return "http://hl7.org/fhir/resource-types";
1209            case CONCEPTMAP: return "http://hl7.org/fhir/resource-types";
1210            case CONDITION: return "http://hl7.org/fhir/resource-types";
1211            case CONSENT: return "http://hl7.org/fhir/resource-types";
1212            case CONTRACT: return "http://hl7.org/fhir/resource-types";
1213            case COVERAGE: return "http://hl7.org/fhir/resource-types";
1214            case COVERAGEELIGIBILITYREQUEST: return "http://hl7.org/fhir/resource-types";
1215            case COVERAGEELIGIBILITYRESPONSE: return "http://hl7.org/fhir/resource-types";
1216            case DETECTEDISSUE: return "http://hl7.org/fhir/resource-types";
1217            case DEVICE: return "http://hl7.org/fhir/resource-types";
1218            case DEVICEDEFINITION: return "http://hl7.org/fhir/resource-types";
1219            case DEVICEMETRIC: return "http://hl7.org/fhir/resource-types";
1220            case DEVICEREQUEST: return "http://hl7.org/fhir/resource-types";
1221            case DEVICEUSESTATEMENT: return "http://hl7.org/fhir/resource-types";
1222            case DIAGNOSTICREPORT: return "http://hl7.org/fhir/resource-types";
1223            case DOCUMENTMANIFEST: return "http://hl7.org/fhir/resource-types";
1224            case DOCUMENTREFERENCE: return "http://hl7.org/fhir/resource-types";
1225            case DOMAINRESOURCE: return "http://hl7.org/fhir/resource-types";
1226            case ENCOUNTER: return "http://hl7.org/fhir/resource-types";
1227            case ENDPOINT: return "http://hl7.org/fhir/resource-types";
1228            case ENROLLMENTREQUEST: return "http://hl7.org/fhir/resource-types";
1229            case ENROLLMENTRESPONSE: return "http://hl7.org/fhir/resource-types";
1230            case EPISODEOFCARE: return "http://hl7.org/fhir/resource-types";
1231            case EVENTDEFINITION: return "http://hl7.org/fhir/resource-types";
1232            case EXAMPLESCENARIO: return "http://hl7.org/fhir/resource-types";
1233            case EXPLANATIONOFBENEFIT: return "http://hl7.org/fhir/resource-types";
1234            case FAMILYMEMBERHISTORY: return "http://hl7.org/fhir/resource-types";
1235            case FLAG: return "http://hl7.org/fhir/resource-types";
1236            case GOAL: return "http://hl7.org/fhir/resource-types";
1237            case GRAPHDEFINITION: return "http://hl7.org/fhir/resource-types";
1238            case GROUP: return "http://hl7.org/fhir/resource-types";
1239            case GUIDANCERESPONSE: return "http://hl7.org/fhir/resource-types";
1240            case HEALTHCARESERVICE: return "http://hl7.org/fhir/resource-types";
1241            case IMAGINGSTUDY: return "http://hl7.org/fhir/resource-types";
1242            case IMMUNIZATION: return "http://hl7.org/fhir/resource-types";
1243            case IMMUNIZATIONEVALUATION: return "http://hl7.org/fhir/resource-types";
1244            case IMMUNIZATIONRECOMMENDATION: return "http://hl7.org/fhir/resource-types";
1245            case IMPLEMENTATIONGUIDE: return "http://hl7.org/fhir/resource-types";
1246            case INSURANCEPLAN: return "http://hl7.org/fhir/resource-types";
1247            case INVOICE: return "http://hl7.org/fhir/resource-types";
1248            case ITEMINSTANCE: return "http://hl7.org/fhir/resource-types";
1249            case LIBRARY: return "http://hl7.org/fhir/resource-types";
1250            case LINKAGE: return "http://hl7.org/fhir/resource-types";
1251            case LIST: return "http://hl7.org/fhir/resource-types";
1252            case LOCATION: return "http://hl7.org/fhir/resource-types";
1253            case MEASURE: return "http://hl7.org/fhir/resource-types";
1254            case MEASUREREPORT: return "http://hl7.org/fhir/resource-types";
1255            case MEDIA: return "http://hl7.org/fhir/resource-types";
1256            case MEDICATION: return "http://hl7.org/fhir/resource-types";
1257            case MEDICATIONADMINISTRATION: return "http://hl7.org/fhir/resource-types";
1258            case MEDICATIONDISPENSE: return "http://hl7.org/fhir/resource-types";
1259            case MEDICATIONKNOWLEDGE: return "http://hl7.org/fhir/resource-types";
1260            case MEDICATIONREQUEST: return "http://hl7.org/fhir/resource-types";
1261            case MEDICATIONSTATEMENT: return "http://hl7.org/fhir/resource-types";
1262            case MEDICINALPRODUCT: return "http://hl7.org/fhir/resource-types";
1263            case MEDICINALPRODUCTAUTHORIZATION: return "http://hl7.org/fhir/resource-types";
1264            case MEDICINALPRODUCTCLINICALS: return "http://hl7.org/fhir/resource-types";
1265            case MEDICINALPRODUCTCONTRAINDICATION: return "http://hl7.org/fhir/resource-types";
1266            case MEDICINALPRODUCTDEVICESPEC: return "http://hl7.org/fhir/resource-types";
1267            case MEDICINALPRODUCTINDICATION: return "http://hl7.org/fhir/resource-types";
1268            case MEDICINALPRODUCTINGREDIENT: return "http://hl7.org/fhir/resource-types";
1269            case MEDICINALPRODUCTINTERACTION: return "http://hl7.org/fhir/resource-types";
1270            case MEDICINALPRODUCTMANUFACTURED: return "http://hl7.org/fhir/resource-types";
1271            case MEDICINALPRODUCTPACKAGED: return "http://hl7.org/fhir/resource-types";
1272            case MEDICINALPRODUCTPHARMACEUTICAL: return "http://hl7.org/fhir/resource-types";
1273            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "http://hl7.org/fhir/resource-types";
1274            case MESSAGEDEFINITION: return "http://hl7.org/fhir/resource-types";
1275            case MESSAGEHEADER: return "http://hl7.org/fhir/resource-types";
1276            case NAMINGSYSTEM: return "http://hl7.org/fhir/resource-types";
1277            case NUTRITIONORDER: return "http://hl7.org/fhir/resource-types";
1278            case OBSERVATION: return "http://hl7.org/fhir/resource-types";
1279            case OBSERVATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
1280            case OPERATIONDEFINITION: return "http://hl7.org/fhir/resource-types";
1281            case OPERATIONOUTCOME: return "http://hl7.org/fhir/resource-types";
1282            case ORGANIZATION: return "http://hl7.org/fhir/resource-types";
1283            case ORGANIZATIONAFFILIATION: return "http://hl7.org/fhir/resource-types";
1284            case PARAMETERS: return "http://hl7.org/fhir/resource-types";
1285            case PATIENT: return "http://hl7.org/fhir/resource-types";
1286            case PAYMENTNOTICE: return "http://hl7.org/fhir/resource-types";
1287            case PAYMENTRECONCILIATION: return "http://hl7.org/fhir/resource-types";
1288            case PERSON: return "http://hl7.org/fhir/resource-types";
1289            case PLANDEFINITION: return "http://hl7.org/fhir/resource-types";
1290            case PRACTITIONER: return "http://hl7.org/fhir/resource-types";
1291            case PRACTITIONERROLE: return "http://hl7.org/fhir/resource-types";
1292            case PROCEDURE: return "http://hl7.org/fhir/resource-types";
1293            case PROCESSREQUEST: return "http://hl7.org/fhir/resource-types";
1294            case PROCESSRESPONSE: return "http://hl7.org/fhir/resource-types";
1295            case PROVENANCE: return "http://hl7.org/fhir/resource-types";
1296            case QUESTIONNAIRE: return "http://hl7.org/fhir/resource-types";
1297            case QUESTIONNAIRERESPONSE: return "http://hl7.org/fhir/resource-types";
1298            case RELATEDPERSON: return "http://hl7.org/fhir/resource-types";
1299            case REQUESTGROUP: return "http://hl7.org/fhir/resource-types";
1300            case RESEARCHSTUDY: return "http://hl7.org/fhir/resource-types";
1301            case RESEARCHSUBJECT: return "http://hl7.org/fhir/resource-types";
1302            case RESOURCE: return "http://hl7.org/fhir/resource-types";
1303            case RISKASSESSMENT: return "http://hl7.org/fhir/resource-types";
1304            case SCHEDULE: return "http://hl7.org/fhir/resource-types";
1305            case SEARCHPARAMETER: return "http://hl7.org/fhir/resource-types";
1306            case SEQUENCE: return "http://hl7.org/fhir/resource-types";
1307            case SERVICEREQUEST: return "http://hl7.org/fhir/resource-types";
1308            case SLOT: return "http://hl7.org/fhir/resource-types";
1309            case SPECIMEN: return "http://hl7.org/fhir/resource-types";
1310            case SPECIMENDEFINITION: return "http://hl7.org/fhir/resource-types";
1311            case STRUCTUREDEFINITION: return "http://hl7.org/fhir/resource-types";
1312            case STRUCTUREMAP: return "http://hl7.org/fhir/resource-types";
1313            case SUBSCRIPTION: return "http://hl7.org/fhir/resource-types";
1314            case SUBSTANCE: return "http://hl7.org/fhir/resource-types";
1315            case SUBSTANCEPOLYMER: return "http://hl7.org/fhir/resource-types";
1316            case SUBSTANCEREFERENCEINFORMATION: return "http://hl7.org/fhir/resource-types";
1317            case SUBSTANCESPECIFICATION: return "http://hl7.org/fhir/resource-types";
1318            case SUPPLYDELIVERY: return "http://hl7.org/fhir/resource-types";
1319            case SUPPLYREQUEST: return "http://hl7.org/fhir/resource-types";
1320            case TASK: return "http://hl7.org/fhir/resource-types";
1321            case TERMINOLOGYCAPABILITIES: return "http://hl7.org/fhir/resource-types";
1322            case TESTREPORT: return "http://hl7.org/fhir/resource-types";
1323            case TESTSCRIPT: return "http://hl7.org/fhir/resource-types";
1324            case USERSESSION: return "http://hl7.org/fhir/resource-types";
1325            case VALUESET: return "http://hl7.org/fhir/resource-types";
1326            case VERIFICATIONRESULT: return "http://hl7.org/fhir/resource-types";
1327            case VISIONPRESCRIPTION: return "http://hl7.org/fhir/resource-types";
1328            default: return "?";
1329          }
1330        }
1331        public String getDefinition() {
1332          switch (this) {
1333            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.";
1334            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.";
1335            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.";
1336            case ALLERGYINTOLERANCE: return "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.";
1337            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).";
1338            case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.";
1339            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.";
1340            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.";
1341            case BINARY: return "A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.";
1342            case BIOLOGICALLYDERIVEDPRODUCT: return "A material substance originating from a biological entity intended to be transplanted or infused\ninto another (possibly the same) biological entity.";
1343            case BODYSTRUCTURE: return "Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case.";
1344            case BUNDLE: return "A container for a collection of resources.";
1345            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.";
1346            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.";
1347            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.";
1348            case CATALOGENTRY: return "Catalog entries are wrappers that contextualize items included in a catalog.";
1349            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.";
1350            case CHARGEITEMDEFINITION: return "The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system.";
1351            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.";
1352            case CLAIMRESPONSE: return "This resource provides the adjudication details from the processing of a Claim resource.";
1353            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.";
1354            case CODESYSTEM: return "The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content.";
1355            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.";
1356            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.";
1357            case COMPARTMENTDEFINITION: return "A compartment definition that defines how resources are accessed on a server.";
1358            case COMPOSITION: return "A set of healthcare-related information that is assembled together into a single logical package 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. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.).";
1359            case CONCEPTMAP: return "A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models.";
1360            case CONDITION: return "A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern.";
1361            case CONSENT: return "A record of a healthcare consumer’s  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.";
1362            case CONTRACT: return "Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement.";
1363            case COVERAGE: return "Financial instrument which may be used to reimburse or pay for health care products and services.";
1364            case COVERAGEELIGIBILITYREQUEST: return "The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy.";
1365            case COVERAGEELIGIBILITYRESPONSE: return "This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource.";
1366            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.";
1367            case DEVICE: return "This resource identifies 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. This is the catalog description of a device (not the specific instance).";
1368            case DEVICEDEFINITION: return "The characteristics, operational status and capabilities of a medical-related component of a medical device.";
1369            case DEVICEMETRIC: return "Describes a measurement, calculation or setting capability of a medical device.";
1370            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.";
1371            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.";
1372            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.";
1373            case DOCUMENTMANIFEST: return "A collection of documents compiled for a purpose together with metadata that applies to the collection.";
1374            case DOCUMENTREFERENCE: return "A reference to a document.";
1375            case DOMAINRESOURCE: return "A resource that includes narrative, extensions, and contained resources.";
1376            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.";
1377            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.";
1378            case ENROLLMENTREQUEST: return "This resource provides the insurance enrollment details to the insurer regarding a specified coverage.";
1379            case ENROLLMENTRESPONSE: return "This resource provides enrollment and plan details from the processing of an Enrollment resource.";
1380            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.";
1381            case EVENTDEFINITION: return "The EventDefinition resource provides a reusable description of when a particular event can occur.";
1382            case EXAMPLESCENARIO: return "Example of workflow instance.";
1383            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.";
1384            case FAMILYMEMBERHISTORY: return "Significant health conditions for a person related to the patient relevant in the context of care for the patient.";
1385            case FLAG: return "Prospective warnings of potential issues when providing care to the patient.";
1386            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.";
1387            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.";
1388            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.";
1389            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.";
1390            case HEALTHCARESERVICE: return "The details of a healthcare service available at a location.";
1391            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.";
1392            case IMMUNIZATION: return "Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party.";
1393            case IMMUNIZATIONEVALUATION: return "Describes a comparison of an immunization event against published recommendations to determine if the administration is \"valid\" in relation to those  recommendations.";
1394            case IMMUNIZATIONRECOMMENDATION: return "A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification.";
1395            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.";
1396            case INSURANCEPLAN: return "Details of a Health Insurance product/plan provided by an organization.";
1397            case INVOICE: return "Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose.";
1398            case ITEMINSTANCE: return "A physical, countable instance of an item, for example one box or one unit.";
1399            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.";
1400            case LINKAGE: return "Identifies two or more records (resource instances) that are referring to the same real-world \"occurrence\".";
1401            case LIST: return "A set of information summarized from a list of other resources.";
1402            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.";
1403            case MEASURE: return "The Measure resource provides the definition of a quality measure.";
1404            case MEASUREREPORT: return "The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation.";
1405            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.";
1406            case MEDICATION: return "This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use.";
1407            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.";
1408            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.";
1409            case MEDICATIONKNOWLEDGE: return "Information about a medication that is used to support knowledge.";
1410            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.";
1411            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.";
1412            case MEDICINALPRODUCT: return "Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use).";
1413            case MEDICINALPRODUCTAUTHORIZATION: return "The regulatory authorization of a medicinal product.";
1414            case MEDICINALPRODUCTCLINICALS: return "The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.";
1415            case MEDICINALPRODUCTCONTRAINDICATION: return "The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes.";
1416            case MEDICINALPRODUCTDEVICESPEC: return "A detailed description of a device, typically as part of a regulated medicinal product. It is not intended to replace the Device resource, which covers use of device instances.";
1417            case MEDICINALPRODUCTINDICATION: return "Indication for the Medicinal Product.";
1418            case MEDICINALPRODUCTINGREDIENT: return "An ingredient of a manufactured item or pharmaceutical product.";
1419            case MEDICINALPRODUCTINTERACTION: return "The interactions of the medicinal product with other medicinal products, or other forms of interactions.";
1420            case MEDICINALPRODUCTMANUFACTURED: return "The manufactured item as contained in the packaged medicinal product.";
1421            case MEDICINALPRODUCTPACKAGED: return "A medicinal product in a container or package.";
1422            case MEDICINALPRODUCTPHARMACEUTICAL: return "A pharmaceutical product described in terms of its composition and dose form.";
1423            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "Describe the undesirable effects of the medicinal product.";
1424            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.";
1425            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.";
1426            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.";
1427            case NUTRITIONORDER: return "A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident.";
1428            case OBSERVATION: return "Measurements and simple assertions made about a patient, device or other subject.";
1429            case OBSERVATIONDEFINITION: return "Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service.";
1430            case OPERATIONDEFINITION: return "A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).";
1431            case OPERATIONOUTCOME: return "A collection of error, warning or information messages that result from a system action.";
1432            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, payer/insurer, etc.";
1433            case ORGANIZATIONAFFILIATION: return "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.";
1434            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.";
1435            case PATIENT: return "Demographics and other administrative information about an individual or animal receiving care or other health-related services.";
1436            case PAYMENTNOTICE: return "This resource provides the status of the payment for goods and services rendered, and the request and response resource references.";
1437            case PAYMENTRECONCILIATION: return "This resource provides payment details and claim references supporting a bulk payment.";
1438            case PERSON: return "Demographics and administrative information about a person independent of a specific health-related context.";
1439            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.";
1440            case PRACTITIONER: return "A person who is directly or indirectly involved in the provisioning of healthcare.";
1441            case PRACTITIONERROLE: return "A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time.";
1442            case PROCEDURE: return "An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy.";
1443            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.";
1444            case PROCESSRESPONSE: return "This resource provides processing status, errors and notes from the processing of a resource.";
1445            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.";
1446            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.";
1447            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.";
1448            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.";
1449            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\".";
1450            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.";
1451            case RESEARCHSUBJECT: return "A physical entity which is the primary unit of operational and/or administrative interest in a study.";
1452            case RESOURCE: return "This is the base resource type for everything.";
1453            case RISKASSESSMENT: return "An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome.";
1454            case SCHEDULE: return "A container for slots of time that may be available for booking appointments.";
1455            case SEARCHPARAMETER: return "A search parameter that defines a named search item that can be used to search/filter on a resource.";
1456            case SEQUENCE: return "Raw data describing a biological sequence.";
1457            case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed.";
1458            case SLOT: return "A slot of time on a schedule that may be available for booking appointments.";
1459            case SPECIMEN: return "A sample to be used for analysis.";
1460            case SPECIMENDEFINITION: return "A kind of specimen with associated set of requirements.";
1461            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.";
1462            case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data.";
1463            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 can take an appropriate action.";
1464            case SUBSTANCE: return "A homogeneous material with a definite composition.";
1465            case SUBSTANCEPOLYMER: return "Todo.";
1466            case SUBSTANCEREFERENCEINFORMATION: return "Todo.";
1467            case SUBSTANCESPECIFICATION: return "The detailed description of a substance, typically at a level beyond what is used for prescribing.";
1468            case SUPPLYDELIVERY: return "Record of delivery of what is supplied.";
1469            case SUPPLYREQUEST: return "A record of a request for a medication, substance or device used in the healthcare setting.";
1470            case TASK: return "A task to be performed.";
1471            case TERMINOLOGYCAPABILITIES: return "A Terminology Capabilities 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.";
1472            case TESTREPORT: return "A summary of information based on the results of executing a TestScript.";
1473            case TESTSCRIPT: return "A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.";
1474            case USERSESSION: return "Information about a user's current session.";
1475            case VALUESET: return "A ValueSet resource instances specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).";
1476            case VERIFICATIONRESULT: return "Describes validation requirements, source(s), status and dates for one or more elements.";
1477            case VISIONPRESCRIPTION: return "An authorization for the supply of glasses and/or contact lenses to a patient.";
1478            default: return "?";
1479          }
1480        }
1481        public String getDisplay() {
1482          switch (this) {
1483            case ACCOUNT: return "Account";
1484            case ACTIVITYDEFINITION: return "ActivityDefinition";
1485            case ADVERSEEVENT: return "AdverseEvent";
1486            case ALLERGYINTOLERANCE: return "AllergyIntolerance";
1487            case APPOINTMENT: return "Appointment";
1488            case APPOINTMENTRESPONSE: return "AppointmentResponse";
1489            case AUDITEVENT: return "AuditEvent";
1490            case BASIC: return "Basic";
1491            case BINARY: return "Binary";
1492            case BIOLOGICALLYDERIVEDPRODUCT: return "BiologicallyDerivedProduct";
1493            case BODYSTRUCTURE: return "BodyStructure";
1494            case BUNDLE: return "Bundle";
1495            case CAPABILITYSTATEMENT: return "CapabilityStatement";
1496            case CAREPLAN: return "CarePlan";
1497            case CARETEAM: return "CareTeam";
1498            case CATALOGENTRY: return "CatalogEntry";
1499            case CHARGEITEM: return "ChargeItem";
1500            case CHARGEITEMDEFINITION: return "ChargeItemDefinition";
1501            case CLAIM: return "Claim";
1502            case CLAIMRESPONSE: return "ClaimResponse";
1503            case CLINICALIMPRESSION: return "ClinicalImpression";
1504            case CODESYSTEM: return "CodeSystem";
1505            case COMMUNICATION: return "Communication";
1506            case COMMUNICATIONREQUEST: return "CommunicationRequest";
1507            case COMPARTMENTDEFINITION: return "CompartmentDefinition";
1508            case COMPOSITION: return "Composition";
1509            case CONCEPTMAP: return "ConceptMap";
1510            case CONDITION: return "Condition";
1511            case CONSENT: return "Consent";
1512            case CONTRACT: return "Contract";
1513            case COVERAGE: return "Coverage";
1514            case COVERAGEELIGIBILITYREQUEST: return "CoverageEligibilityRequest";
1515            case COVERAGEELIGIBILITYRESPONSE: return "CoverageEligibilityResponse";
1516            case DETECTEDISSUE: return "DetectedIssue";
1517            case DEVICE: return "Device";
1518            case DEVICEDEFINITION: return "DeviceDefinition";
1519            case DEVICEMETRIC: return "DeviceMetric";
1520            case DEVICEREQUEST: return "DeviceRequest";
1521            case DEVICEUSESTATEMENT: return "DeviceUseStatement";
1522            case DIAGNOSTICREPORT: return "DiagnosticReport";
1523            case DOCUMENTMANIFEST: return "DocumentManifest";
1524            case DOCUMENTREFERENCE: return "DocumentReference";
1525            case DOMAINRESOURCE: return "DomainResource";
1526            case ENCOUNTER: return "Encounter";
1527            case ENDPOINT: return "Endpoint";
1528            case ENROLLMENTREQUEST: return "EnrollmentRequest";
1529            case ENROLLMENTRESPONSE: return "EnrollmentResponse";
1530            case EPISODEOFCARE: return "EpisodeOfCare";
1531            case EVENTDEFINITION: return "EventDefinition";
1532            case EXAMPLESCENARIO: return "ExampleScenario";
1533            case EXPLANATIONOFBENEFIT: return "ExplanationOfBenefit";
1534            case FAMILYMEMBERHISTORY: return "FamilyMemberHistory";
1535            case FLAG: return "Flag";
1536            case GOAL: return "Goal";
1537            case GRAPHDEFINITION: return "GraphDefinition";
1538            case GROUP: return "Group";
1539            case GUIDANCERESPONSE: return "GuidanceResponse";
1540            case HEALTHCARESERVICE: return "HealthcareService";
1541            case IMAGINGSTUDY: return "ImagingStudy";
1542            case IMMUNIZATION: return "Immunization";
1543            case IMMUNIZATIONEVALUATION: return "ImmunizationEvaluation";
1544            case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation";
1545            case IMPLEMENTATIONGUIDE: return "ImplementationGuide";
1546            case INSURANCEPLAN: return "InsurancePlan";
1547            case INVOICE: return "Invoice";
1548            case ITEMINSTANCE: return "ItemInstance";
1549            case LIBRARY: return "Library";
1550            case LINKAGE: return "Linkage";
1551            case LIST: return "List";
1552            case LOCATION: return "Location";
1553            case MEASURE: return "Measure";
1554            case MEASUREREPORT: return "MeasureReport";
1555            case MEDIA: return "Media";
1556            case MEDICATION: return "Medication";
1557            case MEDICATIONADMINISTRATION: return "MedicationAdministration";
1558            case MEDICATIONDISPENSE: return "MedicationDispense";
1559            case MEDICATIONKNOWLEDGE: return "MedicationKnowledge";
1560            case MEDICATIONREQUEST: return "MedicationRequest";
1561            case MEDICATIONSTATEMENT: return "MedicationStatement";
1562            case MEDICINALPRODUCT: return "MedicinalProduct";
1563            case MEDICINALPRODUCTAUTHORIZATION: return "MedicinalProductAuthorization";
1564            case MEDICINALPRODUCTCLINICALS: return "MedicinalProductClinicals";
1565            case MEDICINALPRODUCTCONTRAINDICATION: return "MedicinalProductContraindication";
1566            case MEDICINALPRODUCTDEVICESPEC: return "MedicinalProductDeviceSpec";
1567            case MEDICINALPRODUCTINDICATION: return "MedicinalProductIndication";
1568            case MEDICINALPRODUCTINGREDIENT: return "MedicinalProductIngredient";
1569            case MEDICINALPRODUCTINTERACTION: return "MedicinalProductInteraction";
1570            case MEDICINALPRODUCTMANUFACTURED: return "MedicinalProductManufactured";
1571            case MEDICINALPRODUCTPACKAGED: return "MedicinalProductPackaged";
1572            case MEDICINALPRODUCTPHARMACEUTICAL: return "MedicinalProductPharmaceutical";
1573            case MEDICINALPRODUCTUNDESIRABLEEFFECT: return "MedicinalProductUndesirableEffect";
1574            case MESSAGEDEFINITION: return "MessageDefinition";
1575            case MESSAGEHEADER: return "MessageHeader";
1576            case NAMINGSYSTEM: return "NamingSystem";
1577            case NUTRITIONORDER: return "NutritionOrder";
1578            case OBSERVATION: return "Observation";
1579            case OBSERVATIONDEFINITION: return "ObservationDefinition";
1580            case OPERATIONDEFINITION: return "OperationDefinition";
1581            case OPERATIONOUTCOME: return "OperationOutcome";
1582            case ORGANIZATION: return "Organization";
1583            case ORGANIZATIONAFFILIATION: return "OrganizationAffiliation";
1584            case PARAMETERS: return "Parameters";
1585            case PATIENT: return "Patient";
1586            case PAYMENTNOTICE: return "PaymentNotice";
1587            case PAYMENTRECONCILIATION: return "PaymentReconciliation";
1588            case PERSON: return "Person";
1589            case PLANDEFINITION: return "PlanDefinition";
1590            case PRACTITIONER: return "Practitioner";
1591            case PRACTITIONERROLE: return "PractitionerRole";
1592            case PROCEDURE: return "Procedure";
1593            case PROCESSREQUEST: return "ProcessRequest";
1594            case PROCESSRESPONSE: return "ProcessResponse";
1595            case PROVENANCE: return "Provenance";
1596            case QUESTIONNAIRE: return "Questionnaire";
1597            case QUESTIONNAIRERESPONSE: return "QuestionnaireResponse";
1598            case RELATEDPERSON: return "RelatedPerson";
1599            case REQUESTGROUP: return "RequestGroup";
1600            case RESEARCHSTUDY: return "ResearchStudy";
1601            case RESEARCHSUBJECT: return "ResearchSubject";
1602            case RESOURCE: return "Resource";
1603            case RISKASSESSMENT: return "RiskAssessment";
1604            case SCHEDULE: return "Schedule";
1605            case SEARCHPARAMETER: return "SearchParameter";
1606            case SEQUENCE: return "Sequence";
1607            case SERVICEREQUEST: return "ServiceRequest";
1608            case SLOT: return "Slot";
1609            case SPECIMEN: return "Specimen";
1610            case SPECIMENDEFINITION: return "SpecimenDefinition";
1611            case STRUCTUREDEFINITION: return "StructureDefinition";
1612            case STRUCTUREMAP: return "StructureMap";
1613            case SUBSCRIPTION: return "Subscription";
1614            case SUBSTANCE: return "Substance";
1615            case SUBSTANCEPOLYMER: return "SubstancePolymer";
1616            case SUBSTANCEREFERENCEINFORMATION: return "SubstanceReferenceInformation";
1617            case SUBSTANCESPECIFICATION: return "SubstanceSpecification";
1618            case SUPPLYDELIVERY: return "SupplyDelivery";
1619            case SUPPLYREQUEST: return "SupplyRequest";
1620            case TASK: return "Task";
1621            case TERMINOLOGYCAPABILITIES: return "TerminologyCapabilities";
1622            case TESTREPORT: return "TestReport";
1623            case TESTSCRIPT: return "TestScript";
1624            case USERSESSION: return "UserSession";
1625            case VALUESET: return "ValueSet";
1626            case VERIFICATIONRESULT: return "VerificationResult";
1627            case VISIONPRESCRIPTION: return "VisionPrescription";
1628            default: return "?";
1629          }
1630        }
1631    }
1632
1633  public static class FHIRResourceTypeEnumFactory implements EnumFactory<FHIRResourceType> {
1634    public FHIRResourceType fromCode(String codeString) throws IllegalArgumentException {
1635      if (codeString == null || "".equals(codeString))
1636            if (codeString == null || "".equals(codeString))
1637                return null;
1638        if ("Account".equals(codeString))
1639          return FHIRResourceType.ACCOUNT;
1640        if ("ActivityDefinition".equals(codeString))
1641          return FHIRResourceType.ACTIVITYDEFINITION;
1642        if ("AdverseEvent".equals(codeString))
1643          return FHIRResourceType.ADVERSEEVENT;
1644        if ("AllergyIntolerance".equals(codeString))
1645          return FHIRResourceType.ALLERGYINTOLERANCE;
1646        if ("Appointment".equals(codeString))
1647          return FHIRResourceType.APPOINTMENT;
1648        if ("AppointmentResponse".equals(codeString))
1649          return FHIRResourceType.APPOINTMENTRESPONSE;
1650        if ("AuditEvent".equals(codeString))
1651          return FHIRResourceType.AUDITEVENT;
1652        if ("Basic".equals(codeString))
1653          return FHIRResourceType.BASIC;
1654        if ("Binary".equals(codeString))
1655          return FHIRResourceType.BINARY;
1656        if ("BiologicallyDerivedProduct".equals(codeString))
1657          return FHIRResourceType.BIOLOGICALLYDERIVEDPRODUCT;
1658        if ("BodyStructure".equals(codeString))
1659          return FHIRResourceType.BODYSTRUCTURE;
1660        if ("Bundle".equals(codeString))
1661          return FHIRResourceType.BUNDLE;
1662        if ("CapabilityStatement".equals(codeString))
1663          return FHIRResourceType.CAPABILITYSTATEMENT;
1664        if ("CarePlan".equals(codeString))
1665          return FHIRResourceType.CAREPLAN;
1666        if ("CareTeam".equals(codeString))
1667          return FHIRResourceType.CARETEAM;
1668        if ("CatalogEntry".equals(codeString))
1669          return FHIRResourceType.CATALOGENTRY;
1670        if ("ChargeItem".equals(codeString))
1671          return FHIRResourceType.CHARGEITEM;
1672        if ("ChargeItemDefinition".equals(codeString))
1673          return FHIRResourceType.CHARGEITEMDEFINITION;
1674        if ("Claim".equals(codeString))
1675          return FHIRResourceType.CLAIM;
1676        if ("ClaimResponse".equals(codeString))
1677          return FHIRResourceType.CLAIMRESPONSE;
1678        if ("ClinicalImpression".equals(codeString))
1679          return FHIRResourceType.CLINICALIMPRESSION;
1680        if ("CodeSystem".equals(codeString))
1681          return FHIRResourceType.CODESYSTEM;
1682        if ("Communication".equals(codeString))
1683          return FHIRResourceType.COMMUNICATION;
1684        if ("CommunicationRequest".equals(codeString))
1685          return FHIRResourceType.COMMUNICATIONREQUEST;
1686        if ("CompartmentDefinition".equals(codeString))
1687          return FHIRResourceType.COMPARTMENTDEFINITION;
1688        if ("Composition".equals(codeString))
1689          return FHIRResourceType.COMPOSITION;
1690        if ("ConceptMap".equals(codeString))
1691          return FHIRResourceType.CONCEPTMAP;
1692        if ("Condition".equals(codeString))
1693          return FHIRResourceType.CONDITION;
1694        if ("Consent".equals(codeString))
1695          return FHIRResourceType.CONSENT;
1696        if ("Contract".equals(codeString))
1697          return FHIRResourceType.CONTRACT;
1698        if ("Coverage".equals(codeString))
1699          return FHIRResourceType.COVERAGE;
1700        if ("CoverageEligibilityRequest".equals(codeString))
1701          return FHIRResourceType.COVERAGEELIGIBILITYREQUEST;
1702        if ("CoverageEligibilityResponse".equals(codeString))
1703          return FHIRResourceType.COVERAGEELIGIBILITYRESPONSE;
1704        if ("DetectedIssue".equals(codeString))
1705          return FHIRResourceType.DETECTEDISSUE;
1706        if ("Device".equals(codeString))
1707          return FHIRResourceType.DEVICE;
1708        if ("DeviceDefinition".equals(codeString))
1709          return FHIRResourceType.DEVICEDEFINITION;
1710        if ("DeviceMetric".equals(codeString))
1711          return FHIRResourceType.DEVICEMETRIC;
1712        if ("DeviceRequest".equals(codeString))
1713          return FHIRResourceType.DEVICEREQUEST;
1714        if ("DeviceUseStatement".equals(codeString))
1715          return FHIRResourceType.DEVICEUSESTATEMENT;
1716        if ("DiagnosticReport".equals(codeString))
1717          return FHIRResourceType.DIAGNOSTICREPORT;
1718        if ("DocumentManifest".equals(codeString))
1719          return FHIRResourceType.DOCUMENTMANIFEST;
1720        if ("DocumentReference".equals(codeString))
1721          return FHIRResourceType.DOCUMENTREFERENCE;
1722        if ("DomainResource".equals(codeString))
1723          return FHIRResourceType.DOMAINRESOURCE;
1724        if ("Encounter".equals(codeString))
1725          return FHIRResourceType.ENCOUNTER;
1726        if ("Endpoint".equals(codeString))
1727          return FHIRResourceType.ENDPOINT;
1728        if ("EnrollmentRequest".equals(codeString))
1729          return FHIRResourceType.ENROLLMENTREQUEST;
1730        if ("EnrollmentResponse".equals(codeString))
1731          return FHIRResourceType.ENROLLMENTRESPONSE;
1732        if ("EpisodeOfCare".equals(codeString))
1733          return FHIRResourceType.EPISODEOFCARE;
1734        if ("EventDefinition".equals(codeString))
1735          return FHIRResourceType.EVENTDEFINITION;
1736        if ("ExampleScenario".equals(codeString))
1737          return FHIRResourceType.EXAMPLESCENARIO;
1738        if ("ExplanationOfBenefit".equals(codeString))
1739          return FHIRResourceType.EXPLANATIONOFBENEFIT;
1740        if ("FamilyMemberHistory".equals(codeString))
1741          return FHIRResourceType.FAMILYMEMBERHISTORY;
1742        if ("Flag".equals(codeString))
1743          return FHIRResourceType.FLAG;
1744        if ("Goal".equals(codeString))
1745          return FHIRResourceType.GOAL;
1746        if ("GraphDefinition".equals(codeString))
1747          return FHIRResourceType.GRAPHDEFINITION;
1748        if ("Group".equals(codeString))
1749          return FHIRResourceType.GROUP;
1750        if ("GuidanceResponse".equals(codeString))
1751          return FHIRResourceType.GUIDANCERESPONSE;
1752        if ("HealthcareService".equals(codeString))
1753          return FHIRResourceType.HEALTHCARESERVICE;
1754        if ("ImagingStudy".equals(codeString))
1755          return FHIRResourceType.IMAGINGSTUDY;
1756        if ("Immunization".equals(codeString))
1757          return FHIRResourceType.IMMUNIZATION;
1758        if ("ImmunizationEvaluation".equals(codeString))
1759          return FHIRResourceType.IMMUNIZATIONEVALUATION;
1760        if ("ImmunizationRecommendation".equals(codeString))
1761          return FHIRResourceType.IMMUNIZATIONRECOMMENDATION;
1762        if ("ImplementationGuide".equals(codeString))
1763          return FHIRResourceType.IMPLEMENTATIONGUIDE;
1764        if ("InsurancePlan".equals(codeString))
1765          return FHIRResourceType.INSURANCEPLAN;
1766        if ("Invoice".equals(codeString))
1767          return FHIRResourceType.INVOICE;
1768        if ("ItemInstance".equals(codeString))
1769          return FHIRResourceType.ITEMINSTANCE;
1770        if ("Library".equals(codeString))
1771          return FHIRResourceType.LIBRARY;
1772        if ("Linkage".equals(codeString))
1773          return FHIRResourceType.LINKAGE;
1774        if ("List".equals(codeString))
1775          return FHIRResourceType.LIST;
1776        if ("Location".equals(codeString))
1777          return FHIRResourceType.LOCATION;
1778        if ("Measure".equals(codeString))
1779          return FHIRResourceType.MEASURE;
1780        if ("MeasureReport".equals(codeString))
1781          return FHIRResourceType.MEASUREREPORT;
1782        if ("Media".equals(codeString))
1783          return FHIRResourceType.MEDIA;
1784        if ("Medication".equals(codeString))
1785          return FHIRResourceType.MEDICATION;
1786        if ("MedicationAdministration".equals(codeString))
1787          return FHIRResourceType.MEDICATIONADMINISTRATION;
1788        if ("MedicationDispense".equals(codeString))
1789          return FHIRResourceType.MEDICATIONDISPENSE;
1790        if ("MedicationKnowledge".equals(codeString))
1791          return FHIRResourceType.MEDICATIONKNOWLEDGE;
1792        if ("MedicationRequest".equals(codeString))
1793          return FHIRResourceType.MEDICATIONREQUEST;
1794        if ("MedicationStatement".equals(codeString))
1795          return FHIRResourceType.MEDICATIONSTATEMENT;
1796        if ("MedicinalProduct".equals(codeString))
1797          return FHIRResourceType.MEDICINALPRODUCT;
1798        if ("MedicinalProductAuthorization".equals(codeString))
1799          return FHIRResourceType.MEDICINALPRODUCTAUTHORIZATION;
1800        if ("MedicinalProductClinicals".equals(codeString))
1801          return FHIRResourceType.MEDICINALPRODUCTCLINICALS;
1802        if ("MedicinalProductContraindication".equals(codeString))
1803          return FHIRResourceType.MEDICINALPRODUCTCONTRAINDICATION;
1804        if ("MedicinalProductDeviceSpec".equals(codeString))
1805          return FHIRResourceType.MEDICINALPRODUCTDEVICESPEC;
1806        if ("MedicinalProductIndication".equals(codeString))
1807          return FHIRResourceType.MEDICINALPRODUCTINDICATION;
1808        if ("MedicinalProductIngredient".equals(codeString))
1809          return FHIRResourceType.MEDICINALPRODUCTINGREDIENT;
1810        if ("MedicinalProductInteraction".equals(codeString))
1811          return FHIRResourceType.MEDICINALPRODUCTINTERACTION;
1812        if ("MedicinalProductManufactured".equals(codeString))
1813          return FHIRResourceType.MEDICINALPRODUCTMANUFACTURED;
1814        if ("MedicinalProductPackaged".equals(codeString))
1815          return FHIRResourceType.MEDICINALPRODUCTPACKAGED;
1816        if ("MedicinalProductPharmaceutical".equals(codeString))
1817          return FHIRResourceType.MEDICINALPRODUCTPHARMACEUTICAL;
1818        if ("MedicinalProductUndesirableEffect".equals(codeString))
1819          return FHIRResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT;
1820        if ("MessageDefinition".equals(codeString))
1821          return FHIRResourceType.MESSAGEDEFINITION;
1822        if ("MessageHeader".equals(codeString))
1823          return FHIRResourceType.MESSAGEHEADER;
1824        if ("NamingSystem".equals(codeString))
1825          return FHIRResourceType.NAMINGSYSTEM;
1826        if ("NutritionOrder".equals(codeString))
1827          return FHIRResourceType.NUTRITIONORDER;
1828        if ("Observation".equals(codeString))
1829          return FHIRResourceType.OBSERVATION;
1830        if ("ObservationDefinition".equals(codeString))
1831          return FHIRResourceType.OBSERVATIONDEFINITION;
1832        if ("OperationDefinition".equals(codeString))
1833          return FHIRResourceType.OPERATIONDEFINITION;
1834        if ("OperationOutcome".equals(codeString))
1835          return FHIRResourceType.OPERATIONOUTCOME;
1836        if ("Organization".equals(codeString))
1837          return FHIRResourceType.ORGANIZATION;
1838        if ("OrganizationAffiliation".equals(codeString))
1839          return FHIRResourceType.ORGANIZATIONAFFILIATION;
1840        if ("Parameters".equals(codeString))
1841          return FHIRResourceType.PARAMETERS;
1842        if ("Patient".equals(codeString))
1843          return FHIRResourceType.PATIENT;
1844        if ("PaymentNotice".equals(codeString))
1845          return FHIRResourceType.PAYMENTNOTICE;
1846        if ("PaymentReconciliation".equals(codeString))
1847          return FHIRResourceType.PAYMENTRECONCILIATION;
1848        if ("Person".equals(codeString))
1849          return FHIRResourceType.PERSON;
1850        if ("PlanDefinition".equals(codeString))
1851          return FHIRResourceType.PLANDEFINITION;
1852        if ("Practitioner".equals(codeString))
1853          return FHIRResourceType.PRACTITIONER;
1854        if ("PractitionerRole".equals(codeString))
1855          return FHIRResourceType.PRACTITIONERROLE;
1856        if ("Procedure".equals(codeString))
1857          return FHIRResourceType.PROCEDURE;
1858        if ("ProcessRequest".equals(codeString))
1859          return FHIRResourceType.PROCESSREQUEST;
1860        if ("ProcessResponse".equals(codeString))
1861          return FHIRResourceType.PROCESSRESPONSE;
1862        if ("Provenance".equals(codeString))
1863          return FHIRResourceType.PROVENANCE;
1864        if ("Questionnaire".equals(codeString))
1865          return FHIRResourceType.QUESTIONNAIRE;
1866        if ("QuestionnaireResponse".equals(codeString))
1867          return FHIRResourceType.QUESTIONNAIRERESPONSE;
1868        if ("RelatedPerson".equals(codeString))
1869          return FHIRResourceType.RELATEDPERSON;
1870        if ("RequestGroup".equals(codeString))
1871          return FHIRResourceType.REQUESTGROUP;
1872        if ("ResearchStudy".equals(codeString))
1873          return FHIRResourceType.RESEARCHSTUDY;
1874        if ("ResearchSubject".equals(codeString))
1875          return FHIRResourceType.RESEARCHSUBJECT;
1876        if ("Resource".equals(codeString))
1877          return FHIRResourceType.RESOURCE;
1878        if ("RiskAssessment".equals(codeString))
1879          return FHIRResourceType.RISKASSESSMENT;
1880        if ("Schedule".equals(codeString))
1881          return FHIRResourceType.SCHEDULE;
1882        if ("SearchParameter".equals(codeString))
1883          return FHIRResourceType.SEARCHPARAMETER;
1884        if ("Sequence".equals(codeString))
1885          return FHIRResourceType.SEQUENCE;
1886        if ("ServiceRequest".equals(codeString))
1887          return FHIRResourceType.SERVICEREQUEST;
1888        if ("Slot".equals(codeString))
1889          return FHIRResourceType.SLOT;
1890        if ("Specimen".equals(codeString))
1891          return FHIRResourceType.SPECIMEN;
1892        if ("SpecimenDefinition".equals(codeString))
1893          return FHIRResourceType.SPECIMENDEFINITION;
1894        if ("StructureDefinition".equals(codeString))
1895          return FHIRResourceType.STRUCTUREDEFINITION;
1896        if ("StructureMap".equals(codeString))
1897          return FHIRResourceType.STRUCTUREMAP;
1898        if ("Subscription".equals(codeString))
1899          return FHIRResourceType.SUBSCRIPTION;
1900        if ("Substance".equals(codeString))
1901          return FHIRResourceType.SUBSTANCE;
1902        if ("SubstancePolymer".equals(codeString))
1903          return FHIRResourceType.SUBSTANCEPOLYMER;
1904        if ("SubstanceReferenceInformation".equals(codeString))
1905          return FHIRResourceType.SUBSTANCEREFERENCEINFORMATION;
1906        if ("SubstanceSpecification".equals(codeString))
1907          return FHIRResourceType.SUBSTANCESPECIFICATION;
1908        if ("SupplyDelivery".equals(codeString))
1909          return FHIRResourceType.SUPPLYDELIVERY;
1910        if ("SupplyRequest".equals(codeString))
1911          return FHIRResourceType.SUPPLYREQUEST;
1912        if ("Task".equals(codeString))
1913          return FHIRResourceType.TASK;
1914        if ("TerminologyCapabilities".equals(codeString))
1915          return FHIRResourceType.TERMINOLOGYCAPABILITIES;
1916        if ("TestReport".equals(codeString))
1917          return FHIRResourceType.TESTREPORT;
1918        if ("TestScript".equals(codeString))
1919          return FHIRResourceType.TESTSCRIPT;
1920        if ("UserSession".equals(codeString))
1921          return FHIRResourceType.USERSESSION;
1922        if ("ValueSet".equals(codeString))
1923          return FHIRResourceType.VALUESET;
1924        if ("VerificationResult".equals(codeString))
1925          return FHIRResourceType.VERIFICATIONRESULT;
1926        if ("VisionPrescription".equals(codeString))
1927          return FHIRResourceType.VISIONPRESCRIPTION;
1928        throw new IllegalArgumentException("Unknown FHIRResourceType code '"+codeString+"'");
1929        }
1930        public Enumeration<FHIRResourceType> fromType(Base code) throws FHIRException {
1931          if (code == null)
1932            return null;
1933          if (code.isEmpty())
1934            return new Enumeration<FHIRResourceType>(this);
1935          String codeString = ((PrimitiveType) code).asStringValue();
1936          if (codeString == null || "".equals(codeString))
1937            return null;
1938        if ("Account".equals(codeString))
1939          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ACCOUNT);
1940        if ("ActivityDefinition".equals(codeString))
1941          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ACTIVITYDEFINITION);
1942        if ("AdverseEvent".equals(codeString))
1943          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ADVERSEEVENT);
1944        if ("AllergyIntolerance".equals(codeString))
1945          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ALLERGYINTOLERANCE);
1946        if ("Appointment".equals(codeString))
1947          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.APPOINTMENT);
1948        if ("AppointmentResponse".equals(codeString))
1949          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.APPOINTMENTRESPONSE);
1950        if ("AuditEvent".equals(codeString))
1951          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.AUDITEVENT);
1952        if ("Basic".equals(codeString))
1953          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.BASIC);
1954        if ("Binary".equals(codeString))
1955          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.BINARY);
1956        if ("BiologicallyDerivedProduct".equals(codeString))
1957          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.BIOLOGICALLYDERIVEDPRODUCT);
1958        if ("BodyStructure".equals(codeString))
1959          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.BODYSTRUCTURE);
1960        if ("Bundle".equals(codeString))
1961          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.BUNDLE);
1962        if ("CapabilityStatement".equals(codeString))
1963          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CAPABILITYSTATEMENT);
1964        if ("CarePlan".equals(codeString))
1965          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CAREPLAN);
1966        if ("CareTeam".equals(codeString))
1967          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CARETEAM);
1968        if ("CatalogEntry".equals(codeString))
1969          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CATALOGENTRY);
1970        if ("ChargeItem".equals(codeString))
1971          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CHARGEITEM);
1972        if ("ChargeItemDefinition".equals(codeString))
1973          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CHARGEITEMDEFINITION);
1974        if ("Claim".equals(codeString))
1975          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CLAIM);
1976        if ("ClaimResponse".equals(codeString))
1977          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CLAIMRESPONSE);
1978        if ("ClinicalImpression".equals(codeString))
1979          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CLINICALIMPRESSION);
1980        if ("CodeSystem".equals(codeString))
1981          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CODESYSTEM);
1982        if ("Communication".equals(codeString))
1983          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COMMUNICATION);
1984        if ("CommunicationRequest".equals(codeString))
1985          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COMMUNICATIONREQUEST);
1986        if ("CompartmentDefinition".equals(codeString))
1987          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COMPARTMENTDEFINITION);
1988        if ("Composition".equals(codeString))
1989          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COMPOSITION);
1990        if ("ConceptMap".equals(codeString))
1991          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CONCEPTMAP);
1992        if ("Condition".equals(codeString))
1993          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CONDITION);
1994        if ("Consent".equals(codeString))
1995          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CONSENT);
1996        if ("Contract".equals(codeString))
1997          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.CONTRACT);
1998        if ("Coverage".equals(codeString))
1999          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COVERAGE);
2000        if ("CoverageEligibilityRequest".equals(codeString))
2001          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COVERAGEELIGIBILITYREQUEST);
2002        if ("CoverageEligibilityResponse".equals(codeString))
2003          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.COVERAGEELIGIBILITYRESPONSE);
2004        if ("DetectedIssue".equals(codeString))
2005          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DETECTEDISSUE);
2006        if ("Device".equals(codeString))
2007          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DEVICE);
2008        if ("DeviceDefinition".equals(codeString))
2009          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DEVICEDEFINITION);
2010        if ("DeviceMetric".equals(codeString))
2011          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DEVICEMETRIC);
2012        if ("DeviceRequest".equals(codeString))
2013          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DEVICEREQUEST);
2014        if ("DeviceUseStatement".equals(codeString))
2015          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DEVICEUSESTATEMENT);
2016        if ("DiagnosticReport".equals(codeString))
2017          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DIAGNOSTICREPORT);
2018        if ("DocumentManifest".equals(codeString))
2019          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DOCUMENTMANIFEST);
2020        if ("DocumentReference".equals(codeString))
2021          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DOCUMENTREFERENCE);
2022        if ("DomainResource".equals(codeString))
2023          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.DOMAINRESOURCE);
2024        if ("Encounter".equals(codeString))
2025          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ENCOUNTER);
2026        if ("Endpoint".equals(codeString))
2027          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ENDPOINT);
2028        if ("EnrollmentRequest".equals(codeString))
2029          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ENROLLMENTREQUEST);
2030        if ("EnrollmentResponse".equals(codeString))
2031          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ENROLLMENTRESPONSE);
2032        if ("EpisodeOfCare".equals(codeString))
2033          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.EPISODEOFCARE);
2034        if ("EventDefinition".equals(codeString))
2035          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.EVENTDEFINITION);
2036        if ("ExampleScenario".equals(codeString))
2037          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.EXAMPLESCENARIO);
2038        if ("ExplanationOfBenefit".equals(codeString))
2039          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.EXPLANATIONOFBENEFIT);
2040        if ("FamilyMemberHistory".equals(codeString))
2041          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.FAMILYMEMBERHISTORY);
2042        if ("Flag".equals(codeString))
2043          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.FLAG);
2044        if ("Goal".equals(codeString))
2045          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.GOAL);
2046        if ("GraphDefinition".equals(codeString))
2047          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.GRAPHDEFINITION);
2048        if ("Group".equals(codeString))
2049          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.GROUP);
2050        if ("GuidanceResponse".equals(codeString))
2051          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.GUIDANCERESPONSE);
2052        if ("HealthcareService".equals(codeString))
2053          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.HEALTHCARESERVICE);
2054        if ("ImagingStudy".equals(codeString))
2055          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.IMAGINGSTUDY);
2056        if ("Immunization".equals(codeString))
2057          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.IMMUNIZATION);
2058        if ("ImmunizationEvaluation".equals(codeString))
2059          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.IMMUNIZATIONEVALUATION);
2060        if ("ImmunizationRecommendation".equals(codeString))
2061          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.IMMUNIZATIONRECOMMENDATION);
2062        if ("ImplementationGuide".equals(codeString))
2063          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.IMPLEMENTATIONGUIDE);
2064        if ("InsurancePlan".equals(codeString))
2065          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.INSURANCEPLAN);
2066        if ("Invoice".equals(codeString))
2067          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.INVOICE);
2068        if ("ItemInstance".equals(codeString))
2069          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ITEMINSTANCE);
2070        if ("Library".equals(codeString))
2071          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.LIBRARY);
2072        if ("Linkage".equals(codeString))
2073          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.LINKAGE);
2074        if ("List".equals(codeString))
2075          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.LIST);
2076        if ("Location".equals(codeString))
2077          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.LOCATION);
2078        if ("Measure".equals(codeString))
2079          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEASURE);
2080        if ("MeasureReport".equals(codeString))
2081          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEASUREREPORT);
2082        if ("Media".equals(codeString))
2083          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDIA);
2084        if ("Medication".equals(codeString))
2085          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICATION);
2086        if ("MedicationAdministration".equals(codeString))
2087          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICATIONADMINISTRATION);
2088        if ("MedicationDispense".equals(codeString))
2089          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICATIONDISPENSE);
2090        if ("MedicationKnowledge".equals(codeString))
2091          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICATIONKNOWLEDGE);
2092        if ("MedicationRequest".equals(codeString))
2093          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICATIONREQUEST);
2094        if ("MedicationStatement".equals(codeString))
2095          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICATIONSTATEMENT);
2096        if ("MedicinalProduct".equals(codeString))
2097          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCT);
2098        if ("MedicinalProductAuthorization".equals(codeString))
2099          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTAUTHORIZATION);
2100        if ("MedicinalProductClinicals".equals(codeString))
2101          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTCLINICALS);
2102        if ("MedicinalProductContraindication".equals(codeString))
2103          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTCONTRAINDICATION);
2104        if ("MedicinalProductDeviceSpec".equals(codeString))
2105          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTDEVICESPEC);
2106        if ("MedicinalProductIndication".equals(codeString))
2107          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTINDICATION);
2108        if ("MedicinalProductIngredient".equals(codeString))
2109          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTINGREDIENT);
2110        if ("MedicinalProductInteraction".equals(codeString))
2111          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTINTERACTION);
2112        if ("MedicinalProductManufactured".equals(codeString))
2113          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTMANUFACTURED);
2114        if ("MedicinalProductPackaged".equals(codeString))
2115          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTPACKAGED);
2116        if ("MedicinalProductPharmaceutical".equals(codeString))
2117          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTPHARMACEUTICAL);
2118        if ("MedicinalProductUndesirableEffect".equals(codeString))
2119          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT);
2120        if ("MessageDefinition".equals(codeString))
2121          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MESSAGEDEFINITION);
2122        if ("MessageHeader".equals(codeString))
2123          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.MESSAGEHEADER);
2124        if ("NamingSystem".equals(codeString))
2125          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.NAMINGSYSTEM);
2126        if ("NutritionOrder".equals(codeString))
2127          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.NUTRITIONORDER);
2128        if ("Observation".equals(codeString))
2129          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.OBSERVATION);
2130        if ("ObservationDefinition".equals(codeString))
2131          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.OBSERVATIONDEFINITION);
2132        if ("OperationDefinition".equals(codeString))
2133          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.OPERATIONDEFINITION);
2134        if ("OperationOutcome".equals(codeString))
2135          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.OPERATIONOUTCOME);
2136        if ("Organization".equals(codeString))
2137          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ORGANIZATION);
2138        if ("OrganizationAffiliation".equals(codeString))
2139          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.ORGANIZATIONAFFILIATION);
2140        if ("Parameters".equals(codeString))
2141          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PARAMETERS);
2142        if ("Patient".equals(codeString))
2143          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PATIENT);
2144        if ("PaymentNotice".equals(codeString))
2145          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PAYMENTNOTICE);
2146        if ("PaymentReconciliation".equals(codeString))
2147          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PAYMENTRECONCILIATION);
2148        if ("Person".equals(codeString))
2149          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PERSON);
2150        if ("PlanDefinition".equals(codeString))
2151          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PLANDEFINITION);
2152        if ("Practitioner".equals(codeString))
2153          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PRACTITIONER);
2154        if ("PractitionerRole".equals(codeString))
2155          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PRACTITIONERROLE);
2156        if ("Procedure".equals(codeString))
2157          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PROCEDURE);
2158        if ("ProcessRequest".equals(codeString))
2159          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PROCESSREQUEST);
2160        if ("ProcessResponse".equals(codeString))
2161          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PROCESSRESPONSE);
2162        if ("Provenance".equals(codeString))
2163          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.PROVENANCE);
2164        if ("Questionnaire".equals(codeString))
2165          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.QUESTIONNAIRE);
2166        if ("QuestionnaireResponse".equals(codeString))
2167          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.QUESTIONNAIRERESPONSE);
2168        if ("RelatedPerson".equals(codeString))
2169          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.RELATEDPERSON);
2170        if ("RequestGroup".equals(codeString))
2171          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.REQUESTGROUP);
2172        if ("ResearchStudy".equals(codeString))
2173          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.RESEARCHSTUDY);
2174        if ("ResearchSubject".equals(codeString))
2175          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.RESEARCHSUBJECT);
2176        if ("Resource".equals(codeString))
2177          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.RESOURCE);
2178        if ("RiskAssessment".equals(codeString))
2179          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.RISKASSESSMENT);
2180        if ("Schedule".equals(codeString))
2181          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SCHEDULE);
2182        if ("SearchParameter".equals(codeString))
2183          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SEARCHPARAMETER);
2184        if ("Sequence".equals(codeString))
2185          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SEQUENCE);
2186        if ("ServiceRequest".equals(codeString))
2187          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SERVICEREQUEST);
2188        if ("Slot".equals(codeString))
2189          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SLOT);
2190        if ("Specimen".equals(codeString))
2191          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SPECIMEN);
2192        if ("SpecimenDefinition".equals(codeString))
2193          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SPECIMENDEFINITION);
2194        if ("StructureDefinition".equals(codeString))
2195          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.STRUCTUREDEFINITION);
2196        if ("StructureMap".equals(codeString))
2197          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.STRUCTUREMAP);
2198        if ("Subscription".equals(codeString))
2199          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUBSCRIPTION);
2200        if ("Substance".equals(codeString))
2201          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUBSTANCE);
2202        if ("SubstancePolymer".equals(codeString))
2203          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUBSTANCEPOLYMER);
2204        if ("SubstanceReferenceInformation".equals(codeString))
2205          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUBSTANCEREFERENCEINFORMATION);
2206        if ("SubstanceSpecification".equals(codeString))
2207          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUBSTANCESPECIFICATION);
2208        if ("SupplyDelivery".equals(codeString))
2209          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUPPLYDELIVERY);
2210        if ("SupplyRequest".equals(codeString))
2211          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.SUPPLYREQUEST);
2212        if ("Task".equals(codeString))
2213          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.TASK);
2214        if ("TerminologyCapabilities".equals(codeString))
2215          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.TERMINOLOGYCAPABILITIES);
2216        if ("TestReport".equals(codeString))
2217          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.TESTREPORT);
2218        if ("TestScript".equals(codeString))
2219          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.TESTSCRIPT);
2220        if ("UserSession".equals(codeString))
2221          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.USERSESSION);
2222        if ("ValueSet".equals(codeString))
2223          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.VALUESET);
2224        if ("VerificationResult".equals(codeString))
2225          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.VERIFICATIONRESULT);
2226        if ("VisionPrescription".equals(codeString))
2227          return new Enumeration<FHIRResourceType>(this, FHIRResourceType.VISIONPRESCRIPTION);
2228        throw new FHIRException("Unknown FHIRResourceType code '"+codeString+"'");
2229        }
2230    public String toCode(FHIRResourceType code) {
2231      if (code == FHIRResourceType.ACCOUNT)
2232        return "Account";
2233      if (code == FHIRResourceType.ACTIVITYDEFINITION)
2234        return "ActivityDefinition";
2235      if (code == FHIRResourceType.ADVERSEEVENT)
2236        return "AdverseEvent";
2237      if (code == FHIRResourceType.ALLERGYINTOLERANCE)
2238        return "AllergyIntolerance";
2239      if (code == FHIRResourceType.APPOINTMENT)
2240        return "Appointment";
2241      if (code == FHIRResourceType.APPOINTMENTRESPONSE)
2242        return "AppointmentResponse";
2243      if (code == FHIRResourceType.AUDITEVENT)
2244        return "AuditEvent";
2245      if (code == FHIRResourceType.BASIC)
2246        return "Basic";
2247      if (code == FHIRResourceType.BINARY)
2248        return "Binary";
2249      if (code == FHIRResourceType.BIOLOGICALLYDERIVEDPRODUCT)
2250        return "BiologicallyDerivedProduct";
2251      if (code == FHIRResourceType.BODYSTRUCTURE)
2252        return "BodyStructure";
2253      if (code == FHIRResourceType.BUNDLE)
2254        return "Bundle";
2255      if (code == FHIRResourceType.CAPABILITYSTATEMENT)
2256        return "CapabilityStatement";
2257      if (code == FHIRResourceType.CAREPLAN)
2258        return "CarePlan";
2259      if (code == FHIRResourceType.CARETEAM)
2260        return "CareTeam";
2261      if (code == FHIRResourceType.CATALOGENTRY)
2262        return "CatalogEntry";
2263      if (code == FHIRResourceType.CHARGEITEM)
2264        return "ChargeItem";
2265      if (code == FHIRResourceType.CHARGEITEMDEFINITION)
2266        return "ChargeItemDefinition";
2267      if (code == FHIRResourceType.CLAIM)
2268        return "Claim";
2269      if (code == FHIRResourceType.CLAIMRESPONSE)
2270        return "ClaimResponse";
2271      if (code == FHIRResourceType.CLINICALIMPRESSION)
2272        return "ClinicalImpression";
2273      if (code == FHIRResourceType.CODESYSTEM)
2274        return "CodeSystem";
2275      if (code == FHIRResourceType.COMMUNICATION)
2276        return "Communication";
2277      if (code == FHIRResourceType.COMMUNICATIONREQUEST)
2278        return "CommunicationRequest";
2279      if (code == FHIRResourceType.COMPARTMENTDEFINITION)
2280        return "CompartmentDefinition";
2281      if (code == FHIRResourceType.COMPOSITION)
2282        return "Composition";
2283      if (code == FHIRResourceType.CONCEPTMAP)
2284        return "ConceptMap";
2285      if (code == FHIRResourceType.CONDITION)
2286        return "Condition";
2287      if (code == FHIRResourceType.CONSENT)
2288        return "Consent";
2289      if (code == FHIRResourceType.CONTRACT)
2290        return "Contract";
2291      if (code == FHIRResourceType.COVERAGE)
2292        return "Coverage";
2293      if (code == FHIRResourceType.COVERAGEELIGIBILITYREQUEST)
2294        return "CoverageEligibilityRequest";
2295      if (code == FHIRResourceType.COVERAGEELIGIBILITYRESPONSE)
2296        return "CoverageEligibilityResponse";
2297      if (code == FHIRResourceType.DETECTEDISSUE)
2298        return "DetectedIssue";
2299      if (code == FHIRResourceType.DEVICE)
2300        return "Device";
2301      if (code == FHIRResourceType.DEVICEDEFINITION)
2302        return "DeviceDefinition";
2303      if (code == FHIRResourceType.DEVICEMETRIC)
2304        return "DeviceMetric";
2305      if (code == FHIRResourceType.DEVICEREQUEST)
2306        return "DeviceRequest";
2307      if (code == FHIRResourceType.DEVICEUSESTATEMENT)
2308        return "DeviceUseStatement";
2309      if (code == FHIRResourceType.DIAGNOSTICREPORT)
2310        return "DiagnosticReport";
2311      if (code == FHIRResourceType.DOCUMENTMANIFEST)
2312        return "DocumentManifest";
2313      if (code == FHIRResourceType.DOCUMENTREFERENCE)
2314        return "DocumentReference";
2315      if (code == FHIRResourceType.DOMAINRESOURCE)
2316        return "DomainResource";
2317      if (code == FHIRResourceType.ENCOUNTER)
2318        return "Encounter";
2319      if (code == FHIRResourceType.ENDPOINT)
2320        return "Endpoint";
2321      if (code == FHIRResourceType.ENROLLMENTREQUEST)
2322        return "EnrollmentRequest";
2323      if (code == FHIRResourceType.ENROLLMENTRESPONSE)
2324        return "EnrollmentResponse";
2325      if (code == FHIRResourceType.EPISODEOFCARE)
2326        return "EpisodeOfCare";
2327      if (code == FHIRResourceType.EVENTDEFINITION)
2328        return "EventDefinition";
2329      if (code == FHIRResourceType.EXAMPLESCENARIO)
2330        return "ExampleScenario";
2331      if (code == FHIRResourceType.EXPLANATIONOFBENEFIT)
2332        return "ExplanationOfBenefit";
2333      if (code == FHIRResourceType.FAMILYMEMBERHISTORY)
2334        return "FamilyMemberHistory";
2335      if (code == FHIRResourceType.FLAG)
2336        return "Flag";
2337      if (code == FHIRResourceType.GOAL)
2338        return "Goal";
2339      if (code == FHIRResourceType.GRAPHDEFINITION)
2340        return "GraphDefinition";
2341      if (code == FHIRResourceType.GROUP)
2342        return "Group";
2343      if (code == FHIRResourceType.GUIDANCERESPONSE)
2344        return "GuidanceResponse";
2345      if (code == FHIRResourceType.HEALTHCARESERVICE)
2346        return "HealthcareService";
2347      if (code == FHIRResourceType.IMAGINGSTUDY)
2348        return "ImagingStudy";
2349      if (code == FHIRResourceType.IMMUNIZATION)
2350        return "Immunization";
2351      if (code == FHIRResourceType.IMMUNIZATIONEVALUATION)
2352        return "ImmunizationEvaluation";
2353      if (code == FHIRResourceType.IMMUNIZATIONRECOMMENDATION)
2354        return "ImmunizationRecommendation";
2355      if (code == FHIRResourceType.IMPLEMENTATIONGUIDE)
2356        return "ImplementationGuide";
2357      if (code == FHIRResourceType.INSURANCEPLAN)
2358        return "InsurancePlan";
2359      if (code == FHIRResourceType.INVOICE)
2360        return "Invoice";
2361      if (code == FHIRResourceType.ITEMINSTANCE)
2362        return "ItemInstance";
2363      if (code == FHIRResourceType.LIBRARY)
2364        return "Library";
2365      if (code == FHIRResourceType.LINKAGE)
2366        return "Linkage";
2367      if (code == FHIRResourceType.LIST)
2368        return "List";
2369      if (code == FHIRResourceType.LOCATION)
2370        return "Location";
2371      if (code == FHIRResourceType.MEASURE)
2372        return "Measure";
2373      if (code == FHIRResourceType.MEASUREREPORT)
2374        return "MeasureReport";
2375      if (code == FHIRResourceType.MEDIA)
2376        return "Media";
2377      if (code == FHIRResourceType.MEDICATION)
2378        return "Medication";
2379      if (code == FHIRResourceType.MEDICATIONADMINISTRATION)
2380        return "MedicationAdministration";
2381      if (code == FHIRResourceType.MEDICATIONDISPENSE)
2382        return "MedicationDispense";
2383      if (code == FHIRResourceType.MEDICATIONKNOWLEDGE)
2384        return "MedicationKnowledge";
2385      if (code == FHIRResourceType.MEDICATIONREQUEST)
2386        return "MedicationRequest";
2387      if (code == FHIRResourceType.MEDICATIONSTATEMENT)
2388        return "MedicationStatement";
2389      if (code == FHIRResourceType.MEDICINALPRODUCT)
2390        return "MedicinalProduct";
2391      if (code == FHIRResourceType.MEDICINALPRODUCTAUTHORIZATION)
2392        return "MedicinalProductAuthorization";
2393      if (code == FHIRResourceType.MEDICINALPRODUCTCLINICALS)
2394        return "MedicinalProductClinicals";
2395      if (code == FHIRResourceType.MEDICINALPRODUCTCONTRAINDICATION)
2396        return "MedicinalProductContraindication";
2397      if (code == FHIRResourceType.MEDICINALPRODUCTDEVICESPEC)
2398        return "MedicinalProductDeviceSpec";
2399      if (code == FHIRResourceType.MEDICINALPRODUCTINDICATION)
2400        return "MedicinalProductIndication";
2401      if (code == FHIRResourceType.MEDICINALPRODUCTINGREDIENT)
2402        return "MedicinalProductIngredient";
2403      if (code == FHIRResourceType.MEDICINALPRODUCTINTERACTION)
2404        return "MedicinalProductInteraction";
2405      if (code == FHIRResourceType.MEDICINALPRODUCTMANUFACTURED)
2406        return "MedicinalProductManufactured";
2407      if (code == FHIRResourceType.MEDICINALPRODUCTPACKAGED)
2408        return "MedicinalProductPackaged";
2409      if (code == FHIRResourceType.MEDICINALPRODUCTPHARMACEUTICAL)
2410        return "MedicinalProductPharmaceutical";
2411      if (code == FHIRResourceType.MEDICINALPRODUCTUNDESIRABLEEFFECT)
2412        return "MedicinalProductUndesirableEffect";
2413      if (code == FHIRResourceType.MESSAGEDEFINITION)
2414        return "MessageDefinition";
2415      if (code == FHIRResourceType.MESSAGEHEADER)
2416        return "MessageHeader";
2417      if (code == FHIRResourceType.NAMINGSYSTEM)
2418        return "NamingSystem";
2419      if (code == FHIRResourceType.NUTRITIONORDER)
2420        return "NutritionOrder";
2421      if (code == FHIRResourceType.OBSERVATION)
2422        return "Observation";
2423      if (code == FHIRResourceType.OBSERVATIONDEFINITION)
2424        return "ObservationDefinition";
2425      if (code == FHIRResourceType.OPERATIONDEFINITION)
2426        return "OperationDefinition";
2427      if (code == FHIRResourceType.OPERATIONOUTCOME)
2428        return "OperationOutcome";
2429      if (code == FHIRResourceType.ORGANIZATION)
2430        return "Organization";
2431      if (code == FHIRResourceType.ORGANIZATIONAFFILIATION)
2432        return "OrganizationAffiliation";
2433      if (code == FHIRResourceType.PARAMETERS)
2434        return "Parameters";
2435      if (code == FHIRResourceType.PATIENT)
2436        return "Patient";
2437      if (code == FHIRResourceType.PAYMENTNOTICE)
2438        return "PaymentNotice";
2439      if (code == FHIRResourceType.PAYMENTRECONCILIATION)
2440        return "PaymentReconciliation";
2441      if (code == FHIRResourceType.PERSON)
2442        return "Person";
2443      if (code == FHIRResourceType.PLANDEFINITION)
2444        return "PlanDefinition";
2445      if (code == FHIRResourceType.PRACTITIONER)
2446        return "Practitioner";
2447      if (code == FHIRResourceType.PRACTITIONERROLE)
2448        return "PractitionerRole";
2449      if (code == FHIRResourceType.PROCEDURE)
2450        return "Procedure";
2451      if (code == FHIRResourceType.PROCESSREQUEST)
2452        return "ProcessRequest";
2453      if (code == FHIRResourceType.PROCESSRESPONSE)
2454        return "ProcessResponse";
2455      if (code == FHIRResourceType.PROVENANCE)
2456        return "Provenance";
2457      if (code == FHIRResourceType.QUESTIONNAIRE)
2458        return "Questionnaire";
2459      if (code == FHIRResourceType.QUESTIONNAIRERESPONSE)
2460        return "QuestionnaireResponse";
2461      if (code == FHIRResourceType.RELATEDPERSON)
2462        return "RelatedPerson";
2463      if (code == FHIRResourceType.REQUESTGROUP)
2464        return "RequestGroup";
2465      if (code == FHIRResourceType.RESEARCHSTUDY)
2466        return "ResearchStudy";
2467      if (code == FHIRResourceType.RESEARCHSUBJECT)
2468        return "ResearchSubject";
2469      if (code == FHIRResourceType.RESOURCE)
2470        return "Resource";
2471      if (code == FHIRResourceType.RISKASSESSMENT)
2472        return "RiskAssessment";
2473      if (code == FHIRResourceType.SCHEDULE)
2474        return "Schedule";
2475      if (code == FHIRResourceType.SEARCHPARAMETER)
2476        return "SearchParameter";
2477      if (code == FHIRResourceType.SEQUENCE)
2478        return "Sequence";
2479      if (code == FHIRResourceType.SERVICEREQUEST)
2480        return "ServiceRequest";
2481      if (code == FHIRResourceType.SLOT)
2482        return "Slot";
2483      if (code == FHIRResourceType.SPECIMEN)
2484        return "Specimen";
2485      if (code == FHIRResourceType.SPECIMENDEFINITION)
2486        return "SpecimenDefinition";
2487      if (code == FHIRResourceType.STRUCTUREDEFINITION)
2488        return "StructureDefinition";
2489      if (code == FHIRResourceType.STRUCTUREMAP)
2490        return "StructureMap";
2491      if (code == FHIRResourceType.SUBSCRIPTION)
2492        return "Subscription";
2493      if (code == FHIRResourceType.SUBSTANCE)
2494        return "Substance";
2495      if (code == FHIRResourceType.SUBSTANCEPOLYMER)
2496        return "SubstancePolymer";
2497      if (code == FHIRResourceType.SUBSTANCEREFERENCEINFORMATION)
2498        return "SubstanceReferenceInformation";
2499      if (code == FHIRResourceType.SUBSTANCESPECIFICATION)
2500        return "SubstanceSpecification";
2501      if (code == FHIRResourceType.SUPPLYDELIVERY)
2502        return "SupplyDelivery";
2503      if (code == FHIRResourceType.SUPPLYREQUEST)
2504        return "SupplyRequest";
2505      if (code == FHIRResourceType.TASK)
2506        return "Task";
2507      if (code == FHIRResourceType.TERMINOLOGYCAPABILITIES)
2508        return "TerminologyCapabilities";
2509      if (code == FHIRResourceType.TESTREPORT)
2510        return "TestReport";
2511      if (code == FHIRResourceType.TESTSCRIPT)
2512        return "TestScript";
2513      if (code == FHIRResourceType.USERSESSION)
2514        return "UserSession";
2515      if (code == FHIRResourceType.VALUESET)
2516        return "ValueSet";
2517      if (code == FHIRResourceType.VERIFICATIONRESULT)
2518        return "VerificationResult";
2519      if (code == FHIRResourceType.VISIONPRESCRIPTION)
2520        return "VisionPrescription";
2521      return "?";
2522      }
2523    public String toSystem(FHIRResourceType code) {
2524      return code.getSystem();
2525      }
2526    }
2527
2528    @Block()
2529    public static class ExampleScenarioActorComponent extends BackboneElement implements IBaseBackboneElement {
2530        /**
2531         * ID or acronym of actor.
2532         */
2533        @Child(name = "actorId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2534        @Description(shortDefinition="ID or acronym of the actor", formalDefinition="ID or acronym of actor." )
2535        protected StringType actorId;
2536
2537        /**
2538         * The type of actor - person or system.
2539         */
2540        @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2541        @Description(shortDefinition="person | entity", formalDefinition="The type of actor - person or system." )
2542        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/examplescenario-actor-type")
2543        protected Enumeration<ExampleScenarioActorType> type;
2544
2545        /**
2546         * The name of the actor as shown in the page.
2547         */
2548        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2549        @Description(shortDefinition="The name of the actor as shown in the page", formalDefinition="The name of the actor as shown in the page." )
2550        protected StringType name;
2551
2552        /**
2553         * The description of the actor.
2554         */
2555        @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2556        @Description(shortDefinition="The description of the actor", formalDefinition="The description of the actor." )
2557        protected MarkdownType description;
2558
2559        private static final long serialVersionUID = 1348364162L;
2560
2561    /**
2562     * Constructor
2563     */
2564      public ExampleScenarioActorComponent() {
2565        super();
2566      }
2567
2568    /**
2569     * Constructor
2570     */
2571      public ExampleScenarioActorComponent(StringType actorId, Enumeration<ExampleScenarioActorType> type) {
2572        super();
2573        this.actorId = actorId;
2574        this.type = type;
2575      }
2576
2577        /**
2578         * @return {@link #actorId} (ID or acronym of actor.). This is the underlying object with id, value and extensions. The accessor "getActorId" gives direct access to the value
2579         */
2580        public StringType getActorIdElement() { 
2581          if (this.actorId == null)
2582            if (Configuration.errorOnAutoCreate())
2583              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.actorId");
2584            else if (Configuration.doAutoCreate())
2585              this.actorId = new StringType(); // bb
2586          return this.actorId;
2587        }
2588
2589        public boolean hasActorIdElement() { 
2590          return this.actorId != null && !this.actorId.isEmpty();
2591        }
2592
2593        public boolean hasActorId() { 
2594          return this.actorId != null && !this.actorId.isEmpty();
2595        }
2596
2597        /**
2598         * @param value {@link #actorId} (ID or acronym of actor.). This is the underlying object with id, value and extensions. The accessor "getActorId" gives direct access to the value
2599         */
2600        public ExampleScenarioActorComponent setActorIdElement(StringType value) { 
2601          this.actorId = value;
2602          return this;
2603        }
2604
2605        /**
2606         * @return ID or acronym of actor.
2607         */
2608        public String getActorId() { 
2609          return this.actorId == null ? null : this.actorId.getValue();
2610        }
2611
2612        /**
2613         * @param value ID or acronym of actor.
2614         */
2615        public ExampleScenarioActorComponent setActorId(String value) { 
2616            if (this.actorId == null)
2617              this.actorId = new StringType();
2618            this.actorId.setValue(value);
2619          return this;
2620        }
2621
2622        /**
2623         * @return {@link #type} (The type of actor - person or system.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2624         */
2625        public Enumeration<ExampleScenarioActorType> getTypeElement() { 
2626          if (this.type == null)
2627            if (Configuration.errorOnAutoCreate())
2628              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.type");
2629            else if (Configuration.doAutoCreate())
2630              this.type = new Enumeration<ExampleScenarioActorType>(new ExampleScenarioActorTypeEnumFactory()); // bb
2631          return this.type;
2632        }
2633
2634        public boolean hasTypeElement() { 
2635          return this.type != null && !this.type.isEmpty();
2636        }
2637
2638        public boolean hasType() { 
2639          return this.type != null && !this.type.isEmpty();
2640        }
2641
2642        /**
2643         * @param value {@link #type} (The type of actor - person or system.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2644         */
2645        public ExampleScenarioActorComponent setTypeElement(Enumeration<ExampleScenarioActorType> value) { 
2646          this.type = value;
2647          return this;
2648        }
2649
2650        /**
2651         * @return The type of actor - person or system.
2652         */
2653        public ExampleScenarioActorType getType() { 
2654          return this.type == null ? null : this.type.getValue();
2655        }
2656
2657        /**
2658         * @param value The type of actor - person or system.
2659         */
2660        public ExampleScenarioActorComponent setType(ExampleScenarioActorType value) { 
2661            if (this.type == null)
2662              this.type = new Enumeration<ExampleScenarioActorType>(new ExampleScenarioActorTypeEnumFactory());
2663            this.type.setValue(value);
2664          return this;
2665        }
2666
2667        /**
2668         * @return {@link #name} (The name of the actor as shown in the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2669         */
2670        public StringType getNameElement() { 
2671          if (this.name == null)
2672            if (Configuration.errorOnAutoCreate())
2673              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.name");
2674            else if (Configuration.doAutoCreate())
2675              this.name = new StringType(); // bb
2676          return this.name;
2677        }
2678
2679        public boolean hasNameElement() { 
2680          return this.name != null && !this.name.isEmpty();
2681        }
2682
2683        public boolean hasName() { 
2684          return this.name != null && !this.name.isEmpty();
2685        }
2686
2687        /**
2688         * @param value {@link #name} (The name of the actor as shown in the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2689         */
2690        public ExampleScenarioActorComponent setNameElement(StringType value) { 
2691          this.name = value;
2692          return this;
2693        }
2694
2695        /**
2696         * @return The name of the actor as shown in the page.
2697         */
2698        public String getName() { 
2699          return this.name == null ? null : this.name.getValue();
2700        }
2701
2702        /**
2703         * @param value The name of the actor as shown in the page.
2704         */
2705        public ExampleScenarioActorComponent setName(String value) { 
2706          if (Utilities.noString(value))
2707            this.name = null;
2708          else {
2709            if (this.name == null)
2710              this.name = new StringType();
2711            this.name.setValue(value);
2712          }
2713          return this;
2714        }
2715
2716        /**
2717         * @return {@link #description} (The description of the actor.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2718         */
2719        public MarkdownType getDescriptionElement() { 
2720          if (this.description == null)
2721            if (Configuration.errorOnAutoCreate())
2722              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.description");
2723            else if (Configuration.doAutoCreate())
2724              this.description = new MarkdownType(); // bb
2725          return this.description;
2726        }
2727
2728        public boolean hasDescriptionElement() { 
2729          return this.description != null && !this.description.isEmpty();
2730        }
2731
2732        public boolean hasDescription() { 
2733          return this.description != null && !this.description.isEmpty();
2734        }
2735
2736        /**
2737         * @param value {@link #description} (The description of the actor.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2738         */
2739        public ExampleScenarioActorComponent setDescriptionElement(MarkdownType value) { 
2740          this.description = value;
2741          return this;
2742        }
2743
2744        /**
2745         * @return The description of the actor.
2746         */
2747        public String getDescription() { 
2748          return this.description == null ? null : this.description.getValue();
2749        }
2750
2751        /**
2752         * @param value The description of the actor.
2753         */
2754        public ExampleScenarioActorComponent setDescription(String value) { 
2755          if (value == null)
2756            this.description = null;
2757          else {
2758            if (this.description == null)
2759              this.description = new MarkdownType();
2760            this.description.setValue(value);
2761          }
2762          return this;
2763        }
2764
2765        protected void listChildren(List<Property> children) {
2766          super.listChildren(children);
2767          children.add(new Property("actorId", "string", "ID or acronym of actor.", 0, 1, actorId));
2768          children.add(new Property("type", "code", "The type of actor - person or system.", 0, 1, type));
2769          children.add(new Property("name", "string", "The name of the actor as shown in the page.", 0, 1, name));
2770          children.add(new Property("description", "markdown", "The description of the actor.", 0, 1, description));
2771        }
2772
2773        @Override
2774        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2775          switch (_hash) {
2776          case -1161623056: /*actorId*/  return new Property("actorId", "string", "ID or acronym of actor.", 0, 1, actorId);
2777          case 3575610: /*type*/  return new Property("type", "code", "The type of actor - person or system.", 0, 1, type);
2778          case 3373707: /*name*/  return new Property("name", "string", "The name of the actor as shown in the page.", 0, 1, name);
2779          case -1724546052: /*description*/  return new Property("description", "markdown", "The description of the actor.", 0, 1, description);
2780          default: return super.getNamedProperty(_hash, _name, _checkValid);
2781          }
2782
2783        }
2784
2785      @Override
2786      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2787        switch (hash) {
2788        case -1161623056: /*actorId*/ return this.actorId == null ? new Base[0] : new Base[] {this.actorId}; // StringType
2789        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ExampleScenarioActorType>
2790        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2791        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2792        default: return super.getProperty(hash, name, checkValid);
2793        }
2794
2795      }
2796
2797      @Override
2798      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2799        switch (hash) {
2800        case -1161623056: // actorId
2801          this.actorId = castToString(value); // StringType
2802          return value;
2803        case 3575610: // type
2804          value = new ExampleScenarioActorTypeEnumFactory().fromType(castToCode(value));
2805          this.type = (Enumeration) value; // Enumeration<ExampleScenarioActorType>
2806          return value;
2807        case 3373707: // name
2808          this.name = castToString(value); // StringType
2809          return value;
2810        case -1724546052: // description
2811          this.description = castToMarkdown(value); // MarkdownType
2812          return value;
2813        default: return super.setProperty(hash, name, value);
2814        }
2815
2816      }
2817
2818      @Override
2819      public Base setProperty(String name, Base value) throws FHIRException {
2820        if (name.equals("actorId")) {
2821          this.actorId = castToString(value); // StringType
2822        } else if (name.equals("type")) {
2823          value = new ExampleScenarioActorTypeEnumFactory().fromType(castToCode(value));
2824          this.type = (Enumeration) value; // Enumeration<ExampleScenarioActorType>
2825        } else if (name.equals("name")) {
2826          this.name = castToString(value); // StringType
2827        } else if (name.equals("description")) {
2828          this.description = castToMarkdown(value); // MarkdownType
2829        } else
2830          return super.setProperty(name, value);
2831        return value;
2832      }
2833
2834      @Override
2835      public Base makeProperty(int hash, String name) throws FHIRException {
2836        switch (hash) {
2837        case -1161623056:  return getActorIdElement();
2838        case 3575610:  return getTypeElement();
2839        case 3373707:  return getNameElement();
2840        case -1724546052:  return getDescriptionElement();
2841        default: return super.makeProperty(hash, name);
2842        }
2843
2844      }
2845
2846      @Override
2847      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2848        switch (hash) {
2849        case -1161623056: /*actorId*/ return new String[] {"string"};
2850        case 3575610: /*type*/ return new String[] {"code"};
2851        case 3373707: /*name*/ return new String[] {"string"};
2852        case -1724546052: /*description*/ return new String[] {"markdown"};
2853        default: return super.getTypesForProperty(hash, name);
2854        }
2855
2856      }
2857
2858      @Override
2859      public Base addChild(String name) throws FHIRException {
2860        if (name.equals("actorId")) {
2861          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.actorId");
2862        }
2863        else if (name.equals("type")) {
2864          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.type");
2865        }
2866        else if (name.equals("name")) {
2867          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name");
2868        }
2869        else if (name.equals("description")) {
2870          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description");
2871        }
2872        else
2873          return super.addChild(name);
2874      }
2875
2876      public ExampleScenarioActorComponent copy() {
2877        ExampleScenarioActorComponent dst = new ExampleScenarioActorComponent();
2878        copyValues(dst);
2879        dst.actorId = actorId == null ? null : actorId.copy();
2880        dst.type = type == null ? null : type.copy();
2881        dst.name = name == null ? null : name.copy();
2882        dst.description = description == null ? null : description.copy();
2883        return dst;
2884      }
2885
2886      @Override
2887      public boolean equalsDeep(Base other_) {
2888        if (!super.equalsDeep(other_))
2889          return false;
2890        if (!(other_ instanceof ExampleScenarioActorComponent))
2891          return false;
2892        ExampleScenarioActorComponent o = (ExampleScenarioActorComponent) other_;
2893        return compareDeep(actorId, o.actorId, true) && compareDeep(type, o.type, true) && compareDeep(name, o.name, true)
2894           && compareDeep(description, o.description, true);
2895      }
2896
2897      @Override
2898      public boolean equalsShallow(Base other_) {
2899        if (!super.equalsShallow(other_))
2900          return false;
2901        if (!(other_ instanceof ExampleScenarioActorComponent))
2902          return false;
2903        ExampleScenarioActorComponent o = (ExampleScenarioActorComponent) other_;
2904        return compareValues(actorId, o.actorId, true) && compareValues(type, o.type, true) && compareValues(name, o.name, true)
2905           && compareValues(description, o.description, true);
2906      }
2907
2908      public boolean isEmpty() {
2909        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actorId, type, name, description
2910          );
2911      }
2912
2913  public String fhirType() {
2914    return "ExampleScenario.actor";
2915
2916  }
2917
2918  }
2919
2920    @Block()
2921    public static class ExampleScenarioInstanceComponent extends BackboneElement implements IBaseBackboneElement {
2922        /**
2923         * The id of the resource for referencing.
2924         */
2925        @Child(name = "resourceId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2926        @Description(shortDefinition="The id of the resource for referencing", formalDefinition="The id of the resource for referencing." )
2927        protected StringType resourceId;
2928
2929        /**
2930         * The type of the resource.
2931         */
2932        @Child(name = "resourceType", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2933        @Description(shortDefinition="The type of the resource", formalDefinition="The type of the resource." )
2934        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
2935        protected Enumeration<FHIRResourceType> resourceType;
2936
2937        /**
2938         * A short name for the resource instance.
2939         */
2940        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2941        @Description(shortDefinition="A short name for the resource instance", formalDefinition="A short name for the resource instance." )
2942        protected StringType name;
2943
2944        /**
2945         * Human-friendly description of the resource instance.
2946         */
2947        @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2948        @Description(shortDefinition="Human-friendly description of the resource instance", formalDefinition="Human-friendly description of the resource instance." )
2949        protected MarkdownType description;
2950
2951        /**
2952         * A specific version of the resource.
2953         */
2954        @Child(name = "version", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2955        @Description(shortDefinition="A specific version of the resource", formalDefinition="A specific version of the resource." )
2956        protected List<ExampleScenarioInstanceVersionComponent> version;
2957
2958        /**
2959         * Resources contained in the instance (e.g. the observations contained in a bundle).
2960         */
2961        @Child(name = "containedInstance", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2962        @Description(shortDefinition="Resources contained in the instance", formalDefinition="Resources contained in the instance (e.g. the observations contained in a bundle)." )
2963        protected List<ExampleScenarioInstanceContainedInstanceComponent> containedInstance;
2964
2965        private static final long serialVersionUID = -1131860669L;
2966
2967    /**
2968     * Constructor
2969     */
2970      public ExampleScenarioInstanceComponent() {
2971        super();
2972      }
2973
2974    /**
2975     * Constructor
2976     */
2977      public ExampleScenarioInstanceComponent(StringType resourceId, Enumeration<FHIRResourceType> resourceType) {
2978        super();
2979        this.resourceId = resourceId;
2980        this.resourceType = resourceType;
2981      }
2982
2983        /**
2984         * @return {@link #resourceId} (The id of the resource for referencing.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
2985         */
2986        public StringType getResourceIdElement() { 
2987          if (this.resourceId == null)
2988            if (Configuration.errorOnAutoCreate())
2989              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.resourceId");
2990            else if (Configuration.doAutoCreate())
2991              this.resourceId = new StringType(); // bb
2992          return this.resourceId;
2993        }
2994
2995        public boolean hasResourceIdElement() { 
2996          return this.resourceId != null && !this.resourceId.isEmpty();
2997        }
2998
2999        public boolean hasResourceId() { 
3000          return this.resourceId != null && !this.resourceId.isEmpty();
3001        }
3002
3003        /**
3004         * @param value {@link #resourceId} (The id of the resource for referencing.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
3005         */
3006        public ExampleScenarioInstanceComponent setResourceIdElement(StringType value) { 
3007          this.resourceId = value;
3008          return this;
3009        }
3010
3011        /**
3012         * @return The id of the resource for referencing.
3013         */
3014        public String getResourceId() { 
3015          return this.resourceId == null ? null : this.resourceId.getValue();
3016        }
3017
3018        /**
3019         * @param value The id of the resource for referencing.
3020         */
3021        public ExampleScenarioInstanceComponent setResourceId(String value) { 
3022            if (this.resourceId == null)
3023              this.resourceId = new StringType();
3024            this.resourceId.setValue(value);
3025          return this;
3026        }
3027
3028        /**
3029         * @return {@link #resourceType} (The type of the resource.). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value
3030         */
3031        public Enumeration<FHIRResourceType> getResourceTypeElement() { 
3032          if (this.resourceType == null)
3033            if (Configuration.errorOnAutoCreate())
3034              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.resourceType");
3035            else if (Configuration.doAutoCreate())
3036              this.resourceType = new Enumeration<FHIRResourceType>(new FHIRResourceTypeEnumFactory()); // bb
3037          return this.resourceType;
3038        }
3039
3040        public boolean hasResourceTypeElement() { 
3041          return this.resourceType != null && !this.resourceType.isEmpty();
3042        }
3043
3044        public boolean hasResourceType() { 
3045          return this.resourceType != null && !this.resourceType.isEmpty();
3046        }
3047
3048        /**
3049         * @param value {@link #resourceType} (The type of the resource.). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value
3050         */
3051        public ExampleScenarioInstanceComponent setResourceTypeElement(Enumeration<FHIRResourceType> value) { 
3052          this.resourceType = value;
3053          return this;
3054        }
3055
3056        /**
3057         * @return The type of the resource.
3058         */
3059        public FHIRResourceType getResourceType() { 
3060          return this.resourceType == null ? null : this.resourceType.getValue();
3061        }
3062
3063        /**
3064         * @param value The type of the resource.
3065         */
3066        public ExampleScenarioInstanceComponent setResourceType(FHIRResourceType value) { 
3067            if (this.resourceType == null)
3068              this.resourceType = new Enumeration<FHIRResourceType>(new FHIRResourceTypeEnumFactory());
3069            this.resourceType.setValue(value);
3070          return this;
3071        }
3072
3073        /**
3074         * @return {@link #name} (A short name for the resource instance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3075         */
3076        public StringType getNameElement() { 
3077          if (this.name == null)
3078            if (Configuration.errorOnAutoCreate())
3079              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.name");
3080            else if (Configuration.doAutoCreate())
3081              this.name = new StringType(); // bb
3082          return this.name;
3083        }
3084
3085        public boolean hasNameElement() { 
3086          return this.name != null && !this.name.isEmpty();
3087        }
3088
3089        public boolean hasName() { 
3090          return this.name != null && !this.name.isEmpty();
3091        }
3092
3093        /**
3094         * @param value {@link #name} (A short name for the resource instance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3095         */
3096        public ExampleScenarioInstanceComponent setNameElement(StringType value) { 
3097          this.name = value;
3098          return this;
3099        }
3100
3101        /**
3102         * @return A short name for the resource instance.
3103         */
3104        public String getName() { 
3105          return this.name == null ? null : this.name.getValue();
3106        }
3107
3108        /**
3109         * @param value A short name for the resource instance.
3110         */
3111        public ExampleScenarioInstanceComponent setName(String value) { 
3112          if (Utilities.noString(value))
3113            this.name = null;
3114          else {
3115            if (this.name == null)
3116              this.name = new StringType();
3117            this.name.setValue(value);
3118          }
3119          return this;
3120        }
3121
3122        /**
3123         * @return {@link #description} (Human-friendly description of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3124         */
3125        public MarkdownType getDescriptionElement() { 
3126          if (this.description == null)
3127            if (Configuration.errorOnAutoCreate())
3128              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.description");
3129            else if (Configuration.doAutoCreate())
3130              this.description = new MarkdownType(); // bb
3131          return this.description;
3132        }
3133
3134        public boolean hasDescriptionElement() { 
3135          return this.description != null && !this.description.isEmpty();
3136        }
3137
3138        public boolean hasDescription() { 
3139          return this.description != null && !this.description.isEmpty();
3140        }
3141
3142        /**
3143         * @param value {@link #description} (Human-friendly description of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3144         */
3145        public ExampleScenarioInstanceComponent setDescriptionElement(MarkdownType value) { 
3146          this.description = value;
3147          return this;
3148        }
3149
3150        /**
3151         * @return Human-friendly description of the resource instance.
3152         */
3153        public String getDescription() { 
3154          return this.description == null ? null : this.description.getValue();
3155        }
3156
3157        /**
3158         * @param value Human-friendly description of the resource instance.
3159         */
3160        public ExampleScenarioInstanceComponent setDescription(String value) { 
3161          if (value == null)
3162            this.description = null;
3163          else {
3164            if (this.description == null)
3165              this.description = new MarkdownType();
3166            this.description.setValue(value);
3167          }
3168          return this;
3169        }
3170
3171        /**
3172         * @return {@link #version} (A specific version of the resource.)
3173         */
3174        public List<ExampleScenarioInstanceVersionComponent> getVersion() { 
3175          if (this.version == null)
3176            this.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
3177          return this.version;
3178        }
3179
3180        /**
3181         * @return Returns a reference to <code>this</code> for easy method chaining
3182         */
3183        public ExampleScenarioInstanceComponent setVersion(List<ExampleScenarioInstanceVersionComponent> theVersion) { 
3184          this.version = theVersion;
3185          return this;
3186        }
3187
3188        public boolean hasVersion() { 
3189          if (this.version == null)
3190            return false;
3191          for (ExampleScenarioInstanceVersionComponent item : this.version)
3192            if (!item.isEmpty())
3193              return true;
3194          return false;
3195        }
3196
3197        public ExampleScenarioInstanceVersionComponent addVersion() { //3
3198          ExampleScenarioInstanceVersionComponent t = new ExampleScenarioInstanceVersionComponent();
3199          if (this.version == null)
3200            this.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
3201          this.version.add(t);
3202          return t;
3203        }
3204
3205        public ExampleScenarioInstanceComponent addVersion(ExampleScenarioInstanceVersionComponent t) { //3
3206          if (t == null)
3207            return this;
3208          if (this.version == null)
3209            this.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
3210          this.version.add(t);
3211          return this;
3212        }
3213
3214        /**
3215         * @return The first repetition of repeating field {@link #version}, creating it if it does not already exist
3216         */
3217        public ExampleScenarioInstanceVersionComponent getVersionFirstRep() { 
3218          if (getVersion().isEmpty()) {
3219            addVersion();
3220          }
3221          return getVersion().get(0);
3222        }
3223
3224        /**
3225         * @return {@link #containedInstance} (Resources contained in the instance (e.g. the observations contained in a bundle).)
3226         */
3227        public List<ExampleScenarioInstanceContainedInstanceComponent> getContainedInstance() { 
3228          if (this.containedInstance == null)
3229            this.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
3230          return this.containedInstance;
3231        }
3232
3233        /**
3234         * @return Returns a reference to <code>this</code> for easy method chaining
3235         */
3236        public ExampleScenarioInstanceComponent setContainedInstance(List<ExampleScenarioInstanceContainedInstanceComponent> theContainedInstance) { 
3237          this.containedInstance = theContainedInstance;
3238          return this;
3239        }
3240
3241        public boolean hasContainedInstance() { 
3242          if (this.containedInstance == null)
3243            return false;
3244          for (ExampleScenarioInstanceContainedInstanceComponent item : this.containedInstance)
3245            if (!item.isEmpty())
3246              return true;
3247          return false;
3248        }
3249
3250        public ExampleScenarioInstanceContainedInstanceComponent addContainedInstance() { //3
3251          ExampleScenarioInstanceContainedInstanceComponent t = new ExampleScenarioInstanceContainedInstanceComponent();
3252          if (this.containedInstance == null)
3253            this.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
3254          this.containedInstance.add(t);
3255          return t;
3256        }
3257
3258        public ExampleScenarioInstanceComponent addContainedInstance(ExampleScenarioInstanceContainedInstanceComponent t) { //3
3259          if (t == null)
3260            return this;
3261          if (this.containedInstance == null)
3262            this.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
3263          this.containedInstance.add(t);
3264          return this;
3265        }
3266
3267        /**
3268         * @return The first repetition of repeating field {@link #containedInstance}, creating it if it does not already exist
3269         */
3270        public ExampleScenarioInstanceContainedInstanceComponent getContainedInstanceFirstRep() { 
3271          if (getContainedInstance().isEmpty()) {
3272            addContainedInstance();
3273          }
3274          return getContainedInstance().get(0);
3275        }
3276
3277        protected void listChildren(List<Property> children) {
3278          super.listChildren(children);
3279          children.add(new Property("resourceId", "string", "The id of the resource for referencing.", 0, 1, resourceId));
3280          children.add(new Property("resourceType", "code", "The type of the resource.", 0, 1, resourceType));
3281          children.add(new Property("name", "string", "A short name for the resource instance.", 0, 1, name));
3282          children.add(new Property("description", "markdown", "Human-friendly description of the resource instance.", 0, 1, description));
3283          children.add(new Property("version", "", "A specific version of the resource.", 0, java.lang.Integer.MAX_VALUE, version));
3284          children.add(new Property("containedInstance", "", "Resources contained in the instance (e.g. the observations contained in a bundle).", 0, java.lang.Integer.MAX_VALUE, containedInstance));
3285        }
3286
3287        @Override
3288        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3289          switch (_hash) {
3290          case -1345650231: /*resourceId*/  return new Property("resourceId", "string", "The id of the resource for referencing.", 0, 1, resourceId);
3291          case -384364440: /*resourceType*/  return new Property("resourceType", "code", "The type of the resource.", 0, 1, resourceType);
3292          case 3373707: /*name*/  return new Property("name", "string", "A short name for the resource instance.", 0, 1, name);
3293          case -1724546052: /*description*/  return new Property("description", "markdown", "Human-friendly description of the resource instance.", 0, 1, description);
3294          case 351608024: /*version*/  return new Property("version", "", "A specific version of the resource.", 0, java.lang.Integer.MAX_VALUE, version);
3295          case -417062360: /*containedInstance*/  return new Property("containedInstance", "", "Resources contained in the instance (e.g. the observations contained in a bundle).", 0, java.lang.Integer.MAX_VALUE, containedInstance);
3296          default: return super.getNamedProperty(_hash, _name, _checkValid);
3297          }
3298
3299        }
3300
3301      @Override
3302      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3303        switch (hash) {
3304        case -1345650231: /*resourceId*/ return this.resourceId == null ? new Base[0] : new Base[] {this.resourceId}; // StringType
3305        case -384364440: /*resourceType*/ return this.resourceType == null ? new Base[0] : new Base[] {this.resourceType}; // Enumeration<FHIRResourceType>
3306        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3307        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3308        case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // ExampleScenarioInstanceVersionComponent
3309        case -417062360: /*containedInstance*/ return this.containedInstance == null ? new Base[0] : this.containedInstance.toArray(new Base[this.containedInstance.size()]); // ExampleScenarioInstanceContainedInstanceComponent
3310        default: return super.getProperty(hash, name, checkValid);
3311        }
3312
3313      }
3314
3315      @Override
3316      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3317        switch (hash) {
3318        case -1345650231: // resourceId
3319          this.resourceId = castToString(value); // StringType
3320          return value;
3321        case -384364440: // resourceType
3322          value = new FHIRResourceTypeEnumFactory().fromType(castToCode(value));
3323          this.resourceType = (Enumeration) value; // Enumeration<FHIRResourceType>
3324          return value;
3325        case 3373707: // name
3326          this.name = castToString(value); // StringType
3327          return value;
3328        case -1724546052: // description
3329          this.description = castToMarkdown(value); // MarkdownType
3330          return value;
3331        case 351608024: // version
3332          this.getVersion().add((ExampleScenarioInstanceVersionComponent) value); // ExampleScenarioInstanceVersionComponent
3333          return value;
3334        case -417062360: // containedInstance
3335          this.getContainedInstance().add((ExampleScenarioInstanceContainedInstanceComponent) value); // ExampleScenarioInstanceContainedInstanceComponent
3336          return value;
3337        default: return super.setProperty(hash, name, value);
3338        }
3339
3340      }
3341
3342      @Override
3343      public Base setProperty(String name, Base value) throws FHIRException {
3344        if (name.equals("resourceId")) {
3345          this.resourceId = castToString(value); // StringType
3346        } else if (name.equals("resourceType")) {
3347          value = new FHIRResourceTypeEnumFactory().fromType(castToCode(value));
3348          this.resourceType = (Enumeration) value; // Enumeration<FHIRResourceType>
3349        } else if (name.equals("name")) {
3350          this.name = castToString(value); // StringType
3351        } else if (name.equals("description")) {
3352          this.description = castToMarkdown(value); // MarkdownType
3353        } else if (name.equals("version")) {
3354          this.getVersion().add((ExampleScenarioInstanceVersionComponent) value);
3355        } else if (name.equals("containedInstance")) {
3356          this.getContainedInstance().add((ExampleScenarioInstanceContainedInstanceComponent) value);
3357        } else
3358          return super.setProperty(name, value);
3359        return value;
3360      }
3361
3362      @Override
3363      public Base makeProperty(int hash, String name) throws FHIRException {
3364        switch (hash) {
3365        case -1345650231:  return getResourceIdElement();
3366        case -384364440:  return getResourceTypeElement();
3367        case 3373707:  return getNameElement();
3368        case -1724546052:  return getDescriptionElement();
3369        case 351608024:  return addVersion(); 
3370        case -417062360:  return addContainedInstance(); 
3371        default: return super.makeProperty(hash, name);
3372        }
3373
3374      }
3375
3376      @Override
3377      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3378        switch (hash) {
3379        case -1345650231: /*resourceId*/ return new String[] {"string"};
3380        case -384364440: /*resourceType*/ return new String[] {"code"};
3381        case 3373707: /*name*/ return new String[] {"string"};
3382        case -1724546052: /*description*/ return new String[] {"markdown"};
3383        case 351608024: /*version*/ return new String[] {};
3384        case -417062360: /*containedInstance*/ return new String[] {};
3385        default: return super.getTypesForProperty(hash, name);
3386        }
3387
3388      }
3389
3390      @Override
3391      public Base addChild(String name) throws FHIRException {
3392        if (name.equals("resourceId")) {
3393          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.resourceId");
3394        }
3395        else if (name.equals("resourceType")) {
3396          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.resourceType");
3397        }
3398        else if (name.equals("name")) {
3399          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name");
3400        }
3401        else if (name.equals("description")) {
3402          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description");
3403        }
3404        else if (name.equals("version")) {
3405          return addVersion();
3406        }
3407        else if (name.equals("containedInstance")) {
3408          return addContainedInstance();
3409        }
3410        else
3411          return super.addChild(name);
3412      }
3413
3414      public ExampleScenarioInstanceComponent copy() {
3415        ExampleScenarioInstanceComponent dst = new ExampleScenarioInstanceComponent();
3416        copyValues(dst);
3417        dst.resourceId = resourceId == null ? null : resourceId.copy();
3418        dst.resourceType = resourceType == null ? null : resourceType.copy();
3419        dst.name = name == null ? null : name.copy();
3420        dst.description = description == null ? null : description.copy();
3421        if (version != null) {
3422          dst.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
3423          for (ExampleScenarioInstanceVersionComponent i : version)
3424            dst.version.add(i.copy());
3425        };
3426        if (containedInstance != null) {
3427          dst.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
3428          for (ExampleScenarioInstanceContainedInstanceComponent i : containedInstance)
3429            dst.containedInstance.add(i.copy());
3430        };
3431        return dst;
3432      }
3433
3434      @Override
3435      public boolean equalsDeep(Base other_) {
3436        if (!super.equalsDeep(other_))
3437          return false;
3438        if (!(other_ instanceof ExampleScenarioInstanceComponent))
3439          return false;
3440        ExampleScenarioInstanceComponent o = (ExampleScenarioInstanceComponent) other_;
3441        return compareDeep(resourceId, o.resourceId, true) && compareDeep(resourceType, o.resourceType, true)
3442           && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(version, o.version, true)
3443           && compareDeep(containedInstance, o.containedInstance, true);
3444      }
3445
3446      @Override
3447      public boolean equalsShallow(Base other_) {
3448        if (!super.equalsShallow(other_))
3449          return false;
3450        if (!(other_ instanceof ExampleScenarioInstanceComponent))
3451          return false;
3452        ExampleScenarioInstanceComponent o = (ExampleScenarioInstanceComponent) other_;
3453        return compareValues(resourceId, o.resourceId, true) && compareValues(resourceType, o.resourceType, true)
3454           && compareValues(name, o.name, true) && compareValues(description, o.description, true);
3455      }
3456
3457      public boolean isEmpty() {
3458        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceId, resourceType, name
3459          , description, version, containedInstance);
3460      }
3461
3462  public String fhirType() {
3463    return "ExampleScenario.instance";
3464
3465  }
3466
3467  }
3468
3469    @Block()
3470    public static class ExampleScenarioInstanceVersionComponent extends BackboneElement implements IBaseBackboneElement {
3471        /**
3472         * The identifier of a specific version of a resource.
3473         */
3474        @Child(name = "versionId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3475        @Description(shortDefinition="The identifier of a specific version of a resource", formalDefinition="The identifier of a specific version of a resource." )
3476        protected StringType versionId;
3477
3478        /**
3479         * The description of the resource version.
3480         */
3481        @Child(name = "description", type = {MarkdownType.class}, order=2, min=1, max=1, modifier=false, summary=false)
3482        @Description(shortDefinition="The description of the resource version", formalDefinition="The description of the resource version." )
3483        protected MarkdownType description;
3484
3485        private static final long serialVersionUID = 960821913L;
3486
3487    /**
3488     * Constructor
3489     */
3490      public ExampleScenarioInstanceVersionComponent() {
3491        super();
3492      }
3493
3494    /**
3495     * Constructor
3496     */
3497      public ExampleScenarioInstanceVersionComponent(StringType versionId, MarkdownType description) {
3498        super();
3499        this.versionId = versionId;
3500        this.description = description;
3501      }
3502
3503        /**
3504         * @return {@link #versionId} (The identifier of a specific version of a resource.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
3505         */
3506        public StringType getVersionIdElement() { 
3507          if (this.versionId == null)
3508            if (Configuration.errorOnAutoCreate())
3509              throw new Error("Attempt to auto-create ExampleScenarioInstanceVersionComponent.versionId");
3510            else if (Configuration.doAutoCreate())
3511              this.versionId = new StringType(); // bb
3512          return this.versionId;
3513        }
3514
3515        public boolean hasVersionIdElement() { 
3516          return this.versionId != null && !this.versionId.isEmpty();
3517        }
3518
3519        public boolean hasVersionId() { 
3520          return this.versionId != null && !this.versionId.isEmpty();
3521        }
3522
3523        /**
3524         * @param value {@link #versionId} (The identifier of a specific version of a resource.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
3525         */
3526        public ExampleScenarioInstanceVersionComponent setVersionIdElement(StringType value) { 
3527          this.versionId = value;
3528          return this;
3529        }
3530
3531        /**
3532         * @return The identifier of a specific version of a resource.
3533         */
3534        public String getVersionId() { 
3535          return this.versionId == null ? null : this.versionId.getValue();
3536        }
3537
3538        /**
3539         * @param value The identifier of a specific version of a resource.
3540         */
3541        public ExampleScenarioInstanceVersionComponent setVersionId(String value) { 
3542            if (this.versionId == null)
3543              this.versionId = new StringType();
3544            this.versionId.setValue(value);
3545          return this;
3546        }
3547
3548        /**
3549         * @return {@link #description} (The description of the resource version.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3550         */
3551        public MarkdownType getDescriptionElement() { 
3552          if (this.description == null)
3553            if (Configuration.errorOnAutoCreate())
3554              throw new Error("Attempt to auto-create ExampleScenarioInstanceVersionComponent.description");
3555            else if (Configuration.doAutoCreate())
3556              this.description = new MarkdownType(); // bb
3557          return this.description;
3558        }
3559
3560        public boolean hasDescriptionElement() { 
3561          return this.description != null && !this.description.isEmpty();
3562        }
3563
3564        public boolean hasDescription() { 
3565          return this.description != null && !this.description.isEmpty();
3566        }
3567
3568        /**
3569         * @param value {@link #description} (The description of the resource version.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3570         */
3571        public ExampleScenarioInstanceVersionComponent setDescriptionElement(MarkdownType value) { 
3572          this.description = value;
3573          return this;
3574        }
3575
3576        /**
3577         * @return The description of the resource version.
3578         */
3579        public String getDescription() { 
3580          return this.description == null ? null : this.description.getValue();
3581        }
3582
3583        /**
3584         * @param value The description of the resource version.
3585         */
3586        public ExampleScenarioInstanceVersionComponent setDescription(String value) { 
3587            if (this.description == null)
3588              this.description = new MarkdownType();
3589            this.description.setValue(value);
3590          return this;
3591        }
3592
3593        protected void listChildren(List<Property> children) {
3594          super.listChildren(children);
3595          children.add(new Property("versionId", "string", "The identifier of a specific version of a resource.", 0, 1, versionId));
3596          children.add(new Property("description", "markdown", "The description of the resource version.", 0, 1, description));
3597        }
3598
3599        @Override
3600        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3601          switch (_hash) {
3602          case -1407102957: /*versionId*/  return new Property("versionId", "string", "The identifier of a specific version of a resource.", 0, 1, versionId);
3603          case -1724546052: /*description*/  return new Property("description", "markdown", "The description of the resource version.", 0, 1, description);
3604          default: return super.getNamedProperty(_hash, _name, _checkValid);
3605          }
3606
3607        }
3608
3609      @Override
3610      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3611        switch (hash) {
3612        case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // StringType
3613        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3614        default: return super.getProperty(hash, name, checkValid);
3615        }
3616
3617      }
3618
3619      @Override
3620      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3621        switch (hash) {
3622        case -1407102957: // versionId
3623          this.versionId = castToString(value); // StringType
3624          return value;
3625        case -1724546052: // description
3626          this.description = castToMarkdown(value); // MarkdownType
3627          return value;
3628        default: return super.setProperty(hash, name, value);
3629        }
3630
3631      }
3632
3633      @Override
3634      public Base setProperty(String name, Base value) throws FHIRException {
3635        if (name.equals("versionId")) {
3636          this.versionId = castToString(value); // StringType
3637        } else if (name.equals("description")) {
3638          this.description = castToMarkdown(value); // MarkdownType
3639        } else
3640          return super.setProperty(name, value);
3641        return value;
3642      }
3643
3644      @Override
3645      public Base makeProperty(int hash, String name) throws FHIRException {
3646        switch (hash) {
3647        case -1407102957:  return getVersionIdElement();
3648        case -1724546052:  return getDescriptionElement();
3649        default: return super.makeProperty(hash, name);
3650        }
3651
3652      }
3653
3654      @Override
3655      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3656        switch (hash) {
3657        case -1407102957: /*versionId*/ return new String[] {"string"};
3658        case -1724546052: /*description*/ return new String[] {"markdown"};
3659        default: return super.getTypesForProperty(hash, name);
3660        }
3661
3662      }
3663
3664      @Override
3665      public Base addChild(String name) throws FHIRException {
3666        if (name.equals("versionId")) {
3667          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.versionId");
3668        }
3669        else if (name.equals("description")) {
3670          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description");
3671        }
3672        else
3673          return super.addChild(name);
3674      }
3675
3676      public ExampleScenarioInstanceVersionComponent copy() {
3677        ExampleScenarioInstanceVersionComponent dst = new ExampleScenarioInstanceVersionComponent();
3678        copyValues(dst);
3679        dst.versionId = versionId == null ? null : versionId.copy();
3680        dst.description = description == null ? null : description.copy();
3681        return dst;
3682      }
3683
3684      @Override
3685      public boolean equalsDeep(Base other_) {
3686        if (!super.equalsDeep(other_))
3687          return false;
3688        if (!(other_ instanceof ExampleScenarioInstanceVersionComponent))
3689          return false;
3690        ExampleScenarioInstanceVersionComponent o = (ExampleScenarioInstanceVersionComponent) other_;
3691        return compareDeep(versionId, o.versionId, true) && compareDeep(description, o.description, true)
3692          ;
3693      }
3694
3695      @Override
3696      public boolean equalsShallow(Base other_) {
3697        if (!super.equalsShallow(other_))
3698          return false;
3699        if (!(other_ instanceof ExampleScenarioInstanceVersionComponent))
3700          return false;
3701        ExampleScenarioInstanceVersionComponent o = (ExampleScenarioInstanceVersionComponent) other_;
3702        return compareValues(versionId, o.versionId, true) && compareValues(description, o.description, true)
3703          ;
3704      }
3705
3706      public boolean isEmpty() {
3707        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(versionId, description);
3708      }
3709
3710  public String fhirType() {
3711    return "ExampleScenario.instance.version";
3712
3713  }
3714
3715  }
3716
3717    @Block()
3718    public static class ExampleScenarioInstanceContainedInstanceComponent extends BackboneElement implements IBaseBackboneElement {
3719        /**
3720         * Each resource contained in the instance.
3721         */
3722        @Child(name = "resourceId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3723        @Description(shortDefinition="Each resource contained in the instance", formalDefinition="Each resource contained in the instance." )
3724        protected StringType resourceId;
3725
3726        /**
3727         * A specific version of a resource contained in the instance.
3728         */
3729        @Child(name = "versionId", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3730        @Description(shortDefinition="A specific version of a resource contained in the instance", formalDefinition="A specific version of a resource contained in the instance." )
3731        protected StringType versionId;
3732
3733        private static final long serialVersionUID = 908084124L;
3734
3735    /**
3736     * Constructor
3737     */
3738      public ExampleScenarioInstanceContainedInstanceComponent() {
3739        super();
3740      }
3741
3742    /**
3743     * Constructor
3744     */
3745      public ExampleScenarioInstanceContainedInstanceComponent(StringType resourceId) {
3746        super();
3747        this.resourceId = resourceId;
3748      }
3749
3750        /**
3751         * @return {@link #resourceId} (Each resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
3752         */
3753        public StringType getResourceIdElement() { 
3754          if (this.resourceId == null)
3755            if (Configuration.errorOnAutoCreate())
3756              throw new Error("Attempt to auto-create ExampleScenarioInstanceContainedInstanceComponent.resourceId");
3757            else if (Configuration.doAutoCreate())
3758              this.resourceId = new StringType(); // bb
3759          return this.resourceId;
3760        }
3761
3762        public boolean hasResourceIdElement() { 
3763          return this.resourceId != null && !this.resourceId.isEmpty();
3764        }
3765
3766        public boolean hasResourceId() { 
3767          return this.resourceId != null && !this.resourceId.isEmpty();
3768        }
3769
3770        /**
3771         * @param value {@link #resourceId} (Each resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
3772         */
3773        public ExampleScenarioInstanceContainedInstanceComponent setResourceIdElement(StringType value) { 
3774          this.resourceId = value;
3775          return this;
3776        }
3777
3778        /**
3779         * @return Each resource contained in the instance.
3780         */
3781        public String getResourceId() { 
3782          return this.resourceId == null ? null : this.resourceId.getValue();
3783        }
3784
3785        /**
3786         * @param value Each resource contained in the instance.
3787         */
3788        public ExampleScenarioInstanceContainedInstanceComponent setResourceId(String value) { 
3789            if (this.resourceId == null)
3790              this.resourceId = new StringType();
3791            this.resourceId.setValue(value);
3792          return this;
3793        }
3794
3795        /**
3796         * @return {@link #versionId} (A specific version of a resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
3797         */
3798        public StringType getVersionIdElement() { 
3799          if (this.versionId == null)
3800            if (Configuration.errorOnAutoCreate())
3801              throw new Error("Attempt to auto-create ExampleScenarioInstanceContainedInstanceComponent.versionId");
3802            else if (Configuration.doAutoCreate())
3803              this.versionId = new StringType(); // bb
3804          return this.versionId;
3805        }
3806
3807        public boolean hasVersionIdElement() { 
3808          return this.versionId != null && !this.versionId.isEmpty();
3809        }
3810
3811        public boolean hasVersionId() { 
3812          return this.versionId != null && !this.versionId.isEmpty();
3813        }
3814
3815        /**
3816         * @param value {@link #versionId} (A specific version of a resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
3817         */
3818        public ExampleScenarioInstanceContainedInstanceComponent setVersionIdElement(StringType value) { 
3819          this.versionId = value;
3820          return this;
3821        }
3822
3823        /**
3824         * @return A specific version of a resource contained in the instance.
3825         */
3826        public String getVersionId() { 
3827          return this.versionId == null ? null : this.versionId.getValue();
3828        }
3829
3830        /**
3831         * @param value A specific version of a resource contained in the instance.
3832         */
3833        public ExampleScenarioInstanceContainedInstanceComponent setVersionId(String value) { 
3834          if (Utilities.noString(value))
3835            this.versionId = null;
3836          else {
3837            if (this.versionId == null)
3838              this.versionId = new StringType();
3839            this.versionId.setValue(value);
3840          }
3841          return this;
3842        }
3843
3844        protected void listChildren(List<Property> children) {
3845          super.listChildren(children);
3846          children.add(new Property("resourceId", "string", "Each resource contained in the instance.", 0, 1, resourceId));
3847          children.add(new Property("versionId", "string", "A specific version of a resource contained in the instance.", 0, 1, versionId));
3848        }
3849
3850        @Override
3851        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3852          switch (_hash) {
3853          case -1345650231: /*resourceId*/  return new Property("resourceId", "string", "Each resource contained in the instance.", 0, 1, resourceId);
3854          case -1407102957: /*versionId*/  return new Property("versionId", "string", "A specific version of a resource contained in the instance.", 0, 1, versionId);
3855          default: return super.getNamedProperty(_hash, _name, _checkValid);
3856          }
3857
3858        }
3859
3860      @Override
3861      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3862        switch (hash) {
3863        case -1345650231: /*resourceId*/ return this.resourceId == null ? new Base[0] : new Base[] {this.resourceId}; // StringType
3864        case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // StringType
3865        default: return super.getProperty(hash, name, checkValid);
3866        }
3867
3868      }
3869
3870      @Override
3871      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3872        switch (hash) {
3873        case -1345650231: // resourceId
3874          this.resourceId = castToString(value); // StringType
3875          return value;
3876        case -1407102957: // versionId
3877          this.versionId = castToString(value); // StringType
3878          return value;
3879        default: return super.setProperty(hash, name, value);
3880        }
3881
3882      }
3883
3884      @Override
3885      public Base setProperty(String name, Base value) throws FHIRException {
3886        if (name.equals("resourceId")) {
3887          this.resourceId = castToString(value); // StringType
3888        } else if (name.equals("versionId")) {
3889          this.versionId = castToString(value); // StringType
3890        } else
3891          return super.setProperty(name, value);
3892        return value;
3893      }
3894
3895      @Override
3896      public Base makeProperty(int hash, String name) throws FHIRException {
3897        switch (hash) {
3898        case -1345650231:  return getResourceIdElement();
3899        case -1407102957:  return getVersionIdElement();
3900        default: return super.makeProperty(hash, name);
3901        }
3902
3903      }
3904
3905      @Override
3906      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3907        switch (hash) {
3908        case -1345650231: /*resourceId*/ return new String[] {"string"};
3909        case -1407102957: /*versionId*/ return new String[] {"string"};
3910        default: return super.getTypesForProperty(hash, name);
3911        }
3912
3913      }
3914
3915      @Override
3916      public Base addChild(String name) throws FHIRException {
3917        if (name.equals("resourceId")) {
3918          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.resourceId");
3919        }
3920        else if (name.equals("versionId")) {
3921          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.versionId");
3922        }
3923        else
3924          return super.addChild(name);
3925      }
3926
3927      public ExampleScenarioInstanceContainedInstanceComponent copy() {
3928        ExampleScenarioInstanceContainedInstanceComponent dst = new ExampleScenarioInstanceContainedInstanceComponent();
3929        copyValues(dst);
3930        dst.resourceId = resourceId == null ? null : resourceId.copy();
3931        dst.versionId = versionId == null ? null : versionId.copy();
3932        return dst;
3933      }
3934
3935      @Override
3936      public boolean equalsDeep(Base other_) {
3937        if (!super.equalsDeep(other_))
3938          return false;
3939        if (!(other_ instanceof ExampleScenarioInstanceContainedInstanceComponent))
3940          return false;
3941        ExampleScenarioInstanceContainedInstanceComponent o = (ExampleScenarioInstanceContainedInstanceComponent) other_;
3942        return compareDeep(resourceId, o.resourceId, true) && compareDeep(versionId, o.versionId, true)
3943          ;
3944      }
3945
3946      @Override
3947      public boolean equalsShallow(Base other_) {
3948        if (!super.equalsShallow(other_))
3949          return false;
3950        if (!(other_ instanceof ExampleScenarioInstanceContainedInstanceComponent))
3951          return false;
3952        ExampleScenarioInstanceContainedInstanceComponent o = (ExampleScenarioInstanceContainedInstanceComponent) other_;
3953        return compareValues(resourceId, o.resourceId, true) && compareValues(versionId, o.versionId, true)
3954          ;
3955      }
3956
3957      public boolean isEmpty() {
3958        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceId, versionId);
3959      }
3960
3961  public String fhirType() {
3962    return "ExampleScenario.instance.containedInstance";
3963
3964  }
3965
3966  }
3967
3968    @Block()
3969    public static class ExampleScenarioProcessComponent extends BackboneElement implements IBaseBackboneElement {
3970        /**
3971         * The diagram title of the group of operations.
3972         */
3973        @Child(name = "title", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
3974        @Description(shortDefinition="The diagram title of the group of operations", formalDefinition="The diagram title of the group of operations." )
3975        protected StringType title;
3976
3977        /**
3978         * A longer description of the group of operations.
3979         */
3980        @Child(name = "description", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3981        @Description(shortDefinition="A longer description of the group of operations", formalDefinition="A longer description of the group of operations." )
3982        protected MarkdownType description;
3983
3984        /**
3985         * Description of initial status before the process starts.
3986         */
3987        @Child(name = "preConditions", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false)
3988        @Description(shortDefinition="Description of initial status before the process starts", formalDefinition="Description of initial status before the process starts." )
3989        protected MarkdownType preConditions;
3990
3991        /**
3992         * Description of final status after the process ends.
3993         */
3994        @Child(name = "postConditions", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
3995        @Description(shortDefinition="Description of final status after the process ends", formalDefinition="Description of final status after the process ends." )
3996        protected MarkdownType postConditions;
3997
3998        /**
3999         * Each step of the process.
4000         */
4001        @Child(name = "step", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4002        @Description(shortDefinition="Each step of the process", formalDefinition="Each step of the process." )
4003        protected List<ExampleScenarioProcessStepComponent> step;
4004
4005        private static final long serialVersionUID = 325578043L;
4006
4007    /**
4008     * Constructor
4009     */
4010      public ExampleScenarioProcessComponent() {
4011        super();
4012      }
4013
4014    /**
4015     * Constructor
4016     */
4017      public ExampleScenarioProcessComponent(StringType title) {
4018        super();
4019        this.title = title;
4020      }
4021
4022        /**
4023         * @return {@link #title} (The diagram title of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4024         */
4025        public StringType getTitleElement() { 
4026          if (this.title == null)
4027            if (Configuration.errorOnAutoCreate())
4028              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.title");
4029            else if (Configuration.doAutoCreate())
4030              this.title = new StringType(); // bb
4031          return this.title;
4032        }
4033
4034        public boolean hasTitleElement() { 
4035          return this.title != null && !this.title.isEmpty();
4036        }
4037
4038        public boolean hasTitle() { 
4039          return this.title != null && !this.title.isEmpty();
4040        }
4041
4042        /**
4043         * @param value {@link #title} (The diagram title of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4044         */
4045        public ExampleScenarioProcessComponent setTitleElement(StringType value) { 
4046          this.title = value;
4047          return this;
4048        }
4049
4050        /**
4051         * @return The diagram title of the group of operations.
4052         */
4053        public String getTitle() { 
4054          return this.title == null ? null : this.title.getValue();
4055        }
4056
4057        /**
4058         * @param value The diagram title of the group of operations.
4059         */
4060        public ExampleScenarioProcessComponent setTitle(String value) { 
4061            if (this.title == null)
4062              this.title = new StringType();
4063            this.title.setValue(value);
4064          return this;
4065        }
4066
4067        /**
4068         * @return {@link #description} (A longer description of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4069         */
4070        public MarkdownType getDescriptionElement() { 
4071          if (this.description == null)
4072            if (Configuration.errorOnAutoCreate())
4073              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.description");
4074            else if (Configuration.doAutoCreate())
4075              this.description = new MarkdownType(); // bb
4076          return this.description;
4077        }
4078
4079        public boolean hasDescriptionElement() { 
4080          return this.description != null && !this.description.isEmpty();
4081        }
4082
4083        public boolean hasDescription() { 
4084          return this.description != null && !this.description.isEmpty();
4085        }
4086
4087        /**
4088         * @param value {@link #description} (A longer description of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4089         */
4090        public ExampleScenarioProcessComponent setDescriptionElement(MarkdownType value) { 
4091          this.description = value;
4092          return this;
4093        }
4094
4095        /**
4096         * @return A longer description of the group of operations.
4097         */
4098        public String getDescription() { 
4099          return this.description == null ? null : this.description.getValue();
4100        }
4101
4102        /**
4103         * @param value A longer description of the group of operations.
4104         */
4105        public ExampleScenarioProcessComponent setDescription(String value) { 
4106          if (value == null)
4107            this.description = null;
4108          else {
4109            if (this.description == null)
4110              this.description = new MarkdownType();
4111            this.description.setValue(value);
4112          }
4113          return this;
4114        }
4115
4116        /**
4117         * @return {@link #preConditions} (Description of initial status before the process starts.). This is the underlying object with id, value and extensions. The accessor "getPreConditions" gives direct access to the value
4118         */
4119        public MarkdownType getPreConditionsElement() { 
4120          if (this.preConditions == null)
4121            if (Configuration.errorOnAutoCreate())
4122              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.preConditions");
4123            else if (Configuration.doAutoCreate())
4124              this.preConditions = new MarkdownType(); // bb
4125          return this.preConditions;
4126        }
4127
4128        public boolean hasPreConditionsElement() { 
4129          return this.preConditions != null && !this.preConditions.isEmpty();
4130        }
4131
4132        public boolean hasPreConditions() { 
4133          return this.preConditions != null && !this.preConditions.isEmpty();
4134        }
4135
4136        /**
4137         * @param value {@link #preConditions} (Description of initial status before the process starts.). This is the underlying object with id, value and extensions. The accessor "getPreConditions" gives direct access to the value
4138         */
4139        public ExampleScenarioProcessComponent setPreConditionsElement(MarkdownType value) { 
4140          this.preConditions = value;
4141          return this;
4142        }
4143
4144        /**
4145         * @return Description of initial status before the process starts.
4146         */
4147        public String getPreConditions() { 
4148          return this.preConditions == null ? null : this.preConditions.getValue();
4149        }
4150
4151        /**
4152         * @param value Description of initial status before the process starts.
4153         */
4154        public ExampleScenarioProcessComponent setPreConditions(String value) { 
4155          if (value == null)
4156            this.preConditions = null;
4157          else {
4158            if (this.preConditions == null)
4159              this.preConditions = new MarkdownType();
4160            this.preConditions.setValue(value);
4161          }
4162          return this;
4163        }
4164
4165        /**
4166         * @return {@link #postConditions} (Description of final status after the process ends.). This is the underlying object with id, value and extensions. The accessor "getPostConditions" gives direct access to the value
4167         */
4168        public MarkdownType getPostConditionsElement() { 
4169          if (this.postConditions == null)
4170            if (Configuration.errorOnAutoCreate())
4171              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.postConditions");
4172            else if (Configuration.doAutoCreate())
4173              this.postConditions = new MarkdownType(); // bb
4174          return this.postConditions;
4175        }
4176
4177        public boolean hasPostConditionsElement() { 
4178          return this.postConditions != null && !this.postConditions.isEmpty();
4179        }
4180
4181        public boolean hasPostConditions() { 
4182          return this.postConditions != null && !this.postConditions.isEmpty();
4183        }
4184
4185        /**
4186         * @param value {@link #postConditions} (Description of final status after the process ends.). This is the underlying object with id, value and extensions. The accessor "getPostConditions" gives direct access to the value
4187         */
4188        public ExampleScenarioProcessComponent setPostConditionsElement(MarkdownType value) { 
4189          this.postConditions = value;
4190          return this;
4191        }
4192
4193        /**
4194         * @return Description of final status after the process ends.
4195         */
4196        public String getPostConditions() { 
4197          return this.postConditions == null ? null : this.postConditions.getValue();
4198        }
4199
4200        /**
4201         * @param value Description of final status after the process ends.
4202         */
4203        public ExampleScenarioProcessComponent setPostConditions(String value) { 
4204          if (value == null)
4205            this.postConditions = null;
4206          else {
4207            if (this.postConditions == null)
4208              this.postConditions = new MarkdownType();
4209            this.postConditions.setValue(value);
4210          }
4211          return this;
4212        }
4213
4214        /**
4215         * @return {@link #step} (Each step of the process.)
4216         */
4217        public List<ExampleScenarioProcessStepComponent> getStep() { 
4218          if (this.step == null)
4219            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
4220          return this.step;
4221        }
4222
4223        /**
4224         * @return Returns a reference to <code>this</code> for easy method chaining
4225         */
4226        public ExampleScenarioProcessComponent setStep(List<ExampleScenarioProcessStepComponent> theStep) { 
4227          this.step = theStep;
4228          return this;
4229        }
4230
4231        public boolean hasStep() { 
4232          if (this.step == null)
4233            return false;
4234          for (ExampleScenarioProcessStepComponent item : this.step)
4235            if (!item.isEmpty())
4236              return true;
4237          return false;
4238        }
4239
4240        public ExampleScenarioProcessStepComponent addStep() { //3
4241          ExampleScenarioProcessStepComponent t = new ExampleScenarioProcessStepComponent();
4242          if (this.step == null)
4243            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
4244          this.step.add(t);
4245          return t;
4246        }
4247
4248        public ExampleScenarioProcessComponent addStep(ExampleScenarioProcessStepComponent t) { //3
4249          if (t == null)
4250            return this;
4251          if (this.step == null)
4252            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
4253          this.step.add(t);
4254          return this;
4255        }
4256
4257        /**
4258         * @return The first repetition of repeating field {@link #step}, creating it if it does not already exist
4259         */
4260        public ExampleScenarioProcessStepComponent getStepFirstRep() { 
4261          if (getStep().isEmpty()) {
4262            addStep();
4263          }
4264          return getStep().get(0);
4265        }
4266
4267        protected void listChildren(List<Property> children) {
4268          super.listChildren(children);
4269          children.add(new Property("title", "string", "The diagram title of the group of operations.", 0, 1, title));
4270          children.add(new Property("description", "markdown", "A longer description of the group of operations.", 0, 1, description));
4271          children.add(new Property("preConditions", "markdown", "Description of initial status before the process starts.", 0, 1, preConditions));
4272          children.add(new Property("postConditions", "markdown", "Description of final status after the process ends.", 0, 1, postConditions));
4273          children.add(new Property("step", "", "Each step of the process.", 0, java.lang.Integer.MAX_VALUE, step));
4274        }
4275
4276        @Override
4277        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4278          switch (_hash) {
4279          case 110371416: /*title*/  return new Property("title", "string", "The diagram title of the group of operations.", 0, 1, title);
4280          case -1724546052: /*description*/  return new Property("description", "markdown", "A longer description of the group of operations.", 0, 1, description);
4281          case -1006692933: /*preConditions*/  return new Property("preConditions", "markdown", "Description of initial status before the process starts.", 0, 1, preConditions);
4282          case 1738302328: /*postConditions*/  return new Property("postConditions", "markdown", "Description of final status after the process ends.", 0, 1, postConditions);
4283          case 3540684: /*step*/  return new Property("step", "", "Each step of the process.", 0, java.lang.Integer.MAX_VALUE, step);
4284          default: return super.getNamedProperty(_hash, _name, _checkValid);
4285          }
4286
4287        }
4288
4289      @Override
4290      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4291        switch (hash) {
4292        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
4293        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
4294        case -1006692933: /*preConditions*/ return this.preConditions == null ? new Base[0] : new Base[] {this.preConditions}; // MarkdownType
4295        case 1738302328: /*postConditions*/ return this.postConditions == null ? new Base[0] : new Base[] {this.postConditions}; // MarkdownType
4296        case 3540684: /*step*/ return this.step == null ? new Base[0] : this.step.toArray(new Base[this.step.size()]); // ExampleScenarioProcessStepComponent
4297        default: return super.getProperty(hash, name, checkValid);
4298        }
4299
4300      }
4301
4302      @Override
4303      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4304        switch (hash) {
4305        case 110371416: // title
4306          this.title = castToString(value); // StringType
4307          return value;
4308        case -1724546052: // description
4309          this.description = castToMarkdown(value); // MarkdownType
4310          return value;
4311        case -1006692933: // preConditions
4312          this.preConditions = castToMarkdown(value); // MarkdownType
4313          return value;
4314        case 1738302328: // postConditions
4315          this.postConditions = castToMarkdown(value); // MarkdownType
4316          return value;
4317        case 3540684: // step
4318          this.getStep().add((ExampleScenarioProcessStepComponent) value); // ExampleScenarioProcessStepComponent
4319          return value;
4320        default: return super.setProperty(hash, name, value);
4321        }
4322
4323      }
4324
4325      @Override
4326      public Base setProperty(String name, Base value) throws FHIRException {
4327        if (name.equals("title")) {
4328          this.title = castToString(value); // StringType
4329        } else if (name.equals("description")) {
4330          this.description = castToMarkdown(value); // MarkdownType
4331        } else if (name.equals("preConditions")) {
4332          this.preConditions = castToMarkdown(value); // MarkdownType
4333        } else if (name.equals("postConditions")) {
4334          this.postConditions = castToMarkdown(value); // MarkdownType
4335        } else if (name.equals("step")) {
4336          this.getStep().add((ExampleScenarioProcessStepComponent) value);
4337        } else
4338          return super.setProperty(name, value);
4339        return value;
4340      }
4341
4342      @Override
4343      public Base makeProperty(int hash, String name) throws FHIRException {
4344        switch (hash) {
4345        case 110371416:  return getTitleElement();
4346        case -1724546052:  return getDescriptionElement();
4347        case -1006692933:  return getPreConditionsElement();
4348        case 1738302328:  return getPostConditionsElement();
4349        case 3540684:  return addStep(); 
4350        default: return super.makeProperty(hash, name);
4351        }
4352
4353      }
4354
4355      @Override
4356      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4357        switch (hash) {
4358        case 110371416: /*title*/ return new String[] {"string"};
4359        case -1724546052: /*description*/ return new String[] {"markdown"};
4360        case -1006692933: /*preConditions*/ return new String[] {"markdown"};
4361        case 1738302328: /*postConditions*/ return new String[] {"markdown"};
4362        case 3540684: /*step*/ return new String[] {};
4363        default: return super.getTypesForProperty(hash, name);
4364        }
4365
4366      }
4367
4368      @Override
4369      public Base addChild(String name) throws FHIRException {
4370        if (name.equals("title")) {
4371          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.title");
4372        }
4373        else if (name.equals("description")) {
4374          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description");
4375        }
4376        else if (name.equals("preConditions")) {
4377          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.preConditions");
4378        }
4379        else if (name.equals("postConditions")) {
4380          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.postConditions");
4381        }
4382        else if (name.equals("step")) {
4383          return addStep();
4384        }
4385        else
4386          return super.addChild(name);
4387      }
4388
4389      public ExampleScenarioProcessComponent copy() {
4390        ExampleScenarioProcessComponent dst = new ExampleScenarioProcessComponent();
4391        copyValues(dst);
4392        dst.title = title == null ? null : title.copy();
4393        dst.description = description == null ? null : description.copy();
4394        dst.preConditions = preConditions == null ? null : preConditions.copy();
4395        dst.postConditions = postConditions == null ? null : postConditions.copy();
4396        if (step != null) {
4397          dst.step = new ArrayList<ExampleScenarioProcessStepComponent>();
4398          for (ExampleScenarioProcessStepComponent i : step)
4399            dst.step.add(i.copy());
4400        };
4401        return dst;
4402      }
4403
4404      @Override
4405      public boolean equalsDeep(Base other_) {
4406        if (!super.equalsDeep(other_))
4407          return false;
4408        if (!(other_ instanceof ExampleScenarioProcessComponent))
4409          return false;
4410        ExampleScenarioProcessComponent o = (ExampleScenarioProcessComponent) other_;
4411        return compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(preConditions, o.preConditions, true)
4412           && compareDeep(postConditions, o.postConditions, true) && compareDeep(step, o.step, true);
4413      }
4414
4415      @Override
4416      public boolean equalsShallow(Base other_) {
4417        if (!super.equalsShallow(other_))
4418          return false;
4419        if (!(other_ instanceof ExampleScenarioProcessComponent))
4420          return false;
4421        ExampleScenarioProcessComponent o = (ExampleScenarioProcessComponent) other_;
4422        return compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(preConditions, o.preConditions, true)
4423           && compareValues(postConditions, o.postConditions, true);
4424      }
4425
4426      public boolean isEmpty() {
4427        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, description, preConditions
4428          , postConditions, step);
4429      }
4430
4431  public String fhirType() {
4432    return "ExampleScenario.process";
4433
4434  }
4435
4436  }
4437
4438    @Block()
4439    public static class ExampleScenarioProcessStepComponent extends BackboneElement implements IBaseBackboneElement {
4440        /**
4441         * Nested process.
4442         */
4443        @Child(name = "process", type = {ExampleScenarioProcessComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4444        @Description(shortDefinition="Nested process", formalDefinition="Nested process." )
4445        protected List<ExampleScenarioProcessComponent> process;
4446
4447        /**
4448         * If there is a pause in the flow.
4449         */
4450        @Child(name = "pause", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4451        @Description(shortDefinition="If there is a pause in the flow", formalDefinition="If there is a pause in the flow." )
4452        protected BooleanType pause;
4453
4454        /**
4455         * Each interaction or action.
4456         */
4457        @Child(name = "operation", type = {}, order=3, min=0, max=1, modifier=false, summary=false)
4458        @Description(shortDefinition="Each interaction or action", formalDefinition="Each interaction or action." )
4459        protected ExampleScenarioProcessStepOperationComponent operation;
4460
4461        /**
4462         * Each interaction in the workflow.
4463         */
4464        @Child(name = "alternative", type = {}, order=4, min=0, max=1, modifier=false, summary=false)
4465        @Description(shortDefinition="Each interaction in the process", formalDefinition="Each interaction in the workflow." )
4466        protected ExampleScenarioProcessStepAlternativeComponent alternative;
4467
4468        private static final long serialVersionUID = -939172007L;
4469
4470    /**
4471     * Constructor
4472     */
4473      public ExampleScenarioProcessStepComponent() {
4474        super();
4475      }
4476
4477        /**
4478         * @return {@link #process} (Nested process.)
4479         */
4480        public List<ExampleScenarioProcessComponent> getProcess() { 
4481          if (this.process == null)
4482            this.process = new ArrayList<ExampleScenarioProcessComponent>();
4483          return this.process;
4484        }
4485
4486        /**
4487         * @return Returns a reference to <code>this</code> for easy method chaining
4488         */
4489        public ExampleScenarioProcessStepComponent setProcess(List<ExampleScenarioProcessComponent> theProcess) { 
4490          this.process = theProcess;
4491          return this;
4492        }
4493
4494        public boolean hasProcess() { 
4495          if (this.process == null)
4496            return false;
4497          for (ExampleScenarioProcessComponent item : this.process)
4498            if (!item.isEmpty())
4499              return true;
4500          return false;
4501        }
4502
4503        public ExampleScenarioProcessComponent addProcess() { //3
4504          ExampleScenarioProcessComponent t = new ExampleScenarioProcessComponent();
4505          if (this.process == null)
4506            this.process = new ArrayList<ExampleScenarioProcessComponent>();
4507          this.process.add(t);
4508          return t;
4509        }
4510
4511        public ExampleScenarioProcessStepComponent addProcess(ExampleScenarioProcessComponent t) { //3
4512          if (t == null)
4513            return this;
4514          if (this.process == null)
4515            this.process = new ArrayList<ExampleScenarioProcessComponent>();
4516          this.process.add(t);
4517          return this;
4518        }
4519
4520        /**
4521         * @return The first repetition of repeating field {@link #process}, creating it if it does not already exist
4522         */
4523        public ExampleScenarioProcessComponent getProcessFirstRep() { 
4524          if (getProcess().isEmpty()) {
4525            addProcess();
4526          }
4527          return getProcess().get(0);
4528        }
4529
4530        /**
4531         * @return {@link #pause} (If there is a pause in the flow.). This is the underlying object with id, value and extensions. The accessor "getPause" gives direct access to the value
4532         */
4533        public BooleanType getPauseElement() { 
4534          if (this.pause == null)
4535            if (Configuration.errorOnAutoCreate())
4536              throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.pause");
4537            else if (Configuration.doAutoCreate())
4538              this.pause = new BooleanType(); // bb
4539          return this.pause;
4540        }
4541
4542        public boolean hasPauseElement() { 
4543          return this.pause != null && !this.pause.isEmpty();
4544        }
4545
4546        public boolean hasPause() { 
4547          return this.pause != null && !this.pause.isEmpty();
4548        }
4549
4550        /**
4551         * @param value {@link #pause} (If there is a pause in the flow.). This is the underlying object with id, value and extensions. The accessor "getPause" gives direct access to the value
4552         */
4553        public ExampleScenarioProcessStepComponent setPauseElement(BooleanType value) { 
4554          this.pause = value;
4555          return this;
4556        }
4557
4558        /**
4559         * @return If there is a pause in the flow.
4560         */
4561        public boolean getPause() { 
4562          return this.pause == null || this.pause.isEmpty() ? false : this.pause.getValue();
4563        }
4564
4565        /**
4566         * @param value If there is a pause in the flow.
4567         */
4568        public ExampleScenarioProcessStepComponent setPause(boolean value) { 
4569            if (this.pause == null)
4570              this.pause = new BooleanType();
4571            this.pause.setValue(value);
4572          return this;
4573        }
4574
4575        /**
4576         * @return {@link #operation} (Each interaction or action.)
4577         */
4578        public ExampleScenarioProcessStepOperationComponent getOperation() { 
4579          if (this.operation == null)
4580            if (Configuration.errorOnAutoCreate())
4581              throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.operation");
4582            else if (Configuration.doAutoCreate())
4583              this.operation = new ExampleScenarioProcessStepOperationComponent(); // cc
4584          return this.operation;
4585        }
4586
4587        public boolean hasOperation() { 
4588          return this.operation != null && !this.operation.isEmpty();
4589        }
4590
4591        /**
4592         * @param value {@link #operation} (Each interaction or action.)
4593         */
4594        public ExampleScenarioProcessStepComponent setOperation(ExampleScenarioProcessStepOperationComponent value) { 
4595          this.operation = value;
4596          return this;
4597        }
4598
4599        /**
4600         * @return {@link #alternative} (Each interaction in the workflow.)
4601         */
4602        public ExampleScenarioProcessStepAlternativeComponent getAlternative() { 
4603          if (this.alternative == null)
4604            if (Configuration.errorOnAutoCreate())
4605              throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.alternative");
4606            else if (Configuration.doAutoCreate())
4607              this.alternative = new ExampleScenarioProcessStepAlternativeComponent(); // cc
4608          return this.alternative;
4609        }
4610
4611        public boolean hasAlternative() { 
4612          return this.alternative != null && !this.alternative.isEmpty();
4613        }
4614
4615        /**
4616         * @param value {@link #alternative} (Each interaction in the workflow.)
4617         */
4618        public ExampleScenarioProcessStepComponent setAlternative(ExampleScenarioProcessStepAlternativeComponent value) { 
4619          this.alternative = value;
4620          return this;
4621        }
4622
4623        protected void listChildren(List<Property> children) {
4624          super.listChildren(children);
4625          children.add(new Property("process", "@ExampleScenario.process", "Nested process.", 0, java.lang.Integer.MAX_VALUE, process));
4626          children.add(new Property("pause", "boolean", "If there is a pause in the flow.", 0, 1, pause));
4627          children.add(new Property("operation", "", "Each interaction or action.", 0, 1, operation));
4628          children.add(new Property("alternative", "", "Each interaction in the workflow.", 0, 1, alternative));
4629        }
4630
4631        @Override
4632        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4633          switch (_hash) {
4634          case -309518737: /*process*/  return new Property("process", "@ExampleScenario.process", "Nested process.", 0, java.lang.Integer.MAX_VALUE, process);
4635          case 106440182: /*pause*/  return new Property("pause", "boolean", "If there is a pause in the flow.", 0, 1, pause);
4636          case 1662702951: /*operation*/  return new Property("operation", "", "Each interaction or action.", 0, 1, operation);
4637          case -196794451: /*alternative*/  return new Property("alternative", "", "Each interaction in the workflow.", 0, 1, alternative);
4638          default: return super.getNamedProperty(_hash, _name, _checkValid);
4639          }
4640
4641        }
4642
4643      @Override
4644      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4645        switch (hash) {
4646        case -309518737: /*process*/ return this.process == null ? new Base[0] : this.process.toArray(new Base[this.process.size()]); // ExampleScenarioProcessComponent
4647        case 106440182: /*pause*/ return this.pause == null ? new Base[0] : new Base[] {this.pause}; // BooleanType
4648        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // ExampleScenarioProcessStepOperationComponent
4649        case -196794451: /*alternative*/ return this.alternative == null ? new Base[0] : new Base[] {this.alternative}; // ExampleScenarioProcessStepAlternativeComponent
4650        default: return super.getProperty(hash, name, checkValid);
4651        }
4652
4653      }
4654
4655      @Override
4656      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4657        switch (hash) {
4658        case -309518737: // process
4659          this.getProcess().add((ExampleScenarioProcessComponent) value); // ExampleScenarioProcessComponent
4660          return value;
4661        case 106440182: // pause
4662          this.pause = castToBoolean(value); // BooleanType
4663          return value;
4664        case 1662702951: // operation
4665          this.operation = (ExampleScenarioProcessStepOperationComponent) value; // ExampleScenarioProcessStepOperationComponent
4666          return value;
4667        case -196794451: // alternative
4668          this.alternative = (ExampleScenarioProcessStepAlternativeComponent) value; // ExampleScenarioProcessStepAlternativeComponent
4669          return value;
4670        default: return super.setProperty(hash, name, value);
4671        }
4672
4673      }
4674
4675      @Override
4676      public Base setProperty(String name, Base value) throws FHIRException {
4677        if (name.equals("process")) {
4678          this.getProcess().add((ExampleScenarioProcessComponent) value);
4679        } else if (name.equals("pause")) {
4680          this.pause = castToBoolean(value); // BooleanType
4681        } else if (name.equals("operation")) {
4682          this.operation = (ExampleScenarioProcessStepOperationComponent) value; // ExampleScenarioProcessStepOperationComponent
4683        } else if (name.equals("alternative")) {
4684          this.alternative = (ExampleScenarioProcessStepAlternativeComponent) value; // ExampleScenarioProcessStepAlternativeComponent
4685        } else
4686          return super.setProperty(name, value);
4687        return value;
4688      }
4689
4690      @Override
4691      public Base makeProperty(int hash, String name) throws FHIRException {
4692        switch (hash) {
4693        case -309518737:  return addProcess(); 
4694        case 106440182:  return getPauseElement();
4695        case 1662702951:  return getOperation(); 
4696        case -196794451:  return getAlternative(); 
4697        default: return super.makeProperty(hash, name);
4698        }
4699
4700      }
4701
4702      @Override
4703      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4704        switch (hash) {
4705        case -309518737: /*process*/ return new String[] {"@ExampleScenario.process"};
4706        case 106440182: /*pause*/ return new String[] {"boolean"};
4707        case 1662702951: /*operation*/ return new String[] {};
4708        case -196794451: /*alternative*/ return new String[] {};
4709        default: return super.getTypesForProperty(hash, name);
4710        }
4711
4712      }
4713
4714      @Override
4715      public Base addChild(String name) throws FHIRException {
4716        if (name.equals("process")) {
4717          return addProcess();
4718        }
4719        else if (name.equals("pause")) {
4720          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.pause");
4721        }
4722        else if (name.equals("operation")) {
4723          this.operation = new ExampleScenarioProcessStepOperationComponent();
4724          return this.operation;
4725        }
4726        else if (name.equals("alternative")) {
4727          this.alternative = new ExampleScenarioProcessStepAlternativeComponent();
4728          return this.alternative;
4729        }
4730        else
4731          return super.addChild(name);
4732      }
4733
4734      public ExampleScenarioProcessStepComponent copy() {
4735        ExampleScenarioProcessStepComponent dst = new ExampleScenarioProcessStepComponent();
4736        copyValues(dst);
4737        if (process != null) {
4738          dst.process = new ArrayList<ExampleScenarioProcessComponent>();
4739          for (ExampleScenarioProcessComponent i : process)
4740            dst.process.add(i.copy());
4741        };
4742        dst.pause = pause == null ? null : pause.copy();
4743        dst.operation = operation == null ? null : operation.copy();
4744        dst.alternative = alternative == null ? null : alternative.copy();
4745        return dst;
4746      }
4747
4748      @Override
4749      public boolean equalsDeep(Base other_) {
4750        if (!super.equalsDeep(other_))
4751          return false;
4752        if (!(other_ instanceof ExampleScenarioProcessStepComponent))
4753          return false;
4754        ExampleScenarioProcessStepComponent o = (ExampleScenarioProcessStepComponent) other_;
4755        return compareDeep(process, o.process, true) && compareDeep(pause, o.pause, true) && compareDeep(operation, o.operation, true)
4756           && compareDeep(alternative, o.alternative, true);
4757      }
4758
4759      @Override
4760      public boolean equalsShallow(Base other_) {
4761        if (!super.equalsShallow(other_))
4762          return false;
4763        if (!(other_ instanceof ExampleScenarioProcessStepComponent))
4764          return false;
4765        ExampleScenarioProcessStepComponent o = (ExampleScenarioProcessStepComponent) other_;
4766        return compareValues(pause, o.pause, true);
4767      }
4768
4769      public boolean isEmpty() {
4770        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(process, pause, operation
4771          , alternative);
4772      }
4773
4774  public String fhirType() {
4775    return "ExampleScenario.process.step";
4776
4777  }
4778
4779  }
4780
4781    @Block()
4782    public static class ExampleScenarioProcessStepOperationComponent extends BackboneElement implements IBaseBackboneElement {
4783        /**
4784         * The sequential number of the interaction, e.g. 1.2.5.
4785         */
4786        @Child(name = "number", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4787        @Description(shortDefinition="The sequential number of the interaction", formalDefinition="The sequential number of the interaction, e.g. 1.2.5." )
4788        protected StringType number;
4789
4790        /**
4791         * The type of operation - CRUD.
4792         */
4793        @Child(name = "type", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4794        @Description(shortDefinition="The type of operation - CRUD", formalDefinition="The type of operation - CRUD." )
4795        protected StringType type;
4796
4797        /**
4798         * The human-friendly name of the interaction.
4799         */
4800        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
4801        @Description(shortDefinition="The human-friendly name of the interaction", formalDefinition="The human-friendly name of the interaction." )
4802        protected StringType name;
4803
4804        /**
4805         * Who starts the transaction.
4806         */
4807        @Child(name = "initiator", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
4808        @Description(shortDefinition="Who starts the transaction", formalDefinition="Who starts the transaction." )
4809        protected StringType initiator;
4810
4811        /**
4812         * Who receives the transaction.
4813         */
4814        @Child(name = "receiver", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
4815        @Description(shortDefinition="Who receives the transaction", formalDefinition="Who receives the transaction." )
4816        protected StringType receiver;
4817
4818        /**
4819         * A comment to be inserted in the diagram.
4820         */
4821        @Child(name = "description", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false)
4822        @Description(shortDefinition="A comment to be inserted in the diagram", formalDefinition="A comment to be inserted in the diagram." )
4823        protected MarkdownType description;
4824
4825        /**
4826         * Whether the initiator is deactivated right after the transaction.
4827         */
4828        @Child(name = "initiatorActive", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false)
4829        @Description(shortDefinition="Whether the initiator is deactivated right after the transaction", formalDefinition="Whether the initiator is deactivated right after the transaction." )
4830        protected BooleanType initiatorActive;
4831
4832        /**
4833         * Whether the receiver is deactivated right after the transaction.
4834         */
4835        @Child(name = "receiverActive", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false)
4836        @Description(shortDefinition="Whether the receiver is deactivated right after the transaction", formalDefinition="Whether the receiver is deactivated right after the transaction." )
4837        protected BooleanType receiverActive;
4838
4839        /**
4840         * Each resource instance used by the initiator.
4841         */
4842        @Child(name = "request", type = {ExampleScenarioInstanceContainedInstanceComponent.class}, order=9, min=0, max=1, modifier=false, summary=false)
4843        @Description(shortDefinition="Each resource instance used by the initiator", formalDefinition="Each resource instance used by the initiator." )
4844        protected ExampleScenarioInstanceContainedInstanceComponent request;
4845
4846        /**
4847         * Each resource instance used by the responder.
4848         */
4849        @Child(name = "response", type = {ExampleScenarioInstanceContainedInstanceComponent.class}, order=10, min=0, max=1, modifier=false, summary=false)
4850        @Description(shortDefinition="Each resource instance used by the responder", formalDefinition="Each resource instance used by the responder." )
4851        protected ExampleScenarioInstanceContainedInstanceComponent response;
4852
4853        private static final long serialVersionUID = 911241906L;
4854
4855    /**
4856     * Constructor
4857     */
4858      public ExampleScenarioProcessStepOperationComponent() {
4859        super();
4860      }
4861
4862    /**
4863     * Constructor
4864     */
4865      public ExampleScenarioProcessStepOperationComponent(StringType number) {
4866        super();
4867        this.number = number;
4868      }
4869
4870        /**
4871         * @return {@link #number} (The sequential number of the interaction, e.g. 1.2.5.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
4872         */
4873        public StringType getNumberElement() { 
4874          if (this.number == null)
4875            if (Configuration.errorOnAutoCreate())
4876              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.number");
4877            else if (Configuration.doAutoCreate())
4878              this.number = new StringType(); // bb
4879          return this.number;
4880        }
4881
4882        public boolean hasNumberElement() { 
4883          return this.number != null && !this.number.isEmpty();
4884        }
4885
4886        public boolean hasNumber() { 
4887          return this.number != null && !this.number.isEmpty();
4888        }
4889
4890        /**
4891         * @param value {@link #number} (The sequential number of the interaction, e.g. 1.2.5.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
4892         */
4893        public ExampleScenarioProcessStepOperationComponent setNumberElement(StringType value) { 
4894          this.number = value;
4895          return this;
4896        }
4897
4898        /**
4899         * @return The sequential number of the interaction, e.g. 1.2.5.
4900         */
4901        public String getNumber() { 
4902          return this.number == null ? null : this.number.getValue();
4903        }
4904
4905        /**
4906         * @param value The sequential number of the interaction, e.g. 1.2.5.
4907         */
4908        public ExampleScenarioProcessStepOperationComponent setNumber(String value) { 
4909            if (this.number == null)
4910              this.number = new StringType();
4911            this.number.setValue(value);
4912          return this;
4913        }
4914
4915        /**
4916         * @return {@link #type} (The type of operation - CRUD.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
4917         */
4918        public StringType getTypeElement() { 
4919          if (this.type == null)
4920            if (Configuration.errorOnAutoCreate())
4921              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.type");
4922            else if (Configuration.doAutoCreate())
4923              this.type = new StringType(); // bb
4924          return this.type;
4925        }
4926
4927        public boolean hasTypeElement() { 
4928          return this.type != null && !this.type.isEmpty();
4929        }
4930
4931        public boolean hasType() { 
4932          return this.type != null && !this.type.isEmpty();
4933        }
4934
4935        /**
4936         * @param value {@link #type} (The type of operation - CRUD.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
4937         */
4938        public ExampleScenarioProcessStepOperationComponent setTypeElement(StringType value) { 
4939          this.type = value;
4940          return this;
4941        }
4942
4943        /**
4944         * @return The type of operation - CRUD.
4945         */
4946        public String getType() { 
4947          return this.type == null ? null : this.type.getValue();
4948        }
4949
4950        /**
4951         * @param value The type of operation - CRUD.
4952         */
4953        public ExampleScenarioProcessStepOperationComponent setType(String value) { 
4954          if (Utilities.noString(value))
4955            this.type = null;
4956          else {
4957            if (this.type == null)
4958              this.type = new StringType();
4959            this.type.setValue(value);
4960          }
4961          return this;
4962        }
4963
4964        /**
4965         * @return {@link #name} (The human-friendly name of the interaction.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4966         */
4967        public StringType getNameElement() { 
4968          if (this.name == null)
4969            if (Configuration.errorOnAutoCreate())
4970              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.name");
4971            else if (Configuration.doAutoCreate())
4972              this.name = new StringType(); // bb
4973          return this.name;
4974        }
4975
4976        public boolean hasNameElement() { 
4977          return this.name != null && !this.name.isEmpty();
4978        }
4979
4980        public boolean hasName() { 
4981          return this.name != null && !this.name.isEmpty();
4982        }
4983
4984        /**
4985         * @param value {@link #name} (The human-friendly name of the interaction.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4986         */
4987        public ExampleScenarioProcessStepOperationComponent setNameElement(StringType value) { 
4988          this.name = value;
4989          return this;
4990        }
4991
4992        /**
4993         * @return The human-friendly name of the interaction.
4994         */
4995        public String getName() { 
4996          return this.name == null ? null : this.name.getValue();
4997        }
4998
4999        /**
5000         * @param value The human-friendly name of the interaction.
5001         */
5002        public ExampleScenarioProcessStepOperationComponent setName(String value) { 
5003          if (Utilities.noString(value))
5004            this.name = null;
5005          else {
5006            if (this.name == null)
5007              this.name = new StringType();
5008            this.name.setValue(value);
5009          }
5010          return this;
5011        }
5012
5013        /**
5014         * @return {@link #initiator} (Who starts the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiator" gives direct access to the value
5015         */
5016        public StringType getInitiatorElement() { 
5017          if (this.initiator == null)
5018            if (Configuration.errorOnAutoCreate())
5019              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.initiator");
5020            else if (Configuration.doAutoCreate())
5021              this.initiator = new StringType(); // bb
5022          return this.initiator;
5023        }
5024
5025        public boolean hasInitiatorElement() { 
5026          return this.initiator != null && !this.initiator.isEmpty();
5027        }
5028
5029        public boolean hasInitiator() { 
5030          return this.initiator != null && !this.initiator.isEmpty();
5031        }
5032
5033        /**
5034         * @param value {@link #initiator} (Who starts the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiator" gives direct access to the value
5035         */
5036        public ExampleScenarioProcessStepOperationComponent setInitiatorElement(StringType value) { 
5037          this.initiator = value;
5038          return this;
5039        }
5040
5041        /**
5042         * @return Who starts the transaction.
5043         */
5044        public String getInitiator() { 
5045          return this.initiator == null ? null : this.initiator.getValue();
5046        }
5047
5048        /**
5049         * @param value Who starts the transaction.
5050         */
5051        public ExampleScenarioProcessStepOperationComponent setInitiator(String value) { 
5052          if (Utilities.noString(value))
5053            this.initiator = null;
5054          else {
5055            if (this.initiator == null)
5056              this.initiator = new StringType();
5057            this.initiator.setValue(value);
5058          }
5059          return this;
5060        }
5061
5062        /**
5063         * @return {@link #receiver} (Who receives the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiver" gives direct access to the value
5064         */
5065        public StringType getReceiverElement() { 
5066          if (this.receiver == null)
5067            if (Configuration.errorOnAutoCreate())
5068              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.receiver");
5069            else if (Configuration.doAutoCreate())
5070              this.receiver = new StringType(); // bb
5071          return this.receiver;
5072        }
5073
5074        public boolean hasReceiverElement() { 
5075          return this.receiver != null && !this.receiver.isEmpty();
5076        }
5077
5078        public boolean hasReceiver() { 
5079          return this.receiver != null && !this.receiver.isEmpty();
5080        }
5081
5082        /**
5083         * @param value {@link #receiver} (Who receives the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiver" gives direct access to the value
5084         */
5085        public ExampleScenarioProcessStepOperationComponent setReceiverElement(StringType value) { 
5086          this.receiver = value;
5087          return this;
5088        }
5089
5090        /**
5091         * @return Who receives the transaction.
5092         */
5093        public String getReceiver() { 
5094          return this.receiver == null ? null : this.receiver.getValue();
5095        }
5096
5097        /**
5098         * @param value Who receives the transaction.
5099         */
5100        public ExampleScenarioProcessStepOperationComponent setReceiver(String value) { 
5101          if (Utilities.noString(value))
5102            this.receiver = null;
5103          else {
5104            if (this.receiver == null)
5105              this.receiver = new StringType();
5106            this.receiver.setValue(value);
5107          }
5108          return this;
5109        }
5110
5111        /**
5112         * @return {@link #description} (A comment to be inserted in the diagram.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5113         */
5114        public MarkdownType getDescriptionElement() { 
5115          if (this.description == null)
5116            if (Configuration.errorOnAutoCreate())
5117              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.description");
5118            else if (Configuration.doAutoCreate())
5119              this.description = new MarkdownType(); // bb
5120          return this.description;
5121        }
5122
5123        public boolean hasDescriptionElement() { 
5124          return this.description != null && !this.description.isEmpty();
5125        }
5126
5127        public boolean hasDescription() { 
5128          return this.description != null && !this.description.isEmpty();
5129        }
5130
5131        /**
5132         * @param value {@link #description} (A comment to be inserted in the diagram.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5133         */
5134        public ExampleScenarioProcessStepOperationComponent setDescriptionElement(MarkdownType value) { 
5135          this.description = value;
5136          return this;
5137        }
5138
5139        /**
5140         * @return A comment to be inserted in the diagram.
5141         */
5142        public String getDescription() { 
5143          return this.description == null ? null : this.description.getValue();
5144        }
5145
5146        /**
5147         * @param value A comment to be inserted in the diagram.
5148         */
5149        public ExampleScenarioProcessStepOperationComponent setDescription(String value) { 
5150          if (value == null)
5151            this.description = null;
5152          else {
5153            if (this.description == null)
5154              this.description = new MarkdownType();
5155            this.description.setValue(value);
5156          }
5157          return this;
5158        }
5159
5160        /**
5161         * @return {@link #initiatorActive} (Whether the initiator is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiatorActive" gives direct access to the value
5162         */
5163        public BooleanType getInitiatorActiveElement() { 
5164          if (this.initiatorActive == null)
5165            if (Configuration.errorOnAutoCreate())
5166              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.initiatorActive");
5167            else if (Configuration.doAutoCreate())
5168              this.initiatorActive = new BooleanType(); // bb
5169          return this.initiatorActive;
5170        }
5171
5172        public boolean hasInitiatorActiveElement() { 
5173          return this.initiatorActive != null && !this.initiatorActive.isEmpty();
5174        }
5175
5176        public boolean hasInitiatorActive() { 
5177          return this.initiatorActive != null && !this.initiatorActive.isEmpty();
5178        }
5179
5180        /**
5181         * @param value {@link #initiatorActive} (Whether the initiator is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiatorActive" gives direct access to the value
5182         */
5183        public ExampleScenarioProcessStepOperationComponent setInitiatorActiveElement(BooleanType value) { 
5184          this.initiatorActive = value;
5185          return this;
5186        }
5187
5188        /**
5189         * @return Whether the initiator is deactivated right after the transaction.
5190         */
5191        public boolean getInitiatorActive() { 
5192          return this.initiatorActive == null || this.initiatorActive.isEmpty() ? false : this.initiatorActive.getValue();
5193        }
5194
5195        /**
5196         * @param value Whether the initiator is deactivated right after the transaction.
5197         */
5198        public ExampleScenarioProcessStepOperationComponent setInitiatorActive(boolean value) { 
5199            if (this.initiatorActive == null)
5200              this.initiatorActive = new BooleanType();
5201            this.initiatorActive.setValue(value);
5202          return this;
5203        }
5204
5205        /**
5206         * @return {@link #receiverActive} (Whether the receiver is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiverActive" gives direct access to the value
5207         */
5208        public BooleanType getReceiverActiveElement() { 
5209          if (this.receiverActive == null)
5210            if (Configuration.errorOnAutoCreate())
5211              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.receiverActive");
5212            else if (Configuration.doAutoCreate())
5213              this.receiverActive = new BooleanType(); // bb
5214          return this.receiverActive;
5215        }
5216
5217        public boolean hasReceiverActiveElement() { 
5218          return this.receiverActive != null && !this.receiverActive.isEmpty();
5219        }
5220
5221        public boolean hasReceiverActive() { 
5222          return this.receiverActive != null && !this.receiverActive.isEmpty();
5223        }
5224
5225        /**
5226         * @param value {@link #receiverActive} (Whether the receiver is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiverActive" gives direct access to the value
5227         */
5228        public ExampleScenarioProcessStepOperationComponent setReceiverActiveElement(BooleanType value) { 
5229          this.receiverActive = value;
5230          return this;
5231        }
5232
5233        /**
5234         * @return Whether the receiver is deactivated right after the transaction.
5235         */
5236        public boolean getReceiverActive() { 
5237          return this.receiverActive == null || this.receiverActive.isEmpty() ? false : this.receiverActive.getValue();
5238        }
5239
5240        /**
5241         * @param value Whether the receiver is deactivated right after the transaction.
5242         */
5243        public ExampleScenarioProcessStepOperationComponent setReceiverActive(boolean value) { 
5244            if (this.receiverActive == null)
5245              this.receiverActive = new BooleanType();
5246            this.receiverActive.setValue(value);
5247          return this;
5248        }
5249
5250        /**
5251         * @return {@link #request} (Each resource instance used by the initiator.)
5252         */
5253        public ExampleScenarioInstanceContainedInstanceComponent getRequest() { 
5254          if (this.request == null)
5255            if (Configuration.errorOnAutoCreate())
5256              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.request");
5257            else if (Configuration.doAutoCreate())
5258              this.request = new ExampleScenarioInstanceContainedInstanceComponent(); // cc
5259          return this.request;
5260        }
5261
5262        public boolean hasRequest() { 
5263          return this.request != null && !this.request.isEmpty();
5264        }
5265
5266        /**
5267         * @param value {@link #request} (Each resource instance used by the initiator.)
5268         */
5269        public ExampleScenarioProcessStepOperationComponent setRequest(ExampleScenarioInstanceContainedInstanceComponent value) { 
5270          this.request = value;
5271          return this;
5272        }
5273
5274        /**
5275         * @return {@link #response} (Each resource instance used by the responder.)
5276         */
5277        public ExampleScenarioInstanceContainedInstanceComponent getResponse() { 
5278          if (this.response == null)
5279            if (Configuration.errorOnAutoCreate())
5280              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.response");
5281            else if (Configuration.doAutoCreate())
5282              this.response = new ExampleScenarioInstanceContainedInstanceComponent(); // cc
5283          return this.response;
5284        }
5285
5286        public boolean hasResponse() { 
5287          return this.response != null && !this.response.isEmpty();
5288        }
5289
5290        /**
5291         * @param value {@link #response} (Each resource instance used by the responder.)
5292         */
5293        public ExampleScenarioProcessStepOperationComponent setResponse(ExampleScenarioInstanceContainedInstanceComponent value) { 
5294          this.response = value;
5295          return this;
5296        }
5297
5298        protected void listChildren(List<Property> children) {
5299          super.listChildren(children);
5300          children.add(new Property("number", "string", "The sequential number of the interaction, e.g. 1.2.5.", 0, 1, number));
5301          children.add(new Property("type", "string", "The type of operation - CRUD.", 0, 1, type));
5302          children.add(new Property("name", "string", "The human-friendly name of the interaction.", 0, 1, name));
5303          children.add(new Property("initiator", "string", "Who starts the transaction.", 0, 1, initiator));
5304          children.add(new Property("receiver", "string", "Who receives the transaction.", 0, 1, receiver));
5305          children.add(new Property("description", "markdown", "A comment to be inserted in the diagram.", 0, 1, description));
5306          children.add(new Property("initiatorActive", "boolean", "Whether the initiator is deactivated right after the transaction.", 0, 1, initiatorActive));
5307          children.add(new Property("receiverActive", "boolean", "Whether the receiver is deactivated right after the transaction.", 0, 1, receiverActive));
5308          children.add(new Property("request", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the initiator.", 0, 1, request));
5309          children.add(new Property("response", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the responder.", 0, 1, response));
5310        }
5311
5312        @Override
5313        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5314          switch (_hash) {
5315          case -1034364087: /*number*/  return new Property("number", "string", "The sequential number of the interaction, e.g. 1.2.5.", 0, 1, number);
5316          case 3575610: /*type*/  return new Property("type", "string", "The type of operation - CRUD.", 0, 1, type);
5317          case 3373707: /*name*/  return new Property("name", "string", "The human-friendly name of the interaction.", 0, 1, name);
5318          case -248987089: /*initiator*/  return new Property("initiator", "string", "Who starts the transaction.", 0, 1, initiator);
5319          case -808719889: /*receiver*/  return new Property("receiver", "string", "Who receives the transaction.", 0, 1, receiver);
5320          case -1724546052: /*description*/  return new Property("description", "markdown", "A comment to be inserted in the diagram.", 0, 1, description);
5321          case 384339477: /*initiatorActive*/  return new Property("initiatorActive", "boolean", "Whether the initiator is deactivated right after the transaction.", 0, 1, initiatorActive);
5322          case -285284907: /*receiverActive*/  return new Property("receiverActive", "boolean", "Whether the receiver is deactivated right after the transaction.", 0, 1, receiverActive);
5323          case 1095692943: /*request*/  return new Property("request", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the initiator.", 0, 1, request);
5324          case -340323263: /*response*/  return new Property("response", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the responder.", 0, 1, response);
5325          default: return super.getNamedProperty(_hash, _name, _checkValid);
5326          }
5327
5328        }
5329
5330      @Override
5331      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5332        switch (hash) {
5333        case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // StringType
5334        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // StringType
5335        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
5336        case -248987089: /*initiator*/ return this.initiator == null ? new Base[0] : new Base[] {this.initiator}; // StringType
5337        case -808719889: /*receiver*/ return this.receiver == null ? new Base[0] : new Base[] {this.receiver}; // StringType
5338        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
5339        case 384339477: /*initiatorActive*/ return this.initiatorActive == null ? new Base[0] : new Base[] {this.initiatorActive}; // BooleanType
5340        case -285284907: /*receiverActive*/ return this.receiverActive == null ? new Base[0] : new Base[] {this.receiverActive}; // BooleanType
5341        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // ExampleScenarioInstanceContainedInstanceComponent
5342        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // ExampleScenarioInstanceContainedInstanceComponent
5343        default: return super.getProperty(hash, name, checkValid);
5344        }
5345
5346      }
5347
5348      @Override
5349      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5350        switch (hash) {
5351        case -1034364087: // number
5352          this.number = castToString(value); // StringType
5353          return value;
5354        case 3575610: // type
5355          this.type = castToString(value); // StringType
5356          return value;
5357        case 3373707: // name
5358          this.name = castToString(value); // StringType
5359          return value;
5360        case -248987089: // initiator
5361          this.initiator = castToString(value); // StringType
5362          return value;
5363        case -808719889: // receiver
5364          this.receiver = castToString(value); // StringType
5365          return value;
5366        case -1724546052: // description
5367          this.description = castToMarkdown(value); // MarkdownType
5368          return value;
5369        case 384339477: // initiatorActive
5370          this.initiatorActive = castToBoolean(value); // BooleanType
5371          return value;
5372        case -285284907: // receiverActive
5373          this.receiverActive = castToBoolean(value); // BooleanType
5374          return value;
5375        case 1095692943: // request
5376          this.request = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
5377          return value;
5378        case -340323263: // response
5379          this.response = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
5380          return value;
5381        default: return super.setProperty(hash, name, value);
5382        }
5383
5384      }
5385
5386      @Override
5387      public Base setProperty(String name, Base value) throws FHIRException {
5388        if (name.equals("number")) {
5389          this.number = castToString(value); // StringType
5390        } else if (name.equals("type")) {
5391          this.type = castToString(value); // StringType
5392        } else if (name.equals("name")) {
5393          this.name = castToString(value); // StringType
5394        } else if (name.equals("initiator")) {
5395          this.initiator = castToString(value); // StringType
5396        } else if (name.equals("receiver")) {
5397          this.receiver = castToString(value); // StringType
5398        } else if (name.equals("description")) {
5399          this.description = castToMarkdown(value); // MarkdownType
5400        } else if (name.equals("initiatorActive")) {
5401          this.initiatorActive = castToBoolean(value); // BooleanType
5402        } else if (name.equals("receiverActive")) {
5403          this.receiverActive = castToBoolean(value); // BooleanType
5404        } else if (name.equals("request")) {
5405          this.request = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
5406        } else if (name.equals("response")) {
5407          this.response = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
5408        } else
5409          return super.setProperty(name, value);
5410        return value;
5411      }
5412
5413      @Override
5414      public Base makeProperty(int hash, String name) throws FHIRException {
5415        switch (hash) {
5416        case -1034364087:  return getNumberElement();
5417        case 3575610:  return getTypeElement();
5418        case 3373707:  return getNameElement();
5419        case -248987089:  return getInitiatorElement();
5420        case -808719889:  return getReceiverElement();
5421        case -1724546052:  return getDescriptionElement();
5422        case 384339477:  return getInitiatorActiveElement();
5423        case -285284907:  return getReceiverActiveElement();
5424        case 1095692943:  return getRequest(); 
5425        case -340323263:  return getResponse(); 
5426        default: return super.makeProperty(hash, name);
5427        }
5428
5429      }
5430
5431      @Override
5432      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5433        switch (hash) {
5434        case -1034364087: /*number*/ return new String[] {"string"};
5435        case 3575610: /*type*/ return new String[] {"string"};
5436        case 3373707: /*name*/ return new String[] {"string"};
5437        case -248987089: /*initiator*/ return new String[] {"string"};
5438        case -808719889: /*receiver*/ return new String[] {"string"};
5439        case -1724546052: /*description*/ return new String[] {"markdown"};
5440        case 384339477: /*initiatorActive*/ return new String[] {"boolean"};
5441        case -285284907: /*receiverActive*/ return new String[] {"boolean"};
5442        case 1095692943: /*request*/ return new String[] {"@ExampleScenario.instance.containedInstance"};
5443        case -340323263: /*response*/ return new String[] {"@ExampleScenario.instance.containedInstance"};
5444        default: return super.getTypesForProperty(hash, name);
5445        }
5446
5447      }
5448
5449      @Override
5450      public Base addChild(String name) throws FHIRException {
5451        if (name.equals("number")) {
5452          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.number");
5453        }
5454        else if (name.equals("type")) {
5455          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.type");
5456        }
5457        else if (name.equals("name")) {
5458          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name");
5459        }
5460        else if (name.equals("initiator")) {
5461          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.initiator");
5462        }
5463        else if (name.equals("receiver")) {
5464          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.receiver");
5465        }
5466        else if (name.equals("description")) {
5467          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description");
5468        }
5469        else if (name.equals("initiatorActive")) {
5470          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.initiatorActive");
5471        }
5472        else if (name.equals("receiverActive")) {
5473          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.receiverActive");
5474        }
5475        else if (name.equals("request")) {
5476          this.request = new ExampleScenarioInstanceContainedInstanceComponent();
5477          return this.request;
5478        }
5479        else if (name.equals("response")) {
5480          this.response = new ExampleScenarioInstanceContainedInstanceComponent();
5481          return this.response;
5482        }
5483        else
5484          return super.addChild(name);
5485      }
5486
5487      public ExampleScenarioProcessStepOperationComponent copy() {
5488        ExampleScenarioProcessStepOperationComponent dst = new ExampleScenarioProcessStepOperationComponent();
5489        copyValues(dst);
5490        dst.number = number == null ? null : number.copy();
5491        dst.type = type == null ? null : type.copy();
5492        dst.name = name == null ? null : name.copy();
5493        dst.initiator = initiator == null ? null : initiator.copy();
5494        dst.receiver = receiver == null ? null : receiver.copy();
5495        dst.description = description == null ? null : description.copy();
5496        dst.initiatorActive = initiatorActive == null ? null : initiatorActive.copy();
5497        dst.receiverActive = receiverActive == null ? null : receiverActive.copy();
5498        dst.request = request == null ? null : request.copy();
5499        dst.response = response == null ? null : response.copy();
5500        return dst;
5501      }
5502
5503      @Override
5504      public boolean equalsDeep(Base other_) {
5505        if (!super.equalsDeep(other_))
5506          return false;
5507        if (!(other_ instanceof ExampleScenarioProcessStepOperationComponent))
5508          return false;
5509        ExampleScenarioProcessStepOperationComponent o = (ExampleScenarioProcessStepOperationComponent) other_;
5510        return compareDeep(number, o.number, true) && compareDeep(type, o.type, true) && compareDeep(name, o.name, true)
5511           && compareDeep(initiator, o.initiator, true) && compareDeep(receiver, o.receiver, true) && compareDeep(description, o.description, true)
5512           && compareDeep(initiatorActive, o.initiatorActive, true) && compareDeep(receiverActive, o.receiverActive, true)
5513           && compareDeep(request, o.request, true) && compareDeep(response, o.response, true);
5514      }
5515
5516      @Override
5517      public boolean equalsShallow(Base other_) {
5518        if (!super.equalsShallow(other_))
5519          return false;
5520        if (!(other_ instanceof ExampleScenarioProcessStepOperationComponent))
5521          return false;
5522        ExampleScenarioProcessStepOperationComponent o = (ExampleScenarioProcessStepOperationComponent) other_;
5523        return compareValues(number, o.number, true) && compareValues(type, o.type, true) && compareValues(name, o.name, true)
5524           && compareValues(initiator, o.initiator, true) && compareValues(receiver, o.receiver, true) && compareValues(description, o.description, true)
5525           && compareValues(initiatorActive, o.initiatorActive, true) && compareValues(receiverActive, o.receiverActive, true)
5526          ;
5527      }
5528
5529      public boolean isEmpty() {
5530        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, name, initiator
5531          , receiver, description, initiatorActive, receiverActive, request, response);
5532      }
5533
5534  public String fhirType() {
5535    return "ExampleScenario.process.step.operation";
5536
5537  }
5538
5539  }
5540
5541    @Block()
5542    public static class ExampleScenarioProcessStepAlternativeComponent extends BackboneElement implements IBaseBackboneElement {
5543        /**
5544         * The name of each alternative.
5545         */
5546        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
5547        @Description(shortDefinition="The name of each alternative", formalDefinition="The name of each alternative." )
5548        protected StringType name;
5549
5550        /**
5551         * Each of the possible options in an alternative.
5552         */
5553        @Child(name = "option", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5554        @Description(shortDefinition="Each of the possible options in an alternative", formalDefinition="Each of the possible options in an alternative." )
5555        protected List<ExampleScenarioProcessStepAlternativeOptionComponent> option;
5556
5557        private static final long serialVersionUID = 379920547L;
5558
5559    /**
5560     * Constructor
5561     */
5562      public ExampleScenarioProcessStepAlternativeComponent() {
5563        super();
5564      }
5565
5566        /**
5567         * @return {@link #name} (The name of each alternative.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
5568         */
5569        public StringType getNameElement() { 
5570          if (this.name == null)
5571            if (Configuration.errorOnAutoCreate())
5572              throw new Error("Attempt to auto-create ExampleScenarioProcessStepAlternativeComponent.name");
5573            else if (Configuration.doAutoCreate())
5574              this.name = new StringType(); // bb
5575          return this.name;
5576        }
5577
5578        public boolean hasNameElement() { 
5579          return this.name != null && !this.name.isEmpty();
5580        }
5581
5582        public boolean hasName() { 
5583          return this.name != null && !this.name.isEmpty();
5584        }
5585
5586        /**
5587         * @param value {@link #name} (The name of each alternative.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
5588         */
5589        public ExampleScenarioProcessStepAlternativeComponent setNameElement(StringType value) { 
5590          this.name = value;
5591          return this;
5592        }
5593
5594        /**
5595         * @return The name of each alternative.
5596         */
5597        public String getName() { 
5598          return this.name == null ? null : this.name.getValue();
5599        }
5600
5601        /**
5602         * @param value The name of each alternative.
5603         */
5604        public ExampleScenarioProcessStepAlternativeComponent setName(String value) { 
5605          if (Utilities.noString(value))
5606            this.name = null;
5607          else {
5608            if (this.name == null)
5609              this.name = new StringType();
5610            this.name.setValue(value);
5611          }
5612          return this;
5613        }
5614
5615        /**
5616         * @return {@link #option} (Each of the possible options in an alternative.)
5617         */
5618        public List<ExampleScenarioProcessStepAlternativeOptionComponent> getOption() { 
5619          if (this.option == null)
5620            this.option = new ArrayList<ExampleScenarioProcessStepAlternativeOptionComponent>();
5621          return this.option;
5622        }
5623
5624        /**
5625         * @return Returns a reference to <code>this</code> for easy method chaining
5626         */
5627        public ExampleScenarioProcessStepAlternativeComponent setOption(List<ExampleScenarioProcessStepAlternativeOptionComponent> theOption) { 
5628          this.option = theOption;
5629          return this;
5630        }
5631
5632        public boolean hasOption() { 
5633          if (this.option == null)
5634            return false;
5635          for (ExampleScenarioProcessStepAlternativeOptionComponent item : this.option)
5636            if (!item.isEmpty())
5637              return true;
5638          return false;
5639        }
5640
5641        public ExampleScenarioProcessStepAlternativeOptionComponent addOption() { //3
5642          ExampleScenarioProcessStepAlternativeOptionComponent t = new ExampleScenarioProcessStepAlternativeOptionComponent();
5643          if (this.option == null)
5644            this.option = new ArrayList<ExampleScenarioProcessStepAlternativeOptionComponent>();
5645          this.option.add(t);
5646          return t;
5647        }
5648
5649        public ExampleScenarioProcessStepAlternativeComponent addOption(ExampleScenarioProcessStepAlternativeOptionComponent t) { //3
5650          if (t == null)
5651            return this;
5652          if (this.option == null)
5653            this.option = new ArrayList<ExampleScenarioProcessStepAlternativeOptionComponent>();
5654          this.option.add(t);
5655          return this;
5656        }
5657
5658        /**
5659         * @return The first repetition of repeating field {@link #option}, creating it if it does not already exist
5660         */
5661        public ExampleScenarioProcessStepAlternativeOptionComponent getOptionFirstRep() { 
5662          if (getOption().isEmpty()) {
5663            addOption();
5664          }
5665          return getOption().get(0);
5666        }
5667
5668        protected void listChildren(List<Property> children) {
5669          super.listChildren(children);
5670          children.add(new Property("name", "string", "The name of each alternative.", 0, 1, name));
5671          children.add(new Property("option", "", "Each of the possible options in an alternative.", 0, java.lang.Integer.MAX_VALUE, option));
5672        }
5673
5674        @Override
5675        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5676          switch (_hash) {
5677          case 3373707: /*name*/  return new Property("name", "string", "The name of each alternative.", 0, 1, name);
5678          case -1010136971: /*option*/  return new Property("option", "", "Each of the possible options in an alternative.", 0, java.lang.Integer.MAX_VALUE, option);
5679          default: return super.getNamedProperty(_hash, _name, _checkValid);
5680          }
5681
5682        }
5683
5684      @Override
5685      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5686        switch (hash) {
5687        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
5688        case -1010136971: /*option*/ return this.option == null ? new Base[0] : this.option.toArray(new Base[this.option.size()]); // ExampleScenarioProcessStepAlternativeOptionComponent
5689        default: return super.getProperty(hash, name, checkValid);
5690        }
5691
5692      }
5693
5694      @Override
5695      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5696        switch (hash) {
5697        case 3373707: // name
5698          this.name = castToString(value); // StringType
5699          return value;
5700        case -1010136971: // option
5701          this.getOption().add((ExampleScenarioProcessStepAlternativeOptionComponent) value); // ExampleScenarioProcessStepAlternativeOptionComponent
5702          return value;
5703        default: return super.setProperty(hash, name, value);
5704        }
5705
5706      }
5707
5708      @Override
5709      public Base setProperty(String name, Base value) throws FHIRException {
5710        if (name.equals("name")) {
5711          this.name = castToString(value); // StringType
5712        } else if (name.equals("option")) {
5713          this.getOption().add((ExampleScenarioProcessStepAlternativeOptionComponent) value);
5714        } else
5715          return super.setProperty(name, value);
5716        return value;
5717      }
5718
5719      @Override
5720      public Base makeProperty(int hash, String name) throws FHIRException {
5721        switch (hash) {
5722        case 3373707:  return getNameElement();
5723        case -1010136971:  return addOption(); 
5724        default: return super.makeProperty(hash, name);
5725        }
5726
5727      }
5728
5729      @Override
5730      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5731        switch (hash) {
5732        case 3373707: /*name*/ return new String[] {"string"};
5733        case -1010136971: /*option*/ return new String[] {};
5734        default: return super.getTypesForProperty(hash, name);
5735        }
5736
5737      }
5738
5739      @Override
5740      public Base addChild(String name) throws FHIRException {
5741        if (name.equals("name")) {
5742          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name");
5743        }
5744        else if (name.equals("option")) {
5745          return addOption();
5746        }
5747        else
5748          return super.addChild(name);
5749      }
5750
5751      public ExampleScenarioProcessStepAlternativeComponent copy() {
5752        ExampleScenarioProcessStepAlternativeComponent dst = new ExampleScenarioProcessStepAlternativeComponent();
5753        copyValues(dst);
5754        dst.name = name == null ? null : name.copy();
5755        if (option != null) {
5756          dst.option = new ArrayList<ExampleScenarioProcessStepAlternativeOptionComponent>();
5757          for (ExampleScenarioProcessStepAlternativeOptionComponent i : option)
5758            dst.option.add(i.copy());
5759        };
5760        return dst;
5761      }
5762
5763      @Override
5764      public boolean equalsDeep(Base other_) {
5765        if (!super.equalsDeep(other_))
5766          return false;
5767        if (!(other_ instanceof ExampleScenarioProcessStepAlternativeComponent))
5768          return false;
5769        ExampleScenarioProcessStepAlternativeComponent o = (ExampleScenarioProcessStepAlternativeComponent) other_;
5770        return compareDeep(name, o.name, true) && compareDeep(option, o.option, true);
5771      }
5772
5773      @Override
5774      public boolean equalsShallow(Base other_) {
5775        if (!super.equalsShallow(other_))
5776          return false;
5777        if (!(other_ instanceof ExampleScenarioProcessStepAlternativeComponent))
5778          return false;
5779        ExampleScenarioProcessStepAlternativeComponent o = (ExampleScenarioProcessStepAlternativeComponent) other_;
5780        return compareValues(name, o.name, true);
5781      }
5782
5783      public boolean isEmpty() {
5784        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, option);
5785      }
5786
5787  public String fhirType() {
5788    return "ExampleScenario.process.step.alternative";
5789
5790  }
5791
5792  }
5793
5794    @Block()
5795    public static class ExampleScenarioProcessStepAlternativeOptionComponent extends BackboneElement implements IBaseBackboneElement {
5796        /**
5797         * A human-readable description of each option.
5798         */
5799        @Child(name = "description", type = {MarkdownType.class}, order=1, min=1, max=1, modifier=false, summary=false)
5800        @Description(shortDefinition="A human-readable description of each option", formalDefinition="A human-readable description of each option." )
5801        protected MarkdownType description;
5802
5803        /**
5804         * What happens in each alternative option.
5805         */
5806        @Child(name = "step", type = {ExampleScenarioProcessStepComponent.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5807        @Description(shortDefinition="What happens in each alternative option", formalDefinition="What happens in each alternative option." )
5808        protected List<ExampleScenarioProcessStepComponent> step;
5809
5810        /**
5811         * If there is a pause in the flow.
5812         */
5813        @Child(name = "pause", type = {BooleanType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5814        @Description(shortDefinition="If there is a pause in the flow", formalDefinition="If there is a pause in the flow." )
5815        protected List<BooleanType> pause;
5816
5817        private static final long serialVersionUID = -1719991565L;
5818
5819    /**
5820     * Constructor
5821     */
5822      public ExampleScenarioProcessStepAlternativeOptionComponent() {
5823        super();
5824      }
5825
5826    /**
5827     * Constructor
5828     */
5829      public ExampleScenarioProcessStepAlternativeOptionComponent(MarkdownType description) {
5830        super();
5831        this.description = description;
5832      }
5833
5834        /**
5835         * @return {@link #description} (A human-readable description of each option.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5836         */
5837        public MarkdownType getDescriptionElement() { 
5838          if (this.description == null)
5839            if (Configuration.errorOnAutoCreate())
5840              throw new Error("Attempt to auto-create ExampleScenarioProcessStepAlternativeOptionComponent.description");
5841            else if (Configuration.doAutoCreate())
5842              this.description = new MarkdownType(); // bb
5843          return this.description;
5844        }
5845
5846        public boolean hasDescriptionElement() { 
5847          return this.description != null && !this.description.isEmpty();
5848        }
5849
5850        public boolean hasDescription() { 
5851          return this.description != null && !this.description.isEmpty();
5852        }
5853
5854        /**
5855         * @param value {@link #description} (A human-readable description of each option.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5856         */
5857        public ExampleScenarioProcessStepAlternativeOptionComponent setDescriptionElement(MarkdownType value) { 
5858          this.description = value;
5859          return this;
5860        }
5861
5862        /**
5863         * @return A human-readable description of each option.
5864         */
5865        public String getDescription() { 
5866          return this.description == null ? null : this.description.getValue();
5867        }
5868
5869        /**
5870         * @param value A human-readable description of each option.
5871         */
5872        public ExampleScenarioProcessStepAlternativeOptionComponent setDescription(String value) { 
5873            if (this.description == null)
5874              this.description = new MarkdownType();
5875            this.description.setValue(value);
5876          return this;
5877        }
5878
5879        /**
5880         * @return {@link #step} (What happens in each alternative option.)
5881         */
5882        public List<ExampleScenarioProcessStepComponent> getStep() { 
5883          if (this.step == null)
5884            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
5885          return this.step;
5886        }
5887
5888        /**
5889         * @return Returns a reference to <code>this</code> for easy method chaining
5890         */
5891        public ExampleScenarioProcessStepAlternativeOptionComponent setStep(List<ExampleScenarioProcessStepComponent> theStep) { 
5892          this.step = theStep;
5893          return this;
5894        }
5895
5896        public boolean hasStep() { 
5897          if (this.step == null)
5898            return false;
5899          for (ExampleScenarioProcessStepComponent item : this.step)
5900            if (!item.isEmpty())
5901              return true;
5902          return false;
5903        }
5904
5905        public ExampleScenarioProcessStepComponent addStep() { //3
5906          ExampleScenarioProcessStepComponent t = new ExampleScenarioProcessStepComponent();
5907          if (this.step == null)
5908            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
5909          this.step.add(t);
5910          return t;
5911        }
5912
5913        public ExampleScenarioProcessStepAlternativeOptionComponent addStep(ExampleScenarioProcessStepComponent t) { //3
5914          if (t == null)
5915            return this;
5916          if (this.step == null)
5917            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
5918          this.step.add(t);
5919          return this;
5920        }
5921
5922        /**
5923         * @return The first repetition of repeating field {@link #step}, creating it if it does not already exist
5924         */
5925        public ExampleScenarioProcessStepComponent getStepFirstRep() { 
5926          if (getStep().isEmpty()) {
5927            addStep();
5928          }
5929          return getStep().get(0);
5930        }
5931
5932        /**
5933         * @return {@link #pause} (If there is a pause in the flow.)
5934         */
5935        public List<BooleanType> getPause() { 
5936          if (this.pause == null)
5937            this.pause = new ArrayList<BooleanType>();
5938          return this.pause;
5939        }
5940
5941        /**
5942         * @return Returns a reference to <code>this</code> for easy method chaining
5943         */
5944        public ExampleScenarioProcessStepAlternativeOptionComponent setPause(List<BooleanType> thePause) { 
5945          this.pause = thePause;
5946          return this;
5947        }
5948
5949        public boolean hasPause() { 
5950          if (this.pause == null)
5951            return false;
5952          for (BooleanType item : this.pause)
5953            if (!item.isEmpty())
5954              return true;
5955          return false;
5956        }
5957
5958        /**
5959         * @return {@link #pause} (If there is a pause in the flow.)
5960         */
5961        public BooleanType addPauseElement() {//2 
5962          BooleanType t = new BooleanType();
5963          if (this.pause == null)
5964            this.pause = new ArrayList<BooleanType>();
5965          this.pause.add(t);
5966          return t;
5967        }
5968
5969        /**
5970         * @param value {@link #pause} (If there is a pause in the flow.)
5971         */
5972        public ExampleScenarioProcessStepAlternativeOptionComponent addPause(boolean value) { //1
5973          BooleanType t = new BooleanType();
5974          t.setValue(value);
5975          if (this.pause == null)
5976            this.pause = new ArrayList<BooleanType>();
5977          this.pause.add(t);
5978          return this;
5979        }
5980
5981        /**
5982         * @param value {@link #pause} (If there is a pause in the flow.)
5983         */
5984        public boolean hasPause(boolean value) { 
5985          if (this.pause == null)
5986            return false;
5987          for (BooleanType v : this.pause)
5988            if (v.getValue().equals(value)) // boolean
5989              return true;
5990          return false;
5991        }
5992
5993        protected void listChildren(List<Property> children) {
5994          super.listChildren(children);
5995          children.add(new Property("description", "markdown", "A human-readable description of each option.", 0, 1, description));
5996          children.add(new Property("step", "@ExampleScenario.process.step", "What happens in each alternative option.", 0, java.lang.Integer.MAX_VALUE, step));
5997          children.add(new Property("pause", "boolean", "If there is a pause in the flow.", 0, java.lang.Integer.MAX_VALUE, pause));
5998        }
5999
6000        @Override
6001        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6002          switch (_hash) {
6003          case -1724546052: /*description*/  return new Property("description", "markdown", "A human-readable description of each option.", 0, 1, description);
6004          case 3540684: /*step*/  return new Property("step", "@ExampleScenario.process.step", "What happens in each alternative option.", 0, java.lang.Integer.MAX_VALUE, step);
6005          case 106440182: /*pause*/  return new Property("pause", "boolean", "If there is a pause in the flow.", 0, java.lang.Integer.MAX_VALUE, pause);
6006          default: return super.getNamedProperty(_hash, _name, _checkValid);
6007          }
6008
6009        }
6010
6011      @Override
6012      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6013        switch (hash) {
6014        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
6015        case 3540684: /*step*/ return this.step == null ? new Base[0] : this.step.toArray(new Base[this.step.size()]); // ExampleScenarioProcessStepComponent
6016        case 106440182: /*pause*/ return this.pause == null ? new Base[0] : this.pause.toArray(new Base[this.pause.size()]); // BooleanType
6017        default: return super.getProperty(hash, name, checkValid);
6018        }
6019
6020      }
6021
6022      @Override
6023      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6024        switch (hash) {
6025        case -1724546052: // description
6026          this.description = castToMarkdown(value); // MarkdownType
6027          return value;
6028        case 3540684: // step
6029          this.getStep().add((ExampleScenarioProcessStepComponent) value); // ExampleScenarioProcessStepComponent
6030          return value;
6031        case 106440182: // pause
6032          this.getPause().add(castToBoolean(value)); // BooleanType
6033          return value;
6034        default: return super.setProperty(hash, name, value);
6035        }
6036
6037      }
6038
6039      @Override
6040      public Base setProperty(String name, Base value) throws FHIRException {
6041        if (name.equals("description")) {
6042          this.description = castToMarkdown(value); // MarkdownType
6043        } else if (name.equals("step")) {
6044          this.getStep().add((ExampleScenarioProcessStepComponent) value);
6045        } else if (name.equals("pause")) {
6046          this.getPause().add(castToBoolean(value));
6047        } else
6048          return super.setProperty(name, value);
6049        return value;
6050      }
6051
6052      @Override
6053      public Base makeProperty(int hash, String name) throws FHIRException {
6054        switch (hash) {
6055        case -1724546052:  return getDescriptionElement();
6056        case 3540684:  return addStep(); 
6057        case 106440182:  return addPauseElement();
6058        default: return super.makeProperty(hash, name);
6059        }
6060
6061      }
6062
6063      @Override
6064      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6065        switch (hash) {
6066        case -1724546052: /*description*/ return new String[] {"markdown"};
6067        case 3540684: /*step*/ return new String[] {"@ExampleScenario.process.step"};
6068        case 106440182: /*pause*/ return new String[] {"boolean"};
6069        default: return super.getTypesForProperty(hash, name);
6070        }
6071
6072      }
6073
6074      @Override
6075      public Base addChild(String name) throws FHIRException {
6076        if (name.equals("description")) {
6077          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.description");
6078        }
6079        else if (name.equals("step")) {
6080          return addStep();
6081        }
6082        else if (name.equals("pause")) {
6083          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.pause");
6084        }
6085        else
6086          return super.addChild(name);
6087      }
6088
6089      public ExampleScenarioProcessStepAlternativeOptionComponent copy() {
6090        ExampleScenarioProcessStepAlternativeOptionComponent dst = new ExampleScenarioProcessStepAlternativeOptionComponent();
6091        copyValues(dst);
6092        dst.description = description == null ? null : description.copy();
6093        if (step != null) {
6094          dst.step = new ArrayList<ExampleScenarioProcessStepComponent>();
6095          for (ExampleScenarioProcessStepComponent i : step)
6096            dst.step.add(i.copy());
6097        };
6098        if (pause != null) {
6099          dst.pause = new ArrayList<BooleanType>();
6100          for (BooleanType i : pause)
6101            dst.pause.add(i.copy());
6102        };
6103        return dst;
6104      }
6105
6106      @Override
6107      public boolean equalsDeep(Base other_) {
6108        if (!super.equalsDeep(other_))
6109          return false;
6110        if (!(other_ instanceof ExampleScenarioProcessStepAlternativeOptionComponent))
6111          return false;
6112        ExampleScenarioProcessStepAlternativeOptionComponent o = (ExampleScenarioProcessStepAlternativeOptionComponent) other_;
6113        return compareDeep(description, o.description, true) && compareDeep(step, o.step, true) && compareDeep(pause, o.pause, true)
6114          ;
6115      }
6116
6117      @Override
6118      public boolean equalsShallow(Base other_) {
6119        if (!super.equalsShallow(other_))
6120          return false;
6121        if (!(other_ instanceof ExampleScenarioProcessStepAlternativeOptionComponent))
6122          return false;
6123        ExampleScenarioProcessStepAlternativeOptionComponent o = (ExampleScenarioProcessStepAlternativeOptionComponent) other_;
6124        return compareValues(description, o.description, true) && compareValues(pause, o.pause, true);
6125      }
6126
6127      public boolean isEmpty() {
6128        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, step, pause
6129          );
6130      }
6131
6132  public String fhirType() {
6133    return "ExampleScenario.process.step.alternative.option";
6134
6135  }
6136
6137  }
6138
6139    /**
6140     * A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.
6141     */
6142    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
6143    @Description(shortDefinition="Additional identifier for the example scenario", formalDefinition="A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance." )
6144    protected List<Identifier> identifier;
6145
6146    /**
6147     * A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.
6148     */
6149    @Child(name = "copyright", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
6150    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario." )
6151    protected MarkdownType copyright;
6152
6153    /**
6154     * What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.
6155     */
6156    @Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
6157    @Description(shortDefinition="The purpose of the example, e.g. to illustrate a scenario", formalDefinition="What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario." )
6158    protected MarkdownType purpose;
6159
6160    /**
6161     * Actor participating in the resource.
6162     */
6163    @Child(name = "actor", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
6164    @Description(shortDefinition="Actor participating in the resource", formalDefinition="Actor participating in the resource." )
6165    protected List<ExampleScenarioActorComponent> actor;
6166
6167    /**
6168     * Each resource and each version that is present in the workflow.
6169     */
6170    @Child(name = "instance", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
6171    @Description(shortDefinition="Each resource and each version that is present in the workflow", formalDefinition="Each resource and each version that is present in the workflow." )
6172    protected List<ExampleScenarioInstanceComponent> instance;
6173
6174    /**
6175     * Each major process - a group of operations.
6176     */
6177    @Child(name = "process", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
6178    @Description(shortDefinition="Each major process - a group of operations", formalDefinition="Each major process - a group of operations." )
6179    protected List<ExampleScenarioProcessComponent> process;
6180
6181    /**
6182     * Another nested workflow.
6183     */
6184    @Child(name = "workflow", type = {CanonicalType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
6185    @Description(shortDefinition="Another nested workflow", formalDefinition="Another nested workflow." )
6186    protected List<CanonicalType> workflow;
6187
6188    private static final long serialVersionUID = 758248907L;
6189
6190  /**
6191   * Constructor
6192   */
6193    public ExampleScenario() {
6194      super();
6195    }
6196
6197  /**
6198   * Constructor
6199   */
6200    public ExampleScenario(Enumeration<PublicationStatus> status) {
6201      super();
6202      this.status = status;
6203    }
6204
6205    /**
6206     * @return {@link #url} (An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
6207     */
6208    public UriType getUrlElement() { 
6209      if (this.url == null)
6210        if (Configuration.errorOnAutoCreate())
6211          throw new Error("Attempt to auto-create ExampleScenario.url");
6212        else if (Configuration.doAutoCreate())
6213          this.url = new UriType(); // bb
6214      return this.url;
6215    }
6216
6217    public boolean hasUrlElement() { 
6218      return this.url != null && !this.url.isEmpty();
6219    }
6220
6221    public boolean hasUrl() { 
6222      return this.url != null && !this.url.isEmpty();
6223    }
6224
6225    /**
6226     * @param value {@link #url} (An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
6227     */
6228    public ExampleScenario setUrlElement(UriType value) { 
6229      this.url = value;
6230      return this;
6231    }
6232
6233    /**
6234     * @return An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.
6235     */
6236    public String getUrl() { 
6237      return this.url == null ? null : this.url.getValue();
6238    }
6239
6240    /**
6241     * @param value An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.
6242     */
6243    public ExampleScenario setUrl(String value) { 
6244      if (Utilities.noString(value))
6245        this.url = null;
6246      else {
6247        if (this.url == null)
6248          this.url = new UriType();
6249        this.url.setValue(value);
6250      }
6251      return this;
6252    }
6253
6254    /**
6255     * @return {@link #identifier} (A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.)
6256     */
6257    public List<Identifier> getIdentifier() { 
6258      if (this.identifier == null)
6259        this.identifier = new ArrayList<Identifier>();
6260      return this.identifier;
6261    }
6262
6263    /**
6264     * @return Returns a reference to <code>this</code> for easy method chaining
6265     */
6266    public ExampleScenario setIdentifier(List<Identifier> theIdentifier) { 
6267      this.identifier = theIdentifier;
6268      return this;
6269    }
6270
6271    public boolean hasIdentifier() { 
6272      if (this.identifier == null)
6273        return false;
6274      for (Identifier item : this.identifier)
6275        if (!item.isEmpty())
6276          return true;
6277      return false;
6278    }
6279
6280    public Identifier addIdentifier() { //3
6281      Identifier t = new Identifier();
6282      if (this.identifier == null)
6283        this.identifier = new ArrayList<Identifier>();
6284      this.identifier.add(t);
6285      return t;
6286    }
6287
6288    public ExampleScenario addIdentifier(Identifier t) { //3
6289      if (t == null)
6290        return this;
6291      if (this.identifier == null)
6292        this.identifier = new ArrayList<Identifier>();
6293      this.identifier.add(t);
6294      return this;
6295    }
6296
6297    /**
6298     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
6299     */
6300    public Identifier getIdentifierFirstRep() { 
6301      if (getIdentifier().isEmpty()) {
6302        addIdentifier();
6303      }
6304      return getIdentifier().get(0);
6305    }
6306
6307    /**
6308     * @return {@link #version} (The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario 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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
6309     */
6310    public StringType getVersionElement() { 
6311      if (this.version == null)
6312        if (Configuration.errorOnAutoCreate())
6313          throw new Error("Attempt to auto-create ExampleScenario.version");
6314        else if (Configuration.doAutoCreate())
6315          this.version = new StringType(); // bb
6316      return this.version;
6317    }
6318
6319    public boolean hasVersionElement() { 
6320      return this.version != null && !this.version.isEmpty();
6321    }
6322
6323    public boolean hasVersion() { 
6324      return this.version != null && !this.version.isEmpty();
6325    }
6326
6327    /**
6328     * @param value {@link #version} (The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario 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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
6329     */
6330    public ExampleScenario setVersionElement(StringType value) { 
6331      this.version = value;
6332      return this;
6333    }
6334
6335    /**
6336     * @return The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario 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.
6337     */
6338    public String getVersion() { 
6339      return this.version == null ? null : this.version.getValue();
6340    }
6341
6342    /**
6343     * @param value The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario 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.
6344     */
6345    public ExampleScenario setVersion(String value) { 
6346      if (Utilities.noString(value))
6347        this.version = null;
6348      else {
6349        if (this.version == null)
6350          this.version = new StringType();
6351        this.version.setValue(value);
6352      }
6353      return this;
6354    }
6355
6356    /**
6357     * @return {@link #name} (A natural language name identifying the example scenario. 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
6358     */
6359    public StringType getNameElement() { 
6360      if (this.name == null)
6361        if (Configuration.errorOnAutoCreate())
6362          throw new Error("Attempt to auto-create ExampleScenario.name");
6363        else if (Configuration.doAutoCreate())
6364          this.name = new StringType(); // bb
6365      return this.name;
6366    }
6367
6368    public boolean hasNameElement() { 
6369      return this.name != null && !this.name.isEmpty();
6370    }
6371
6372    public boolean hasName() { 
6373      return this.name != null && !this.name.isEmpty();
6374    }
6375
6376    /**
6377     * @param value {@link #name} (A natural language name identifying the example scenario. 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
6378     */
6379    public ExampleScenario setNameElement(StringType value) { 
6380      this.name = value;
6381      return this;
6382    }
6383
6384    /**
6385     * @return A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.
6386     */
6387    public String getName() { 
6388      return this.name == null ? null : this.name.getValue();
6389    }
6390
6391    /**
6392     * @param value A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.
6393     */
6394    public ExampleScenario setName(String value) { 
6395      if (Utilities.noString(value))
6396        this.name = null;
6397      else {
6398        if (this.name == null)
6399          this.name = new StringType();
6400        this.name.setValue(value);
6401      }
6402      return this;
6403    }
6404
6405    /**
6406     * @return {@link #status} (The status of this example scenario. 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
6407     */
6408    public Enumeration<PublicationStatus> getStatusElement() { 
6409      if (this.status == null)
6410        if (Configuration.errorOnAutoCreate())
6411          throw new Error("Attempt to auto-create ExampleScenario.status");
6412        else if (Configuration.doAutoCreate())
6413          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
6414      return this.status;
6415    }
6416
6417    public boolean hasStatusElement() { 
6418      return this.status != null && !this.status.isEmpty();
6419    }
6420
6421    public boolean hasStatus() { 
6422      return this.status != null && !this.status.isEmpty();
6423    }
6424
6425    /**
6426     * @param value {@link #status} (The status of this example scenario. 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
6427     */
6428    public ExampleScenario setStatusElement(Enumeration<PublicationStatus> value) { 
6429      this.status = value;
6430      return this;
6431    }
6432
6433    /**
6434     * @return The status of this example scenario. Enables tracking the life-cycle of the content.
6435     */
6436    public PublicationStatus getStatus() { 
6437      return this.status == null ? null : this.status.getValue();
6438    }
6439
6440    /**
6441     * @param value The status of this example scenario. Enables tracking the life-cycle of the content.
6442     */
6443    public ExampleScenario setStatus(PublicationStatus value) { 
6444        if (this.status == null)
6445          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
6446        this.status.setValue(value);
6447      return this;
6448    }
6449
6450    /**
6451     * @return {@link #experimental} (A Boolean value to indicate that this example scenario 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
6452     */
6453    public BooleanType getExperimentalElement() { 
6454      if (this.experimental == null)
6455        if (Configuration.errorOnAutoCreate())
6456          throw new Error("Attempt to auto-create ExampleScenario.experimental");
6457        else if (Configuration.doAutoCreate())
6458          this.experimental = new BooleanType(); // bb
6459      return this.experimental;
6460    }
6461
6462    public boolean hasExperimentalElement() { 
6463      return this.experimental != null && !this.experimental.isEmpty();
6464    }
6465
6466    public boolean hasExperimental() { 
6467      return this.experimental != null && !this.experimental.isEmpty();
6468    }
6469
6470    /**
6471     * @param value {@link #experimental} (A Boolean value to indicate that this example scenario 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
6472     */
6473    public ExampleScenario setExperimentalElement(BooleanType value) { 
6474      this.experimental = value;
6475      return this;
6476    }
6477
6478    /**
6479     * @return A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
6480     */
6481    public boolean getExperimental() { 
6482      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
6483    }
6484
6485    /**
6486     * @param value A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
6487     */
6488    public ExampleScenario setExperimental(boolean value) { 
6489        if (this.experimental == null)
6490          this.experimental = new BooleanType();
6491        this.experimental.setValue(value);
6492      return this;
6493    }
6494
6495    /**
6496     * @return {@link #date} (The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
6497     */
6498    public DateTimeType getDateElement() { 
6499      if (this.date == null)
6500        if (Configuration.errorOnAutoCreate())
6501          throw new Error("Attempt to auto-create ExampleScenario.date");
6502        else if (Configuration.doAutoCreate())
6503          this.date = new DateTimeType(); // bb
6504      return this.date;
6505    }
6506
6507    public boolean hasDateElement() { 
6508      return this.date != null && !this.date.isEmpty();
6509    }
6510
6511    public boolean hasDate() { 
6512      return this.date != null && !this.date.isEmpty();
6513    }
6514
6515    /**
6516     * @param value {@link #date} (The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
6517     */
6518    public ExampleScenario setDateElement(DateTimeType value) { 
6519      this.date = value;
6520      return this;
6521    }
6522
6523    /**
6524     * @return The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').
6525     */
6526    public Date getDate() { 
6527      return this.date == null ? null : this.date.getValue();
6528    }
6529
6530    /**
6531     * @param value The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').
6532     */
6533    public ExampleScenario setDate(Date value) { 
6534      if (value == null)
6535        this.date = null;
6536      else {
6537        if (this.date == null)
6538          this.date = new DateTimeType();
6539        this.date.setValue(value);
6540      }
6541      return this;
6542    }
6543
6544    /**
6545     * @return {@link #publisher} (The name of the organization or individual that published the example scenario.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
6546     */
6547    public StringType getPublisherElement() { 
6548      if (this.publisher == null)
6549        if (Configuration.errorOnAutoCreate())
6550          throw new Error("Attempt to auto-create ExampleScenario.publisher");
6551        else if (Configuration.doAutoCreate())
6552          this.publisher = new StringType(); // bb
6553      return this.publisher;
6554    }
6555
6556    public boolean hasPublisherElement() { 
6557      return this.publisher != null && !this.publisher.isEmpty();
6558    }
6559
6560    public boolean hasPublisher() { 
6561      return this.publisher != null && !this.publisher.isEmpty();
6562    }
6563
6564    /**
6565     * @param value {@link #publisher} (The name of the organization or individual that published the example scenario.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
6566     */
6567    public ExampleScenario setPublisherElement(StringType value) { 
6568      this.publisher = value;
6569      return this;
6570    }
6571
6572    /**
6573     * @return The name of the organization or individual that published the example scenario.
6574     */
6575    public String getPublisher() { 
6576      return this.publisher == null ? null : this.publisher.getValue();
6577    }
6578
6579    /**
6580     * @param value The name of the organization or individual that published the example scenario.
6581     */
6582    public ExampleScenario setPublisher(String value) { 
6583      if (Utilities.noString(value))
6584        this.publisher = null;
6585      else {
6586        if (this.publisher == null)
6587          this.publisher = new StringType();
6588        this.publisher.setValue(value);
6589      }
6590      return this;
6591    }
6592
6593    /**
6594     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
6595     */
6596    public List<ContactDetail> getContact() { 
6597      if (this.contact == null)
6598        this.contact = new ArrayList<ContactDetail>();
6599      return this.contact;
6600    }
6601
6602    /**
6603     * @return Returns a reference to <code>this</code> for easy method chaining
6604     */
6605    public ExampleScenario setContact(List<ContactDetail> theContact) { 
6606      this.contact = theContact;
6607      return this;
6608    }
6609
6610    public boolean hasContact() { 
6611      if (this.contact == null)
6612        return false;
6613      for (ContactDetail item : this.contact)
6614        if (!item.isEmpty())
6615          return true;
6616      return false;
6617    }
6618
6619    public ContactDetail addContact() { //3
6620      ContactDetail t = new ContactDetail();
6621      if (this.contact == null)
6622        this.contact = new ArrayList<ContactDetail>();
6623      this.contact.add(t);
6624      return t;
6625    }
6626
6627    public ExampleScenario addContact(ContactDetail t) { //3
6628      if (t == null)
6629        return this;
6630      if (this.contact == null)
6631        this.contact = new ArrayList<ContactDetail>();
6632      this.contact.add(t);
6633      return this;
6634    }
6635
6636    /**
6637     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
6638     */
6639    public ContactDetail getContactFirstRep() { 
6640      if (getContact().isEmpty()) {
6641        addContact();
6642      }
6643      return getContact().get(0);
6644    }
6645
6646    /**
6647     * @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 example scenario instances.)
6648     */
6649    public List<UsageContext> getUseContext() { 
6650      if (this.useContext == null)
6651        this.useContext = new ArrayList<UsageContext>();
6652      return this.useContext;
6653    }
6654
6655    /**
6656     * @return Returns a reference to <code>this</code> for easy method chaining
6657     */
6658    public ExampleScenario setUseContext(List<UsageContext> theUseContext) { 
6659      this.useContext = theUseContext;
6660      return this;
6661    }
6662
6663    public boolean hasUseContext() { 
6664      if (this.useContext == null)
6665        return false;
6666      for (UsageContext item : this.useContext)
6667        if (!item.isEmpty())
6668          return true;
6669      return false;
6670    }
6671
6672    public UsageContext addUseContext() { //3
6673      UsageContext t = new UsageContext();
6674      if (this.useContext == null)
6675        this.useContext = new ArrayList<UsageContext>();
6676      this.useContext.add(t);
6677      return t;
6678    }
6679
6680    public ExampleScenario addUseContext(UsageContext t) { //3
6681      if (t == null)
6682        return this;
6683      if (this.useContext == null)
6684        this.useContext = new ArrayList<UsageContext>();
6685      this.useContext.add(t);
6686      return this;
6687    }
6688
6689    /**
6690     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
6691     */
6692    public UsageContext getUseContextFirstRep() { 
6693      if (getUseContext().isEmpty()) {
6694        addUseContext();
6695      }
6696      return getUseContext().get(0);
6697    }
6698
6699    /**
6700     * @return {@link #jurisdiction} (A legal or geographic region in which the example scenario is intended to be used.)
6701     */
6702    public List<CodeableConcept> getJurisdiction() { 
6703      if (this.jurisdiction == null)
6704        this.jurisdiction = new ArrayList<CodeableConcept>();
6705      return this.jurisdiction;
6706    }
6707
6708    /**
6709     * @return Returns a reference to <code>this</code> for easy method chaining
6710     */
6711    public ExampleScenario setJurisdiction(List<CodeableConcept> theJurisdiction) { 
6712      this.jurisdiction = theJurisdiction;
6713      return this;
6714    }
6715
6716    public boolean hasJurisdiction() { 
6717      if (this.jurisdiction == null)
6718        return false;
6719      for (CodeableConcept item : this.jurisdiction)
6720        if (!item.isEmpty())
6721          return true;
6722      return false;
6723    }
6724
6725    public CodeableConcept addJurisdiction() { //3
6726      CodeableConcept t = new CodeableConcept();
6727      if (this.jurisdiction == null)
6728        this.jurisdiction = new ArrayList<CodeableConcept>();
6729      this.jurisdiction.add(t);
6730      return t;
6731    }
6732
6733    public ExampleScenario addJurisdiction(CodeableConcept t) { //3
6734      if (t == null)
6735        return this;
6736      if (this.jurisdiction == null)
6737        this.jurisdiction = new ArrayList<CodeableConcept>();
6738      this.jurisdiction.add(t);
6739      return this;
6740    }
6741
6742    /**
6743     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
6744     */
6745    public CodeableConcept getJurisdictionFirstRep() { 
6746      if (getJurisdiction().isEmpty()) {
6747        addJurisdiction();
6748      }
6749      return getJurisdiction().get(0);
6750    }
6751
6752    /**
6753     * @return {@link #copyright} (A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
6754     */
6755    public MarkdownType getCopyrightElement() { 
6756      if (this.copyright == null)
6757        if (Configuration.errorOnAutoCreate())
6758          throw new Error("Attempt to auto-create ExampleScenario.copyright");
6759        else if (Configuration.doAutoCreate())
6760          this.copyright = new MarkdownType(); // bb
6761      return this.copyright;
6762    }
6763
6764    public boolean hasCopyrightElement() { 
6765      return this.copyright != null && !this.copyright.isEmpty();
6766    }
6767
6768    public boolean hasCopyright() { 
6769      return this.copyright != null && !this.copyright.isEmpty();
6770    }
6771
6772    /**
6773     * @param value {@link #copyright} (A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
6774     */
6775    public ExampleScenario setCopyrightElement(MarkdownType value) { 
6776      this.copyright = value;
6777      return this;
6778    }
6779
6780    /**
6781     * @return A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.
6782     */
6783    public String getCopyright() { 
6784      return this.copyright == null ? null : this.copyright.getValue();
6785    }
6786
6787    /**
6788     * @param value A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.
6789     */
6790    public ExampleScenario setCopyright(String value) { 
6791      if (value == null)
6792        this.copyright = null;
6793      else {
6794        if (this.copyright == null)
6795          this.copyright = new MarkdownType();
6796        this.copyright.setValue(value);
6797      }
6798      return this;
6799    }
6800
6801    /**
6802     * @return {@link #purpose} (What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
6803     */
6804    public MarkdownType getPurposeElement() { 
6805      if (this.purpose == null)
6806        if (Configuration.errorOnAutoCreate())
6807          throw new Error("Attempt to auto-create ExampleScenario.purpose");
6808        else if (Configuration.doAutoCreate())
6809          this.purpose = new MarkdownType(); // bb
6810      return this.purpose;
6811    }
6812
6813    public boolean hasPurposeElement() { 
6814      return this.purpose != null && !this.purpose.isEmpty();
6815    }
6816
6817    public boolean hasPurpose() { 
6818      return this.purpose != null && !this.purpose.isEmpty();
6819    }
6820
6821    /**
6822     * @param value {@link #purpose} (What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
6823     */
6824    public ExampleScenario setPurposeElement(MarkdownType value) { 
6825      this.purpose = value;
6826      return this;
6827    }
6828
6829    /**
6830     * @return What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.
6831     */
6832    public String getPurpose() { 
6833      return this.purpose == null ? null : this.purpose.getValue();
6834    }
6835
6836    /**
6837     * @param value What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.
6838     */
6839    public ExampleScenario setPurpose(String value) { 
6840      if (value == null)
6841        this.purpose = null;
6842      else {
6843        if (this.purpose == null)
6844          this.purpose = new MarkdownType();
6845        this.purpose.setValue(value);
6846      }
6847      return this;
6848    }
6849
6850    /**
6851     * @return {@link #actor} (Actor participating in the resource.)
6852     */
6853    public List<ExampleScenarioActorComponent> getActor() { 
6854      if (this.actor == null)
6855        this.actor = new ArrayList<ExampleScenarioActorComponent>();
6856      return this.actor;
6857    }
6858
6859    /**
6860     * @return Returns a reference to <code>this</code> for easy method chaining
6861     */
6862    public ExampleScenario setActor(List<ExampleScenarioActorComponent> theActor) { 
6863      this.actor = theActor;
6864      return this;
6865    }
6866
6867    public boolean hasActor() { 
6868      if (this.actor == null)
6869        return false;
6870      for (ExampleScenarioActorComponent item : this.actor)
6871        if (!item.isEmpty())
6872          return true;
6873      return false;
6874    }
6875
6876    public ExampleScenarioActorComponent addActor() { //3
6877      ExampleScenarioActorComponent t = new ExampleScenarioActorComponent();
6878      if (this.actor == null)
6879        this.actor = new ArrayList<ExampleScenarioActorComponent>();
6880      this.actor.add(t);
6881      return t;
6882    }
6883
6884    public ExampleScenario addActor(ExampleScenarioActorComponent t) { //3
6885      if (t == null)
6886        return this;
6887      if (this.actor == null)
6888        this.actor = new ArrayList<ExampleScenarioActorComponent>();
6889      this.actor.add(t);
6890      return this;
6891    }
6892
6893    /**
6894     * @return The first repetition of repeating field {@link #actor}, creating it if it does not already exist
6895     */
6896    public ExampleScenarioActorComponent getActorFirstRep() { 
6897      if (getActor().isEmpty()) {
6898        addActor();
6899      }
6900      return getActor().get(0);
6901    }
6902
6903    /**
6904     * @return {@link #instance} (Each resource and each version that is present in the workflow.)
6905     */
6906    public List<ExampleScenarioInstanceComponent> getInstance() { 
6907      if (this.instance == null)
6908        this.instance = new ArrayList<ExampleScenarioInstanceComponent>();
6909      return this.instance;
6910    }
6911
6912    /**
6913     * @return Returns a reference to <code>this</code> for easy method chaining
6914     */
6915    public ExampleScenario setInstance(List<ExampleScenarioInstanceComponent> theInstance) { 
6916      this.instance = theInstance;
6917      return this;
6918    }
6919
6920    public boolean hasInstance() { 
6921      if (this.instance == null)
6922        return false;
6923      for (ExampleScenarioInstanceComponent item : this.instance)
6924        if (!item.isEmpty())
6925          return true;
6926      return false;
6927    }
6928
6929    public ExampleScenarioInstanceComponent addInstance() { //3
6930      ExampleScenarioInstanceComponent t = new ExampleScenarioInstanceComponent();
6931      if (this.instance == null)
6932        this.instance = new ArrayList<ExampleScenarioInstanceComponent>();
6933      this.instance.add(t);
6934      return t;
6935    }
6936
6937    public ExampleScenario addInstance(ExampleScenarioInstanceComponent t) { //3
6938      if (t == null)
6939        return this;
6940      if (this.instance == null)
6941        this.instance = new ArrayList<ExampleScenarioInstanceComponent>();
6942      this.instance.add(t);
6943      return this;
6944    }
6945
6946    /**
6947     * @return The first repetition of repeating field {@link #instance}, creating it if it does not already exist
6948     */
6949    public ExampleScenarioInstanceComponent getInstanceFirstRep() { 
6950      if (getInstance().isEmpty()) {
6951        addInstance();
6952      }
6953      return getInstance().get(0);
6954    }
6955
6956    /**
6957     * @return {@link #process} (Each major process - a group of operations.)
6958     */
6959    public List<ExampleScenarioProcessComponent> getProcess() { 
6960      if (this.process == null)
6961        this.process = new ArrayList<ExampleScenarioProcessComponent>();
6962      return this.process;
6963    }
6964
6965    /**
6966     * @return Returns a reference to <code>this</code> for easy method chaining
6967     */
6968    public ExampleScenario setProcess(List<ExampleScenarioProcessComponent> theProcess) { 
6969      this.process = theProcess;
6970      return this;
6971    }
6972
6973    public boolean hasProcess() { 
6974      if (this.process == null)
6975        return false;
6976      for (ExampleScenarioProcessComponent item : this.process)
6977        if (!item.isEmpty())
6978          return true;
6979      return false;
6980    }
6981
6982    public ExampleScenarioProcessComponent addProcess() { //3
6983      ExampleScenarioProcessComponent t = new ExampleScenarioProcessComponent();
6984      if (this.process == null)
6985        this.process = new ArrayList<ExampleScenarioProcessComponent>();
6986      this.process.add(t);
6987      return t;
6988    }
6989
6990    public ExampleScenario addProcess(ExampleScenarioProcessComponent t) { //3
6991      if (t == null)
6992        return this;
6993      if (this.process == null)
6994        this.process = new ArrayList<ExampleScenarioProcessComponent>();
6995      this.process.add(t);
6996      return this;
6997    }
6998
6999    /**
7000     * @return The first repetition of repeating field {@link #process}, creating it if it does not already exist
7001     */
7002    public ExampleScenarioProcessComponent getProcessFirstRep() { 
7003      if (getProcess().isEmpty()) {
7004        addProcess();
7005      }
7006      return getProcess().get(0);
7007    }
7008
7009    /**
7010     * @return {@link #workflow} (Another nested workflow.)
7011     */
7012    public List<CanonicalType> getWorkflow() { 
7013      if (this.workflow == null)
7014        this.workflow = new ArrayList<CanonicalType>();
7015      return this.workflow;
7016    }
7017
7018    /**
7019     * @return Returns a reference to <code>this</code> for easy method chaining
7020     */
7021    public ExampleScenario setWorkflow(List<CanonicalType> theWorkflow) { 
7022      this.workflow = theWorkflow;
7023      return this;
7024    }
7025
7026    public boolean hasWorkflow() { 
7027      if (this.workflow == null)
7028        return false;
7029      for (CanonicalType item : this.workflow)
7030        if (!item.isEmpty())
7031          return true;
7032      return false;
7033    }
7034
7035    /**
7036     * @return {@link #workflow} (Another nested workflow.)
7037     */
7038    public CanonicalType addWorkflowElement() {//2 
7039      CanonicalType t = new CanonicalType();
7040      if (this.workflow == null)
7041        this.workflow = new ArrayList<CanonicalType>();
7042      this.workflow.add(t);
7043      return t;
7044    }
7045
7046    /**
7047     * @param value {@link #workflow} (Another nested workflow.)
7048     */
7049    public ExampleScenario addWorkflow(String value) { //1
7050      CanonicalType t = new CanonicalType();
7051      t.setValue(value);
7052      if (this.workflow == null)
7053        this.workflow = new ArrayList<CanonicalType>();
7054      this.workflow.add(t);
7055      return this;
7056    }
7057
7058    /**
7059     * @param value {@link #workflow} (Another nested workflow.)
7060     */
7061    public boolean hasWorkflow(String value) { 
7062      if (this.workflow == null)
7063        return false;
7064      for (CanonicalType v : this.workflow)
7065        if (v.getValue().equals(value)) // canonical(ExampleScenario)
7066          return true;
7067      return false;
7068    }
7069
7070      protected void listChildren(List<Property> children) {
7071        super.listChildren(children);
7072        children.add(new Property("url", "uri", "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.", 0, 1, url));
7073        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
7074        children.add(new Property("version", "string", "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario 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.", 0, 1, version));
7075        children.add(new Property("name", "string", "A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
7076        children.add(new Property("status", "code", "The status of this example scenario. Enables tracking the life-cycle of the content.", 0, 1, status));
7077        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
7078        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", 0, 1, date));
7079        children.add(new Property("publisher", "string", "The name of the organization or individual that published the example scenario.", 0, 1, publisher));
7080        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));
7081        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 example scenario instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
7082        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the example scenario is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
7083        children.add(new Property("copyright", "markdown", "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", 0, 1, copyright));
7084        children.add(new Property("purpose", "markdown", "What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.", 0, 1, purpose));
7085        children.add(new Property("actor", "", "Actor participating in the resource.", 0, java.lang.Integer.MAX_VALUE, actor));
7086        children.add(new Property("instance", "", "Each resource and each version that is present in the workflow.", 0, java.lang.Integer.MAX_VALUE, instance));
7087        children.add(new Property("process", "", "Each major process - a group of operations.", 0, java.lang.Integer.MAX_VALUE, process));
7088        children.add(new Property("workflow", "canonical(ExampleScenario)", "Another nested workflow.", 0, java.lang.Integer.MAX_VALUE, workflow));
7089      }
7090
7091      @Override
7092      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7093        switch (_hash) {
7094        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.", 0, 1, url);
7095        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
7096        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario 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.", 0, 1, version);
7097        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
7098        case -892481550: /*status*/  return new Property("status", "code", "The status of this example scenario. Enables tracking the life-cycle of the content.", 0, 1, status);
7099        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
7100        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", 0, 1, date);
7101        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the example scenario.", 0, 1, publisher);
7102        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);
7103        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 example scenario instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
7104        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the example scenario is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
7105        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", 0, 1, copyright);
7106        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.", 0, 1, purpose);
7107        case 92645877: /*actor*/  return new Property("actor", "", "Actor participating in the resource.", 0, java.lang.Integer.MAX_VALUE, actor);
7108        case 555127957: /*instance*/  return new Property("instance", "", "Each resource and each version that is present in the workflow.", 0, java.lang.Integer.MAX_VALUE, instance);
7109        case -309518737: /*process*/  return new Property("process", "", "Each major process - a group of operations.", 0, java.lang.Integer.MAX_VALUE, process);
7110        case 35379135: /*workflow*/  return new Property("workflow", "canonical(ExampleScenario)", "Another nested workflow.", 0, java.lang.Integer.MAX_VALUE, workflow);
7111        default: return super.getNamedProperty(_hash, _name, _checkValid);
7112        }
7113
7114      }
7115
7116      @Override
7117      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7118        switch (hash) {
7119        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
7120        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
7121        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
7122        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
7123        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
7124        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
7125        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
7126        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
7127        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
7128        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
7129        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
7130        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
7131        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
7132        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : this.actor.toArray(new Base[this.actor.size()]); // ExampleScenarioActorComponent
7133        case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // ExampleScenarioInstanceComponent
7134        case -309518737: /*process*/ return this.process == null ? new Base[0] : this.process.toArray(new Base[this.process.size()]); // ExampleScenarioProcessComponent
7135        case 35379135: /*workflow*/ return this.workflow == null ? new Base[0] : this.workflow.toArray(new Base[this.workflow.size()]); // CanonicalType
7136        default: return super.getProperty(hash, name, checkValid);
7137        }
7138
7139      }
7140
7141      @Override
7142      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7143        switch (hash) {
7144        case 116079: // url
7145          this.url = castToUri(value); // UriType
7146          return value;
7147        case -1618432855: // identifier
7148          this.getIdentifier().add(castToIdentifier(value)); // Identifier
7149          return value;
7150        case 351608024: // version
7151          this.version = castToString(value); // StringType
7152          return value;
7153        case 3373707: // name
7154          this.name = castToString(value); // StringType
7155          return value;
7156        case -892481550: // status
7157          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
7158          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
7159          return value;
7160        case -404562712: // experimental
7161          this.experimental = castToBoolean(value); // BooleanType
7162          return value;
7163        case 3076014: // date
7164          this.date = castToDateTime(value); // DateTimeType
7165          return value;
7166        case 1447404028: // publisher
7167          this.publisher = castToString(value); // StringType
7168          return value;
7169        case 951526432: // contact
7170          this.getContact().add(castToContactDetail(value)); // ContactDetail
7171          return value;
7172        case -669707736: // useContext
7173          this.getUseContext().add(castToUsageContext(value)); // UsageContext
7174          return value;
7175        case -507075711: // jurisdiction
7176          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
7177          return value;
7178        case 1522889671: // copyright
7179          this.copyright = castToMarkdown(value); // MarkdownType
7180          return value;
7181        case -220463842: // purpose
7182          this.purpose = castToMarkdown(value); // MarkdownType
7183          return value;
7184        case 92645877: // actor
7185          this.getActor().add((ExampleScenarioActorComponent) value); // ExampleScenarioActorComponent
7186          return value;
7187        case 555127957: // instance
7188          this.getInstance().add((ExampleScenarioInstanceComponent) value); // ExampleScenarioInstanceComponent
7189          return value;
7190        case -309518737: // process
7191          this.getProcess().add((ExampleScenarioProcessComponent) value); // ExampleScenarioProcessComponent
7192          return value;
7193        case 35379135: // workflow
7194          this.getWorkflow().add(castToCanonical(value)); // CanonicalType
7195          return value;
7196        default: return super.setProperty(hash, name, value);
7197        }
7198
7199      }
7200
7201      @Override
7202      public Base setProperty(String name, Base value) throws FHIRException {
7203        if (name.equals("url")) {
7204          this.url = castToUri(value); // UriType
7205        } else if (name.equals("identifier")) {
7206          this.getIdentifier().add(castToIdentifier(value));
7207        } else if (name.equals("version")) {
7208          this.version = castToString(value); // StringType
7209        } else if (name.equals("name")) {
7210          this.name = castToString(value); // StringType
7211        } else if (name.equals("status")) {
7212          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
7213          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
7214        } else if (name.equals("experimental")) {
7215          this.experimental = castToBoolean(value); // BooleanType
7216        } else if (name.equals("date")) {
7217          this.date = castToDateTime(value); // DateTimeType
7218        } else if (name.equals("publisher")) {
7219          this.publisher = castToString(value); // StringType
7220        } else if (name.equals("contact")) {
7221          this.getContact().add(castToContactDetail(value));
7222        } else if (name.equals("useContext")) {
7223          this.getUseContext().add(castToUsageContext(value));
7224        } else if (name.equals("jurisdiction")) {
7225          this.getJurisdiction().add(castToCodeableConcept(value));
7226        } else if (name.equals("copyright")) {
7227          this.copyright = castToMarkdown(value); // MarkdownType
7228        } else if (name.equals("purpose")) {
7229          this.purpose = castToMarkdown(value); // MarkdownType
7230        } else if (name.equals("actor")) {
7231          this.getActor().add((ExampleScenarioActorComponent) value);
7232        } else if (name.equals("instance")) {
7233          this.getInstance().add((ExampleScenarioInstanceComponent) value);
7234        } else if (name.equals("process")) {
7235          this.getProcess().add((ExampleScenarioProcessComponent) value);
7236        } else if (name.equals("workflow")) {
7237          this.getWorkflow().add(castToCanonical(value));
7238        } else
7239          return super.setProperty(name, value);
7240        return value;
7241      }
7242
7243      @Override
7244      public Base makeProperty(int hash, String name) throws FHIRException {
7245        switch (hash) {
7246        case 116079:  return getUrlElement();
7247        case -1618432855:  return addIdentifier(); 
7248        case 351608024:  return getVersionElement();
7249        case 3373707:  return getNameElement();
7250        case -892481550:  return getStatusElement();
7251        case -404562712:  return getExperimentalElement();
7252        case 3076014:  return getDateElement();
7253        case 1447404028:  return getPublisherElement();
7254        case 951526432:  return addContact(); 
7255        case -669707736:  return addUseContext(); 
7256        case -507075711:  return addJurisdiction(); 
7257        case 1522889671:  return getCopyrightElement();
7258        case -220463842:  return getPurposeElement();
7259        case 92645877:  return addActor(); 
7260        case 555127957:  return addInstance(); 
7261        case -309518737:  return addProcess(); 
7262        case 35379135:  return addWorkflowElement();
7263        default: return super.makeProperty(hash, name);
7264        }
7265
7266      }
7267
7268      @Override
7269      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7270        switch (hash) {
7271        case 116079: /*url*/ return new String[] {"uri"};
7272        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
7273        case 351608024: /*version*/ return new String[] {"string"};
7274        case 3373707: /*name*/ return new String[] {"string"};
7275        case -892481550: /*status*/ return new String[] {"code"};
7276        case -404562712: /*experimental*/ return new String[] {"boolean"};
7277        case 3076014: /*date*/ return new String[] {"dateTime"};
7278        case 1447404028: /*publisher*/ return new String[] {"string"};
7279        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
7280        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
7281        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
7282        case 1522889671: /*copyright*/ return new String[] {"markdown"};
7283        case -220463842: /*purpose*/ return new String[] {"markdown"};
7284        case 92645877: /*actor*/ return new String[] {};
7285        case 555127957: /*instance*/ return new String[] {};
7286        case -309518737: /*process*/ return new String[] {};
7287        case 35379135: /*workflow*/ return new String[] {"canonical"};
7288        default: return super.getTypesForProperty(hash, name);
7289        }
7290
7291      }
7292
7293      @Override
7294      public Base addChild(String name) throws FHIRException {
7295        if (name.equals("url")) {
7296          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.url");
7297        }
7298        else if (name.equals("identifier")) {
7299          return addIdentifier();
7300        }
7301        else if (name.equals("version")) {
7302          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.version");
7303        }
7304        else if (name.equals("name")) {
7305          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name");
7306        }
7307        else if (name.equals("status")) {
7308          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.status");
7309        }
7310        else if (name.equals("experimental")) {
7311          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.experimental");
7312        }
7313        else if (name.equals("date")) {
7314          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.date");
7315        }
7316        else if (name.equals("publisher")) {
7317          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.publisher");
7318        }
7319        else if (name.equals("contact")) {
7320          return addContact();
7321        }
7322        else if (name.equals("useContext")) {
7323          return addUseContext();
7324        }
7325        else if (name.equals("jurisdiction")) {
7326          return addJurisdiction();
7327        }
7328        else if (name.equals("copyright")) {
7329          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.copyright");
7330        }
7331        else if (name.equals("purpose")) {
7332          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.purpose");
7333        }
7334        else if (name.equals("actor")) {
7335          return addActor();
7336        }
7337        else if (name.equals("instance")) {
7338          return addInstance();
7339        }
7340        else if (name.equals("process")) {
7341          return addProcess();
7342        }
7343        else if (name.equals("workflow")) {
7344          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.workflow");
7345        }
7346        else
7347          return super.addChild(name);
7348      }
7349
7350  public String fhirType() {
7351    return "ExampleScenario";
7352
7353  }
7354
7355      public ExampleScenario copy() {
7356        ExampleScenario dst = new ExampleScenario();
7357        copyValues(dst);
7358        dst.url = url == null ? null : url.copy();
7359        if (identifier != null) {
7360          dst.identifier = new ArrayList<Identifier>();
7361          for (Identifier i : identifier)
7362            dst.identifier.add(i.copy());
7363        };
7364        dst.version = version == null ? null : version.copy();
7365        dst.name = name == null ? null : name.copy();
7366        dst.status = status == null ? null : status.copy();
7367        dst.experimental = experimental == null ? null : experimental.copy();
7368        dst.date = date == null ? null : date.copy();
7369        dst.publisher = publisher == null ? null : publisher.copy();
7370        if (contact != null) {
7371          dst.contact = new ArrayList<ContactDetail>();
7372          for (ContactDetail i : contact)
7373            dst.contact.add(i.copy());
7374        };
7375        if (useContext != null) {
7376          dst.useContext = new ArrayList<UsageContext>();
7377          for (UsageContext i : useContext)
7378            dst.useContext.add(i.copy());
7379        };
7380        if (jurisdiction != null) {
7381          dst.jurisdiction = new ArrayList<CodeableConcept>();
7382          for (CodeableConcept i : jurisdiction)
7383            dst.jurisdiction.add(i.copy());
7384        };
7385        dst.copyright = copyright == null ? null : copyright.copy();
7386        dst.purpose = purpose == null ? null : purpose.copy();
7387        if (actor != null) {
7388          dst.actor = new ArrayList<ExampleScenarioActorComponent>();
7389          for (ExampleScenarioActorComponent i : actor)
7390            dst.actor.add(i.copy());
7391        };
7392        if (instance != null) {
7393          dst.instance = new ArrayList<ExampleScenarioInstanceComponent>();
7394          for (ExampleScenarioInstanceComponent i : instance)
7395            dst.instance.add(i.copy());
7396        };
7397        if (process != null) {
7398          dst.process = new ArrayList<ExampleScenarioProcessComponent>();
7399          for (ExampleScenarioProcessComponent i : process)
7400            dst.process.add(i.copy());
7401        };
7402        if (workflow != null) {
7403          dst.workflow = new ArrayList<CanonicalType>();
7404          for (CanonicalType i : workflow)
7405            dst.workflow.add(i.copy());
7406        };
7407        return dst;
7408      }
7409
7410      protected ExampleScenario typedCopy() {
7411        return copy();
7412      }
7413
7414      @Override
7415      public boolean equalsDeep(Base other_) {
7416        if (!super.equalsDeep(other_))
7417          return false;
7418        if (!(other_ instanceof ExampleScenario))
7419          return false;
7420        ExampleScenario o = (ExampleScenario) other_;
7421        return compareDeep(identifier, o.identifier, true) && compareDeep(copyright, o.copyright, true)
7422           && compareDeep(purpose, o.purpose, true) && compareDeep(actor, o.actor, true) && compareDeep(instance, o.instance, true)
7423           && compareDeep(process, o.process, true) && compareDeep(workflow, o.workflow, true);
7424      }
7425
7426      @Override
7427      public boolean equalsShallow(Base other_) {
7428        if (!super.equalsShallow(other_))
7429          return false;
7430        if (!(other_ instanceof ExampleScenario))
7431          return false;
7432        ExampleScenario o = (ExampleScenario) other_;
7433        return compareValues(copyright, o.copyright, true) && compareValues(purpose, o.purpose, true);
7434      }
7435
7436      public boolean isEmpty() {
7437        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, copyright, purpose
7438          , actor, instance, process, workflow);
7439      }
7440
7441  @Override
7442  public ResourceType getResourceType() {
7443    return ResourceType.ExampleScenario;
7444   }
7445
7446 /**
7447   * Search parameter: <b>date</b>
7448   * <p>
7449   * Description: <b>The example scenario publication date</b><br>
7450   * Type: <b>date</b><br>
7451   * Path: <b>ExampleScenario.date</b><br>
7452   * </p>
7453   */
7454  @SearchParamDefinition(name="date", path="ExampleScenario.date", description="The example scenario publication date", type="date" )
7455  public static final String SP_DATE = "date";
7456 /**
7457   * <b>Fluent Client</b> search parameter constant for <b>date</b>
7458   * <p>
7459   * Description: <b>The example scenario publication date</b><br>
7460   * Type: <b>date</b><br>
7461   * Path: <b>ExampleScenario.date</b><br>
7462   * </p>
7463   */
7464  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
7465
7466 /**
7467   * Search parameter: <b>identifier</b>
7468   * <p>
7469   * Description: <b>External identifier for the example scenario</b><br>
7470   * Type: <b>token</b><br>
7471   * Path: <b>ExampleScenario.identifier</b><br>
7472   * </p>
7473   */
7474  @SearchParamDefinition(name="identifier", path="ExampleScenario.identifier", description="External identifier for the example scenario", type="token" )
7475  public static final String SP_IDENTIFIER = "identifier";
7476 /**
7477   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
7478   * <p>
7479   * Description: <b>External identifier for the example scenario</b><br>
7480   * Type: <b>token</b><br>
7481   * Path: <b>ExampleScenario.identifier</b><br>
7482   * </p>
7483   */
7484  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
7485
7486 /**
7487   * Search parameter: <b>context-type-value</b>
7488   * <p>
7489   * Description: <b>A use context type and value assigned to the example scenario</b><br>
7490   * Type: <b>composite</b><br>
7491   * Path: <b></b><br>
7492   * </p>
7493   */
7494  @SearchParamDefinition(name="context-type-value", path="ExampleScenario.useContext", description="A use context type and value assigned to the example scenario", type="composite", compositeOf={"context-type", "context"} )
7495  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
7496 /**
7497   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
7498   * <p>
7499   * Description: <b>A use context type and value assigned to the example scenario</b><br>
7500   * Type: <b>composite</b><br>
7501   * Path: <b></b><br>
7502   * </p>
7503   */
7504  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
7505
7506 /**
7507   * Search parameter: <b>jurisdiction</b>
7508   * <p>
7509   * Description: <b>Intended jurisdiction for the example scenario</b><br>
7510   * Type: <b>token</b><br>
7511   * Path: <b>ExampleScenario.jurisdiction</b><br>
7512   * </p>
7513   */
7514  @SearchParamDefinition(name="jurisdiction", path="ExampleScenario.jurisdiction", description="Intended jurisdiction for the example scenario", type="token" )
7515  public static final String SP_JURISDICTION = "jurisdiction";
7516 /**
7517   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
7518   * <p>
7519   * Description: <b>Intended jurisdiction for the example scenario</b><br>
7520   * Type: <b>token</b><br>
7521   * Path: <b>ExampleScenario.jurisdiction</b><br>
7522   * </p>
7523   */
7524  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
7525
7526 /**
7527   * Search parameter: <b>context-type</b>
7528   * <p>
7529   * Description: <b>A type of use context assigned to the example scenario</b><br>
7530   * Type: <b>token</b><br>
7531   * Path: <b>ExampleScenario.useContext.code</b><br>
7532   * </p>
7533   */
7534  @SearchParamDefinition(name="context-type", path="ExampleScenario.useContext.code", description="A type of use context assigned to the example scenario", type="token" )
7535  public static final String SP_CONTEXT_TYPE = "context-type";
7536 /**
7537   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
7538   * <p>
7539   * Description: <b>A type of use context assigned to the example scenario</b><br>
7540   * Type: <b>token</b><br>
7541   * Path: <b>ExampleScenario.useContext.code</b><br>
7542   * </p>
7543   */
7544  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
7545
7546 /**
7547   * Search parameter: <b>version</b>
7548   * <p>
7549   * Description: <b>The business version of the example scenario</b><br>
7550   * Type: <b>token</b><br>
7551   * Path: <b>ExampleScenario.version</b><br>
7552   * </p>
7553   */
7554  @SearchParamDefinition(name="version", path="ExampleScenario.version", description="The business version of the example scenario", type="token" )
7555  public static final String SP_VERSION = "version";
7556 /**
7557   * <b>Fluent Client</b> search parameter constant for <b>version</b>
7558   * <p>
7559   * Description: <b>The business version of the example scenario</b><br>
7560   * Type: <b>token</b><br>
7561   * Path: <b>ExampleScenario.version</b><br>
7562   * </p>
7563   */
7564  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
7565
7566 /**
7567   * Search parameter: <b>url</b>
7568   * <p>
7569   * Description: <b>The uri that identifies the example scenario</b><br>
7570   * Type: <b>uri</b><br>
7571   * Path: <b>ExampleScenario.url</b><br>
7572   * </p>
7573   */
7574  @SearchParamDefinition(name="url", path="ExampleScenario.url", description="The uri that identifies the example scenario", type="uri" )
7575  public static final String SP_URL = "url";
7576 /**
7577   * <b>Fluent Client</b> search parameter constant for <b>url</b>
7578   * <p>
7579   * Description: <b>The uri that identifies the example scenario</b><br>
7580   * Type: <b>uri</b><br>
7581   * Path: <b>ExampleScenario.url</b><br>
7582   * </p>
7583   */
7584  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
7585
7586 /**
7587   * Search parameter: <b>context-quantity</b>
7588   * <p>
7589   * Description: <b>A quantity- or range-valued use context assigned to the example scenario</b><br>
7590   * Type: <b>quantity</b><br>
7591   * Path: <b>ExampleScenario.useContext.valueQuantity, ExampleScenario.useContext.valueRange</b><br>
7592   * </p>
7593   */
7594  @SearchParamDefinition(name="context-quantity", path="(ExampleScenario.useContext.value as Quantity) | (ExampleScenario.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the example scenario", type="quantity" )
7595  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
7596 /**
7597   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
7598   * <p>
7599   * Description: <b>A quantity- or range-valued use context assigned to the example scenario</b><br>
7600   * Type: <b>quantity</b><br>
7601   * Path: <b>ExampleScenario.useContext.valueQuantity, ExampleScenario.useContext.valueRange</b><br>
7602   * </p>
7603   */
7604  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
7605
7606 /**
7607   * Search parameter: <b>name</b>
7608   * <p>
7609   * Description: <b>Computationally friendly name of the example scenario</b><br>
7610   * Type: <b>string</b><br>
7611   * Path: <b>ExampleScenario.name</b><br>
7612   * </p>
7613   */
7614  @SearchParamDefinition(name="name", path="ExampleScenario.name", description="Computationally friendly name of the example scenario", type="string" )
7615  public static final String SP_NAME = "name";
7616 /**
7617   * <b>Fluent Client</b> search parameter constant for <b>name</b>
7618   * <p>
7619   * Description: <b>Computationally friendly name of the example scenario</b><br>
7620   * Type: <b>string</b><br>
7621   * Path: <b>ExampleScenario.name</b><br>
7622   * </p>
7623   */
7624  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
7625
7626 /**
7627   * Search parameter: <b>context</b>
7628   * <p>
7629   * Description: <b>A use context assigned to the example scenario</b><br>
7630   * Type: <b>token</b><br>
7631   * Path: <b>ExampleScenario.useContext.valueCodeableConcept</b><br>
7632   * </p>
7633   */
7634  @SearchParamDefinition(name="context", path="(ExampleScenario.useContext.value as CodeableConcept)", description="A use context assigned to the example scenario", type="token" )
7635  public static final String SP_CONTEXT = "context";
7636 /**
7637   * <b>Fluent Client</b> search parameter constant for <b>context</b>
7638   * <p>
7639   * Description: <b>A use context assigned to the example scenario</b><br>
7640   * Type: <b>token</b><br>
7641   * Path: <b>ExampleScenario.useContext.valueCodeableConcept</b><br>
7642   * </p>
7643   */
7644  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
7645
7646 /**
7647   * Search parameter: <b>publisher</b>
7648   * <p>
7649   * Description: <b>Name of the publisher of the example scenario</b><br>
7650   * Type: <b>string</b><br>
7651   * Path: <b>ExampleScenario.publisher</b><br>
7652   * </p>
7653   */
7654  @SearchParamDefinition(name="publisher", path="ExampleScenario.publisher", description="Name of the publisher of the example scenario", type="string" )
7655  public static final String SP_PUBLISHER = "publisher";
7656 /**
7657   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
7658   * <p>
7659   * Description: <b>Name of the publisher of the example scenario</b><br>
7660   * Type: <b>string</b><br>
7661   * Path: <b>ExampleScenario.publisher</b><br>
7662   * </p>
7663   */
7664  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
7665
7666 /**
7667   * Search parameter: <b>context-type-quantity</b>
7668   * <p>
7669   * Description: <b>A use context type and quantity- or range-based value assigned to the example scenario</b><br>
7670   * Type: <b>composite</b><br>
7671   * Path: <b></b><br>
7672   * </p>
7673   */
7674  @SearchParamDefinition(name="context-type-quantity", path="ExampleScenario.useContext", description="A use context type and quantity- or range-based value assigned to the example scenario", type="composite", compositeOf={"context-type", "context-quantity"} )
7675  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
7676 /**
7677   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
7678   * <p>
7679   * Description: <b>A use context type and quantity- or range-based value assigned to the example scenario</b><br>
7680   * Type: <b>composite</b><br>
7681   * Path: <b></b><br>
7682   * </p>
7683   */
7684  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
7685
7686 /**
7687   * Search parameter: <b>status</b>
7688   * <p>
7689   * Description: <b>The current status of the example scenario</b><br>
7690   * Type: <b>token</b><br>
7691   * Path: <b>ExampleScenario.status</b><br>
7692   * </p>
7693   */
7694  @SearchParamDefinition(name="status", path="ExampleScenario.status", description="The current status of the example scenario", type="token" )
7695  public static final String SP_STATUS = "status";
7696 /**
7697   * <b>Fluent Client</b> search parameter constant for <b>status</b>
7698   * <p>
7699   * Description: <b>The current status of the example scenario</b><br>
7700   * Type: <b>token</b><br>
7701   * Path: <b>ExampleScenario.status</b><br>
7702   * </p>
7703   */
7704  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
7705
7706
7707}
7708