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 Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum CertaintySubcomponentRating { 038 039 /** 040 * no change to quality rating. 041 */ 042 NOCHANGE, 043 /** 044 * reduce quality rating by 1. 045 */ 046 DOWNCODE1, 047 /** 048 * reduce quality rating by 2. 049 */ 050 DOWNCODE2, 051 /** 052 * reduce quality rating by 3. 053 */ 054 DOWNCODE3, 055 /** 056 * increase quality rating by 1. 057 */ 058 UPCODE1, 059 /** 060 * increase quality rating by 2. 061 */ 062 UPCODE2, 063 /** 064 * no serious concern. 065 */ 066 NOCONCERN, 067 /** 068 * serious concern. 069 */ 070 SERIOUSCONCERN, 071 /** 072 * critical concern. 073 */ 074 CRITICALCONCERN, 075 /** 076 * possible reason for increasing quality rating was checked and found to bepresent. 077 */ 078 PRESENT, 079 /** 080 * possible reason for increasing quality rating was checked and found to be absent. 081 */ 082 ABSENT, 083 /** 084 * added to help the parsers 085 */ 086 NULL; 087 public static CertaintySubcomponentRating fromCode(String codeString) throws FHIRException { 088 if (codeString == null || "".equals(codeString)) 089 return null; 090 if ("no-change".equals(codeString)) 091 return NOCHANGE; 092 if ("downcode1".equals(codeString)) 093 return DOWNCODE1; 094 if ("downcode2".equals(codeString)) 095 return DOWNCODE2; 096 if ("downcode3".equals(codeString)) 097 return DOWNCODE3; 098 if ("upcode1".equals(codeString)) 099 return UPCODE1; 100 if ("upcode2".equals(codeString)) 101 return UPCODE2; 102 if ("no-concern".equals(codeString)) 103 return NOCONCERN; 104 if ("serious-concern".equals(codeString)) 105 return SERIOUSCONCERN; 106 if ("critical-concern".equals(codeString)) 107 return CRITICALCONCERN; 108 if ("present".equals(codeString)) 109 return PRESENT; 110 if ("absent".equals(codeString)) 111 return ABSENT; 112 throw new FHIRException("Unknown CertaintySubcomponentRating code '"+codeString+"'"); 113 } 114 public String toCode() { 115 switch (this) { 116 case NOCHANGE: return "no-change"; 117 case DOWNCODE1: return "downcode1"; 118 case DOWNCODE2: return "downcode2"; 119 case DOWNCODE3: return "downcode3"; 120 case UPCODE1: return "upcode1"; 121 case UPCODE2: return "upcode2"; 122 case NOCONCERN: return "no-concern"; 123 case SERIOUSCONCERN: return "serious-concern"; 124 case CRITICALCONCERN: return "critical-concern"; 125 case PRESENT: return "present"; 126 case ABSENT: return "absent"; 127 default: return "?"; 128 } 129 } 130 public String getSystem() { 131 return "http://terminology.hl7.org/CodeSystem/certainty-subcomponent-rating"; 132 } 133 public String getDefinition() { 134 switch (this) { 135 case NOCHANGE: return "no change to quality rating."; 136 case DOWNCODE1: return "reduce quality rating by 1."; 137 case DOWNCODE2: return "reduce quality rating by 2."; 138 case DOWNCODE3: return "reduce quality rating by 3."; 139 case UPCODE1: return "increase quality rating by 1."; 140 case UPCODE2: return "increase quality rating by 2."; 141 case NOCONCERN: return "no serious concern."; 142 case SERIOUSCONCERN: return "serious concern."; 143 case CRITICALCONCERN: return "critical concern."; 144 case PRESENT: return "possible reason for increasing quality rating was checked and found to bepresent."; 145 case ABSENT: return "possible reason for increasing quality rating was checked and found to be absent."; 146 default: return "?"; 147 } 148 } 149 public String getDisplay() { 150 switch (this) { 151 case NOCHANGE: return "no change to rating"; 152 case DOWNCODE1: return "reduce rating: -1"; 153 case DOWNCODE2: return "reduce rating: -2"; 154 case DOWNCODE3: return "reduce rating: -3"; 155 case UPCODE1: return "increase rating: +1"; 156 case UPCODE2: return "increase rating: +2"; 157 case NOCONCERN: return "no serious concern"; 158 case SERIOUSCONCERN: return "serious concern"; 159 case CRITICALCONCERN: return "critical concern"; 160 case PRESENT: return "present"; 161 case ABSENT: return "absent"; 162 default: return "?"; 163 } 164 } 165 166 167} 168