001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.exceptions.FHIRException;
057
058public enum V3QueryParameterValue {
059
060        /**
061         * Description:Filter codes used to manage volume of dispenses returned by  a parameter-based queries.
062         */
063        _DISPENSEQUERYFILTERCODE, 
064        /**
065         * Description:Returns all dispenses to date for a prescription.
066         */
067        ALLDISP, 
068        /**
069         * Description:Returns the most recent dispense for a prescription.
070         */
071        LASTDISP, 
072        /**
073         * Description:Returns no dispense for a prescription.
074         */
075        NODISP, 
076        /**
077         * Filter codes used to manage types of orders being returned by a parameter-based query.
078         */
079        _ORDERFILTERCODE, 
080        /**
081         * Return all orders.
082         */
083        AO, 
084        /**
085         * Return only those orders that do not have results.
086         */
087        ONR, 
088        /**
089         * Return only those orders that have results.
090         */
091        OWR, 
092        /**
093         * A "helper" vocabulary used to construct complex query filters based on how and whether a prescription has been dispensed.
094         */
095        _PRESCRIPTIONDISPENSEFILTERCODE, 
096        /**
097         * Filter to only include SubstanceAdministration orders which have no remaining quantity authorized to be dispensed.
098         */
099        C, 
100        /**
101         * Filter to only include SubstanceAdministration orders which have no fulfilling supply events performed.
102         */
103        N, 
104        /**
105         * Filter to only include SubstanceAdministration orders which have had at least one fulfilling supply event, but which still have outstanding quantity remaining to be authorized.
106         */
107        R, 
108        /**
109         * Description:Indicates how result sets should be filtered based on whether they have associated issues.
110         */
111        _QUERYPARAMETERVALUE, 
112        /**
113         * Description:Result set should not be filtered based on the presence of issues.
114         */
115        ISSFA, 
116        /**
117         * Description:Result set should be filtered to only include records with associated issues.
118         */
119        ISSFI, 
120        /**
121         * Description:Result set should be filtered to only include records with associated unmanaged issues.
122         */
123        ISSFU, 
124        /**
125         * added to help the parsers
126         */
127        NULL;
128        public static V3QueryParameterValue fromCode(String codeString) throws FHIRException {
129            if (codeString == null || "".equals(codeString))
130                return null;
131        if ("_DispenseQueryFilterCode".equals(codeString))
132          return _DISPENSEQUERYFILTERCODE;
133        if ("ALLDISP".equals(codeString))
134          return ALLDISP;
135        if ("LASTDISP".equals(codeString))
136          return LASTDISP;
137        if ("NODISP".equals(codeString))
138          return NODISP;
139        if ("_OrderFilterCode".equals(codeString))
140          return _ORDERFILTERCODE;
141        if ("AO".equals(codeString))
142          return AO;
143        if ("ONR".equals(codeString))
144          return ONR;
145        if ("OWR".equals(codeString))
146          return OWR;
147        if ("_PrescriptionDispenseFilterCode".equals(codeString))
148          return _PRESCRIPTIONDISPENSEFILTERCODE;
149        if ("C".equals(codeString))
150          return C;
151        if ("N".equals(codeString))
152          return N;
153        if ("R".equals(codeString))
154          return R;
155        if ("_QueryParameterValue".equals(codeString))
156          return _QUERYPARAMETERVALUE;
157        if ("ISSFA".equals(codeString))
158          return ISSFA;
159        if ("ISSFI".equals(codeString))
160          return ISSFI;
161        if ("ISSFU".equals(codeString))
162          return ISSFU;
163        throw new FHIRException("Unknown V3QueryParameterValue code '"+codeString+"'");
164        }
165        public String toCode() {
166          switch (this) {
167            case _DISPENSEQUERYFILTERCODE: return "_DispenseQueryFilterCode";
168            case ALLDISP: return "ALLDISP";
169            case LASTDISP: return "LASTDISP";
170            case NODISP: return "NODISP";
171            case _ORDERFILTERCODE: return "_OrderFilterCode";
172            case AO: return "AO";
173            case ONR: return "ONR";
174            case OWR: return "OWR";
175            case _PRESCRIPTIONDISPENSEFILTERCODE: return "_PrescriptionDispenseFilterCode";
176            case C: return "C";
177            case N: return "N";
178            case R: return "R";
179            case _QUERYPARAMETERVALUE: return "_QueryParameterValue";
180            case ISSFA: return "ISSFA";
181            case ISSFI: return "ISSFI";
182            case ISSFU: return "ISSFU";
183            default: return "?";
184          }
185        }
186        public String getSystem() {
187          return "http://terminology.hl7.org/CodeSystem/v3-QueryParameterValue";
188        }
189        public String getDefinition() {
190          switch (this) {
191            case _DISPENSEQUERYFILTERCODE: return "Description:Filter codes used to manage volume of dispenses returned by  a parameter-based queries.";
192            case ALLDISP: return "Description:Returns all dispenses to date for a prescription.";
193            case LASTDISP: return "Description:Returns the most recent dispense for a prescription.";
194            case NODISP: return "Description:Returns no dispense for a prescription.";
195            case _ORDERFILTERCODE: return "Filter codes used to manage types of orders being returned by a parameter-based query.";
196            case AO: return "Return all orders.";
197            case ONR: return "Return only those orders that do not have results.";
198            case OWR: return "Return only those orders that have results.";
199            case _PRESCRIPTIONDISPENSEFILTERCODE: return "A \"helper\" vocabulary used to construct complex query filters based on how and whether a prescription has been dispensed.";
200            case C: return "Filter to only include SubstanceAdministration orders which have no remaining quantity authorized to be dispensed.";
201            case N: return "Filter to only include SubstanceAdministration orders which have no fulfilling supply events performed.";
202            case R: return "Filter to only include SubstanceAdministration orders which have had at least one fulfilling supply event, but which still have outstanding quantity remaining to be authorized.";
203            case _QUERYPARAMETERVALUE: return "Description:Indicates how result sets should be filtered based on whether they have associated issues.";
204            case ISSFA: return "Description:Result set should not be filtered based on the presence of issues.";
205            case ISSFI: return "Description:Result set should be filtered to only include records with associated issues.";
206            case ISSFU: return "Description:Result set should be filtered to only include records with associated unmanaged issues.";
207            default: return "?";
208          }
209        }
210        public String getDisplay() {
211          switch (this) {
212            case _DISPENSEQUERYFILTERCODE: return "dispense query filter code";
213            case ALLDISP: return "all dispenses";
214            case LASTDISP: return "last dispense";
215            case NODISP: return "no dispense";
216            case _ORDERFILTERCODE: return "_OrderFilterCode";
217            case AO: return "all orders";
218            case ONR: return "orders without results";
219            case OWR: return "orders with results";
220            case _PRESCRIPTIONDISPENSEFILTERCODE: return "Prescription Dispense Filter Code";
221            case C: return "Completely dispensed";
222            case N: return "Never Dispensed";
223            case R: return "Dispensed with remaining fills";
224            case _QUERYPARAMETERVALUE: return "QueryParameterValue";
225            case ISSFA: return "all";
226            case ISSFI: return "with issues";
227            case ISSFU: return "with unmanaged issues";
228            default: return "?";
229          }
230    }
231
232
233}
234