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 ParameterGroup {
037
038  /**
039   * Haemodynamic Parameter Group - MDC_PGRP_HEMO.
040   */
041  HAEMODYNAMIC,
042  /**
043   * ECG Parameter Group - MDC_PGRP_ECG.
044   */
045  ECG,
046  /**
047   * Respiratory Parameter Group - MDC_PGRP_RESP.
048   */
049  RESPIRATORY,
050  /**
051   * Ventilation Parameter Group - MDC_PGRP_VENT.
052   */
053  VENTILATION,
054  /**
055   * Neurological Parameter Group - MDC_PGRP_NEURO.
056   */
057  NEUROLOGICAL,
058  /**
059   * Drug Delivery Parameter Group - MDC_PGRP_DRUG.
060   */
061  DRUGDELIVERY,
062  /**
063   * Fluid Chemistry Parameter Group - MDC_PGRP_FLUID.
064   */
065  FLUIDCHEMISTRY,
066  /**
067   * Blood Chemistry Parameter Group - MDC_PGRP_BLOOD_CHEM.
068   */
069  BLOODCHEMISTRY,
070  /**
071   * Miscellaneous Parameter Group - MDC_PGRP_MISC.
072   */
073  MISCELLANEOUS,
074  /**
075   * added to help the parsers
076   */
077  NULL;
078
079  public static ParameterGroup fromCode(String codeString) throws FHIRException {
080    if (codeString == null || "".equals(codeString))
081      return null;
082    if ("haemodynamic".equals(codeString))
083      return HAEMODYNAMIC;
084    if ("ecg".equals(codeString))
085      return ECG;
086    if ("respiratory".equals(codeString))
087      return RESPIRATORY;
088    if ("ventilation".equals(codeString))
089      return VENTILATION;
090    if ("neurological".equals(codeString))
091      return NEUROLOGICAL;
092    if ("drug-delivery".equals(codeString))
093      return DRUGDELIVERY;
094    if ("fluid-chemistry".equals(codeString))
095      return FLUIDCHEMISTRY;
096    if ("blood-chemistry".equals(codeString))
097      return BLOODCHEMISTRY;
098    if ("miscellaneous".equals(codeString))
099      return MISCELLANEOUS;
100    throw new FHIRException("Unknown ParameterGroup code '" + codeString + "'");
101  }
102
103  public String toCode() {
104    switch (this) {
105    case HAEMODYNAMIC:
106      return "haemodynamic";
107    case ECG:
108      return "ecg";
109    case RESPIRATORY:
110      return "respiratory";
111    case VENTILATION:
112      return "ventilation";
113    case NEUROLOGICAL:
114      return "neurological";
115    case DRUGDELIVERY:
116      return "drug-delivery";
117    case FLUIDCHEMISTRY:
118      return "fluid-chemistry";
119    case BLOODCHEMISTRY:
120      return "blood-chemistry";
121    case MISCELLANEOUS:
122      return "miscellaneous";
123    case NULL:
124      return null;
125    default:
126      return "?";
127    }
128  }
129
130  public String getSystem() {
131    return "http://terminology.hl7.org/CodeSystem/parameter-group";
132  }
133
134  public String getDefinition() {
135    switch (this) {
136    case HAEMODYNAMIC:
137      return "Haemodynamic Parameter Group - MDC_PGRP_HEMO.";
138    case ECG:
139      return "ECG Parameter Group - MDC_PGRP_ECG.";
140    case RESPIRATORY:
141      return "Respiratory Parameter Group - MDC_PGRP_RESP.";
142    case VENTILATION:
143      return "Ventilation Parameter Group - MDC_PGRP_VENT.";
144    case NEUROLOGICAL:
145      return "Neurological Parameter Group - MDC_PGRP_NEURO.";
146    case DRUGDELIVERY:
147      return "Drug Delivery Parameter Group - MDC_PGRP_DRUG.";
148    case FLUIDCHEMISTRY:
149      return "Fluid Chemistry Parameter Group - MDC_PGRP_FLUID.";
150    case BLOODCHEMISTRY:
151      return "Blood Chemistry Parameter Group - MDC_PGRP_BLOOD_CHEM.";
152    case MISCELLANEOUS:
153      return "Miscellaneous Parameter Group - MDC_PGRP_MISC.";
154    case NULL:
155      return null;
156    default:
157      return "?";
158    }
159  }
160
161  public String getDisplay() {
162    switch (this) {
163    case HAEMODYNAMIC:
164      return "Haemodynamic Parameter Group";
165    case ECG:
166      return "ECG Parameter Group";
167    case RESPIRATORY:
168      return "Respiratory Parameter Group";
169    case VENTILATION:
170      return "Ventilation Parameter Group";
171    case NEUROLOGICAL:
172      return "Neurological Parameter Group";
173    case DRUGDELIVERY:
174      return "Drug Delivery Parameter Group";
175    case FLUIDCHEMISTRY:
176      return "Fluid Chemistry Parameter Group";
177    case BLOODCHEMISTRY:
178      return "Blood Chemistry Parameter Group";
179    case MISCELLANEOUS:
180      return "Miscellaneous Parameter Group";
181    case NULL:
182      return null;
183    default:
184      return "?";
185    }
186  }
187
188}