001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum AdverseEventCategory { 041 042 /** 043 * The adverse event pertains to a product problem. 044 */ 045 PRODUCTPROBLEM, 046 /** 047 * The adverse event pertains to product quality. 048 */ 049 PRODUCTQUALITY, 050 /** 051 * The adverse event pertains to a product use error. 052 */ 053 PRODUCTUSEERROR, 054 /** 055 * The adverse event pertains to a wrong dose. 056 */ 057 WRONGDOSE, 058 /** 059 * The adverse event pertains to incorrect perscribing information. 060 */ 061 INCORRECTPRESCRIBINGINFORMATION, 062 /** 063 * The adverse event pertains to a wrong technique. 064 */ 065 WRONGTECHNIQUE, 066 /** 067 * The adverse event pertains to a wrong route of administration. 068 */ 069 WRONGROUTEOFADMINISTRATION, 070 /** 071 * The adverse event pertains to a wrong rate. 072 */ 073 WRONGRATE, 074 /** 075 * The adverse event pertains to a wrong duration. 076 */ 077 WRONGDURATION, 078 /** 079 * The adverse event pertains to a wrong time. 080 */ 081 WRONGTIME, 082 /** 083 * The adverse event pertains to an expired drug. 084 */ 085 EXPIREDDRUG, 086 /** 087 * The adverse event pertains to a medical device use error. 088 */ 089 MEDICALDEVICEUSEERROR, 090 /** 091 * The adverse event pertains to a problem with a different manufacturer of the same medication. 092 */ 093 PROBLEMDIFFERENTMANUFACTURER, 094 /** 095 * The adverse event pertains to an unsafe physical environment. 096 */ 097 UNSAFEPHYSICALENVIRONMENT, 098 /** 099 * added to help the parsers 100 */ 101 NULL; 102 public static AdverseEventCategory fromCode(String codeString) throws FHIRException { 103 if (codeString == null || "".equals(codeString)) 104 return null; 105 if ("product-problem".equals(codeString)) 106 return PRODUCTPROBLEM; 107 if ("product-quality".equals(codeString)) 108 return PRODUCTQUALITY; 109 if ("product-use-error".equals(codeString)) 110 return PRODUCTUSEERROR; 111 if ("wrong-dose".equals(codeString)) 112 return WRONGDOSE; 113 if ("incorrect-prescribing-information".equals(codeString)) 114 return INCORRECTPRESCRIBINGINFORMATION; 115 if ("wrong-technique".equals(codeString)) 116 return WRONGTECHNIQUE; 117 if ("wrong-route-of-administration".equals(codeString)) 118 return WRONGROUTEOFADMINISTRATION; 119 if ("wrong-rate".equals(codeString)) 120 return WRONGRATE; 121 if ("wrong-duration".equals(codeString)) 122 return WRONGDURATION; 123 if ("wrong-time".equals(codeString)) 124 return WRONGTIME; 125 if ("expired-drug".equals(codeString)) 126 return EXPIREDDRUG; 127 if ("medical-device-use-error".equals(codeString)) 128 return MEDICALDEVICEUSEERROR; 129 if ("problem-different-manufacturer".equals(codeString)) 130 return PROBLEMDIFFERENTMANUFACTURER; 131 if ("unsafe-physical-environment".equals(codeString)) 132 return UNSAFEPHYSICALENVIRONMENT; 133 throw new FHIRException("Unknown AdverseEventCategory code '"+codeString+"'"); 134 } 135 public String toCode() { 136 switch (this) { 137 case PRODUCTPROBLEM: return "product-problem"; 138 case PRODUCTQUALITY: return "product-quality"; 139 case PRODUCTUSEERROR: return "product-use-error"; 140 case WRONGDOSE: return "wrong-dose"; 141 case INCORRECTPRESCRIBINGINFORMATION: return "incorrect-prescribing-information"; 142 case WRONGTECHNIQUE: return "wrong-technique"; 143 case WRONGROUTEOFADMINISTRATION: return "wrong-route-of-administration"; 144 case WRONGRATE: return "wrong-rate"; 145 case WRONGDURATION: return "wrong-duration"; 146 case WRONGTIME: return "wrong-time"; 147 case EXPIREDDRUG: return "expired-drug"; 148 case MEDICALDEVICEUSEERROR: return "medical-device-use-error"; 149 case PROBLEMDIFFERENTMANUFACTURER: return "problem-different-manufacturer"; 150 case UNSAFEPHYSICALENVIRONMENT: return "unsafe-physical-environment"; 151 default: return "?"; 152 } 153 } 154 public String getSystem() { 155 return "http://terminology.hl7.org/CodeSystem/adverse-event-category"; 156 } 157 public String getDefinition() { 158 switch (this) { 159 case PRODUCTPROBLEM: return "The adverse event pertains to a product problem."; 160 case PRODUCTQUALITY: return "The adverse event pertains to product quality."; 161 case PRODUCTUSEERROR: return "The adverse event pertains to a product use error."; 162 case WRONGDOSE: return "The adverse event pertains to a wrong dose."; 163 case INCORRECTPRESCRIBINGINFORMATION: return "The adverse event pertains to incorrect perscribing information."; 164 case WRONGTECHNIQUE: return "The adverse event pertains to a wrong technique."; 165 case WRONGROUTEOFADMINISTRATION: return "The adverse event pertains to a wrong route of administration."; 166 case WRONGRATE: return "The adverse event pertains to a wrong rate."; 167 case WRONGDURATION: return "The adverse event pertains to a wrong duration."; 168 case WRONGTIME: return "The adverse event pertains to a wrong time."; 169 case EXPIREDDRUG: return "The adverse event pertains to an expired drug."; 170 case MEDICALDEVICEUSEERROR: return "The adverse event pertains to a medical device use error."; 171 case PROBLEMDIFFERENTMANUFACTURER: return "The adverse event pertains to a problem with a different manufacturer of the same medication."; 172 case UNSAFEPHYSICALENVIRONMENT: return "The adverse event pertains to an unsafe physical environment."; 173 default: return "?"; 174 } 175 } 176 public String getDisplay() { 177 switch (this) { 178 case PRODUCTPROBLEM: return "Product Problem"; 179 case PRODUCTQUALITY: return "Product Quality"; 180 case PRODUCTUSEERROR: return "Product Use Error"; 181 case WRONGDOSE: return "Wrong Dose"; 182 case INCORRECTPRESCRIBINGINFORMATION: return "Incorrect Prescribing Information"; 183 case WRONGTECHNIQUE: return "Wrong Technique"; 184 case WRONGROUTEOFADMINISTRATION: return "Wrong Route of Administration"; 185 case WRONGRATE: return "Wrong Rate"; 186 case WRONGDURATION: return "Wrong Duration"; 187 case WRONGTIME: return "Wrong Time"; 188 case EXPIREDDRUG: return "Expired Drug"; 189 case MEDICALDEVICEUSEERROR: return "Medical Device Use Error"; 190 case PROBLEMDIFFERENTMANUFACTURER: return "Problem with Different Manufacturer of Same Medicine"; 191 case UNSAFEPHYSICALENVIRONMENT: return "Unsafe Physical Environment"; 192 default: return "?"; 193 } 194 } 195 196 197}