001package org.hl7.fhir.r5.model.codesystems;
002
003/*
004 * #%L
005 * org.hl7.fhir.r5
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  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0
053
054
055import org.hl7.fhir.r5.model.EnumFactory;
056
057public class V3ObservationInterpretationEnumFactory implements EnumFactory<V3ObservationInterpretation> {
058
059  public V3ObservationInterpretation fromCode(String codeString) throws IllegalArgumentException {
060    if (codeString == null || "".equals(codeString))
061      return null;
062    if ("_GeneticObservationInterpretation".equals(codeString))
063      return V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION;
064    if ("CAR".equals(codeString))
065      return V3ObservationInterpretation.CAR;
066    if ("Carrier".equals(codeString))
067      return V3ObservationInterpretation.CARRIER;
068    if ("_ObservationInterpretationChange".equals(codeString))
069      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE;
070    if ("B".equals(codeString))
071      return V3ObservationInterpretation.B;
072    if ("D".equals(codeString))
073      return V3ObservationInterpretation.D;
074    if ("U".equals(codeString))
075      return V3ObservationInterpretation.U;
076    if ("W".equals(codeString))
077      return V3ObservationInterpretation.W;
078    if ("_ObservationInterpretationExceptions".equals(codeString))
079      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS;
080    if ("<".equals(codeString))
081      return V3ObservationInterpretation.LESS_THAN;
082    if (">".equals(codeString))
083      return V3ObservationInterpretation.GREATER_THAN;
084    if ("AC".equals(codeString))
085      return V3ObservationInterpretation.AC;
086    if ("IE".equals(codeString))
087      return V3ObservationInterpretation.IE;
088    if ("QCF".equals(codeString))
089      return V3ObservationInterpretation.QCF;
090    if ("TOX".equals(codeString))
091      return V3ObservationInterpretation.TOX;
092    if ("_ObservationInterpretationNormality".equals(codeString))
093      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY;
094    if ("A".equals(codeString))
095      return V3ObservationInterpretation.A;
096    if ("AA".equals(codeString))
097      return V3ObservationInterpretation.AA;
098    if ("HH".equals(codeString))
099      return V3ObservationInterpretation.HH;
100    if ("LL".equals(codeString))
101      return V3ObservationInterpretation.LL;
102    if ("H".equals(codeString))
103      return V3ObservationInterpretation.H;
104    if ("H>".equals(codeString))
105      return V3ObservationInterpretation.H_;
106    if ("HU".equals(codeString))
107      return V3ObservationInterpretation.HU;
108    if ("L".equals(codeString))
109      return V3ObservationInterpretation.L;
110    if ("L<".equals(codeString))
111      return V3ObservationInterpretation.L_;
112    if ("LU".equals(codeString))
113      return V3ObservationInterpretation.LU;
114    if ("N".equals(codeString))
115      return V3ObservationInterpretation.N;
116    if ("_ObservationInterpretationSusceptibility".equals(codeString))
117      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY;
118    if ("I".equals(codeString))
119      return V3ObservationInterpretation.I;
120    if ("MS".equals(codeString))
121      return V3ObservationInterpretation.MS;
122    if ("NCL".equals(codeString))
123      return V3ObservationInterpretation.NCL;
124    if ("NS".equals(codeString))
125      return V3ObservationInterpretation.NS;
126    if ("R".equals(codeString))
127      return V3ObservationInterpretation.R;
128    if ("SYN-R".equals(codeString))
129      return V3ObservationInterpretation.SYNR;
130    if ("S".equals(codeString))
131      return V3ObservationInterpretation.S;
132    if ("SDD".equals(codeString))
133      return V3ObservationInterpretation.SDD;
134    if ("SYN-S".equals(codeString))
135      return V3ObservationInterpretation.SYNS;
136    if ("VS".equals(codeString))
137      return V3ObservationInterpretation.VS;
138    if ("EX".equals(codeString))
139      return V3ObservationInterpretation.EX;
140    if ("HX".equals(codeString))
141      return V3ObservationInterpretation.HX;
142    if ("LX".equals(codeString))
143      return V3ObservationInterpretation.LX;
144    if ("HM".equals(codeString))
145      return V3ObservationInterpretation.HM;
146    if ("ObservationInterpretationDetection".equals(codeString))
147      return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION;
148    if ("IND".equals(codeString))
149      return V3ObservationInterpretation.IND;
150    if ("E".equals(codeString))
151      return V3ObservationInterpretation.E;
152    if ("NEG".equals(codeString))
153      return V3ObservationInterpretation.NEG;
154    if ("ND".equals(codeString))
155      return V3ObservationInterpretation.ND;
156    if ("POS".equals(codeString))
157      return V3ObservationInterpretation.POS;
158    if ("DET".equals(codeString))
159      return V3ObservationInterpretation.DET;
160    if ("ObservationInterpretationExpectation".equals(codeString))
161      return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION;
162    if ("EXP".equals(codeString))
163      return V3ObservationInterpretation.EXP;
164    if ("UNE".equals(codeString))
165      return V3ObservationInterpretation.UNE;
166    if ("OBX".equals(codeString))
167      return V3ObservationInterpretation.OBX;
168    if ("ReactivityObservationInterpretation".equals(codeString))
169      return V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION;
170    if ("NR".equals(codeString))
171      return V3ObservationInterpretation.NR;
172    if ("RR".equals(codeString))
173      return V3ObservationInterpretation.RR;
174    if ("WR".equals(codeString))
175      return V3ObservationInterpretation.WR;
176    throw new IllegalArgumentException("Unknown V3ObservationInterpretation code '"+codeString+"'");
177  }
178
179  public String toCode(V3ObservationInterpretation code) {
180    if (code == V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION)
181      return "_GeneticObservationInterpretation";
182    if (code == V3ObservationInterpretation.CAR)
183      return "CAR";
184    if (code == V3ObservationInterpretation.CARRIER)
185      return "Carrier";
186    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE)
187      return "_ObservationInterpretationChange";
188    if (code == V3ObservationInterpretation.B)
189      return "B";
190    if (code == V3ObservationInterpretation.D)
191      return "D";
192    if (code == V3ObservationInterpretation.U)
193      return "U";
194    if (code == V3ObservationInterpretation.W)
195      return "W";
196    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS)
197      return "_ObservationInterpretationExceptions";
198    if (code == V3ObservationInterpretation.LESS_THAN)
199      return "<";
200    if (code == V3ObservationInterpretation.GREATER_THAN)
201      return ">";
202    if (code == V3ObservationInterpretation.AC)
203      return "AC";
204    if (code == V3ObservationInterpretation.IE)
205      return "IE";
206    if (code == V3ObservationInterpretation.QCF)
207      return "QCF";
208    if (code == V3ObservationInterpretation.TOX)
209      return "TOX";
210    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY)
211      return "_ObservationInterpretationNormality";
212    if (code == V3ObservationInterpretation.A)
213      return "A";
214    if (code == V3ObservationInterpretation.AA)
215      return "AA";
216    if (code == V3ObservationInterpretation.HH)
217      return "HH";
218    if (code == V3ObservationInterpretation.LL)
219      return "LL";
220    if (code == V3ObservationInterpretation.H)
221      return "H";
222    if (code == V3ObservationInterpretation.H_)
223      return "H>";
224    if (code == V3ObservationInterpretation.HU)
225      return "HU";
226    if (code == V3ObservationInterpretation.L)
227      return "L";
228    if (code == V3ObservationInterpretation.L_)
229      return "L<";
230    if (code == V3ObservationInterpretation.LU)
231      return "LU";
232    if (code == V3ObservationInterpretation.N)
233      return "N";
234    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY)
235      return "_ObservationInterpretationSusceptibility";
236    if (code == V3ObservationInterpretation.I)
237      return "I";
238    if (code == V3ObservationInterpretation.MS)
239      return "MS";
240    if (code == V3ObservationInterpretation.NCL)
241      return "NCL";
242    if (code == V3ObservationInterpretation.NS)
243      return "NS";
244    if (code == V3ObservationInterpretation.R)
245      return "R";
246    if (code == V3ObservationInterpretation.SYNR)
247      return "SYN-R";
248    if (code == V3ObservationInterpretation.S)
249      return "S";
250    if (code == V3ObservationInterpretation.SDD)
251      return "SDD";
252    if (code == V3ObservationInterpretation.SYNS)
253      return "SYN-S";
254    if (code == V3ObservationInterpretation.VS)
255      return "VS";
256    if (code == V3ObservationInterpretation.EX)
257      return "EX";
258    if (code == V3ObservationInterpretation.HX)
259      return "HX";
260    if (code == V3ObservationInterpretation.LX)
261      return "LX";
262    if (code == V3ObservationInterpretation.HM)
263      return "HM";
264    if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION)
265      return "ObservationInterpretationDetection";
266    if (code == V3ObservationInterpretation.IND)
267      return "IND";
268    if (code == V3ObservationInterpretation.E)
269      return "E";
270    if (code == V3ObservationInterpretation.NEG)
271      return "NEG";
272    if (code == V3ObservationInterpretation.ND)
273      return "ND";
274    if (code == V3ObservationInterpretation.POS)
275      return "POS";
276    if (code == V3ObservationInterpretation.DET)
277      return "DET";
278    if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION)
279      return "ObservationInterpretationExpectation";
280    if (code == V3ObservationInterpretation.EXP)
281      return "EXP";
282    if (code == V3ObservationInterpretation.UNE)
283      return "UNE";
284    if (code == V3ObservationInterpretation.OBX)
285      return "OBX";
286    if (code == V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION)
287      return "ReactivityObservationInterpretation";
288    if (code == V3ObservationInterpretation.NR)
289      return "NR";
290    if (code == V3ObservationInterpretation.RR)
291      return "RR";
292    if (code == V3ObservationInterpretation.WR)
293      return "WR";
294    return "?";
295  }
296
297    public String toSystem(V3ObservationInterpretation code) {
298      return code.getSystem();
299      }
300
301}
302