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 AuditSourceType { 037 038 /** 039 * End-user display device, diagnostic device. 040 */ 041 _1, 042 /** 043 * Data acquisition device or instrument. 044 */ 045 _2, 046 /** 047 * Web Server process or thread. 048 */ 049 _3, 050 /** 051 * Application Server process or thread. 052 */ 053 _4, 054 /** 055 * Database Server process or thread. 056 */ 057 _5, 058 /** 059 * Security server, e.g. a domain controller. 060 */ 061 _6, 062 /** 063 * ISO level 1-3 network component. 064 */ 065 _7, 066 /** 067 * ISO level 4-6 operating software. 068 */ 069 _8, 070 /** 071 * Other kind of device (defined by DICOM, but some other code/system can be 072 * used). 073 */ 074 _9, 075 /** 076 * added to help the parsers 077 */ 078 NULL; 079 080 public static AuditSourceType fromCode(String codeString) throws FHIRException { 081 if (codeString == null || "".equals(codeString)) 082 return null; 083 if ("1".equals(codeString)) 084 return _1; 085 if ("2".equals(codeString)) 086 return _2; 087 if ("3".equals(codeString)) 088 return _3; 089 if ("4".equals(codeString)) 090 return _4; 091 if ("5".equals(codeString)) 092 return _5; 093 if ("6".equals(codeString)) 094 return _6; 095 if ("7".equals(codeString)) 096 return _7; 097 if ("8".equals(codeString)) 098 return _8; 099 if ("9".equals(codeString)) 100 return _9; 101 throw new FHIRException("Unknown AuditSourceType code '" + codeString + "'"); 102 } 103 104 public String toCode() { 105 switch (this) { 106 case _1: 107 return "1"; 108 case _2: 109 return "2"; 110 case _3: 111 return "3"; 112 case _4: 113 return "4"; 114 case _5: 115 return "5"; 116 case _6: 117 return "6"; 118 case _7: 119 return "7"; 120 case _8: 121 return "8"; 122 case _9: 123 return "9"; 124 case NULL: 125 return null; 126 default: 127 return "?"; 128 } 129 } 130 131 public String getSystem() { 132 return "http://terminology.hl7.org/CodeSystem/security-source-type"; 133 } 134 135 public String getDefinition() { 136 switch (this) { 137 case _1: 138 return "End-user display device, diagnostic device."; 139 case _2: 140 return "Data acquisition device or instrument."; 141 case _3: 142 return "Web Server process or thread."; 143 case _4: 144 return "Application Server process or thread."; 145 case _5: 146 return "Database Server process or thread."; 147 case _6: 148 return "Security server, e.g. a domain controller."; 149 case _7: 150 return "ISO level 1-3 network component."; 151 case _8: 152 return "ISO level 4-6 operating software."; 153 case _9: 154 return "Other kind of device (defined by DICOM, but some other code/system can be used)."; 155 case NULL: 156 return null; 157 default: 158 return "?"; 159 } 160 } 161 162 public String getDisplay() { 163 switch (this) { 164 case _1: 165 return "User Device"; 166 case _2: 167 return "Data Interface"; 168 case _3: 169 return "Web Server"; 170 case _4: 171 return "Application Server"; 172 case _5: 173 return "Database Server"; 174 case _6: 175 return "Security Server"; 176 case _7: 177 return "Network Device"; 178 case _8: 179 return "Network Router"; 180 case _9: 181 return "Other"; 182 case NULL: 183 return null; 184 default: 185 return "?"; 186 } 187 } 188 189}