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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.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         * added to help the parsers
081         */
082        NULL;
083        public static SearchModifierCode fromCode(String codeString) throws FHIRException {
084            if (codeString == null || "".equals(codeString))
085                return null;
086        if ("missing".equals(codeString))
087          return MISSING;
088        if ("exact".equals(codeString))
089          return EXACT;
090        if ("contains".equals(codeString))
091          return CONTAINS;
092        if ("not".equals(codeString))
093          return NOT;
094        if ("text".equals(codeString))
095          return TEXT;
096        if ("in".equals(codeString))
097          return IN;
098        if ("not-in".equals(codeString))
099          return NOTIN;
100        if ("below".equals(codeString))
101          return BELOW;
102        if ("above".equals(codeString))
103          return ABOVE;
104        if ("type".equals(codeString))
105          return TYPE;
106        throw new FHIRException("Unknown SearchModifierCode code '"+codeString+"'");
107        }
108        public String toCode() {
109          switch (this) {
110            case MISSING: return "missing";
111            case EXACT: return "exact";
112            case CONTAINS: return "contains";
113            case NOT: return "not";
114            case TEXT: return "text";
115            case IN: return "in";
116            case NOTIN: return "not-in";
117            case BELOW: return "below";
118            case ABOVE: return "above";
119            case TYPE: return "type";
120            default: return "?";
121          }
122        }
123        public String getSystem() {
124          return "http://hl7.org/fhir/search-modifier-code";
125        }
126        public String getDefinition() {
127          switch (this) {
128            case MISSING: return "The search parameter returns resources that have a value or not.";
129            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).";
130            case CONTAINS: return "The search parameter returns resources that include the supplied parameter value anywhere within the field being searched.";
131            case NOT: return "The search parameter returns resources that do not contain a match.";
132            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.";
133            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.";
134            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.";
135            case BELOW: return "The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships).";
136            case ABOVE: return "The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships).";
137            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.).";
138            default: return "?";
139          }
140        }
141        public String getDisplay() {
142          switch (this) {
143            case MISSING: return "Missing";
144            case EXACT: return "Exact";
145            case CONTAINS: return "Contains";
146            case NOT: return "Not";
147            case TEXT: return "Text";
148            case IN: return "In";
149            case NOTIN: return "Not In";
150            case BELOW: return "Below";
151            case ABOVE: return "Above";
152            case TYPE: return "Type";
153            default: return "?";
154          }
155    }
156
157
158}
159