001package org.hl7.fhir.dstu3.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 Mon, Jan 16, 2017 12:12-0500 for FHIR v1.9.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum ProcedureRequestStatus {
038
039        /**
040         * The request has been proposed.
041         */
042        PROPOSED, 
043        /**
044         * The request is in preliminary form, prior to being requested.
045         */
046        DRAFT, 
047        /**
048         * The request has been placed.
049         */
050        REQUESTED, 
051        /**
052         * The receiving system has received the request but not yet decided whether it will be performed.
053         */
054        RECEIVED, 
055        /**
056         * The receiving system has accepted the request, but work has not yet commenced.
057         */
058        ACCEPTED, 
059        /**
060         * The work to fulfill the request is happening.
061         */
062        INPROGRESS, 
063        /**
064         * The work has been completed, the report(s) released, and no further work is planned.
065         */
066        COMPLETED, 
067        /**
068         * The request has been held by originating system/user request.
069         */
070        SUSPENDED, 
071        /**
072         * The receiving system has declined to fulfill the request.
073         */
074        REJECTED, 
075        /**
076         * The request was attempted, but due to some procedural error, it could not be completed.
077         */
078        ABORTED, 
079        /**
080         * added to help the parsers
081         */
082        NULL;
083        public static ProcedureRequestStatus fromCode(String codeString) throws FHIRException {
084            if (codeString == null || "".equals(codeString))
085                return null;
086        if ("proposed".equals(codeString))
087          return PROPOSED;
088        if ("draft".equals(codeString))
089          return DRAFT;
090        if ("requested".equals(codeString))
091          return REQUESTED;
092        if ("received".equals(codeString))
093          return RECEIVED;
094        if ("accepted".equals(codeString))
095          return ACCEPTED;
096        if ("in-progress".equals(codeString))
097          return INPROGRESS;
098        if ("completed".equals(codeString))
099          return COMPLETED;
100        if ("suspended".equals(codeString))
101          return SUSPENDED;
102        if ("rejected".equals(codeString))
103          return REJECTED;
104        if ("aborted".equals(codeString))
105          return ABORTED;
106        throw new FHIRException("Unknown ProcedureRequestStatus code '"+codeString+"'");
107        }
108        public String toCode() {
109          switch (this) {
110            case PROPOSED: return "proposed";
111            case DRAFT: return "draft";
112            case REQUESTED: return "requested";
113            case RECEIVED: return "received";
114            case ACCEPTED: return "accepted";
115            case INPROGRESS: return "in-progress";
116            case COMPLETED: return "completed";
117            case SUSPENDED: return "suspended";
118            case REJECTED: return "rejected";
119            case ABORTED: return "aborted";
120            default: return "?";
121          }
122        }
123        public String getSystem() {
124          return "http://hl7.org/fhir/procedure-request-status";
125        }
126        public String getDefinition() {
127          switch (this) {
128            case PROPOSED: return "The request has been proposed.";
129            case DRAFT: return "The request is in preliminary form, prior to being requested.";
130            case REQUESTED: return "The request has been placed.";
131            case RECEIVED: return "The receiving system has received the request but not yet decided whether it will be performed.";
132            case ACCEPTED: return "The receiving system has accepted the request, but work has not yet commenced.";
133            case INPROGRESS: return "The work to fulfill the request is happening.";
134            case COMPLETED: return "The work has been completed, the report(s) released, and no further work is planned.";
135            case SUSPENDED: return "The request has been held by originating system/user request.";
136            case REJECTED: return "The receiving system has declined to fulfill the request.";
137            case ABORTED: return "The request was attempted, but due to some procedural error, it could not be completed.";
138            default: return "?";
139          }
140        }
141        public String getDisplay() {
142          switch (this) {
143            case PROPOSED: return "Proposed";
144            case DRAFT: return "Draft";
145            case REQUESTED: return "Requested";
146            case RECEIVED: return "Received";
147            case ACCEPTED: return "Accepted";
148            case INPROGRESS: return "In Progress";
149            case COMPLETED: return "Completed";
150            case SUSPENDED: return "Suspended";
151            case REJECTED: return "Rejected";
152            case ABORTED: return "Aborted";
153            default: return "?";
154          }
155    }
156
157
158}
159