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