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