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