001package org.hl7.fhir.dstu2016may.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 Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum QicoreAdverseeventCategory { 041 042 /** 043 * Blood or Blood Product 044 */ 045 BLOOD, 046 /** 047 * Device or Medical/Surgical Supply, including Health Information Technology (HIT) 048 */ 049 DEVICE, 050 /** 051 * Fall by patient 052 */ 053 FALL, 054 /** 055 * Healthcare-related infection 056 */ 057 INFECTION, 058 /** 059 * Medication or Other Substance 060 */ 061 SUBSTANCE, 062 /** 063 * Perinatal 064 */ 065 PERINATAL, 066 /** 067 * Pressure Ulcer 068 */ 069 ULCER, 070 /** 071 * Surgery or Anesthesia (includes invasive procedures) 072 */ 073 SURGERY, 074 /** 075 * Venous Thromboembolism 076 */ 077 EMBOLISM, 078 /** 079 * Other (please specify) 080 */ 081 OTHER, 082 /** 083 * added to help the parsers 084 */ 085 NULL; 086 public static QicoreAdverseeventCategory fromCode(String codeString) throws FHIRException { 087 if (codeString == null || "".equals(codeString)) 088 return null; 089 if ("blood".equals(codeString)) 090 return BLOOD; 091 if ("device".equals(codeString)) 092 return DEVICE; 093 if ("fall".equals(codeString)) 094 return FALL; 095 if ("infection".equals(codeString)) 096 return INFECTION; 097 if ("substance".equals(codeString)) 098 return SUBSTANCE; 099 if ("perinatal".equals(codeString)) 100 return PERINATAL; 101 if ("ulcer".equals(codeString)) 102 return ULCER; 103 if ("surgery".equals(codeString)) 104 return SURGERY; 105 if ("embolism".equals(codeString)) 106 return EMBOLISM; 107 if ("other".equals(codeString)) 108 return OTHER; 109 throw new FHIRException("Unknown QicoreAdverseeventCategory code '"+codeString+"'"); 110 } 111 public String toCode() { 112 switch (this) { 113 case BLOOD: return "blood"; 114 case DEVICE: return "device"; 115 case FALL: return "fall"; 116 case INFECTION: return "infection"; 117 case SUBSTANCE: return "substance"; 118 case PERINATAL: return "perinatal"; 119 case ULCER: return "ulcer"; 120 case SURGERY: return "surgery"; 121 case EMBOLISM: return "embolism"; 122 case OTHER: return "other"; 123 case NULL: return null; 124 default: return "?"; 125 } 126 } 127 public String getSystem() { 128 return "http://hl7.org/fhir/qicore-adverseevent-category"; 129 } 130 public String getDefinition() { 131 switch (this) { 132 case BLOOD: return "Blood or Blood Product"; 133 case DEVICE: return "Device or Medical/Surgical Supply, including Health Information Technology (HIT)"; 134 case FALL: return "Fall by patient"; 135 case INFECTION: return "Healthcare-related infection"; 136 case SUBSTANCE: return "Medication or Other Substance"; 137 case PERINATAL: return "Perinatal"; 138 case ULCER: return "Pressure Ulcer"; 139 case SURGERY: return "Surgery or Anesthesia (includes invasive procedures)"; 140 case EMBOLISM: return "Venous Thromboembolism"; 141 case OTHER: return "Other (please specify)"; 142 case NULL: return null; 143 default: return "?"; 144 } 145 } 146 public String getDisplay() { 147 switch (this) { 148 case BLOOD: return "Blood or Blood Product"; 149 case DEVICE: return "Device, Materials, or Information Technology"; 150 case FALL: return "Fall"; 151 case INFECTION: return "Healthcare-Related Infection"; 152 case SUBSTANCE: return "Medication or Other Substance"; 153 case PERINATAL: return "Perinatal"; 154 case ULCER: return "Pressure Ulcer"; 155 case SURGERY: return "Surgery or Anesthesia"; 156 case EMBOLISM: return "Venous Thromboembolism"; 157 case OTHER: return "Other (please specify)"; 158 case NULL: return null; 159 default: return "?"; 160 } 161 } 162 163 164}