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 V3ActPriority {
059
060        /**
061         * As soon as possible, next highest priority after stat.
062         */
063        A, 
064        /**
065         * Filler should contact the placer as soon as results are available, even for preliminary results.  (Was "C" in HL7 version 2.3's reporting priority.)
066         */
067        CR, 
068        /**
069         * Filler should contact the placer (or target) to schedule the service.  (Was "C" in HL7 version 2.3's TQ-priority component.)
070         */
071        CS, 
072        /**
073         * Filler should contact the placer to schedule the service.  (Was "C" in HL7 version 2.3's TQ-priority component.)
074         */
075        CSP, 
076        /**
077         * Filler should contact the service recipient (target) to schedule the service.  (Was "C" in HL7 version 2.3's TQ-priority component.)
078         */
079        CSR, 
080        /**
081         * Beneficial to the patient but not essential for survival.
082         */
083        EL, 
084        /**
085         * An unforeseen combination of circumstances or the resulting state that calls for immediate action.
086         */
087        EM, 
088        /**
089         * Used to indicate that a service is to be performed prior to a scheduled surgery.  When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service.  When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation.
090         */
091        P, 
092        /**
093         * An "as needed" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition.
094         */
095        PRN, 
096        /**
097         * Routine service, do at usual work hours.
098         */
099        R, 
100        /**
101         * A report should be prepared and sent as quickly as possible.
102         */
103        RR, 
104        /**
105         * With highest priority (e.g., emergency).
106         */
107        S, 
108        /**
109         * It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level).
110         */
111        T, 
112        /**
113         * Drug is to be used as directed by the prescriber.
114         */
115        UD, 
116        /**
117         * Calls for prompt action.
118         */
119        UR, 
120        /**
121         * added to help the parsers
122         */
123        NULL;
124        public static V3ActPriority fromCode(String codeString) throws FHIRException {
125            if (codeString == null || "".equals(codeString))
126                return null;
127        if ("A".equals(codeString))
128          return A;
129        if ("CR".equals(codeString))
130          return CR;
131        if ("CS".equals(codeString))
132          return CS;
133        if ("CSP".equals(codeString))
134          return CSP;
135        if ("CSR".equals(codeString))
136          return CSR;
137        if ("EL".equals(codeString))
138          return EL;
139        if ("EM".equals(codeString))
140          return EM;
141        if ("P".equals(codeString))
142          return P;
143        if ("PRN".equals(codeString))
144          return PRN;
145        if ("R".equals(codeString))
146          return R;
147        if ("RR".equals(codeString))
148          return RR;
149        if ("S".equals(codeString))
150          return S;
151        if ("T".equals(codeString))
152          return T;
153        if ("UD".equals(codeString))
154          return UD;
155        if ("UR".equals(codeString))
156          return UR;
157        throw new FHIRException("Unknown V3ActPriority code '"+codeString+"'");
158        }
159        public String toCode() {
160          switch (this) {
161            case A: return "A";
162            case CR: return "CR";
163            case CS: return "CS";
164            case CSP: return "CSP";
165            case CSR: return "CSR";
166            case EL: return "EL";
167            case EM: return "EM";
168            case P: return "P";
169            case PRN: return "PRN";
170            case R: return "R";
171            case RR: return "RR";
172            case S: return "S";
173            case T: return "T";
174            case UD: return "UD";
175            case UR: return "UR";
176            default: return "?";
177          }
178        }
179        public String getSystem() {
180          return "http://terminology.hl7.org/CodeSystem/v3-ActPriority";
181        }
182        public String getDefinition() {
183          switch (this) {
184            case A: return "As soon as possible, next highest priority after stat.";
185            case CR: return "Filler should contact the placer as soon as results are available, even for preliminary results.  (Was \"C\" in HL7 version 2.3's reporting priority.)";
186            case CS: return "Filler should contact the placer (or target) to schedule the service.  (Was \"C\" in HL7 version 2.3's TQ-priority component.)";
187            case CSP: return "Filler should contact the placer to schedule the service.  (Was \"C\" in HL7 version 2.3's TQ-priority component.)";
188            case CSR: return "Filler should contact the service recipient (target) to schedule the service.  (Was \"C\" in HL7 version 2.3's TQ-priority component.)";
189            case EL: return "Beneficial to the patient but not essential for survival.";
190            case EM: return "An unforeseen combination of circumstances or the resulting state that calls for immediate action.";
191            case P: return "Used to indicate that a service is to be performed prior to a scheduled surgery.  When ordering a service and using the pre-op priority, a check is done to see the amount of time that must be allowed for performance of the service.  When the order is placed, a message can be generated indicating the time needed for the service so that it is not ordered in conflict with a scheduled operation.";
192            case PRN: return "An \"as needed\" order should be accompanied by a description of what constitutes a need. This description is represented by an observation service predicate as a precondition.";
193            case R: return "Routine service, do at usual work hours.";
194            case RR: return "A report should be prepared and sent as quickly as possible.";
195            case S: return "With highest priority (e.g., emergency).";
196            case T: return "It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level).";
197            case UD: return "Drug is to be used as directed by the prescriber.";
198            case UR: return "Calls for prompt action.";
199            default: return "?";
200          }
201        }
202        public String getDisplay() {
203          switch (this) {
204            case A: return "ASAP";
205            case CR: return "callback results";
206            case CS: return "callback for scheduling";
207            case CSP: return "callback placer for scheduling";
208            case CSR: return "contact recipient for scheduling";
209            case EL: return "elective";
210            case EM: return "emergency";
211            case P: return "preop";
212            case PRN: return "as needed";
213            case R: return "routine";
214            case RR: return "rush reporting";
215            case S: return "stat";
216            case T: return "timing critical";
217            case UD: return "use as directed";
218            case UR: return "urgent";
219            default: return "?";
220          }
221    }
222
223
224}
225