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, Dec 27, 2018 10:06-0500 for FHIR v4.0.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum AppointmentCancellationReason {
038
039        /**
040         * null
041         */
042        PAT, 
043        /**
044         * null
045         */
046        PATCRS, 
047        /**
048         * null
049         */
050        PATCPP, 
051        /**
052         * null
053         */
054        PATDEC, 
055        /**
056         * null
057         */
058        PATFB, 
059        /**
060         * null
061         */
062        PATLT, 
063        /**
064         * null
065         */
066        PATMT, 
067        /**
068         * null
069         */
070        PATMV, 
071        /**
072         * null
073         */
074        PATPREG, 
075        /**
076         * null
077         */
078        PATSWL, 
079        /**
080         * null
081         */
082        PATUCP, 
083        /**
084         * null
085         */
086        PROV, 
087        /**
088         * null
089         */
090        PROVPERS, 
091        /**
092         * null
093         */
094        PROVDCH, 
095        /**
096         * null
097         */
098        PROVEDU, 
099        /**
100         * null
101         */
102        PROVHOSP, 
103        /**
104         * null
105         */
106        PROVLABS, 
107        /**
108         * null
109         */
110        PROVMRI, 
111        /**
112         * null
113         */
114        PROVONC, 
115        /**
116         * null
117         */
118        MAINT, 
119        /**
120         * null
121         */
122        MEDSINC, 
123        /**
124         * null
125         */
126        OTHER, 
127        /**
128         * null
129         */
130        OTHCMS, 
131        /**
132         * null
133         */
134        OTHERR, 
135        /**
136         * null
137         */
138        OTHFIN, 
139        /**
140         * null
141         */
142        OTHIV, 
143        /**
144         * null
145         */
146        OTHINT, 
147        /**
148         * null
149         */
150        OTHMU, 
151        /**
152         * null
153         */
154        OTHROOM, 
155        /**
156         * null
157         */
158        OTHOERR, 
159        /**
160         * null
161         */
162        OTHSWIE, 
163        /**
164         * null
165         */
166        OTHWEATH, 
167        /**
168         * added to help the parsers
169         */
170        NULL;
171        public static AppointmentCancellationReason fromCode(String codeString) throws FHIRException {
172            if (codeString == null || "".equals(codeString))
173                return null;
174        if ("pat".equals(codeString))
175          return PAT;
176        if ("pat-crs".equals(codeString))
177          return PATCRS;
178        if ("pat-cpp".equals(codeString))
179          return PATCPP;
180        if ("pat-dec".equals(codeString))
181          return PATDEC;
182        if ("pat-fb".equals(codeString))
183          return PATFB;
184        if ("pat-lt".equals(codeString))
185          return PATLT;
186        if ("pat-mt".equals(codeString))
187          return PATMT;
188        if ("pat-mv".equals(codeString))
189          return PATMV;
190        if ("pat-preg".equals(codeString))
191          return PATPREG;
192        if ("pat-swl".equals(codeString))
193          return PATSWL;
194        if ("pat-ucp".equals(codeString))
195          return PATUCP;
196        if ("prov".equals(codeString))
197          return PROV;
198        if ("prov-pers".equals(codeString))
199          return PROVPERS;
200        if ("prov-dch".equals(codeString))
201          return PROVDCH;
202        if ("prov-edu".equals(codeString))
203          return PROVEDU;
204        if ("prov-hosp".equals(codeString))
205          return PROVHOSP;
206        if ("prov-labs".equals(codeString))
207          return PROVLABS;
208        if ("prov-mri".equals(codeString))
209          return PROVMRI;
210        if ("prov-onc".equals(codeString))
211          return PROVONC;
212        if ("maint".equals(codeString))
213          return MAINT;
214        if ("meds-inc".equals(codeString))
215          return MEDSINC;
216        if ("other".equals(codeString))
217          return OTHER;
218        if ("oth-cms".equals(codeString))
219          return OTHCMS;
220        if ("oth-err".equals(codeString))
221          return OTHERR;
222        if ("oth-fin".equals(codeString))
223          return OTHFIN;
224        if ("oth-iv".equals(codeString))
225          return OTHIV;
226        if ("oth-int".equals(codeString))
227          return OTHINT;
228        if ("oth-mu".equals(codeString))
229          return OTHMU;
230        if ("oth-room".equals(codeString))
231          return OTHROOM;
232        if ("oth-oerr".equals(codeString))
233          return OTHOERR;
234        if ("oth-swie".equals(codeString))
235          return OTHSWIE;
236        if ("oth-weath".equals(codeString))
237          return OTHWEATH;
238        throw new FHIRException("Unknown AppointmentCancellationReason code '"+codeString+"'");
239        }
240        public String toCode() {
241          switch (this) {
242            case PAT: return "pat";
243            case PATCRS: return "pat-crs";
244            case PATCPP: return "pat-cpp";
245            case PATDEC: return "pat-dec";
246            case PATFB: return "pat-fb";
247            case PATLT: return "pat-lt";
248            case PATMT: return "pat-mt";
249            case PATMV: return "pat-mv";
250            case PATPREG: return "pat-preg";
251            case PATSWL: return "pat-swl";
252            case PATUCP: return "pat-ucp";
253            case PROV: return "prov";
254            case PROVPERS: return "prov-pers";
255            case PROVDCH: return "prov-dch";
256            case PROVEDU: return "prov-edu";
257            case PROVHOSP: return "prov-hosp";
258            case PROVLABS: return "prov-labs";
259            case PROVMRI: return "prov-mri";
260            case PROVONC: return "prov-onc";
261            case MAINT: return "maint";
262            case MEDSINC: return "meds-inc";
263            case OTHER: return "other";
264            case OTHCMS: return "oth-cms";
265            case OTHERR: return "oth-err";
266            case OTHFIN: return "oth-fin";
267            case OTHIV: return "oth-iv";
268            case OTHINT: return "oth-int";
269            case OTHMU: return "oth-mu";
270            case OTHROOM: return "oth-room";
271            case OTHOERR: return "oth-oerr";
272            case OTHSWIE: return "oth-swie";
273            case OTHWEATH: return "oth-weath";
274            default: return "?";
275          }
276        }
277        public String getSystem() {
278          return "http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason";
279        }
280        public String getDefinition() {
281          switch (this) {
282            case PAT: return "";
283            case PATCRS: return "";
284            case PATCPP: return "";
285            case PATDEC: return "";
286            case PATFB: return "";
287            case PATLT: return "";
288            case PATMT: return "";
289            case PATMV: return "";
290            case PATPREG: return "";
291            case PATSWL: return "";
292            case PATUCP: return "";
293            case PROV: return "";
294            case PROVPERS: return "";
295            case PROVDCH: return "";
296            case PROVEDU: return "";
297            case PROVHOSP: return "";
298            case PROVLABS: return "";
299            case PROVMRI: return "";
300            case PROVONC: return "";
301            case MAINT: return "";
302            case MEDSINC: return "";
303            case OTHER: return "";
304            case OTHCMS: return "";
305            case OTHERR: return "";
306            case OTHFIN: return "";
307            case OTHIV: return "";
308            case OTHINT: return "";
309            case OTHMU: return "";
310            case OTHROOM: return "";
311            case OTHOERR: return "";
312            case OTHSWIE: return "";
313            case OTHWEATH: return "";
314            default: return "?";
315          }
316        }
317        public String getDisplay() {
318          switch (this) {
319            case PAT: return "Patient";
320            case PATCRS: return "Patient: Canceled via automated reminder system";
321            case PATCPP: return "Patient: Canceled via Patient Portal";
322            case PATDEC: return "Patient: Deceased";
323            case PATFB: return "Patient: Feeling Better";
324            case PATLT: return "Patient: Lack of Transportation";
325            case PATMT: return "Patient: Member Terminated";
326            case PATMV: return "Patient: Moved";
327            case PATPREG: return "Patient: Pregnant";
328            case PATSWL: return "Patient: Scheduled from Wait List";
329            case PATUCP: return "Patient: Unhappy/Changed Provider";
330            case PROV: return "Provider";
331            case PROVPERS: return "Provider: Personal";
332            case PROVDCH: return "Provider: Discharged";
333            case PROVEDU: return "Provider: Edu/Meeting";
334            case PROVHOSP: return "Provider: Hospitalized";
335            case PROVLABS: return "Provider: Labs Out of Acceptable Range";
336            case PROVMRI: return "Provider: MRI Screening Form Marked Do Not Proceed";
337            case PROVONC: return "Provider: Oncology Treatment Plan Changes";
338            case MAINT: return "Equipment Maintenance/Repair";
339            case MEDSINC: return "Prep/Med Incomplete";
340            case OTHER: return "Other";
341            case OTHCMS: return "Other: CMS Therapy Cap Service Not Authorized";
342            case OTHERR: return "Other: Error";
343            case OTHFIN: return "Other: Financial";
344            case OTHIV: return "Other: Improper IV Access/Infiltrate IV";
345            case OTHINT: return "Other: No Interpreter Available";
346            case OTHMU: return "Other: Prep/Med/Results Unavailable";
347            case OTHROOM: return "Other: Room/Resource Maintenance";
348            case OTHOERR: return "Other: Schedule Order Error";
349            case OTHSWIE: return "Other: Silent Walk In Error";
350            case OTHWEATH: return "Other: Weather";
351            default: return "?";
352          }
353    }
354
355
356}
357