001package org.hl7.fhir.dstu2016may.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 Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum HspcAdmissionSource { 041 042 /** 043 * The source of admission is from a clinic. 044 */ 045 _102702, 046 /** 047 * The source of admission is from a court or law enforcement 048 */ 049 _17567, 050 /** 051 * The source of admission is from an emergency department 052 */ 053 _17566, 054 /** 055 * The source of admission is from the individual's place of residence or employment 056 */ 057 _528129525, 058 /** 059 * The source of referral is from a health management organization 060 */ 061 _102703, 062 /** 063 * The source of admission is a transfer from one area of the hospital to another 064 */ 065 _219107, 066 /** 067 * The source of the newborn admission is from a facility not associate with the organization 068 */ 069 _528129526, 070 /** 071 * The source of admission is a routine birth of a newborn at an internal birthing facility 072 */ 073 _154642, 074 /** 075 * The patient was referred for admission by a physician 076 */ 077 _102701, 078 /** 079 * The source of admission is a premature birth at an internal birthing facility 080 */ 081 _528129527, 082 /** 083 * The patient was readmitted to the same home health agency as the previous admission 084 */ 085 _510105657, 086 /** 087 * The admission is due to an infant becoming ill at an internal neborn facility 088 */ 089 _528129528, 090 /** 091 * The source of admission is an external critical care access facility 092 */ 093 _510105655, 094 /** 095 * The source of admission is an external hospital 096 */ 097 _102704, 098 /** 099 * The source of admission is a transfer from a skilled nursing facility 100 */ 101 _14689616, 102 /** 103 * The source of admission is a transfer from an acute care hospital 104 */ 105 _528129529, 106 /** 107 * The source of admission is a transfer from an ambulatory surgery facility 108 */ 109 _520442099, 110 /** 111 * The source of admission is a transfer from an external facility 112 */ 113 _14690444, 114 /** 115 * The source of admission is a transfer from an external home health agency 116 */ 117 _510105656, 118 /** 119 * The source of admission is a transfer from a hospice facility 120 */ 121 _528129530, 122 /** 123 * The source of admission is a transfer from a psychiatric, substance abuse, or rehabilitation facility 124 */ 125 _510105654, 126 /** 127 * added to help the parsers 128 */ 129 NULL; 130 public static HspcAdmissionSource fromCode(String codeString) throws FHIRException { 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("102702".equals(codeString)) 134 return _102702; 135 if ("17567".equals(codeString)) 136 return _17567; 137 if ("17566".equals(codeString)) 138 return _17566; 139 if ("528129525".equals(codeString)) 140 return _528129525; 141 if ("102703".equals(codeString)) 142 return _102703; 143 if ("219107".equals(codeString)) 144 return _219107; 145 if ("528129526".equals(codeString)) 146 return _528129526; 147 if ("154642".equals(codeString)) 148 return _154642; 149 if ("102701".equals(codeString)) 150 return _102701; 151 if ("528129527".equals(codeString)) 152 return _528129527; 153 if ("510105657".equals(codeString)) 154 return _510105657; 155 if ("528129528".equals(codeString)) 156 return _528129528; 157 if ("510105655".equals(codeString)) 158 return _510105655; 159 if ("102704".equals(codeString)) 160 return _102704; 161 if ("14689616".equals(codeString)) 162 return _14689616; 163 if ("528129529".equals(codeString)) 164 return _528129529; 165 if ("520442099".equals(codeString)) 166 return _520442099; 167 if ("14690444".equals(codeString)) 168 return _14690444; 169 if ("510105656".equals(codeString)) 170 return _510105656; 171 if ("528129530".equals(codeString)) 172 return _528129530; 173 if ("510105654".equals(codeString)) 174 return _510105654; 175 throw new FHIRException("Unknown HspcAdmissionSource code '"+codeString+"'"); 176 } 177 public String toCode() { 178 switch (this) { 179 case _102702: return "102702"; 180 case _17567: return "17567"; 181 case _17566: return "17566"; 182 case _528129525: return "528129525"; 183 case _102703: return "102703"; 184 case _219107: return "219107"; 185 case _528129526: return "528129526"; 186 case _154642: return "154642"; 187 case _102701: return "102701"; 188 case _528129527: return "528129527"; 189 case _510105657: return "510105657"; 190 case _528129528: return "528129528"; 191 case _510105655: return "510105655"; 192 case _102704: return "102704"; 193 case _14689616: return "14689616"; 194 case _528129529: return "528129529"; 195 case _520442099: return "520442099"; 196 case _14690444: return "14690444"; 197 case _510105656: return "510105656"; 198 case _528129530: return "528129530"; 199 case _510105654: return "510105654"; 200 case NULL: return null; 201 default: return "?"; 202 } 203 } 204 public String getSystem() { 205 return "http://hl7.org/fhir/hspc-admissionSource"; 206 } 207 public String getDefinition() { 208 switch (this) { 209 case _102702: return "The source of admission is from a clinic."; 210 case _17567: return "The source of admission is from a court or law enforcement"; 211 case _17566: return "The source of admission is from an emergency department"; 212 case _528129525: return "The source of admission is from the individual's place of residence or employment"; 213 case _102703: return "The source of referral is from a health management organization"; 214 case _219107: return "The source of admission is a transfer from one area of the hospital to another"; 215 case _528129526: return "The source of the newborn admission is from a facility not associate with the organization"; 216 case _154642: return "The source of admission is a routine birth of a newborn at an internal birthing facility"; 217 case _102701: return "The patient was referred for admission by a physician"; 218 case _528129527: return "The source of admission is a premature birth at an internal birthing facility"; 219 case _510105657: return "The patient was readmitted to the same home health agency as the previous admission"; 220 case _528129528: return "The admission is due to an infant becoming ill at an internal neborn facility"; 221 case _510105655: return "The source of admission is an external critical care access facility"; 222 case _102704: return "The source of admission is an external hospital"; 223 case _14689616: return "The source of admission is a transfer from a skilled nursing facility"; 224 case _528129529: return "The source of admission is a transfer from an acute care hospital"; 225 case _520442099: return "The source of admission is a transfer from an ambulatory surgery facility"; 226 case _14690444: return "The source of admission is a transfer from an external facility"; 227 case _510105656: return "The source of admission is a transfer from an external home health agency"; 228 case _528129530: return "The source of admission is a transfer from a hospice facility"; 229 case _510105654: return "The source of admission is a transfer from a psychiatric, substance abuse, or rehabilitation facility"; 230 case NULL: return null; 231 default: return "?"; 232 } 233 } 234 public String getDisplay() { 235 switch (this) { 236 case _102702: return "Clinic Referral"; 237 case _17567: return "Court/Law Enforcement"; 238 case _17566: return "Emergency Room"; 239 case _528129525: return "From Home Or Work"; 240 case _102703: return "HMO Referral"; 241 case _219107: return "In-Hospital Transfer"; 242 case _528129526: return "Newborn From an Outside Hospital"; 243 case _154642: return "Normal Newborn"; 244 case _102701: return "Physician Referral"; 245 case _528129527: return "Premature newborn within the hospital"; 246 case _510105657: return "Readmission to Same HHA"; 247 case _528129528: return "Sick newborn within a hospital"; 248 case _510105655: return "Transfer From A Critical Access Hospital"; 249 case _102704: return "Transfer from a Hospital"; 250 case _14689616: return "Transfer from a SNF"; 251 case _528129529: return "Transfer From Acute Care Hospital"; 252 case _520442099: return "Transfer From Ambulatory Surgery Center"; 253 case _14690444: return "Transfer from Other Facility"; 254 case _510105656: return "Transfer From Another HHA"; 255 case _528129530: return "Transfer from hospice"; 256 case _510105654: return "Transfer From Pysch, Substance Abuse or Rehab Hosp"; 257 case NULL: return null; 258 default: return "?"; 259 } 260 } 261 262 263}