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 V3EntityHandling { 058 059 /** 060 * Keep at ambient temperature, 22 +/- 2C 061 */ 062 AMB, 063 /** 064 * Critical to keep at body temperature 36-38C 065 */ 066 C37, 067 /** 068 * Critical ambient - must not be refrigerated or frozen. 069 */ 070 CAMB, 071 /** 072 * Critical. Do not expose to atmosphere. Do not uncap. 073 */ 074 CATM, 075 /** 076 * Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing. 077 */ 078 CFRZ, 079 /** 080 * Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing. 081 */ 082 CREF, 083 /** 084 * Deep Frozen -16 to -20C. 085 */ 086 DFRZ, 087 /** 088 * Keep in a dry environment 089 */ 090 DRY, 091 /** 092 * Keep frozen below 0 ?C 093 */ 094 FRZ, 095 /** 096 * Container is free of heavy metals, including lead. 097 */ 098 MTLF, 099 /** 100 * Keep in liquid nitrogen 101 */ 102 NTR, 103 /** 104 * Protect from light (eg. Wrap in aluminum foil). 105 */ 106 PRTL, 107 /** 108 * Do not shake 109 */ 110 PSA, 111 /** 112 * Protect against shock 113 */ 114 PSO, 115 /** 116 * Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence. 117 */ 118 REF, 119 /** 120 * Shake thoroughly before using 121 */ 122 SBU, 123 /** 124 * Ultra cold frozen -75 to -85C. Ultra cold freezer is typically at temperature of dry ice. 125 */ 126 UFRZ, 127 /** 128 * Keep upright, do not turn upside down 129 */ 130 UPR, 131 /** 132 * added to help the parsers 133 */ 134 NULL; 135 public static V3EntityHandling fromCode(String codeString) throws FHIRException { 136 if (codeString == null || "".equals(codeString)) 137 return null; 138 if ("AMB".equals(codeString)) 139 return AMB; 140 if ("C37".equals(codeString)) 141 return C37; 142 if ("CAMB".equals(codeString)) 143 return CAMB; 144 if ("CATM".equals(codeString)) 145 return CATM; 146 if ("CFRZ".equals(codeString)) 147 return CFRZ; 148 if ("CREF".equals(codeString)) 149 return CREF; 150 if ("DFRZ".equals(codeString)) 151 return DFRZ; 152 if ("DRY".equals(codeString)) 153 return DRY; 154 if ("FRZ".equals(codeString)) 155 return FRZ; 156 if ("MTLF".equals(codeString)) 157 return MTLF; 158 if ("NTR".equals(codeString)) 159 return NTR; 160 if ("PRTL".equals(codeString)) 161 return PRTL; 162 if ("PSA".equals(codeString)) 163 return PSA; 164 if ("PSO".equals(codeString)) 165 return PSO; 166 if ("REF".equals(codeString)) 167 return REF; 168 if ("SBU".equals(codeString)) 169 return SBU; 170 if ("UFRZ".equals(codeString)) 171 return UFRZ; 172 if ("UPR".equals(codeString)) 173 return UPR; 174 throw new FHIRException("Unknown V3EntityHandling code '"+codeString+"'"); 175 } 176 public String toCode() { 177 switch (this) { 178 case AMB: return "AMB"; 179 case C37: return "C37"; 180 case CAMB: return "CAMB"; 181 case CATM: return "CATM"; 182 case CFRZ: return "CFRZ"; 183 case CREF: return "CREF"; 184 case DFRZ: return "DFRZ"; 185 case DRY: return "DRY"; 186 case FRZ: return "FRZ"; 187 case MTLF: return "MTLF"; 188 case NTR: return "NTR"; 189 case PRTL: return "PRTL"; 190 case PSA: return "PSA"; 191 case PSO: return "PSO"; 192 case REF: return "REF"; 193 case SBU: return "SBU"; 194 case UFRZ: return "UFRZ"; 195 case UPR: return "UPR"; 196 default: return "?"; 197 } 198 } 199 public String getSystem() { 200 return "http://terminology.hl7.org/CodeSystem/v3-EntityHandling"; 201 } 202 public String getDefinition() { 203 switch (this) { 204 case AMB: return "Keep at ambient temperature, 22 +/- 2C"; 205 case C37: return "Critical to keep at body temperature 36-38C"; 206 case CAMB: return "Critical ambient - must not be refrigerated or frozen."; 207 case CATM: return "Critical. Do not expose to atmosphere. Do not uncap."; 208 case CFRZ: return "Critical frozen. Specimen must not be allowed to thaw until immediately prior to testing."; 209 case CREF: return "Critical refrigerated - must not be allowed to freeze or warm until imediately prior to testing."; 210 case DFRZ: return "Deep Frozen -16 to -20C."; 211 case DRY: return "Keep in a dry environment"; 212 case FRZ: return "Keep frozen below 0 ?C"; 213 case MTLF: return "Container is free of heavy metals, including lead."; 214 case NTR: return "Keep in liquid nitrogen"; 215 case PRTL: return "Protect from light (eg. Wrap in aluminum foil)."; 216 case PSA: return "Do not shake"; 217 case PSO: return "Protect against shock"; 218 case REF: return "Keep at refrigerated temperature:4-8C Accidental warming or freezing is of little consequence."; 219 case SBU: return "Shake thoroughly before using"; 220 case UFRZ: return "Ultra cold frozen -75 to -85C. Ultra cold freezer is typically at temperature of dry ice."; 221 case UPR: return "Keep upright, do not turn upside down"; 222 default: return "?"; 223 } 224 } 225 public String getDisplay() { 226 switch (this) { 227 case AMB: return "Ambient Temperature"; 228 case C37: return "Body Temperature"; 229 case CAMB: return "Critical Ambient temperature"; 230 case CATM: return "Protect from Air"; 231 case CFRZ: return "Critical frozen"; 232 case CREF: return "Critical refrigerated temperature"; 233 case DFRZ: return "Deep Frozen"; 234 case DRY: return "dry"; 235 case FRZ: return "frozen"; 236 case MTLF: return "Metal Free"; 237 case NTR: return "nitrogen"; 238 case PRTL: return "Protect from Light"; 239 case PSA: return "do not shake"; 240 case PSO: return "no shock"; 241 case REF: return "Refrigerated temperature"; 242 case SBU: return "Shake before use"; 243 case UFRZ: return "Ultra frozen"; 244 case UPR: return "upright"; 245 default: return "?"; 246 } 247 } 248 249 250} 251