001package org.hl7.fhir.r5.model.codesystems; 002 003/* 004 * #%L 005 * org.hl7.fhir.r5 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 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0 053 054 055import org.hl7.fhir.exceptions.FHIRException; 056 057public enum ResearchSubjectStatus { 058 059 /** 060 * An identified person that can be considered for inclusion in a study. 061 */ 062 CANDIDATE, 063 /** 064 * A person that has met the eligibility criteria for inclusion in a study. 065 */ 066 ELIGIBLE, 067 /** 068 * A person is no longer receiving study intervention and/or being evaluated with tests and procedures according to the protocol, but they are being monitored on a protocol-prescribed schedule. 069 */ 070 FOLLOWUP, 071 /** 072 * A person who did not meet one or more criteria required for participation in a study is considered to have failed screening or 073is ineligible for the study. 074 */ 075 INELIGIBLE, 076 /** 077 * A person for whom registration was not completed. 078 */ 079 NOTREGISTERED, 080 /** 081 * A person that has ended their participation on a study either because their treatment/observation is complete or through not 082responding, withdrawal, non-compliance and/or adverse event. 083 */ 084 OFFSTUDY, 085 /** 086 * A person that is enrolled or registered on a study. 087 */ 088 ONSTUDY, 089 /** 090 * The person is receiving the treatment or participating in an activity (e.g. yoga, diet, etc.) that the study is evaluating. 091 */ 092 ONSTUDYINTERVENTION, 093 /** 094 * The subject is being evaluated via tests and assessments according to the study calendar, but is not receiving any intervention. Note that this state is study-dependent and might not exist in all studies. A synonym for this is "short-term follow-up". 095 */ 096 ONSTUDYOBSERVATION, 097 /** 098 * A person is pre-registered for a study. 099 */ 100 PENDINGONSTUDY, 101 /** 102 * A person that is potentially eligible for participation in the study. 103 */ 104 POTENTIALCANDIDATE, 105 /** 106 * A person who is being evaluated for eligibility for a study. 107 */ 108 SCREENING, 109 /** 110 * The person has withdrawn their participation in the study before registration. 111 */ 112 WITHDRAWN, 113 /** 114 * added to help the parsers 115 */ 116 NULL; 117 public static ResearchSubjectStatus fromCode(String codeString) throws FHIRException { 118 if (codeString == null || "".equals(codeString)) 119 return null; 120 if ("candidate".equals(codeString)) 121 return CANDIDATE; 122 if ("eligible".equals(codeString)) 123 return ELIGIBLE; 124 if ("follow-up".equals(codeString)) 125 return FOLLOWUP; 126 if ("ineligible".equals(codeString)) 127 return INELIGIBLE; 128 if ("not-registered".equals(codeString)) 129 return NOTREGISTERED; 130 if ("off-study".equals(codeString)) 131 return OFFSTUDY; 132 if ("on-study".equals(codeString)) 133 return ONSTUDY; 134 if ("on-study-intervention".equals(codeString)) 135 return ONSTUDYINTERVENTION; 136 if ("on-study-observation".equals(codeString)) 137 return ONSTUDYOBSERVATION; 138 if ("pending-on-study".equals(codeString)) 139 return PENDINGONSTUDY; 140 if ("potential-candidate".equals(codeString)) 141 return POTENTIALCANDIDATE; 142 if ("screening".equals(codeString)) 143 return SCREENING; 144 if ("withdrawn".equals(codeString)) 145 return WITHDRAWN; 146 throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'"); 147 } 148 public String toCode() { 149 switch (this) { 150 case CANDIDATE: return "candidate"; 151 case ELIGIBLE: return "eligible"; 152 case FOLLOWUP: return "follow-up"; 153 case INELIGIBLE: return "ineligible"; 154 case NOTREGISTERED: return "not-registered"; 155 case OFFSTUDY: return "off-study"; 156 case ONSTUDY: return "on-study"; 157 case ONSTUDYINTERVENTION: return "on-study-intervention"; 158 case ONSTUDYOBSERVATION: return "on-study-observation"; 159 case PENDINGONSTUDY: return "pending-on-study"; 160 case POTENTIALCANDIDATE: return "potential-candidate"; 161 case SCREENING: return "screening"; 162 case WITHDRAWN: return "withdrawn"; 163 default: return "?"; 164 } 165 } 166 public String getSystem() { 167 return "http://hl7.org/fhir/research-subject-status"; 168 } 169 public String getDefinition() { 170 switch (this) { 171 case CANDIDATE: return "An identified person that can be considered for inclusion in a study."; 172 case ELIGIBLE: return "A person that has met the eligibility criteria for inclusion in a study."; 173 case FOLLOWUP: return "A person is no longer receiving study intervention and/or being evaluated with tests and procedures according to the protocol, but they are being monitored on a protocol-prescribed schedule."; 174 case INELIGIBLE: return "A person who did not meet one or more criteria required for participation in a study is considered to have failed screening or\nis ineligible for the study."; 175 case NOTREGISTERED: return "A person for whom registration was not completed."; 176 case OFFSTUDY: return "A person that has ended their participation on a study either because their treatment/observation is complete or through not\nresponding, withdrawal, non-compliance and/or adverse event."; 177 case ONSTUDY: return "A person that is enrolled or registered on a study."; 178 case ONSTUDYINTERVENTION: return "The person is receiving the treatment or participating in an activity (e.g. yoga, diet, etc.) that the study is evaluating."; 179 case ONSTUDYOBSERVATION: return "The subject is being evaluated via tests and assessments according to the study calendar, but is not receiving any intervention. Note that this state is study-dependent and might not exist in all studies. A synonym for this is \"short-term follow-up\"."; 180 case PENDINGONSTUDY: return "A person is pre-registered for a study."; 181 case POTENTIALCANDIDATE: return "A person that is potentially eligible for participation in the study."; 182 case SCREENING: return "A person who is being evaluated for eligibility for a study."; 183 case WITHDRAWN: return "The person has withdrawn their participation in the study before registration."; 184 default: return "?"; 185 } 186 } 187 public String getDisplay() { 188 switch (this) { 189 case CANDIDATE: return "Candidate"; 190 case ELIGIBLE: return "Eligible"; 191 case FOLLOWUP: return "Follow-up"; 192 case INELIGIBLE: return "Ineligible"; 193 case NOTREGISTERED: return "Not Registered"; 194 case OFFSTUDY: return "Off-study"; 195 case ONSTUDY: return "On-study"; 196 case ONSTUDYINTERVENTION: return "On-study-intervention"; 197 case ONSTUDYOBSERVATION: return "On-study-observation"; 198 case PENDINGONSTUDY: return "Pending on-study"; 199 case POTENTIALCANDIDATE: return "Potential Candidate"; 200 case SCREENING: return "Screening"; 201 case WITHDRAWN: return "Withdrawn"; 202 default: return "?"; 203 } 204 } 205 206 207} 208