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 MedicationdispenseStatusReason { 041 042 /** 043 * The order has been stopped by the prescriber but this fact has not necessarily captured electronically. Example: A verbal stop, a fax, etc. 044 */ 045 FRR01, 046 /** 047 * Order has not been fulfilled within a reasonable amount of time, and might not be current. 048 */ 049 FRR02, 050 /** 051 * 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. 052 */ 053 FRR03, 054 /** 055 * Product not available or manufactured. Cannot supply. 056 */ 057 FRR04, 058 /** 059 * The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product. 060 */ 061 FRR05, 062 /** 063 * 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. 064 */ 065 FRR06, 066 /** 067 * 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. 068 */ 069 ALTCHOICE, 070 /** 071 * Clarification is required before the order can be acted upon. 072 */ 073 CLARIF, 074 /** 075 * 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. 076 */ 077 DRUGHIGH, 078 /** 079 * The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. 080 */ 081 HOSPADM, 082 /** 083 * The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. 084 */ 085 LABINT, 086 /** 087 * Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. 088 */ 089 NONAVAIL, 090 /** 091 * The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. 092 */ 093 PREG, 094 /** 095 * 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. 096 */ 097 SAIG, 098 /** 099 * 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. 100 */ 101 SDDI, 102 /** 103 * 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. 104 */ 105 SDUPTHER, 106 /** 107 * 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. 108 */ 109 SINTOL, 110 /** 111 * 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. 112 */ 113 SURG, 114 /** 115 * 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. 116 */ 117 WASHOUT, 118 /** 119 * Drug out of stock. Cannot supply. 120 */ 121 OUTOFSTOCK, 122 /** 123 * Drug no longer marketed Cannot supply. 124 */ 125 OFFMARKET, 126 /** 127 * added to help the parsers 128 */ 129 NULL; 130 public static MedicationdispenseStatusReason fromCode(String codeString) throws FHIRException { 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("frr01".equals(codeString)) 134 return FRR01; 135 if ("frr02".equals(codeString)) 136 return FRR02; 137 if ("frr03".equals(codeString)) 138 return FRR03; 139 if ("frr04".equals(codeString)) 140 return FRR04; 141 if ("frr05".equals(codeString)) 142 return FRR05; 143 if ("frr06".equals(codeString)) 144 return FRR06; 145 if ("altchoice".equals(codeString)) 146 return ALTCHOICE; 147 if ("clarif".equals(codeString)) 148 return CLARIF; 149 if ("drughigh".equals(codeString)) 150 return DRUGHIGH; 151 if ("hospadm".equals(codeString)) 152 return HOSPADM; 153 if ("labint".equals(codeString)) 154 return LABINT; 155 if ("non-avail".equals(codeString)) 156 return NONAVAIL; 157 if ("preg".equals(codeString)) 158 return PREG; 159 if ("saig".equals(codeString)) 160 return SAIG; 161 if ("sddi".equals(codeString)) 162 return SDDI; 163 if ("sdupther".equals(codeString)) 164 return SDUPTHER; 165 if ("sintol".equals(codeString)) 166 return SINTOL; 167 if ("surg".equals(codeString)) 168 return SURG; 169 if ("washout".equals(codeString)) 170 return WASHOUT; 171 if ("outofstock".equals(codeString)) 172 return OUTOFSTOCK; 173 if ("offmarket".equals(codeString)) 174 return OFFMARKET; 175 throw new FHIRException("Unknown MedicationdispenseStatusReason code '"+codeString+"'"); 176 } 177 public String toCode() { 178 switch (this) { 179 case FRR01: return "frr01"; 180 case FRR02: return "frr02"; 181 case FRR03: return "frr03"; 182 case FRR04: return "frr04"; 183 case FRR05: return "frr05"; 184 case FRR06: return "frr06"; 185 case ALTCHOICE: return "altchoice"; 186 case CLARIF: return "clarif"; 187 case DRUGHIGH: return "drughigh"; 188 case HOSPADM: return "hospadm"; 189 case LABINT: return "labint"; 190 case NONAVAIL: return "non-avail"; 191 case PREG: return "preg"; 192 case SAIG: return "saig"; 193 case SDDI: return "sddi"; 194 case SDUPTHER: return "sdupther"; 195 case SINTOL: return "sintol"; 196 case SURG: return "surg"; 197 case WASHOUT: return "washout"; 198 case OUTOFSTOCK: return "outofstock"; 199 case OFFMARKET: return "offmarket"; 200 case NULL: return null; 201 default: return "?"; 202 } 203 } 204 public String getSystem() { 205 return "http://terminology.hl7.org/fhir/CodeSystem/medicationdispense-status-reason"; 206 } 207 public String getDefinition() { 208 switch (this) { 209 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."; 210 case FRR02: return "Order has not been fulfilled within a reasonable amount of time, and might not be current."; 211 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."; 212 case FRR04: return "Product not available or manufactured. Cannot supply."; 213 case FRR05: return "The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product."; 214 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."; 215 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."; 216 case CLARIF: return "Clarification is required before the order can be acted upon."; 217 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."; 218 case HOSPADM: return "The patient has been admitted to a care facility and their community medications are suspended until hospital discharge."; 219 case LABINT: return "The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed."; 220 case NONAVAIL: return "Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason."; 221 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."; 222 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."; 223 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."; 224 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."; 225 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."; 226 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."; 227 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."; 228 case OUTOFSTOCK: return "Drug out of stock. Cannot supply."; 229 case OFFMARKET: return "Drug no longer marketed Cannot supply."; 230 case NULL: return null; 231 default: return "?"; 232 } 233 } 234 public String getDisplay() { 235 switch (this) { 236 case FRR01: return "Order Stopped"; 237 case FRR02: return "Stale-dated Order"; 238 case FRR03: return "Incomplete data"; 239 case FRR04: return "Product unavailable"; 240 case FRR05: return "Ethical/religious"; 241 case FRR06: return "Unable to provide care"; 242 case ALTCHOICE: return "Try another treatment first"; 243 case CLARIF: return "Prescription/Request requires clarification"; 244 case DRUGHIGH: return "Drug level too high"; 245 case HOSPADM: return "Admission to hospital"; 246 case LABINT: return "Lab interference issues"; 247 case NONAVAIL: return "Patient not available"; 248 case PREG: return "Patient is pregnant or breastfeeding"; 249 case SAIG: return "Allergy"; 250 case SDDI: return "Drug interacts with another drug"; 251 case SDUPTHER: return "Duplicate therapy"; 252 case SINTOL: return "Suspected intolerance"; 253 case SURG: return "Patient scheduled for surgery"; 254 case WASHOUT: return "Washout"; 255 case OUTOFSTOCK: return "Drug not available - out of stock"; 256 case OFFMARKET: return "Drug not available - off market"; 257 case NULL: return null; 258 default: return "?"; 259 } 260 } 261 262 263}