001package org.hl7.fhir.instance.model.valuesets;
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 Wed, Nov 11, 2015 10:54-0500 for FHIR v1.0.2
033
034
035public enum LocationPhysicalType {
036
037        /**
038         * Any Building or structure. This may contain rooms, corridors, wings, etc. It may not have walls, or a roof, but is considered a defined/allocated space.
039         */
040        BU, 
041        /**
042         * A Wing within a Building, this often contains levels, rooms and corridors.
043         */
044        WI, 
045        /**
046         * A Level in a multi-level Building/Structure.
047         */
048        LVL, 
049        /**
050         * Any corridor within a Building, that is not within.
051         */
052        CO, 
053        /**
054         * A space that is allocated as a room, it may have walls/roof etc., but does not require these.
055         */
056        RO, 
057        /**
058         * A space that is allocated for sleeping/laying on.
059         */
060        BD, 
061        /**
062         * A means of transportation.
063         */
064        VE, 
065        /**
066         * A residential dwelling. Usually used to reference a location that a person/patient may reside.
067         */
068        HO, 
069        /**
070         * A container that can store goods, equipment, medications or other items.
071         */
072        CA, 
073        /**
074         * A defined path to travel between 2 points that has a known name.
075         */
076        RD, 
077        /**
078         * 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).
079         */
080        JDN, 
081        /**
082         * A defined boundary, such as a state, region, country, county
083         */
084        AREA, 
085        /**
086         * added to help the parsers
087         */
088        NULL;
089        public static LocationPhysicalType fromCode(String codeString) throws Exception {
090            if (codeString == null || "".equals(codeString))
091                return null;
092        if ("bu".equals(codeString))
093          return BU;
094        if ("wi".equals(codeString))
095          return WI;
096        if ("lvl".equals(codeString))
097          return LVL;
098        if ("co".equals(codeString))
099          return CO;
100        if ("ro".equals(codeString))
101          return RO;
102        if ("bd".equals(codeString))
103          return BD;
104        if ("ve".equals(codeString))
105          return VE;
106        if ("ho".equals(codeString))
107          return HO;
108        if ("ca".equals(codeString))
109          return CA;
110        if ("rd".equals(codeString))
111          return RD;
112        if ("jdn".equals(codeString))
113          return JDN;
114        if ("area".equals(codeString))
115          return AREA;
116        throw new Exception("Unknown LocationPhysicalType code '"+codeString+"'");
117        }
118        public String toCode() {
119          switch (this) {
120            case BU: return "bu";
121            case WI: return "wi";
122            case LVL: return "lvl";
123            case CO: return "co";
124            case RO: return "ro";
125            case BD: return "bd";
126            case VE: return "ve";
127            case HO: return "ho";
128            case CA: return "ca";
129            case RD: return "rd";
130            case JDN: return "jdn";
131            case AREA: return "area";
132            default: return "?";
133          }
134        }
135        public String getSystem() {
136          return "http://hl7.org/fhir/location-physical-type";
137        }
138        public String getDefinition() {
139          switch (this) {
140            case BU: return "Any Building or structure. This may contain rooms, corridors, wings, etc. It may not have walls, or a roof, but is considered a defined/allocated space.";
141            case WI: return "A Wing within a Building, this often contains levels, rooms and corridors.";
142            case LVL: return "A Level in a multi-level Building/Structure.";
143            case CO: return "Any corridor within a Building, that is not within.";
144            case RO: return "A space that is allocated as a room, it may have walls/roof etc., but does not require these.";
145            case BD: return "A space that is allocated for sleeping/laying on.";
146            case VE: return "A means of transportation.";
147            case HO: return "A residential dwelling. Usually used to reference a location that a person/patient may reside.";
148            case CA: return "A container that can store goods, equipment, medications or other items.";
149            case RD: return "A defined path to travel between 2 points that has a known name.";
150            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).";
151            case AREA: return "A defined boundary, such as a state, region, country, county";
152            default: return "?";
153          }
154        }
155        public String getDisplay() {
156          switch (this) {
157            case BU: return "Building";
158            case WI: return "Wing";
159            case LVL: return "Level";
160            case CO: return "Corridor";
161            case RO: return "Room";
162            case BD: return "Bed";
163            case VE: return "Vehicle";
164            case HO: return "House";
165            case CA: return "Cabinet";
166            case RD: return "Road";
167            case JDN: return "Jurisdiction";
168            case AREA: return "Area";
169            default: return "?";
170          }
171    }
172
173
174}
175