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 V3SpecimenTypeEnumFactory implements EnumFactory<V3SpecimenType> {
038
039  public V3SpecimenType fromCode(String codeString) throws IllegalArgumentException {
040    if (codeString == null || "".equals(codeString))
041      return null;
042    if ("_SpecimenEntityType".equals(codeString))
043      return V3SpecimenType._SPECIMENENTITYTYPE;
044    if ("ABS".equals(codeString))
045      return V3SpecimenType.ABS;
046    if ("AMN".equals(codeString))
047      return V3SpecimenType.AMN;
048    if ("ASP".equals(codeString))
049      return V3SpecimenType.ASP;
050    if ("BBL".equals(codeString))
051      return V3SpecimenType.BBL;
052    if ("BDY".equals(codeString))
053      return V3SpecimenType.BDY;
054    if ("BIFL".equals(codeString))
055      return V3SpecimenType.BIFL;
056    if ("BLD".equals(codeString))
057      return V3SpecimenType.BLD;
058    if ("BLDA".equals(codeString))
059      return V3SpecimenType.BLDA;
060    if ("BLDC".equals(codeString))
061      return V3SpecimenType.BLDC;
062    if ("BLDCO".equals(codeString))
063      return V3SpecimenType.BLDCO;
064    if ("BLDV".equals(codeString))
065      return V3SpecimenType.BLDV;
066    if ("BON".equals(codeString))
067      return V3SpecimenType.BON;
068    if ("BPH".equals(codeString))
069      return V3SpecimenType.BPH;
070    if ("BPU".equals(codeString))
071      return V3SpecimenType.BPU;
072    if ("BRN".equals(codeString))
073      return V3SpecimenType.BRN;
074    if ("BRO".equals(codeString))
075      return V3SpecimenType.BRO;
076    if ("BRTH".equals(codeString))
077      return V3SpecimenType.BRTH;
078    if ("CALC".equals(codeString))
079      return V3SpecimenType.CALC;
080    if ("CDM".equals(codeString))
081      return V3SpecimenType.CDM;
082    if ("CNJT".equals(codeString))
083      return V3SpecimenType.CNJT;
084    if ("CNL".equals(codeString))
085      return V3SpecimenType.CNL;
086    if ("COL".equals(codeString))
087      return V3SpecimenType.COL;
088    if ("CRN".equals(codeString))
089      return V3SpecimenType.CRN;
090    if ("CSF".equals(codeString))
091      return V3SpecimenType.CSF;
092    if ("CTP".equals(codeString))
093      return V3SpecimenType.CTP;
094    if ("CUR".equals(codeString))
095      return V3SpecimenType.CUR;
096    if ("CVM".equals(codeString))
097      return V3SpecimenType.CVM;
098    if ("CVX".equals(codeString))
099      return V3SpecimenType.CVX;
100    if ("CYST".equals(codeString))
101      return V3SpecimenType.CYST;
102    if ("DIAF".equals(codeString))
103      return V3SpecimenType.DIAF;
104    if ("DOSE".equals(codeString))
105      return V3SpecimenType.DOSE;
106    if ("DRN".equals(codeString))
107      return V3SpecimenType.DRN;
108    if ("DUFL".equals(codeString))
109      return V3SpecimenType.DUFL;
110    if ("EAR".equals(codeString))
111      return V3SpecimenType.EAR;
112    if ("EARW".equals(codeString))
113      return V3SpecimenType.EARW;
114    if ("ELT".equals(codeString))
115      return V3SpecimenType.ELT;
116    if ("ENDC".equals(codeString))
117      return V3SpecimenType.ENDC;
118    if ("ENDM".equals(codeString))
119      return V3SpecimenType.ENDM;
120    if ("EOS".equals(codeString))
121      return V3SpecimenType.EOS;
122    if ("EYE".equals(codeString))
123      return V3SpecimenType.EYE;
124    if ("FIB".equals(codeString))
125      return V3SpecimenType.FIB;
126    if ("FIST".equals(codeString))
127      return V3SpecimenType.FIST;
128    if ("FLT".equals(codeString))
129      return V3SpecimenType.FLT;
130    if ("FLU".equals(codeString))
131      return V3SpecimenType.FLU;
132    if ("FOOD".equals(codeString))
133      return V3SpecimenType.FOOD;
134    if ("GAS".equals(codeString))
135      return V3SpecimenType.GAS;
136    if ("GAST".equals(codeString))
137      return V3SpecimenType.GAST;
138    if ("GEN".equals(codeString))
139      return V3SpecimenType.GEN;
140    if ("GENC".equals(codeString))
141      return V3SpecimenType.GENC;
142    if ("GENF".equals(codeString))
143      return V3SpecimenType.GENF;
144    if ("GENL".equals(codeString))
145      return V3SpecimenType.GENL;
146    if ("GENV".equals(codeString))
147      return V3SpecimenType.GENV;
148    if ("HAR".equals(codeString))
149      return V3SpecimenType.HAR;
150    if ("IHG".equals(codeString))
151      return V3SpecimenType.IHG;
152    if ("ISLT".equals(codeString))
153      return V3SpecimenType.ISLT;
154    if ("IT".equals(codeString))
155      return V3SpecimenType.IT;
156    if ("LAM".equals(codeString))
157      return V3SpecimenType.LAM;
158    if ("LIQ".equals(codeString))
159      return V3SpecimenType.LIQ;
160    if ("LN".equals(codeString))
161      return V3SpecimenType.LN;
162    if ("LNA".equals(codeString))
163      return V3SpecimenType.LNA;
164    if ("LNV".equals(codeString))
165      return V3SpecimenType.LNV;
166    if ("LYM".equals(codeString))
167      return V3SpecimenType.LYM;
168    if ("MAC".equals(codeString))
169      return V3SpecimenType.MAC;
170    if ("MAR".equals(codeString))
171      return V3SpecimenType.MAR;
172    if ("MBLD".equals(codeString))
173      return V3SpecimenType.MBLD;
174    if ("MEC".equals(codeString))
175      return V3SpecimenType.MEC;
176    if ("MILK".equals(codeString))
177      return V3SpecimenType.MILK;
178    if ("MLK".equals(codeString))
179      return V3SpecimenType.MLK;
180    if ("NAIL".equals(codeString))
181      return V3SpecimenType.NAIL;
182    if ("NOS".equals(codeString))
183      return V3SpecimenType.NOS;
184    if ("PAFL".equals(codeString))
185      return V3SpecimenType.PAFL;
186    if ("PAT".equals(codeString))
187      return V3SpecimenType.PAT;
188    if ("PLAS".equals(codeString))
189      return V3SpecimenType.PLAS;
190    if ("PLB".equals(codeString))
191      return V3SpecimenType.PLB;
192    if ("PLC".equals(codeString))
193      return V3SpecimenType.PLC;
194    if ("PLR".equals(codeString))
195      return V3SpecimenType.PLR;
196    if ("PMN".equals(codeString))
197      return V3SpecimenType.PMN;
198    if ("PPP".equals(codeString))
199      return V3SpecimenType.PPP;
200    if ("PRP".equals(codeString))
201      return V3SpecimenType.PRP;
202    if ("PRT".equals(codeString))
203      return V3SpecimenType.PRT;
204    if ("PUS".equals(codeString))
205      return V3SpecimenType.PUS;
206    if ("RBC".equals(codeString))
207      return V3SpecimenType.RBC;
208    if ("SAL".equals(codeString))
209      return V3SpecimenType.SAL;
210    if ("SER".equals(codeString))
211      return V3SpecimenType.SER;
212    if ("SKM".equals(codeString))
213      return V3SpecimenType.SKM;
214    if ("SKN".equals(codeString))
215      return V3SpecimenType.SKN;
216    if ("SMN".equals(codeString))
217      return V3SpecimenType.SMN;
218    if ("SMPLS".equals(codeString))
219      return V3SpecimenType.SMPLS;
220    if ("SNV".equals(codeString))
221      return V3SpecimenType.SNV;
222    if ("SPRM".equals(codeString))
223      return V3SpecimenType.SPRM;
224    if ("SPT".equals(codeString))
225      return V3SpecimenType.SPT;
226    if ("SPTC".equals(codeString))
227      return V3SpecimenType.SPTC;
228    if ("SPTT".equals(codeString))
229      return V3SpecimenType.SPTT;
230    if ("STL".equals(codeString))
231      return V3SpecimenType.STL;
232    if ("SWT".equals(codeString))
233      return V3SpecimenType.SWT;
234    if ("TEAR".equals(codeString))
235      return V3SpecimenType.TEAR;
236    if ("THRB".equals(codeString))
237      return V3SpecimenType.THRB;
238    if ("THRT".equals(codeString))
239      return V3SpecimenType.THRT;
240    if ("TISG".equals(codeString))
241      return V3SpecimenType.TISG;
242    if ("TISPL".equals(codeString))
243      return V3SpecimenType.TISPL;
244    if ("TISS".equals(codeString))
245      return V3SpecimenType.TISS;
246    if ("TISU".equals(codeString))
247      return V3SpecimenType.TISU;
248    if ("TLGI".equals(codeString))
249      return V3SpecimenType.TLGI;
250    if ("TLNG".equals(codeString))
251      return V3SpecimenType.TLNG;
252    if ("TSMI".equals(codeString))
253      return V3SpecimenType.TSMI;
254    if ("TUB".equals(codeString))
255      return V3SpecimenType.TUB;
256    if ("ULC".equals(codeString))
257      return V3SpecimenType.ULC;
258    if ("UMB".equals(codeString))
259      return V3SpecimenType.UMB;
260    if ("UMED".equals(codeString))
261      return V3SpecimenType.UMED;
262    if ("UR".equals(codeString))
263      return V3SpecimenType.UR;
264    if ("URC".equals(codeString))
265      return V3SpecimenType.URC;
266    if ("URNS".equals(codeString))
267      return V3SpecimenType.URNS;
268    if ("URT".equals(codeString))
269      return V3SpecimenType.URT;
270    if ("URTH".equals(codeString))
271      return V3SpecimenType.URTH;
272    if ("USUB".equals(codeString))
273      return V3SpecimenType.USUB;
274    if ("VOM".equals(codeString))
275      return V3SpecimenType.VOM;
276    if ("WAT".equals(codeString))
277      return V3SpecimenType.WAT;
278    if ("WBC".equals(codeString))
279      return V3SpecimenType.WBC;
280    if ("WICK".equals(codeString))
281      return V3SpecimenType.WICK;
282    if ("WND".equals(codeString))
283      return V3SpecimenType.WND;
284    if ("WNDA".equals(codeString))
285      return V3SpecimenType.WNDA;
286    if ("WNDD".equals(codeString))
287      return V3SpecimenType.WNDD;
288    if ("WNDE".equals(codeString))
289      return V3SpecimenType.WNDE;
290    throw new IllegalArgumentException("Unknown V3SpecimenType code '"+codeString+"'");
291  }
292
293  public String toCode(V3SpecimenType code) {
294    if (code == V3SpecimenType._SPECIMENENTITYTYPE)
295      return "_SpecimenEntityType";
296    if (code == V3SpecimenType.ABS)
297      return "ABS";
298    if (code == V3SpecimenType.AMN)
299      return "AMN";
300    if (code == V3SpecimenType.ASP)
301      return "ASP";
302    if (code == V3SpecimenType.BBL)
303      return "BBL";
304    if (code == V3SpecimenType.BDY)
305      return "BDY";
306    if (code == V3SpecimenType.BIFL)
307      return "BIFL";
308    if (code == V3SpecimenType.BLD)
309      return "BLD";
310    if (code == V3SpecimenType.BLDA)
311      return "BLDA";
312    if (code == V3SpecimenType.BLDC)
313      return "BLDC";
314    if (code == V3SpecimenType.BLDCO)
315      return "BLDCO";
316    if (code == V3SpecimenType.BLDV)
317      return "BLDV";
318    if (code == V3SpecimenType.BON)
319      return "BON";
320    if (code == V3SpecimenType.BPH)
321      return "BPH";
322    if (code == V3SpecimenType.BPU)
323      return "BPU";
324    if (code == V3SpecimenType.BRN)
325      return "BRN";
326    if (code == V3SpecimenType.BRO)
327      return "BRO";
328    if (code == V3SpecimenType.BRTH)
329      return "BRTH";
330    if (code == V3SpecimenType.CALC)
331      return "CALC";
332    if (code == V3SpecimenType.CDM)
333      return "CDM";
334    if (code == V3SpecimenType.CNJT)
335      return "CNJT";
336    if (code == V3SpecimenType.CNL)
337      return "CNL";
338    if (code == V3SpecimenType.COL)
339      return "COL";
340    if (code == V3SpecimenType.CRN)
341      return "CRN";
342    if (code == V3SpecimenType.CSF)
343      return "CSF";
344    if (code == V3SpecimenType.CTP)
345      return "CTP";
346    if (code == V3SpecimenType.CUR)
347      return "CUR";
348    if (code == V3SpecimenType.CVM)
349      return "CVM";
350    if (code == V3SpecimenType.CVX)
351      return "CVX";
352    if (code == V3SpecimenType.CYST)
353      return "CYST";
354    if (code == V3SpecimenType.DIAF)
355      return "DIAF";
356    if (code == V3SpecimenType.DOSE)
357      return "DOSE";
358    if (code == V3SpecimenType.DRN)
359      return "DRN";
360    if (code == V3SpecimenType.DUFL)
361      return "DUFL";
362    if (code == V3SpecimenType.EAR)
363      return "EAR";
364    if (code == V3SpecimenType.EARW)
365      return "EARW";
366    if (code == V3SpecimenType.ELT)
367      return "ELT";
368    if (code == V3SpecimenType.ENDC)
369      return "ENDC";
370    if (code == V3SpecimenType.ENDM)
371      return "ENDM";
372    if (code == V3SpecimenType.EOS)
373      return "EOS";
374    if (code == V3SpecimenType.EYE)
375      return "EYE";
376    if (code == V3SpecimenType.FIB)
377      return "FIB";
378    if (code == V3SpecimenType.FIST)
379      return "FIST";
380    if (code == V3SpecimenType.FLT)
381      return "FLT";
382    if (code == V3SpecimenType.FLU)
383      return "FLU";
384    if (code == V3SpecimenType.FOOD)
385      return "FOOD";
386    if (code == V3SpecimenType.GAS)
387      return "GAS";
388    if (code == V3SpecimenType.GAST)
389      return "GAST";
390    if (code == V3SpecimenType.GEN)
391      return "GEN";
392    if (code == V3SpecimenType.GENC)
393      return "GENC";
394    if (code == V3SpecimenType.GENF)
395      return "GENF";
396    if (code == V3SpecimenType.GENL)
397      return "GENL";
398    if (code == V3SpecimenType.GENV)
399      return "GENV";
400    if (code == V3SpecimenType.HAR)
401      return "HAR";
402    if (code == V3SpecimenType.IHG)
403      return "IHG";
404    if (code == V3SpecimenType.ISLT)
405      return "ISLT";
406    if (code == V3SpecimenType.IT)
407      return "IT";
408    if (code == V3SpecimenType.LAM)
409      return "LAM";
410    if (code == V3SpecimenType.LIQ)
411      return "LIQ";
412    if (code == V3SpecimenType.LN)
413      return "LN";
414    if (code == V3SpecimenType.LNA)
415      return "LNA";
416    if (code == V3SpecimenType.LNV)
417      return "LNV";
418    if (code == V3SpecimenType.LYM)
419      return "LYM";
420    if (code == V3SpecimenType.MAC)
421      return "MAC";
422    if (code == V3SpecimenType.MAR)
423      return "MAR";
424    if (code == V3SpecimenType.MBLD)
425      return "MBLD";
426    if (code == V3SpecimenType.MEC)
427      return "MEC";
428    if (code == V3SpecimenType.MILK)
429      return "MILK";
430    if (code == V3SpecimenType.MLK)
431      return "MLK";
432    if (code == V3SpecimenType.NAIL)
433      return "NAIL";
434    if (code == V3SpecimenType.NOS)
435      return "NOS";
436    if (code == V3SpecimenType.PAFL)
437      return "PAFL";
438    if (code == V3SpecimenType.PAT)
439      return "PAT";
440    if (code == V3SpecimenType.PLAS)
441      return "PLAS";
442    if (code == V3SpecimenType.PLB)
443      return "PLB";
444    if (code == V3SpecimenType.PLC)
445      return "PLC";
446    if (code == V3SpecimenType.PLR)
447      return "PLR";
448    if (code == V3SpecimenType.PMN)
449      return "PMN";
450    if (code == V3SpecimenType.PPP)
451      return "PPP";
452    if (code == V3SpecimenType.PRP)
453      return "PRP";
454    if (code == V3SpecimenType.PRT)
455      return "PRT";
456    if (code == V3SpecimenType.PUS)
457      return "PUS";
458    if (code == V3SpecimenType.RBC)
459      return "RBC";
460    if (code == V3SpecimenType.SAL)
461      return "SAL";
462    if (code == V3SpecimenType.SER)
463      return "SER";
464    if (code == V3SpecimenType.SKM)
465      return "SKM";
466    if (code == V3SpecimenType.SKN)
467      return "SKN";
468    if (code == V3SpecimenType.SMN)
469      return "SMN";
470    if (code == V3SpecimenType.SMPLS)
471      return "SMPLS";
472    if (code == V3SpecimenType.SNV)
473      return "SNV";
474    if (code == V3SpecimenType.SPRM)
475      return "SPRM";
476    if (code == V3SpecimenType.SPT)
477      return "SPT";
478    if (code == V3SpecimenType.SPTC)
479      return "SPTC";
480    if (code == V3SpecimenType.SPTT)
481      return "SPTT";
482    if (code == V3SpecimenType.STL)
483      return "STL";
484    if (code == V3SpecimenType.SWT)
485      return "SWT";
486    if (code == V3SpecimenType.TEAR)
487      return "TEAR";
488    if (code == V3SpecimenType.THRB)
489      return "THRB";
490    if (code == V3SpecimenType.THRT)
491      return "THRT";
492    if (code == V3SpecimenType.TISG)
493      return "TISG";
494    if (code == V3SpecimenType.TISPL)
495      return "TISPL";
496    if (code == V3SpecimenType.TISS)
497      return "TISS";
498    if (code == V3SpecimenType.TISU)
499      return "TISU";
500    if (code == V3SpecimenType.TLGI)
501      return "TLGI";
502    if (code == V3SpecimenType.TLNG)
503      return "TLNG";
504    if (code == V3SpecimenType.TSMI)
505      return "TSMI";
506    if (code == V3SpecimenType.TUB)
507      return "TUB";
508    if (code == V3SpecimenType.ULC)
509      return "ULC";
510    if (code == V3SpecimenType.UMB)
511      return "UMB";
512    if (code == V3SpecimenType.UMED)
513      return "UMED";
514    if (code == V3SpecimenType.UR)
515      return "UR";
516    if (code == V3SpecimenType.URC)
517      return "URC";
518    if (code == V3SpecimenType.URNS)
519      return "URNS";
520    if (code == V3SpecimenType.URT)
521      return "URT";
522    if (code == V3SpecimenType.URTH)
523      return "URTH";
524    if (code == V3SpecimenType.USUB)
525      return "USUB";
526    if (code == V3SpecimenType.VOM)
527      return "VOM";
528    if (code == V3SpecimenType.WAT)
529      return "WAT";
530    if (code == V3SpecimenType.WBC)
531      return "WBC";
532    if (code == V3SpecimenType.WICK)
533      return "WICK";
534    if (code == V3SpecimenType.WND)
535      return "WND";
536    if (code == V3SpecimenType.WNDA)
537      return "WNDA";
538    if (code == V3SpecimenType.WNDD)
539      return "WNDD";
540    if (code == V3SpecimenType.WNDE)
541      return "WNDE";
542    return "?";
543  }
544
545    public String toSystem(V3SpecimenType code) {
546      return code.getSystem();
547      }
548
549}
550