001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum MedicationrequestStatusReason { 059 060 /** 061 * 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. 062 */ 063 ALTCHOICE, 064 /** 065 * Clarification is required before the order can be acted upon. 066 */ 067 CLARIF, 068 /** 069 * 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. 070 */ 071 DRUGHIGH, 072 /** 073 * The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. 074 */ 075 HOSPADM, 076 /** 077 * The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. 078 */ 079 LABINT, 080 /** 081 * Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. 082 */ 083 NONAVAIL, 084 /** 085 * The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. 086 */ 087 PREG, 088 /** 089 * 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. 090 */ 091 SALG, 092 /** 093 * 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. 094 */ 095 SDDI, 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 SDUPTHER, 100 /** 101 * 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. 102 */ 103 SINTOL, 104 /** 105 * 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. 106 */ 107 SURG, 108 /** 109 * 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. 110 */ 111 WASHOUT, 112 /** 113 * added to help the parsers 114 */ 115 NULL; 116 public static MedicationrequestStatusReason fromCode(String codeString) throws FHIRException { 117 if (codeString == null || "".equals(codeString)) 118 return null; 119 if ("altchoice".equals(codeString)) 120 return ALTCHOICE; 121 if ("clarif".equals(codeString)) 122 return CLARIF; 123 if ("drughigh".equals(codeString)) 124 return DRUGHIGH; 125 if ("hospadm".equals(codeString)) 126 return HOSPADM; 127 if ("labint".equals(codeString)) 128 return LABINT; 129 if ("non-avail".equals(codeString)) 130 return NONAVAIL; 131 if ("preg".equals(codeString)) 132 return PREG; 133 if ("salg".equals(codeString)) 134 return SALG; 135 if ("sddi".equals(codeString)) 136 return SDDI; 137 if ("sdupther".equals(codeString)) 138 return SDUPTHER; 139 if ("sintol".equals(codeString)) 140 return SINTOL; 141 if ("surg".equals(codeString)) 142 return SURG; 143 if ("washout".equals(codeString)) 144 return WASHOUT; 145 throw new FHIRException("Unknown MedicationrequestStatusReason code '"+codeString+"'"); 146 } 147 public String toCode() { 148 switch (this) { 149 case ALTCHOICE: return "altchoice"; 150 case CLARIF: return "clarif"; 151 case DRUGHIGH: return "drughigh"; 152 case HOSPADM: return "hospadm"; 153 case LABINT: return "labint"; 154 case NONAVAIL: return "non-avail"; 155 case PREG: return "preg"; 156 case SALG: return "salg"; 157 case SDDI: return "sddi"; 158 case SDUPTHER: return "sdupther"; 159 case SINTOL: return "sintol"; 160 case SURG: return "surg"; 161 case WASHOUT: return "washout"; 162 default: return "?"; 163 } 164 } 165 public String getSystem() { 166 return "http://terminology.hl7.org/CodeSystem/medicationrequest-status-reason"; 167 } 168 public String getDefinition() { 169 switch (this) { 170 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."; 171 case CLARIF: return "Clarification is required before the order can be acted upon."; 172 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."; 173 case HOSPADM: return "The patient has been admitted to a care facility and their community medications are suspended until hospital discharge."; 174 case LABINT: return "The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed."; 175 case NONAVAIL: return "Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason."; 176 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."; 177 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."; 178 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."; 179 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."; 180 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."; 181 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."; 182 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."; 183 default: return "?"; 184 } 185 } 186 public String getDisplay() { 187 switch (this) { 188 case ALTCHOICE: return "Try another treatment first"; 189 case CLARIF: return "Prescription requires clarification"; 190 case DRUGHIGH: return "Drug level too high"; 191 case HOSPADM: return "Admission to hospital"; 192 case LABINT: return "Lab interference issues"; 193 case NONAVAIL: return "Patient not available"; 194 case PREG: return "Parent is pregnant/breast feeding"; 195 case SALG: return "Allergy"; 196 case SDDI: return "Drug interacts with another drug"; 197 case SDUPTHER: return "Duplicate therapy"; 198 case SINTOL: return "Suspected intolerance"; 199 case SURG: return "Patient scheduled for surgery."; 200 case WASHOUT: return "Waiting for old drug to wash out"; 201 default: return "?"; 202 } 203 } 204 205 206} 207