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