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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
033
034
035import org.hl7.fhir.r4.model.EnumFactory;
036
037public class V3ObservationInterpretationEnumFactory implements EnumFactory<V3ObservationInterpretation> {
038
039  public V3ObservationInterpretation fromCode(String codeString) throws IllegalArgumentException {
040    if (codeString == null || "".equals(codeString))
041      return null;
042    if ("_GeneticObservationInterpretation".equals(codeString))
043      return V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION;
044    if ("CAR".equals(codeString))
045      return V3ObservationInterpretation.CAR;
046    if ("Carrier".equals(codeString))
047      return V3ObservationInterpretation.CARRIER;
048    if ("_ObservationInterpretationChange".equals(codeString))
049      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE;
050    if ("B".equals(codeString))
051      return V3ObservationInterpretation.B;
052    if ("D".equals(codeString))
053      return V3ObservationInterpretation.D;
054    if ("U".equals(codeString))
055      return V3ObservationInterpretation.U;
056    if ("W".equals(codeString))
057      return V3ObservationInterpretation.W;
058    if ("_ObservationInterpretationExceptions".equals(codeString))
059      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS;
060    if ("<".equals(codeString))
061      return V3ObservationInterpretation.LESS_THAN;
062    if (">".equals(codeString))
063      return V3ObservationInterpretation.GREATER_THAN;
064    if ("AC".equals(codeString))
065      return V3ObservationInterpretation.AC;
066    if ("IE".equals(codeString))
067      return V3ObservationInterpretation.IE;
068    if ("QCF".equals(codeString))
069      return V3ObservationInterpretation.QCF;
070    if ("TOX".equals(codeString))
071      return V3ObservationInterpretation.TOX;
072    if ("_ObservationInterpretationNormality".equals(codeString))
073      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY;
074    if ("A".equals(codeString))
075      return V3ObservationInterpretation.A;
076    if ("AA".equals(codeString))
077      return V3ObservationInterpretation.AA;
078    if ("HH".equals(codeString))
079      return V3ObservationInterpretation.HH;
080    if ("LL".equals(codeString))
081      return V3ObservationInterpretation.LL;
082    if ("H".equals(codeString))
083      return V3ObservationInterpretation.H;
084    if ("H>".equals(codeString))
085      return V3ObservationInterpretation.H_;
086    if ("HU".equals(codeString))
087      return V3ObservationInterpretation.HU;
088    if ("L".equals(codeString))
089      return V3ObservationInterpretation.L;
090    if ("L<".equals(codeString))
091      return V3ObservationInterpretation.L_;
092    if ("LU".equals(codeString))
093      return V3ObservationInterpretation.LU;
094    if ("N".equals(codeString))
095      return V3ObservationInterpretation.N;
096    if ("_ObservationInterpretationSusceptibility".equals(codeString))
097      return V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY;
098    if ("I".equals(codeString))
099      return V3ObservationInterpretation.I;
100    if ("MS".equals(codeString))
101      return V3ObservationInterpretation.MS;
102    if ("NCL".equals(codeString))
103      return V3ObservationInterpretation.NCL;
104    if ("NS".equals(codeString))
105      return V3ObservationInterpretation.NS;
106    if ("R".equals(codeString))
107      return V3ObservationInterpretation.R;
108    if ("SYN-R".equals(codeString))
109      return V3ObservationInterpretation.SYNR;
110    if ("S".equals(codeString))
111      return V3ObservationInterpretation.S;
112    if ("SDD".equals(codeString))
113      return V3ObservationInterpretation.SDD;
114    if ("SYN-S".equals(codeString))
115      return V3ObservationInterpretation.SYNS;
116    if ("VS".equals(codeString))
117      return V3ObservationInterpretation.VS;
118    if ("EX".equals(codeString))
119      return V3ObservationInterpretation.EX;
120    if ("HX".equals(codeString))
121      return V3ObservationInterpretation.HX;
122    if ("LX".equals(codeString))
123      return V3ObservationInterpretation.LX;
124    if ("HM".equals(codeString))
125      return V3ObservationInterpretation.HM;
126    if ("ObservationInterpretationDetection".equals(codeString))
127      return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION;
128    if ("IND".equals(codeString))
129      return V3ObservationInterpretation.IND;
130    if ("E".equals(codeString))
131      return V3ObservationInterpretation.E;
132    if ("NEG".equals(codeString))
133      return V3ObservationInterpretation.NEG;
134    if ("ND".equals(codeString))
135      return V3ObservationInterpretation.ND;
136    if ("POS".equals(codeString))
137      return V3ObservationInterpretation.POS;
138    if ("DET".equals(codeString))
139      return V3ObservationInterpretation.DET;
140    if ("ObservationInterpretationExpectation".equals(codeString))
141      return V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION;
142    if ("EXP".equals(codeString))
143      return V3ObservationInterpretation.EXP;
144    if ("UNE".equals(codeString))
145      return V3ObservationInterpretation.UNE;
146    if ("OBX".equals(codeString))
147      return V3ObservationInterpretation.OBX;
148    if ("ReactivityObservationInterpretation".equals(codeString))
149      return V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION;
150    if ("NR".equals(codeString))
151      return V3ObservationInterpretation.NR;
152    if ("RR".equals(codeString))
153      return V3ObservationInterpretation.RR;
154    if ("WR".equals(codeString))
155      return V3ObservationInterpretation.WR;
156    throw new IllegalArgumentException("Unknown V3ObservationInterpretation code '"+codeString+"'");
157  }
158
159  public String toCode(V3ObservationInterpretation code) {
160    if (code == V3ObservationInterpretation._GENETICOBSERVATIONINTERPRETATION)
161      return "_GeneticObservationInterpretation";
162    if (code == V3ObservationInterpretation.CAR)
163      return "CAR";
164    if (code == V3ObservationInterpretation.CARRIER)
165      return "Carrier";
166    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONCHANGE)
167      return "_ObservationInterpretationChange";
168    if (code == V3ObservationInterpretation.B)
169      return "B";
170    if (code == V3ObservationInterpretation.D)
171      return "D";
172    if (code == V3ObservationInterpretation.U)
173      return "U";
174    if (code == V3ObservationInterpretation.W)
175      return "W";
176    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONEXCEPTIONS)
177      return "_ObservationInterpretationExceptions";
178    if (code == V3ObservationInterpretation.LESS_THAN)
179      return "<";
180    if (code == V3ObservationInterpretation.GREATER_THAN)
181      return ">";
182    if (code == V3ObservationInterpretation.AC)
183      return "AC";
184    if (code == V3ObservationInterpretation.IE)
185      return "IE";
186    if (code == V3ObservationInterpretation.QCF)
187      return "QCF";
188    if (code == V3ObservationInterpretation.TOX)
189      return "TOX";
190    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONNORMALITY)
191      return "_ObservationInterpretationNormality";
192    if (code == V3ObservationInterpretation.A)
193      return "A";
194    if (code == V3ObservationInterpretation.AA)
195      return "AA";
196    if (code == V3ObservationInterpretation.HH)
197      return "HH";
198    if (code == V3ObservationInterpretation.LL)
199      return "LL";
200    if (code == V3ObservationInterpretation.H)
201      return "H";
202    if (code == V3ObservationInterpretation.H_)
203      return "H>";
204    if (code == V3ObservationInterpretation.HU)
205      return "HU";
206    if (code == V3ObservationInterpretation.L)
207      return "L";
208    if (code == V3ObservationInterpretation.L_)
209      return "L<";
210    if (code == V3ObservationInterpretation.LU)
211      return "LU";
212    if (code == V3ObservationInterpretation.N)
213      return "N";
214    if (code == V3ObservationInterpretation._OBSERVATIONINTERPRETATIONSUSCEPTIBILITY)
215      return "_ObservationInterpretationSusceptibility";
216    if (code == V3ObservationInterpretation.I)
217      return "I";
218    if (code == V3ObservationInterpretation.MS)
219      return "MS";
220    if (code == V3ObservationInterpretation.NCL)
221      return "NCL";
222    if (code == V3ObservationInterpretation.NS)
223      return "NS";
224    if (code == V3ObservationInterpretation.R)
225      return "R";
226    if (code == V3ObservationInterpretation.SYNR)
227      return "SYN-R";
228    if (code == V3ObservationInterpretation.S)
229      return "S";
230    if (code == V3ObservationInterpretation.SDD)
231      return "SDD";
232    if (code == V3ObservationInterpretation.SYNS)
233      return "SYN-S";
234    if (code == V3ObservationInterpretation.VS)
235      return "VS";
236    if (code == V3ObservationInterpretation.EX)
237      return "EX";
238    if (code == V3ObservationInterpretation.HX)
239      return "HX";
240    if (code == V3ObservationInterpretation.LX)
241      return "LX";
242    if (code == V3ObservationInterpretation.HM)
243      return "HM";
244    if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONDETECTION)
245      return "ObservationInterpretationDetection";
246    if (code == V3ObservationInterpretation.IND)
247      return "IND";
248    if (code == V3ObservationInterpretation.E)
249      return "E";
250    if (code == V3ObservationInterpretation.NEG)
251      return "NEG";
252    if (code == V3ObservationInterpretation.ND)
253      return "ND";
254    if (code == V3ObservationInterpretation.POS)
255      return "POS";
256    if (code == V3ObservationInterpretation.DET)
257      return "DET";
258    if (code == V3ObservationInterpretation.OBSERVATIONINTERPRETATIONEXPECTATION)
259      return "ObservationInterpretationExpectation";
260    if (code == V3ObservationInterpretation.EXP)
261      return "EXP";
262    if (code == V3ObservationInterpretation.UNE)
263      return "UNE";
264    if (code == V3ObservationInterpretation.OBX)
265      return "OBX";
266    if (code == V3ObservationInterpretation.REACTIVITYOBSERVATIONINTERPRETATION)
267      return "ReactivityObservationInterpretation";
268    if (code == V3ObservationInterpretation.NR)
269      return "NR";
270    if (code == V3ObservationInterpretation.RR)
271      return "RR";
272    if (code == V3ObservationInterpretation.WR)
273      return "WR";
274    return "?";
275  }
276
277    public String toSystem(V3ObservationInterpretation code) {
278      return code.getSystem();
279      }
280
281}
282