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