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 V3LivingArrangement { 038 039 /** 040 * Definition: Living arrangements lacking a permanent residence. 041 */ 042 HL, 043 /** 044 * Nomadic 045 */ 046 M, 047 /** 048 * Transient 049 */ 050 T, 051 /** 052 * Institution 053 */ 054 I, 055 /** 056 * Definition: A group living arrangement specifically for the care of those in need of temporary and crisis housing assistance. Examples include domestic violence shelters, shelters for displaced or homeless individuals, Salvation Army, Jesus House, etc. Community based services may be provided. 057 */ 058 CS, 059 /** 060 * Group Home 061 */ 062 G, 063 /** 064 * Nursing Home 065 */ 066 N, 067 /** 068 * Extended care facility 069 */ 070 X, 071 /** 072 * Definition: A living arrangement within a private residence for single family. 073 */ 074 PR, 075 /** 076 * Independent Household 077 */ 078 H, 079 /** 080 * Retirement Community 081 */ 082 R, 083 /** 084 * Definition: Assisted living in a single family residence for persons with physical, behavioral, or functional health, or socio-economic challenges. There may or may not be on-site supervision but the housing is designed to assist the client with developing independent living skills. Community based services may be provided. 085 */ 086 SL, 087 /** 088 * added to help the parsers 089 */ 090 NULL; 091 public static V3LivingArrangement fromCode(String codeString) throws FHIRException { 092 if (codeString == null || "".equals(codeString)) 093 return null; 094 if ("HL".equals(codeString)) 095 return HL; 096 if ("M".equals(codeString)) 097 return M; 098 if ("T".equals(codeString)) 099 return T; 100 if ("I".equals(codeString)) 101 return I; 102 if ("CS".equals(codeString)) 103 return CS; 104 if ("G".equals(codeString)) 105 return G; 106 if ("N".equals(codeString)) 107 return N; 108 if ("X".equals(codeString)) 109 return X; 110 if ("PR".equals(codeString)) 111 return PR; 112 if ("H".equals(codeString)) 113 return H; 114 if ("R".equals(codeString)) 115 return R; 116 if ("SL".equals(codeString)) 117 return SL; 118 throw new FHIRException("Unknown V3LivingArrangement code '"+codeString+"'"); 119 } 120 public String toCode() { 121 switch (this) { 122 case HL: return "HL"; 123 case M: return "M"; 124 case T: return "T"; 125 case I: return "I"; 126 case CS: return "CS"; 127 case G: return "G"; 128 case N: return "N"; 129 case X: return "X"; 130 case PR: return "PR"; 131 case H: return "H"; 132 case R: return "R"; 133 case SL: return "SL"; 134 default: return "?"; 135 } 136 } 137 public String getSystem() { 138 return "http://hl7.org/fhir/v3/LivingArrangement"; 139 } 140 public String getDefinition() { 141 switch (this) { 142 case HL: return "Definition: Living arrangements lacking a permanent residence."; 143 case M: return "Nomadic"; 144 case T: return "Transient"; 145 case I: return "Institution"; 146 case CS: return "Definition: A group living arrangement specifically for the care of those in need of temporary and crisis housing assistance. Examples include domestic violence shelters, shelters for displaced or homeless individuals, Salvation Army, Jesus House, etc. Community based services may be provided."; 147 case G: return "Group Home"; 148 case N: return "Nursing Home"; 149 case X: return "Extended care facility"; 150 case PR: return "Definition: A living arrangement within a private residence for single family."; 151 case H: return "Independent Household"; 152 case R: return "Retirement Community"; 153 case SL: return "Definition: Assisted living in a single family residence for persons with physical, behavioral, or functional health, or socio-economic challenges. There may or may not be on-site supervision but the housing is designed to assist the client with developing independent living skills. Community based services may be provided."; 154 default: return "?"; 155 } 156 } 157 public String getDisplay() { 158 switch (this) { 159 case HL: return "homeless"; 160 case M: return "Nomadic"; 161 case T: return "Transient"; 162 case I: return "Institution"; 163 case CS: return "community shelter"; 164 case G: return "Group Home"; 165 case N: return "Nursing Home"; 166 case X: return "Extended care facility"; 167 case PR: return "private residence"; 168 case H: return "Independent Household"; 169 case R: return "Retirement Community"; 170 case SL: return "supported living"; 171 default: return "?"; 172 } 173 } 174 175 176} 177