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