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 Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034 035import org.hl7.fhir.exceptions.FHIRException; 036 037public enum MeasurementPrinciple { 038 039 /** 040 * Measurement principle isn't in the list. 041 */ 042 OTHER, 043 /** 044 * Measurement is done using the chemical principle. 045 */ 046 CHEMICAL, 047 /** 048 * Measurement is done using the electrical principle. 049 */ 050 ELECTRICAL, 051 /** 052 * Measurement is done using the impedance principle. 053 */ 054 IMPEDANCE, 055 /** 056 * Measurement is done using the nuclear principle. 057 */ 058 NUCLEAR, 059 /** 060 * Measurement is done using the optical principle. 061 */ 062 OPTICAL, 063 /** 064 * Measurement is done using the thermal principle. 065 */ 066 THERMAL, 067 /** 068 * Measurement is done using the biological principle. 069 */ 070 BIOLOGICAL, 071 /** 072 * Measurement is done using the mechanical principle. 073 */ 074 MECHANICAL, 075 /** 076 * Measurement is done using the acoustical principle. 077 */ 078 ACOUSTICAL, 079 /** 080 * Measurement is done using the manual principle. 081 */ 082 MANUAL, 083 /** 084 * added to help the parsers 085 */ 086 NULL; 087 public static MeasurementPrinciple fromCode(String codeString) throws FHIRException { 088 if (codeString == null || "".equals(codeString)) 089 return null; 090 if ("other".equals(codeString)) 091 return OTHER; 092 if ("chemical".equals(codeString)) 093 return CHEMICAL; 094 if ("electrical".equals(codeString)) 095 return ELECTRICAL; 096 if ("impedance".equals(codeString)) 097 return IMPEDANCE; 098 if ("nuclear".equals(codeString)) 099 return NUCLEAR; 100 if ("optical".equals(codeString)) 101 return OPTICAL; 102 if ("thermal".equals(codeString)) 103 return THERMAL; 104 if ("biological".equals(codeString)) 105 return BIOLOGICAL; 106 if ("mechanical".equals(codeString)) 107 return MECHANICAL; 108 if ("acoustical".equals(codeString)) 109 return ACOUSTICAL; 110 if ("manual".equals(codeString)) 111 return MANUAL; 112 throw new FHIRException("Unknown MeasurementPrinciple code '"+codeString+"'"); 113 } 114 public String toCode() { 115 switch (this) { 116 case OTHER: return "other"; 117 case CHEMICAL: return "chemical"; 118 case ELECTRICAL: return "electrical"; 119 case IMPEDANCE: return "impedance"; 120 case NUCLEAR: return "nuclear"; 121 case OPTICAL: return "optical"; 122 case THERMAL: return "thermal"; 123 case BIOLOGICAL: return "biological"; 124 case MECHANICAL: return "mechanical"; 125 case ACOUSTICAL: return "acoustical"; 126 case MANUAL: return "manual"; 127 default: return "?"; 128 } 129 } 130 public String getSystem() { 131 return "http://hl7.org/fhir/measurement-principle"; 132 } 133 public String getDefinition() { 134 switch (this) { 135 case OTHER: return "Measurement principle isn't in the list."; 136 case CHEMICAL: return "Measurement is done using the chemical principle."; 137 case ELECTRICAL: return "Measurement is done using the electrical principle."; 138 case IMPEDANCE: return "Measurement is done using the impedance principle."; 139 case NUCLEAR: return "Measurement is done using the nuclear principle."; 140 case OPTICAL: return "Measurement is done using the optical principle."; 141 case THERMAL: return "Measurement is done using the thermal principle."; 142 case BIOLOGICAL: return "Measurement is done using the biological principle."; 143 case MECHANICAL: return "Measurement is done using the mechanical principle."; 144 case ACOUSTICAL: return "Measurement is done using the acoustical principle."; 145 case MANUAL: return "Measurement is done using the manual principle."; 146 default: return "?"; 147 } 148 } 149 public String getDisplay() { 150 switch (this) { 151 case OTHER: return "MSP Other"; 152 case CHEMICAL: return "MSP Chemical"; 153 case ELECTRICAL: return "MSP Electrical"; 154 case IMPEDANCE: return "MSP Impedance"; 155 case NUCLEAR: return "MSP Nuclear"; 156 case OPTICAL: return "MSP Optical"; 157 case THERMAL: return "MSP Thermal"; 158 case BIOLOGICAL: return "MSP Biological"; 159 case MECHANICAL: return "MSP Mechanical"; 160 case ACOUSTICAL: return "MSP Acoustical"; 161 case MANUAL: return "MSP Manual"; 162 default: return "?"; 163 } 164 } 165 166 167} 168