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 V3ActPriority { 058 059 /** 060 * As soon as possible, next highest priority after stat. 061 */ 062 A, 063 /** 064 * Filler should contact the placer as soon as results are available, even for preliminary results. (Was "C" in HL7 version 2.3's reporting priority.) 065 */ 066 CR, 067 /** 068 * Filler should contact the placer (or target) to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) 069 */ 070 CS, 071 /** 072 * Filler should contact the placer to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) 073 */ 074 CSP, 075 /** 076 * Filler should contact the service recipient (target) to schedule the service. (Was "C" in HL7 version 2.3's TQ-priority component.) 077 */ 078 CSR, 079 /** 080 * Beneficial to the patient but not essential for survival. 081 */ 082 EL, 083 /** 084 * An unforeseen combination of circumstances or the resulting state that calls for immediate action. 085 */ 086 EM, 087 /** 088 * Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation. 089 */ 090 P, 091 /** 092 * An "as needed" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition. 093 */ 094 PRN, 095 /** 096 * Routine service, do at usual work hours. 097 */ 098 R, 099 /** 100 * A report should be prepared and sent as quickly as possible. 101 */ 102 RR, 103 /** 104 * With highest priority (e.g., emergency). 105 */ 106 S, 107 /** 108 * It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level). 109 */ 110 T, 111 /** 112 * Drug is to be used as directed by the prescriber. 113 */ 114 UD, 115 /** 116 * Calls for prompt action. 117 */ 118 UR, 119 /** 120 * added to help the parsers 121 */ 122 NULL; 123 public static V3ActPriority fromCode(String codeString) throws FHIRException { 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("A".equals(codeString)) 127 return A; 128 if ("CR".equals(codeString)) 129 return CR; 130 if ("CS".equals(codeString)) 131 return CS; 132 if ("CSP".equals(codeString)) 133 return CSP; 134 if ("CSR".equals(codeString)) 135 return CSR; 136 if ("EL".equals(codeString)) 137 return EL; 138 if ("EM".equals(codeString)) 139 return EM; 140 if ("P".equals(codeString)) 141 return P; 142 if ("PRN".equals(codeString)) 143 return PRN; 144 if ("R".equals(codeString)) 145 return R; 146 if ("RR".equals(codeString)) 147 return RR; 148 if ("S".equals(codeString)) 149 return S; 150 if ("T".equals(codeString)) 151 return T; 152 if ("UD".equals(codeString)) 153 return UD; 154 if ("UR".equals(codeString)) 155 return UR; 156 throw new FHIRException("Unknown V3ActPriority code '"+codeString+"'"); 157 } 158 public String toCode() { 159 switch (this) { 160 case A: return "A"; 161 case CR: return "CR"; 162 case CS: return "CS"; 163 case CSP: return "CSP"; 164 case CSR: return "CSR"; 165 case EL: return "EL"; 166 case EM: return "EM"; 167 case P: return "P"; 168 case PRN: return "PRN"; 169 case R: return "R"; 170 case RR: return "RR"; 171 case S: return "S"; 172 case T: return "T"; 173 case UD: return "UD"; 174 case UR: return "UR"; 175 default: return "?"; 176 } 177 } 178 public String getSystem() { 179 return "http://terminology.hl7.org/CodeSystem/v3-ActPriority"; 180 } 181 public String getDefinition() { 182 switch (this) { 183 case A: return "As soon as possible, next highest priority after stat."; 184 case CR: return "Filler should contact the placer as soon as results are available, even for preliminary results. (Was \"C\" in HL7 version 2.3's reporting priority.)"; 185 case CS: return "Filler should contact the placer (or target) to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; 186 case CSP: return "Filler should contact the placer to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; 187 case CSR: return "Filler should contact the service recipient (target) to schedule the service. (Was \"C\" in HL7 version 2.3's TQ-priority component.)"; 188 case EL: return "Beneficial to the patient but not essential for survival."; 189 case EM: return "An unforeseen combination of circumstances or the resulting state that calls for immediate action."; 190 case P: return "Used to indicate that a service is to be performed prior to a scheduled surgery. When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service. When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation."; 191 case PRN: return "An \"as needed\" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition."; 192 case R: return "Routine service, do at usual work hours."; 193 case RR: return "A report should be prepared and sent as quickly as possible."; 194 case S: return "With highest priority (e.g., emergency)."; 195 case T: return "It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level)."; 196 case UD: return "Drug is to be used as directed by the prescriber."; 197 case UR: return "Calls for prompt action."; 198 default: return "?"; 199 } 200 } 201 public String getDisplay() { 202 switch (this) { 203 case A: return "ASAP"; 204 case CR: return "callback results"; 205 case CS: return "callback for scheduling"; 206 case CSP: return "callback placer for scheduling"; 207 case CSR: return "contact recipient for scheduling"; 208 case EL: return "elective"; 209 case EM: return "emergency"; 210 case P: return "preop"; 211 case PRN: return "as needed"; 212 case R: return "routine"; 213 case RR: return "rush reporting"; 214 case S: return "stat"; 215 case T: return "timing critical"; 216 case UD: return "use as directed"; 217 case UR: return "urgent"; 218 default: return "?"; 219 } 220 } 221 222 223} 224