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