001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 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 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum AdverseEventCategory { 058 059 /** 060 * The adverse event pertains to a product problem. 061 */ 062 PRODUCTPROBLEM, 063 /** 064 * The adverse event pertains to product quality. 065 */ 066 PRODUCTQUALITY, 067 /** 068 * The adverse event pertains to a product use error. 069 */ 070 PRODUCTUSEERROR, 071 /** 072 * The adverse event pertains to a wrong dose. 073 */ 074 WRONGDOSE, 075 /** 076 * The adverse event pertains to incorrect perscribing information. 077 */ 078 INCORRECTPRESCRIBINGINFORMATION, 079 /** 080 * The adverse event pertains to a wrong technique. 081 */ 082 WRONGTECHNIQUE, 083 /** 084 * The adverse event pertains to a wrong route of administration. 085 */ 086 WRONGROUTEOFADMINISTRATION, 087 /** 088 * The adverse event pertains to a wrong rate. 089 */ 090 WRONGRATE, 091 /** 092 * The adverse event pertains to a wrong duration. 093 */ 094 WRONGDURATION, 095 /** 096 * The adverse event pertains to a wrong time. 097 */ 098 WRONGTIME, 099 /** 100 * The adverse event pertains to an expired drug. 101 */ 102 EXPIREDDRUG, 103 /** 104 * The adverse event pertains to a medical device use error. 105 */ 106 MEDICALDEVICEUSEERROR, 107 /** 108 * The adverse event pertains to a problem with a different manufacturer of the same medication. 109 */ 110 PROBLEMDIFFERENTMANUFACTURER, 111 /** 112 * The adverse event pertains to an unsafe physical environment. 113 */ 114 UNSAFEPHYSICALENVIRONMENT, 115 /** 116 * added to help the parsers 117 */ 118 NULL; 119 public static AdverseEventCategory fromCode(String codeString) throws FHIRException { 120 if (codeString == null || "".equals(codeString)) 121 return null; 122 if ("product-problem".equals(codeString)) 123 return PRODUCTPROBLEM; 124 if ("product-quality".equals(codeString)) 125 return PRODUCTQUALITY; 126 if ("product-use-error".equals(codeString)) 127 return PRODUCTUSEERROR; 128 if ("wrong-dose".equals(codeString)) 129 return WRONGDOSE; 130 if ("incorrect-prescribing-information".equals(codeString)) 131 return INCORRECTPRESCRIBINGINFORMATION; 132 if ("wrong-technique".equals(codeString)) 133 return WRONGTECHNIQUE; 134 if ("wrong-route-of-administration".equals(codeString)) 135 return WRONGROUTEOFADMINISTRATION; 136 if ("wrong-rate".equals(codeString)) 137 return WRONGRATE; 138 if ("wrong-duration".equals(codeString)) 139 return WRONGDURATION; 140 if ("wrong-time".equals(codeString)) 141 return WRONGTIME; 142 if ("expired-drug".equals(codeString)) 143 return EXPIREDDRUG; 144 if ("medical-device-use-error".equals(codeString)) 145 return MEDICALDEVICEUSEERROR; 146 if ("problem-different-manufacturer".equals(codeString)) 147 return PROBLEMDIFFERENTMANUFACTURER; 148 if ("unsafe-physical-environment".equals(codeString)) 149 return UNSAFEPHYSICALENVIRONMENT; 150 throw new FHIRException("Unknown AdverseEventCategory code '"+codeString+"'"); 151 } 152 public String toCode() { 153 switch (this) { 154 case PRODUCTPROBLEM: return "product-problem"; 155 case PRODUCTQUALITY: return "product-quality"; 156 case PRODUCTUSEERROR: return "product-use-error"; 157 case WRONGDOSE: return "wrong-dose"; 158 case INCORRECTPRESCRIBINGINFORMATION: return "incorrect-prescribing-information"; 159 case WRONGTECHNIQUE: return "wrong-technique"; 160 case WRONGROUTEOFADMINISTRATION: return "wrong-route-of-administration"; 161 case WRONGRATE: return "wrong-rate"; 162 case WRONGDURATION: return "wrong-duration"; 163 case WRONGTIME: return "wrong-time"; 164 case EXPIREDDRUG: return "expired-drug"; 165 case MEDICALDEVICEUSEERROR: return "medical-device-use-error"; 166 case PROBLEMDIFFERENTMANUFACTURER: return "problem-different-manufacturer"; 167 case UNSAFEPHYSICALENVIRONMENT: return "unsafe-physical-environment"; 168 default: return "?"; 169 } 170 } 171 public String getSystem() { 172 return "http://terminology.hl7.org/CodeSystem/adverse-event-category"; 173 } 174 public String getDefinition() { 175 switch (this) { 176 case PRODUCTPROBLEM: return "The adverse event pertains to a product problem."; 177 case PRODUCTQUALITY: return "The adverse event pertains to product quality."; 178 case PRODUCTUSEERROR: return "The adverse event pertains to a product use error."; 179 case WRONGDOSE: return "The adverse event pertains to a wrong dose."; 180 case INCORRECTPRESCRIBINGINFORMATION: return "The adverse event pertains to incorrect perscribing information."; 181 case WRONGTECHNIQUE: return "The adverse event pertains to a wrong technique."; 182 case WRONGROUTEOFADMINISTRATION: return "The adverse event pertains to a wrong route of administration."; 183 case WRONGRATE: return "The adverse event pertains to a wrong rate."; 184 case WRONGDURATION: return "The adverse event pertains to a wrong duration."; 185 case WRONGTIME: return "The adverse event pertains to a wrong time."; 186 case EXPIREDDRUG: return "The adverse event pertains to an expired drug."; 187 case MEDICALDEVICEUSEERROR: return "The adverse event pertains to a medical device use error."; 188 case PROBLEMDIFFERENTMANUFACTURER: return "The adverse event pertains to a problem with a different manufacturer of the same medication."; 189 case UNSAFEPHYSICALENVIRONMENT: return "The adverse event pertains to an unsafe physical environment."; 190 default: return "?"; 191 } 192 } 193 public String getDisplay() { 194 switch (this) { 195 case PRODUCTPROBLEM: return "Product Problem"; 196 case PRODUCTQUALITY: return "Product Quality"; 197 case PRODUCTUSEERROR: return "Product Use Error"; 198 case WRONGDOSE: return "Wrong Dose"; 199 case INCORRECTPRESCRIBINGINFORMATION: return "Incorrect Prescribing Information"; 200 case WRONGTECHNIQUE: return "Wrong Technique"; 201 case WRONGROUTEOFADMINISTRATION: return "Wrong Route of Administration"; 202 case WRONGRATE: return "Wrong Rate"; 203 case WRONGDURATION: return "Wrong Duration"; 204 case WRONGTIME: return "Wrong Time"; 205 case EXPIREDDRUG: return "Expired Drug"; 206 case MEDICALDEVICEUSEERROR: return "Medical Device Use Error"; 207 case PROBLEMDIFFERENTMANUFACTURER: return "Problem with Different Manufacturer of Same Medicine"; 208 case UNSAFEPHYSICALENVIRONMENT: return "Unsafe Physical Environment"; 209 default: return "?"; 210 } 211 } 212 213 214} 215