001package org.hl7.fhir.dstu2016may.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 Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum NehtaTumourStageGrouping {
041
042        /**
043         * null
044         */
045        _0, 
046        /**
047         * null
048         */
049        I, 
050        /**
051         * null
052         */
053        IIA, 
054        /**
055         * null
056         */
057        IIB, 
058        /**
059         * null
060         */
061        IIC, 
062        /**
063         * null
064         */
065        IIIA, 
066        /**
067         * null
068         */
069        IIIB, 
070        /**
071         * null
072         */
073        IIIC, 
074        /**
075         * null
076         */
077        IVA, 
078        /**
079         * null
080         */
081        IVB, 
082        /**
083         * added to help the parsers
084         */
085        NULL;
086        public static NehtaTumourStageGrouping fromCode(String codeString) throws FHIRException {
087            if (codeString == null || "".equals(codeString))
088                return null;
089        if ("0".equals(codeString))
090          return _0;
091        if ("i".equals(codeString))
092          return I;
093        if ("iia".equals(codeString))
094          return IIA;
095        if ("iib".equals(codeString))
096          return IIB;
097        if ("iic".equals(codeString))
098          return IIC;
099        if ("iiia".equals(codeString))
100          return IIIA;
101        if ("iiib".equals(codeString))
102          return IIIB;
103        if ("iiic".equals(codeString))
104          return IIIC;
105        if ("iva".equals(codeString))
106          return IVA;
107        if ("ivb".equals(codeString))
108          return IVB;
109        throw new FHIRException("Unknown NehtaTumourStageGrouping code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case _0: return "0";
114            case I: return "i";
115            case IIA: return "iia";
116            case IIB: return "iib";
117            case IIC: return "iic";
118            case IIIA: return "iiia";
119            case IIIB: return "iiib";
120            case IIIC: return "iiic";
121            case IVA: return "iva";
122            case IVB: return "ivb";
123            case NULL: return null;
124            default: return "?";
125          }
126        }
127        public String getSystem() {
128          return "http://hl7.org/fhir/tumour-stage-grouping";
129        }
130        public String getDefinition() {
131          switch (this) {
132            case _0: return "";
133            case I: return "";
134            case IIA: return "";
135            case IIB: return "";
136            case IIC: return "";
137            case IIIA: return "";
138            case IIIB: return "";
139            case IIIC: return "";
140            case IVA: return "";
141            case IVB: return "";
142            case NULL: return null;
143            default: return "?";
144          }
145        }
146        public String getDisplay() {
147          switch (this) {
148            case _0: return "0 Tis N0 M0";
149            case I: return "I T1 N0 M0\n  T2 N0 M0";
150            case IIA: return "IIA T3 N0 M0";
151            case IIB: return "IIB T4a N0 M0";
152            case IIC: return "IIC T4b N0 M0";
153            case IIIA: return "IIIA T1-T2 N1/N1c M0\n       T1       N2a        M0";
154            case IIIB: return "IIIB T3-T4a N1/N1c M0\n       T2-T3   N2a        M0\n       T1-T2   N2b        M0";
155            case IIIC: return "IIIC T4a       N2a      M0\n       T3-T4a N2b      M0\n       T4b       N1-N2 M0";
156            case IVA: return "IVA Any T Any N M1a";
157            case IVB: return "IVB Any T Any N M1b";
158            case NULL: return null;
159            default: return "?";
160          }
161    }
162
163
164}