001package org.hl7.fhir.r4.model.codesystems;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r4
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, 
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this 
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, 
034     this list of conditions and the following disclaimer in the documentation 
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
049  POSSIBILITY OF SUCH DAMAGE.
050  
051*/
052
053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
054
055
056import org.hl7.fhir.exceptions.FHIRException;
057
058public enum V3ActStatus {
059
060        /**
061         * Encompasses the expected states of an Act, but excludes "nullified" and "obsolete" which represent unusual terminal states for the life-cycle.
062         */
063        NORMAL, 
064        /**
065         * The Act has been terminated prior to the originally intended completion.
066         */
067        ABORTED, 
068        /**
069         * The Act can be performed or is being performed
070         */
071        ACTIVE, 
072        /**
073         * The Act has been abandoned before activation.
074         */
075        CANCELLED, 
076        /**
077         * An Act that has terminated normally after all of its constituents have been performed.
078         */
079        COMPLETED, 
080        /**
081         * An Act that is still in the preparatory stages has been put aside.  No action can occur until the Act is released.
082         */
083        HELD, 
084        /**
085         * An Act that is in the preparatory stages and may not yet be acted upon
086         */
087        NEW, 
088        /**
089         * 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
090         */
091        SUSPENDED, 
092        /**
093         * 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.
094         */
095        NULLIFIED, 
096        /**
097         * This Act instance has been replaced by a new instance.
098         */
099        OBSOLETE, 
100        /**
101         * added to help the parsers
102         */
103        NULL;
104        public static V3ActStatus fromCode(String codeString) throws FHIRException {
105            if (codeString == null || "".equals(codeString))
106                return null;
107        if ("normal".equals(codeString))
108          return NORMAL;
109        if ("aborted".equals(codeString))
110          return ABORTED;
111        if ("active".equals(codeString))
112          return ACTIVE;
113        if ("cancelled".equals(codeString))
114          return CANCELLED;
115        if ("completed".equals(codeString))
116          return COMPLETED;
117        if ("held".equals(codeString))
118          return HELD;
119        if ("new".equals(codeString))
120          return NEW;
121        if ("suspended".equals(codeString))
122          return SUSPENDED;
123        if ("nullified".equals(codeString))
124          return NULLIFIED;
125        if ("obsolete".equals(codeString))
126          return OBSOLETE;
127        throw new FHIRException("Unknown V3ActStatus code '"+codeString+"'");
128        }
129        public String toCode() {
130          switch (this) {
131            case NORMAL: return "normal";
132            case ABORTED: return "aborted";
133            case ACTIVE: return "active";
134            case CANCELLED: return "cancelled";
135            case COMPLETED: return "completed";
136            case HELD: return "held";
137            case NEW: return "new";
138            case SUSPENDED: return "suspended";
139            case NULLIFIED: return "nullified";
140            case OBSOLETE: return "obsolete";
141            default: return "?";
142          }
143        }
144        public String getSystem() {
145          return "http://terminology.hl7.org/CodeSystem/v3-ActStatus";
146        }
147        public String getDefinition() {
148          switch (this) {
149            case NORMAL: return "Encompasses the expected states of an Act, but excludes \"nullified\" and \"obsolete\" which represent unusual terminal states for the life-cycle.";
150            case ABORTED: return "The Act has been terminated prior to the originally intended completion.";
151            case ACTIVE: return "The Act can be performed or is being performed";
152            case CANCELLED: return "The Act has been abandoned before activation.";
153            case COMPLETED: return "An Act that has terminated normally after all of its constituents have been performed.";
154            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.";
155            case NEW: return "An Act that is in the preparatory stages and may not yet be acted upon";
156            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";
157            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.";
158            case OBSOLETE: return "This Act instance has been replaced by a new instance.";
159            default: return "?";
160          }
161        }
162        public String getDisplay() {
163          switch (this) {
164            case NORMAL: return "normal";
165            case ABORTED: return "aborted";
166            case ACTIVE: return "active";
167            case CANCELLED: return "cancelled";
168            case COMPLETED: return "completed";
169            case HELD: return "held";
170            case NEW: return "new";
171            case SUSPENDED: return "suspended";
172            case NULLIFIED: return "nullified";
173            case OBSOLETE: return "obsolete";
174            default: return "?";
175          }
176    }
177
178
179}
180