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