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