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