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 Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum Tldc {
038
039        /**
040         * Design is under development (nascent).
041         */
042        DRAFT, 
043        /**
044         * Design is completed and is being reviewed.
045         */
046        PENDING, 
047        /**
048         * Design has been deemed fit for the intended purpose and is published by the governance group.
049         */
050        ACTIVE, 
051        /**
052         * 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.
053         */
054        REVIEW, 
055        /**
056         * 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.
057         */
058        CANCELLED, 
059        /**
060         * 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.
061         */
062        REJECTED, 
063        /**
064         * 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.
065         */
066        RETIRED, 
067        /**
068         * 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.
069         */
070        TERMINATED, 
071        /**
072         * added to help the parsers
073         */
074        NULL;
075        public static Tldc fromCode(String codeString) throws FHIRException {
076            if (codeString == null || "".equals(codeString))
077                return null;
078        if ("draft".equals(codeString))
079          return DRAFT;
080        if ("pending".equals(codeString))
081          return PENDING;
082        if ("active".equals(codeString))
083          return ACTIVE;
084        if ("review".equals(codeString))
085          return REVIEW;
086        if ("cancelled".equals(codeString))
087          return CANCELLED;
088        if ("rejected".equals(codeString))
089          return REJECTED;
090        if ("retired".equals(codeString))
091          return RETIRED;
092        if ("terminated".equals(codeString))
093          return TERMINATED;
094        throw new FHIRException("Unknown Tldc code '"+codeString+"'");
095        }
096        public String toCode() {
097          switch (this) {
098            case DRAFT: return "draft";
099            case PENDING: return "pending";
100            case ACTIVE: return "active";
101            case REVIEW: return "review";
102            case CANCELLED: return "cancelled";
103            case REJECTED: return "rejected";
104            case RETIRED: return "retired";
105            case TERMINATED: return "terminated";
106            default: return "?";
107          }
108        }
109        public String getSystem() {
110          return "urn:oid:2.16.840.1.113883.3.1937.98.5.8";
111        }
112        public String getDefinition() {
113          switch (this) {
114            case DRAFT: return "Design is under development (nascent).";
115            case PENDING: return "Design is completed and is being reviewed.";
116            case ACTIVE: return "Design has been deemed fit for the intended purpose and is published by the governance group.";
117            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.";
118            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.";
119            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.";
120            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.";
121            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.";
122            default: return "?";
123          }
124        }
125        public String getDisplay() {
126          switch (this) {
127            case DRAFT: return "Draft";
128            case PENDING: return "Under pre-publication review";
129            case ACTIVE: return "active";
130            case REVIEW: return "In Review";
131            case CANCELLED: return "Cancelled";
132            case REJECTED: return "Rejected";
133            case RETIRED: return "retired";
134            case TERMINATED: return "Terminated";
135            default: return "?";
136          }
137    }
138
139
140}
141