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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum MedDispenseStatusReason { 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. 061Example: Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc. 062 */ 063 FRR06, 064 /** 065 * 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. 066 */ 067 ALTCHOICE, 068 /** 069 * Clarification is required before the order can be acted upon. 070 */ 071 CLARIF, 072 /** 073 * 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. 074 */ 075 DRUGHIGH, 076 /** 077 * The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. 078 */ 079 HOSPADM, 080 /** 081 * The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. 082 */ 083 LABINT, 084 /** 085 * Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. 086 */ 087 NONAVAIL, 088 /** 089 * The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. 090 */ 091 PREG, 092 /** 093 * 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. 094 */ 095 SALG, 096 /** 097 * 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. 098 */ 099 SDDI, 100 /** 101 * 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. 102 */ 103 SDUPTHER, 104 /** 105 * 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. 106 */ 107 SINTOL, 108 /** 109 * 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. 110 */ 111 SURG, 112 /** 113 * 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. 114 */ 115 WASHOUT, 116 /** 117 * added to help the parsers 118 */ 119 NULL; 120 public static MedDispenseStatusReason fromCode(String codeString) throws FHIRException { 121 if (codeString == null || "".equals(codeString)) 122 return null; 123 if ("frr01".equals(codeString)) 124 return FRR01; 125 if ("frr02".equals(codeString)) 126 return FRR02; 127 if ("frr03".equals(codeString)) 128 return FRR03; 129 if ("frr04".equals(codeString)) 130 return FRR04; 131 if ("frr05".equals(codeString)) 132 return FRR05; 133 if ("frr06".equals(codeString)) 134 return FRR06; 135 if ("altchoice".equals(codeString)) 136 return ALTCHOICE; 137 if ("clarif".equals(codeString)) 138 return CLARIF; 139 if ("drughigh".equals(codeString)) 140 return DRUGHIGH; 141 if ("hospadm".equals(codeString)) 142 return HOSPADM; 143 if ("labint".equals(codeString)) 144 return LABINT; 145 if ("non-avail".equals(codeString)) 146 return NONAVAIL; 147 if ("preg".equals(codeString)) 148 return PREG; 149 if ("salg".equals(codeString)) 150 return SALG; 151 if ("sddi".equals(codeString)) 152 return SDDI; 153 if ("sdupther".equals(codeString)) 154 return SDUPTHER; 155 if ("sintol".equals(codeString)) 156 return SINTOL; 157 if ("surg".equals(codeString)) 158 return SURG; 159 if ("washout".equals(codeString)) 160 return WASHOUT; 161 throw new FHIRException("Unknown MedDispenseStatusReason code '"+codeString+"'"); 162 } 163 public String toCode() { 164 switch (this) { 165 case FRR01: return "frr01"; 166 case FRR02: return "frr02"; 167 case FRR03: return "frr03"; 168 case FRR04: return "frr04"; 169 case FRR05: return "frr05"; 170 case FRR06: return "frr06"; 171 case ALTCHOICE: return "altchoice"; 172 case CLARIF: return "clarif"; 173 case DRUGHIGH: return "drughigh"; 174 case HOSPADM: return "hospadm"; 175 case LABINT: return "labint"; 176 case NONAVAIL: return "non-avail"; 177 case PREG: return "preg"; 178 case SALG: return "salg"; 179 case SDDI: return "sddi"; 180 case SDUPTHER: return "sdupther"; 181 case SINTOL: return "sintol"; 182 case SURG: return "surg"; 183 case WASHOUT: return "washout"; 184 default: return "?"; 185 } 186 } 187 public String getSystem() { 188 return "http://hl7.org/fhir/med-dispense-status-reason"; 189 } 190 public String getDefinition() { 191 switch (this) { 192 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."; 193 case FRR02: return "Order has not been fulfilled within a reasonable amount of time, and might not be current."; 194 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."; 195 case FRR04: return "Product not available or manufactured. Cannot supply."; 196 case FRR05: return "The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product."; 197 case FRR06: return "Fulfiller not able to provide appropriate care associated with fulfilling the order.\nExample: Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc."; 198 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."; 199 case CLARIF: return "Clarification is required before the order can be acted upon."; 200 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."; 201 case HOSPADM: return "The patient has been admitted to a care facility and their community medications are suspended until hospital discharge."; 202 case LABINT: return "The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed."; 203 case NONAVAIL: return "Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason."; 204 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."; 205 case SALG: 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."; 206 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."; 207 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."; 208 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."; 209 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."; 210 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."; 211 default: return "?"; 212 } 213 } 214 public String getDisplay() { 215 switch (this) { 216 case FRR01: return "Order Stopped"; 217 case FRR02: return "Stale-dated order"; 218 case FRR03: return "Incomplete data"; 219 case FRR04: return "Product unavailable"; 220 case FRR05: return "Ethical/religious"; 221 case FRR06: return "Unable to provide care"; 222 case ALTCHOICE: return "Try another treatment first"; 223 case CLARIF: return "Prescription requires clarification"; 224 case DRUGHIGH: return "Drug level too high"; 225 case HOSPADM: return "Admission to hospital"; 226 case LABINT: return "Lab interference issues"; 227 case NONAVAIL: return "Patient not-available"; 228 case PREG: return "Parent is pregnant/breast feeding"; 229 case SALG: return "Allergy"; 230 case SDDI: return "Drug interacts with another drug"; 231 case SDUPTHER: return "Duplicate therapy"; 232 case SINTOL: return "Suspected intolerance"; 233 case SURG: return "Patient scheduled for surgery"; 234 case WASHOUT: return "Waiting for old drug to wash out"; 235 default: return "?"; 236 } 237 } 238 239 240} 241