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