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 MedicationrequestStatusReason { 041 042 /** 043 * 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. 044 */ 045 ALTCHOICE, 046 /** 047 * Clarification is required before the order can be acted upon. 048 */ 049 CLARIF, 050 /** 051 * 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. 052 */ 053 DRUGHIGH, 054 /** 055 * The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. 056 */ 057 HOSPADM, 058 /** 059 * The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. 060 */ 061 LABINT, 062 /** 063 * Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. 064 */ 065 NONAVAIL, 066 /** 067 * The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. 068 */ 069 PREG, 070 /** 071 * 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. 072 */ 073 SALG, 074 /** 075 * 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. 076 */ 077 SDDI, 078 /** 079 * 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. 080 */ 081 SDUPTHER, 082 /** 083 * 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. 084 */ 085 SINTOL, 086 /** 087 * 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. 088 */ 089 SURG, 090 /** 091 * 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. 092 */ 093 WASHOUT, 094 /** 095 * added to help the parsers 096 */ 097 NULL; 098 public static MedicationrequestStatusReason fromCode(String codeString) throws FHIRException { 099 if (codeString == null || "".equals(codeString)) 100 return null; 101 if ("altchoice".equals(codeString)) 102 return ALTCHOICE; 103 if ("clarif".equals(codeString)) 104 return CLARIF; 105 if ("drughigh".equals(codeString)) 106 return DRUGHIGH; 107 if ("hospadm".equals(codeString)) 108 return HOSPADM; 109 if ("labint".equals(codeString)) 110 return LABINT; 111 if ("non-avail".equals(codeString)) 112 return NONAVAIL; 113 if ("preg".equals(codeString)) 114 return PREG; 115 if ("salg".equals(codeString)) 116 return SALG; 117 if ("sddi".equals(codeString)) 118 return SDDI; 119 if ("sdupther".equals(codeString)) 120 return SDUPTHER; 121 if ("sintol".equals(codeString)) 122 return SINTOL; 123 if ("surg".equals(codeString)) 124 return SURG; 125 if ("washout".equals(codeString)) 126 return WASHOUT; 127 throw new FHIRException("Unknown MedicationrequestStatusReason code '"+codeString+"'"); 128 } 129 public String toCode() { 130 switch (this) { 131 case ALTCHOICE: return "altchoice"; 132 case CLARIF: return "clarif"; 133 case DRUGHIGH: return "drughigh"; 134 case HOSPADM: return "hospadm"; 135 case LABINT: return "labint"; 136 case NONAVAIL: return "non-avail"; 137 case PREG: return "preg"; 138 case SALG: return "salg"; 139 case SDDI: return "sddi"; 140 case SDUPTHER: return "sdupther"; 141 case SINTOL: return "sintol"; 142 case SURG: return "surg"; 143 case WASHOUT: return "washout"; 144 default: return "?"; 145 } 146 } 147 public String getSystem() { 148 return "http://terminology.hl7.org/CodeSystem/medicationrequest-status-reason"; 149 } 150 public String getDefinition() { 151 switch (this) { 152 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."; 153 case CLARIF: return "Clarification is required before the order can be acted upon."; 154 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."; 155 case HOSPADM: return "The patient has been admitted to a care facility and their community medications are suspended until hospital discharge."; 156 case LABINT: return "The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed."; 157 case NONAVAIL: return "Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason."; 158 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."; 159 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."; 160 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."; 161 case SDUPTHER: 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."; 162 case SINTOL: 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."; 163 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."; 164 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."; 165 default: return "?"; 166 } 167 } 168 public String getDisplay() { 169 switch (this) { 170 case ALTCHOICE: return "Try another treatment first"; 171 case CLARIF: return "Prescription requires clarification"; 172 case DRUGHIGH: return "Drug level too high"; 173 case HOSPADM: return "Admission to hospital"; 174 case LABINT: return "Lab interference issues"; 175 case NONAVAIL: return "Patient not available"; 176 case PREG: return "Parent is pregnant/breast feeding"; 177 case SALG: return "Allergy"; 178 case SDDI: return "Drug interacts with another drug"; 179 case SDUPTHER: return "Duplicate therapy"; 180 case SINTOL: return "Suspected intolerance"; 181 case SURG: return "Patient scheduled for surgery."; 182 case WASHOUT: return "Waiting for old drug to wash out"; 183 default: return "?"; 184 } 185 } 186 187 188}