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 RiskEstimateType { 038 039 /** 040 * dichotomous measure (present or absent) reported as a ratio compared to the denominator of 1 (A percentage is a proportion with denominator of 100). 041 */ 042 PROPORTION, 043 /** 044 * A special use case where the proportion is derived from a formula rather than derived from summary evidence. 045 */ 046 DERIVEDPROPORTION, 047 /** 048 * continuous numerical measure reported as an average. 049 */ 050 MEAN, 051 /** 052 * continuous numerical measure reported as the middle of the range. 053 */ 054 MEDIAN, 055 /** 056 * descriptive measure reported as total number of items. 057 */ 058 COUNT, 059 /** 060 * descriptive measure reported as narrative. 061 */ 062 DESCRIPTIVE, 063 /** 064 * added to help the parsers 065 */ 066 NULL; 067 public static RiskEstimateType fromCode(String codeString) throws FHIRException { 068 if (codeString == null || "".equals(codeString)) 069 return null; 070 if ("proportion".equals(codeString)) 071 return PROPORTION; 072 if ("derivedProportion".equals(codeString)) 073 return DERIVEDPROPORTION; 074 if ("mean".equals(codeString)) 075 return MEAN; 076 if ("median".equals(codeString)) 077 return MEDIAN; 078 if ("count".equals(codeString)) 079 return COUNT; 080 if ("descriptive".equals(codeString)) 081 return DESCRIPTIVE; 082 throw new FHIRException("Unknown RiskEstimateType code '"+codeString+"'"); 083 } 084 public String toCode() { 085 switch (this) { 086 case PROPORTION: return "proportion"; 087 case DERIVEDPROPORTION: return "derivedProportion"; 088 case MEAN: return "mean"; 089 case MEDIAN: return "median"; 090 case COUNT: return "count"; 091 case DESCRIPTIVE: return "descriptive"; 092 default: return "?"; 093 } 094 } 095 public String getSystem() { 096 return "http://terminology.hl7.org/CodeSystem/risk-estimate-type"; 097 } 098 public String getDefinition() { 099 switch (this) { 100 case PROPORTION: return "dichotomous measure (present or absent) reported as a ratio compared to the denominator of 1 (A percentage is a proportion with denominator of 100)."; 101 case DERIVEDPROPORTION: return "A special use case where the proportion is derived from a formula rather than derived from summary evidence."; 102 case MEAN: return "continuous numerical measure reported as an average."; 103 case MEDIAN: return "continuous numerical measure reported as the middle of the range."; 104 case COUNT: return "descriptive measure reported as total number of items."; 105 case DESCRIPTIVE: return "descriptive measure reported as narrative."; 106 default: return "?"; 107 } 108 } 109 public String getDisplay() { 110 switch (this) { 111 case PROPORTION: return "proportion"; 112 case DERIVEDPROPORTION: return "derivedProportion"; 113 case MEAN: return "mean"; 114 case MEDIAN: return "median"; 115 case COUNT: return "count"; 116 case DESCRIPTIVE: return "descriptive"; 117 default: return "?"; 118 } 119 } 120 121 122} 123