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, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum ResearchStudyStatus {
038
039        /**
040         * Study is opened for accrual.
041         */
042        ACTIVE, 
043        /**
044         * Study is completed prematurely and will not resume; patients are no longer examined nor treated.
045Tagged.
046         */
047        ADMINISTRATIVELYCOMPLETED, 
048        /**
049         * Protocol is approved by the review board.
050         */
051        APPROVED, 
052        /**
053         * Study is closed for accrual; patients can be examined and treated.
054         */
055        CLOSEDTOACCRUAL, 
056        /**
057         * Study is closed to accrual and intervention, i.e. the study is closed to enrollment, all study subjects have completed treatment or intervention but are still being followed according to the primary objective of the study.
058         */
059        CLOSEDTOACCRUALANDINTERVENTION, 
060        /**
061         * Study is closed to accrual and intervention, i.e. the study is closed to enrollment, all study subjects have completed treatment
062or intervention but are still being followed according to the primary objective of the study.
063         */
064        COMPLETED, 
065        /**
066         * Protocol was disapproved by the review board.
067         */
068        DISAPPROVED, 
069        /**
070         * Protocol is submitted to the review board for approval.
071         */
072        INREVIEW, 
073        /**
074         * Study is temporarily closed for accrual; can be potentially resumed in the future; patients can be examined and treated.
075         */
076        TEMPORARILYCLOSEDTOACCRUAL, 
077        /**
078         * Study is temporarily closed for accrual and intervention and potentially can be resumed in the future.
079         */
080        TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION, 
081        /**
082         * Protocol was withdrawn by the lead organization.
083         */
084        WITHDRAWN, 
085        /**
086         * added to help the parsers
087         */
088        NULL;
089        public static ResearchStudyStatus fromCode(String codeString) throws FHIRException {
090            if (codeString == null || "".equals(codeString))
091                return null;
092        if ("active".equals(codeString))
093          return ACTIVE;
094        if ("administratively-completed".equals(codeString))
095          return ADMINISTRATIVELYCOMPLETED;
096        if ("approved".equals(codeString))
097          return APPROVED;
098        if ("closed-to-accrual".equals(codeString))
099          return CLOSEDTOACCRUAL;
100        if ("closed-to-accrual-and-intervention".equals(codeString))
101          return CLOSEDTOACCRUALANDINTERVENTION;
102        if ("completed".equals(codeString))
103          return COMPLETED;
104        if ("disapproved".equals(codeString))
105          return DISAPPROVED;
106        if ("in-review".equals(codeString))
107          return INREVIEW;
108        if ("temporarily-closed-to-accrual".equals(codeString))
109          return TEMPORARILYCLOSEDTOACCRUAL;
110        if ("temporarily-closed-to-accrual-and-intervention".equals(codeString))
111          return TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION;
112        if ("withdrawn".equals(codeString))
113          return WITHDRAWN;
114        throw new FHIRException("Unknown ResearchStudyStatus code '"+codeString+"'");
115        }
116        public String toCode() {
117          switch (this) {
118            case ACTIVE: return "active";
119            case ADMINISTRATIVELYCOMPLETED: return "administratively-completed";
120            case APPROVED: return "approved";
121            case CLOSEDTOACCRUAL: return "closed-to-accrual";
122            case CLOSEDTOACCRUALANDINTERVENTION: return "closed-to-accrual-and-intervention";
123            case COMPLETED: return "completed";
124            case DISAPPROVED: return "disapproved";
125            case INREVIEW: return "in-review";
126            case TEMPORARILYCLOSEDTOACCRUAL: return "temporarily-closed-to-accrual";
127            case TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION: return "temporarily-closed-to-accrual-and-intervention";
128            case WITHDRAWN: return "withdrawn";
129            default: return "?";
130          }
131        }
132        public String getSystem() {
133          return "http://hl7.org/fhir/research-study-status";
134        }
135        public String getDefinition() {
136          switch (this) {
137            case ACTIVE: return "Study is opened for accrual.";
138            case ADMINISTRATIVELYCOMPLETED: return "Study is completed prematurely and will not resume; patients are no longer examined nor treated.\nTagged.";
139            case APPROVED: return "Protocol is approved by the review board.";
140            case CLOSEDTOACCRUAL: return "Study is closed for accrual; patients can be examined and treated.";
141            case CLOSEDTOACCRUALANDINTERVENTION: return "Study is closed to accrual and intervention, i.e. the study is closed to enrollment, all study subjects have completed treatment or intervention but are still being followed according to the primary objective of the study.";
142            case COMPLETED: return "Study is closed to accrual and intervention, i.e. the study is closed to enrollment, all study subjects have completed treatment\nor intervention but are still being followed according to the primary objective of the study.";
143            case DISAPPROVED: return "Protocol was disapproved by the review board.";
144            case INREVIEW: return "Protocol is submitted to the review board for approval.";
145            case TEMPORARILYCLOSEDTOACCRUAL: return "Study is temporarily closed for accrual; can be potentially resumed in the future; patients can be examined and treated.";
146            case TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION: return "Study is temporarily closed for accrual and intervention and potentially can be resumed in the future.";
147            case WITHDRAWN: return "Protocol was withdrawn by the lead organization.";
148            default: return "?";
149          }
150        }
151        public String getDisplay() {
152          switch (this) {
153            case ACTIVE: return "Active";
154            case ADMINISTRATIVELYCOMPLETED: return "Administratively Completed";
155            case APPROVED: return "Approved";
156            case CLOSEDTOACCRUAL: return "Closed to Accrual";
157            case CLOSEDTOACCRUALANDINTERVENTION: return "Closed to Accrual and Intervention";
158            case COMPLETED: return "Completed";
159            case DISAPPROVED: return "Disapproved";
160            case INREVIEW: return "In Review";
161            case TEMPORARILYCLOSEDTOACCRUAL: return "Temporarily Closed to Accrual";
162            case TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION: return "Temporarily Closed to Accrual and Intervention";
163            case WITHDRAWN: return "Withdrawn";
164            default: return "?";
165          }
166    }
167
168
169}
170