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