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