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 FeedingDevice { 059 060 /** 061 * Standard nipple definition: 062 */ 063 STANDARDNIPPLE, 064 /** 065 * Preemie nipple definition: 066 */ 067 PREEMIENIPPLE, 068 /** 069 * Orthodontic nipple definition: 070 */ 071 ORTHONIPPLE, 072 /** 073 * Slow flow nipple definition: 074 */ 075 SLOFLONIPPLE, 076 /** 077 * Middle flow nipple definition: 078 */ 079 MIDFLONIPPLE, 080 /** 081 * Enlarged, cross-cut nipple definition: 082 */ 083 BIGCUTNIPPLE, 084 /** 085 * Haberman bottle definition: 086 */ 087 HABERMANBOTTLE, 088 /** 089 * Sippy cup with valve definition: 090 */ 091 SIPPYVALVE, 092 /** 093 * Sippy cup without valve definition: 094 */ 095 SIPPYNOVALVE, 096 /** 097 * Provale Cup definition: 098 */ 099 PROVALECUP, 100 /** 101 * Glass with lid/sippy cup definition: 102 */ 103 GLASSLID, 104 /** 105 * Double handhold on glass/cup definition: 106 */ 107 HANDHOLDCUP, 108 /** 109 * Rubber matting under tray definition: 110 */ 111 RUBBERMAT, 112 /** 113 * Straw definition: 114 */ 115 STRAW, 116 /** 117 * Nose cup definition: 118 */ 119 NOSECUP, 120 /** 121 * Scoop plate definition: 122 */ 123 SCOOPPLATE, 124 /** 125 * Hand wrap utensil holder definition: 126 */ 127 UTENSILHOLDER, 128 /** 129 * Foam handle utensils definition: 130 */ 131 FOAMHANDLE, 132 /** 133 * Angled utensils definition: 134 */ 135 ANGLEDUTENSIL, 136 /** 137 * Spout cup definition: 138 */ 139 SPOUTCUP, 140 /** 141 * Automated feeding devices definition: 142 */ 143 AUTOFEEDINGDEVICE, 144 /** 145 * Rocker knife definition: 146 */ 147 ROCKERKNIFE, 148 /** 149 * added to help the parsers 150 */ 151 NULL; 152 public static FeedingDevice fromCode(String codeString) throws FHIRException { 153 if (codeString == null || "".equals(codeString)) 154 return null; 155 if ("standard-nipple".equals(codeString)) 156 return STANDARDNIPPLE; 157 if ("preemie-nipple".equals(codeString)) 158 return PREEMIENIPPLE; 159 if ("ortho-nipple".equals(codeString)) 160 return ORTHONIPPLE; 161 if ("sloflo-nipple".equals(codeString)) 162 return SLOFLONIPPLE; 163 if ("midflo-nipple".equals(codeString)) 164 return MIDFLONIPPLE; 165 if ("bigcut-nipple".equals(codeString)) 166 return BIGCUTNIPPLE; 167 if ("haberman-bottle".equals(codeString)) 168 return HABERMANBOTTLE; 169 if ("sippy-valve".equals(codeString)) 170 return SIPPYVALVE; 171 if ("sippy-no-valve".equals(codeString)) 172 return SIPPYNOVALVE; 173 if ("provale-cup".equals(codeString)) 174 return PROVALECUP; 175 if ("glass-lid".equals(codeString)) 176 return GLASSLID; 177 if ("handhold-cup".equals(codeString)) 178 return HANDHOLDCUP; 179 if ("rubber-mat".equals(codeString)) 180 return RUBBERMAT; 181 if ("straw".equals(codeString)) 182 return STRAW; 183 if ("nose-cup".equals(codeString)) 184 return NOSECUP; 185 if ("scoop-plate".equals(codeString)) 186 return SCOOPPLATE; 187 if ("utensil-holder".equals(codeString)) 188 return UTENSILHOLDER; 189 if ("foam-handle".equals(codeString)) 190 return FOAMHANDLE; 191 if ("angled-utensil".equals(codeString)) 192 return ANGLEDUTENSIL; 193 if ("spout-cup".equals(codeString)) 194 return SPOUTCUP; 195 if ("autofeeding-device".equals(codeString)) 196 return AUTOFEEDINGDEVICE; 197 if ("rocker-knife".equals(codeString)) 198 return ROCKERKNIFE; 199 throw new FHIRException("Unknown FeedingDevice code '"+codeString+"'"); 200 } 201 public String toCode() { 202 switch (this) { 203 case STANDARDNIPPLE: return "standard-nipple"; 204 case PREEMIENIPPLE: return "preemie-nipple"; 205 case ORTHONIPPLE: return "ortho-nipple"; 206 case SLOFLONIPPLE: return "sloflo-nipple"; 207 case MIDFLONIPPLE: return "midflo-nipple"; 208 case BIGCUTNIPPLE: return "bigcut-nipple"; 209 case HABERMANBOTTLE: return "haberman-bottle"; 210 case SIPPYVALVE: return "sippy-valve"; 211 case SIPPYNOVALVE: return "sippy-no-valve"; 212 case PROVALECUP: return "provale-cup"; 213 case GLASSLID: return "glass-lid"; 214 case HANDHOLDCUP: return "handhold-cup"; 215 case RUBBERMAT: return "rubber-mat"; 216 case STRAW: return "straw"; 217 case NOSECUP: return "nose-cup"; 218 case SCOOPPLATE: return "scoop-plate"; 219 case UTENSILHOLDER: return "utensil-holder"; 220 case FOAMHANDLE: return "foam-handle"; 221 case ANGLEDUTENSIL: return "angled-utensil"; 222 case SPOUTCUP: return "spout-cup"; 223 case AUTOFEEDINGDEVICE: return "autofeeding-device"; 224 case ROCKERKNIFE: return "rocker-knife"; 225 default: return "?"; 226 } 227 } 228 public String getSystem() { 229 return "http://hl7.org/fhir/feeding-device"; 230 } 231 public String getDefinition() { 232 switch (this) { 233 case STANDARDNIPPLE: return "Standard nipple definition:"; 234 case PREEMIENIPPLE: return "Preemie nipple definition:"; 235 case ORTHONIPPLE: return "Orthodontic nipple definition:"; 236 case SLOFLONIPPLE: return "Slow flow nipple definition:"; 237 case MIDFLONIPPLE: return "Middle flow nipple definition:"; 238 case BIGCUTNIPPLE: return "Enlarged, cross-cut nipple definition:"; 239 case HABERMANBOTTLE: return "Haberman bottle definition:"; 240 case SIPPYVALVE: return "Sippy cup with valve definition:"; 241 case SIPPYNOVALVE: return "Sippy cup without valve definition:"; 242 case PROVALECUP: return "Provale Cup definition:"; 243 case GLASSLID: return "Glass with lid/sippy cup definition:"; 244 case HANDHOLDCUP: return "Double handhold on glass/cup definition:"; 245 case RUBBERMAT: return "Rubber matting under tray definition:"; 246 case STRAW: return "Straw definition:"; 247 case NOSECUP: return "Nose cup definition:"; 248 case SCOOPPLATE: return "Scoop plate definition:"; 249 case UTENSILHOLDER: return "Hand wrap utensil holder definition:"; 250 case FOAMHANDLE: return "Foam handle utensils definition:"; 251 case ANGLEDUTENSIL: return "Angled utensils definition:"; 252 case SPOUTCUP: return "Spout cup definition:"; 253 case AUTOFEEDINGDEVICE: return "Automated feeding devices definition:"; 254 case ROCKERKNIFE: return "Rocker knife definition:"; 255 default: return "?"; 256 } 257 } 258 public String getDisplay() { 259 switch (this) { 260 case STANDARDNIPPLE: return "Standard nipple"; 261 case PREEMIENIPPLE: return "Preemie nipple"; 262 case ORTHONIPPLE: return "Orthodontic nipple"; 263 case SLOFLONIPPLE: return "Slow flow nipple"; 264 case MIDFLONIPPLE: return "Middle flow nipple"; 265 case BIGCUTNIPPLE: return "Enlarged, cross-cut nipple"; 266 case HABERMANBOTTLE: return "Haberman bottle"; 267 case SIPPYVALVE: return "Sippy cup with valve"; 268 case SIPPYNOVALVE: return "Sippy cup without valve"; 269 case PROVALECUP: return "Provale Cup"; 270 case GLASSLID: return "Glass with lid/sippy cup"; 271 case HANDHOLDCUP: return "Double handhold on glass/cup"; 272 case RUBBERMAT: return "Rubber matting under tray"; 273 case STRAW: return "Straw"; 274 case NOSECUP: return "Nose cup"; 275 case SCOOPPLATE: return "Scoop plate"; 276 case UTENSILHOLDER: return "Hand wrap utensil holder"; 277 case FOAMHANDLE: return "Foam handle utensils"; 278 case ANGLEDUTENSIL: return "Angled utensils"; 279 case SPOUTCUP: return "Spout cup"; 280 case AUTOFEEDINGDEVICE: return "Automated feeding devices"; 281 case ROCKERKNIFE: return "Rocker knife"; 282 default: return "?"; 283 } 284 } 285 286 287} 288