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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum LocationPhysicalType { 038 039 /** 040 * A collection of buildings or other locations such as a site or a campus. 041 */ 042 SI, 043 /** 044 * 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. 045 */ 046 BU, 047 /** 048 * A Wing within a Building, this often contains levels, rooms and corridors. 049 */ 050 WI, 051 /** 052 * A Ward is a section of a medical facility that may contain rooms and other types of location. 053 */ 054 WA, 055 /** 056 * A Level in a multi-level Building/Structure. 057 */ 058 LVL, 059 /** 060 * Any corridor within a Building, that may connect rooms. 061 */ 062 CO, 063 /** 064 * A space that is allocated as a room, it may have walls/roof etc., but does not require these. 065 */ 066 RO, 067 /** 068 * 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. 069 */ 070 BD, 071 /** 072 * A means of transportation. 073 */ 074 VE, 075 /** 076 * A residential dwelling. Usually used to reference a location that a person/patient may reside. 077 */ 078 HO, 079 /** 080 * A container that can store goods, equipment, medications or other items. 081 */ 082 CA, 083 /** 084 * A defined path to travel between 2 points that has a known name. 085 */ 086 RD, 087 /** 088 * A defined physical boundary of something, such as a flood risk zone, region, postcode 089 */ 090 AREA, 091 /** 092 * 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 boundry 093 */ 094 JDN, 095 /** 096 * added to help the parsers 097 */ 098 NULL; 099 public static LocationPhysicalType fromCode(String codeString) throws FHIRException { 100 if (codeString == null || "".equals(codeString)) 101 return null; 102 if ("si".equals(codeString)) 103 return SI; 104 if ("bu".equals(codeString)) 105 return BU; 106 if ("wi".equals(codeString)) 107 return WI; 108 if ("wa".equals(codeString)) 109 return WA; 110 if ("lvl".equals(codeString)) 111 return LVL; 112 if ("co".equals(codeString)) 113 return CO; 114 if ("ro".equals(codeString)) 115 return RO; 116 if ("bd".equals(codeString)) 117 return BD; 118 if ("ve".equals(codeString)) 119 return VE; 120 if ("ho".equals(codeString)) 121 return HO; 122 if ("ca".equals(codeString)) 123 return CA; 124 if ("rd".equals(codeString)) 125 return RD; 126 if ("area".equals(codeString)) 127 return AREA; 128 if ("jdn".equals(codeString)) 129 return JDN; 130 throw new FHIRException("Unknown LocationPhysicalType code '"+codeString+"'"); 131 } 132 public String toCode() { 133 switch (this) { 134 case SI: return "si"; 135 case BU: return "bu"; 136 case WI: return "wi"; 137 case WA: return "wa"; 138 case LVL: return "lvl"; 139 case CO: return "co"; 140 case RO: return "ro"; 141 case BD: return "bd"; 142 case VE: return "ve"; 143 case HO: return "ho"; 144 case CA: return "ca"; 145 case RD: return "rd"; 146 case AREA: return "area"; 147 case JDN: return "jdn"; 148 default: return "?"; 149 } 150 } 151 public String getSystem() { 152 return "http://hl7.org/fhir/location-physical-type"; 153 } 154 public String getDefinition() { 155 switch (this) { 156 case SI: return "A collection of buildings or other locations such as a site or a campus."; 157 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."; 158 case WI: return "A Wing within a Building, this often contains levels, rooms and corridors."; 159 case WA: return "A Ward is a section of a medical facility that may contain rooms and other types of location."; 160 case LVL: return "A Level in a multi-level Building/Structure."; 161 case CO: return "Any corridor within a Building, that may connect rooms."; 162 case RO: return "A space that is allocated as a room, it may have walls/roof etc., but does not require these."; 163 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."; 164 case VE: return "A means of transportation."; 165 case HO: return "A residential dwelling. Usually used to reference a location that a person/patient may reside."; 166 case CA: return "A container that can store goods, equipment, medications or other items."; 167 case RD: return "A defined path to travel between 2 points that has a known name."; 168 case AREA: return "A defined physical boundary of something, such as a flood risk zone, region, postcode"; 169 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 boundry"; 170 default: return "?"; 171 } 172 } 173 public String getDisplay() { 174 switch (this) { 175 case SI: return "Site"; 176 case BU: return "Building"; 177 case WI: return "Wing"; 178 case WA: return "Ward"; 179 case LVL: return "Level"; 180 case CO: return "Corridor"; 181 case RO: return "Room"; 182 case BD: return "Bed"; 183 case VE: return "Vehicle"; 184 case HO: return "House"; 185 case CA: return "Cabinet"; 186 case RD: return "Road"; 187 case AREA: return "Area"; 188 case JDN: return "Jurisdiction"; 189 default: return "?"; 190 } 191 } 192 193 194} 195