001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum V3EntityNameUse { 059 060 /** 061 * Identifies the different representations of a name. The representation may affect how the name is used. (E.g. use of Ideographic for formal communications.) 062 */ 063 _NAMEREPRESENTATIONUSE, 064 /** 065 * Alphabetic transcription of name (Japanese: romaji) 066 */ 067 ABC, 068 /** 069 * Ideographic representation of name (e.g., Japanese kanji, Chinese characters) 070 */ 071 IDE, 072 /** 073 * Syllabic transcription of name (e.g., Japanese kana, Korean hangul) 074 */ 075 SYL, 076 /** 077 * A name assigned to a person. Reasons some organizations assign alternate names may include not knowing the person's name, or to maintain anonymity. Some, but not necessarily all, of the name types that people call "alias" may fit into this category. 078 */ 079 ASGN, 080 /** 081 * As recorded on a license, record, certificate, etc. (only if different from legal name) 082 */ 083 C, 084 /** 085 * e.g. Chief Red Cloud 086 */ 087 I, 088 /** 089 * Known as/conventional/the one you use 090 */ 091 L, 092 /** 093 * Definition:The formal name as registered in an official (government) registry, but which name might not be commonly used. Particularly used in countries with a law system based on Napoleonic law. 094 */ 095 OR, 096 /** 097 * A self asserted name that the person is using or has used. 098 */ 099 P, 100 /** 101 * Includes writer's pseudonym, stage name, etc 102 */ 103 A, 104 /** 105 * e.g. Sister Mary Francis, Brother John 106 */ 107 R, 108 /** 109 * A name intended for use in searching or matching. 110 */ 111 SRCH, 112 /** 113 * A name spelled phonetically. 114 115 There are a variety of phonetic spelling algorithms. This code value does not distinguish between these.Discussion: 116 */ 117 PHON, 118 /** 119 * A name spelled according to the SoundEx algorithm. 120 */ 121 SNDX, 122 /** 123 * added to help the parsers 124 */ 125 NULL; 126 public static V3EntityNameUse fromCode(String codeString) throws FHIRException { 127 if (codeString == null || "".equals(codeString)) 128 return null; 129 if ("_NameRepresentationUse".equals(codeString)) 130 return _NAMEREPRESENTATIONUSE; 131 if ("ABC".equals(codeString)) 132 return ABC; 133 if ("IDE".equals(codeString)) 134 return IDE; 135 if ("SYL".equals(codeString)) 136 return SYL; 137 if ("ASGN".equals(codeString)) 138 return ASGN; 139 if ("C".equals(codeString)) 140 return C; 141 if ("I".equals(codeString)) 142 return I; 143 if ("L".equals(codeString)) 144 return L; 145 if ("OR".equals(codeString)) 146 return OR; 147 if ("P".equals(codeString)) 148 return P; 149 if ("A".equals(codeString)) 150 return A; 151 if ("R".equals(codeString)) 152 return R; 153 if ("SRCH".equals(codeString)) 154 return SRCH; 155 if ("PHON".equals(codeString)) 156 return PHON; 157 if ("SNDX".equals(codeString)) 158 return SNDX; 159 throw new FHIRException("Unknown V3EntityNameUse code '"+codeString+"'"); 160 } 161 public String toCode() { 162 switch (this) { 163 case _NAMEREPRESENTATIONUSE: return "_NameRepresentationUse"; 164 case ABC: return "ABC"; 165 case IDE: return "IDE"; 166 case SYL: return "SYL"; 167 case ASGN: return "ASGN"; 168 case C: return "C"; 169 case I: return "I"; 170 case L: return "L"; 171 case OR: return "OR"; 172 case P: return "P"; 173 case A: return "A"; 174 case R: return "R"; 175 case SRCH: return "SRCH"; 176 case PHON: return "PHON"; 177 case SNDX: return "SNDX"; 178 default: return "?"; 179 } 180 } 181 public String getSystem() { 182 return "http://terminology.hl7.org/CodeSystem/v3-EntityNameUse"; 183 } 184 public String getDefinition() { 185 switch (this) { 186 case _NAMEREPRESENTATIONUSE: return "Identifies the different representations of a name. The representation may affect how the name is used. (E.g. use of Ideographic for formal communications.)"; 187 case ABC: return "Alphabetic transcription of name (Japanese: romaji)"; 188 case IDE: return "Ideographic representation of name (e.g., Japanese kanji, Chinese characters)"; 189 case SYL: return "Syllabic transcription of name (e.g., Japanese kana, Korean hangul)"; 190 case ASGN: return "A name assigned to a person. Reasons some organizations assign alternate names may include not knowing the person's name, or to maintain anonymity. Some, but not necessarily all, of the name types that people call \"alias\" may fit into this category."; 191 case C: return "As recorded on a license, record, certificate, etc. (only if different from legal name)"; 192 case I: return "e.g. Chief Red Cloud"; 193 case L: return "Known as/conventional/the one you use"; 194 case OR: return "Definition:The formal name as registered in an official (government) registry, but which name might not be commonly used. Particularly used in countries with a law system based on Napoleonic law."; 195 case P: return "A self asserted name that the person is using or has used."; 196 case A: return "Includes writer's pseudonym, stage name, etc"; 197 case R: return "e.g. Sister Mary Francis, Brother John"; 198 case SRCH: return "A name intended for use in searching or matching."; 199 case PHON: return "A name spelled phonetically.\r\n\n There are a variety of phonetic spelling algorithms. This code value does not distinguish between these.Discussion:"; 200 case SNDX: return "A name spelled according to the SoundEx algorithm."; 201 default: return "?"; 202 } 203 } 204 public String getDisplay() { 205 switch (this) { 206 case _NAMEREPRESENTATIONUSE: return "NameRepresentationUse"; 207 case ABC: return "Alphabetic"; 208 case IDE: return "Ideographic"; 209 case SYL: return "Syllabic"; 210 case ASGN: return "assigned"; 211 case C: return "License"; 212 case I: return "Indigenous/Tribal"; 213 case L: return "Legal"; 214 case OR: return "official registry"; 215 case P: return "pseudonym"; 216 case A: return "Artist/Stage"; 217 case R: return "Religious"; 218 case SRCH: return "search"; 219 case PHON: return "phonetic"; 220 case SNDX: return "Soundex"; 221 default: return "?"; 222 } 223 } 224 225 226} 227