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 Appointmentstatus { 038 039 /** 040 * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet. 041 */ 042 PROPOSED, 043 /** 044 * Some or all of the participant(s) have not finalized their acceptance of the appointment request. 045 */ 046 PENDING, 047 /** 048 * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. 049 */ 050 BOOKED, 051 /** 052 * The patient/patients has/have arrived and is/are waiting to be seen. 053 */ 054 ARRIVED, 055 /** 056 * The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons. 057 */ 058 FULFILLED, 059 /** 060 * The appointment has been cancelled. 061 */ 062 CANCELLED, 063 /** 064 * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). 065 */ 066 NOSHOW, 067 /** 068 * This instance should not have been part of this patient's medical record. 069 */ 070 ENTEREDINERROR, 071 /** 072 * When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present). 073 */ 074 CHECKEDIN, 075 /** 076 * The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available. 077A specific time might or might not be pre-allocated. 078 */ 079 WAITLIST, 080 /** 081 * added to help the parsers 082 */ 083 NULL; 084 public static Appointmentstatus fromCode(String codeString) throws FHIRException { 085 if (codeString == null || "".equals(codeString)) 086 return null; 087 if ("proposed".equals(codeString)) 088 return PROPOSED; 089 if ("pending".equals(codeString)) 090 return PENDING; 091 if ("booked".equals(codeString)) 092 return BOOKED; 093 if ("arrived".equals(codeString)) 094 return ARRIVED; 095 if ("fulfilled".equals(codeString)) 096 return FULFILLED; 097 if ("cancelled".equals(codeString)) 098 return CANCELLED; 099 if ("noshow".equals(codeString)) 100 return NOSHOW; 101 if ("entered-in-error".equals(codeString)) 102 return ENTEREDINERROR; 103 if ("checked-in".equals(codeString)) 104 return CHECKEDIN; 105 if ("waitlist".equals(codeString)) 106 return WAITLIST; 107 throw new FHIRException("Unknown Appointmentstatus code '"+codeString+"'"); 108 } 109 public String toCode() { 110 switch (this) { 111 case PROPOSED: return "proposed"; 112 case PENDING: return "pending"; 113 case BOOKED: return "booked"; 114 case ARRIVED: return "arrived"; 115 case FULFILLED: return "fulfilled"; 116 case CANCELLED: return "cancelled"; 117 case NOSHOW: return "noshow"; 118 case ENTEREDINERROR: return "entered-in-error"; 119 case CHECKEDIN: return "checked-in"; 120 case WAITLIST: return "waitlist"; 121 default: return "?"; 122 } 123 } 124 public String getSystem() { 125 return "http://hl7.org/fhir/appointmentstatus"; 126 } 127 public String getDefinition() { 128 switch (this) { 129 case PROPOSED: return "None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet."; 130 case PENDING: return "Some or all of the participant(s) have not finalized their acceptance of the appointment request."; 131 case BOOKED: return "All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified."; 132 case ARRIVED: return "The patient/patients has/have arrived and is/are waiting to be seen."; 133 case FULFILLED: return "The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons."; 134 case CANCELLED: return "The appointment has been cancelled."; 135 case NOSHOW: return "Some or all of the participant(s) have not/did not appear for the appointment (usually the patient)."; 136 case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; 137 case CHECKEDIN: return "When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present)."; 138 case WAITLIST: return "The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.\nA specific time might or might not be pre-allocated."; 139 default: return "?"; 140 } 141 } 142 public String getDisplay() { 143 switch (this) { 144 case PROPOSED: return "Proposed"; 145 case PENDING: return "Pending"; 146 case BOOKED: return "Booked"; 147 case ARRIVED: return "Arrived"; 148 case FULFILLED: return "Fulfilled"; 149 case CANCELLED: return "Cancelled"; 150 case NOSHOW: return "No Show"; 151 case ENTEREDINERROR: return "Entered in error"; 152 case CHECKEDIN: return "Checked In"; 153 case WAITLIST: return "Waitlisted"; 154 default: return "?"; 155 } 156 } 157 158 159} 160