001package org.hl7.fhir.dstu3.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0
036
037
038import org.hl7.fhir.dstu3.model.EnumFactory;
039
040public class V3ParticipationTypeEnumFactory implements EnumFactory<V3ParticipationType> {
041
042  public V3ParticipationType fromCode(String codeString) throws IllegalArgumentException {
043    if (codeString == null || "".equals(codeString))
044      return null;
045    if ("PART".equals(codeString))
046      return V3ParticipationType.PART;
047    if ("_ParticipationAncillary".equals(codeString))
048      return V3ParticipationType._PARTICIPATIONANCILLARY;
049    if ("ADM".equals(codeString))
050      return V3ParticipationType.ADM;
051    if ("ATND".equals(codeString))
052      return V3ParticipationType.ATND;
053    if ("CALLBCK".equals(codeString))
054      return V3ParticipationType.CALLBCK;
055    if ("CON".equals(codeString))
056      return V3ParticipationType.CON;
057    if ("DIS".equals(codeString))
058      return V3ParticipationType.DIS;
059    if ("ESC".equals(codeString))
060      return V3ParticipationType.ESC;
061    if ("REF".equals(codeString))
062      return V3ParticipationType.REF;
063    if ("_ParticipationInformationGenerator".equals(codeString))
064      return V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR;
065    if ("AUT".equals(codeString))
066      return V3ParticipationType.AUT;
067    if ("INF".equals(codeString))
068      return V3ParticipationType.INF;
069    if ("TRANS".equals(codeString))
070      return V3ParticipationType.TRANS;
071    if ("ENT".equals(codeString))
072      return V3ParticipationType.ENT;
073    if ("WIT".equals(codeString))
074      return V3ParticipationType.WIT;
075    if ("CST".equals(codeString))
076      return V3ParticipationType.CST;
077    if ("DIR".equals(codeString))
078      return V3ParticipationType.DIR;
079    if ("ALY".equals(codeString))
080      return V3ParticipationType.ALY;
081    if ("BBY".equals(codeString))
082      return V3ParticipationType.BBY;
083    if ("CAT".equals(codeString))
084      return V3ParticipationType.CAT;
085    if ("CSM".equals(codeString))
086      return V3ParticipationType.CSM;
087    if ("TPA".equals(codeString))
088      return V3ParticipationType.TPA;
089    if ("DEV".equals(codeString))
090      return V3ParticipationType.DEV;
091    if ("NRD".equals(codeString))
092      return V3ParticipationType.NRD;
093    if ("RDV".equals(codeString))
094      return V3ParticipationType.RDV;
095    if ("DON".equals(codeString))
096      return V3ParticipationType.DON;
097    if ("EXPAGNT".equals(codeString))
098      return V3ParticipationType.EXPAGNT;
099    if ("EXPART".equals(codeString))
100      return V3ParticipationType.EXPART;
101    if ("EXPTRGT".equals(codeString))
102      return V3ParticipationType.EXPTRGT;
103    if ("EXSRC".equals(codeString))
104      return V3ParticipationType.EXSRC;
105    if ("PRD".equals(codeString))
106      return V3ParticipationType.PRD;
107    if ("SBJ".equals(codeString))
108      return V3ParticipationType.SBJ;
109    if ("SPC".equals(codeString))
110      return V3ParticipationType.SPC;
111    if ("IND".equals(codeString))
112      return V3ParticipationType.IND;
113    if ("BEN".equals(codeString))
114      return V3ParticipationType.BEN;
115    if ("CAGNT".equals(codeString))
116      return V3ParticipationType.CAGNT;
117    if ("COV".equals(codeString))
118      return V3ParticipationType.COV;
119    if ("GUAR".equals(codeString))
120      return V3ParticipationType.GUAR;
121    if ("HLD".equals(codeString))
122      return V3ParticipationType.HLD;
123    if ("RCT".equals(codeString))
124      return V3ParticipationType.RCT;
125    if ("RCV".equals(codeString))
126      return V3ParticipationType.RCV;
127    if ("IRCP".equals(codeString))
128      return V3ParticipationType.IRCP;
129    if ("NOT".equals(codeString))
130      return V3ParticipationType.NOT;
131    if ("PRCP".equals(codeString))
132      return V3ParticipationType.PRCP;
133    if ("REFB".equals(codeString))
134      return V3ParticipationType.REFB;
135    if ("REFT".equals(codeString))
136      return V3ParticipationType.REFT;
137    if ("TRC".equals(codeString))
138      return V3ParticipationType.TRC;
139    if ("LOC".equals(codeString))
140      return V3ParticipationType.LOC;
141    if ("DST".equals(codeString))
142      return V3ParticipationType.DST;
143    if ("ELOC".equals(codeString))
144      return V3ParticipationType.ELOC;
145    if ("ORG".equals(codeString))
146      return V3ParticipationType.ORG;
147    if ("RML".equals(codeString))
148      return V3ParticipationType.RML;
149    if ("VIA".equals(codeString))
150      return V3ParticipationType.VIA;
151    if ("PRF".equals(codeString))
152      return V3ParticipationType.PRF;
153    if ("DIST".equals(codeString))
154      return V3ParticipationType.DIST;
155    if ("PPRF".equals(codeString))
156      return V3ParticipationType.PPRF;
157    if ("SPRF".equals(codeString))
158      return V3ParticipationType.SPRF;
159    if ("RESP".equals(codeString))
160      return V3ParticipationType.RESP;
161    if ("VRF".equals(codeString))
162      return V3ParticipationType.VRF;
163    if ("AUTHEN".equals(codeString))
164      return V3ParticipationType.AUTHEN;
165    if ("LA".equals(codeString))
166      return V3ParticipationType.LA;
167    throw new IllegalArgumentException("Unknown V3ParticipationType code '"+codeString+"'");
168  }
169
170  public String toCode(V3ParticipationType code) {
171    if (code == V3ParticipationType.PART)
172      return "PART";
173    if (code == V3ParticipationType._PARTICIPATIONANCILLARY)
174      return "_ParticipationAncillary";
175    if (code == V3ParticipationType.ADM)
176      return "ADM";
177    if (code == V3ParticipationType.ATND)
178      return "ATND";
179    if (code == V3ParticipationType.CALLBCK)
180      return "CALLBCK";
181    if (code == V3ParticipationType.CON)
182      return "CON";
183    if (code == V3ParticipationType.DIS)
184      return "DIS";
185    if (code == V3ParticipationType.ESC)
186      return "ESC";
187    if (code == V3ParticipationType.REF)
188      return "REF";
189    if (code == V3ParticipationType._PARTICIPATIONINFORMATIONGENERATOR)
190      return "_ParticipationInformationGenerator";
191    if (code == V3ParticipationType.AUT)
192      return "AUT";
193    if (code == V3ParticipationType.INF)
194      return "INF";
195    if (code == V3ParticipationType.TRANS)
196      return "TRANS";
197    if (code == V3ParticipationType.ENT)
198      return "ENT";
199    if (code == V3ParticipationType.WIT)
200      return "WIT";
201    if (code == V3ParticipationType.CST)
202      return "CST";
203    if (code == V3ParticipationType.DIR)
204      return "DIR";
205    if (code == V3ParticipationType.ALY)
206      return "ALY";
207    if (code == V3ParticipationType.BBY)
208      return "BBY";
209    if (code == V3ParticipationType.CAT)
210      return "CAT";
211    if (code == V3ParticipationType.CSM)
212      return "CSM";
213    if (code == V3ParticipationType.TPA)
214      return "TPA";
215    if (code == V3ParticipationType.DEV)
216      return "DEV";
217    if (code == V3ParticipationType.NRD)
218      return "NRD";
219    if (code == V3ParticipationType.RDV)
220      return "RDV";
221    if (code == V3ParticipationType.DON)
222      return "DON";
223    if (code == V3ParticipationType.EXPAGNT)
224      return "EXPAGNT";
225    if (code == V3ParticipationType.EXPART)
226      return "EXPART";
227    if (code == V3ParticipationType.EXPTRGT)
228      return "EXPTRGT";
229    if (code == V3ParticipationType.EXSRC)
230      return "EXSRC";
231    if (code == V3ParticipationType.PRD)
232      return "PRD";
233    if (code == V3ParticipationType.SBJ)
234      return "SBJ";
235    if (code == V3ParticipationType.SPC)
236      return "SPC";
237    if (code == V3ParticipationType.IND)
238      return "IND";
239    if (code == V3ParticipationType.BEN)
240      return "BEN";
241    if (code == V3ParticipationType.CAGNT)
242      return "CAGNT";
243    if (code == V3ParticipationType.COV)
244      return "COV";
245    if (code == V3ParticipationType.GUAR)
246      return "GUAR";
247    if (code == V3ParticipationType.HLD)
248      return "HLD";
249    if (code == V3ParticipationType.RCT)
250      return "RCT";
251    if (code == V3ParticipationType.RCV)
252      return "RCV";
253    if (code == V3ParticipationType.IRCP)
254      return "IRCP";
255    if (code == V3ParticipationType.NOT)
256      return "NOT";
257    if (code == V3ParticipationType.PRCP)
258      return "PRCP";
259    if (code == V3ParticipationType.REFB)
260      return "REFB";
261    if (code == V3ParticipationType.REFT)
262      return "REFT";
263    if (code == V3ParticipationType.TRC)
264      return "TRC";
265    if (code == V3ParticipationType.LOC)
266      return "LOC";
267    if (code == V3ParticipationType.DST)
268      return "DST";
269    if (code == V3ParticipationType.ELOC)
270      return "ELOC";
271    if (code == V3ParticipationType.ORG)
272      return "ORG";
273    if (code == V3ParticipationType.RML)
274      return "RML";
275    if (code == V3ParticipationType.VIA)
276      return "VIA";
277    if (code == V3ParticipationType.PRF)
278      return "PRF";
279    if (code == V3ParticipationType.DIST)
280      return "DIST";
281    if (code == V3ParticipationType.PPRF)
282      return "PPRF";
283    if (code == V3ParticipationType.SPRF)
284      return "SPRF";
285    if (code == V3ParticipationType.RESP)
286      return "RESP";
287    if (code == V3ParticipationType.VRF)
288      return "VRF";
289    if (code == V3ParticipationType.AUTHEN)
290      return "AUTHEN";
291    if (code == V3ParticipationType.LA)
292      return "LA";
293    return "?";
294  }
295
296    public String toSystem(V3ParticipationType code) {
297      return code.getSystem();
298      }
299
300}