001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum ResearchStudyStatus { 059 060 /** 061 * Study is opened for accrual. 062 */ 063 ACTIVE, 064 /** 065 * Study is completed prematurely and will not resume; patients are no longer examined nor treated. 066 */ 067 ADMINISTRATIVELYCOMPLETED, 068 /** 069 * Protocol is approved by the review board. 070 */ 071 APPROVED, 072 /** 073 * Study is closed for accrual; patients can be examined and treated. 074 */ 075 CLOSEDTOACCRUAL, 076 /** 077 * 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. 078 */ 079 CLOSEDTOACCRUALANDINTERVENTION, 080 /** 081 * Study is closed to accrual and intervention, i.e. the study is closed to enrollment, all study subjects have completed treatment 082or intervention but are still being followed according to the primary objective of the study. 083 */ 084 COMPLETED, 085 /** 086 * Protocol was disapproved by the review board. 087 */ 088 DISAPPROVED, 089 /** 090 * Protocol is submitted to the review board for approval. 091 */ 092 INREVIEW, 093 /** 094 * Study is temporarily closed for accrual; can be potentially resumed in the future; patients can be examined and treated. 095 */ 096 TEMPORARILYCLOSEDTOACCRUAL, 097 /** 098 * Study is temporarily closed for accrual and intervention and potentially can be resumed in the future. 099 */ 100 TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION, 101 /** 102 * Protocol was withdrawn by the lead organization. 103 */ 104 WITHDRAWN, 105 /** 106 * added to help the parsers 107 */ 108 NULL; 109 public static ResearchStudyStatus fromCode(String codeString) throws FHIRException { 110 if (codeString == null || "".equals(codeString)) 111 return null; 112 if ("active".equals(codeString)) 113 return ACTIVE; 114 if ("administratively-completed".equals(codeString)) 115 return ADMINISTRATIVELYCOMPLETED; 116 if ("approved".equals(codeString)) 117 return APPROVED; 118 if ("closed-to-accrual".equals(codeString)) 119 return CLOSEDTOACCRUAL; 120 if ("closed-to-accrual-and-intervention".equals(codeString)) 121 return CLOSEDTOACCRUALANDINTERVENTION; 122 if ("completed".equals(codeString)) 123 return COMPLETED; 124 if ("disapproved".equals(codeString)) 125 return DISAPPROVED; 126 if ("in-review".equals(codeString)) 127 return INREVIEW; 128 if ("temporarily-closed-to-accrual".equals(codeString)) 129 return TEMPORARILYCLOSEDTOACCRUAL; 130 if ("temporarily-closed-to-accrual-and-intervention".equals(codeString)) 131 return TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION; 132 if ("withdrawn".equals(codeString)) 133 return WITHDRAWN; 134 throw new FHIRException("Unknown ResearchStudyStatus code '"+codeString+"'"); 135 } 136 public String toCode() { 137 switch (this) { 138 case ACTIVE: return "active"; 139 case ADMINISTRATIVELYCOMPLETED: return "administratively-completed"; 140 case APPROVED: return "approved"; 141 case CLOSEDTOACCRUAL: return "closed-to-accrual"; 142 case CLOSEDTOACCRUALANDINTERVENTION: return "closed-to-accrual-and-intervention"; 143 case COMPLETED: return "completed"; 144 case DISAPPROVED: return "disapproved"; 145 case INREVIEW: return "in-review"; 146 case TEMPORARILYCLOSEDTOACCRUAL: return "temporarily-closed-to-accrual"; 147 case TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION: return "temporarily-closed-to-accrual-and-intervention"; 148 case WITHDRAWN: return "withdrawn"; 149 default: return "?"; 150 } 151 } 152 public String getSystem() { 153 return "http://hl7.org/fhir/research-study-status"; 154 } 155 public String getDefinition() { 156 switch (this) { 157 case ACTIVE: return "Study is opened for accrual."; 158 case ADMINISTRATIVELYCOMPLETED: return "Study is completed prematurely and will not resume; patients are no longer examined nor treated."; 159 case APPROVED: return "Protocol is approved by the review board."; 160 case CLOSEDTOACCRUAL: return "Study is closed for accrual; patients can be examined and treated."; 161 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."; 162 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."; 163 case DISAPPROVED: return "Protocol was disapproved by the review board."; 164 case INREVIEW: return "Protocol is submitted to the review board for approval."; 165 case TEMPORARILYCLOSEDTOACCRUAL: return "Study is temporarily closed for accrual; can be potentially resumed in the future; patients can be examined and treated."; 166 case TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION: return "Study is temporarily closed for accrual and intervention and potentially can be resumed in the future."; 167 case WITHDRAWN: return "Protocol was withdrawn by the lead organization."; 168 default: return "?"; 169 } 170 } 171 public String getDisplay() { 172 switch (this) { 173 case ACTIVE: return "Active"; 174 case ADMINISTRATIVELYCOMPLETED: return "Administratively Completed"; 175 case APPROVED: return "Approved"; 176 case CLOSEDTOACCRUAL: return "Closed to Accrual"; 177 case CLOSEDTOACCRUALANDINTERVENTION: return "Closed to Accrual and Intervention"; 178 case COMPLETED: return "Completed"; 179 case DISAPPROVED: return "Disapproved"; 180 case INREVIEW: return "In Review"; 181 case TEMPORARILYCLOSEDTOACCRUAL: return "Temporarily Closed to Accrual"; 182 case TEMPORARILYCLOSEDTOACCRUALANDINTERVENTION: return "Temporarily Closed to Accrual and Intervention"; 183 case WITHDRAWN: return "Withdrawn"; 184 default: return "?"; 185 } 186 } 187 188 189} 190