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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
033
034import org.hl7.fhir.r4.model.EnumFactory;
035
036public class V3RoleClassEnumFactory implements EnumFactory<V3RoleClass> {
037
038  public V3RoleClass fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("ROL".equals(codeString))
042      return V3RoleClass.ROL;
043    if ("_RoleClassAssociative".equals(codeString))
044      return V3RoleClass._ROLECLASSASSOCIATIVE;
045    if ("_RoleClassMutualRelationship".equals(codeString))
046      return V3RoleClass._ROLECLASSMUTUALRELATIONSHIP;
047    if ("_RoleClassRelationshipFormal".equals(codeString))
048      return V3RoleClass._ROLECLASSRELATIONSHIPFORMAL;
049    if ("AFFL".equals(codeString))
050      return V3RoleClass.AFFL;
051    if ("AGNT".equals(codeString))
052      return V3RoleClass.AGNT;
053    if ("ASSIGNED".equals(codeString))
054      return V3RoleClass.ASSIGNED;
055    if ("COMPAR".equals(codeString))
056      return V3RoleClass.COMPAR;
057    if ("SGNOFF".equals(codeString))
058      return V3RoleClass.SGNOFF;
059    if ("CON".equals(codeString))
060      return V3RoleClass.CON;
061    if ("ECON".equals(codeString))
062      return V3RoleClass.ECON;
063    if ("NOK".equals(codeString))
064      return V3RoleClass.NOK;
065    if ("GUARD".equals(codeString))
066      return V3RoleClass.GUARD;
067    if ("CIT".equals(codeString))
068      return V3RoleClass.CIT;
069    if ("COVPTY".equals(codeString))
070      return V3RoleClass.COVPTY;
071    if ("CLAIM".equals(codeString))
072      return V3RoleClass.CLAIM;
073    if ("NAMED".equals(codeString))
074      return V3RoleClass.NAMED;
075    if ("DEPEN".equals(codeString))
076      return V3RoleClass.DEPEN;
077    if ("INDIV".equals(codeString))
078      return V3RoleClass.INDIV;
079    if ("SUBSCR".equals(codeString))
080      return V3RoleClass.SUBSCR;
081    if ("PROG".equals(codeString))
082      return V3RoleClass.PROG;
083    if ("CRINV".equals(codeString))
084      return V3RoleClass.CRINV;
085    if ("CRSPNSR".equals(codeString))
086      return V3RoleClass.CRSPNSR;
087    if ("EMP".equals(codeString))
088      return V3RoleClass.EMP;
089    if ("MIL".equals(codeString))
090      return V3RoleClass.MIL;
091    if ("GUAR".equals(codeString))
092      return V3RoleClass.GUAR;
093    if ("INVSBJ".equals(codeString))
094      return V3RoleClass.INVSBJ;
095    if ("CASEBJ".equals(codeString))
096      return V3RoleClass.CASEBJ;
097    if ("RESBJ".equals(codeString))
098      return V3RoleClass.RESBJ;
099    if ("LIC".equals(codeString))
100      return V3RoleClass.LIC;
101    if ("NOT".equals(codeString))
102      return V3RoleClass.NOT;
103    if ("PROV".equals(codeString))
104      return V3RoleClass.PROV;
105    if ("PAT".equals(codeString))
106      return V3RoleClass.PAT;
107    if ("PAYEE".equals(codeString))
108      return V3RoleClass.PAYEE;
109    if ("PAYOR".equals(codeString))
110      return V3RoleClass.PAYOR;
111    if ("POLHOLD".equals(codeString))
112      return V3RoleClass.POLHOLD;
113    if ("QUAL".equals(codeString))
114      return V3RoleClass.QUAL;
115    if ("SPNSR".equals(codeString))
116      return V3RoleClass.SPNSR;
117    if ("STD".equals(codeString))
118      return V3RoleClass.STD;
119    if ("UNDWRT".equals(codeString))
120      return V3RoleClass.UNDWRT;
121    if ("CAREGIVER".equals(codeString))
122      return V3RoleClass.CAREGIVER;
123    if ("PRS".equals(codeString))
124      return V3RoleClass.PRS;
125    if ("SELF".equals(codeString))
126      return V3RoleClass.SELF;
127    if ("_RoleClassPassive".equals(codeString))
128      return V3RoleClass._ROLECLASSPASSIVE;
129    if ("ACCESS".equals(codeString))
130      return V3RoleClass.ACCESS;
131    if ("ADJY".equals(codeString))
132      return V3RoleClass.ADJY;
133    if ("CONC".equals(codeString))
134      return V3RoleClass.CONC;
135    if ("BOND".equals(codeString))
136      return V3RoleClass.BOND;
137    if ("CONY".equals(codeString))
138      return V3RoleClass.CONY;
139    if ("ADMM".equals(codeString))
140      return V3RoleClass.ADMM;
141    if ("BIRTHPL".equals(codeString))
142      return V3RoleClass.BIRTHPL;
143    if ("DEATHPLC".equals(codeString))
144      return V3RoleClass.DEATHPLC;
145    if ("DST".equals(codeString))
146      return V3RoleClass.DST;
147    if ("RET".equals(codeString))
148      return V3RoleClass.RET;
149    if ("EXLOC".equals(codeString))
150      return V3RoleClass.EXLOC;
151    if ("SDLOC".equals(codeString))
152      return V3RoleClass.SDLOC;
153    if ("DSDLOC".equals(codeString))
154      return V3RoleClass.DSDLOC;
155    if ("ISDLOC".equals(codeString))
156      return V3RoleClass.ISDLOC;
157    if ("EXPR".equals(codeString))
158      return V3RoleClass.EXPR;
159    if ("HLD".equals(codeString))
160      return V3RoleClass.HLD;
161    if ("HLTHCHRT".equals(codeString))
162      return V3RoleClass.HLTHCHRT;
163    if ("IDENT".equals(codeString))
164      return V3RoleClass.IDENT;
165    if ("MANU".equals(codeString))
166      return V3RoleClass.MANU;
167    if ("THER".equals(codeString))
168      return V3RoleClass.THER;
169    if ("MNT".equals(codeString))
170      return V3RoleClass.MNT;
171    if ("OWN".equals(codeString))
172      return V3RoleClass.OWN;
173    if ("RGPR".equals(codeString))
174      return V3RoleClass.RGPR;
175    if ("TERR".equals(codeString))
176      return V3RoleClass.TERR;
177    if ("USED".equals(codeString))
178      return V3RoleClass.USED;
179    if ("WRTE".equals(codeString))
180      return V3RoleClass.WRTE;
181    if ("_RoleClassOntological".equals(codeString))
182      return V3RoleClass._ROLECLASSONTOLOGICAL;
183    if ("EQUIV".equals(codeString))
184      return V3RoleClass.EQUIV;
185    if ("SAME".equals(codeString))
186      return V3RoleClass.SAME;
187    if ("SUBY".equals(codeString))
188      return V3RoleClass.SUBY;
189    if ("GEN".equals(codeString))
190      return V3RoleClass.GEN;
191    if ("GRIC".equals(codeString))
192      return V3RoleClass.GRIC;
193    if ("INST".equals(codeString))
194      return V3RoleClass.INST;
195    if ("SUBS".equals(codeString))
196      return V3RoleClass.SUBS;
197    if ("_RoleClassPartitive".equals(codeString))
198      return V3RoleClass._ROLECLASSPARTITIVE;
199    if ("CONT".equals(codeString))
200      return V3RoleClass.CONT;
201    if ("EXPAGTCAR".equals(codeString))
202      return V3RoleClass.EXPAGTCAR;
203    if ("EXPVECTOR".equals(codeString))
204      return V3RoleClass.EXPVECTOR;
205    if ("FOMITE".equals(codeString))
206      return V3RoleClass.FOMITE;
207    if ("INGR".equals(codeString))
208      return V3RoleClass.INGR;
209    if ("ACTI".equals(codeString))
210      return V3RoleClass.ACTI;
211    if ("ACTIB".equals(codeString))
212      return V3RoleClass.ACTIB;
213    if ("ACTIM".equals(codeString))
214      return V3RoleClass.ACTIM;
215    if ("ACTIR".equals(codeString))
216      return V3RoleClass.ACTIR;
217    if ("ADJV".equals(codeString))
218      return V3RoleClass.ADJV;
219    if ("ADTV".equals(codeString))
220      return V3RoleClass.ADTV;
221    if ("BASE".equals(codeString))
222      return V3RoleClass.BASE;
223    if ("CNTM".equals(codeString))
224      return V3RoleClass.CNTM;
225    if ("IACT".equals(codeString))
226      return V3RoleClass.IACT;
227    if ("COLR".equals(codeString))
228      return V3RoleClass.COLR;
229    if ("FLVR".equals(codeString))
230      return V3RoleClass.FLVR;
231    if ("PRSV".equals(codeString))
232      return V3RoleClass.PRSV;
233    if ("STBL".equals(codeString))
234      return V3RoleClass.STBL;
235    if ("MECH".equals(codeString))
236      return V3RoleClass.MECH;
237    if ("LOCE".equals(codeString))
238      return V3RoleClass.LOCE;
239    if ("STOR".equals(codeString))
240      return V3RoleClass.STOR;
241    if ("MBR".equals(codeString))
242      return V3RoleClass.MBR;
243    if ("PART".equals(codeString))
244      return V3RoleClass.PART;
245    if ("ACTM".equals(codeString))
246      return V3RoleClass.ACTM;
247    if ("SPEC".equals(codeString))
248      return V3RoleClass.SPEC;
249    if ("ALQT".equals(codeString))
250      return V3RoleClass.ALQT;
251    if ("ISLT".equals(codeString))
252      return V3RoleClass.ISLT;
253    if ("CHILD".equals(codeString))
254      return V3RoleClass.CHILD;
255    if ("CRED".equals(codeString))
256      return V3RoleClass.CRED;
257    if ("NURPRAC".equals(codeString))
258      return V3RoleClass.NURPRAC;
259    if ("NURS".equals(codeString))
260      return V3RoleClass.NURS;
261    if ("PA".equals(codeString))
262      return V3RoleClass.PA;
263    if ("PHYS".equals(codeString))
264      return V3RoleClass.PHYS;
265    throw new IllegalArgumentException("Unknown V3RoleClass code '" + codeString + "'");
266  }
267
268  public String toCode(V3RoleClass code) {
269       if (code == V3RoleClass.NULL)
270           return null;
271       if (code == V3RoleClass.ROL)
272      return "ROL";
273    if (code == V3RoleClass._ROLECLASSASSOCIATIVE)
274      return "_RoleClassAssociative";
275    if (code == V3RoleClass._ROLECLASSMUTUALRELATIONSHIP)
276      return "_RoleClassMutualRelationship";
277    if (code == V3RoleClass._ROLECLASSRELATIONSHIPFORMAL)
278      return "_RoleClassRelationshipFormal";
279    if (code == V3RoleClass.AFFL)
280      return "AFFL";
281    if (code == V3RoleClass.AGNT)
282      return "AGNT";
283    if (code == V3RoleClass.ASSIGNED)
284      return "ASSIGNED";
285    if (code == V3RoleClass.COMPAR)
286      return "COMPAR";
287    if (code == V3RoleClass.SGNOFF)
288      return "SGNOFF";
289    if (code == V3RoleClass.CON)
290      return "CON";
291    if (code == V3RoleClass.ECON)
292      return "ECON";
293    if (code == V3RoleClass.NOK)
294      return "NOK";
295    if (code == V3RoleClass.GUARD)
296      return "GUARD";
297    if (code == V3RoleClass.CIT)
298      return "CIT";
299    if (code == V3RoleClass.COVPTY)
300      return "COVPTY";
301    if (code == V3RoleClass.CLAIM)
302      return "CLAIM";
303    if (code == V3RoleClass.NAMED)
304      return "NAMED";
305    if (code == V3RoleClass.DEPEN)
306      return "DEPEN";
307    if (code == V3RoleClass.INDIV)
308      return "INDIV";
309    if (code == V3RoleClass.SUBSCR)
310      return "SUBSCR";
311    if (code == V3RoleClass.PROG)
312      return "PROG";
313    if (code == V3RoleClass.CRINV)
314      return "CRINV";
315    if (code == V3RoleClass.CRSPNSR)
316      return "CRSPNSR";
317    if (code == V3RoleClass.EMP)
318      return "EMP";
319    if (code == V3RoleClass.MIL)
320      return "MIL";
321    if (code == V3RoleClass.GUAR)
322      return "GUAR";
323    if (code == V3RoleClass.INVSBJ)
324      return "INVSBJ";
325    if (code == V3RoleClass.CASEBJ)
326      return "CASEBJ";
327    if (code == V3RoleClass.RESBJ)
328      return "RESBJ";
329    if (code == V3RoleClass.LIC)
330      return "LIC";
331    if (code == V3RoleClass.NOT)
332      return "NOT";
333    if (code == V3RoleClass.PROV)
334      return "PROV";
335    if (code == V3RoleClass.PAT)
336      return "PAT";
337    if (code == V3RoleClass.PAYEE)
338      return "PAYEE";
339    if (code == V3RoleClass.PAYOR)
340      return "PAYOR";
341    if (code == V3RoleClass.POLHOLD)
342      return "POLHOLD";
343    if (code == V3RoleClass.QUAL)
344      return "QUAL";
345    if (code == V3RoleClass.SPNSR)
346      return "SPNSR";
347    if (code == V3RoleClass.STD)
348      return "STD";
349    if (code == V3RoleClass.UNDWRT)
350      return "UNDWRT";
351    if (code == V3RoleClass.CAREGIVER)
352      return "CAREGIVER";
353    if (code == V3RoleClass.PRS)
354      return "PRS";
355    if (code == V3RoleClass.SELF)
356      return "SELF";
357    if (code == V3RoleClass._ROLECLASSPASSIVE)
358      return "_RoleClassPassive";
359    if (code == V3RoleClass.ACCESS)
360      return "ACCESS";
361    if (code == V3RoleClass.ADJY)
362      return "ADJY";
363    if (code == V3RoleClass.CONC)
364      return "CONC";
365    if (code == V3RoleClass.BOND)
366      return "BOND";
367    if (code == V3RoleClass.CONY)
368      return "CONY";
369    if (code == V3RoleClass.ADMM)
370      return "ADMM";
371    if (code == V3RoleClass.BIRTHPL)
372      return "BIRTHPL";
373    if (code == V3RoleClass.DEATHPLC)
374      return "DEATHPLC";
375    if (code == V3RoleClass.DST)
376      return "DST";
377    if (code == V3RoleClass.RET)
378      return "RET";
379    if (code == V3RoleClass.EXLOC)
380      return "EXLOC";
381    if (code == V3RoleClass.SDLOC)
382      return "SDLOC";
383    if (code == V3RoleClass.DSDLOC)
384      return "DSDLOC";
385    if (code == V3RoleClass.ISDLOC)
386      return "ISDLOC";
387    if (code == V3RoleClass.EXPR)
388      return "EXPR";
389    if (code == V3RoleClass.HLD)
390      return "HLD";
391    if (code == V3RoleClass.HLTHCHRT)
392      return "HLTHCHRT";
393    if (code == V3RoleClass.IDENT)
394      return "IDENT";
395    if (code == V3RoleClass.MANU)
396      return "MANU";
397    if (code == V3RoleClass.THER)
398      return "THER";
399    if (code == V3RoleClass.MNT)
400      return "MNT";
401    if (code == V3RoleClass.OWN)
402      return "OWN";
403    if (code == V3RoleClass.RGPR)
404      return "RGPR";
405    if (code == V3RoleClass.TERR)
406      return "TERR";
407    if (code == V3RoleClass.USED)
408      return "USED";
409    if (code == V3RoleClass.WRTE)
410      return "WRTE";
411    if (code == V3RoleClass._ROLECLASSONTOLOGICAL)
412      return "_RoleClassOntological";
413    if (code == V3RoleClass.EQUIV)
414      return "EQUIV";
415    if (code == V3RoleClass.SAME)
416      return "SAME";
417    if (code == V3RoleClass.SUBY)
418      return "SUBY";
419    if (code == V3RoleClass.GEN)
420      return "GEN";
421    if (code == V3RoleClass.GRIC)
422      return "GRIC";
423    if (code == V3RoleClass.INST)
424      return "INST";
425    if (code == V3RoleClass.SUBS)
426      return "SUBS";
427    if (code == V3RoleClass._ROLECLASSPARTITIVE)
428      return "_RoleClassPartitive";
429    if (code == V3RoleClass.CONT)
430      return "CONT";
431    if (code == V3RoleClass.EXPAGTCAR)
432      return "EXPAGTCAR";
433    if (code == V3RoleClass.EXPVECTOR)
434      return "EXPVECTOR";
435    if (code == V3RoleClass.FOMITE)
436      return "FOMITE";
437    if (code == V3RoleClass.INGR)
438      return "INGR";
439    if (code == V3RoleClass.ACTI)
440      return "ACTI";
441    if (code == V3RoleClass.ACTIB)
442      return "ACTIB";
443    if (code == V3RoleClass.ACTIM)
444      return "ACTIM";
445    if (code == V3RoleClass.ACTIR)
446      return "ACTIR";
447    if (code == V3RoleClass.ADJV)
448      return "ADJV";
449    if (code == V3RoleClass.ADTV)
450      return "ADTV";
451    if (code == V3RoleClass.BASE)
452      return "BASE";
453    if (code == V3RoleClass.CNTM)
454      return "CNTM";
455    if (code == V3RoleClass.IACT)
456      return "IACT";
457    if (code == V3RoleClass.COLR)
458      return "COLR";
459    if (code == V3RoleClass.FLVR)
460      return "FLVR";
461    if (code == V3RoleClass.PRSV)
462      return "PRSV";
463    if (code == V3RoleClass.STBL)
464      return "STBL";
465    if (code == V3RoleClass.MECH)
466      return "MECH";
467    if (code == V3RoleClass.LOCE)
468      return "LOCE";
469    if (code == V3RoleClass.STOR)
470      return "STOR";
471    if (code == V3RoleClass.MBR)
472      return "MBR";
473    if (code == V3RoleClass.PART)
474      return "PART";
475    if (code == V3RoleClass.ACTM)
476      return "ACTM";
477    if (code == V3RoleClass.SPEC)
478      return "SPEC";
479    if (code == V3RoleClass.ALQT)
480      return "ALQT";
481    if (code == V3RoleClass.ISLT)
482      return "ISLT";
483    if (code == V3RoleClass.CHILD)
484      return "CHILD";
485    if (code == V3RoleClass.CRED)
486      return "CRED";
487    if (code == V3RoleClass.NURPRAC)
488      return "NURPRAC";
489    if (code == V3RoleClass.NURS)
490      return "NURS";
491    if (code == V3RoleClass.PA)
492      return "PA";
493    if (code == V3RoleClass.PHYS)
494      return "PHYS";
495    return "?";
496   }
497
498  public String toSystem(V3RoleClass code) {
499    return code.getSystem();
500  }
501
502}