001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 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 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum LocationPhysicalType { 058 059 /** 060 * A collection of buildings or other locations such as a site or a campus. 061 */ 062 SI, 063 /** 064 * 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. 065 */ 066 BU, 067 /** 068 * A Wing within a Building, this often contains levels, rooms and corridors. 069 */ 070 WI, 071 /** 072 * A Ward is a section of a medical facility that may contain rooms and other types of location. 073 */ 074 WA, 075 /** 076 * A Level in a multi-level Building/Structure. 077 */ 078 LVL, 079 /** 080 * Any corridor within a Building, that may connect rooms. 081 */ 082 CO, 083 /** 084 * A space that is allocated as a room, it may have walls/roof etc., but does not require these. 085 */ 086 RO, 087 /** 088 * 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. 089 */ 090 BD, 091 /** 092 * A means of transportation. 093 */ 094 VE, 095 /** 096 * A residential dwelling. Usually used to reference a location that a person/patient may reside. 097 */ 098 HO, 099 /** 100 * A container that can store goods, equipment, medications or other items. 101 */ 102 CA, 103 /** 104 * A defined path to travel between 2 points that has a known name. 105 */ 106 RD, 107 /** 108 * A defined physical boundary of something, such as a flood risk zone, region, postcode 109 */ 110 AREA, 111 /** 112 * 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 113 */ 114 JDN, 115 /** 116 * added to help the parsers 117 */ 118 NULL; 119 public static LocationPhysicalType fromCode(String codeString) throws FHIRException { 120 if (codeString == null || "".equals(codeString)) 121 return null; 122 if ("si".equals(codeString)) 123 return SI; 124 if ("bu".equals(codeString)) 125 return BU; 126 if ("wi".equals(codeString)) 127 return WI; 128 if ("wa".equals(codeString)) 129 return WA; 130 if ("lvl".equals(codeString)) 131 return LVL; 132 if ("co".equals(codeString)) 133 return CO; 134 if ("ro".equals(codeString)) 135 return RO; 136 if ("bd".equals(codeString)) 137 return BD; 138 if ("ve".equals(codeString)) 139 return VE; 140 if ("ho".equals(codeString)) 141 return HO; 142 if ("ca".equals(codeString)) 143 return CA; 144 if ("rd".equals(codeString)) 145 return RD; 146 if ("area".equals(codeString)) 147 return AREA; 148 if ("jdn".equals(codeString)) 149 return JDN; 150 throw new FHIRException("Unknown LocationPhysicalType code '"+codeString+"'"); 151 } 152 public String toCode() { 153 switch (this) { 154 case SI: return "si"; 155 case BU: return "bu"; 156 case WI: return "wi"; 157 case WA: return "wa"; 158 case LVL: return "lvl"; 159 case CO: return "co"; 160 case RO: return "ro"; 161 case BD: return "bd"; 162 case VE: return "ve"; 163 case HO: return "ho"; 164 case CA: return "ca"; 165 case RD: return "rd"; 166 case AREA: return "area"; 167 case JDN: return "jdn"; 168 default: return "?"; 169 } 170 } 171 public String getSystem() { 172 return "http://terminology.hl7.org/CodeSystem/location-physical-type"; 173 } 174 public String getDefinition() { 175 switch (this) { 176 case SI: return "A collection of buildings or other locations such as a site or a campus."; 177 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."; 178 case WI: return "A Wing within a Building, this often contains levels, rooms and corridors."; 179 case WA: return "A Ward is a section of a medical facility that may contain rooms and other types of location."; 180 case LVL: return "A Level in a multi-level Building/Structure."; 181 case CO: return "Any corridor within a Building, that may connect rooms."; 182 case RO: return "A space that is allocated as a room, it may have walls/roof etc., but does not require these."; 183 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."; 184 case VE: return "A means of transportation."; 185 case HO: return "A residential dwelling. Usually used to reference a location that a person/patient may reside."; 186 case CA: return "A container that can store goods, equipment, medications or other items."; 187 case RD: return "A defined path to travel between 2 points that has a known name."; 188 case AREA: return "A defined physical boundary of something, such as a flood risk zone, region, postcode"; 189 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"; 190 default: return "?"; 191 } 192 } 193 public String getDisplay() { 194 switch (this) { 195 case SI: return "Site"; 196 case BU: return "Building"; 197 case WI: return "Wing"; 198 case WA: return "Ward"; 199 case LVL: return "Level"; 200 case CO: return "Corridor"; 201 case RO: return "Room"; 202 case BD: return "Bed"; 203 case VE: return "Vehicle"; 204 case HO: return "House"; 205 case CA: return "Cabinet"; 206 case RD: return "Road"; 207 case AREA: return "Area"; 208 case JDN: return "Jurisdiction"; 209 default: return "?"; 210 } 211 } 212 213 214} 215