001package org.hl7.fhir.dstu3.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 Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum V3EntityNamePartTypeR2 {
041
042        /**
043         * Description:A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space.
044         */
045        DEL, 
046        /**
047         * Description: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.
048         */
049        FAM, 
050        /**
051         * Description:Given name. Note: don't call it "first name" since the given names do not always come first.
052         */
053        GIV, 
054        /**
055         * Description:Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc.
056
057                        
058                           Note:Title name parts include name parts that come after the name such as qualifications, even if they are not always considered to be titles.
059         */
060        TITLE, 
061        /**
062         * added to help the parsers
063         */
064        NULL;
065        public static V3EntityNamePartTypeR2 fromCode(String codeString) throws FHIRException {
066            if (codeString == null || "".equals(codeString))
067                return null;
068        if ("DEL".equals(codeString))
069          return DEL;
070        if ("FAM".equals(codeString))
071          return FAM;
072        if ("GIV".equals(codeString))
073          return GIV;
074        if ("TITLE".equals(codeString))
075          return TITLE;
076        throw new FHIRException("Unknown V3EntityNamePartTypeR2 code '"+codeString+"'");
077        }
078        public String toCode() {
079          switch (this) {
080            case DEL: return "DEL";
081            case FAM: return "FAM";
082            case GIV: return "GIV";
083            case TITLE: return "TITLE";
084            case NULL: return null;
085            default: return "?";
086          }
087        }
088        public String getSystem() {
089          return "http://hl7.org/fhir/v3/EntityNamePartTypeR2";
090        }
091        public String getDefinition() {
092          switch (this) {
093            case DEL: return "Description:A delimiter has no meaning other than being literally printed in this name representation. A delimiter has no implicit leading and trailing white space.";
094            case FAM: return "Description: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.";
095            case GIV: return "Description:Given name. Note: don't call it \"first name\" since the given names do not always come first.";
096            case TITLE: return "Description:Part of the name that is acquired as a title due to academic, legal, employment or nobility status etc.\r\n\n                        \n                           Note:Title name parts include name parts that come after the name such as qualifications, even if they are not always considered to be titles.";
097            case NULL: return null;
098            default: return "?";
099          }
100        }
101        public String getDisplay() {
102          switch (this) {
103            case DEL: return "delimiter";
104            case FAM: return "family";
105            case GIV: return "given";
106            case TITLE: return "title";
107            case NULL: return null;
108            default: return "?";
109          }
110    }
111
112
113}