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