001package org.hl7.fhir.r4.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum Tldc {
041
042        /**
043         * Design is under development (nascent).
044         */
045        DRAFT, 
046        /**
047         * Design is completed and is being reviewed.
048         */
049        PENDING, 
050        /**
051         * Design has been deemed fit for the intended purpose and is published by the governance group.
052         */
053        ACTIVE, 
054        /**
055         * Design is active, but is under review. The review may result in a change to the design. The change may necessitate a new version to be created. This in turn may result in the prior version of the template to be retired. Alternatively, the review may result in a change to the design that does not require a new version to be created, or it may result in no change to the design at all.
056         */
057        REVIEW, 
058        /**
059         * A drafted design is determined to be erroneous or not fit for intended purpose and is discontinued before ever being published in an active state.
060         */
061        CANCELLED, 
062        /**
063         * A previously drafted design is determined to be erroneous or not fit for intended purpose and is discontinued before ever being published for consideration in a pending state.
064         */
065        REJECTED, 
066        /**
067         * A previously active design is discontinued from use. It should no longer be used for future designs, but for historical purposes may be used to process data previously recorded using this design. A newer design may or may not exist. The design is published in the retired state.
068         */
069        RETIRED, 
070        /**
071         * A design is determined to be erroneous or not fit for the intended purpose and should no longer be used, even for historical purposes. No new designs can be developed for this template. The associated template no longer needs to be published, but if published, is shown in the terminated state.
072         */
073        TERMINATED, 
074        /**
075         * added to help the parsers
076         */
077        NULL;
078        public static Tldc fromCode(String codeString) throws FHIRException {
079            if (codeString == null || "".equals(codeString))
080                return null;
081        if ("draft".equals(codeString))
082          return DRAFT;
083        if ("pending".equals(codeString))
084          return PENDING;
085        if ("active".equals(codeString))
086          return ACTIVE;
087        if ("review".equals(codeString))
088          return REVIEW;
089        if ("cancelled".equals(codeString))
090          return CANCELLED;
091        if ("rejected".equals(codeString))
092          return REJECTED;
093        if ("retired".equals(codeString))
094          return RETIRED;
095        if ("terminated".equals(codeString))
096          return TERMINATED;
097        throw new FHIRException("Unknown Tldc code '"+codeString+"'");
098        }
099        public String toCode() {
100          switch (this) {
101            case DRAFT: return "draft";
102            case PENDING: return "pending";
103            case ACTIVE: return "active";
104            case REVIEW: return "review";
105            case CANCELLED: return "cancelled";
106            case REJECTED: return "rejected";
107            case RETIRED: return "retired";
108            case TERMINATED: return "terminated";
109            default: return "?";
110          }
111        }
112        public String getSystem() {
113          return "urn:oid:2.16.840.1.113883.3.1937.98.5.8";
114        }
115        public String getDefinition() {
116          switch (this) {
117            case DRAFT: return "Design is under development (nascent).";
118            case PENDING: return "Design is completed and is being reviewed.";
119            case ACTIVE: return "Design has been deemed fit for the intended purpose and is published by the governance group.";
120            case REVIEW: return "Design is active, but is under review. The review may result in a change to the design. The change may necessitate a new version to be created. This in turn may result in the prior version of the template to be retired. Alternatively, the review may result in a change to the design that does not require a new version to be created, or it may result in no change to the design at all.";
121            case CANCELLED: return "A drafted design is determined to be erroneous or not fit for intended purpose and is discontinued before ever being published in an active state.";
122            case REJECTED: return "A previously drafted design is determined to be erroneous or not fit for intended purpose and is discontinued before ever being published for consideration in a pending state.";
123            case RETIRED: return "A previously active design is discontinued from use. It should no longer be used for future designs, but for historical purposes may be used to process data previously recorded using this design. A newer design may or may not exist. The design is published in the retired state.";
124            case TERMINATED: return "A design is determined to be erroneous or not fit for the intended purpose and should no longer be used, even for historical purposes. No new designs can be developed for this template. The associated template no longer needs to be published, but if published, is shown in the terminated state.";
125            default: return "?";
126          }
127        }
128        public String getDisplay() {
129          switch (this) {
130            case DRAFT: return "Draft";
131            case PENDING: return "Under pre-publication review";
132            case ACTIVE: return "active";
133            case REVIEW: return "In Review";
134            case CANCELLED: return "Cancelled";
135            case REJECTED: return "Rejected";
136            case RETIRED: return "retired";
137            case TERMINATED: return "Terminated";
138            default: return "?";
139          }
140    }
141
142
143}