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 Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum DiagnosticReportStatus {
038
039        /**
040         * The existence of the report is registered, but there is nothing yet available.
041         */
042        REGISTERED, 
043        /**
044         * This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified.
045         */
046        PARTIAL, 
047        /**
048         * Verified early results are available, but not all  results are final.
049         */
050        PRELIMINARY, 
051        /**
052         * The report is complete and verified by an authorized person.
053         */
054        FINAL, 
055        /**
056         * Subsequent to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued.
057         */
058        AMENDED, 
059        /**
060         * Subsequent to being final, the report has been modified  to correct an error in the report or referenced results.
061         */
062        CORRECTED, 
063        /**
064         * Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged.
065         */
066        APPENDED, 
067        /**
068         * The report is unavailable because the measurement was not started or not completed (also sometimes called "aborted").
069         */
070        CANCELLED, 
071        /**
072         * The report has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".).
073         */
074        ENTEREDINERROR, 
075        /**
076         * The authoring system does not know which of the status values currently applies to this report. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply although which one is not known.
077         */
078        UNKNOWN, 
079        /**
080         * added to help the parsers
081         */
082        NULL;
083        public static DiagnosticReportStatus fromCode(String codeString) throws FHIRException {
084            if (codeString == null || "".equals(codeString))
085                return null;
086        if ("registered".equals(codeString))
087          return REGISTERED;
088        if ("partial".equals(codeString))
089          return PARTIAL;
090        if ("preliminary".equals(codeString))
091          return PRELIMINARY;
092        if ("final".equals(codeString))
093          return FINAL;
094        if ("amended".equals(codeString))
095          return AMENDED;
096        if ("corrected".equals(codeString))
097          return CORRECTED;
098        if ("appended".equals(codeString))
099          return APPENDED;
100        if ("cancelled".equals(codeString))
101          return CANCELLED;
102        if ("entered-in-error".equals(codeString))
103          return ENTEREDINERROR;
104        if ("unknown".equals(codeString))
105          return UNKNOWN;
106        throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'");
107        }
108        public String toCode() {
109          switch (this) {
110            case REGISTERED: return "registered";
111            case PARTIAL: return "partial";
112            case PRELIMINARY: return "preliminary";
113            case FINAL: return "final";
114            case AMENDED: return "amended";
115            case CORRECTED: return "corrected";
116            case APPENDED: return "appended";
117            case CANCELLED: return "cancelled";
118            case ENTEREDINERROR: return "entered-in-error";
119            case UNKNOWN: return "unknown";
120            default: return "?";
121          }
122        }
123        public String getSystem() {
124          return "http://hl7.org/fhir/diagnostic-report-status";
125        }
126        public String getDefinition() {
127          switch (this) {
128            case REGISTERED: return "The existence of the report is registered, but there is nothing yet available.";
129            case PARTIAL: return "This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified.";
130            case PRELIMINARY: return "Verified early results are available, but not all  results are final.";
131            case FINAL: return "The report is complete and verified by an authorized person.";
132            case AMENDED: return "Subsequent to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued.";
133            case CORRECTED: return "Subsequent to being final, the report has been modified  to correct an error in the report or referenced results.";
134            case APPENDED: return "Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged.";
135            case CANCELLED: return "The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\").";
136            case ENTEREDINERROR: return "The report has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".).";
137            case UNKNOWN: return "The authoring system does not know which of the status values currently applies to this report. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply although which one is not known.";
138            default: return "?";
139          }
140        }
141        public String getDisplay() {
142          switch (this) {
143            case REGISTERED: return "Registered";
144            case PARTIAL: return "Partial";
145            case PRELIMINARY: return "Preliminary";
146            case FINAL: return "Final";
147            case AMENDED: return "Amended";
148            case CORRECTED: return "Corrected";
149            case APPENDED: return "Appended";
150            case CANCELLED: return "Cancelled";
151            case ENTEREDINERROR: return "Entered in Error";
152            case UNKNOWN: return "Unknown";
153            default: return "?";
154          }
155    }
156
157
158}
159