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 Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum BenefitType {
038
039        /**
040         * Maximum benefit allowable.
041         */
042        BENEFIT, 
043        /**
044         * Cost to be incurred before benefits are applied
045         */
046        DEDUCTIBLE, 
047        /**
048         * Service visit
049         */
050        VISIT, 
051        /**
052         * Type of room
053         */
054        ROOM, 
055        /**
056         * Copayment per service
057         */
058        COPAY, 
059        /**
060         * Copayment percentage per service
061         */
062        COPAYPERCENT, 
063        /**
064         * Copayment maximum per service
065         */
066        COPAYMAXIMUM, 
067        /**
068         * Vision Exam
069         */
070        VISIONEXAM, 
071        /**
072         * Frames and lenses
073         */
074        VISIONGLASSES, 
075        /**
076         * Contact Lenses
077         */
078        VISIONCONTACTS, 
079        /**
080         * Medical Primary Health Coverage
081         */
082        MEDICALPRIMARYCARE, 
083        /**
084         * Pharmacy Dispense Coverage
085         */
086        PHARMACYDISPENSE, 
087        /**
088         * added to help the parsers
089         */
090        NULL;
091        public static BenefitType fromCode(String codeString) throws FHIRException {
092            if (codeString == null || "".equals(codeString))
093                return null;
094        if ("benefit".equals(codeString))
095          return BENEFIT;
096        if ("deductible".equals(codeString))
097          return DEDUCTIBLE;
098        if ("visit".equals(codeString))
099          return VISIT;
100        if ("room".equals(codeString))
101          return ROOM;
102        if ("copay".equals(codeString))
103          return COPAY;
104        if ("copay-percent".equals(codeString))
105          return COPAYPERCENT;
106        if ("copay-maximum".equals(codeString))
107          return COPAYMAXIMUM;
108        if ("vision-exam".equals(codeString))
109          return VISIONEXAM;
110        if ("vision-glasses".equals(codeString))
111          return VISIONGLASSES;
112        if ("vision-contacts".equals(codeString))
113          return VISIONCONTACTS;
114        if ("medical-primarycare".equals(codeString))
115          return MEDICALPRIMARYCARE;
116        if ("pharmacy-dispense".equals(codeString))
117          return PHARMACYDISPENSE;
118        throw new FHIRException("Unknown BenefitType code '"+codeString+"'");
119        }
120        public String toCode() {
121          switch (this) {
122            case BENEFIT: return "benefit";
123            case DEDUCTIBLE: return "deductible";
124            case VISIT: return "visit";
125            case ROOM: return "room";
126            case COPAY: return "copay";
127            case COPAYPERCENT: return "copay-percent";
128            case COPAYMAXIMUM: return "copay-maximum";
129            case VISIONEXAM: return "vision-exam";
130            case VISIONGLASSES: return "vision-glasses";
131            case VISIONCONTACTS: return "vision-contacts";
132            case MEDICALPRIMARYCARE: return "medical-primarycare";
133            case PHARMACYDISPENSE: return "pharmacy-dispense";
134            default: return "?";
135          }
136        }
137        public String getSystem() {
138          return "http://terminology.hl7.org/CodeSystem/benefit-type";
139        }
140        public String getDefinition() {
141          switch (this) {
142            case BENEFIT: return "Maximum benefit allowable.";
143            case DEDUCTIBLE: return "Cost to be incurred before benefits are applied";
144            case VISIT: return "Service visit";
145            case ROOM: return "Type of room";
146            case COPAY: return "Copayment per service";
147            case COPAYPERCENT: return "Copayment percentage per service";
148            case COPAYMAXIMUM: return "Copayment maximum per service";
149            case VISIONEXAM: return "Vision Exam";
150            case VISIONGLASSES: return "Frames and lenses";
151            case VISIONCONTACTS: return "Contact Lenses";
152            case MEDICALPRIMARYCARE: return "Medical Primary Health Coverage";
153            case PHARMACYDISPENSE: return "Pharmacy Dispense Coverage";
154            default: return "?";
155          }
156        }
157        public String getDisplay() {
158          switch (this) {
159            case BENEFIT: return "Benefit";
160            case DEDUCTIBLE: return "Deductible";
161            case VISIT: return "Visit";
162            case ROOM: return "Room";
163            case COPAY: return "Copayment per service";
164            case COPAYPERCENT: return "Copayment Percent per service";
165            case COPAYMAXIMUM: return "Copayment maximum per service";
166            case VISIONEXAM: return "Vision Exam";
167            case VISIONGLASSES: return "Vision Glasses";
168            case VISIONCONTACTS: return "Vision Contacts Coverage";
169            case MEDICALPRIMARYCARE: return "Medical Primary Health Coverage";
170            case PHARMACYDISPENSE: return "Pharmacy Dispense Coverage";
171            default: return "?";
172          }
173    }
174
175
176}
177