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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum V3RelationalOperator { 037 038 /** 039 * Specified set of things includes value being evaluated. 040 */ 041 CT, 042 /** 043 * Equal condition applied to comparisons. 044 */ 045 EQ, 046 /** 047 * Greater than or equal condition applied to comparisons. 048 */ 049 GE, 050 /** 051 * A generic comparison selects a record for inclusion in the response if the 052 * beginning of the designated element value matches the select string. 053 */ 054 GN, 055 /** 056 * Greater than condition applied to comparisons. 057 */ 058 GT, 059 /** 060 * Less than or equal condition applied to comparisons. 061 */ 062 LE, 063 /** 064 * Less than condition applied to comparisons. 065 */ 066 LT, 067 /** 068 * Not equal condition applied to comparisons. 069 */ 070 NE, 071 /** 072 * added to help the parsers 073 */ 074 NULL; 075 076 public static V3RelationalOperator fromCode(String codeString) throws FHIRException { 077 if (codeString == null || "".equals(codeString)) 078 return null; 079 if ("CT".equals(codeString)) 080 return CT; 081 if ("EQ".equals(codeString)) 082 return EQ; 083 if ("GE".equals(codeString)) 084 return GE; 085 if ("GN".equals(codeString)) 086 return GN; 087 if ("GT".equals(codeString)) 088 return GT; 089 if ("LE".equals(codeString)) 090 return LE; 091 if ("LT".equals(codeString)) 092 return LT; 093 if ("NE".equals(codeString)) 094 return NE; 095 throw new FHIRException("Unknown V3RelationalOperator code '" + codeString + "'"); 096 } 097 098 public String toCode() { 099 switch (this) { 100 case CT: 101 return "CT"; 102 case EQ: 103 return "EQ"; 104 case GE: 105 return "GE"; 106 case GN: 107 return "GN"; 108 case GT: 109 return "GT"; 110 case LE: 111 return "LE"; 112 case LT: 113 return "LT"; 114 case NE: 115 return "NE"; 116 case NULL: 117 return null; 118 default: 119 return "?"; 120 } 121 } 122 123 public String getSystem() { 124 return "http://terminology.hl7.org/CodeSystem/v3-RelationalOperator"; 125 } 126 127 public String getDefinition() { 128 switch (this) { 129 case CT: 130 return "Specified set of things includes value being evaluated."; 131 case EQ: 132 return "Equal condition applied to comparisons."; 133 case GE: 134 return "Greater than or equal condition applied to comparisons."; 135 case GN: 136 return "A generic comparison selects a record for inclusion in the response if the beginning of the designated element value matches the select string."; 137 case GT: 138 return "Greater than condition applied to comparisons."; 139 case LE: 140 return "Less than or equal condition applied to comparisons."; 141 case LT: 142 return "Less than condition applied to comparisons."; 143 case NE: 144 return "Not equal condition applied to comparisons."; 145 case NULL: 146 return null; 147 default: 148 return "?"; 149 } 150 } 151 152 public String getDisplay() { 153 switch (this) { 154 case CT: 155 return "Contains"; 156 case EQ: 157 return "Equal"; 158 case GE: 159 return "Greater than or equal"; 160 case GN: 161 return "Generic"; 162 case GT: 163 return "Greater than"; 164 case LE: 165 return "Less than or equal"; 166 case LT: 167 return "Less than"; 168 case NE: 169 return "Not Equal"; 170 case NULL: 171 return null; 172 default: 173 return "?"; 174 } 175 } 176 177}