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 LocationPhysicalType {
059
060        /**
061         * A collection of buildings or other locations such as a site or a campus.
062         */
063        SI, 
064        /**
065         * Any Building or structure. This may contain rooms, corridors, wings, etc. It might not have walls, or a roof, but is considered a defined/allocated space.
066         */
067        BU, 
068        /**
069         * A Wing within a Building, this often contains levels, rooms and corridors.
070         */
071        WI, 
072        /**
073         * A Ward is a section of a medical facility that may contain rooms and other types of location.
074         */
075        WA, 
076        /**
077         * A Level in a multi-level Building/Structure.
078         */
079        LVL, 
080        /**
081         * Any corridor within a Building, that may connect rooms.
082         */
083        CO, 
084        /**
085         * A space that is allocated as a room, it may have walls/roof etc., but does not require these.
086         */
087        RO, 
088        /**
089         * A space that is allocated for sleeping/laying on. This is not the physical bed/trolley that may be moved about, but the space it may occupy.
090         */
091        BD, 
092        /**
093         * A means of transportation.
094         */
095        VE, 
096        /**
097         * A residential dwelling. Usually used to reference a location that a person/patient may reside.
098         */
099        HO, 
100        /**
101         * A container that can store goods, equipment, medications or other items.
102         */
103        CA, 
104        /**
105         * A defined path to travel between 2 points that has a known name.
106         */
107        RD, 
108        /**
109         * A defined physical boundary of something, such as a flood risk zone, region, postcode
110         */
111        AREA, 
112        /**
113         * A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health),  Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy), not just an physical boundary
114         */
115        JDN, 
116        /**
117         * added to help the parsers
118         */
119        NULL;
120        public static LocationPhysicalType fromCode(String codeString) throws FHIRException {
121            if (codeString == null || "".equals(codeString))
122                return null;
123        if ("si".equals(codeString))
124          return SI;
125        if ("bu".equals(codeString))
126          return BU;
127        if ("wi".equals(codeString))
128          return WI;
129        if ("wa".equals(codeString))
130          return WA;
131        if ("lvl".equals(codeString))
132          return LVL;
133        if ("co".equals(codeString))
134          return CO;
135        if ("ro".equals(codeString))
136          return RO;
137        if ("bd".equals(codeString))
138          return BD;
139        if ("ve".equals(codeString))
140          return VE;
141        if ("ho".equals(codeString))
142          return HO;
143        if ("ca".equals(codeString))
144          return CA;
145        if ("rd".equals(codeString))
146          return RD;
147        if ("area".equals(codeString))
148          return AREA;
149        if ("jdn".equals(codeString))
150          return JDN;
151        throw new FHIRException("Unknown LocationPhysicalType code '"+codeString+"'");
152        }
153        public String toCode() {
154          switch (this) {
155            case SI: return "si";
156            case BU: return "bu";
157            case WI: return "wi";
158            case WA: return "wa";
159            case LVL: return "lvl";
160            case CO: return "co";
161            case RO: return "ro";
162            case BD: return "bd";
163            case VE: return "ve";
164            case HO: return "ho";
165            case CA: return "ca";
166            case RD: return "rd";
167            case AREA: return "area";
168            case JDN: return "jdn";
169            default: return "?";
170          }
171        }
172        public String getSystem() {
173          return "http://terminology.hl7.org/CodeSystem/location-physical-type";
174        }
175        public String getDefinition() {
176          switch (this) {
177            case SI: return "A collection of buildings or other locations such as a site or a campus.";
178            case BU: return "Any Building or structure. This may contain rooms, corridors, wings, etc. It might not have walls, or a roof, but is considered a defined/allocated space.";
179            case WI: return "A Wing within a Building, this often contains levels, rooms and corridors.";
180            case WA: return "A Ward is a section of a medical facility that may contain rooms and other types of location.";
181            case LVL: return "A Level in a multi-level Building/Structure.";
182            case CO: return "Any corridor within a Building, that may connect rooms.";
183            case RO: return "A space that is allocated as a room, it may have walls/roof etc., but does not require these.";
184            case BD: return "A space that is allocated for sleeping/laying on. This is not the physical bed/trolley that may be moved about, but the space it may occupy.";
185            case VE: return "A means of transportation.";
186            case HO: return "A residential dwelling. Usually used to reference a location that a person/patient may reside.";
187            case CA: return "A container that can store goods, equipment, medications or other items.";
188            case RD: return "A defined path to travel between 2 points that has a known name.";
189            case AREA: return "A defined physical boundary of something, such as a flood risk zone, region, postcode";
190            case JDN: return "A wide scope that covers a conceptual domain, such as a Nation (Country wide community or Federal Government - e.g. Ministry of Health),  Province or State (community or Government), Business (throughout the enterprise), Nation with a business scope of an agency (e.g. CDC, FDA etc.) or a Business segment (UK Pharmacy), not just an physical boundary";
191            default: return "?";
192          }
193        }
194        public String getDisplay() {
195          switch (this) {
196            case SI: return "Site";
197            case BU: return "Building";
198            case WI: return "Wing";
199            case WA: return "Ward";
200            case LVL: return "Level";
201            case CO: return "Corridor";
202            case RO: return "Room";
203            case BD: return "Bed";
204            case VE: return "Vehicle";
205            case HO: return "House";
206            case CA: return "Cabinet";
207            case RD: return "Road";
208            case AREA: return "Area";
209            case JDN: return "Jurisdiction";
210            default: return "?";
211          }
212    }
213
214
215}
216