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 RequestResourceTypes { 058 059 /** 060 * A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). 061 */ 062 APPOINTMENT, 063 /** 064 * A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. 065 */ 066 APPOINTMENTRESPONSE, 067 /** 068 * Healthcare plan for patient or group. 069 */ 070 CAREPLAN, 071 /** 072 * Claim, Pre-determination or Pre-authorization. 073 */ 074 CLAIM, 075 /** 076 * A request for information to be sent to a receiver. 077 */ 078 COMMUNICATIONREQUEST, 079 /** 080 * Legal Agreement. 081 */ 082 CONTRACT, 083 /** 084 * Medical device request. 085 */ 086 DEVICEREQUEST, 087 /** 088 * Enrollment request. 089 */ 090 ENROLLMENTREQUEST, 091 /** 092 * Guidance or advice relating to an immunization. 093 */ 094 IMMUNIZATIONRECOMMENDATION, 095 /** 096 * Ordering of medication for patient or group. 097 */ 098 MEDICATIONREQUEST, 099 /** 100 * Diet, formula or nutritional supplement request. 101 */ 102 NUTRITIONORDER, 103 /** 104 * A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. 105 */ 106 SERVICEREQUEST, 107 /** 108 * Request for a medication, substance or device. 109 */ 110 SUPPLYREQUEST, 111 /** 112 * A task to be performed. 113 */ 114 TASK, 115 /** 116 * Prescription for vision correction products for a patient. 117 */ 118 VISIONPRESCRIPTION, 119 /** 120 * added to help the parsers 121 */ 122 NULL; 123 public static RequestResourceTypes fromCode(String codeString) throws FHIRException { 124 if (codeString == null || "".equals(codeString)) 125 return null; 126 if ("Appointment".equals(codeString)) 127 return APPOINTMENT; 128 if ("AppointmentResponse".equals(codeString)) 129 return APPOINTMENTRESPONSE; 130 if ("CarePlan".equals(codeString)) 131 return CAREPLAN; 132 if ("Claim".equals(codeString)) 133 return CLAIM; 134 if ("CommunicationRequest".equals(codeString)) 135 return COMMUNICATIONREQUEST; 136 if ("Contract".equals(codeString)) 137 return CONTRACT; 138 if ("DeviceRequest".equals(codeString)) 139 return DEVICEREQUEST; 140 if ("EnrollmentRequest".equals(codeString)) 141 return ENROLLMENTREQUEST; 142 if ("ImmunizationRecommendation".equals(codeString)) 143 return IMMUNIZATIONRECOMMENDATION; 144 if ("MedicationRequest".equals(codeString)) 145 return MEDICATIONREQUEST; 146 if ("NutritionOrder".equals(codeString)) 147 return NUTRITIONORDER; 148 if ("ServiceRequest".equals(codeString)) 149 return SERVICEREQUEST; 150 if ("SupplyRequest".equals(codeString)) 151 return SUPPLYREQUEST; 152 if ("Task".equals(codeString)) 153 return TASK; 154 if ("VisionPrescription".equals(codeString)) 155 return VISIONPRESCRIPTION; 156 throw new FHIRException("Unknown RequestResourceTypes code '"+codeString+"'"); 157 } 158 public String toCode() { 159 switch (this) { 160 case APPOINTMENT: return "Appointment"; 161 case APPOINTMENTRESPONSE: return "AppointmentResponse"; 162 case CAREPLAN: return "CarePlan"; 163 case CLAIM: return "Claim"; 164 case COMMUNICATIONREQUEST: return "CommunicationRequest"; 165 case CONTRACT: return "Contract"; 166 case DEVICEREQUEST: return "DeviceRequest"; 167 case ENROLLMENTREQUEST: return "EnrollmentRequest"; 168 case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; 169 case MEDICATIONREQUEST: return "MedicationRequest"; 170 case NUTRITIONORDER: return "NutritionOrder"; 171 case SERVICEREQUEST: return "ServiceRequest"; 172 case SUPPLYREQUEST: return "SupplyRequest"; 173 case TASK: return "Task"; 174 case VISIONPRESCRIPTION: return "VisionPrescription"; 175 default: return "?"; 176 } 177 } 178 public String getSystem() { 179 return "http://hl7.org/fhir/request-resource-types"; 180 } 181 public String getDefinition() { 182 switch (this) { 183 case APPOINTMENT: return "A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s)."; 184 case APPOINTMENTRESPONSE: return "A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection."; 185 case CAREPLAN: return "Healthcare plan for patient or group."; 186 case CLAIM: return "Claim, Pre-determination or Pre-authorization."; 187 case COMMUNICATIONREQUEST: return "A request for information to be sent to a receiver."; 188 case CONTRACT: return "Legal Agreement."; 189 case DEVICEREQUEST: return "Medical device request."; 190 case ENROLLMENTREQUEST: return "Enrollment request."; 191 case IMMUNIZATIONRECOMMENDATION: return "Guidance or advice relating to an immunization."; 192 case MEDICATIONREQUEST: return "Ordering of medication for patient or group."; 193 case NUTRITIONORDER: return "Diet, formula or nutritional supplement request."; 194 case SERVICEREQUEST: return "A record of a request for service such as diagnostic investigations, treatments, or operations to be performed."; 195 case SUPPLYREQUEST: return "Request for a medication, substance or device."; 196 case TASK: return "A task to be performed."; 197 case VISIONPRESCRIPTION: return "Prescription for vision correction products for a patient."; 198 default: return "?"; 199 } 200 } 201 public String getDisplay() { 202 switch (this) { 203 case APPOINTMENT: return "Appointment"; 204 case APPOINTMENTRESPONSE: return "AppointmentResponse"; 205 case CAREPLAN: return "CarePlan"; 206 case CLAIM: return "Claim"; 207 case COMMUNICATIONREQUEST: return "CommunicationRequest"; 208 case CONTRACT: return "Contract"; 209 case DEVICEREQUEST: return "DeviceRequest"; 210 case ENROLLMENTREQUEST: return "EnrollmentRequest"; 211 case IMMUNIZATIONRECOMMENDATION: return "ImmunizationRecommendation"; 212 case MEDICATIONREQUEST: return "MedicationRequest"; 213 case NUTRITIONORDER: return "NutritionOrder"; 214 case SERVICEREQUEST: return "ServiceRequest"; 215 case SUPPLYREQUEST: return "SupplyRequest"; 216 case TASK: return "Task"; 217 case VISIONPRESCRIPTION: return "VisionPrescription"; 218 default: return "?"; 219 } 220 } 221 222 223} 224