001package org.hl7.fhir.r4.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum AppointmentCancellationReason {
041
042        /**
043         * null
044         */
045        PAT, 
046        /**
047         * null
048         */
049        PATCRS, 
050        /**
051         * null
052         */
053        PATCPP, 
054        /**
055         * null
056         */
057        PATDEC, 
058        /**
059         * null
060         */
061        PATFB, 
062        /**
063         * null
064         */
065        PATLT, 
066        /**
067         * null
068         */
069        PATMT, 
070        /**
071         * null
072         */
073        PATMV, 
074        /**
075         * null
076         */
077        PATPREG, 
078        /**
079         * null
080         */
081        PATSWL, 
082        /**
083         * null
084         */
085        PATUCP, 
086        /**
087         * null
088         */
089        PROV, 
090        /**
091         * null
092         */
093        PROVPERS, 
094        /**
095         * null
096         */
097        PROVDCH, 
098        /**
099         * null
100         */
101        PROVEDU, 
102        /**
103         * null
104         */
105        PROVHOSP, 
106        /**
107         * null
108         */
109        PROVLABS, 
110        /**
111         * null
112         */
113        PROVMRI, 
114        /**
115         * null
116         */
117        PROVONC, 
118        /**
119         * null
120         */
121        MAINT, 
122        /**
123         * null
124         */
125        MEDSINC, 
126        /**
127         * null
128         */
129        OTHER, 
130        /**
131         * null
132         */
133        OTHCMS, 
134        /**
135         * null
136         */
137        OTHERR, 
138        /**
139         * null
140         */
141        OTHFIN, 
142        /**
143         * null
144         */
145        OTHIV, 
146        /**
147         * null
148         */
149        OTHINT, 
150        /**
151         * null
152         */
153        OTHMU, 
154        /**
155         * null
156         */
157        OTHROOM, 
158        /**
159         * null
160         */
161        OTHOERR, 
162        /**
163         * null
164         */
165        OTHSWIE, 
166        /**
167         * null
168         */
169        OTHWEATH, 
170        /**
171         * added to help the parsers
172         */
173        NULL;
174        public static AppointmentCancellationReason fromCode(String codeString) throws FHIRException {
175            if (codeString == null || "".equals(codeString))
176                return null;
177        if ("pat".equals(codeString))
178          return PAT;
179        if ("pat-crs".equals(codeString))
180          return PATCRS;
181        if ("pat-cpp".equals(codeString))
182          return PATCPP;
183        if ("pat-dec".equals(codeString))
184          return PATDEC;
185        if ("pat-fb".equals(codeString))
186          return PATFB;
187        if ("pat-lt".equals(codeString))
188          return PATLT;
189        if ("pat-mt".equals(codeString))
190          return PATMT;
191        if ("pat-mv".equals(codeString))
192          return PATMV;
193        if ("pat-preg".equals(codeString))
194          return PATPREG;
195        if ("pat-swl".equals(codeString))
196          return PATSWL;
197        if ("pat-ucp".equals(codeString))
198          return PATUCP;
199        if ("prov".equals(codeString))
200          return PROV;
201        if ("prov-pers".equals(codeString))
202          return PROVPERS;
203        if ("prov-dch".equals(codeString))
204          return PROVDCH;
205        if ("prov-edu".equals(codeString))
206          return PROVEDU;
207        if ("prov-hosp".equals(codeString))
208          return PROVHOSP;
209        if ("prov-labs".equals(codeString))
210          return PROVLABS;
211        if ("prov-mri".equals(codeString))
212          return PROVMRI;
213        if ("prov-onc".equals(codeString))
214          return PROVONC;
215        if ("maint".equals(codeString))
216          return MAINT;
217        if ("meds-inc".equals(codeString))
218          return MEDSINC;
219        if ("other".equals(codeString))
220          return OTHER;
221        if ("oth-cms".equals(codeString))
222          return OTHCMS;
223        if ("oth-err".equals(codeString))
224          return OTHERR;
225        if ("oth-fin".equals(codeString))
226          return OTHFIN;
227        if ("oth-iv".equals(codeString))
228          return OTHIV;
229        if ("oth-int".equals(codeString))
230          return OTHINT;
231        if ("oth-mu".equals(codeString))
232          return OTHMU;
233        if ("oth-room".equals(codeString))
234          return OTHROOM;
235        if ("oth-oerr".equals(codeString))
236          return OTHOERR;
237        if ("oth-swie".equals(codeString))
238          return OTHSWIE;
239        if ("oth-weath".equals(codeString))
240          return OTHWEATH;
241        throw new FHIRException("Unknown AppointmentCancellationReason code '"+codeString+"'");
242        }
243        public String toCode() {
244          switch (this) {
245            case PAT: return "pat";
246            case PATCRS: return "pat-crs";
247            case PATCPP: return "pat-cpp";
248            case PATDEC: return "pat-dec";
249            case PATFB: return "pat-fb";
250            case PATLT: return "pat-lt";
251            case PATMT: return "pat-mt";
252            case PATMV: return "pat-mv";
253            case PATPREG: return "pat-preg";
254            case PATSWL: return "pat-swl";
255            case PATUCP: return "pat-ucp";
256            case PROV: return "prov";
257            case PROVPERS: return "prov-pers";
258            case PROVDCH: return "prov-dch";
259            case PROVEDU: return "prov-edu";
260            case PROVHOSP: return "prov-hosp";
261            case PROVLABS: return "prov-labs";
262            case PROVMRI: return "prov-mri";
263            case PROVONC: return "prov-onc";
264            case MAINT: return "maint";
265            case MEDSINC: return "meds-inc";
266            case OTHER: return "other";
267            case OTHCMS: return "oth-cms";
268            case OTHERR: return "oth-err";
269            case OTHFIN: return "oth-fin";
270            case OTHIV: return "oth-iv";
271            case OTHINT: return "oth-int";
272            case OTHMU: return "oth-mu";
273            case OTHROOM: return "oth-room";
274            case OTHOERR: return "oth-oerr";
275            case OTHSWIE: return "oth-swie";
276            case OTHWEATH: return "oth-weath";
277            default: return "?";
278          }
279        }
280        public String getSystem() {
281          return "http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason";
282        }
283        public String getDefinition() {
284          switch (this) {
285            case PAT: return "";
286            case PATCRS: return "";
287            case PATCPP: return "";
288            case PATDEC: return "";
289            case PATFB: return "";
290            case PATLT: return "";
291            case PATMT: return "";
292            case PATMV: return "";
293            case PATPREG: return "";
294            case PATSWL: return "";
295            case PATUCP: return "";
296            case PROV: return "";
297            case PROVPERS: return "";
298            case PROVDCH: return "";
299            case PROVEDU: return "";
300            case PROVHOSP: return "";
301            case PROVLABS: return "";
302            case PROVMRI: return "";
303            case PROVONC: return "";
304            case MAINT: return "";
305            case MEDSINC: return "";
306            case OTHER: return "";
307            case OTHCMS: return "";
308            case OTHERR: return "";
309            case OTHFIN: return "";
310            case OTHIV: return "";
311            case OTHINT: return "";
312            case OTHMU: return "";
313            case OTHROOM: return "";
314            case OTHOERR: return "";
315            case OTHSWIE: return "";
316            case OTHWEATH: return "";
317            default: return "?";
318          }
319        }
320        public String getDisplay() {
321          switch (this) {
322            case PAT: return "Patient";
323            case PATCRS: return "Patient: Canceled via automated reminder system";
324            case PATCPP: return "Patient: Canceled via Patient Portal";
325            case PATDEC: return "Patient: Deceased";
326            case PATFB: return "Patient: Feeling Better";
327            case PATLT: return "Patient: Lack of Transportation";
328            case PATMT: return "Patient: Member Terminated";
329            case PATMV: return "Patient: Moved";
330            case PATPREG: return "Patient: Pregnant";
331            case PATSWL: return "Patient: Scheduled from Wait List";
332            case PATUCP: return "Patient: Unhappy/Changed Provider";
333            case PROV: return "Provider";
334            case PROVPERS: return "Provider: Personal";
335            case PROVDCH: return "Provider: Discharged";
336            case PROVEDU: return "Provider: Edu/Meeting";
337            case PROVHOSP: return "Provider: Hospitalized";
338            case PROVLABS: return "Provider: Labs Out of Acceptable Range";
339            case PROVMRI: return "Provider: MRI Screening Form Marked Do Not Proceed";
340            case PROVONC: return "Provider: Oncology Treatment Plan Changes";
341            case MAINT: return "Equipment Maintenance/Repair";
342            case MEDSINC: return "Prep/Med Incomplete";
343            case OTHER: return "Other";
344            case OTHCMS: return "Other: CMS Therapy Cap Service Not Authorized";
345            case OTHERR: return "Other: Error";
346            case OTHFIN: return "Other: Financial";
347            case OTHIV: return "Other: Improper IV Access/Infiltrate IV";
348            case OTHINT: return "Other: No Interpreter Available";
349            case OTHMU: return "Other: Prep/Med/Results Unavailable";
350            case OTHROOM: return "Other: Room/Resource Maintenance";
351            case OTHOERR: return "Other: Schedule Order Error";
352            case OTHSWIE: return "Other: Silent Walk In Error";
353            case OTHWEATH: return "Other: Weather";
354            default: return "?";
355          }
356    }
357
358
359}