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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum AdverseEventSeriousness { 038 039 /** 040 * Non-serious 041 */ 042 NONSERIOUS, 043 /** 044 * Serious 045 */ 046 SERIOUS, 047 /** 048 * Results in death 049 */ 050 SERIOUSRESULTSINDEATH, 051 /** 052 * Is Life-threatening 053 */ 054 SERIOUSISLIFETHREATENING, 055 /** 056 * Requires inpatient hospitalization or causes prolongation of existing hospitalization 057 */ 058 SERIOUSRESULTSINHOSPITALIZATION, 059 /** 060 * Results in persistent or significant disability/incapacity 061 */ 062 SERIOUSRESULTSINDISABILITY, 063 /** 064 * Is a congenital anomaly/birth defect 065 */ 066 SERIOUSISBIRTHDEFECT, 067 /** 068 * Requires intervention to prevent permanent impairment or damage (i.e., an important medical event that requires medical judgement) 069 */ 070 SERIOUSREQUIRESPREVENTIMPAIRMENT, 071 /** 072 * added to help the parsers 073 */ 074 NULL; 075 public static AdverseEventSeriousness fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("Non-serious".equals(codeString)) 079 return NONSERIOUS; 080 if ("Serious".equals(codeString)) 081 return SERIOUS; 082 if ("SeriousResultsInDeath".equals(codeString)) 083 return SERIOUSRESULTSINDEATH; 084 if ("SeriousIsLifeThreatening".equals(codeString)) 085 return SERIOUSISLIFETHREATENING; 086 if ("SeriousResultsInHospitalization".equals(codeString)) 087 return SERIOUSRESULTSINHOSPITALIZATION; 088 if ("SeriousResultsInDisability".equals(codeString)) 089 return SERIOUSRESULTSINDISABILITY; 090 if ("SeriousIsBirthDefect".equals(codeString)) 091 return SERIOUSISBIRTHDEFECT; 092 if ("SeriousRequiresPreventImpairment".equals(codeString)) 093 return SERIOUSREQUIRESPREVENTIMPAIRMENT; 094 throw new FHIRException("Unknown AdverseEventSeriousness code '"+codeString+"'"); 095 } 096 public String toCode() { 097 switch (this) { 098 case NONSERIOUS: return "Non-serious"; 099 case SERIOUS: return "Serious"; 100 case SERIOUSRESULTSINDEATH: return "SeriousResultsInDeath"; 101 case SERIOUSISLIFETHREATENING: return "SeriousIsLifeThreatening"; 102 case SERIOUSRESULTSINHOSPITALIZATION: return "SeriousResultsInHospitalization"; 103 case SERIOUSRESULTSINDISABILITY: return "SeriousResultsInDisability"; 104 case SERIOUSISBIRTHDEFECT: return "SeriousIsBirthDefect"; 105 case SERIOUSREQUIRESPREVENTIMPAIRMENT: return "SeriousRequiresPreventImpairment"; 106 default: return "?"; 107 } 108 } 109 public String getSystem() { 110 return "http://hl7.org/fhir/adverse-event-seriousness"; 111 } 112 public String getDefinition() { 113 switch (this) { 114 case NONSERIOUS: return "Non-serious"; 115 case SERIOUS: return "Serious"; 116 case SERIOUSRESULTSINDEATH: return "Results in death"; 117 case SERIOUSISLIFETHREATENING: return "Is Life-threatening"; 118 case SERIOUSRESULTSINHOSPITALIZATION: return "Requires inpatient hospitalization or causes prolongation of existing hospitalization"; 119 case SERIOUSRESULTSINDISABILITY: return "Results in persistent or significant disability/incapacity"; 120 case SERIOUSISBIRTHDEFECT: return "Is a congenital anomaly/birth defect"; 121 case SERIOUSREQUIRESPREVENTIMPAIRMENT: return "Requires intervention to prevent permanent impairment or damage (i.e., an important medical event that requires medical judgement)"; 122 default: return "?"; 123 } 124 } 125 public String getDisplay() { 126 switch (this) { 127 case NONSERIOUS: return "Non-serious"; 128 case SERIOUS: return "Serious"; 129 case SERIOUSRESULTSINDEATH: return "Results in death"; 130 case SERIOUSISLIFETHREATENING: return "Is Life-threatening"; 131 case SERIOUSRESULTSINHOSPITALIZATION: return "Requires or prolongs inpatient hospitalization"; 132 case SERIOUSRESULTSINDISABILITY: return "Results in persistent or significant disability/incapacity"; 133 case SERIOUSISBIRTHDEFECT: return "Is a congenital anomaly/birth defect"; 134 case SERIOUSREQUIRESPREVENTIMPAIRMENT: return "Requires intervention to prevent permanent impairment"; 135 default: return "?"; 136 } 137 } 138 139 140} 141