001package org.hl7.fhir.dstu3.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 Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0 036 037 038import org.hl7.fhir.exceptions.FHIRException; 039 040public enum SearchModifierCode { 041 042 /** 043 * The search parameter returns resources that have a value or not. 044 */ 045 MISSING, 046 /** 047 * The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). 048 */ 049 EXACT, 050 /** 051 * The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. 052 */ 053 CONTAINS, 054 /** 055 * The search parameter returns resources that do not contain a match. 056 */ 057 NOT, 058 /** 059 * The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text. 060 */ 061 TEXT, 062 /** 063 * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. 064 */ 065 IN, 066 /** 067 * The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. 068 */ 069 NOTIN, 070 /** 071 * The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). 072 */ 073 BELOW, 074 /** 075 * The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). 076 */ 077 ABOVE, 078 /** 079 * The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). 080 */ 081 TYPE, 082 /** 083 * added to help the parsers 084 */ 085 NULL; 086 public static SearchModifierCode fromCode(String codeString) throws FHIRException { 087 if (codeString == null || "".equals(codeString)) 088 return null; 089 if ("missing".equals(codeString)) 090 return MISSING; 091 if ("exact".equals(codeString)) 092 return EXACT; 093 if ("contains".equals(codeString)) 094 return CONTAINS; 095 if ("not".equals(codeString)) 096 return NOT; 097 if ("text".equals(codeString)) 098 return TEXT; 099 if ("in".equals(codeString)) 100 return IN; 101 if ("not-in".equals(codeString)) 102 return NOTIN; 103 if ("below".equals(codeString)) 104 return BELOW; 105 if ("above".equals(codeString)) 106 return ABOVE; 107 if ("type".equals(codeString)) 108 return TYPE; 109 throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'"); 110 } 111 public String toCode() { 112 switch (this) { 113 case MISSING: return "missing"; 114 case EXACT: return "exact"; 115 case CONTAINS: return "contains"; 116 case NOT: return "not"; 117 case TEXT: return "text"; 118 case IN: return "in"; 119 case NOTIN: return "not-in"; 120 case BELOW: return "below"; 121 case ABOVE: return "above"; 122 case TYPE: return "type"; 123 case NULL: return null; 124 default: return "?"; 125 } 126 } 127 public String getSystem() { 128 return "http://hl7.org/fhir/search-modifier-code"; 129 } 130 public String getDefinition() { 131 switch (this) { 132 case MISSING: return "The search parameter returns resources that have a value or not."; 133 case EXACT: return "The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents)."; 134 case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched."; 135 case NOT: return "The search parameter returns resources that do not contain a match."; 136 case TEXT: return "The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, or Identifier.type.text."; 137 case IN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set."; 138 case NOTIN: return "The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set."; 139 case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships)."; 140 case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships)."; 141 case TYPE: return "The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.)."; 142 case NULL: return null; 143 default: return "?"; 144 } 145 } 146 public String getDisplay() { 147 switch (this) { 148 case MISSING: return "Missing"; 149 case EXACT: return "Exact"; 150 case CONTAINS: return "Contains"; 151 case NOT: return "Not"; 152 case TEXT: return "Text"; 153 case IN: return "In"; 154 case NOTIN: return "Not In"; 155 case BELOW: return "Below"; 156 case ABOVE: return "Above"; 157 case TYPE: return "Type"; 158 case NULL: return null; 159 default: return "?"; 160 } 161 } 162 163 164}