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 V3EntityNamePartType { 037 038 /** 039 * A delimiter has no meaning other than being literally printed in this name 040 * representation. A delimiter has no implicit leading and trailing white space. 041 */ 042 DEL, 043 /** 044 * Family name, this is the name that links to the genealogy. In some cultures 045 * (e.g. Eritrea) the family name of a son is the first name of his father. 046 */ 047 FAM, 048 /** 049 * Given name (don't call it "first name" since this given names do not always 050 * come first) 051 */ 052 GIV, 053 /** 054 * A prefix has a strong association to the immediately following name part. A 055 * prefix has no implicit trailing white space (it has implicit leading white 056 * space though). Note that prefixes can be inverted. 057 */ 058 PFX, 059 /** 060 * Description:A suffix has a strong association to the immediately preceding 061 * name part. A suffix has no implicit leading white space (it has implicit 062 * trailing white space though). Suffices cannot be inverted. 063 */ 064 SFX, 065 /** 066 * added to help the parsers 067 */ 068 NULL; 069 070 public static V3EntityNamePartType fromCode(String codeString) throws FHIRException { 071 if (codeString == null || "".equals(codeString)) 072 return null; 073 if ("DEL".equals(codeString)) 074 return DEL; 075 if ("FAM".equals(codeString)) 076 return FAM; 077 if ("GIV".equals(codeString)) 078 return GIV; 079 if ("PFX".equals(codeString)) 080 return PFX; 081 if ("SFX".equals(codeString)) 082 return SFX; 083 throw new FHIRException("Unknown V3EntityNamePartType code '" + codeString + "'"); 084 } 085 086 public String toCode() { 087 switch (this) { 088 case DEL: 089 return "DEL"; 090 case FAM: 091 return "FAM"; 092 case GIV: 093 return "GIV"; 094 case PFX: 095 return "PFX"; 096 case SFX: 097 return "SFX"; 098 case NULL: 099 return null; 100 default: 101 return "?"; 102 } 103 } 104 105 public String getSystem() { 106 return "http://terminology.hl7.org/CodeSystem/v3-EntityNamePartType"; 107 } 108 109 public String getDefinition() { 110 switch (this) { 111 case DEL: 112 return "A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space."; 113 case FAM: 114 return "Family name, this is the name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father."; 115 case GIV: 116 return "Given name (don't call it \"first name\" since this given names do not always come first)"; 117 case PFX: 118 return "A prefix has a strong association to the immediately following name part. A prefix has no implicit trailing white space (it has implicit leading white space though). Note that prefixes can be inverted."; 119 case SFX: 120 return "Description:A suffix has a strong association to the immediately preceding name part. A suffix has no implicit leading white space (it has implicit trailing white space though). Suffices cannot be inverted."; 121 case NULL: 122 return null; 123 default: 124 return "?"; 125 } 126 } 127 128 public String getDisplay() { 129 switch (this) { 130 case DEL: 131 return "delimiter"; 132 case FAM: 133 return "family"; 134 case GIV: 135 return "given"; 136 case PFX: 137 return "prefix"; 138 case SFX: 139 return "suffix"; 140 case NULL: 141 return null; 142 default: 143 return "?"; 144 } 145 } 146 147}