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 V3ExposureMode { 037 038 /** 039 * Code for the mechanism by which the exposure agent was exchanged or 040 * potentially exchanged by the participants involved in the exposure. 041 */ 042 _EXPOSUREMODE, 043 /** 044 * Description: Communication of an agent from a living subject or environmental 045 * source to a living subject through indirect contact via oral or nasal 046 * inhalation. 047 */ 048 AIRBORNE, 049 /** 050 * Description: Communication of an agent from a living subject or environmental 051 * source to a living subject through direct physical contact. 052 */ 053 CONTACT, 054 /** 055 * Description: Communication of an agent from a food source to a living subject 056 * via oral consumption. 057 */ 058 FOODBORNE, 059 /** 060 * Description: Communication of an agent to a living subject by contact and/or 061 * consumption via an aqueous medium 062 */ 063 WATERBORNE, 064 /** 065 * added to help the parsers 066 */ 067 NULL; 068 069 public static V3ExposureMode fromCode(String codeString) throws FHIRException { 070 if (codeString == null || "".equals(codeString)) 071 return null; 072 if ("_ExposureMode".equals(codeString)) 073 return _EXPOSUREMODE; 074 if ("AIRBORNE".equals(codeString)) 075 return AIRBORNE; 076 if ("CONTACT".equals(codeString)) 077 return CONTACT; 078 if ("FOODBORNE".equals(codeString)) 079 return FOODBORNE; 080 if ("WATERBORNE".equals(codeString)) 081 return WATERBORNE; 082 throw new FHIRException("Unknown V3ExposureMode code '" + codeString + "'"); 083 } 084 085 public String toCode() { 086 switch (this) { 087 case _EXPOSUREMODE: 088 return "_ExposureMode"; 089 case AIRBORNE: 090 return "AIRBORNE"; 091 case CONTACT: 092 return "CONTACT"; 093 case FOODBORNE: 094 return "FOODBORNE"; 095 case WATERBORNE: 096 return "WATERBORNE"; 097 case NULL: 098 return null; 099 default: 100 return "?"; 101 } 102 } 103 104 public String getSystem() { 105 return "http://terminology.hl7.org/CodeSystem/v3-ExposureMode"; 106 } 107 108 public String getDefinition() { 109 switch (this) { 110 case _EXPOSUREMODE: 111 return "Code for the mechanism by which the exposure agent was exchanged or potentially exchanged by the participants involved in the exposure."; 112 case AIRBORNE: 113 return "Description: Communication of an agent from a living subject or environmental source to a living subject through indirect contact via oral or nasal inhalation."; 114 case CONTACT: 115 return "Description: Communication of an agent from a living subject or environmental source to a living subject through direct physical contact."; 116 case FOODBORNE: 117 return "Description: Communication of an agent from a food source to a living subject via oral consumption."; 118 case WATERBORNE: 119 return "Description: Communication of an agent to a living subject by contact and/or consumption via an aqueous medium"; 120 case NULL: 121 return null; 122 default: 123 return "?"; 124 } 125 } 126 127 public String getDisplay() { 128 switch (this) { 129 case _EXPOSUREMODE: 130 return "ExposureMode"; 131 case AIRBORNE: 132 return "airborne"; 133 case CONTACT: 134 return "contact"; 135 case FOODBORNE: 136 return "foodborne"; 137 case WATERBORNE: 138 return "waterborne"; 139 case NULL: 140 return null; 141 default: 142 return "?"; 143 } 144 } 145 146}