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 V3ActPriority {
038
039        /**
040         * As soon as possible, next highest priority after stat.
041         */
042        A, 
043        /**
044         * 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.)
045         */
046        CR, 
047        /**
048         * Filler should contact the placer (or target) to schedule the service.  (Was "C" in HL7 version 2.3's TQ-priority component.)
049         */
050        CS, 
051        /**
052         * Filler should contact the placer to schedule the service.  (Was "C" in HL7 version 2.3's TQ-priority component.)
053         */
054        CSP, 
055        /**
056         * Filler should contact the service recipient (target) to schedule the service.  (Was "C" in HL7 version 2.3's TQ-priority component.)
057         */
058        CSR, 
059        /**
060         * Beneficial to the patient but not essential for survival.
061         */
062        EL, 
063        /**
064         * An unforeseen combination of circumstances or the resulting state that calls for immediate action.
065         */
066        EM, 
067        /**
068         * 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.
069         */
070        P, 
071        /**
072         * 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.
073         */
074        PRN, 
075        /**
076         * Routine service, do at usual work hours.
077         */
078        R, 
079        /**
080         * A report should be prepared and sent as quickly as possible.
081         */
082        RR, 
083        /**
084         * With highest priority (e.g., emergency).
085         */
086        S, 
087        /**
088         * It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level).
089         */
090        T, 
091        /**
092         * Drug is to be used as directed by the prescriber.
093         */
094        UD, 
095        /**
096         * Calls for prompt action.
097         */
098        UR, 
099        /**
100         * added to help the parsers
101         */
102        NULL;
103        public static V3ActPriority fromCode(String codeString) throws FHIRException {
104            if (codeString == null || "".equals(codeString))
105                return null;
106        if ("A".equals(codeString))
107          return A;
108        if ("CR".equals(codeString))
109          return CR;
110        if ("CS".equals(codeString))
111          return CS;
112        if ("CSP".equals(codeString))
113          return CSP;
114        if ("CSR".equals(codeString))
115          return CSR;
116        if ("EL".equals(codeString))
117          return EL;
118        if ("EM".equals(codeString))
119          return EM;
120        if ("P".equals(codeString))
121          return P;
122        if ("PRN".equals(codeString))
123          return PRN;
124        if ("R".equals(codeString))
125          return R;
126        if ("RR".equals(codeString))
127          return RR;
128        if ("S".equals(codeString))
129          return S;
130        if ("T".equals(codeString))
131          return T;
132        if ("UD".equals(codeString))
133          return UD;
134        if ("UR".equals(codeString))
135          return UR;
136        throw new FHIRException("Unknown V3ActPriority code '"+codeString+"'");
137        }
138        public String toCode() {
139          switch (this) {
140            case A: return "A";
141            case CR: return "CR";
142            case CS: return "CS";
143            case CSP: return "CSP";
144            case CSR: return "CSR";
145            case EL: return "EL";
146            case EM: return "EM";
147            case P: return "P";
148            case PRN: return "PRN";
149            case R: return "R";
150            case RR: return "RR";
151            case S: return "S";
152            case T: return "T";
153            case UD: return "UD";
154            case UR: return "UR";
155            default: return "?";
156          }
157        }
158        public String getSystem() {
159          return "http://hl7.org/fhir/v3/ActPriority";
160        }
161        public String getDefinition() {
162          switch (this) {
163            case A: return "As soon as possible, next highest priority after stat.";
164            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.)";
165            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.)";
166            case CSP: return "Filler should contact the placer to schedule the service.  (Was \"C\" in HL7 version 2.3's TQ-priority component.)";
167            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.)";
168            case EL: return "Beneficial to the patient but not essential for survival.";
169            case EM: return "An unforeseen combination of circumstances or the resulting state that calls for immediate action.";
170            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.";
171            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.";
172            case R: return "Routine service, do at usual work hours.";
173            case RR: return "A report should be prepared and sent as quickly as possible.";
174            case S: return "With highest priority (e.g., emergency).";
175            case T: return "It is critical to come as close as possible to the requested time (e.g., for a through antimicrobial level).";
176            case UD: return "Drug is to be used as directed by the prescriber.";
177            case UR: return "Calls for prompt action.";
178            default: return "?";
179          }
180        }
181        public String getDisplay() {
182          switch (this) {
183            case A: return "ASAP";
184            case CR: return "callback results";
185            case CS: return "callback for scheduling";
186            case CSP: return "callback placer for scheduling";
187            case CSR: return "contact recipient for scheduling";
188            case EL: return "elective";
189            case EM: return "emergency";
190            case P: return "preop";
191            case PRN: return "as needed";
192            case R: return "routine";
193            case RR: return "rush reporting";
194            case S: return "stat";
195            case T: return "timing critical";
196            case UD: return "use as directed";
197            case UR: return "urgent";
198            default: return "?";
199          }
200    }
201
202
203}
204