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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
033
034import org.hl7.fhir.exceptions.FHIRException;
035
036public enum ResearchStudyPhase {
037
038  /**
039   * Trials without phases (for example, studies of devices or behavioral
040   * interventions).
041   */
042  NA,
043  /**
044   * Designation for optional exploratory trials conducted in accordance with the
045   * United States Food and Drug Administration's (FDA) 2006 Guidance on
046   * Exploratory Investigational New Drug (IND) Studies. Formerly called Phase 0.
047   */
048  EARLYPHASE1,
049  /**
050   * Includes initial studies to determine the metabolism and pharmacologic
051   * actions of drugs in humans, the side effects associated with increasing
052   * doses, and to gain early evidence of effectiveness; may include healthy
053   * participants and/or patients.
054   */
055  PHASE1,
056  /**
057   * Trials that are a combination of phases 1 and 2.
058   */
059  PHASE1PHASE2,
060  /**
061   * Includes controlled clinical studies conducted to evaluate the effectiveness
062   * of the drug for a particular indication or indications in participants with
063   * the disease or condition under study and to determine the common short-term
064   * side effects and risks.
065   */
066  PHASE2,
067  /**
068   * Trials that are a combination of phases 2 and 3.
069   */
070  PHASE2PHASE3,
071  /**
072   * Includes trials conducted after preliminary evidence suggesting effectiveness
073   * of the drug has been obtained, and are intended to gather additional
074   * information to evaluate the overall benefit-risk relationship of the drug.
075   */
076  PHASE3,
077  /**
078   * Studies of FDA-approved drugs to delineate additional information including
079   * the drug's risks, benefits, and optimal use.
080   */
081  PHASE4,
082  /**
083   * added to help the parsers
084   */
085  NULL;
086
087  public static ResearchStudyPhase fromCode(String codeString) throws FHIRException {
088    if (codeString == null || "".equals(codeString))
089      return null;
090    if ("n-a".equals(codeString))
091      return NA;
092    if ("early-phase-1".equals(codeString))
093      return EARLYPHASE1;
094    if ("phase-1".equals(codeString))
095      return PHASE1;
096    if ("phase-1-phase-2".equals(codeString))
097      return PHASE1PHASE2;
098    if ("phase-2".equals(codeString))
099      return PHASE2;
100    if ("phase-2-phase-3".equals(codeString))
101      return PHASE2PHASE3;
102    if ("phase-3".equals(codeString))
103      return PHASE3;
104    if ("phase-4".equals(codeString))
105      return PHASE4;
106    throw new FHIRException("Unknown ResearchStudyPhase code '" + codeString + "'");
107  }
108
109  public String toCode() {
110    switch (this) {
111    case NA:
112      return "n-a";
113    case EARLYPHASE1:
114      return "early-phase-1";
115    case PHASE1:
116      return "phase-1";
117    case PHASE1PHASE2:
118      return "phase-1-phase-2";
119    case PHASE2:
120      return "phase-2";
121    case PHASE2PHASE3:
122      return "phase-2-phase-3";
123    case PHASE3:
124      return "phase-3";
125    case PHASE4:
126      return "phase-4";
127    case NULL:
128      return null;
129    default:
130      return "?";
131    }
132  }
133
134  public String getSystem() {
135    return "http://terminology.hl7.org/CodeSystem/research-study-phase";
136  }
137
138  public String getDefinition() {
139    switch (this) {
140    case NA:
141      return "Trials without phases (for example, studies of devices or behavioral interventions).";
142    case EARLYPHASE1:
143      return "Designation for optional exploratory trials conducted in accordance with the United States Food and Drug Administration's (FDA) 2006 Guidance on Exploratory Investigational New Drug (IND) Studies. Formerly called Phase 0.";
144    case PHASE1:
145      return "Includes initial studies to determine the metabolism and pharmacologic actions of drugs in humans, the side effects associated with increasing doses, and to gain early evidence of effectiveness; may include healthy participants and/or patients.";
146    case PHASE1PHASE2:
147      return "Trials that are a combination of phases 1 and 2.";
148    case PHASE2:
149      return "Includes controlled clinical studies conducted to evaluate the effectiveness of the drug for a particular indication or indications in participants with the disease or condition under study and to determine the common short-term side effects and risks.";
150    case PHASE2PHASE3:
151      return "Trials that are a combination of phases 2 and 3.";
152    case PHASE3:
153      return "Includes trials conducted after preliminary evidence suggesting effectiveness of the drug has been obtained, and are intended to gather additional information to evaluate the overall benefit-risk relationship of the drug.";
154    case PHASE4:
155      return "Studies of FDA-approved drugs to delineate additional information including the drug's risks, benefits, and optimal use.";
156    case NULL:
157      return null;
158    default:
159      return "?";
160    }
161  }
162
163  public String getDisplay() {
164    switch (this) {
165    case NA:
166      return "N/A";
167    case EARLYPHASE1:
168      return "Early Phase 1";
169    case PHASE1:
170      return "Phase 1";
171    case PHASE1PHASE2:
172      return "Phase 1/Phase 2";
173    case PHASE2:
174      return "Phase 2";
175    case PHASE2PHASE3:
176      return "Phase 2/Phase 3";
177    case PHASE3:
178      return "Phase 3";
179    case PHASE4:
180      return "Phase 4";
181    case NULL:
182      return null;
183    default:
184      return "?";
185    }
186  }
187
188}