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