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