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 ServiceUscls {
059
060        /**
061         * Exam, comp, primary
062         */
063        _1101, 
064        /**
065         * Exam, comp, mixed
066         */
067        _1102, 
068        /**
069         * Exam, comp, permanent
070         */
071        _1103, 
072        /**
073         * Exam, recall
074         */
075        _1201, 
076        /**
077         * Exam, emergency
078         */
079        _1205, 
080        /**
081         * Radiograph, series (12)
082         */
083        _2101, 
084        /**
085         * Radiograph, series (16)
086         */
087        _2102, 
088        /**
089         * Radiograph, bitewing
090         */
091        _2141, 
092        /**
093         * Radiograph, panoramic
094         */
095        _2601, 
096        /**
097         * Polishing, 1 unit
098         */
099        _11101, 
100        /**
101         * Polishing, 2 unit
102         */
103        _11102, 
104        /**
105         * Polishing, 3 unit
106         */
107        _11103, 
108        /**
109         * Polishing, 4 unit
110         */
111        _11104, 
112        /**
113         * Amalgam, 1 surface
114         */
115        _21211, 
116        /**
117         * Amalgam, 2 surface
118         */
119        _21212, 
120        /**
121         * Crown, PFM
122         */
123        _27211, 
124        /**
125         * Maryland Bridge
126         */
127        _67211, 
128        /**
129         * Lab, commercial
130         */
131        _99111, 
132        /**
133         * Lab, in office
134         */
135        _99333, 
136        /**
137         * Expense
138         */
139        _99555, 
140        /**
141         * added to help the parsers
142         */
143        NULL;
144        public static ServiceUscls fromCode(String codeString) throws FHIRException {
145            if (codeString == null || "".equals(codeString))
146                return null;
147        if ("1101".equals(codeString))
148          return _1101;
149        if ("1102".equals(codeString))
150          return _1102;
151        if ("1103".equals(codeString))
152          return _1103;
153        if ("1201".equals(codeString))
154          return _1201;
155        if ("1205".equals(codeString))
156          return _1205;
157        if ("2101".equals(codeString))
158          return _2101;
159        if ("2102".equals(codeString))
160          return _2102;
161        if ("2141".equals(codeString))
162          return _2141;
163        if ("2601".equals(codeString))
164          return _2601;
165        if ("11101".equals(codeString))
166          return _11101;
167        if ("11102".equals(codeString))
168          return _11102;
169        if ("11103".equals(codeString))
170          return _11103;
171        if ("11104".equals(codeString))
172          return _11104;
173        if ("21211".equals(codeString))
174          return _21211;
175        if ("21212".equals(codeString))
176          return _21212;
177        if ("27211".equals(codeString))
178          return _27211;
179        if ("67211".equals(codeString))
180          return _67211;
181        if ("99111".equals(codeString))
182          return _99111;
183        if ("99333".equals(codeString))
184          return _99333;
185        if ("99555".equals(codeString))
186          return _99555;
187        throw new FHIRException("Unknown ServiceUscls code '"+codeString+"'");
188        }
189        public String toCode() {
190          switch (this) {
191            case _1101: return "1101";
192            case _1102: return "1102";
193            case _1103: return "1103";
194            case _1201: return "1201";
195            case _1205: return "1205";
196            case _2101: return "2101";
197            case _2102: return "2102";
198            case _2141: return "2141";
199            case _2601: return "2601";
200            case _11101: return "11101";
201            case _11102: return "11102";
202            case _11103: return "11103";
203            case _11104: return "11104";
204            case _21211: return "21211";
205            case _21212: return "21212";
206            case _27211: return "27211";
207            case _67211: return "67211";
208            case _99111: return "99111";
209            case _99333: return "99333";
210            case _99555: return "99555";
211            default: return "?";
212          }
213        }
214        public String getSystem() {
215          return "http://terminology.hl7.org/CodeSystem/ex-USCLS";
216        }
217        public String getDefinition() {
218          switch (this) {
219            case _1101: return "Exam, comp, primary";
220            case _1102: return "Exam, comp, mixed";
221            case _1103: return "Exam, comp, permanent";
222            case _1201: return "Exam, recall";
223            case _1205: return "Exam, emergency";
224            case _2101: return "Radiograph, series (12)";
225            case _2102: return "Radiograph, series (16)";
226            case _2141: return "Radiograph, bitewing";
227            case _2601: return "Radiograph, panoramic";
228            case _11101: return "Polishing, 1 unit";
229            case _11102: return "Polishing, 2 unit";
230            case _11103: return "Polishing, 3 unit";
231            case _11104: return "Polishing, 4 unit";
232            case _21211: return "Amalgam, 1 surface";
233            case _21212: return "Amalgam, 2 surface";
234            case _27211: return "Crown, PFM";
235            case _67211: return "Maryland Bridge";
236            case _99111: return "Lab, commercial";
237            case _99333: return "Lab, in office";
238            case _99555: return "Expense";
239            default: return "?";
240          }
241        }
242        public String getDisplay() {
243          switch (this) {
244            case _1101: return "Exam, comp, primary";
245            case _1102: return "Exam, comp, mixed";
246            case _1103: return "Exam, comp, permanent";
247            case _1201: return "Exam, recall";
248            case _1205: return "Exam, emergency";
249            case _2101: return "Radiograph, series (12)";
250            case _2102: return "Radiograph, series (16)";
251            case _2141: return "Radiograph, bitewing";
252            case _2601: return "Radiograph, panoramic";
253            case _11101: return "Polishing, 1 unit";
254            case _11102: return "Polishing, 2 unit";
255            case _11103: return "Polishing, 3 unit";
256            case _11104: return "Polishing, 4 unit";
257            case _21211: return "Amalgam, 1 surface";
258            case _21212: return "Amalgam, 2 surface";
259            case _27211: return "Crown, PFM";
260            case _67211: return "Maryland Bridge";
261            case _99111: return "Lab, commercial";
262            case _99333: return "Lab, in office";
263            case _99555: return "Expense";
264            default: return "?";
265          }
266    }
267
268
269}
270