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 InsuranceplanType {
041
042        /**
043         * null
044         */
045        MEDICAL, 
046        /**
047         * null
048         */
049        DENTAL, 
050        /**
051         * null
052         */
053        MENTAL, 
054        /**
055         * null
056         */
057        SUBSTAB, 
058        /**
059         * null
060         */
061        VISION, 
062        /**
063         * null
064         */
065        DRUG, 
066        /**
067         * null
068         */
069        SHORTTERM, 
070        /**
071         * null
072         */
073        LONGTERM, 
074        /**
075         * null
076         */
077        HOSPICE, 
078        /**
079         * null
080         */
081        HOME, 
082        /**
083         * added to help the parsers
084         */
085        NULL;
086        public static InsuranceplanType fromCode(String codeString) throws FHIRException {
087            if (codeString == null || "".equals(codeString))
088                return null;
089        if ("medical".equals(codeString))
090          return MEDICAL;
091        if ("dental".equals(codeString))
092          return DENTAL;
093        if ("mental".equals(codeString))
094          return MENTAL;
095        if ("subst-ab".equals(codeString))
096          return SUBSTAB;
097        if ("vision".equals(codeString))
098          return VISION;
099        if ("Drug".equals(codeString))
100          return DRUG;
101        if ("short-term".equals(codeString))
102          return SHORTTERM;
103        if ("long-term".equals(codeString))
104          return LONGTERM;
105        if ("hospice".equals(codeString))
106          return HOSPICE;
107        if ("home".equals(codeString))
108          return HOME;
109        throw new FHIRException("Unknown InsuranceplanType code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case MEDICAL: return "medical";
114            case DENTAL: return "dental";
115            case MENTAL: return "mental";
116            case SUBSTAB: return "subst-ab";
117            case VISION: return "vision";
118            case DRUG: return "Drug";
119            case SHORTTERM: return "short-term";
120            case LONGTERM: return "long-term";
121            case HOSPICE: return "hospice";
122            case HOME: return "home";
123            case NULL: return null;
124            default: return "?";
125          }
126        }
127        public String getSystem() {
128          return "http://terminology.hl7.org/CodeSystem/insurance-plan-type";
129        }
130        public String getDefinition() {
131          switch (this) {
132            case MEDICAL: return "";
133            case DENTAL: return "";
134            case MENTAL: return "";
135            case SUBSTAB: return "";
136            case VISION: return "";
137            case DRUG: return "";
138            case SHORTTERM: return "";
139            case LONGTERM: return "";
140            case HOSPICE: return "";
141            case HOME: return "";
142            case NULL: return null;
143            default: return "?";
144          }
145        }
146        public String getDisplay() {
147          switch (this) {
148            case MEDICAL: return "Medical";
149            case DENTAL: return "Dental";
150            case MENTAL: return "Mental Health";
151            case SUBSTAB: return "Substance Abuse";
152            case VISION: return "Vision";
153            case DRUG: return "Drug";
154            case SHORTTERM: return "Short Term";
155            case LONGTERM: return "Long Term Care";
156            case HOSPICE: return "Hospice";
157            case HOME: return "Home Health";
158            case NULL: return null;
159            default: return "?";
160          }
161    }
162
163
164}