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