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