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 SynthesisType {
037
038  /**
039   * A meta-analysis of the summary data of estimates from individual studies or
040   * data sets.
041   */
042  STDMA,
043  /**
044   * A meta-analysis of the individual participant data from individual studies or
045   * data sets.
046   */
047  IPDMA,
048  /**
049   * An indirect meta-analysis derived from 2 or more direct comparisons in a
050   * network meta-analysis.
051   */
052  INDIRECTNMA,
053  /**
054   * An composite meta-analysis derived from direct comparisons and indirect
055   * comparisons in a network meta-analysis.
056   */
057  COMBINEDNMA,
058  /**
059   * A range of results across a body of evidence.
060   */
061  RANGE,
062  /**
063   * An approach describing a body of evidence by categorically classifying
064   * individual studies (eg 3 studies showed beneft and 2 studied found no
065   * effect).
066   */
067  CLASSIFICATION,
068  /**
069   * added to help the parsers
070   */
071  NULL;
072
073  public static SynthesisType fromCode(String codeString) throws FHIRException {
074    if (codeString == null || "".equals(codeString))
075      return null;
076    if ("std-MA".equals(codeString))
077      return STDMA;
078    if ("IPD-MA".equals(codeString))
079      return IPDMA;
080    if ("indirect-NMA".equals(codeString))
081      return INDIRECTNMA;
082    if ("combined-NMA".equals(codeString))
083      return COMBINEDNMA;
084    if ("range".equals(codeString))
085      return RANGE;
086    if ("classification".equals(codeString))
087      return CLASSIFICATION;
088    throw new FHIRException("Unknown SynthesisType code '" + codeString + "'");
089  }
090
091  public String toCode() {
092    switch (this) {
093    case STDMA:
094      return "std-MA";
095    case IPDMA:
096      return "IPD-MA";
097    case INDIRECTNMA:
098      return "indirect-NMA";
099    case COMBINEDNMA:
100      return "combined-NMA";
101    case RANGE:
102      return "range";
103    case CLASSIFICATION:
104      return "classification";
105    case NULL:
106      return null;
107    default:
108      return "?";
109    }
110  }
111
112  public String getSystem() {
113    return "http://terminology.hl7.org/CodeSystem/synthesis-type";
114  }
115
116  public String getDefinition() {
117    switch (this) {
118    case STDMA:
119      return "A meta-analysis of the summary data of estimates from individual studies or data sets.";
120    case IPDMA:
121      return "A meta-analysis of the individual participant data from individual studies or data sets.";
122    case INDIRECTNMA:
123      return "An indirect meta-analysis derived from 2 or more direct comparisons in a network meta-analysis.";
124    case COMBINEDNMA:
125      return "An composite meta-analysis derived from direct comparisons and indirect comparisons in a network meta-analysis.";
126    case RANGE:
127      return "A range of results across a body of evidence.";
128    case CLASSIFICATION:
129      return "An approach describing a body of evidence by categorically classifying individual studies (eg 3 studies showed beneft and 2 studied found no effect).";
130    case NULL:
131      return null;
132    default:
133      return "?";
134    }
135  }
136
137  public String getDisplay() {
138    switch (this) {
139    case STDMA:
140      return "summary data meta-analysis";
141    case IPDMA:
142      return "individual patient data meta-analysis";
143    case INDIRECTNMA:
144      return "indirect network meta-analysis";
145    case COMBINEDNMA:
146      return "combined direct plus indirect network meta-analysis";
147    case RANGE:
148      return "range of results";
149    case CLASSIFICATION:
150      return "classifcation of results";
151    case NULL:
152      return null;
153    default:
154      return "?";
155    }
156  }
157
158}