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 V3ActStatus {
038
039        /**
040         * Encompasses the expected states of an Act, but excludes "nullified" and "obsolete" which represent unusual terminal states for the life-cycle.
041         */
042        NORMAL, 
043        /**
044         * The Act has been terminated prior to the originally intended completion.
045         */
046        ABORTED, 
047        /**
048         * The Act can be performed or is being performed
049         */
050        ACTIVE, 
051        /**
052         * The Act has been abandoned before activation.
053         */
054        CANCELLED, 
055        /**
056         * An Act that has terminated normally after all of its constituents have been performed.
057         */
058        COMPLETED, 
059        /**
060         * An Act that is still in the preparatory stages has been put aside.  No action can occur until the Act is released.
061         */
062        HELD, 
063        /**
064         * An Act that is in the preparatory stages and may not yet be acted upon
065         */
066        NEW, 
067        /**
068         * An Act that has been activated (actions could or have been performed against it), but has been temporarily disabled.  No further action should be taken against it until it is released
069         */
070        SUSPENDED, 
071        /**
072         * This Act instance was created in error and has been 'removed' and is treated as though it never existed.  A record is retained for audit purposes only.
073         */
074        NULLIFIED, 
075        /**
076         * This Act instance has been replaced by a new instance.
077         */
078        OBSOLETE, 
079        /**
080         * added to help the parsers
081         */
082        NULL;
083        public static V3ActStatus fromCode(String codeString) throws FHIRException {
084            if (codeString == null || "".equals(codeString))
085                return null;
086        if ("normal".equals(codeString))
087          return NORMAL;
088        if ("aborted".equals(codeString))
089          return ABORTED;
090        if ("active".equals(codeString))
091          return ACTIVE;
092        if ("cancelled".equals(codeString))
093          return CANCELLED;
094        if ("completed".equals(codeString))
095          return COMPLETED;
096        if ("held".equals(codeString))
097          return HELD;
098        if ("new".equals(codeString))
099          return NEW;
100        if ("suspended".equals(codeString))
101          return SUSPENDED;
102        if ("nullified".equals(codeString))
103          return NULLIFIED;
104        if ("obsolete".equals(codeString))
105          return OBSOLETE;
106        throw new FHIRException("Unknown V3ActStatus code '"+codeString+"'");
107        }
108        public String toCode() {
109          switch (this) {
110            case NORMAL: return "normal";
111            case ABORTED: return "aborted";
112            case ACTIVE: return "active";
113            case CANCELLED: return "cancelled";
114            case COMPLETED: return "completed";
115            case HELD: return "held";
116            case NEW: return "new";
117            case SUSPENDED: return "suspended";
118            case NULLIFIED: return "nullified";
119            case OBSOLETE: return "obsolete";
120            default: return "?";
121          }
122        }
123        public String getSystem() {
124          return "http://hl7.org/fhir/v3/ActStatus";
125        }
126        public String getDefinition() {
127          switch (this) {
128            case NORMAL: return "Encompasses the expected states of an Act, but excludes \"nullified\" and \"obsolete\" which represent unusual terminal states for the life-cycle.";
129            case ABORTED: return "The Act has been terminated prior to the originally intended completion.";
130            case ACTIVE: return "The Act can be performed or is being performed";
131            case CANCELLED: return "The Act has been abandoned before activation.";
132            case COMPLETED: return "An Act that has terminated normally after all of its constituents have been performed.";
133            case HELD: return "An Act that is still in the preparatory stages has been put aside.  No action can occur until the Act is released.";
134            case NEW: return "An Act that is in the preparatory stages and may not yet be acted upon";
135            case SUSPENDED: return "An Act that has been activated (actions could or have been performed against it), but has been temporarily disabled.  No further action should be taken against it until it is released";
136            case NULLIFIED: return "This Act instance was created in error and has been 'removed' and is treated as though it never existed.  A record is retained for audit purposes only.";
137            case OBSOLETE: return "This Act instance has been replaced by a new instance.";
138            default: return "?";
139          }
140        }
141        public String getDisplay() {
142          switch (this) {
143            case NORMAL: return "normal";
144            case ABORTED: return "aborted";
145            case ACTIVE: return "active";
146            case CANCELLED: return "cancelled";
147            case COMPLETED: return "completed";
148            case HELD: return "held";
149            case NEW: return "new";
150            case SUSPENDED: return "suspended";
151            case NULLIFIED: return "nullified";
152            case OBSOLETE: return "obsolete";
153            default: return "?";
154          }
155    }
156
157
158}
159