001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum AssertOperatorCodes {
041
042        /**
043         * Default value. Equals comparison.
044         */
045        EQUALS, 
046        /**
047         * Not equals comparison.
048         */
049        NOTEQUALS, 
050        /**
051         * Compare value within a known set of values.
052         */
053        IN, 
054        /**
055         * Compare value not within a known set of values.
056         */
057        NOTIN, 
058        /**
059         * Compare value to be greater than a known value.
060         */
061        GREATERTHAN, 
062        /**
063         * Compare value to be less than a known value.
064         */
065        LESSTHAN, 
066        /**
067         * Compare value is empty.
068         */
069        EMPTY, 
070        /**
071         * Compare value is not empty.
072         */
073        NOTEMPTY, 
074        /**
075         * Compare value string contains a known value.
076         */
077        CONTAINS, 
078        /**
079         * Compare value string does not contain a known value.
080         */
081        NOTCONTAINS, 
082        /**
083         * Evaluate the FHIRPath expression as a boolean condition.
084         */
085        EVAL, 
086        /**
087         * added to help the parsers
088         */
089        NULL;
090        public static AssertOperatorCodes fromCode(String codeString) throws FHIRException {
091            if (codeString == null || "".equals(codeString))
092                return null;
093        if ("equals".equals(codeString))
094          return EQUALS;
095        if ("notEquals".equals(codeString))
096          return NOTEQUALS;
097        if ("in".equals(codeString))
098          return IN;
099        if ("notIn".equals(codeString))
100          return NOTIN;
101        if ("greaterThan".equals(codeString))
102          return GREATERTHAN;
103        if ("lessThan".equals(codeString))
104          return LESSTHAN;
105        if ("empty".equals(codeString))
106          return EMPTY;
107        if ("notEmpty".equals(codeString))
108          return NOTEMPTY;
109        if ("contains".equals(codeString))
110          return CONTAINS;
111        if ("notContains".equals(codeString))
112          return NOTCONTAINS;
113        if ("eval".equals(codeString))
114          return EVAL;
115        throw new FHIRException("Unknown AssertOperatorCodes code '"+codeString+"'");
116        }
117        public String toCode() {
118          switch (this) {
119            case EQUALS: return "equals";
120            case NOTEQUALS: return "notEquals";
121            case IN: return "in";
122            case NOTIN: return "notIn";
123            case GREATERTHAN: return "greaterThan";
124            case LESSTHAN: return "lessThan";
125            case EMPTY: return "empty";
126            case NOTEMPTY: return "notEmpty";
127            case CONTAINS: return "contains";
128            case NOTCONTAINS: return "notContains";
129            case EVAL: return "eval";
130            default: return "?";
131          }
132        }
133        public String getSystem() {
134          return "http://hl7.org/fhir/assert-operator-codes";
135        }
136        public String getDefinition() {
137          switch (this) {
138            case EQUALS: return "Default value. Equals comparison.";
139            case NOTEQUALS: return "Not equals comparison.";
140            case IN: return "Compare value within a known set of values.";
141            case NOTIN: return "Compare value not within a known set of values.";
142            case GREATERTHAN: return "Compare value to be greater than a known value.";
143            case LESSTHAN: return "Compare value to be less than a known value.";
144            case EMPTY: return "Compare value is empty.";
145            case NOTEMPTY: return "Compare value is not empty.";
146            case CONTAINS: return "Compare value string contains a known value.";
147            case NOTCONTAINS: return "Compare value string does not contain a known value.";
148            case EVAL: return "Evaluate the FHIRPath expression as a boolean condition.";
149            default: return "?";
150          }
151        }
152        public String getDisplay() {
153          switch (this) {
154            case EQUALS: return "equals";
155            case NOTEQUALS: return "notEquals";
156            case IN: return "in";
157            case NOTIN: return "notIn";
158            case GREATERTHAN: return "greaterThan";
159            case LESSTHAN: return "lessThan";
160            case EMPTY: return "empty";
161            case NOTEMPTY: return "notEmpty";
162            case CONTAINS: return "contains";
163            case NOTCONTAINS: return "notContains";
164            case EVAL: return "evaluate";
165            default: return "?";
166          }
167    }
168
169
170}