001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.r4.model.EnumFactory; 057 058public class EventResourceTypesEnumFactory implements EnumFactory<EventResourceTypes> { 059 060 public EventResourceTypes fromCode(String codeString) throws IllegalArgumentException { 061 if (codeString == null || "".equals(codeString)) 062 return null; 063 if ("ChargeItem".equals(codeString)) 064 return EventResourceTypes.CHARGEITEM; 065 if ("ClaimResponse".equals(codeString)) 066 return EventResourceTypes.CLAIMRESPONSE; 067 if ("ClinicalImpression".equals(codeString)) 068 return EventResourceTypes.CLINICALIMPRESSION; 069 if ("Communication".equals(codeString)) 070 return EventResourceTypes.COMMUNICATION; 071 if ("Composition".equals(codeString)) 072 return EventResourceTypes.COMPOSITION; 073 if ("Condition".equals(codeString)) 074 return EventResourceTypes.CONDITION; 075 if ("Consent".equals(codeString)) 076 return EventResourceTypes.CONSENT; 077 if ("Coverage".equals(codeString)) 078 return EventResourceTypes.COVERAGE; 079 if ("DeviceUseStatement".equals(codeString)) 080 return EventResourceTypes.DEVICEUSESTATEMENT; 081 if ("DiagnosticReport".equals(codeString)) 082 return EventResourceTypes.DIAGNOSTICREPORT; 083 if ("DocumentManifest".equals(codeString)) 084 return EventResourceTypes.DOCUMENTMANIFEST; 085 if ("DocumentReference".equals(codeString)) 086 return EventResourceTypes.DOCUMENTREFERENCE; 087 if ("Encounter".equals(codeString)) 088 return EventResourceTypes.ENCOUNTER; 089 if ("EnrollmentResponse".equals(codeString)) 090 return EventResourceTypes.ENROLLMENTRESPONSE; 091 if ("EpisodeOfCare".equals(codeString)) 092 return EventResourceTypes.EPISODEOFCARE; 093 if ("ExplanationOfBenefit".equals(codeString)) 094 return EventResourceTypes.EXPLANATIONOFBENEFIT; 095 if ("FamilyMemberHistory".equals(codeString)) 096 return EventResourceTypes.FAMILYMEMBERHISTORY; 097 if ("GuidanceResponse".equals(codeString)) 098 return EventResourceTypes.GUIDANCERESPONSE; 099 if ("ImagingStudy".equals(codeString)) 100 return EventResourceTypes.IMAGINGSTUDY; 101 if ("Immunization".equals(codeString)) 102 return EventResourceTypes.IMMUNIZATION; 103 if ("MeasureReport".equals(codeString)) 104 return EventResourceTypes.MEASUREREPORT; 105 if ("Media".equals(codeString)) 106 return EventResourceTypes.MEDIA; 107 if ("MedicationAdministration".equals(codeString)) 108 return EventResourceTypes.MEDICATIONADMINISTRATION; 109 if ("MedicationDispense".equals(codeString)) 110 return EventResourceTypes.MEDICATIONDISPENSE; 111 if ("MedicationStatement".equals(codeString)) 112 return EventResourceTypes.MEDICATIONSTATEMENT; 113 if ("Observation".equals(codeString)) 114 return EventResourceTypes.OBSERVATION; 115 if ("PaymentNotice".equals(codeString)) 116 return EventResourceTypes.PAYMENTNOTICE; 117 if ("PaymentReconciliation".equals(codeString)) 118 return EventResourceTypes.PAYMENTRECONCILIATION; 119 if ("Procedure".equals(codeString)) 120 return EventResourceTypes.PROCEDURE; 121 if ("ProcessResponse".equals(codeString)) 122 return EventResourceTypes.PROCESSRESPONSE; 123 if ("QuestionnaireResponse".equals(codeString)) 124 return EventResourceTypes.QUESTIONNAIRERESPONSE; 125 if ("RiskAssessment".equals(codeString)) 126 return EventResourceTypes.RISKASSESSMENT; 127 if ("SupplyDelivery".equals(codeString)) 128 return EventResourceTypes.SUPPLYDELIVERY; 129 if ("Task".equals(codeString)) 130 return EventResourceTypes.TASK; 131 throw new IllegalArgumentException("Unknown EventResourceTypes code '"+codeString+"'"); 132 } 133 134 public String toCode(EventResourceTypes code) { 135 if (code == EventResourceTypes.CHARGEITEM) 136 return "ChargeItem"; 137 if (code == EventResourceTypes.CLAIMRESPONSE) 138 return "ClaimResponse"; 139 if (code == EventResourceTypes.CLINICALIMPRESSION) 140 return "ClinicalImpression"; 141 if (code == EventResourceTypes.COMMUNICATION) 142 return "Communication"; 143 if (code == EventResourceTypes.COMPOSITION) 144 return "Composition"; 145 if (code == EventResourceTypes.CONDITION) 146 return "Condition"; 147 if (code == EventResourceTypes.CONSENT) 148 return "Consent"; 149 if (code == EventResourceTypes.COVERAGE) 150 return "Coverage"; 151 if (code == EventResourceTypes.DEVICEUSESTATEMENT) 152 return "DeviceUseStatement"; 153 if (code == EventResourceTypes.DIAGNOSTICREPORT) 154 return "DiagnosticReport"; 155 if (code == EventResourceTypes.DOCUMENTMANIFEST) 156 return "DocumentManifest"; 157 if (code == EventResourceTypes.DOCUMENTREFERENCE) 158 return "DocumentReference"; 159 if (code == EventResourceTypes.ENCOUNTER) 160 return "Encounter"; 161 if (code == EventResourceTypes.ENROLLMENTRESPONSE) 162 return "EnrollmentResponse"; 163 if (code == EventResourceTypes.EPISODEOFCARE) 164 return "EpisodeOfCare"; 165 if (code == EventResourceTypes.EXPLANATIONOFBENEFIT) 166 return "ExplanationOfBenefit"; 167 if (code == EventResourceTypes.FAMILYMEMBERHISTORY) 168 return "FamilyMemberHistory"; 169 if (code == EventResourceTypes.GUIDANCERESPONSE) 170 return "GuidanceResponse"; 171 if (code == EventResourceTypes.IMAGINGSTUDY) 172 return "ImagingStudy"; 173 if (code == EventResourceTypes.IMMUNIZATION) 174 return "Immunization"; 175 if (code == EventResourceTypes.MEASUREREPORT) 176 return "MeasureReport"; 177 if (code == EventResourceTypes.MEDIA) 178 return "Media"; 179 if (code == EventResourceTypes.MEDICATIONADMINISTRATION) 180 return "MedicationAdministration"; 181 if (code == EventResourceTypes.MEDICATIONDISPENSE) 182 return "MedicationDispense"; 183 if (code == EventResourceTypes.MEDICATIONSTATEMENT) 184 return "MedicationStatement"; 185 if (code == EventResourceTypes.OBSERVATION) 186 return "Observation"; 187 if (code == EventResourceTypes.PAYMENTNOTICE) 188 return "PaymentNotice"; 189 if (code == EventResourceTypes.PAYMENTRECONCILIATION) 190 return "PaymentReconciliation"; 191 if (code == EventResourceTypes.PROCEDURE) 192 return "Procedure"; 193 if (code == EventResourceTypes.PROCESSRESPONSE) 194 return "ProcessResponse"; 195 if (code == EventResourceTypes.QUESTIONNAIRERESPONSE) 196 return "QuestionnaireResponse"; 197 if (code == EventResourceTypes.RISKASSESSMENT) 198 return "RiskAssessment"; 199 if (code == EventResourceTypes.SUPPLYDELIVERY) 200 return "SupplyDelivery"; 201 if (code == EventResourceTypes.TASK) 202 return "Task"; 203 return "?"; 204 } 205 206 public String toSystem(EventResourceTypes code) { 207 return code.getSystem(); 208 } 209 210} 211