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 V3SetOperator { 037 038 /** 039 * Operations that can be used to associate concepts in a terminology. 040 */ 041 _VALUESETOPERATOR, 042 /** 043 * Form the set-difference with this value, i.e., exclude this element or set 044 * from the resulting set. 045 */ 046 E, 047 /** 048 * Form the union with this value, i.e., include this element or set in the 049 * resulting set. 050 */ 051 I, 052 /** 053 * Form the intersection with the value. 054 */ 055 A, 056 /** 057 * Form the convex hull with the value. The convex hull is defined over ordered 058 * domains and is the smallest contiguous superset (interval) that of all the 059 * operand sets. 060 */ 061 H, 062 /** 063 * Form the periodic hull with the value. The periodic hull is defined over 064 * ordered domains and is the periodic set that contains all contiguous 065 * supersets of pairs of intervals generated by the operand periodic intervals. 066 */ 067 P, 068 /** 069 * added to help the parsers 070 */ 071 NULL; 072 073 public static V3SetOperator fromCode(String codeString) throws FHIRException { 074 if (codeString == null || "".equals(codeString)) 075 return null; 076 if ("_ValueSetOperator".equals(codeString)) 077 return _VALUESETOPERATOR; 078 if ("E".equals(codeString)) 079 return E; 080 if ("I".equals(codeString)) 081 return I; 082 if ("A".equals(codeString)) 083 return A; 084 if ("H".equals(codeString)) 085 return H; 086 if ("P".equals(codeString)) 087 return P; 088 throw new FHIRException("Unknown V3SetOperator code '" + codeString + "'"); 089 } 090 091 public String toCode() { 092 switch (this) { 093 case _VALUESETOPERATOR: 094 return "_ValueSetOperator"; 095 case E: 096 return "E"; 097 case I: 098 return "I"; 099 case A: 100 return "A"; 101 case H: 102 return "H"; 103 case P: 104 return "P"; 105 case NULL: 106 return null; 107 default: 108 return "?"; 109 } 110 } 111 112 public String getSystem() { 113 return "http://terminology.hl7.org/CodeSystem/v3-SetOperator"; 114 } 115 116 public String getDefinition() { 117 switch (this) { 118 case _VALUESETOPERATOR: 119 return "Operations that can be used to associate concepts in a terminology."; 120 case E: 121 return "Form the set-difference with this value, i.e., exclude this element or set from the resulting set."; 122 case I: 123 return "Form the union with this value, i.e., include this element or set in the resulting set."; 124 case A: 125 return "Form the intersection with the value."; 126 case H: 127 return "Form the convex hull with the value. The convex hull is defined over ordered domains and is the smallest contiguous superset (interval) that of all the operand sets."; 128 case P: 129 return "Form the periodic hull with the value. The periodic hull is defined over ordered domains and is the periodic set that contains all contiguous supersets of pairs of intervals generated by the operand periodic intervals."; 130 case NULL: 131 return null; 132 default: 133 return "?"; 134 } 135 } 136 137 public String getDisplay() { 138 switch (this) { 139 case _VALUESETOPERATOR: 140 return "ValueSetOperator"; 141 case E: 142 return "exclude"; 143 case I: 144 return "include"; 145 case A: 146 return "intersect"; 147 case H: 148 return "convex hull"; 149 case P: 150 return "periodic hull"; 151 case NULL: 152 return null; 153 default: 154 return "?"; 155 } 156 } 157 158}