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 AppointmentCancellationReason { 041 042 /** 043 * null 044 */ 045 PAT, 046 /** 047 * null 048 */ 049 PATCRS, 050 /** 051 * null 052 */ 053 PATCPP, 054 /** 055 * null 056 */ 057 PATDEC, 058 /** 059 * null 060 */ 061 PATFB, 062 /** 063 * null 064 */ 065 PATLT, 066 /** 067 * null 068 */ 069 PATMT, 070 /** 071 * null 072 */ 073 PATMV, 074 /** 075 * null 076 */ 077 PATPREG, 078 /** 079 * null 080 */ 081 PATSWL, 082 /** 083 * null 084 */ 085 PATUCP, 086 /** 087 * null 088 */ 089 PROV, 090 /** 091 * null 092 */ 093 PROVPERS, 094 /** 095 * null 096 */ 097 PROVDCH, 098 /** 099 * null 100 */ 101 PROVEDU, 102 /** 103 * null 104 */ 105 PROVHOSP, 106 /** 107 * null 108 */ 109 PROVLABS, 110 /** 111 * null 112 */ 113 PROVMRI, 114 /** 115 * null 116 */ 117 PROVONC, 118 /** 119 * null 120 */ 121 MAINT, 122 /** 123 * null 124 */ 125 MEDSINC, 126 /** 127 * null 128 */ 129 OTHER, 130 /** 131 * null 132 */ 133 OTHCMS, 134 /** 135 * null 136 */ 137 OTHERR, 138 /** 139 * null 140 */ 141 OTHFIN, 142 /** 143 * null 144 */ 145 OTHIV, 146 /** 147 * null 148 */ 149 OTHINT, 150 /** 151 * null 152 */ 153 OTHMU, 154 /** 155 * null 156 */ 157 OTHROOM, 158 /** 159 * null 160 */ 161 OTHOERR, 162 /** 163 * null 164 */ 165 OTHSWIE, 166 /** 167 * null 168 */ 169 OTHWEATH, 170 /** 171 * added to help the parsers 172 */ 173 NULL; 174 public static AppointmentCancellationReason fromCode(String codeString) throws FHIRException { 175 if (codeString == null || "".equals(codeString)) 176 return null; 177 if ("pat".equals(codeString)) 178 return PAT; 179 if ("pat-crs".equals(codeString)) 180 return PATCRS; 181 if ("pat-cpp".equals(codeString)) 182 return PATCPP; 183 if ("pat-dec".equals(codeString)) 184 return PATDEC; 185 if ("pat-fb".equals(codeString)) 186 return PATFB; 187 if ("pat-lt".equals(codeString)) 188 return PATLT; 189 if ("pat-mt".equals(codeString)) 190 return PATMT; 191 if ("pat-mv".equals(codeString)) 192 return PATMV; 193 if ("pat-preg".equals(codeString)) 194 return PATPREG; 195 if ("pat-swl".equals(codeString)) 196 return PATSWL; 197 if ("pat-ucp".equals(codeString)) 198 return PATUCP; 199 if ("prov".equals(codeString)) 200 return PROV; 201 if ("prov-pers".equals(codeString)) 202 return PROVPERS; 203 if ("prov-dch".equals(codeString)) 204 return PROVDCH; 205 if ("prov-edu".equals(codeString)) 206 return PROVEDU; 207 if ("prov-hosp".equals(codeString)) 208 return PROVHOSP; 209 if ("prov-labs".equals(codeString)) 210 return PROVLABS; 211 if ("prov-mri".equals(codeString)) 212 return PROVMRI; 213 if ("prov-onc".equals(codeString)) 214 return PROVONC; 215 if ("maint".equals(codeString)) 216 return MAINT; 217 if ("meds-inc".equals(codeString)) 218 return MEDSINC; 219 if ("other".equals(codeString)) 220 return OTHER; 221 if ("oth-cms".equals(codeString)) 222 return OTHCMS; 223 if ("oth-err".equals(codeString)) 224 return OTHERR; 225 if ("oth-fin".equals(codeString)) 226 return OTHFIN; 227 if ("oth-iv".equals(codeString)) 228 return OTHIV; 229 if ("oth-int".equals(codeString)) 230 return OTHINT; 231 if ("oth-mu".equals(codeString)) 232 return OTHMU; 233 if ("oth-room".equals(codeString)) 234 return OTHROOM; 235 if ("oth-oerr".equals(codeString)) 236 return OTHOERR; 237 if ("oth-swie".equals(codeString)) 238 return OTHSWIE; 239 if ("oth-weath".equals(codeString)) 240 return OTHWEATH; 241 throw new FHIRException("Unknown AppointmentCancellationReason code '"+codeString+"'"); 242 } 243 public String toCode() { 244 switch (this) { 245 case PAT: return "pat"; 246 case PATCRS: return "pat-crs"; 247 case PATCPP: return "pat-cpp"; 248 case PATDEC: return "pat-dec"; 249 case PATFB: return "pat-fb"; 250 case PATLT: return "pat-lt"; 251 case PATMT: return "pat-mt"; 252 case PATMV: return "pat-mv"; 253 case PATPREG: return "pat-preg"; 254 case PATSWL: return "pat-swl"; 255 case PATUCP: return "pat-ucp"; 256 case PROV: return "prov"; 257 case PROVPERS: return "prov-pers"; 258 case PROVDCH: return "prov-dch"; 259 case PROVEDU: return "prov-edu"; 260 case PROVHOSP: return "prov-hosp"; 261 case PROVLABS: return "prov-labs"; 262 case PROVMRI: return "prov-mri"; 263 case PROVONC: return "prov-onc"; 264 case MAINT: return "maint"; 265 case MEDSINC: return "meds-inc"; 266 case OTHER: return "other"; 267 case OTHCMS: return "oth-cms"; 268 case OTHERR: return "oth-err"; 269 case OTHFIN: return "oth-fin"; 270 case OTHIV: return "oth-iv"; 271 case OTHINT: return "oth-int"; 272 case OTHMU: return "oth-mu"; 273 case OTHROOM: return "oth-room"; 274 case OTHOERR: return "oth-oerr"; 275 case OTHSWIE: return "oth-swie"; 276 case OTHWEATH: return "oth-weath"; 277 case NULL: return null; 278 default: return "?"; 279 } 280 } 281 public String getSystem() { 282 return "http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason"; 283 } 284 public String getDefinition() { 285 switch (this) { 286 case PAT: return ""; 287 case PATCRS: return ""; 288 case PATCPP: return ""; 289 case PATDEC: return ""; 290 case PATFB: return ""; 291 case PATLT: return ""; 292 case PATMT: return ""; 293 case PATMV: return ""; 294 case PATPREG: return ""; 295 case PATSWL: return ""; 296 case PATUCP: return ""; 297 case PROV: return ""; 298 case PROVPERS: return ""; 299 case PROVDCH: return ""; 300 case PROVEDU: return ""; 301 case PROVHOSP: return ""; 302 case PROVLABS: return ""; 303 case PROVMRI: return ""; 304 case PROVONC: return ""; 305 case MAINT: return ""; 306 case MEDSINC: return ""; 307 case OTHER: return ""; 308 case OTHCMS: return ""; 309 case OTHERR: return ""; 310 case OTHFIN: return ""; 311 case OTHIV: return ""; 312 case OTHINT: return ""; 313 case OTHMU: return ""; 314 case OTHROOM: return ""; 315 case OTHOERR: return ""; 316 case OTHSWIE: return ""; 317 case OTHWEATH: return ""; 318 case NULL: return null; 319 default: return "?"; 320 } 321 } 322 public String getDisplay() { 323 switch (this) { 324 case PAT: return "Patient"; 325 case PATCRS: return "Patient: Canceled via automated reminder system"; 326 case PATCPP: return "Patient: Canceled via Patient Portal"; 327 case PATDEC: return "Patient: Deceased"; 328 case PATFB: return "Patient: Feeling Better"; 329 case PATLT: return "Patient: Lack of Transportation"; 330 case PATMT: return "Patient: Member Terminated"; 331 case PATMV: return "Patient: Moved"; 332 case PATPREG: return "Patient: Pregnant"; 333 case PATSWL: return "Patient: Scheduled from Wait List"; 334 case PATUCP: return "Patient: Unhappy/Changed Provider"; 335 case PROV: return "Provider"; 336 case PROVPERS: return "Provider: Personal"; 337 case PROVDCH: return "Provider: Discharged"; 338 case PROVEDU: return "Provider: Edu/Meeting"; 339 case PROVHOSP: return "Provider: Hospitalized"; 340 case PROVLABS: return "Provider: Labs Out of Acceptable Range"; 341 case PROVMRI: return "Provider: MRI Screening Form Marked Do Not Proceed"; 342 case PROVONC: return "Provider: Oncology Treatment Plan Changes"; 343 case MAINT: return "Equipment Maintenance/Repair"; 344 case MEDSINC: return "Prep/Med Incomplete"; 345 case OTHER: return "Other"; 346 case OTHCMS: return "Other: CMS Therapy Cap Service Not Authorized"; 347 case OTHERR: return "Other: Error"; 348 case OTHFIN: return "Other: Financial"; 349 case OTHIV: return "Other: Improper IV Access/Infiltrate IV"; 350 case OTHINT: return "Other: No Interpreter Available"; 351 case OTHMU: return "Other: Prep/Med/Results Unavailable"; 352 case OTHROOM: return "Other: Room/Resource Maintenance"; 353 case OTHOERR: return "Other: Schedule Order Error"; 354 case OTHSWIE: return "Other: Silent Walk In Error"; 355 case OTHWEATH: return "Other: Weather"; 356 case NULL: return null; 357 default: return "?"; 358 } 359 } 360 361 362}