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 Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum V3EntityNameUseR2 {
038
039        /**
040         * Description:A name that a person has assumed or has been assumed to them.
041         */
042        ASSUMED, 
043        /**
044         * 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)
045         */
046        A, 
047        /**
048         * Description:Anonymous assigned name (used to protect a persons identity for privacy reasons)
049         */
050        ANON, 
051        /**
052         * Description:e.g .  Chief Red Cloud
053         */
054        I, 
055        /**
056         * 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)
057         */
058        P, 
059        /**
060         * Description:A name assumed as part of a religious vocation .  e.g .  Sister Mary Francis, Brother John
061         */
062        R, 
063        /**
064         * Description:Known as/conventional/the one you normally use
065         */
066        C, 
067        /**
068         * 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
069         */
070        M, 
071        /**
072         * 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.)
073         */
074        NAMEREPRESENTATIONUSE, 
075        /**
076         * Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji)
077         */
078        ABC, 
079        /**
080         * Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)
081         */
082        IDE, 
083        /**
084         * Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)
085         */
086        SYL, 
087        /**
088         * 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)
089         */
090        OLD, 
091        /**
092         * 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".
093         */
094        DN, 
095        /**
096         * 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
097         */
098        OR, 
099        /**
100         * 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.
101         */
102        PHON, 
103        /**
104         * 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.
105         */
106        SRCH, 
107        /**
108         * 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.
109         */
110        T, 
111        /**
112         * added to help the parsers
113         */
114        NULL;
115        public static V3EntityNameUseR2 fromCode(String codeString) throws FHIRException {
116            if (codeString == null || "".equals(codeString))
117                return null;
118        if ("Assumed".equals(codeString))
119          return ASSUMED;
120        if ("A".equals(codeString))
121          return A;
122        if ("ANON".equals(codeString))
123          return ANON;
124        if ("I".equals(codeString))
125          return I;
126        if ("P".equals(codeString))
127          return P;
128        if ("R".equals(codeString))
129          return R;
130        if ("C".equals(codeString))
131          return C;
132        if ("M".equals(codeString))
133          return M;
134        if ("NameRepresentationUse".equals(codeString))
135          return NAMEREPRESENTATIONUSE;
136        if ("ABC".equals(codeString))
137          return ABC;
138        if ("IDE".equals(codeString))
139          return IDE;
140        if ("SYL".equals(codeString))
141          return SYL;
142        if ("OLD".equals(codeString))
143          return OLD;
144        if ("DN".equals(codeString))
145          return DN;
146        if ("OR".equals(codeString))
147          return OR;
148        if ("PHON".equals(codeString))
149          return PHON;
150        if ("SRCH".equals(codeString))
151          return SRCH;
152        if ("T".equals(codeString))
153          return T;
154        throw new FHIRException("Unknown V3EntityNameUseR2 code '"+codeString+"'");
155        }
156        public String toCode() {
157          switch (this) {
158            case ASSUMED: return "Assumed";
159            case A: return "A";
160            case ANON: return "ANON";
161            case I: return "I";
162            case P: return "P";
163            case R: return "R";
164            case C: return "C";
165            case M: return "M";
166            case NAMEREPRESENTATIONUSE: return "NameRepresentationUse";
167            case ABC: return "ABC";
168            case IDE: return "IDE";
169            case SYL: return "SYL";
170            case OLD: return "OLD";
171            case DN: return "DN";
172            case OR: return "OR";
173            case PHON: return "PHON";
174            case SRCH: return "SRCH";
175            case T: return "T";
176            default: return "?";
177          }
178        }
179        public String getSystem() {
180          return "http://terminology.hl7.org/CodeSystem/v3-EntityNameUseR2";
181        }
182        public String getDefinition() {
183          switch (this) {
184            case ASSUMED: return "Description:A name that a person has assumed or has been assumed to them.";
185            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)";
186            case ANON: return "Description:Anonymous assigned name (used to protect a persons identity for privacy reasons)";
187            case I: return "Description:e.g .  Chief Red Cloud";
188            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)";
189            case R: return "Description:A name assumed as part of a religious vocation .  e.g .  Sister Mary Francis, Brother John";
190            case C: return "Description:Known as/conventional/the one you normally use";
191            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";
192            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.)";
193            case ABC: return "Description:Alphabetic transcription of name in latin alphabet (Japanese: romaji)";
194            case IDE: return "Description:Ideographic representation of name (e.g., Japanese kanji, Chinese characters)";
195            case SYL: return "Description:Syllabic transcription of name (e.g., Japanese kana, Korean hangul)";
196            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)";
197            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\".";
198            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";
199            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.";
200            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.";
201            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.";
202            default: return "?";
203          }
204        }
205        public String getDisplay() {
206          switch (this) {
207            case ASSUMED: return "Assumed";
208            case A: return "business name";
209            case ANON: return "Anonymous";
210            case I: return "Indigenous/Tribal";
211            case P: return "Other/Pseudonym/Alias";
212            case R: return "religious";
213            case C: return "customary";
214            case M: return "maiden name";
215            case NAMEREPRESENTATIONUSE: return "NameRepresentationUse";
216            case ABC: return "alphabetic";
217            case IDE: return "ideographic";
218            case SYL: return "syllabic";
219            case OLD: return "no longer in use";
220            case DN: return "do not use";
221            case OR: return "official registry name";
222            case PHON: return "phonetic";
223            case SRCH: return "search";
224            case T: return "temporary";
225            default: return "?";
226          }
227    }
228
229
230}
231