001package org.hl7.fhir.r5.model.codesystems;
002
003/*
004 * #%L
005 * org.hl7.fhir.r5
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, Oct 17, 2019 09:42+1100 for FHIR v4.1.0
053
054
055import org.hl7.fhir.exceptions.FHIRException;
056
057public enum ServicePlace {
058
059        /**
060         * A facility or location where drugs and other medically related items and services are sold, dispensed, or otherwise provided directly to patients.
061         */
062        _01, 
063        /**
064         * A facility whose primary purpose is education.
065         */
066        _03, 
067        /**
068         * A facility or location whose primary purpose is to provide temporary housing to homeless individuals (e.g., emergency shelters, individual or family shelters).
069         */
070        _04, 
071        /**
072         * A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to American Indians and Alaska Natives who do not require hospitalization.
073         */
074        _05, 
075        /**
076         * A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services rendered by, or under the supervision of, physicians to American Indians and Alaska Natives admitted as inpatients or outpatients.
077         */
078        _06, 
079        /**
080         * A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members who do not require hospitalization.
081         */
082        _07, 
083        /**
084         * A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members admitted as inpatients or outpatients.
085         */
086        _08, 
087        /**
088         * A prison, jail, reformatory, work farm, detention center, or any other similar facility maintained by either Federal, State or local authorities for the purpose of confinement or rehabilitation of adult or juvenile criminal offenders.
089         */
090        _09, 
091        /**
092         * Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis.
093         */
094        _11, 
095        /**
096         * Location, other than a hospital or other facility, where the patient receives care in a private residence.
097         */
098        _12, 
099        /**
100         * Congregate residential facility with self-contained living units providing assessment of each resident's needs and on-site support 24 hours a day, 7 days a week, with the capacity to deliver or arrange for services including some health care and other services.
101         */
102        _13, 
103        /**
104         * A residence, with shared living areas, where clients receive supervision and other services such as social and/or behavioral services, custodial service, and minimal services (e.g., medication administration).
105         */
106        _14, 
107        /**
108         * A facility/unit that moves from place-to-place equipped to provide preventive, screening, diagnostic, and/or treatment services.
109         */
110        _15, 
111        /**
112         * portion of an off-campus hospital provider-based department which provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services to sick or injured persons who do not require hospitalization or institutionalization.
113         */
114        _19, 
115        /**
116         * Location, distinct from a hospital emergency room, an office, or a clinic, whose purpose is to diagnose and treat illness or injury for unscheduled, ambulatory patients seeking immediate medical attention.
117         */
118        _20, 
119        /**
120         * A facility, other than psychiatric, which primarily provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services by, or under, the supervision of physicians to patients admitted for a variety of medical conditions.
121         */
122        _21, 
123        /**
124         * A land vehicle specifically designed, equipped and staffed for lifesaving and transporting the sick or injured.
125         */
126        _41, 
127        /**
128         * added to help the parsers
129         */
130        NULL;
131        public static ServicePlace fromCode(String codeString) throws FHIRException {
132            if (codeString == null || "".equals(codeString))
133                return null;
134        if ("01".equals(codeString))
135          return _01;
136        if ("03".equals(codeString))
137          return _03;
138        if ("04".equals(codeString))
139          return _04;
140        if ("05".equals(codeString))
141          return _05;
142        if ("06".equals(codeString))
143          return _06;
144        if ("07".equals(codeString))
145          return _07;
146        if ("08".equals(codeString))
147          return _08;
148        if ("09".equals(codeString))
149          return _09;
150        if ("11".equals(codeString))
151          return _11;
152        if ("12".equals(codeString))
153          return _12;
154        if ("13".equals(codeString))
155          return _13;
156        if ("14".equals(codeString))
157          return _14;
158        if ("15".equals(codeString))
159          return _15;
160        if ("19".equals(codeString))
161          return _19;
162        if ("20".equals(codeString))
163          return _20;
164        if ("21".equals(codeString))
165          return _21;
166        if ("41".equals(codeString))
167          return _41;
168        throw new FHIRException("Unknown ServicePlace code '"+codeString+"'");
169        }
170        public String toCode() {
171          switch (this) {
172            case _01: return "01";
173            case _03: return "03";
174            case _04: return "04";
175            case _05: return "05";
176            case _06: return "06";
177            case _07: return "07";
178            case _08: return "08";
179            case _09: return "09";
180            case _11: return "11";
181            case _12: return "12";
182            case _13: return "13";
183            case _14: return "14";
184            case _15: return "15";
185            case _19: return "19";
186            case _20: return "20";
187            case _21: return "21";
188            case _41: return "41";
189            default: return "?";
190          }
191        }
192        public String getSystem() {
193          return "http://terminology.hl7.org/CodeSystem/ex-serviceplace";
194        }
195        public String getDefinition() {
196          switch (this) {
197            case _01: return "A facility or location where drugs and other medically related items and services are sold, dispensed, or otherwise provided directly to patients.";
198            case _03: return "A facility whose primary purpose is education.";
199            case _04: return "A facility or location whose primary purpose is to provide temporary housing to homeless individuals (e.g., emergency shelters, individual or family shelters).";
200            case _05: return "A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to American Indians and Alaska Natives who do not require hospitalization.";
201            case _06: return "A facility or location, owned and operated by the Indian Health Service, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services rendered by, or under the supervision of, physicians to American Indians and Alaska Natives admitted as inpatients or outpatients.";
202            case _07: return "A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members who do not require hospitalization.";
203            case _08: return "A facility or location owned and operated by a federally recognized American Indian or Alaska Native tribe or tribal organization under a 638 agreement, which provides diagnostic, therapeutic (surgical and nonsurgical), and rehabilitation services to tribal members admitted as inpatients or outpatients.";
204            case _09: return "A prison, jail, reformatory, work farm, detention center, or any other similar facility maintained by either Federal, State or local authorities for the purpose of confinement or rehabilitation of adult or juvenile criminal offenders.";
205            case _11: return "Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis.";
206            case _12: return "Location, other than a hospital or other facility, where the patient receives care in a private residence.";
207            case _13: return "Congregate residential facility with self-contained living units providing assessment of each resident's needs and on-site support 24 hours a day, 7 days a week, with the capacity to deliver or arrange for services including some health care and other services.";
208            case _14: return "A residence, with shared living areas, where clients receive supervision and other services such as social and/or behavioral services, custodial service, and minimal services (e.g., medication administration).";
209            case _15: return "A facility/unit that moves from place-to-place equipped to provide preventive, screening, diagnostic, and/or treatment services.";
210            case _19: return "portion of an off-campus hospital provider-based department which provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services to sick or injured persons who do not require hospitalization or institutionalization.";
211            case _20: return "Location, distinct from a hospital emergency room, an office, or a clinic, whose purpose is to diagnose and treat illness or injury for unscheduled, ambulatory patients seeking immediate medical attention.";
212            case _21: return "A facility, other than psychiatric, which primarily provides diagnostic, therapeutic (both surgical and nonsurgical), and rehabilitation services by, or under, the supervision of physicians to patients admitted for a variety of medical conditions.";
213            case _41: return "A land vehicle specifically designed, equipped and staffed for lifesaving and transporting the sick or injured.";
214            default: return "?";
215          }
216        }
217        public String getDisplay() {
218          switch (this) {
219            case _01: return "Pharmacy";
220            case _03: return "School";
221            case _04: return "Homeless Shelter";
222            case _05: return "Indian Health Service Free-standing Facility";
223            case _06: return "Indian Health Service Provider-based Facility";
224            case _07: return "Tribal 638 Free-Standing Facility";
225            case _08: return "Tribal 638 Provider-Based Facility";
226            case _09: return "Prison/Correctional Facility";
227            case _11: return "Office";
228            case _12: return "Home";
229            case _13: return "Assisted Living Fa";
230            case _14: return "Group Home";
231            case _15: return "Mobile Unit";
232            case _19: return "Off Campus-Outpatient Hospital";
233            case _20: return "Urgent Care Facility";
234            case _21: return "Inpatient Hospital";
235            case _41: return "Ambulance—Land";
236            default: return "?";
237          }
238    }
239
240
241}
242