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