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