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