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 ResearchSubjectStatus { 059 060 /** 061 * An identified person that can be considered for inclusion in a study. 062 */ 063 CANDIDATE, 064 /** 065 * A person that has met the eligibility criteria for inclusion in a study. 066 */ 067 ELIGIBLE, 068 /** 069 * 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. 070 */ 071 FOLLOWUP, 072 /** 073 * A person who did not meet one or more criteria required for participation in a study is considered to have failed screening or 074is ineligible for the study. 075 */ 076 INELIGIBLE, 077 /** 078 * A person for whom registration was not completed. 079 */ 080 NOTREGISTERED, 081 /** 082 * A person that has ended their participation on a study either because their treatment/observation is complete or through not 083responding, withdrawal, non-compliance and/or adverse event. 084 */ 085 OFFSTUDY, 086 /** 087 * A person that is enrolled or registered on a study. 088 */ 089 ONSTUDY, 090 /** 091 * The person is receiving the treatment or participating in an activity (e.g. yoga, diet, etc.) that the study is evaluating. 092 */ 093 ONSTUDYINTERVENTION, 094 /** 095 * 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". 096 */ 097 ONSTUDYOBSERVATION, 098 /** 099 * A person is pre-registered for a study. 100 */ 101 PENDINGONSTUDY, 102 /** 103 * A person that is potentially eligible for participation in the study. 104 */ 105 POTENTIALCANDIDATE, 106 /** 107 * A person who is being evaluated for eligibility for a study. 108 */ 109 SCREENING, 110 /** 111 * The person has withdrawn their participation in the study before registration. 112 */ 113 WITHDRAWN, 114 /** 115 * added to help the parsers 116 */ 117 NULL; 118 public static ResearchSubjectStatus fromCode(String codeString) throws FHIRException { 119 if (codeString == null || "".equals(codeString)) 120 return null; 121 if ("candidate".equals(codeString)) 122 return CANDIDATE; 123 if ("eligible".equals(codeString)) 124 return ELIGIBLE; 125 if ("follow-up".equals(codeString)) 126 return FOLLOWUP; 127 if ("ineligible".equals(codeString)) 128 return INELIGIBLE; 129 if ("not-registered".equals(codeString)) 130 return NOTREGISTERED; 131 if ("off-study".equals(codeString)) 132 return OFFSTUDY; 133 if ("on-study".equals(codeString)) 134 return ONSTUDY; 135 if ("on-study-intervention".equals(codeString)) 136 return ONSTUDYINTERVENTION; 137 if ("on-study-observation".equals(codeString)) 138 return ONSTUDYOBSERVATION; 139 if ("pending-on-study".equals(codeString)) 140 return PENDINGONSTUDY; 141 if ("potential-candidate".equals(codeString)) 142 return POTENTIALCANDIDATE; 143 if ("screening".equals(codeString)) 144 return SCREENING; 145 if ("withdrawn".equals(codeString)) 146 return WITHDRAWN; 147 throw new FHIRException("Unknown ResearchSubjectStatus code '"+codeString+"'"); 148 } 149 public String toCode() { 150 switch (this) { 151 case CANDIDATE: return "candidate"; 152 case ELIGIBLE: return "eligible"; 153 case FOLLOWUP: return "follow-up"; 154 case INELIGIBLE: return "ineligible"; 155 case NOTREGISTERED: return "not-registered"; 156 case OFFSTUDY: return "off-study"; 157 case ONSTUDY: return "on-study"; 158 case ONSTUDYINTERVENTION: return "on-study-intervention"; 159 case ONSTUDYOBSERVATION: return "on-study-observation"; 160 case PENDINGONSTUDY: return "pending-on-study"; 161 case POTENTIALCANDIDATE: return "potential-candidate"; 162 case SCREENING: return "screening"; 163 case WITHDRAWN: return "withdrawn"; 164 default: return "?"; 165 } 166 } 167 public String getSystem() { 168 return "http://hl7.org/fhir/research-subject-status"; 169 } 170 public String getDefinition() { 171 switch (this) { 172 case CANDIDATE: return "An identified person that can be considered for inclusion in a study."; 173 case ELIGIBLE: return "A person that has met the eligibility criteria for inclusion in a study."; 174 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."; 175 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."; 176 case NOTREGISTERED: return "A person for whom registration was not completed."; 177 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."; 178 case ONSTUDY: return "A person that is enrolled or registered on a study."; 179 case ONSTUDYINTERVENTION: return "The person is receiving the treatment or participating in an activity (e.g. yoga, diet, etc.) that the study is evaluating."; 180 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\"."; 181 case PENDINGONSTUDY: return "A person is pre-registered for a study."; 182 case POTENTIALCANDIDATE: return "A person that is potentially eligible for participation in the study."; 183 case SCREENING: return "A person who is being evaluated for eligibility for a study."; 184 case WITHDRAWN: return "The person has withdrawn their participation in the study before registration."; 185 default: return "?"; 186 } 187 } 188 public String getDisplay() { 189 switch (this) { 190 case CANDIDATE: return "Candidate"; 191 case ELIGIBLE: return "Eligible"; 192 case FOLLOWUP: return "Follow-up"; 193 case INELIGIBLE: return "Ineligible"; 194 case NOTREGISTERED: return "Not Registered"; 195 case OFFSTUDY: return "Off-study"; 196 case ONSTUDY: return "On-study"; 197 case ONSTUDYINTERVENTION: return "On-study-intervention"; 198 case ONSTUDYOBSERVATION: return "On-study-observation"; 199 case PENDINGONSTUDY: return "Pending on-study"; 200 case POTENTIALCANDIDATE: return "Potential Candidate"; 201 case SCREENING: return "Screening"; 202 case WITHDRAWN: return "Withdrawn"; 203 default: return "?"; 204 } 205 } 206 207 208} 209