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 V3EntityNameUseR2 {
059
060        /**
061         * Description:A name that a person has assumed or has been assumed to them.
062         */
063        ASSUMED, 
064        /**
065         * Description:A name used in a Professional or Business context .  Examples: Continuing to use a maiden name in a professional context, or using a stage performing name (some of these names are also pseudonyms)
066         */
067        A, 
068        /**
069         * Description:Anonymous assigned name (used to protect a persons identity for privacy reasons)
070         */
071        ANON, 
072        /**
073         * Description:e.g .  Chief Red Cloud
074         */
075        I, 
076        /**
077         * Description:A non-official name by which the person is sometimes known.  (This may also be used to record informal names such as a nickname)
078         */
079        P, 
080        /**
081         * Description:A name assumed as part of a religious vocation .  e.g .  Sister Mary Francis, Brother John
082         */
083        R, 
084        /**
085         * Description:Known as/conventional/the one you normally use
086         */
087        C, 
088        /**
089         * Description:A name used prior to marriage.Note that marriage naming customs vary greatly around the world.  This name use is for use by applications that collect and store maiden names.  Though the concept of maiden name is often gender specific, the use of this term is not gender specific.  The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically
090         */
091        M, 
092        /**
093         * Description:Identifies the different representations of a name .  The representation may affect how the name is used .  (E.g .  use of Ideographic for formal communications.)
094         */
095        NAMEREPRESENTATIONUSE, 
096        /**
097         * Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji)
098         */
099        ABC, 
100        /**
101         * Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)
102         */
103        IDE, 
104        /**
105         * Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)
106         */
107        SYL, 
108        /**
109         * Description:This name is no longer in use (note: Names may also carry valid time ranges .  This code is used to cover the situations where it is known that the name is no longer valid, but no particular time range for its use is known)
110         */
111        OLD, 
112        /**
113         * Description:This name should no longer be used when interacting with the person (i.e .  in addition to no longer being used, the name should not be even mentioned when interacting with the person)Note: applications are not required to compare names labeled "Do Not Use" and other names in order to eliminate name parts that are common between the other name and a name labeled "Do Not Use".
114         */
115        DN, 
116        /**
117         * Description:The formal name as registered in an official (government) registry, but which name might not be commonly used .  May correspond to the concept of legal name
118         */
119        OR, 
120        /**
121         * Description:The name as understood by the data enterer, i.e. a close approximation of a phonetic spelling of the name, not based on a phonetic algorithm.
122         */
123        PHON, 
124        /**
125         * Description:A name intended for use in searching or matching.  This is used when the name is incomplete and contains enough details for search matching, but not enough for other uses.
126         */
127        SRCH, 
128        /**
129         * Description:A temporary name.  Note that a name valid time can provide more detailed information.  This may also be used for temporary names assigned at birth or in emergency situations.
130         */
131        T, 
132        /**
133         * added to help the parsers
134         */
135        NULL;
136        public static V3EntityNameUseR2 fromCode(String codeString) throws FHIRException {
137            if (codeString == null || "".equals(codeString))
138                return null;
139        if ("Assumed".equals(codeString))
140          return ASSUMED;
141        if ("A".equals(codeString))
142          return A;
143        if ("ANON".equals(codeString))
144          return ANON;
145        if ("I".equals(codeString))
146          return I;
147        if ("P".equals(codeString))
148          return P;
149        if ("R".equals(codeString))
150          return R;
151        if ("C".equals(codeString))
152          return C;
153        if ("M".equals(codeString))
154          return M;
155        if ("NameRepresentationUse".equals(codeString))
156          return NAMEREPRESENTATIONUSE;
157        if ("ABC".equals(codeString))
158          return ABC;
159        if ("IDE".equals(codeString))
160          return IDE;
161        if ("SYL".equals(codeString))
162          return SYL;
163        if ("OLD".equals(codeString))
164          return OLD;
165        if ("DN".equals(codeString))
166          return DN;
167        if ("OR".equals(codeString))
168          return OR;
169        if ("PHON".equals(codeString))
170          return PHON;
171        if ("SRCH".equals(codeString))
172          return SRCH;
173        if ("T".equals(codeString))
174          return T;
175        throw new FHIRException("Unknown V3EntityNameUseR2 code '"+codeString+"'");
176        }
177        public String toCode() {
178          switch (this) {
179            case ASSUMED: return "Assumed";
180            case A: return "A";
181            case ANON: return "ANON";
182            case I: return "I";
183            case P: return "P";
184            case R: return "R";
185            case C: return "C";
186            case M: return "M";
187            case NAMEREPRESENTATIONUSE: return "NameRepresentationUse";
188            case ABC: return "ABC";
189            case IDE: return "IDE";
190            case SYL: return "SYL";
191            case OLD: return "OLD";
192            case DN: return "DN";
193            case OR: return "OR";
194            case PHON: return "PHON";
195            case SRCH: return "SRCH";
196            case T: return "T";
197            default: return "?";
198          }
199        }
200        public String getSystem() {
201          return "http://terminology.hl7.org/CodeSystem/v3-EntityNameUseR2";
202        }
203        public String getDefinition() {
204          switch (this) {
205            case ASSUMED: return "Description:A name that a person has assumed or has been assumed to them.";
206            case A: return "Description:A name used in a Professional or Business context .  Examples: Continuing to use a maiden name in a professional context, or using a stage performing name (some of these names are also pseudonyms)";
207            case ANON: return "Description:Anonymous assigned name (used to protect a persons identity for privacy reasons)";
208            case I: return "Description:e.g .  Chief Red Cloud";
209            case P: return "Description:A non-official name by which the person is sometimes known.  (This may also be used to record informal names such as a nickname)";
210            case R: return "Description:A name assumed as part of a religious vocation .  e.g .  Sister Mary Francis, Brother John";
211            case C: return "Description:Known as/conventional/the one you normally use";
212            case M: return "Description:A name used prior to marriage.Note that marriage naming customs vary greatly around the world.  This name use is for use by applications that collect and store maiden names.  Though the concept of maiden name is often gender specific, the use of this term is not gender specific.  The use of this term does not imply any particular history for a person's name, nor should the maiden name be determined algorithmically";
213            case NAMEREPRESENTATIONUSE: return "Description:Identifies the different representations of a name .  The representation may affect how the name is used .  (E.g .  use of Ideographic for formal communications.)";
214            case ABC: return "Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji)";
215            case IDE: return "Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)";
216            case SYL: return "Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)";
217            case OLD: return "Description:This name is no longer in use (note: Names may also carry valid time ranges .  This code is used to cover the situations where it is known that the name is no longer valid, but no particular time range for its use is known)";
218            case DN: return "Description:This name should no longer be used when interacting with the person (i.e .  in addition to no longer being used, the name should not be even mentioned when interacting with the person)Note: applications are not required to compare names labeled \"Do Not Use\" and other names in order to eliminate name parts that are common between the other name and a name labeled \"Do Not Use\".";
219            case OR: return "Description:The formal name as registered in an official (government) registry, but which name might not be commonly used .  May correspond to the concept of legal name";
220            case PHON: return "Description:The name as understood by the data enterer, i.e. a close approximation of a phonetic spelling of the name, not based on a phonetic algorithm.";
221            case SRCH: return "Description:A name intended for use in searching or matching.  This is used when the name is incomplete and contains enough details for search matching, but not enough for other uses.";
222            case T: return "Description:A temporary name.  Note that a name valid time can provide more detailed information.  This may also be used for temporary names assigned at birth or in emergency situations.";
223            default: return "?";
224          }
225        }
226        public String getDisplay() {
227          switch (this) {
228            case ASSUMED: return "Assumed";
229            case A: return "business name";
230            case ANON: return "Anonymous";
231            case I: return "Indigenous/Tribal";
232            case P: return "Other/Pseudonym/Alias";
233            case R: return "religious";
234            case C: return "customary";
235            case M: return "maiden name";
236            case NAMEREPRESENTATIONUSE: return "NameRepresentationUse";
237            case ABC: return "alphabetic";
238            case IDE: return "ideographic";
239            case SYL: return "syllabic";
240            case OLD: return "no longer in use";
241            case DN: return "do not use";
242            case OR: return "official registry name";
243            case PHON: return "phonetic";
244            case SRCH: return "search";
245            case T: return "temporary";
246            default: return "?";
247          }
248    }
249
250
251}
252