001package org.hl7.fhir.r4.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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum V3TimingEvent {
041
042        /**
043         * before meal (from lat. ante cibus)
044         */
045        AC, 
046        /**
047         * before lunch (from lat. ante cibus diurnus)
048         */
049        ACD, 
050        /**
051         * before breakfast (from lat. ante cibus matutinus)
052         */
053        ACM, 
054        /**
055         * before dinner (from lat. ante cibus vespertinus)
056         */
057        ACV, 
058        /**
059         * Description: meal (from lat. ante cibus)
060         */
061        C, 
062        /**
063         * Description: lunch (from lat. cibus diurnus)
064         */
065        CD, 
066        /**
067         * Description: breakfast (from lat. cibus matutinus)
068         */
069        CM, 
070        /**
071         * Description: dinner (from lat. cibus vespertinus)
072         */
073        CV, 
074        /**
075         * Description: Prior to beginning a regular period of extended sleep (this would exclude naps).  Note that this might occur at different times of day depending on a person's regular sleep schedule.
076         */
077        HS, 
078        /**
079         * between meals (from lat. inter cibus)
080         */
081        IC, 
082        /**
083         * between lunch and dinner
084         */
085        ICD, 
086        /**
087         * between breakfast and lunch
088         */
089        ICM, 
090        /**
091         * between dinner and the hour of sleep
092         */
093        ICV, 
094        /**
095         * after meal (from lat. post cibus)
096         */
097        PC, 
098        /**
099         * after lunch (from lat. post cibus diurnus)
100         */
101        PCD, 
102        /**
103         * after breakfast (from lat. post cibus matutinus)
104         */
105        PCM, 
106        /**
107         * after dinner (from lat. post cibus vespertinus)
108         */
109        PCV, 
110        /**
111         * Description: Upon waking up from a regular period of sleep, in order to start regular activities (this would exclude waking up from a nap or temporarily waking up during a period of sleep)
112
113                        
114                           Usage Notes: e.g.
115
116                        Take pulse rate on waking in management of thyrotoxicosis.
117
118                        Take BP on waking in management of hypertension
119
120                        Take basal body temperature on waking in establishing date of ovulation
121         */
122        WAKE, 
123        /**
124         * added to help the parsers
125         */
126        NULL;
127        public static V3TimingEvent fromCode(String codeString) throws FHIRException {
128            if (codeString == null || "".equals(codeString))
129                return null;
130        if ("AC".equals(codeString))
131          return AC;
132        if ("ACD".equals(codeString))
133          return ACD;
134        if ("ACM".equals(codeString))
135          return ACM;
136        if ("ACV".equals(codeString))
137          return ACV;
138        if ("C".equals(codeString))
139          return C;
140        if ("CD".equals(codeString))
141          return CD;
142        if ("CM".equals(codeString))
143          return CM;
144        if ("CV".equals(codeString))
145          return CV;
146        if ("HS".equals(codeString))
147          return HS;
148        if ("IC".equals(codeString))
149          return IC;
150        if ("ICD".equals(codeString))
151          return ICD;
152        if ("ICM".equals(codeString))
153          return ICM;
154        if ("ICV".equals(codeString))
155          return ICV;
156        if ("PC".equals(codeString))
157          return PC;
158        if ("PCD".equals(codeString))
159          return PCD;
160        if ("PCM".equals(codeString))
161          return PCM;
162        if ("PCV".equals(codeString))
163          return PCV;
164        if ("WAKE".equals(codeString))
165          return WAKE;
166        throw new FHIRException("Unknown V3TimingEvent code '"+codeString+"'");
167        }
168        public String toCode() {
169          switch (this) {
170            case AC: return "AC";
171            case ACD: return "ACD";
172            case ACM: return "ACM";
173            case ACV: return "ACV";
174            case C: return "C";
175            case CD: return "CD";
176            case CM: return "CM";
177            case CV: return "CV";
178            case HS: return "HS";
179            case IC: return "IC";
180            case ICD: return "ICD";
181            case ICM: return "ICM";
182            case ICV: return "ICV";
183            case PC: return "PC";
184            case PCD: return "PCD";
185            case PCM: return "PCM";
186            case PCV: return "PCV";
187            case WAKE: return "WAKE";
188            default: return "?";
189          }
190        }
191        public String getSystem() {
192          return "http://terminology.hl7.org/CodeSystem/v3-TimingEvent";
193        }
194        public String getDefinition() {
195          switch (this) {
196            case AC: return "before meal (from lat. ante cibus)";
197            case ACD: return "before lunch (from lat. ante cibus diurnus)";
198            case ACM: return "before breakfast (from lat. ante cibus matutinus)";
199            case ACV: return "before dinner (from lat. ante cibus vespertinus)";
200            case C: return "Description: meal (from lat. ante cibus)";
201            case CD: return "Description: lunch (from lat. cibus diurnus)";
202            case CM: return "Description: breakfast (from lat. cibus matutinus)";
203            case CV: return "Description: dinner (from lat. cibus vespertinus)";
204            case HS: return "Description: Prior to beginning a regular period of extended sleep (this would exclude naps).  Note that this might occur at different times of day depending on a person's regular sleep schedule.";
205            case IC: return "between meals (from lat. inter cibus)";
206            case ICD: return "between lunch and dinner";
207            case ICM: return "between breakfast and lunch";
208            case ICV: return "between dinner and the hour of sleep";
209            case PC: return "after meal (from lat. post cibus)";
210            case PCD: return "after lunch (from lat. post cibus diurnus)";
211            case PCM: return "after breakfast (from lat. post cibus matutinus)";
212            case PCV: return "after dinner (from lat. post cibus vespertinus)";
213            case WAKE: return "Description: Upon waking up from a regular period of sleep, in order to start regular activities (this would exclude waking up from a nap or temporarily waking up during a period of sleep)\r\n\n                        \n                           Usage Notes: e.g.\r\n\n                        Take pulse rate on waking in management of thyrotoxicosis.\r\n\n                        Take BP on waking in management of hypertension\r\n\n                        Take basal body temperature on waking in establishing date of ovulation";
214            default: return "?";
215          }
216        }
217        public String getDisplay() {
218          switch (this) {
219            case AC: return "AC";
220            case ACD: return "ACD";
221            case ACM: return "ACM";
222            case ACV: return "ACV";
223            case C: return "C";
224            case CD: return "CD";
225            case CM: return "CM";
226            case CV: return "CV";
227            case HS: return "HS";
228            case IC: return "IC";
229            case ICD: return "ICD";
230            case ICM: return "ICM";
231            case ICV: return "ICV";
232            case PC: return "PC";
233            case PCD: return "PCD";
234            case PCM: return "PCM";
235            case PCV: return "PCV";
236            case WAKE: return "WAKE";
237            default: return "?";
238          }
239    }
240
241
242}