001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum V3EducationLevel { 059 060 /** 061 * Associate's or technical degree complete 062 */ 063 ASSOC, 064 /** 065 * College or baccalaureate degree complete 066 */ 067 BD, 068 /** 069 * Elementary School 070 */ 071 ELEM, 072 /** 073 * Graduate or professional Degree complete 074 */ 075 GD, 076 /** 077 * High School or secondary school degree complete 078 */ 079 HS, 080 /** 081 * Some post-baccalaureate education 082 */ 083 PB, 084 /** 085 * Doctoral or post graduate education 086 */ 087 POSTG, 088 /** 089 * Some College education 090 */ 091 SCOL, 092 /** 093 * Some secondary or high school education 094 */ 095 SEC, 096 /** 097 * added to help the parsers 098 */ 099 NULL; 100 public static V3EducationLevel fromCode(String codeString) throws FHIRException { 101 if (codeString == null || "".equals(codeString)) 102 return null; 103 if ("ASSOC".equals(codeString)) 104 return ASSOC; 105 if ("BD".equals(codeString)) 106 return BD; 107 if ("ELEM".equals(codeString)) 108 return ELEM; 109 if ("GD".equals(codeString)) 110 return GD; 111 if ("HS".equals(codeString)) 112 return HS; 113 if ("PB".equals(codeString)) 114 return PB; 115 if ("POSTG".equals(codeString)) 116 return POSTG; 117 if ("SCOL".equals(codeString)) 118 return SCOL; 119 if ("SEC".equals(codeString)) 120 return SEC; 121 throw new FHIRException("Unknown V3EducationLevel code '"+codeString+"'"); 122 } 123 public String toCode() { 124 switch (this) { 125 case ASSOC: return "ASSOC"; 126 case BD: return "BD"; 127 case ELEM: return "ELEM"; 128 case GD: return "GD"; 129 case HS: return "HS"; 130 case PB: return "PB"; 131 case POSTG: return "POSTG"; 132 case SCOL: return "SCOL"; 133 case SEC: return "SEC"; 134 default: return "?"; 135 } 136 } 137 public String getSystem() { 138 return "http://terminology.hl7.org/CodeSystem/v3-EducationLevel"; 139 } 140 public String getDefinition() { 141 switch (this) { 142 case ASSOC: return "Associate's or technical degree complete"; 143 case BD: return "College or baccalaureate degree complete"; 144 case ELEM: return "Elementary School"; 145 case GD: return "Graduate or professional Degree complete"; 146 case HS: return "High School or secondary school degree complete"; 147 case PB: return "Some post-baccalaureate education"; 148 case POSTG: return "Doctoral or post graduate education"; 149 case SCOL: return "Some College education"; 150 case SEC: return "Some secondary or high school education"; 151 default: return "?"; 152 } 153 } 154 public String getDisplay() { 155 switch (this) { 156 case ASSOC: return "Associate's or technical degree complete"; 157 case BD: return "College or baccalaureate degree complete"; 158 case ELEM: return "Elementary School"; 159 case GD: return "Graduate or professional Degree complete"; 160 case HS: return "High School or secondary school degree complete"; 161 case PB: return "Some post-baccalaureate education"; 162 case POSTG: return "Doctoral or post graduate education"; 163 case SCOL: return "Some College education"; 164 case SEC: return "Some secondary or high school education"; 165 default: return "?"; 166 } 167 } 168 169 170} 171