![](/hapi-fhir/images/logos/raccoon-forwards.png)
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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum EncounterSpecialArrangements { 037 038 /** 039 * The patient requires a wheelchair to be made available for the encounter. 040 */ 041 WHEEL, 042 /** 043 * An additional bed made available for a person accompanying the patient, for 044 * example a parent accompanying a child. 045 */ 046 ADDBED, 047 /** 048 * The patient is not fluent in the local language and requires an interpreter 049 * to be available. Refer to the Patient.Language property for the type of 050 * interpreter required. 051 */ 052 INT, 053 /** 054 * A person who accompanies a patient to provide assistive services necessary 055 * for the patient's care during the encounter. 056 */ 057 ATT, 058 /** 059 * The patient has a guide dog and the location used for the encounter should be 060 * able to support the presence of the service animal. 061 */ 062 DOG, 063 /** 064 * added to help the parsers 065 */ 066 NULL; 067 068 public static EncounterSpecialArrangements fromCode(String codeString) throws FHIRException { 069 if (codeString == null || "".equals(codeString)) 070 return null; 071 if ("wheel".equals(codeString)) 072 return WHEEL; 073 if ("add-bed".equals(codeString)) 074 return ADDBED; 075 if ("int".equals(codeString)) 076 return INT; 077 if ("att".equals(codeString)) 078 return ATT; 079 if ("dog".equals(codeString)) 080 return DOG; 081 throw new FHIRException("Unknown EncounterSpecialArrangements code '" + codeString + "'"); 082 } 083 084 public String toCode() { 085 switch (this) { 086 case WHEEL: 087 return "wheel"; 088 case ADDBED: 089 return "add-bed"; 090 case INT: 091 return "int"; 092 case ATT: 093 return "att"; 094 case DOG: 095 return "dog"; 096 case NULL: 097 return null; 098 default: 099 return "?"; 100 } 101 } 102 103 public String getSystem() { 104 return "http://terminology.hl7.org/CodeSystem/encounter-special-arrangements"; 105 } 106 107 public String getDefinition() { 108 switch (this) { 109 case WHEEL: 110 return "The patient requires a wheelchair to be made available for the encounter."; 111 case ADDBED: 112 return "An additional bed made available for a person accompanying the patient, for example a parent accompanying a child."; 113 case INT: 114 return "The patient is not fluent in the local language and requires an interpreter to be available. Refer to the Patient.Language property for the type of interpreter required."; 115 case ATT: 116 return "A person who accompanies a patient to provide assistive services necessary for the patient's care during the encounter."; 117 case DOG: 118 return "The patient has a guide dog and the location used for the encounter should be able to support the presence of the service animal."; 119 case NULL: 120 return null; 121 default: 122 return "?"; 123 } 124 } 125 126 public String getDisplay() { 127 switch (this) { 128 case WHEEL: 129 return "Wheelchair"; 130 case ADDBED: 131 return "Additional bedding"; 132 case INT: 133 return "Interpreter"; 134 case ATT: 135 return "Attendant"; 136 case DOG: 137 return "Guide dog"; 138 case NULL: 139 return null; 140 default: 141 return "?"; 142 } 143 } 144 145}