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