001package org.hl7.fhir.r5.model.codesystems;
002
003/*
004 * #%L
005 * org.hl7.fhir.r5
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  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Oct 17, 2019 09:42+1100 for FHIR v4.1.0
053
054
055import org.hl7.fhir.exceptions.FHIRException;
056
057public enum V3TimingEvent {
058
059        /**
060         * before meal (from lat. ante cibus)
061         */
062        AC, 
063        /**
064         * before lunch (from lat. ante cibus diurnus)
065         */
066        ACD, 
067        /**
068         * before breakfast (from lat. ante cibus matutinus)
069         */
070        ACM, 
071        /**
072         * before dinner (from lat. ante cibus vespertinus)
073         */
074        ACV, 
075        /**
076         * Description: meal (from lat. ante cibus)
077         */
078        C, 
079        /**
080         * Description: lunch (from lat. cibus diurnus)
081         */
082        CD, 
083        /**
084         * Description: breakfast (from lat. cibus matutinus)
085         */
086        CM, 
087        /**
088         * Description: dinner (from lat. cibus vespertinus)
089         */
090        CV, 
091        /**
092         * 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.
093         */
094        HS, 
095        /**
096         * between meals (from lat. inter cibus)
097         */
098        IC, 
099        /**
100         * between lunch and dinner
101         */
102        ICD, 
103        /**
104         * between breakfast and lunch
105         */
106        ICM, 
107        /**
108         * between dinner and the hour of sleep
109         */
110        ICV, 
111        /**
112         * after meal (from lat. post cibus)
113         */
114        PC, 
115        /**
116         * after lunch (from lat. post cibus diurnus)
117         */
118        PCD, 
119        /**
120         * after breakfast (from lat. post cibus matutinus)
121         */
122        PCM, 
123        /**
124         * after dinner (from lat. post cibus vespertinus)
125         */
126        PCV, 
127        /**
128         * 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)
129
130                        
131                           Usage Notes: e.g.
132
133                        Take pulse rate on waking in management of thyrotoxicosis.
134
135                        Take BP on waking in management of hypertension
136
137                        Take basal body temperature on waking in establishing date of ovulation
138         */
139        WAKE, 
140        /**
141         * added to help the parsers
142         */
143        NULL;
144        public static V3TimingEvent fromCode(String codeString) throws FHIRException {
145            if (codeString == null || "".equals(codeString))
146                return null;
147        if ("AC".equals(codeString))
148          return AC;
149        if ("ACD".equals(codeString))
150          return ACD;
151        if ("ACM".equals(codeString))
152          return ACM;
153        if ("ACV".equals(codeString))
154          return ACV;
155        if ("C".equals(codeString))
156          return C;
157        if ("CD".equals(codeString))
158          return CD;
159        if ("CM".equals(codeString))
160          return CM;
161        if ("CV".equals(codeString))
162          return CV;
163        if ("HS".equals(codeString))
164          return HS;
165        if ("IC".equals(codeString))
166          return IC;
167        if ("ICD".equals(codeString))
168          return ICD;
169        if ("ICM".equals(codeString))
170          return ICM;
171        if ("ICV".equals(codeString))
172          return ICV;
173        if ("PC".equals(codeString))
174          return PC;
175        if ("PCD".equals(codeString))
176          return PCD;
177        if ("PCM".equals(codeString))
178          return PCM;
179        if ("PCV".equals(codeString))
180          return PCV;
181        if ("WAKE".equals(codeString))
182          return WAKE;
183        throw new FHIRException("Unknown V3TimingEvent code '"+codeString+"'");
184        }
185        public String toCode() {
186          switch (this) {
187            case AC: return "AC";
188            case ACD: return "ACD";
189            case ACM: return "ACM";
190            case ACV: return "ACV";
191            case C: return "C";
192            case CD: return "CD";
193            case CM: return "CM";
194            case CV: return "CV";
195            case HS: return "HS";
196            case IC: return "IC";
197            case ICD: return "ICD";
198            case ICM: return "ICM";
199            case ICV: return "ICV";
200            case PC: return "PC";
201            case PCD: return "PCD";
202            case PCM: return "PCM";
203            case PCV: return "PCV";
204            case WAKE: return "WAKE";
205            default: return "?";
206          }
207        }
208        public String getSystem() {
209          return "http://terminology.hl7.org/CodeSystem/v3-TimingEvent";
210        }
211        public String getDefinition() {
212          switch (this) {
213            case AC: return "before meal (from lat. ante cibus)";
214            case ACD: return "before lunch (from lat. ante cibus diurnus)";
215            case ACM: return "before breakfast (from lat. ante cibus matutinus)";
216            case ACV: return "before dinner (from lat. ante cibus vespertinus)";
217            case C: return "Description: meal (from lat. ante cibus)";
218            case CD: return "Description: lunch (from lat. cibus diurnus)";
219            case CM: return "Description: breakfast (from lat. cibus matutinus)";
220            case CV: return "Description: dinner (from lat. cibus vespertinus)";
221            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.";
222            case IC: return "between meals (from lat. inter cibus)";
223            case ICD: return "between lunch and dinner";
224            case ICM: return "between breakfast and lunch";
225            case ICV: return "between dinner and the hour of sleep";
226            case PC: return "after meal (from lat. post cibus)";
227            case PCD: return "after lunch (from lat. post cibus diurnus)";
228            case PCM: return "after breakfast (from lat. post cibus matutinus)";
229            case PCV: return "after dinner (from lat. post cibus vespertinus)";
230            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";
231            default: return "?";
232          }
233        }
234        public String getDisplay() {
235          switch (this) {
236            case AC: return "AC";
237            case ACD: return "ACD";
238            case ACM: return "ACM";
239            case ACV: return "ACV";
240            case C: return "C";
241            case CD: return "CD";
242            case CM: return "CM";
243            case CV: return "CV";
244            case HS: return "HS";
245            case IC: return "IC";
246            case ICD: return "ICD";
247            case ICM: return "ICM";
248            case ICV: return "ICV";
249            case PC: return "PC";
250            case PCD: return "PCD";
251            case PCM: return "PCM";
252            case PCV: return "PCV";
253            case WAKE: return "WAKE";
254            default: return "?";
255          }
256    }
257
258
259}
260