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