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 ExDiagnosistype { 058 059 /** 060 * The diagnosis given as the reason why the patient was admitted to the hospital. 061 */ 062 ADMITTING, 063 /** 064 * A diagnosis made on the basis of medical signs and patient-reported symptoms, rather than diagnostic tests. 065 */ 066 CLINICAL, 067 /** 068 * One of a set of the possible diagnoses that could be connected to the signs, symptoms, and lab findings. 069 */ 070 DIFFERENTIAL, 071 /** 072 * The diagnosis given when the patient is discharged from the hospital. 073 */ 074 DISCHARGE, 075 /** 076 * A diagnosis based significantly on laboratory reports or test results, rather than the physical examination of the patient. 077 */ 078 LABORATORY, 079 /** 080 * A diagnosis which identifies people's responses to situations in their lives, such as a readiness to change or a willingness to accept assistance. 081 */ 082 NURSING, 083 /** 084 * A diagnosis determined prior to birth. 085 */ 086 PRENATAL, 087 /** 088 * The single medical diagnosis that is most relevant to the patient's chief complaint or need for treatment. 089 */ 090 PRINCIPAL, 091 /** 092 * A diagnosis based primarily on the results from medical imaging studies. 093 */ 094 RADIOLOGY, 095 /** 096 * A diagnosis determined using telemedicine techniques. 097 */ 098 REMOTE, 099 /** 100 * The labeling of an illness in a specific historical event using modern knowledge, methods and disease classifications. 101 */ 102 RETROSPECTIVE, 103 /** 104 * A diagnosis determined by the patient. 105 */ 106 SELF, 107 /** 108 * added to help the parsers 109 */ 110 NULL; 111 public static ExDiagnosistype fromCode(String codeString) throws FHIRException { 112 if (codeString == null || "".equals(codeString)) 113 return null; 114 if ("admitting".equals(codeString)) 115 return ADMITTING; 116 if ("clinical".equals(codeString)) 117 return CLINICAL; 118 if ("differential".equals(codeString)) 119 return DIFFERENTIAL; 120 if ("discharge".equals(codeString)) 121 return DISCHARGE; 122 if ("laboratory".equals(codeString)) 123 return LABORATORY; 124 if ("nursing".equals(codeString)) 125 return NURSING; 126 if ("prenatal".equals(codeString)) 127 return PRENATAL; 128 if ("principal".equals(codeString)) 129 return PRINCIPAL; 130 if ("radiology".equals(codeString)) 131 return RADIOLOGY; 132 if ("remote".equals(codeString)) 133 return REMOTE; 134 if ("retrospective".equals(codeString)) 135 return RETROSPECTIVE; 136 if ("self".equals(codeString)) 137 return SELF; 138 throw new FHIRException("Unknown ExDiagnosistype code '"+codeString+"'"); 139 } 140 public String toCode() { 141 switch (this) { 142 case ADMITTING: return "admitting"; 143 case CLINICAL: return "clinical"; 144 case DIFFERENTIAL: return "differential"; 145 case DISCHARGE: return "discharge"; 146 case LABORATORY: return "laboratory"; 147 case NURSING: return "nursing"; 148 case PRENATAL: return "prenatal"; 149 case PRINCIPAL: return "principal"; 150 case RADIOLOGY: return "radiology"; 151 case REMOTE: return "remote"; 152 case RETROSPECTIVE: return "retrospective"; 153 case SELF: return "self"; 154 default: return "?"; 155 } 156 } 157 public String getSystem() { 158 return "http://terminology.hl7.org/CodeSystem/ex-diagnosistype"; 159 } 160 public String getDefinition() { 161 switch (this) { 162 case ADMITTING: return "The diagnosis given as the reason why the patient was admitted to the hospital."; 163 case CLINICAL: return "A diagnosis made on the basis of medical signs and patient-reported symptoms, rather than diagnostic tests."; 164 case DIFFERENTIAL: return "One of a set of the possible diagnoses that could be connected to the signs, symptoms, and lab findings."; 165 case DISCHARGE: return "The diagnosis given when the patient is discharged from the hospital."; 166 case LABORATORY: return "A diagnosis based significantly on laboratory reports or test results, rather than the physical examination of the patient."; 167 case NURSING: return "A diagnosis which identifies people's responses to situations in their lives, such as a readiness to change or a willingness to accept assistance."; 168 case PRENATAL: return "A diagnosis determined prior to birth."; 169 case PRINCIPAL: return "The single medical diagnosis that is most relevant to the patient's chief complaint or need for treatment."; 170 case RADIOLOGY: return "A diagnosis based primarily on the results from medical imaging studies."; 171 case REMOTE: return "A diagnosis determined using telemedicine techniques."; 172 case RETROSPECTIVE: return "The labeling of an illness in a specific historical event using modern knowledge, methods and disease classifications."; 173 case SELF: return "A diagnosis determined by the patient."; 174 default: return "?"; 175 } 176 } 177 public String getDisplay() { 178 switch (this) { 179 case ADMITTING: return "Admitting Diagnosis"; 180 case CLINICAL: return "Clinical Diagnosis"; 181 case DIFFERENTIAL: return "Differential Diagnosis"; 182 case DISCHARGE: return "Discharge Diagnosis"; 183 case LABORATORY: return "Laboratory Diagnosis"; 184 case NURSING: return "Nursing Diagnosis"; 185 case PRENATAL: return "Prenatal Diagnosis"; 186 case PRINCIPAL: return "Principal Diagnosis"; 187 case RADIOLOGY: return "Radiology Diagnosis"; 188 case REMOTE: return "Remote Diagnosis"; 189 case RETROSPECTIVE: return "Retrospective Diagnosis"; 190 case SELF: return "Self Diagnosis"; 191 default: return "?"; 192 } 193 } 194 195 196} 197