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