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