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