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 ServicePlace {
059
060        /**
061         * A facility or location where drugs and other medically related items and services are sold, dispensed, or otherwise provided directly to patients.
062         */
063        _01, 
064        /**
065         * A facility whose primary purpose is education.
066         */
067        _03, 
068        /**
069         * A facility or location whose primary purpose is to provide temporary housing to homeless individuals (e.g., emergency shelters, individual or family shelters).
070         */
071        _04, 
072        /**
073         * 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.
074         */
075        _05, 
076        /**
077         * 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.
078         */
079        _06, 
080        /**
081         * 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.
082         */
083        _07, 
084        /**
085         * 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.
086         */
087        _08, 
088        /**
089         * 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.
090         */
091        _09, 
092        /**
093         * 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.
094         */
095        _11, 
096        /**
097         * Location, other than a hospital or other facility, where the patient receives care in a private residence.
098         */
099        _12, 
100        /**
101         * 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.
102         */
103        _13, 
104        /**
105         * 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).
106         */
107        _14, 
108        /**
109         * A facility/unit that moves from place-to-place equipped to provide preventive, screening, diagnostic, and/or treatment services.
110         */
111        _15, 
112        /**
113         * 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.
114         */
115        _19, 
116        /**
117         * 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.
118         */
119        _20, 
120        /**
121         * 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.
122         */
123        _21, 
124        /**
125         * A land vehicle specifically designed, equipped and staffed for lifesaving and transporting the sick or injured.
126         */
127        _41, 
128        /**
129         * added to help the parsers
130         */
131        NULL;
132        public static ServicePlace fromCode(String codeString) throws FHIRException {
133            if (codeString == null || "".equals(codeString))
134                return null;
135        if ("01".equals(codeString))
136          return _01;
137        if ("03".equals(codeString))
138          return _03;
139        if ("04".equals(codeString))
140          return _04;
141        if ("05".equals(codeString))
142          return _05;
143        if ("06".equals(codeString))
144          return _06;
145        if ("07".equals(codeString))
146          return _07;
147        if ("08".equals(codeString))
148          return _08;
149        if ("09".equals(codeString))
150          return _09;
151        if ("11".equals(codeString))
152          return _11;
153        if ("12".equals(codeString))
154          return _12;
155        if ("13".equals(codeString))
156          return _13;
157        if ("14".equals(codeString))
158          return _14;
159        if ("15".equals(codeString))
160          return _15;
161        if ("19".equals(codeString))
162          return _19;
163        if ("20".equals(codeString))
164          return _20;
165        if ("21".equals(codeString))
166          return _21;
167        if ("41".equals(codeString))
168          return _41;
169        throw new FHIRException("Unknown ServicePlace code '"+codeString+"'");
170        }
171        public String toCode() {
172          switch (this) {
173            case _01: return "01";
174            case _03: return "03";
175            case _04: return "04";
176            case _05: return "05";
177            case _06: return "06";
178            case _07: return "07";
179            case _08: return "08";
180            case _09: return "09";
181            case _11: return "11";
182            case _12: return "12";
183            case _13: return "13";
184            case _14: return "14";
185            case _15: return "15";
186            case _19: return "19";
187            case _20: return "20";
188            case _21: return "21";
189            case _41: return "41";
190            default: return "?";
191          }
192        }
193        public String getSystem() {
194          return "http://terminology.hl7.org/CodeSystem/ex-serviceplace";
195        }
196        public String getDefinition() {
197          switch (this) {
198            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.";
199            case _03: return "A facility whose primary purpose is education.";
200            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).";
201            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.";
202            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.";
203            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.";
204            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.";
205            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.";
206            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.";
207            case _12: return "Location, other than a hospital or other facility, where the patient receives care in a private residence.";
208            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.";
209            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).";
210            case _15: return "A facility/unit that moves from place-to-place equipped to provide preventive, screening, diagnostic, and/or treatment services.";
211            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.";
212            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.";
213            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.";
214            case _41: return "A land vehicle specifically designed, equipped and staffed for lifesaving and transporting the sick or injured.";
215            default: return "?";
216          }
217        }
218        public String getDisplay() {
219          switch (this) {
220            case _01: return "Pharmacy";
221            case _03: return "School";
222            case _04: return "Homeless Shelter";
223            case _05: return "Indian Health Service Free-standing Facility";
224            case _06: return "Indian Health Service Provider-based Facility";
225            case _07: return "Tribal 638 Free-Standing Facility";
226            case _08: return "Tribal 638 Provider-Based Facility";
227            case _09: return "Prison/Correctional Facility";
228            case _11: return "Office";
229            case _12: return "Home";
230            case _13: return "Assisted Living Fa";
231            case _14: return "Group Home";
232            case _15: return "Mobile Unit";
233            case _19: return "Off Campus-Outpatient Hospital";
234            case _20: return "Urgent Care Facility";
235            case _21: return "Inpatient Hospital";
236            case _41: return "Ambulance—Land";
237            default: return "?";
238          }
239    }
240
241
242}
243