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 ResearchStudyPrimPurpType {
037
038  /**
039   * One or more interventions are being evaluated for treating a disease,
040   * syndrome, or condition.
041   */
042  TREATMENT,
043  /**
044   * One or more interventions are being assessed for preventing the development
045   * of a specific disease or health condition.
046   */
047  PREVENTION,
048  /**
049   * One or more interventions are being evaluated for identifying a disease or
050   * health condition.
051   */
052  DIAGNOSTIC,
053  /**
054   * One or more interventions are evaluated for maximizing comfort, minimizing
055   * side effects, or mitigating against a decline in the participant's health or
056   * function.
057   */
058  SUPPORTIVECARE,
059  /**
060   * One or more interventions are assessed or examined for identifying a
061   * condition, or risk factors for a condition, in people who are not yet known
062   * to have the condition or risk factor.
063   */
064  SCREENING,
065  /**
066   * One or more interventions for evaluating the delivery, processes, management,
067   * organization, or financing of healthcare.
068   */
069  HEALTHSERVICESRESEARCH,
070  /**
071   * One or more interventions for examining the basic mechanism of action (for
072   * example, physiology or biomechanics of an intervention).
073   */
074  BASICSCIENCE,
075  /**
076   * An intervention of a device product is being evaluated to determine the
077   * feasibility of the product or to test a prototype device and not health
078   * outcomes. Such studies are conducted to confirm the design and operating
079   * specifications of a device before beginning a full clinical trial.
080   */
081  DEVICEFEASIBILITY,
082  /**
083   * added to help the parsers
084   */
085  NULL;
086
087  public static ResearchStudyPrimPurpType fromCode(String codeString) throws FHIRException {
088    if (codeString == null || "".equals(codeString))
089      return null;
090    if ("treatment".equals(codeString))
091      return TREATMENT;
092    if ("prevention".equals(codeString))
093      return PREVENTION;
094    if ("diagnostic".equals(codeString))
095      return DIAGNOSTIC;
096    if ("supportive-care".equals(codeString))
097      return SUPPORTIVECARE;
098    if ("screening".equals(codeString))
099      return SCREENING;
100    if ("health-services-research".equals(codeString))
101      return HEALTHSERVICESRESEARCH;
102    if ("basic-science".equals(codeString))
103      return BASICSCIENCE;
104    if ("device-feasibility".equals(codeString))
105      return DEVICEFEASIBILITY;
106    throw new FHIRException("Unknown ResearchStudyPrimPurpType code '" + codeString + "'");
107  }
108
109  public String toCode() {
110    switch (this) {
111    case TREATMENT:
112      return "treatment";
113    case PREVENTION:
114      return "prevention";
115    case DIAGNOSTIC:
116      return "diagnostic";
117    case SUPPORTIVECARE:
118      return "supportive-care";
119    case SCREENING:
120      return "screening";
121    case HEALTHSERVICESRESEARCH:
122      return "health-services-research";
123    case BASICSCIENCE:
124      return "basic-science";
125    case DEVICEFEASIBILITY:
126      return "device-feasibility";
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-prim-purp-type";
136  }
137
138  public String getDefinition() {
139    switch (this) {
140    case TREATMENT:
141      return "One or more interventions are being evaluated for treating a disease, syndrome, or condition.";
142    case PREVENTION:
143      return "One or more interventions are being assessed for preventing the development of a specific disease or health condition.";
144    case DIAGNOSTIC:
145      return "One or more interventions are being evaluated for identifying a disease or health condition.";
146    case SUPPORTIVECARE:
147      return "One or more interventions are evaluated for maximizing comfort, minimizing side effects, or mitigating against a decline in the participant's health or function.";
148    case SCREENING:
149      return "One or more interventions are assessed or examined for identifying a condition, or risk factors for a condition, in people who are not yet known to have the condition or risk factor.";
150    case HEALTHSERVICESRESEARCH:
151      return "One or more interventions for evaluating the delivery, processes, management, organization, or financing of healthcare.";
152    case BASICSCIENCE:
153      return "One or more interventions for examining the basic mechanism of action (for example, physiology or biomechanics of an intervention).";
154    case DEVICEFEASIBILITY:
155      return "An intervention of a device product is being evaluated to determine the feasibility of the product or to test a prototype device and not health outcomes. Such studies are conducted to confirm the design and operating specifications of a device before beginning a full clinical trial.";
156    case NULL:
157      return null;
158    default:
159      return "?";
160    }
161  }
162
163  public String getDisplay() {
164    switch (this) {
165    case TREATMENT:
166      return "Treatment";
167    case PREVENTION:
168      return "Prevention";
169    case DIAGNOSTIC:
170      return "Diagnostic";
171    case SUPPORTIVECARE:
172      return "Supportive Care";
173    case SCREENING:
174      return "Screening";
175    case HEALTHSERVICESRESEARCH:
176      return "Health Services Research";
177    case BASICSCIENCE:
178      return "Basic Science";
179    case DEVICEFEASIBILITY:
180      return "Device Feasibility";
181    case NULL:
182      return null;
183    default:
184      return "?";
185    }
186  }
187
188}