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