001package org.hl7.fhir.instance.model.valuesets;
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 Wed, Nov 11, 2015 10:54-0500 for FHIR v1.0.2
033
034
035public enum V3LivingArrangement {
036
037        /**
038         * Definition: Living arrangements lacking a permanent residence.
039         */
040        HL, 
041        /**
042         * Nomadic
043         */
044        M, 
045        /**
046         * Transient
047         */
048        T, 
049        /**
050         * Institution
051         */
052        I, 
053        /**
054         * 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.
055         */
056        CS, 
057        /**
058         * Group Home
059         */
060        G, 
061        /**
062         * Nursing Home
063         */
064        N, 
065        /**
066         * Extended care facility
067         */
068        X, 
069        /**
070         * Definition:  A living arrangement within a private residence for single family.
071         */
072        PR, 
073        /**
074         * Independent Household
075         */
076        H, 
077        /**
078         * Retirement Community
079         */
080        R, 
081        /**
082         * 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.
083         */
084        SL, 
085        /**
086         * added to help the parsers
087         */
088        NULL;
089        public static V3LivingArrangement fromCode(String codeString) throws Exception {
090            if (codeString == null || "".equals(codeString))
091                return null;
092        if ("HL".equals(codeString))
093          return HL;
094        if ("M".equals(codeString))
095          return M;
096        if ("T".equals(codeString))
097          return T;
098        if ("I".equals(codeString))
099          return I;
100        if ("CS".equals(codeString))
101          return CS;
102        if ("G".equals(codeString))
103          return G;
104        if ("N".equals(codeString))
105          return N;
106        if ("X".equals(codeString))
107          return X;
108        if ("PR".equals(codeString))
109          return PR;
110        if ("H".equals(codeString))
111          return H;
112        if ("R".equals(codeString))
113          return R;
114        if ("SL".equals(codeString))
115          return SL;
116        throw new Exception("Unknown V3LivingArrangement code '"+codeString+"'");
117        }
118        public String toCode() {
119          switch (this) {
120            case HL: return "HL";
121            case M: return "M";
122            case T: return "T";
123            case I: return "I";
124            case CS: return "CS";
125            case G: return "G";
126            case N: return "N";
127            case X: return "X";
128            case PR: return "PR";
129            case H: return "H";
130            case R: return "R";
131            case SL: return "SL";
132            default: return "?";
133          }
134        }
135        public String getSystem() {
136          return "http://hl7.org/fhir/v3/LivingArrangement";
137        }
138        public String getDefinition() {
139          switch (this) {
140            case HL: return "Definition: Living arrangements lacking a permanent residence.";
141            case M: return "Nomadic";
142            case T: return "Transient";
143            case I: return "Institution";
144            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.";
145            case G: return "Group Home";
146            case N: return "Nursing Home";
147            case X: return "Extended care facility";
148            case PR: return "Definition:  A living arrangement within a private residence for single family.";
149            case H: return "Independent Household";
150            case R: return "Retirement Community";
151            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.";
152            default: return "?";
153          }
154        }
155        public String getDisplay() {
156          switch (this) {
157            case HL: return "homeless";
158            case M: return "Nomadic";
159            case T: return "Transient";
160            case I: return "Institution";
161            case CS: return "community shelter";
162            case G: return "Group Home";
163            case N: return "Nursing Home";
164            case X: return "Extended care facility";
165            case PR: return "private residence";
166            case H: return "Independent Household";
167            case R: return "Retirement Community";
168            case SL: return "supported living";
169            default: return "?";
170          }
171    }
172
173
174}
175