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 EventResourceTypesEnumFactory implements EnumFactory<EventResourceTypes> {
038
039  public EventResourceTypes fromCode(String codeString) throws IllegalArgumentException {
040    if (codeString == null || "".equals(codeString))
041      return null;
042    if ("ChargeItem".equals(codeString))
043      return EventResourceTypes.CHARGEITEM;
044    if ("ClaimResponse".equals(codeString))
045      return EventResourceTypes.CLAIMRESPONSE;
046    if ("ClinicalImpression".equals(codeString))
047      return EventResourceTypes.CLINICALIMPRESSION;
048    if ("Communication".equals(codeString))
049      return EventResourceTypes.COMMUNICATION;
050    if ("Composition".equals(codeString))
051      return EventResourceTypes.COMPOSITION;
052    if ("Condition".equals(codeString))
053      return EventResourceTypes.CONDITION;
054    if ("Consent".equals(codeString))
055      return EventResourceTypes.CONSENT;
056    if ("Coverage".equals(codeString))
057      return EventResourceTypes.COVERAGE;
058    if ("DeviceUseStatement".equals(codeString))
059      return EventResourceTypes.DEVICEUSESTATEMENT;
060    if ("DiagnosticReport".equals(codeString))
061      return EventResourceTypes.DIAGNOSTICREPORT;
062    if ("DocumentManifest".equals(codeString))
063      return EventResourceTypes.DOCUMENTMANIFEST;
064    if ("DocumentReference".equals(codeString))
065      return EventResourceTypes.DOCUMENTREFERENCE;
066    if ("Encounter".equals(codeString))
067      return EventResourceTypes.ENCOUNTER;
068    if ("EnrollmentResponse".equals(codeString))
069      return EventResourceTypes.ENROLLMENTRESPONSE;
070    if ("EpisodeOfCare".equals(codeString))
071      return EventResourceTypes.EPISODEOFCARE;
072    if ("ExplanationOfBenefit".equals(codeString))
073      return EventResourceTypes.EXPLANATIONOFBENEFIT;
074    if ("FamilyMemberHistory".equals(codeString))
075      return EventResourceTypes.FAMILYMEMBERHISTORY;
076    if ("GuidanceResponse".equals(codeString))
077      return EventResourceTypes.GUIDANCERESPONSE;
078    if ("ImagingStudy".equals(codeString))
079      return EventResourceTypes.IMAGINGSTUDY;
080    if ("Immunization".equals(codeString))
081      return EventResourceTypes.IMMUNIZATION;
082    if ("MeasureReport".equals(codeString))
083      return EventResourceTypes.MEASUREREPORT;
084    if ("Media".equals(codeString))
085      return EventResourceTypes.MEDIA;
086    if ("MedicationAdministration".equals(codeString))
087      return EventResourceTypes.MEDICATIONADMINISTRATION;
088    if ("MedicationDispense".equals(codeString))
089      return EventResourceTypes.MEDICATIONDISPENSE;
090    if ("MedicationStatement".equals(codeString))
091      return EventResourceTypes.MEDICATIONSTATEMENT;
092    if ("Observation".equals(codeString))
093      return EventResourceTypes.OBSERVATION;
094    if ("PaymentNotice".equals(codeString))
095      return EventResourceTypes.PAYMENTNOTICE;
096    if ("PaymentReconciliation".equals(codeString))
097      return EventResourceTypes.PAYMENTRECONCILIATION;
098    if ("Procedure".equals(codeString))
099      return EventResourceTypes.PROCEDURE;
100    if ("ProcessResponse".equals(codeString))
101      return EventResourceTypes.PROCESSRESPONSE;
102    if ("QuestionnaireResponse".equals(codeString))
103      return EventResourceTypes.QUESTIONNAIRERESPONSE;
104    if ("RiskAssessment".equals(codeString))
105      return EventResourceTypes.RISKASSESSMENT;
106    if ("SupplyDelivery".equals(codeString))
107      return EventResourceTypes.SUPPLYDELIVERY;
108    if ("Task".equals(codeString))
109      return EventResourceTypes.TASK;
110    throw new IllegalArgumentException("Unknown EventResourceTypes code '"+codeString+"'");
111  }
112
113  public String toCode(EventResourceTypes code) {
114    if (code == EventResourceTypes.CHARGEITEM)
115      return "ChargeItem";
116    if (code == EventResourceTypes.CLAIMRESPONSE)
117      return "ClaimResponse";
118    if (code == EventResourceTypes.CLINICALIMPRESSION)
119      return "ClinicalImpression";
120    if (code == EventResourceTypes.COMMUNICATION)
121      return "Communication";
122    if (code == EventResourceTypes.COMPOSITION)
123      return "Composition";
124    if (code == EventResourceTypes.CONDITION)
125      return "Condition";
126    if (code == EventResourceTypes.CONSENT)
127      return "Consent";
128    if (code == EventResourceTypes.COVERAGE)
129      return "Coverage";
130    if (code == EventResourceTypes.DEVICEUSESTATEMENT)
131      return "DeviceUseStatement";
132    if (code == EventResourceTypes.DIAGNOSTICREPORT)
133      return "DiagnosticReport";
134    if (code == EventResourceTypes.DOCUMENTMANIFEST)
135      return "DocumentManifest";
136    if (code == EventResourceTypes.DOCUMENTREFERENCE)
137      return "DocumentReference";
138    if (code == EventResourceTypes.ENCOUNTER)
139      return "Encounter";
140    if (code == EventResourceTypes.ENROLLMENTRESPONSE)
141      return "EnrollmentResponse";
142    if (code == EventResourceTypes.EPISODEOFCARE)
143      return "EpisodeOfCare";
144    if (code == EventResourceTypes.EXPLANATIONOFBENEFIT)
145      return "ExplanationOfBenefit";
146    if (code == EventResourceTypes.FAMILYMEMBERHISTORY)
147      return "FamilyMemberHistory";
148    if (code == EventResourceTypes.GUIDANCERESPONSE)
149      return "GuidanceResponse";
150    if (code == EventResourceTypes.IMAGINGSTUDY)
151      return "ImagingStudy";
152    if (code == EventResourceTypes.IMMUNIZATION)
153      return "Immunization";
154    if (code == EventResourceTypes.MEASUREREPORT)
155      return "MeasureReport";
156    if (code == EventResourceTypes.MEDIA)
157      return "Media";
158    if (code == EventResourceTypes.MEDICATIONADMINISTRATION)
159      return "MedicationAdministration";
160    if (code == EventResourceTypes.MEDICATIONDISPENSE)
161      return "MedicationDispense";
162    if (code == EventResourceTypes.MEDICATIONSTATEMENT)
163      return "MedicationStatement";
164    if (code == EventResourceTypes.OBSERVATION)
165      return "Observation";
166    if (code == EventResourceTypes.PAYMENTNOTICE)
167      return "PaymentNotice";
168    if (code == EventResourceTypes.PAYMENTRECONCILIATION)
169      return "PaymentReconciliation";
170    if (code == EventResourceTypes.PROCEDURE)
171      return "Procedure";
172    if (code == EventResourceTypes.PROCESSRESPONSE)
173      return "ProcessResponse";
174    if (code == EventResourceTypes.QUESTIONNAIRERESPONSE)
175      return "QuestionnaireResponse";
176    if (code == EventResourceTypes.RISKASSESSMENT)
177      return "RiskAssessment";
178    if (code == EventResourceTypes.SUPPLYDELIVERY)
179      return "SupplyDelivery";
180    if (code == EventResourceTypes.TASK)
181      return "Task";
182    return "?";
183  }
184
185    public String toSystem(EventResourceTypes code) {
186      return code.getSystem();
187      }
188
189}
190