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 EncounterDischargeDisposition { 038 039 /** 040 * The patient was dicharged and has indicated that they are going to return home afterwards. 041 */ 042 HOME, 043 /** 044 * The patient was discharged and has indicated that they are going to return home afterwards, but not the patient's home - e.g. a family member's home. 045 */ 046 ALTHOME, 047 /** 048 * The patient was transferred to another healthcare facility. 049 */ 050 OTHERHCF, 051 /** 052 * The patient has been discharged into palliative care. 053 */ 054 HOSP, 055 /** 056 * The patient has been discharged into long-term care where is likely to be monitored through an ongoing episode-of-care. 057 */ 058 LONG, 059 /** 060 * The patient self discharged against medical advice. 061 */ 062 AADVICE, 063 /** 064 * The patient has deceased during this encounter. 065 */ 066 EXP, 067 /** 068 * The patient has been transferred to a psychiatric facility. 069 */ 070 PSY, 071 /** 072 * The patient was discharged and is to receive post acute care rehabilitation services. 073 */ 074 REHAB, 075 /** 076 * The patient has been discharged to a skilled nursing facility for the patient to receive additional care. 077 */ 078 SNF, 079 /** 080 * The discharge disposition has not otherwise defined. 081 */ 082 OTH, 083 /** 084 * added to help the parsers 085 */ 086 NULL; 087 public static EncounterDischargeDisposition fromCode(String codeString) throws FHIRException { 088 if (codeString == null || "".equals(codeString)) 089 return null; 090 if ("home".equals(codeString)) 091 return HOME; 092 if ("alt-home".equals(codeString)) 093 return ALTHOME; 094 if ("other-hcf".equals(codeString)) 095 return OTHERHCF; 096 if ("hosp".equals(codeString)) 097 return HOSP; 098 if ("long".equals(codeString)) 099 return LONG; 100 if ("aadvice".equals(codeString)) 101 return AADVICE; 102 if ("exp".equals(codeString)) 103 return EXP; 104 if ("psy".equals(codeString)) 105 return PSY; 106 if ("rehab".equals(codeString)) 107 return REHAB; 108 if ("snf".equals(codeString)) 109 return SNF; 110 if ("oth".equals(codeString)) 111 return OTH; 112 throw new FHIRException("Unknown EncounterDischargeDisposition code '"+codeString+"'"); 113 } 114 public String toCode() { 115 switch (this) { 116 case HOME: return "home"; 117 case ALTHOME: return "alt-home"; 118 case OTHERHCF: return "other-hcf"; 119 case HOSP: return "hosp"; 120 case LONG: return "long"; 121 case AADVICE: return "aadvice"; 122 case EXP: return "exp"; 123 case PSY: return "psy"; 124 case REHAB: return "rehab"; 125 case SNF: return "snf"; 126 case OTH: return "oth"; 127 default: return "?"; 128 } 129 } 130 public String getSystem() { 131 return "http://hl7.org/fhir/discharge-disposition"; 132 } 133 public String getDefinition() { 134 switch (this) { 135 case HOME: return "The patient was dicharged and has indicated that they are going to return home afterwards."; 136 case ALTHOME: return "The patient was discharged and has indicated that they are going to return home afterwards, but not the patient's home - e.g. a family member's home."; 137 case OTHERHCF: return "The patient was transferred to another healthcare facility."; 138 case HOSP: return "The patient has been discharged into palliative care."; 139 case LONG: return "The patient has been discharged into long-term care where is likely to be monitored through an ongoing episode-of-care."; 140 case AADVICE: return "The patient self discharged against medical advice."; 141 case EXP: return "The patient has deceased during this encounter."; 142 case PSY: return "The patient has been transferred to a psychiatric facility."; 143 case REHAB: return "The patient was discharged and is to receive post acute care rehabilitation services."; 144 case SNF: return "The patient has been discharged to a skilled nursing facility for the patient to receive additional care."; 145 case OTH: return "The discharge disposition has not otherwise defined."; 146 default: return "?"; 147 } 148 } 149 public String getDisplay() { 150 switch (this) { 151 case HOME: return "Home"; 152 case ALTHOME: return "Alternative home"; 153 case OTHERHCF: return "Other healthcare facility"; 154 case HOSP: return "Hospice"; 155 case LONG: return "Long-term care"; 156 case AADVICE: return "Left against advice"; 157 case EXP: return "Expired"; 158 case PSY: return "Psychiatric hospital"; 159 case REHAB: return "Rehabilitation"; 160 case SNF: return "Skilled nursing facility"; 161 case OTH: return "Other"; 162 default: return "?"; 163 } 164 } 165 166 167} 168