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 Wed, Jan 10, 2018 14:53-0500 for FHIR v3.2.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum CoverageLevel {
038
039        /**
040         * An employee group
041         */
042        GROUP, 
043        /**
044         * A sub-group of an employee group
045         */
046        SUBGROUP, 
047        /**
048         * A specific suite of benefits.
049         */
050        PLAN, 
051        /**
052         * A subset of a specific suite of benefits.
053         */
054        SUBPLAN, 
055        /**
056         * A class of benefits.
057         */
058        CLASS, 
059        /**
060         * A subset of a class of benefits.
061         */
062        SUBCLASS, 
063        /**
064         * A sequence number associated with repeating short-term continuence of the converage.
065         */
066        SEQUENCE, 
067        /**
068         * added to help the parsers
069         */
070        NULL;
071        public static CoverageLevel fromCode(String codeString) throws FHIRException {
072            if (codeString == null || "".equals(codeString))
073                return null;
074        if ("group".equals(codeString))
075          return GROUP;
076        if ("subgroup".equals(codeString))
077          return SUBGROUP;
078        if ("plan".equals(codeString))
079          return PLAN;
080        if ("subplan".equals(codeString))
081          return SUBPLAN;
082        if ("class".equals(codeString))
083          return CLASS;
084        if ("subclass".equals(codeString))
085          return SUBCLASS;
086        if ("sequence".equals(codeString))
087          return SEQUENCE;
088        throw new FHIRException("Unknown CoverageLevel code '"+codeString+"'");
089        }
090        public String toCode() {
091          switch (this) {
092            case GROUP: return "group";
093            case SUBGROUP: return "subgroup";
094            case PLAN: return "plan";
095            case SUBPLAN: return "subplan";
096            case CLASS: return "class";
097            case SUBCLASS: return "subclass";
098            case SEQUENCE: return "sequence";
099            default: return "?";
100          }
101        }
102        public String getSystem() {
103          return "http://hl7.org/fhir/coverage-level";
104        }
105        public String getDefinition() {
106          switch (this) {
107            case GROUP: return "An employee group";
108            case SUBGROUP: return "A sub-group of an employee group";
109            case PLAN: return "A specific suite of benefits.";
110            case SUBPLAN: return "A subset of a specific suite of benefits.";
111            case CLASS: return "A class of benefits.";
112            case SUBCLASS: return "A subset of a class of benefits.";
113            case SEQUENCE: return "A sequence number associated with repeating short-term continuence of the converage.";
114            default: return "?";
115          }
116        }
117        public String getDisplay() {
118          switch (this) {
119            case GROUP: return "Group";
120            case SUBGROUP: return "SubGroup";
121            case PLAN: return "Plan";
122            case SUBPLAN: return "SubPlan";
123            case CLASS: return "Class";
124            case SUBCLASS: return "SubClass";
125            case SEQUENCE: return "Sequence";
126            default: return "?";
127          }
128    }
129
130
131}
132