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 CoverageClass {
041
042        /**
043         * An employee group
044         */
045        GROUP, 
046        /**
047         * A sub-group of an employee group
048         */
049        SUBGROUP, 
050        /**
051         * A specific suite of benefits.
052         */
053        PLAN, 
054        /**
055         * A subset of a specific suite of benefits.
056         */
057        SUBPLAN, 
058        /**
059         * A class of benefits.
060         */
061        CLASS, 
062        /**
063         * A subset of a class of benefits.
064         */
065        SUBCLASS, 
066        /**
067         * A sequence number associated with a short-term continuance of the coverage.
068         */
069        SEQUENCE, 
070        /**
071         * Pharmacy benefit manager's Business Identification Number.
072         */
073        RXBIN, 
074        /**
075         * A Pharmacy Benefit Manager specified Processor Control Number.
076         */
077        RXPCN, 
078        /**
079         * A Pharmacy Benefit Manager specified Member ID.
080         */
081        RXID, 
082        /**
083         * A Pharmacy Benefit Manager specified Group number.
084         */
085        RXGROUP, 
086        /**
087         * added to help the parsers
088         */
089        NULL;
090        public static CoverageClass fromCode(String codeString) throws FHIRException {
091            if (codeString == null || "".equals(codeString))
092                return null;
093        if ("group".equals(codeString))
094          return GROUP;
095        if ("subgroup".equals(codeString))
096          return SUBGROUP;
097        if ("plan".equals(codeString))
098          return PLAN;
099        if ("subplan".equals(codeString))
100          return SUBPLAN;
101        if ("class".equals(codeString))
102          return CLASS;
103        if ("subclass".equals(codeString))
104          return SUBCLASS;
105        if ("sequence".equals(codeString))
106          return SEQUENCE;
107        if ("rxbin".equals(codeString))
108          return RXBIN;
109        if ("rxpcn".equals(codeString))
110          return RXPCN;
111        if ("rxid".equals(codeString))
112          return RXID;
113        if ("rxgroup".equals(codeString))
114          return RXGROUP;
115        throw new FHIRException("Unknown CoverageClass code '"+codeString+"'");
116        }
117        public String toCode() {
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            case RXBIN: return "rxbin";
127            case RXPCN: return "rxpcn";
128            case RXID: return "rxid";
129            case RXGROUP: return "rxgroup";
130            case NULL: return null;
131            default: return "?";
132          }
133        }
134        public String getSystem() {
135          return "http://terminology.hl7.org/CodeSystem/coverage-class";
136        }
137        public String getDefinition() {
138          switch (this) {
139            case GROUP: return "An employee group";
140            case SUBGROUP: return "A sub-group of an employee group";
141            case PLAN: return "A specific suite of benefits.";
142            case SUBPLAN: return "A subset of a specific suite of benefits.";
143            case CLASS: return "A class of benefits.";
144            case SUBCLASS: return "A subset of a class of benefits.";
145            case SEQUENCE: return "A sequence number associated with a short-term continuance of the coverage.";
146            case RXBIN: return "Pharmacy benefit manager's Business Identification Number.";
147            case RXPCN: return "A Pharmacy Benefit Manager specified Processor Control Number.";
148            case RXID: return "A Pharmacy Benefit Manager specified Member ID.";
149            case RXGROUP: return "A Pharmacy Benefit Manager specified Group number.";
150            case NULL: return null;
151            default: return "?";
152          }
153        }
154        public String getDisplay() {
155          switch (this) {
156            case GROUP: return "Group";
157            case SUBGROUP: return "SubGroup";
158            case PLAN: return "Plan";
159            case SUBPLAN: return "SubPlan";
160            case CLASS: return "Class";
161            case SUBCLASS: return "SubClass";
162            case SEQUENCE: return "Sequence";
163            case RXBIN: return "RX BIN";
164            case RXPCN: return "RX PCN";
165            case RXID: return "RX Id";
166            case RXGROUP: return "RX Group";
167            case NULL: return null;
168            default: return "?";
169          }
170    }
171
172
173}