001package org.hl7.fhir.r4.model.codesystems;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum BasicResourceType {
038
039        /**
040         * An assertion of permission for an activity or set of activities to occur, possibly subject to particular limitations; e.g. surgical consent, information disclosure consent, etc.
041         */
042        CONSENT, 
043        /**
044         * A request that care of a particular type be provided to a patient.  Could involve the transfer of care, a consult, etc.
045         */
046        REFERRAL, 
047        /**
048         * An undesired reaction caused by exposure to some agent (e.g. a medication, immunization, food, or environmental agent).
049         */
050        ADVEVENT, 
051        /**
052         * A request that a time be scheduled for a type of service for a specified patient, potentially subject to other constraints
053         */
054        APTMTREQ, 
055        /**
056         * The transition of a patient or set of material from one location to another
057         */
058        TRANSFER, 
059        /**
060         * The specification of a set of food and/or other nutritional material to be delivered to a patient.
061         */
062        DIET, 
063        /**
064         * An occurrence of a non-care-related event in the healthcare domain, such as approvals, reviews, etc.
065         */
066        ADMINACT, 
067        /**
068         * Record of a situation where a subject was exposed to a substance.  Usually of interest to public health.
069         */
070        EXPOSURE, 
071        /**
072         * A formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event
073         */
074        INVESTIGATION, 
075        /**
076         * A financial instrument used to track costs, charges or other amounts.
077         */
078        ACCOUNT, 
079        /**
080         * A request for payment for goods and/or services.  Includes the idea of a healthcare insurance claim.
081         */
082        INVOICE, 
083        /**
084         * The determination of what will be paid against a particular invoice based on coverage, plan rules, etc.
085         */
086        ADJUDICAT, 
087        /**
088         * A request for a pre-determination of the cost that would be paid under an insurance plan for a hypothetical claim for goods or services
089         */
090        PREDETREQ, 
091        /**
092         * An adjudication of what would be paid under an insurance plan for a hypothetical claim for goods or services
093         */
094        PREDETERMINE, 
095        /**
096         * An investigation to determine information about a particular therapy or product
097         */
098        STUDY, 
099        /**
100         * A set of (possibly conditional) steps to be taken to achieve some aim.  Includes study protocols, treatment protocols, emergency protocols, etc.
101         */
102        PROTOCOL, 
103        /**
104         * added to help the parsers
105         */
106        NULL;
107        public static BasicResourceType fromCode(String codeString) throws FHIRException {
108            if (codeString == null || "".equals(codeString))
109                return null;
110        if ("consent".equals(codeString))
111          return CONSENT;
112        if ("referral".equals(codeString))
113          return REFERRAL;
114        if ("advevent".equals(codeString))
115          return ADVEVENT;
116        if ("aptmtreq".equals(codeString))
117          return APTMTREQ;
118        if ("transfer".equals(codeString))
119          return TRANSFER;
120        if ("diet".equals(codeString))
121          return DIET;
122        if ("adminact".equals(codeString))
123          return ADMINACT;
124        if ("exposure".equals(codeString))
125          return EXPOSURE;
126        if ("investigation".equals(codeString))
127          return INVESTIGATION;
128        if ("account".equals(codeString))
129          return ACCOUNT;
130        if ("invoice".equals(codeString))
131          return INVOICE;
132        if ("adjudicat".equals(codeString))
133          return ADJUDICAT;
134        if ("predetreq".equals(codeString))
135          return PREDETREQ;
136        if ("predetermine".equals(codeString))
137          return PREDETERMINE;
138        if ("study".equals(codeString))
139          return STUDY;
140        if ("protocol".equals(codeString))
141          return PROTOCOL;
142        throw new FHIRException("Unknown BasicResourceType code '"+codeString+"'");
143        }
144        public String toCode() {
145          switch (this) {
146            case CONSENT: return "consent";
147            case REFERRAL: return "referral";
148            case ADVEVENT: return "advevent";
149            case APTMTREQ: return "aptmtreq";
150            case TRANSFER: return "transfer";
151            case DIET: return "diet";
152            case ADMINACT: return "adminact";
153            case EXPOSURE: return "exposure";
154            case INVESTIGATION: return "investigation";
155            case ACCOUNT: return "account";
156            case INVOICE: return "invoice";
157            case ADJUDICAT: return "adjudicat";
158            case PREDETREQ: return "predetreq";
159            case PREDETERMINE: return "predetermine";
160            case STUDY: return "study";
161            case PROTOCOL: return "protocol";
162            default: return "?";
163          }
164        }
165        public String getSystem() {
166          return "http://terminology.hl7.org/CodeSystem/basic-resource-type";
167        }
168        public String getDefinition() {
169          switch (this) {
170            case CONSENT: return "An assertion of permission for an activity or set of activities to occur, possibly subject to particular limitations; e.g. surgical consent, information disclosure consent, etc.";
171            case REFERRAL: return "A request that care of a particular type be provided to a patient.  Could involve the transfer of care, a consult, etc.";
172            case ADVEVENT: return "An undesired reaction caused by exposure to some agent (e.g. a medication, immunization, food, or environmental agent).";
173            case APTMTREQ: return "A request that a time be scheduled for a type of service for a specified patient, potentially subject to other constraints";
174            case TRANSFER: return "The transition of a patient or set of material from one location to another";
175            case DIET: return "The specification of a set of food and/or other nutritional material to be delivered to a patient.";
176            case ADMINACT: return "An occurrence of a non-care-related event in the healthcare domain, such as approvals, reviews, etc.";
177            case EXPOSURE: return "Record of a situation where a subject was exposed to a substance.  Usually of interest to public health.";
178            case INVESTIGATION: return "A formalized inquiry into the circumstances surrounding a particular unplanned event or potential event for the purposes of identifying possible causes and contributing factors for the event";
179            case ACCOUNT: return "A financial instrument used to track costs, charges or other amounts.";
180            case INVOICE: return "A request for payment for goods and/or services.  Includes the idea of a healthcare insurance claim.";
181            case ADJUDICAT: return "The determination of what will be paid against a particular invoice based on coverage, plan rules, etc.";
182            case PREDETREQ: return "A request for a pre-determination of the cost that would be paid under an insurance plan for a hypothetical claim for goods or services";
183            case PREDETERMINE: return "An adjudication of what would be paid under an insurance plan for a hypothetical claim for goods or services";
184            case STUDY: return "An investigation to determine information about a particular therapy or product";
185            case PROTOCOL: return "A set of (possibly conditional) steps to be taken to achieve some aim.  Includes study protocols, treatment protocols, emergency protocols, etc.";
186            default: return "?";
187          }
188        }
189        public String getDisplay() {
190          switch (this) {
191            case CONSENT: return "Consent";
192            case REFERRAL: return "Referral";
193            case ADVEVENT: return "Adverse Event";
194            case APTMTREQ: return "Appointment Request";
195            case TRANSFER: return "Transfer";
196            case DIET: return "Diet";
197            case ADMINACT: return "Administrative Activity";
198            case EXPOSURE: return "Exposure";
199            case INVESTIGATION: return "Investigation";
200            case ACCOUNT: return "Account";
201            case INVOICE: return "Invoice";
202            case ADJUDICAT: return "Invoice Adjudication";
203            case PREDETREQ: return "Pre-determination Request";
204            case PREDETERMINE: return "Predetermination";
205            case STUDY: return "Study";
206            case PROTOCOL: return "Protocol";
207            default: return "?";
208          }
209    }
210
211
212}
213