001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 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/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum MedicationdispenseStatusReason { 059 060 /** 061 * The order has been stopped by the prescriber but this fact has not necessarily captured electronically. Example: A verbal stop, a fax, etc. 062 */ 063 FRR01, 064 /** 065 * Order has not been fulfilled within a reasonable amount of time, and might not be current. 066 */ 067 FRR02, 068 /** 069 * Data needed to safely act on the order which was expected to become available independent of the order is not yet available. Example: Lab results, diagnostic imaging, etc. 070 */ 071 FRR03, 072 /** 073 * Product not available or manufactured. Cannot supply. 074 */ 075 FRR04, 076 /** 077 * The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product. 078 */ 079 FRR05, 080 /** 081 * Fulfiller not able to provide appropriate care associated with fulfilling the order. Example: Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc. 082 */ 083 FRR06, 084 /** 085 * This therapy has been ordered as a backup to a preferred therapy. This order will be released when and if the preferred therapy is unsuccessful. 086 */ 087 ALTCHOICE, 088 /** 089 * Clarification is required before the order can be acted upon. 090 */ 091 CLARIF, 092 /** 093 * The current level of the medication in the patient's system is too high. The medication is suspended to allow the level to subside to a safer level. 094 */ 095 DRUGHIGH, 096 /** 097 * The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. 098 */ 099 HOSPADM, 100 /** 101 * The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. 102 */ 103 LABINT, 104 /** 105 * Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. 106 */ 107 NONAVAIL, 108 /** 109 * The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. 110 */ 111 PREG, 112 /** 113 * The patient is believed to be allergic to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. 114 */ 115 SAIG, 116 /** 117 * The drug interacts with a short-term treatment that is more urgently required. This order will be resumed when the short-term treatment is complete. 118 */ 119 SDDI, 120 /** 121 * Another short-term co-occurring therapy fulfills the same purpose as this therapy. This therapy will be resumed when the co-occuring therapy is complete. 122 */ 123 SDUPTHER, 124 /** 125 * The patient is believed to have an intolerance to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. 126 */ 127 SINTOL, 128 /** 129 * The drug is contraindicated for patients receiving surgery and the patient is scheduled to be admitted for surgery in the near future. The drug will be resumed when the patient has sufficiently recovered from the surgery. 130 */ 131 SURG, 132 /** 133 * The patient was previously receiving a medication contraindicated with the current medication. The current medication will remain on hold until the prior medication has been cleansed from their system. 134 */ 135 WASHOUT, 136 /** 137 * Drug out of stock. Cannot supply. 138 */ 139 OUTOFSTOCK, 140 /** 141 * Drug no longer marketed Cannot supply. 142 */ 143 OFFMARKET, 144 /** 145 * added to help the parsers 146 */ 147 NULL; 148 public static MedicationdispenseStatusReason fromCode(String codeString) throws FHIRException { 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("frr01".equals(codeString)) 152 return FRR01; 153 if ("frr02".equals(codeString)) 154 return FRR02; 155 if ("frr03".equals(codeString)) 156 return FRR03; 157 if ("frr04".equals(codeString)) 158 return FRR04; 159 if ("frr05".equals(codeString)) 160 return FRR05; 161 if ("frr06".equals(codeString)) 162 return FRR06; 163 if ("altchoice".equals(codeString)) 164 return ALTCHOICE; 165 if ("clarif".equals(codeString)) 166 return CLARIF; 167 if ("drughigh".equals(codeString)) 168 return DRUGHIGH; 169 if ("hospadm".equals(codeString)) 170 return HOSPADM; 171 if ("labint".equals(codeString)) 172 return LABINT; 173 if ("non-avail".equals(codeString)) 174 return NONAVAIL; 175 if ("preg".equals(codeString)) 176 return PREG; 177 if ("saig".equals(codeString)) 178 return SAIG; 179 if ("sddi".equals(codeString)) 180 return SDDI; 181 if ("sdupther".equals(codeString)) 182 return SDUPTHER; 183 if ("sintol".equals(codeString)) 184 return SINTOL; 185 if ("surg".equals(codeString)) 186 return SURG; 187 if ("washout".equals(codeString)) 188 return WASHOUT; 189 if ("outofstock".equals(codeString)) 190 return OUTOFSTOCK; 191 if ("offmarket".equals(codeString)) 192 return OFFMARKET; 193 throw new FHIRException("Unknown MedicationdispenseStatusReason code '"+codeString+"'"); 194 } 195 public String toCode() { 196 switch (this) { 197 case FRR01: return "frr01"; 198 case FRR02: return "frr02"; 199 case FRR03: return "frr03"; 200 case FRR04: return "frr04"; 201 case FRR05: return "frr05"; 202 case FRR06: return "frr06"; 203 case ALTCHOICE: return "altchoice"; 204 case CLARIF: return "clarif"; 205 case DRUGHIGH: return "drughigh"; 206 case HOSPADM: return "hospadm"; 207 case LABINT: return "labint"; 208 case NONAVAIL: return "non-avail"; 209 case PREG: return "preg"; 210 case SAIG: return "saig"; 211 case SDDI: return "sddi"; 212 case SDUPTHER: return "sdupther"; 213 case SINTOL: return "sintol"; 214 case SURG: return "surg"; 215 case WASHOUT: return "washout"; 216 case OUTOFSTOCK: return "outofstock"; 217 case OFFMARKET: return "offmarket"; 218 default: return "?"; 219 } 220 } 221 public String getSystem() { 222 return "http://terminology.hl7.org/fhir/CodeSystem/medicationdispense-status-reason"; 223 } 224 public String getDefinition() { 225 switch (this) { 226 case FRR01: return "The order has been stopped by the prescriber but this fact has not necessarily captured electronically. Example: A verbal stop, a fax, etc."; 227 case FRR02: return "Order has not been fulfilled within a reasonable amount of time, and might not be current."; 228 case FRR03: return "Data needed to safely act on the order which was expected to become available independent of the order is not yet available. Example: Lab results, diagnostic imaging, etc."; 229 case FRR04: return "Product not available or manufactured. Cannot supply."; 230 case FRR05: return "The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product."; 231 case FRR06: return "Fulfiller not able to provide appropriate care associated with fulfilling the order. Example: Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc."; 232 case ALTCHOICE: return "This therapy has been ordered as a backup to a preferred therapy. This order will be released when and if the preferred therapy is unsuccessful."; 233 case CLARIF: return "Clarification is required before the order can be acted upon."; 234 case DRUGHIGH: return "The current level of the medication in the patient's system is too high. The medication is suspended to allow the level to subside to a safer level."; 235 case HOSPADM: return "The patient has been admitted to a care facility and their community medications are suspended until hospital discharge."; 236 case LABINT: return "The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed."; 237 case NONAVAIL: return "Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason."; 238 case PREG: return "The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding."; 239 case SAIG: return "The patient is believed to be allergic to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm."; 240 case SDDI: return "The drug interacts with a short-term treatment that is more urgently required. This order will be resumed when the short-term treatment is complete."; 241 case SDUPTHER: return "Another short-term co-occurring therapy fulfills the same purpose as this therapy. This therapy will be resumed when the co-occuring therapy is complete."; 242 case SINTOL: return "The patient is believed to have an intolerance to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm."; 243 case SURG: return "The drug is contraindicated for patients receiving surgery and the patient is scheduled to be admitted for surgery in the near future. The drug will be resumed when the patient has sufficiently recovered from the surgery."; 244 case WASHOUT: return "The patient was previously receiving a medication contraindicated with the current medication. The current medication will remain on hold until the prior medication has been cleansed from their system."; 245 case OUTOFSTOCK: return "Drug out of stock. Cannot supply."; 246 case OFFMARKET: return "Drug no longer marketed Cannot supply."; 247 default: return "?"; 248 } 249 } 250 public String getDisplay() { 251 switch (this) { 252 case FRR01: return "Order Stopped"; 253 case FRR02: return "Stale-dated Order"; 254 case FRR03: return "Incomplete data"; 255 case FRR04: return "Product unavailable"; 256 case FRR05: return "Ethical/religious"; 257 case FRR06: return "Unable to provide care"; 258 case ALTCHOICE: return "Try another treatment first"; 259 case CLARIF: return "Prescription/Request requires clarification"; 260 case DRUGHIGH: return "Drug level too high"; 261 case HOSPADM: return "Admission to hospital"; 262 case LABINT: return "Lab interference issues"; 263 case NONAVAIL: return "Patient not available"; 264 case PREG: return "Patient is pregnant or breastfeeding"; 265 case SAIG: return "Allergy"; 266 case SDDI: return "Drug interacts with another drug"; 267 case SDUPTHER: return "Duplicate therapy"; 268 case SINTOL: return "Suspected intolerance"; 269 case SURG: return "Patient scheduled for surgery"; 270 case WASHOUT: return "Washout"; 271 case OUTOFSTOCK: return "Drug not available - out of stock"; 272 case OFFMARKET: return "Drug not available - off market"; 273 default: return "?"; 274 } 275 } 276 277 278} 279