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 V3ParticipationTypeEnumFactory implements EnumFactory<V3ParticipationType> {
037
038  public V3ParticipationType fromCode(String codeString) throws IllegalArgumentException {
039    if (codeString == null || "".equals(codeString))
040      return null;
041    if ("PART".equals(codeString))
042      return V3ParticipationType.PART;
043    if ("_ParticipationAncillary".equals(codeString))
044      return V3ParticipationType._PARTICIPATIONANCILLARY;
045    if ("ADM".equals(codeString))
046      return V3ParticipationType.ADM;
047    if ("ATND".equals(codeString))
048      return V3ParticipationType.ATND;
049    if ("CALLBCK".equals(codeString))
050      return V3ParticipationType.CALLBCK;
051    if ("CON".equals(codeString))
052      return V3ParticipationType.CON;
053    if ("DIS".equals(codeString))
054      return V3ParticipationType.DIS;
055    if ("ESC".equals(codeString))
056      return V3ParticipationType.ESC;
057    if ("REF".equals(codeString))
058      return V3ParticipationType.REF;
059    if ("_ParticipationInformationGenerator".equals(codeString))
060      return V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR;
061    if ("AUT".equals(codeString))
062      return V3ParticipationType.AUT;
063    if ("INF".equals(codeString))
064      return V3ParticipationType.INF;
065    if ("TRANS".equals(codeString))
066      return V3ParticipationType.TRANS;
067    if ("ENT".equals(codeString))
068      return V3ParticipationType.ENT;
069    if ("WIT".equals(codeString))
070      return V3ParticipationType.WIT;
071    if ("CST".equals(codeString))
072      return V3ParticipationType.CST;
073    if ("DIR".equals(codeString))
074      return V3ParticipationType.DIR;
075    if ("ALY".equals(codeString))
076      return V3ParticipationType.ALY;
077    if ("BBY".equals(codeString))
078      return V3ParticipationType.BBY;
079    if ("CAT".equals(codeString))
080      return V3ParticipationType.CAT;
081    if ("CSM".equals(codeString))
082      return V3ParticipationType.CSM;
083    if ("TPA".equals(codeString))
084      return V3ParticipationType.TPA;
085    if ("DEV".equals(codeString))
086      return V3ParticipationType.DEV;
087    if ("NRD".equals(codeString))
088      return V3ParticipationType.NRD;
089    if ("RDV".equals(codeString))
090      return V3ParticipationType.RDV;
091    if ("DON".equals(codeString))
092      return V3ParticipationType.DON;
093    if ("EXPAGNT".equals(codeString))
094      return V3ParticipationType.EXPAGNT;
095    if ("EXPART".equals(codeString))
096      return V3ParticipationType.EXPART;
097    if ("EXPTRGT".equals(codeString))
098      return V3ParticipationType.EXPTRGT;
099    if ("EXSRC".equals(codeString))
100      return V3ParticipationType.EXSRC;
101    if ("PRD".equals(codeString))
102      return V3ParticipationType.PRD;
103    if ("SBJ".equals(codeString))
104      return V3ParticipationType.SBJ;
105    if ("SPC".equals(codeString))
106      return V3ParticipationType.SPC;
107    if ("IND".equals(codeString))
108      return V3ParticipationType.IND;
109    if ("BEN".equals(codeString))
110      return V3ParticipationType.BEN;
111    if ("CAGNT".equals(codeString))
112      return V3ParticipationType.CAGNT;
113    if ("COV".equals(codeString))
114      return V3ParticipationType.COV;
115    if ("GUAR".equals(codeString))
116      return V3ParticipationType.GUAR;
117    if ("HLD".equals(codeString))
118      return V3ParticipationType.HLD;
119    if ("RCT".equals(codeString))
120      return V3ParticipationType.RCT;
121    if ("RCV".equals(codeString))
122      return V3ParticipationType.RCV;
123    if ("IRCP".equals(codeString))
124      return V3ParticipationType.IRCP;
125    if ("NOT".equals(codeString))
126      return V3ParticipationType.NOT;
127    if ("PRCP".equals(codeString))
128      return V3ParticipationType.PRCP;
129    if ("REFB".equals(codeString))
130      return V3ParticipationType.REFB;
131    if ("REFT".equals(codeString))
132      return V3ParticipationType.REFT;
133    if ("TRC".equals(codeString))
134      return V3ParticipationType.TRC;
135    if ("LOC".equals(codeString))
136      return V3ParticipationType.LOC;
137    if ("DST".equals(codeString))
138      return V3ParticipationType.DST;
139    if ("ELOC".equals(codeString))
140      return V3ParticipationType.ELOC;
141    if ("ORG".equals(codeString))
142      return V3ParticipationType.ORG;
143    if ("RML".equals(codeString))
144      return V3ParticipationType.RML;
145    if ("VIA".equals(codeString))
146      return V3ParticipationType.VIA;
147    if ("PRF".equals(codeString))
148      return V3ParticipationType.PRF;
149    if ("DIST".equals(codeString))
150      return V3ParticipationType.DIST;
151    if ("PPRF".equals(codeString))
152      return V3ParticipationType.PPRF;
153    if ("SPRF".equals(codeString))
154      return V3ParticipationType.SPRF;
155    if ("RESP".equals(codeString))
156      return V3ParticipationType.RESP;
157    if ("VRF".equals(codeString))
158      return V3ParticipationType.VRF;
159    if ("AUTHEN".equals(codeString))
160      return V3ParticipationType.AUTHEN;
161    if ("LA".equals(codeString))
162      return V3ParticipationType.LA;
163    throw new IllegalArgumentException("Unknown V3ParticipationType code '" + codeString + "'");
164  }
165
166  public String toCode(V3ParticipationType code) {
167    if (code == V3ParticipationType.PART)
168      return "PART";
169    if (code == V3ParticipationType._PARTICIPATIONANCILLARY)
170      return "_ParticipationAncillary";
171    if (code == V3ParticipationType.ADM)
172      return "ADM";
173    if (code == V3ParticipationType.ATND)
174      return "ATND";
175    if (code == V3ParticipationType.CALLBCK)
176      return "CALLBCK";
177    if (code == V3ParticipationType.CON)
178      return "CON";
179    if (code == V3ParticipationType.DIS)
180      return "DIS";
181    if (code == V3ParticipationType.ESC)
182      return "ESC";
183    if (code == V3ParticipationType.REF)
184      return "REF";
185    if (code == V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR)
186      return "_ParticipationInformationGenerator";
187    if (code == V3ParticipationType.AUT)
188      return "AUT";
189    if (code == V3ParticipationType.INF)
190      return "INF";
191    if (code == V3ParticipationType.TRANS)
192      return "TRANS";
193    if (code == V3ParticipationType.ENT)
194      return "ENT";
195    if (code == V3ParticipationType.WIT)
196      return "WIT";
197    if (code == V3ParticipationType.CST)
198      return "CST";
199    if (code == V3ParticipationType.DIR)
200      return "DIR";
201    if (code == V3ParticipationType.ALY)
202      return "ALY";
203    if (code == V3ParticipationType.BBY)
204      return "BBY";
205    if (code == V3ParticipationType.CAT)
206      return "CAT";
207    if (code == V3ParticipationType.CSM)
208      return "CSM";
209    if (code == V3ParticipationType.TPA)
210      return "TPA";
211    if (code == V3ParticipationType.DEV)
212      return "DEV";
213    if (code == V3ParticipationType.NRD)
214      return "NRD";
215    if (code == V3ParticipationType.RDV)
216      return "RDV";
217    if (code == V3ParticipationType.DON)
218      return "DON";
219    if (code == V3ParticipationType.EXPAGNT)
220      return "EXPAGNT";
221    if (code == V3ParticipationType.EXPART)
222      return "EXPART";
223    if (code == V3ParticipationType.EXPTRGT)
224      return "EXPTRGT";
225    if (code == V3ParticipationType.EXSRC)
226      return "EXSRC";
227    if (code == V3ParticipationType.PRD)
228      return "PRD";
229    if (code == V3ParticipationType.SBJ)
230      return "SBJ";
231    if (code == V3ParticipationType.SPC)
232      return "SPC";
233    if (code == V3ParticipationType.IND)
234      return "IND";
235    if (code == V3ParticipationType.BEN)
236      return "BEN";
237    if (code == V3ParticipationType.CAGNT)
238      return "CAGNT";
239    if (code == V3ParticipationType.COV)
240      return "COV";
241    if (code == V3ParticipationType.GUAR)
242      return "GUAR";
243    if (code == V3ParticipationType.HLD)
244      return "HLD";
245    if (code == V3ParticipationType.RCT)
246      return "RCT";
247    if (code == V3ParticipationType.RCV)
248      return "RCV";
249    if (code == V3ParticipationType.IRCP)
250      return "IRCP";
251    if (code == V3ParticipationType.NOT)
252      return "NOT";
253    if (code == V3ParticipationType.PRCP)
254      return "PRCP";
255    if (code == V3ParticipationType.REFB)
256      return "REFB";
257    if (code == V3ParticipationType.REFT)
258      return "REFT";
259    if (code == V3ParticipationType.TRC)
260      return "TRC";
261    if (code == V3ParticipationType.LOC)
262      return "LOC";
263    if (code == V3ParticipationType.DST)
264      return "DST";
265    if (code == V3ParticipationType.ELOC)
266      return "ELOC";
267    if (code == V3ParticipationType.ORG)
268      return "ORG";
269    if (code == V3ParticipationType.RML)
270      return "RML";
271    if (code == V3ParticipationType.VIA)
272      return "VIA";
273    if (code == V3ParticipationType.PRF)
274      return "PRF";
275    if (code == V3ParticipationType.DIST)
276      return "DIST";
277    if (code == V3ParticipationType.PPRF)
278      return "PPRF";
279    if (code == V3ParticipationType.SPRF)
280      return "SPRF";
281    if (code == V3ParticipationType.RESP)
282      return "RESP";
283    if (code == V3ParticipationType.VRF)
284      return "VRF";
285    if (code == V3ParticipationType.AUTHEN)
286      return "AUTHEN";
287    if (code == V3ParticipationType.LA)
288      return "LA";
289    return "?";
290  }
291
292  public String toSystem(V3ParticipationType code) {
293    return code.getSystem();
294  }
295
296}