001package org.hl7.fhir.dstu3.model; 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 Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.exceptions.FHIRFormatError; 046/** 047 * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. 048 */ 049@ResourceDef(name="NutritionOrder", profile="http://hl7.org/fhir/StructureDefinition/NutritionOrder") 050public class NutritionOrder extends DomainResource { 051 052 public enum NutritionOrderStatus { 053 /** 054 * The request has been proposed. 055 */ 056 PROPOSED, 057 /** 058 * The request is in preliminary form prior to being sent. 059 */ 060 DRAFT, 061 /** 062 * The request has been planned. 063 */ 064 PLANNED, 065 /** 066 * The request has been placed. 067 */ 068 REQUESTED, 069 /** 070 * The request is 'actionable', but not all actions that are implied by it have occurred yet. 071 */ 072 ACTIVE, 073 /** 074 * Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called "suspended". 075 */ 076 ONHOLD, 077 /** 078 * All actions that are implied by the order have occurred and no continuation is planned (this will rarely be made explicit). 079 */ 080 COMPLETED, 081 /** 082 * The request has been withdrawn and is no longer actionable. 083 */ 084 CANCELLED, 085 /** 086 * The request was entered in error and voided. 087 */ 088 ENTEREDINERROR, 089 /** 090 * added to help the parsers with the generic types 091 */ 092 NULL; 093 public static NutritionOrderStatus fromCode(String codeString) throws FHIRException { 094 if (codeString == null || "".equals(codeString)) 095 return null; 096 if ("proposed".equals(codeString)) 097 return PROPOSED; 098 if ("draft".equals(codeString)) 099 return DRAFT; 100 if ("planned".equals(codeString)) 101 return PLANNED; 102 if ("requested".equals(codeString)) 103 return REQUESTED; 104 if ("active".equals(codeString)) 105 return ACTIVE; 106 if ("on-hold".equals(codeString)) 107 return ONHOLD; 108 if ("completed".equals(codeString)) 109 return COMPLETED; 110 if ("cancelled".equals(codeString)) 111 return CANCELLED; 112 if ("entered-in-error".equals(codeString)) 113 return ENTEREDINERROR; 114 if (Configuration.isAcceptInvalidEnums()) 115 return null; 116 else 117 throw new FHIRException("Unknown NutritionOrderStatus code '"+codeString+"'"); 118 } 119 public String toCode() { 120 switch (this) { 121 case PROPOSED: return "proposed"; 122 case DRAFT: return "draft"; 123 case PLANNED: return "planned"; 124 case REQUESTED: return "requested"; 125 case ACTIVE: return "active"; 126 case ONHOLD: return "on-hold"; 127 case COMPLETED: return "completed"; 128 case CANCELLED: return "cancelled"; 129 case ENTEREDINERROR: return "entered-in-error"; 130 default: return "?"; 131 } 132 } 133 public String getSystem() { 134 switch (this) { 135 case PROPOSED: return "http://hl7.org/fhir/nutrition-request-status"; 136 case DRAFT: return "http://hl7.org/fhir/nutrition-request-status"; 137 case PLANNED: return "http://hl7.org/fhir/nutrition-request-status"; 138 case REQUESTED: return "http://hl7.org/fhir/nutrition-request-status"; 139 case ACTIVE: return "http://hl7.org/fhir/nutrition-request-status"; 140 case ONHOLD: return "http://hl7.org/fhir/nutrition-request-status"; 141 case COMPLETED: return "http://hl7.org/fhir/nutrition-request-status"; 142 case CANCELLED: return "http://hl7.org/fhir/nutrition-request-status"; 143 case ENTEREDINERROR: return "http://hl7.org/fhir/nutrition-request-status"; 144 default: return "?"; 145 } 146 } 147 public String getDefinition() { 148 switch (this) { 149 case PROPOSED: return "The request has been proposed."; 150 case DRAFT: return "The request is in preliminary form prior to being sent."; 151 case PLANNED: return "The request has been planned."; 152 case REQUESTED: return "The request has been placed."; 153 case ACTIVE: return "The request is 'actionable', but not all actions that are implied by it have occurred yet."; 154 case ONHOLD: return "Actions implied by the request have been temporarily halted, but are expected to continue later. May also be called \"suspended\"."; 155 case COMPLETED: return "All actions that are implied by the order have occurred and no continuation is planned (this will rarely be made explicit)."; 156 case CANCELLED: return "The request has been withdrawn and is no longer actionable."; 157 case ENTEREDINERROR: return "The request was entered in error and voided."; 158 default: return "?"; 159 } 160 } 161 public String getDisplay() { 162 switch (this) { 163 case PROPOSED: return "Proposed"; 164 case DRAFT: return "Draft"; 165 case PLANNED: return "Planned"; 166 case REQUESTED: return "Requested"; 167 case ACTIVE: return "Active"; 168 case ONHOLD: return "On-Hold"; 169 case COMPLETED: return "Completed"; 170 case CANCELLED: return "Cancelled"; 171 case ENTEREDINERROR: return "Entered in Error"; 172 default: return "?"; 173 } 174 } 175 } 176 177 public static class NutritionOrderStatusEnumFactory implements EnumFactory<NutritionOrderStatus> { 178 public NutritionOrderStatus fromCode(String codeString) throws IllegalArgumentException { 179 if (codeString == null || "".equals(codeString)) 180 if (codeString == null || "".equals(codeString)) 181 return null; 182 if ("proposed".equals(codeString)) 183 return NutritionOrderStatus.PROPOSED; 184 if ("draft".equals(codeString)) 185 return NutritionOrderStatus.DRAFT; 186 if ("planned".equals(codeString)) 187 return NutritionOrderStatus.PLANNED; 188 if ("requested".equals(codeString)) 189 return NutritionOrderStatus.REQUESTED; 190 if ("active".equals(codeString)) 191 return NutritionOrderStatus.ACTIVE; 192 if ("on-hold".equals(codeString)) 193 return NutritionOrderStatus.ONHOLD; 194 if ("completed".equals(codeString)) 195 return NutritionOrderStatus.COMPLETED; 196 if ("cancelled".equals(codeString)) 197 return NutritionOrderStatus.CANCELLED; 198 if ("entered-in-error".equals(codeString)) 199 return NutritionOrderStatus.ENTEREDINERROR; 200 throw new IllegalArgumentException("Unknown NutritionOrderStatus code '"+codeString+"'"); 201 } 202 public Enumeration<NutritionOrderStatus> fromType(Base code) throws FHIRException { 203 if (code == null) 204 return null; 205 if (code.isEmpty()) 206 return new Enumeration<NutritionOrderStatus>(this); 207 String codeString = ((PrimitiveType) code).asStringValue(); 208 if (codeString == null || "".equals(codeString)) 209 return null; 210 if ("proposed".equals(codeString)) 211 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.PROPOSED); 212 if ("draft".equals(codeString)) 213 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.DRAFT); 214 if ("planned".equals(codeString)) 215 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.PLANNED); 216 if ("requested".equals(codeString)) 217 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.REQUESTED); 218 if ("active".equals(codeString)) 219 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.ACTIVE); 220 if ("on-hold".equals(codeString)) 221 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.ONHOLD); 222 if ("completed".equals(codeString)) 223 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.COMPLETED); 224 if ("cancelled".equals(codeString)) 225 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.CANCELLED); 226 if ("entered-in-error".equals(codeString)) 227 return new Enumeration<NutritionOrderStatus>(this, NutritionOrderStatus.ENTEREDINERROR); 228 throw new FHIRException("Unknown NutritionOrderStatus code '"+codeString+"'"); 229 } 230 public String toCode(NutritionOrderStatus code) { 231 if (code == NutritionOrderStatus.PROPOSED) 232 return "proposed"; 233 if (code == NutritionOrderStatus.DRAFT) 234 return "draft"; 235 if (code == NutritionOrderStatus.PLANNED) 236 return "planned"; 237 if (code == NutritionOrderStatus.REQUESTED) 238 return "requested"; 239 if (code == NutritionOrderStatus.ACTIVE) 240 return "active"; 241 if (code == NutritionOrderStatus.ONHOLD) 242 return "on-hold"; 243 if (code == NutritionOrderStatus.COMPLETED) 244 return "completed"; 245 if (code == NutritionOrderStatus.CANCELLED) 246 return "cancelled"; 247 if (code == NutritionOrderStatus.ENTEREDINERROR) 248 return "entered-in-error"; 249 return "?"; 250 } 251 public String toSystem(NutritionOrderStatus code) { 252 return code.getSystem(); 253 } 254 } 255 256 @Block() 257 public static class NutritionOrderOralDietComponent extends BackboneElement implements IBaseBackboneElement { 258 /** 259 * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet. 260 */ 261 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 262 @Description(shortDefinition="Type of oral diet or diet restrictions that describe what can be consumed orally", formalDefinition="The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet." ) 263 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diet-type") 264 protected List<CodeableConcept> type; 265 266 /** 267 * The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present. 268 */ 269 @Child(name = "schedule", type = {Timing.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 270 @Description(shortDefinition="Scheduled frequency of diet", formalDefinition="The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present." ) 271 protected List<Timing> schedule; 272 273 /** 274 * Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet. 275 */ 276 @Child(name = "nutrient", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 277 @Description(shortDefinition="Required nutrient modifications", formalDefinition="Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet." ) 278 protected List<NutritionOrderOralDietNutrientComponent> nutrient; 279 280 /** 281 * Class that describes any texture modifications required for the patient to safely consume various types of solid foods. 282 */ 283 @Child(name = "texture", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 284 @Description(shortDefinition="Required texture modifications", formalDefinition="Class that describes any texture modifications required for the patient to safely consume various types of solid foods." ) 285 protected List<NutritionOrderOralDietTextureComponent> texture; 286 287 /** 288 * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient. 289 */ 290 @Child(name = "fluidConsistencyType", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 291 @Description(shortDefinition="The required consistency of fluids and liquids provided to the patient", formalDefinition="The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient." ) 292 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consistency-type") 293 protected List<CodeableConcept> fluidConsistencyType; 294 295 /** 296 * Free text or additional instructions or information pertaining to the oral diet. 297 */ 298 @Child(name = "instruction", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 299 @Description(shortDefinition="Instructions or additional information about the oral diet", formalDefinition="Free text or additional instructions or information pertaining to the oral diet." ) 300 protected StringType instruction; 301 302 private static final long serialVersionUID = 973058412L; 303 304 /** 305 * Constructor 306 */ 307 public NutritionOrderOralDietComponent() { 308 super(); 309 } 310 311 /** 312 * @return {@link #type} (The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.) 313 */ 314 public List<CodeableConcept> getType() { 315 if (this.type == null) 316 this.type = new ArrayList<CodeableConcept>(); 317 return this.type; 318 } 319 320 /** 321 * @return Returns a reference to <code>this</code> for easy method chaining 322 */ 323 public NutritionOrderOralDietComponent setType(List<CodeableConcept> theType) { 324 this.type = theType; 325 return this; 326 } 327 328 public boolean hasType() { 329 if (this.type == null) 330 return false; 331 for (CodeableConcept item : this.type) 332 if (!item.isEmpty()) 333 return true; 334 return false; 335 } 336 337 public CodeableConcept addType() { //3 338 CodeableConcept t = new CodeableConcept(); 339 if (this.type == null) 340 this.type = new ArrayList<CodeableConcept>(); 341 this.type.add(t); 342 return t; 343 } 344 345 public NutritionOrderOralDietComponent addType(CodeableConcept t) { //3 346 if (t == null) 347 return this; 348 if (this.type == null) 349 this.type = new ArrayList<CodeableConcept>(); 350 this.type.add(t); 351 return this; 352 } 353 354 /** 355 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist 356 */ 357 public CodeableConcept getTypeFirstRep() { 358 if (getType().isEmpty()) { 359 addType(); 360 } 361 return getType().get(0); 362 } 363 364 /** 365 * @return {@link #schedule} (The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.) 366 */ 367 public List<Timing> getSchedule() { 368 if (this.schedule == null) 369 this.schedule = new ArrayList<Timing>(); 370 return this.schedule; 371 } 372 373 /** 374 * @return Returns a reference to <code>this</code> for easy method chaining 375 */ 376 public NutritionOrderOralDietComponent setSchedule(List<Timing> theSchedule) { 377 this.schedule = theSchedule; 378 return this; 379 } 380 381 public boolean hasSchedule() { 382 if (this.schedule == null) 383 return false; 384 for (Timing item : this.schedule) 385 if (!item.isEmpty()) 386 return true; 387 return false; 388 } 389 390 public Timing addSchedule() { //3 391 Timing t = new Timing(); 392 if (this.schedule == null) 393 this.schedule = new ArrayList<Timing>(); 394 this.schedule.add(t); 395 return t; 396 } 397 398 public NutritionOrderOralDietComponent addSchedule(Timing t) { //3 399 if (t == null) 400 return this; 401 if (this.schedule == null) 402 this.schedule = new ArrayList<Timing>(); 403 this.schedule.add(t); 404 return this; 405 } 406 407 /** 408 * @return The first repetition of repeating field {@link #schedule}, creating it if it does not already exist 409 */ 410 public Timing getScheduleFirstRep() { 411 if (getSchedule().isEmpty()) { 412 addSchedule(); 413 } 414 return getSchedule().get(0); 415 } 416 417 /** 418 * @return {@link #nutrient} (Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.) 419 */ 420 public List<NutritionOrderOralDietNutrientComponent> getNutrient() { 421 if (this.nutrient == null) 422 this.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 423 return this.nutrient; 424 } 425 426 /** 427 * @return Returns a reference to <code>this</code> for easy method chaining 428 */ 429 public NutritionOrderOralDietComponent setNutrient(List<NutritionOrderOralDietNutrientComponent> theNutrient) { 430 this.nutrient = theNutrient; 431 return this; 432 } 433 434 public boolean hasNutrient() { 435 if (this.nutrient == null) 436 return false; 437 for (NutritionOrderOralDietNutrientComponent item : this.nutrient) 438 if (!item.isEmpty()) 439 return true; 440 return false; 441 } 442 443 public NutritionOrderOralDietNutrientComponent addNutrient() { //3 444 NutritionOrderOralDietNutrientComponent t = new NutritionOrderOralDietNutrientComponent(); 445 if (this.nutrient == null) 446 this.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 447 this.nutrient.add(t); 448 return t; 449 } 450 451 public NutritionOrderOralDietComponent addNutrient(NutritionOrderOralDietNutrientComponent t) { //3 452 if (t == null) 453 return this; 454 if (this.nutrient == null) 455 this.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 456 this.nutrient.add(t); 457 return this; 458 } 459 460 /** 461 * @return The first repetition of repeating field {@link #nutrient}, creating it if it does not already exist 462 */ 463 public NutritionOrderOralDietNutrientComponent getNutrientFirstRep() { 464 if (getNutrient().isEmpty()) { 465 addNutrient(); 466 } 467 return getNutrient().get(0); 468 } 469 470 /** 471 * @return {@link #texture} (Class that describes any texture modifications required for the patient to safely consume various types of solid foods.) 472 */ 473 public List<NutritionOrderOralDietTextureComponent> getTexture() { 474 if (this.texture == null) 475 this.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 476 return this.texture; 477 } 478 479 /** 480 * @return Returns a reference to <code>this</code> for easy method chaining 481 */ 482 public NutritionOrderOralDietComponent setTexture(List<NutritionOrderOralDietTextureComponent> theTexture) { 483 this.texture = theTexture; 484 return this; 485 } 486 487 public boolean hasTexture() { 488 if (this.texture == null) 489 return false; 490 for (NutritionOrderOralDietTextureComponent item : this.texture) 491 if (!item.isEmpty()) 492 return true; 493 return false; 494 } 495 496 public NutritionOrderOralDietTextureComponent addTexture() { //3 497 NutritionOrderOralDietTextureComponent t = new NutritionOrderOralDietTextureComponent(); 498 if (this.texture == null) 499 this.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 500 this.texture.add(t); 501 return t; 502 } 503 504 public NutritionOrderOralDietComponent addTexture(NutritionOrderOralDietTextureComponent t) { //3 505 if (t == null) 506 return this; 507 if (this.texture == null) 508 this.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 509 this.texture.add(t); 510 return this; 511 } 512 513 /** 514 * @return The first repetition of repeating field {@link #texture}, creating it if it does not already exist 515 */ 516 public NutritionOrderOralDietTextureComponent getTextureFirstRep() { 517 if (getTexture().isEmpty()) { 518 addTexture(); 519 } 520 return getTexture().get(0); 521 } 522 523 /** 524 * @return {@link #fluidConsistencyType} (The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.) 525 */ 526 public List<CodeableConcept> getFluidConsistencyType() { 527 if (this.fluidConsistencyType == null) 528 this.fluidConsistencyType = new ArrayList<CodeableConcept>(); 529 return this.fluidConsistencyType; 530 } 531 532 /** 533 * @return Returns a reference to <code>this</code> for easy method chaining 534 */ 535 public NutritionOrderOralDietComponent setFluidConsistencyType(List<CodeableConcept> theFluidConsistencyType) { 536 this.fluidConsistencyType = theFluidConsistencyType; 537 return this; 538 } 539 540 public boolean hasFluidConsistencyType() { 541 if (this.fluidConsistencyType == null) 542 return false; 543 for (CodeableConcept item : this.fluidConsistencyType) 544 if (!item.isEmpty()) 545 return true; 546 return false; 547 } 548 549 public CodeableConcept addFluidConsistencyType() { //3 550 CodeableConcept t = new CodeableConcept(); 551 if (this.fluidConsistencyType == null) 552 this.fluidConsistencyType = new ArrayList<CodeableConcept>(); 553 this.fluidConsistencyType.add(t); 554 return t; 555 } 556 557 public NutritionOrderOralDietComponent addFluidConsistencyType(CodeableConcept t) { //3 558 if (t == null) 559 return this; 560 if (this.fluidConsistencyType == null) 561 this.fluidConsistencyType = new ArrayList<CodeableConcept>(); 562 this.fluidConsistencyType.add(t); 563 return this; 564 } 565 566 /** 567 * @return The first repetition of repeating field {@link #fluidConsistencyType}, creating it if it does not already exist 568 */ 569 public CodeableConcept getFluidConsistencyTypeFirstRep() { 570 if (getFluidConsistencyType().isEmpty()) { 571 addFluidConsistencyType(); 572 } 573 return getFluidConsistencyType().get(0); 574 } 575 576 /** 577 * @return {@link #instruction} (Free text or additional instructions or information pertaining to the oral diet.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value 578 */ 579 public StringType getInstructionElement() { 580 if (this.instruction == null) 581 if (Configuration.errorOnAutoCreate()) 582 throw new Error("Attempt to auto-create NutritionOrderOralDietComponent.instruction"); 583 else if (Configuration.doAutoCreate()) 584 this.instruction = new StringType(); // bb 585 return this.instruction; 586 } 587 588 public boolean hasInstructionElement() { 589 return this.instruction != null && !this.instruction.isEmpty(); 590 } 591 592 public boolean hasInstruction() { 593 return this.instruction != null && !this.instruction.isEmpty(); 594 } 595 596 /** 597 * @param value {@link #instruction} (Free text or additional instructions or information pertaining to the oral diet.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value 598 */ 599 public NutritionOrderOralDietComponent setInstructionElement(StringType value) { 600 this.instruction = value; 601 return this; 602 } 603 604 /** 605 * @return Free text or additional instructions or information pertaining to the oral diet. 606 */ 607 public String getInstruction() { 608 return this.instruction == null ? null : this.instruction.getValue(); 609 } 610 611 /** 612 * @param value Free text or additional instructions or information pertaining to the oral diet. 613 */ 614 public NutritionOrderOralDietComponent setInstruction(String value) { 615 if (Utilities.noString(value)) 616 this.instruction = null; 617 else { 618 if (this.instruction == null) 619 this.instruction = new StringType(); 620 this.instruction.setValue(value); 621 } 622 return this; 623 } 624 625 protected void listChildren(List<Property> children) { 626 super.listChildren(children); 627 children.add(new Property("type", "CodeableConcept", "The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.", 0, java.lang.Integer.MAX_VALUE, type)); 628 children.add(new Property("schedule", "Timing", "The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.", 0, java.lang.Integer.MAX_VALUE, schedule)); 629 children.add(new Property("nutrient", "", "Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.", 0, java.lang.Integer.MAX_VALUE, nutrient)); 630 children.add(new Property("texture", "", "Class that describes any texture modifications required for the patient to safely consume various types of solid foods.", 0, java.lang.Integer.MAX_VALUE, texture)); 631 children.add(new Property("fluidConsistencyType", "CodeableConcept", "The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.", 0, java.lang.Integer.MAX_VALUE, fluidConsistencyType)); 632 children.add(new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral diet.", 0, 1, instruction)); 633 } 634 635 @Override 636 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 637 switch (_hash) { 638 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.", 0, java.lang.Integer.MAX_VALUE, type); 639 case -697920873: /*schedule*/ return new Property("schedule", "Timing", "The time period and frequency at which the diet should be given. The diet should be given for the combination of all schedules if more than one schedule is present.", 0, java.lang.Integer.MAX_VALUE, schedule); 640 case -1671151641: /*nutrient*/ return new Property("nutrient", "", "Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.", 0, java.lang.Integer.MAX_VALUE, nutrient); 641 case -1417816805: /*texture*/ return new Property("texture", "", "Class that describes any texture modifications required for the patient to safely consume various types of solid foods.", 0, java.lang.Integer.MAX_VALUE, texture); 642 case -525105592: /*fluidConsistencyType*/ return new Property("fluidConsistencyType", "CodeableConcept", "The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.", 0, java.lang.Integer.MAX_VALUE, fluidConsistencyType); 643 case 301526158: /*instruction*/ return new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral diet.", 0, 1, instruction); 644 default: return super.getNamedProperty(_hash, _name, _checkValid); 645 } 646 647 } 648 649 @Override 650 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 651 switch (hash) { 652 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 653 case -697920873: /*schedule*/ return this.schedule == null ? new Base[0] : this.schedule.toArray(new Base[this.schedule.size()]); // Timing 654 case -1671151641: /*nutrient*/ return this.nutrient == null ? new Base[0] : this.nutrient.toArray(new Base[this.nutrient.size()]); // NutritionOrderOralDietNutrientComponent 655 case -1417816805: /*texture*/ return this.texture == null ? new Base[0] : this.texture.toArray(new Base[this.texture.size()]); // NutritionOrderOralDietTextureComponent 656 case -525105592: /*fluidConsistencyType*/ return this.fluidConsistencyType == null ? new Base[0] : this.fluidConsistencyType.toArray(new Base[this.fluidConsistencyType.size()]); // CodeableConcept 657 case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // StringType 658 default: return super.getProperty(hash, name, checkValid); 659 } 660 661 } 662 663 @Override 664 public Base setProperty(int hash, String name, Base value) throws FHIRException { 665 switch (hash) { 666 case 3575610: // type 667 this.getType().add(castToCodeableConcept(value)); // CodeableConcept 668 return value; 669 case -697920873: // schedule 670 this.getSchedule().add(castToTiming(value)); // Timing 671 return value; 672 case -1671151641: // nutrient 673 this.getNutrient().add((NutritionOrderOralDietNutrientComponent) value); // NutritionOrderOralDietNutrientComponent 674 return value; 675 case -1417816805: // texture 676 this.getTexture().add((NutritionOrderOralDietTextureComponent) value); // NutritionOrderOralDietTextureComponent 677 return value; 678 case -525105592: // fluidConsistencyType 679 this.getFluidConsistencyType().add(castToCodeableConcept(value)); // CodeableConcept 680 return value; 681 case 301526158: // instruction 682 this.instruction = castToString(value); // StringType 683 return value; 684 default: return super.setProperty(hash, name, value); 685 } 686 687 } 688 689 @Override 690 public Base setProperty(String name, Base value) throws FHIRException { 691 if (name.equals("type")) { 692 this.getType().add(castToCodeableConcept(value)); 693 } else if (name.equals("schedule")) { 694 this.getSchedule().add(castToTiming(value)); 695 } else if (name.equals("nutrient")) { 696 this.getNutrient().add((NutritionOrderOralDietNutrientComponent) value); 697 } else if (name.equals("texture")) { 698 this.getTexture().add((NutritionOrderOralDietTextureComponent) value); 699 } else if (name.equals("fluidConsistencyType")) { 700 this.getFluidConsistencyType().add(castToCodeableConcept(value)); 701 } else if (name.equals("instruction")) { 702 this.instruction = castToString(value); // StringType 703 } else 704 return super.setProperty(name, value); 705 return value; 706 } 707 708 @Override 709 public Base makeProperty(int hash, String name) throws FHIRException { 710 switch (hash) { 711 case 3575610: return addType(); 712 case -697920873: return addSchedule(); 713 case -1671151641: return addNutrient(); 714 case -1417816805: return addTexture(); 715 case -525105592: return addFluidConsistencyType(); 716 case 301526158: return getInstructionElement(); 717 default: return super.makeProperty(hash, name); 718 } 719 720 } 721 722 @Override 723 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 724 switch (hash) { 725 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 726 case -697920873: /*schedule*/ return new String[] {"Timing"}; 727 case -1671151641: /*nutrient*/ return new String[] {}; 728 case -1417816805: /*texture*/ return new String[] {}; 729 case -525105592: /*fluidConsistencyType*/ return new String[] {"CodeableConcept"}; 730 case 301526158: /*instruction*/ return new String[] {"string"}; 731 default: return super.getTypesForProperty(hash, name); 732 } 733 734 } 735 736 @Override 737 public Base addChild(String name) throws FHIRException { 738 if (name.equals("type")) { 739 return addType(); 740 } 741 else if (name.equals("schedule")) { 742 return addSchedule(); 743 } 744 else if (name.equals("nutrient")) { 745 return addNutrient(); 746 } 747 else if (name.equals("texture")) { 748 return addTexture(); 749 } 750 else if (name.equals("fluidConsistencyType")) { 751 return addFluidConsistencyType(); 752 } 753 else if (name.equals("instruction")) { 754 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instruction"); 755 } 756 else 757 return super.addChild(name); 758 } 759 760 public NutritionOrderOralDietComponent copy() { 761 NutritionOrderOralDietComponent dst = new NutritionOrderOralDietComponent(); 762 copyValues(dst); 763 if (type != null) { 764 dst.type = new ArrayList<CodeableConcept>(); 765 for (CodeableConcept i : type) 766 dst.type.add(i.copy()); 767 }; 768 if (schedule != null) { 769 dst.schedule = new ArrayList<Timing>(); 770 for (Timing i : schedule) 771 dst.schedule.add(i.copy()); 772 }; 773 if (nutrient != null) { 774 dst.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 775 for (NutritionOrderOralDietNutrientComponent i : nutrient) 776 dst.nutrient.add(i.copy()); 777 }; 778 if (texture != null) { 779 dst.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 780 for (NutritionOrderOralDietTextureComponent i : texture) 781 dst.texture.add(i.copy()); 782 }; 783 if (fluidConsistencyType != null) { 784 dst.fluidConsistencyType = new ArrayList<CodeableConcept>(); 785 for (CodeableConcept i : fluidConsistencyType) 786 dst.fluidConsistencyType.add(i.copy()); 787 }; 788 dst.instruction = instruction == null ? null : instruction.copy(); 789 return dst; 790 } 791 792 @Override 793 public boolean equalsDeep(Base other_) { 794 if (!super.equalsDeep(other_)) 795 return false; 796 if (!(other_ instanceof NutritionOrderOralDietComponent)) 797 return false; 798 NutritionOrderOralDietComponent o = (NutritionOrderOralDietComponent) other_; 799 return compareDeep(type, o.type, true) && compareDeep(schedule, o.schedule, true) && compareDeep(nutrient, o.nutrient, true) 800 && compareDeep(texture, o.texture, true) && compareDeep(fluidConsistencyType, o.fluidConsistencyType, true) 801 && compareDeep(instruction, o.instruction, true); 802 } 803 804 @Override 805 public boolean equalsShallow(Base other_) { 806 if (!super.equalsShallow(other_)) 807 return false; 808 if (!(other_ instanceof NutritionOrderOralDietComponent)) 809 return false; 810 NutritionOrderOralDietComponent o = (NutritionOrderOralDietComponent) other_; 811 return compareValues(instruction, o.instruction, true); 812 } 813 814 public boolean isEmpty() { 815 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, schedule, nutrient 816 , texture, fluidConsistencyType, instruction); 817 } 818 819 public String fhirType() { 820 return "NutritionOrder.oralDiet"; 821 822 } 823 824 } 825 826 @Block() 827 public static class NutritionOrderOralDietNutrientComponent extends BackboneElement implements IBaseBackboneElement { 828 /** 829 * The nutrient that is being modified such as carbohydrate or sodium. 830 */ 831 @Child(name = "modifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 832 @Description(shortDefinition="Type of nutrient that is being modified", formalDefinition="The nutrient that is being modified such as carbohydrate or sodium." ) 833 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/nutrient-code") 834 protected CodeableConcept modifier; 835 836 /** 837 * The quantity of the specified nutrient to include in diet. 838 */ 839 @Child(name = "amount", type = {SimpleQuantity.class}, order=2, min=0, max=1, modifier=false, summary=false) 840 @Description(shortDefinition="Quantity of the specified nutrient", formalDefinition="The quantity of the specified nutrient to include in diet." ) 841 protected SimpleQuantity amount; 842 843 private static final long serialVersionUID = 465107295L; 844 845 /** 846 * Constructor 847 */ 848 public NutritionOrderOralDietNutrientComponent() { 849 super(); 850 } 851 852 /** 853 * @return {@link #modifier} (The nutrient that is being modified such as carbohydrate or sodium.) 854 */ 855 public CodeableConcept getModifier() { 856 if (this.modifier == null) 857 if (Configuration.errorOnAutoCreate()) 858 throw new Error("Attempt to auto-create NutritionOrderOralDietNutrientComponent.modifier"); 859 else if (Configuration.doAutoCreate()) 860 this.modifier = new CodeableConcept(); // cc 861 return this.modifier; 862 } 863 864 public boolean hasModifier() { 865 return this.modifier != null && !this.modifier.isEmpty(); 866 } 867 868 /** 869 * @param value {@link #modifier} (The nutrient that is being modified such as carbohydrate or sodium.) 870 */ 871 public NutritionOrderOralDietNutrientComponent setModifier(CodeableConcept value) { 872 this.modifier = value; 873 return this; 874 } 875 876 /** 877 * @return {@link #amount} (The quantity of the specified nutrient to include in diet.) 878 */ 879 public SimpleQuantity getAmount() { 880 if (this.amount == null) 881 if (Configuration.errorOnAutoCreate()) 882 throw new Error("Attempt to auto-create NutritionOrderOralDietNutrientComponent.amount"); 883 else if (Configuration.doAutoCreate()) 884 this.amount = new SimpleQuantity(); // cc 885 return this.amount; 886 } 887 888 public boolean hasAmount() { 889 return this.amount != null && !this.amount.isEmpty(); 890 } 891 892 /** 893 * @param value {@link #amount} (The quantity of the specified nutrient to include in diet.) 894 */ 895 public NutritionOrderOralDietNutrientComponent setAmount(SimpleQuantity value) { 896 this.amount = value; 897 return this; 898 } 899 900 protected void listChildren(List<Property> children) { 901 super.listChildren(children); 902 children.add(new Property("modifier", "CodeableConcept", "The nutrient that is being modified such as carbohydrate or sodium.", 0, 1, modifier)); 903 children.add(new Property("amount", "SimpleQuantity", "The quantity of the specified nutrient to include in diet.", 0, 1, amount)); 904 } 905 906 @Override 907 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 908 switch (_hash) { 909 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "The nutrient that is being modified such as carbohydrate or sodium.", 0, 1, modifier); 910 case -1413853096: /*amount*/ return new Property("amount", "SimpleQuantity", "The quantity of the specified nutrient to include in diet.", 0, 1, amount); 911 default: return super.getNamedProperty(_hash, _name, _checkValid); 912 } 913 914 } 915 916 @Override 917 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 918 switch (hash) { 919 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : new Base[] {this.modifier}; // CodeableConcept 920 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // SimpleQuantity 921 default: return super.getProperty(hash, name, checkValid); 922 } 923 924 } 925 926 @Override 927 public Base setProperty(int hash, String name, Base value) throws FHIRException { 928 switch (hash) { 929 case -615513385: // modifier 930 this.modifier = castToCodeableConcept(value); // CodeableConcept 931 return value; 932 case -1413853096: // amount 933 this.amount = castToSimpleQuantity(value); // SimpleQuantity 934 return value; 935 default: return super.setProperty(hash, name, value); 936 } 937 938 } 939 940 @Override 941 public Base setProperty(String name, Base value) throws FHIRException { 942 if (name.equals("modifier")) { 943 this.modifier = castToCodeableConcept(value); // CodeableConcept 944 } else if (name.equals("amount")) { 945 this.amount = castToSimpleQuantity(value); // SimpleQuantity 946 } else 947 return super.setProperty(name, value); 948 return value; 949 } 950 951 @Override 952 public Base makeProperty(int hash, String name) throws FHIRException { 953 switch (hash) { 954 case -615513385: return getModifier(); 955 case -1413853096: return getAmount(); 956 default: return super.makeProperty(hash, name); 957 } 958 959 } 960 961 @Override 962 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 963 switch (hash) { 964 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 965 case -1413853096: /*amount*/ return new String[] {"SimpleQuantity"}; 966 default: return super.getTypesForProperty(hash, name); 967 } 968 969 } 970 971 @Override 972 public Base addChild(String name) throws FHIRException { 973 if (name.equals("modifier")) { 974 this.modifier = new CodeableConcept(); 975 return this.modifier; 976 } 977 else if (name.equals("amount")) { 978 this.amount = new SimpleQuantity(); 979 return this.amount; 980 } 981 else 982 return super.addChild(name); 983 } 984 985 public NutritionOrderOralDietNutrientComponent copy() { 986 NutritionOrderOralDietNutrientComponent dst = new NutritionOrderOralDietNutrientComponent(); 987 copyValues(dst); 988 dst.modifier = modifier == null ? null : modifier.copy(); 989 dst.amount = amount == null ? null : amount.copy(); 990 return dst; 991 } 992 993 @Override 994 public boolean equalsDeep(Base other_) { 995 if (!super.equalsDeep(other_)) 996 return false; 997 if (!(other_ instanceof NutritionOrderOralDietNutrientComponent)) 998 return false; 999 NutritionOrderOralDietNutrientComponent o = (NutritionOrderOralDietNutrientComponent) other_; 1000 return compareDeep(modifier, o.modifier, true) && compareDeep(amount, o.amount, true); 1001 } 1002 1003 @Override 1004 public boolean equalsShallow(Base other_) { 1005 if (!super.equalsShallow(other_)) 1006 return false; 1007 if (!(other_ instanceof NutritionOrderOralDietNutrientComponent)) 1008 return false; 1009 NutritionOrderOralDietNutrientComponent o = (NutritionOrderOralDietNutrientComponent) other_; 1010 return true; 1011 } 1012 1013 public boolean isEmpty() { 1014 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(modifier, amount); 1015 } 1016 1017 public String fhirType() { 1018 return "NutritionOrder.oralDiet.nutrient"; 1019 1020 } 1021 1022 } 1023 1024 @Block() 1025 public static class NutritionOrderOralDietTextureComponent extends BackboneElement implements IBaseBackboneElement { 1026 /** 1027 * Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed. 1028 */ 1029 @Child(name = "modifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 1030 @Description(shortDefinition="Code to indicate how to alter the texture of the foods, e.g. pureed", formalDefinition="Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed." ) 1031 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/texture-code") 1032 protected CodeableConcept modifier; 1033 1034 /** 1035 * The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types. 1036 */ 1037 @Child(name = "foodType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1038 @Description(shortDefinition="Concepts that are used to identify an entity that is ingested for nutritional purposes", formalDefinition="The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types." ) 1039 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/modified-foodtype") 1040 protected CodeableConcept foodType; 1041 1042 private static final long serialVersionUID = -56402817L; 1043 1044 /** 1045 * Constructor 1046 */ 1047 public NutritionOrderOralDietTextureComponent() { 1048 super(); 1049 } 1050 1051 /** 1052 * @return {@link #modifier} (Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.) 1053 */ 1054 public CodeableConcept getModifier() { 1055 if (this.modifier == null) 1056 if (Configuration.errorOnAutoCreate()) 1057 throw new Error("Attempt to auto-create NutritionOrderOralDietTextureComponent.modifier"); 1058 else if (Configuration.doAutoCreate()) 1059 this.modifier = new CodeableConcept(); // cc 1060 return this.modifier; 1061 } 1062 1063 public boolean hasModifier() { 1064 return this.modifier != null && !this.modifier.isEmpty(); 1065 } 1066 1067 /** 1068 * @param value {@link #modifier} (Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.) 1069 */ 1070 public NutritionOrderOralDietTextureComponent setModifier(CodeableConcept value) { 1071 this.modifier = value; 1072 return this; 1073 } 1074 1075 /** 1076 * @return {@link #foodType} (The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.) 1077 */ 1078 public CodeableConcept getFoodType() { 1079 if (this.foodType == null) 1080 if (Configuration.errorOnAutoCreate()) 1081 throw new Error("Attempt to auto-create NutritionOrderOralDietTextureComponent.foodType"); 1082 else if (Configuration.doAutoCreate()) 1083 this.foodType = new CodeableConcept(); // cc 1084 return this.foodType; 1085 } 1086 1087 public boolean hasFoodType() { 1088 return this.foodType != null && !this.foodType.isEmpty(); 1089 } 1090 1091 /** 1092 * @param value {@link #foodType} (The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.) 1093 */ 1094 public NutritionOrderOralDietTextureComponent setFoodType(CodeableConcept value) { 1095 this.foodType = value; 1096 return this; 1097 } 1098 1099 protected void listChildren(List<Property> children) { 1100 super.listChildren(children); 1101 children.add(new Property("modifier", "CodeableConcept", "Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.", 0, 1, modifier)); 1102 children.add(new Property("foodType", "CodeableConcept", "The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.", 0, 1, foodType)); 1103 } 1104 1105 @Override 1106 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1107 switch (_hash) { 1108 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.", 0, 1, modifier); 1109 case 379498680: /*foodType*/ return new Property("foodType", "CodeableConcept", "The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.", 0, 1, foodType); 1110 default: return super.getNamedProperty(_hash, _name, _checkValid); 1111 } 1112 1113 } 1114 1115 @Override 1116 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1117 switch (hash) { 1118 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : new Base[] {this.modifier}; // CodeableConcept 1119 case 379498680: /*foodType*/ return this.foodType == null ? new Base[0] : new Base[] {this.foodType}; // CodeableConcept 1120 default: return super.getProperty(hash, name, checkValid); 1121 } 1122 1123 } 1124 1125 @Override 1126 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1127 switch (hash) { 1128 case -615513385: // modifier 1129 this.modifier = castToCodeableConcept(value); // CodeableConcept 1130 return value; 1131 case 379498680: // foodType 1132 this.foodType = castToCodeableConcept(value); // CodeableConcept 1133 return value; 1134 default: return super.setProperty(hash, name, value); 1135 } 1136 1137 } 1138 1139 @Override 1140 public Base setProperty(String name, Base value) throws FHIRException { 1141 if (name.equals("modifier")) { 1142 this.modifier = castToCodeableConcept(value); // CodeableConcept 1143 } else if (name.equals("foodType")) { 1144 this.foodType = castToCodeableConcept(value); // CodeableConcept 1145 } else 1146 return super.setProperty(name, value); 1147 return value; 1148 } 1149 1150 @Override 1151 public Base makeProperty(int hash, String name) throws FHIRException { 1152 switch (hash) { 1153 case -615513385: return getModifier(); 1154 case 379498680: return getFoodType(); 1155 default: return super.makeProperty(hash, name); 1156 } 1157 1158 } 1159 1160 @Override 1161 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1162 switch (hash) { 1163 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 1164 case 379498680: /*foodType*/ return new String[] {"CodeableConcept"}; 1165 default: return super.getTypesForProperty(hash, name); 1166 } 1167 1168 } 1169 1170 @Override 1171 public Base addChild(String name) throws FHIRException { 1172 if (name.equals("modifier")) { 1173 this.modifier = new CodeableConcept(); 1174 return this.modifier; 1175 } 1176 else if (name.equals("foodType")) { 1177 this.foodType = new CodeableConcept(); 1178 return this.foodType; 1179 } 1180 else 1181 return super.addChild(name); 1182 } 1183 1184 public NutritionOrderOralDietTextureComponent copy() { 1185 NutritionOrderOralDietTextureComponent dst = new NutritionOrderOralDietTextureComponent(); 1186 copyValues(dst); 1187 dst.modifier = modifier == null ? null : modifier.copy(); 1188 dst.foodType = foodType == null ? null : foodType.copy(); 1189 return dst; 1190 } 1191 1192 @Override 1193 public boolean equalsDeep(Base other_) { 1194 if (!super.equalsDeep(other_)) 1195 return false; 1196 if (!(other_ instanceof NutritionOrderOralDietTextureComponent)) 1197 return false; 1198 NutritionOrderOralDietTextureComponent o = (NutritionOrderOralDietTextureComponent) other_; 1199 return compareDeep(modifier, o.modifier, true) && compareDeep(foodType, o.foodType, true); 1200 } 1201 1202 @Override 1203 public boolean equalsShallow(Base other_) { 1204 if (!super.equalsShallow(other_)) 1205 return false; 1206 if (!(other_ instanceof NutritionOrderOralDietTextureComponent)) 1207 return false; 1208 NutritionOrderOralDietTextureComponent o = (NutritionOrderOralDietTextureComponent) other_; 1209 return true; 1210 } 1211 1212 public boolean isEmpty() { 1213 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(modifier, foodType); 1214 } 1215 1216 public String fhirType() { 1217 return "NutritionOrder.oralDiet.texture"; 1218 1219 } 1220 1221 } 1222 1223 @Block() 1224 public static class NutritionOrderSupplementComponent extends BackboneElement implements IBaseBackboneElement { 1225 /** 1226 * The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement. 1227 */ 1228 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1229 @Description(shortDefinition="Type of supplement product requested", formalDefinition="The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement." ) 1230 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplement-type") 1231 protected CodeableConcept type; 1232 1233 /** 1234 * The product or brand name of the nutritional supplement such as "Acme Protein Shake". 1235 */ 1236 @Child(name = "productName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1237 @Description(shortDefinition="Product or brand name of the nutritional supplement", formalDefinition="The product or brand name of the nutritional supplement such as \"Acme Protein Shake\"." ) 1238 protected StringType productName; 1239 1240 /** 1241 * The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present. 1242 */ 1243 @Child(name = "schedule", type = {Timing.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1244 @Description(shortDefinition="Scheduled frequency of supplement", formalDefinition="The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present." ) 1245 protected List<Timing> schedule; 1246 1247 /** 1248 * The amount of the nutritional supplement to be given. 1249 */ 1250 @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 1251 @Description(shortDefinition="Amount of the nutritional supplement", formalDefinition="The amount of the nutritional supplement to be given." ) 1252 protected SimpleQuantity quantity; 1253 1254 /** 1255 * Free text or additional instructions or information pertaining to the oral supplement. 1256 */ 1257 @Child(name = "instruction", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1258 @Description(shortDefinition="Instructions or additional information about the oral supplement", formalDefinition="Free text or additional instructions or information pertaining to the oral supplement." ) 1259 protected StringType instruction; 1260 1261 private static final long serialVersionUID = 297545236L; 1262 1263 /** 1264 * Constructor 1265 */ 1266 public NutritionOrderSupplementComponent() { 1267 super(); 1268 } 1269 1270 /** 1271 * @return {@link #type} (The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.) 1272 */ 1273 public CodeableConcept getType() { 1274 if (this.type == null) 1275 if (Configuration.errorOnAutoCreate()) 1276 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.type"); 1277 else if (Configuration.doAutoCreate()) 1278 this.type = new CodeableConcept(); // cc 1279 return this.type; 1280 } 1281 1282 public boolean hasType() { 1283 return this.type != null && !this.type.isEmpty(); 1284 } 1285 1286 /** 1287 * @param value {@link #type} (The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.) 1288 */ 1289 public NutritionOrderSupplementComponent setType(CodeableConcept value) { 1290 this.type = value; 1291 return this; 1292 } 1293 1294 /** 1295 * @return {@link #productName} (The product or brand name of the nutritional supplement such as "Acme Protein Shake".). This is the underlying object with id, value and extensions. The accessor "getProductName" gives direct access to the value 1296 */ 1297 public StringType getProductNameElement() { 1298 if (this.productName == null) 1299 if (Configuration.errorOnAutoCreate()) 1300 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.productName"); 1301 else if (Configuration.doAutoCreate()) 1302 this.productName = new StringType(); // bb 1303 return this.productName; 1304 } 1305 1306 public boolean hasProductNameElement() { 1307 return this.productName != null && !this.productName.isEmpty(); 1308 } 1309 1310 public boolean hasProductName() { 1311 return this.productName != null && !this.productName.isEmpty(); 1312 } 1313 1314 /** 1315 * @param value {@link #productName} (The product or brand name of the nutritional supplement such as "Acme Protein Shake".). This is the underlying object with id, value and extensions. The accessor "getProductName" gives direct access to the value 1316 */ 1317 public NutritionOrderSupplementComponent setProductNameElement(StringType value) { 1318 this.productName = value; 1319 return this; 1320 } 1321 1322 /** 1323 * @return The product or brand name of the nutritional supplement such as "Acme Protein Shake". 1324 */ 1325 public String getProductName() { 1326 return this.productName == null ? null : this.productName.getValue(); 1327 } 1328 1329 /** 1330 * @param value The product or brand name of the nutritional supplement such as "Acme Protein Shake". 1331 */ 1332 public NutritionOrderSupplementComponent setProductName(String value) { 1333 if (Utilities.noString(value)) 1334 this.productName = null; 1335 else { 1336 if (this.productName == null) 1337 this.productName = new StringType(); 1338 this.productName.setValue(value); 1339 } 1340 return this; 1341 } 1342 1343 /** 1344 * @return {@link #schedule} (The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.) 1345 */ 1346 public List<Timing> getSchedule() { 1347 if (this.schedule == null) 1348 this.schedule = new ArrayList<Timing>(); 1349 return this.schedule; 1350 } 1351 1352 /** 1353 * @return Returns a reference to <code>this</code> for easy method chaining 1354 */ 1355 public NutritionOrderSupplementComponent setSchedule(List<Timing> theSchedule) { 1356 this.schedule = theSchedule; 1357 return this; 1358 } 1359 1360 public boolean hasSchedule() { 1361 if (this.schedule == null) 1362 return false; 1363 for (Timing item : this.schedule) 1364 if (!item.isEmpty()) 1365 return true; 1366 return false; 1367 } 1368 1369 public Timing addSchedule() { //3 1370 Timing t = new Timing(); 1371 if (this.schedule == null) 1372 this.schedule = new ArrayList<Timing>(); 1373 this.schedule.add(t); 1374 return t; 1375 } 1376 1377 public NutritionOrderSupplementComponent addSchedule(Timing t) { //3 1378 if (t == null) 1379 return this; 1380 if (this.schedule == null) 1381 this.schedule = new ArrayList<Timing>(); 1382 this.schedule.add(t); 1383 return this; 1384 } 1385 1386 /** 1387 * @return The first repetition of repeating field {@link #schedule}, creating it if it does not already exist 1388 */ 1389 public Timing getScheduleFirstRep() { 1390 if (getSchedule().isEmpty()) { 1391 addSchedule(); 1392 } 1393 return getSchedule().get(0); 1394 } 1395 1396 /** 1397 * @return {@link #quantity} (The amount of the nutritional supplement to be given.) 1398 */ 1399 public SimpleQuantity getQuantity() { 1400 if (this.quantity == null) 1401 if (Configuration.errorOnAutoCreate()) 1402 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.quantity"); 1403 else if (Configuration.doAutoCreate()) 1404 this.quantity = new SimpleQuantity(); // cc 1405 return this.quantity; 1406 } 1407 1408 public boolean hasQuantity() { 1409 return this.quantity != null && !this.quantity.isEmpty(); 1410 } 1411 1412 /** 1413 * @param value {@link #quantity} (The amount of the nutritional supplement to be given.) 1414 */ 1415 public NutritionOrderSupplementComponent setQuantity(SimpleQuantity value) { 1416 this.quantity = value; 1417 return this; 1418 } 1419 1420 /** 1421 * @return {@link #instruction} (Free text or additional instructions or information pertaining to the oral supplement.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value 1422 */ 1423 public StringType getInstructionElement() { 1424 if (this.instruction == null) 1425 if (Configuration.errorOnAutoCreate()) 1426 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.instruction"); 1427 else if (Configuration.doAutoCreate()) 1428 this.instruction = new StringType(); // bb 1429 return this.instruction; 1430 } 1431 1432 public boolean hasInstructionElement() { 1433 return this.instruction != null && !this.instruction.isEmpty(); 1434 } 1435 1436 public boolean hasInstruction() { 1437 return this.instruction != null && !this.instruction.isEmpty(); 1438 } 1439 1440 /** 1441 * @param value {@link #instruction} (Free text or additional instructions or information pertaining to the oral supplement.). This is the underlying object with id, value and extensions. The accessor "getInstruction" gives direct access to the value 1442 */ 1443 public NutritionOrderSupplementComponent setInstructionElement(StringType value) { 1444 this.instruction = value; 1445 return this; 1446 } 1447 1448 /** 1449 * @return Free text or additional instructions or information pertaining to the oral supplement. 1450 */ 1451 public String getInstruction() { 1452 return this.instruction == null ? null : this.instruction.getValue(); 1453 } 1454 1455 /** 1456 * @param value Free text or additional instructions or information pertaining to the oral supplement. 1457 */ 1458 public NutritionOrderSupplementComponent setInstruction(String value) { 1459 if (Utilities.noString(value)) 1460 this.instruction = null; 1461 else { 1462 if (this.instruction == null) 1463 this.instruction = new StringType(); 1464 this.instruction.setValue(value); 1465 } 1466 return this; 1467 } 1468 1469 protected void listChildren(List<Property> children) { 1470 super.listChildren(children); 1471 children.add(new Property("type", "CodeableConcept", "The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.", 0, 1, type)); 1472 children.add(new Property("productName", "string", "The product or brand name of the nutritional supplement such as \"Acme Protein Shake\".", 0, 1, productName)); 1473 children.add(new Property("schedule", "Timing", "The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.", 0, java.lang.Integer.MAX_VALUE, schedule)); 1474 children.add(new Property("quantity", "SimpleQuantity", "The amount of the nutritional supplement to be given.", 0, 1, quantity)); 1475 children.add(new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral supplement.", 0, 1, instruction)); 1476 } 1477 1478 @Override 1479 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1480 switch (_hash) { 1481 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.", 0, 1, type); 1482 case -1491817446: /*productName*/ return new Property("productName", "string", "The product or brand name of the nutritional supplement such as \"Acme Protein Shake\".", 0, 1, productName); 1483 case -697920873: /*schedule*/ return new Property("schedule", "Timing", "The time period and frequency at which the supplement(s) should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.", 0, java.lang.Integer.MAX_VALUE, schedule); 1484 case -1285004149: /*quantity*/ return new Property("quantity", "SimpleQuantity", "The amount of the nutritional supplement to be given.", 0, 1, quantity); 1485 case 301526158: /*instruction*/ return new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral supplement.", 0, 1, instruction); 1486 default: return super.getNamedProperty(_hash, _name, _checkValid); 1487 } 1488 1489 } 1490 1491 @Override 1492 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1493 switch (hash) { 1494 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1495 case -1491817446: /*productName*/ return this.productName == null ? new Base[0] : new Base[] {this.productName}; // StringType 1496 case -697920873: /*schedule*/ return this.schedule == null ? new Base[0] : this.schedule.toArray(new Base[this.schedule.size()]); // Timing 1497 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 1498 case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // StringType 1499 default: return super.getProperty(hash, name, checkValid); 1500 } 1501 1502 } 1503 1504 @Override 1505 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1506 switch (hash) { 1507 case 3575610: // type 1508 this.type = castToCodeableConcept(value); // CodeableConcept 1509 return value; 1510 case -1491817446: // productName 1511 this.productName = castToString(value); // StringType 1512 return value; 1513 case -697920873: // schedule 1514 this.getSchedule().add(castToTiming(value)); // Timing 1515 return value; 1516 case -1285004149: // quantity 1517 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 1518 return value; 1519 case 301526158: // instruction 1520 this.instruction = castToString(value); // StringType 1521 return value; 1522 default: return super.setProperty(hash, name, value); 1523 } 1524 1525 } 1526 1527 @Override 1528 public Base setProperty(String name, Base value) throws FHIRException { 1529 if (name.equals("type")) { 1530 this.type = castToCodeableConcept(value); // CodeableConcept 1531 } else if (name.equals("productName")) { 1532 this.productName = castToString(value); // StringType 1533 } else if (name.equals("schedule")) { 1534 this.getSchedule().add(castToTiming(value)); 1535 } else if (name.equals("quantity")) { 1536 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 1537 } else if (name.equals("instruction")) { 1538 this.instruction = castToString(value); // StringType 1539 } else 1540 return super.setProperty(name, value); 1541 return value; 1542 } 1543 1544 @Override 1545 public Base makeProperty(int hash, String name) throws FHIRException { 1546 switch (hash) { 1547 case 3575610: return getType(); 1548 case -1491817446: return getProductNameElement(); 1549 case -697920873: return addSchedule(); 1550 case -1285004149: return getQuantity(); 1551 case 301526158: return getInstructionElement(); 1552 default: return super.makeProperty(hash, name); 1553 } 1554 1555 } 1556 1557 @Override 1558 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1559 switch (hash) { 1560 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 1561 case -1491817446: /*productName*/ return new String[] {"string"}; 1562 case -697920873: /*schedule*/ return new String[] {"Timing"}; 1563 case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"}; 1564 case 301526158: /*instruction*/ return new String[] {"string"}; 1565 default: return super.getTypesForProperty(hash, name); 1566 } 1567 1568 } 1569 1570 @Override 1571 public Base addChild(String name) throws FHIRException { 1572 if (name.equals("type")) { 1573 this.type = new CodeableConcept(); 1574 return this.type; 1575 } 1576 else if (name.equals("productName")) { 1577 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.productName"); 1578 } 1579 else if (name.equals("schedule")) { 1580 return addSchedule(); 1581 } 1582 else if (name.equals("quantity")) { 1583 this.quantity = new SimpleQuantity(); 1584 return this.quantity; 1585 } 1586 else if (name.equals("instruction")) { 1587 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instruction"); 1588 } 1589 else 1590 return super.addChild(name); 1591 } 1592 1593 public NutritionOrderSupplementComponent copy() { 1594 NutritionOrderSupplementComponent dst = new NutritionOrderSupplementComponent(); 1595 copyValues(dst); 1596 dst.type = type == null ? null : type.copy(); 1597 dst.productName = productName == null ? null : productName.copy(); 1598 if (schedule != null) { 1599 dst.schedule = new ArrayList<Timing>(); 1600 for (Timing i : schedule) 1601 dst.schedule.add(i.copy()); 1602 }; 1603 dst.quantity = quantity == null ? null : quantity.copy(); 1604 dst.instruction = instruction == null ? null : instruction.copy(); 1605 return dst; 1606 } 1607 1608 @Override 1609 public boolean equalsDeep(Base other_) { 1610 if (!super.equalsDeep(other_)) 1611 return false; 1612 if (!(other_ instanceof NutritionOrderSupplementComponent)) 1613 return false; 1614 NutritionOrderSupplementComponent o = (NutritionOrderSupplementComponent) other_; 1615 return compareDeep(type, o.type, true) && compareDeep(productName, o.productName, true) && compareDeep(schedule, o.schedule, true) 1616 && compareDeep(quantity, o.quantity, true) && compareDeep(instruction, o.instruction, true); 1617 } 1618 1619 @Override 1620 public boolean equalsShallow(Base other_) { 1621 if (!super.equalsShallow(other_)) 1622 return false; 1623 if (!(other_ instanceof NutritionOrderSupplementComponent)) 1624 return false; 1625 NutritionOrderSupplementComponent o = (NutritionOrderSupplementComponent) other_; 1626 return compareValues(productName, o.productName, true) && compareValues(instruction, o.instruction, true) 1627 ; 1628 } 1629 1630 public boolean isEmpty() { 1631 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, productName, schedule 1632 , quantity, instruction); 1633 } 1634 1635 public String fhirType() { 1636 return "NutritionOrder.supplement"; 1637 1638 } 1639 1640 } 1641 1642 @Block() 1643 public static class NutritionOrderEnteralFormulaComponent extends BackboneElement implements IBaseBackboneElement { 1644 /** 1645 * The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula. 1646 */ 1647 @Child(name = "baseFormulaType", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1648 @Description(shortDefinition="Type of enteral or infant formula", formalDefinition="The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula." ) 1649 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/entformula-type") 1650 protected CodeableConcept baseFormulaType; 1651 1652 /** 1653 * The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". 1654 */ 1655 @Child(name = "baseFormulaProductName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1656 @Description(shortDefinition="Product or brand name of the enteral or infant formula", formalDefinition="The product or brand name of the enteral or infant formula product such as \"ACME Adult Standard Formula\"." ) 1657 protected StringType baseFormulaProductName; 1658 1659 /** 1660 * Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula. 1661 */ 1662 @Child(name = "additiveType", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 1663 @Description(shortDefinition="Type of modular component to add to the feeding", formalDefinition="Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula." ) 1664 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/entformula-additive") 1665 protected CodeableConcept additiveType; 1666 1667 /** 1668 * The product or brand name of the type of modular component to be added to the formula. 1669 */ 1670 @Child(name = "additiveProductName", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1671 @Description(shortDefinition="Product or brand name of the modular additive", formalDefinition="The product or brand name of the type of modular component to be added to the formula." ) 1672 protected StringType additiveProductName; 1673 1674 /** 1675 * The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL. 1676 */ 1677 @Child(name = "caloricDensity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=false) 1678 @Description(shortDefinition="Amount of energy per specified volume that is required", formalDefinition="The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL." ) 1679 protected SimpleQuantity caloricDensity; 1680 1681 /** 1682 * The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube. 1683 */ 1684 @Child(name = "routeofAdministration", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 1685 @Description(shortDefinition="How the formula should enter the patient's gastrointestinal tract", formalDefinition="The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube." ) 1686 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/enteral-route") 1687 protected CodeableConcept routeofAdministration; 1688 1689 /** 1690 * Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours. 1691 */ 1692 @Child(name = "administration", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1693 @Description(shortDefinition="Formula feeding instruction as structured data", formalDefinition="Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours." ) 1694 protected List<NutritionOrderEnteralFormulaAdministrationComponent> administration; 1695 1696 /** 1697 * The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours. 1698 */ 1699 @Child(name = "maxVolumeToDeliver", type = {SimpleQuantity.class}, order=8, min=0, max=1, modifier=false, summary=false) 1700 @Description(shortDefinition="Upper limit on formula volume per unit of time", formalDefinition="The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours." ) 1701 protected SimpleQuantity maxVolumeToDeliver; 1702 1703 /** 1704 * Free text formula administration, feeding instructions or additional instructions or information. 1705 */ 1706 @Child(name = "administrationInstruction", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 1707 @Description(shortDefinition="Formula feeding instructions expressed as text", formalDefinition="Free text formula administration, feeding instructions or additional instructions or information." ) 1708 protected StringType administrationInstruction; 1709 1710 private static final long serialVersionUID = 292116061L; 1711 1712 /** 1713 * Constructor 1714 */ 1715 public NutritionOrderEnteralFormulaComponent() { 1716 super(); 1717 } 1718 1719 /** 1720 * @return {@link #baseFormulaType} (The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.) 1721 */ 1722 public CodeableConcept getBaseFormulaType() { 1723 if (this.baseFormulaType == null) 1724 if (Configuration.errorOnAutoCreate()) 1725 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.baseFormulaType"); 1726 else if (Configuration.doAutoCreate()) 1727 this.baseFormulaType = new CodeableConcept(); // cc 1728 return this.baseFormulaType; 1729 } 1730 1731 public boolean hasBaseFormulaType() { 1732 return this.baseFormulaType != null && !this.baseFormulaType.isEmpty(); 1733 } 1734 1735 /** 1736 * @param value {@link #baseFormulaType} (The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.) 1737 */ 1738 public NutritionOrderEnteralFormulaComponent setBaseFormulaType(CodeableConcept value) { 1739 this.baseFormulaType = value; 1740 return this; 1741 } 1742 1743 /** 1744 * @return {@link #baseFormulaProductName} (The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula".). This is the underlying object with id, value and extensions. The accessor "getBaseFormulaProductName" gives direct access to the value 1745 */ 1746 public StringType getBaseFormulaProductNameElement() { 1747 if (this.baseFormulaProductName == null) 1748 if (Configuration.errorOnAutoCreate()) 1749 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.baseFormulaProductName"); 1750 else if (Configuration.doAutoCreate()) 1751 this.baseFormulaProductName = new StringType(); // bb 1752 return this.baseFormulaProductName; 1753 } 1754 1755 public boolean hasBaseFormulaProductNameElement() { 1756 return this.baseFormulaProductName != null && !this.baseFormulaProductName.isEmpty(); 1757 } 1758 1759 public boolean hasBaseFormulaProductName() { 1760 return this.baseFormulaProductName != null && !this.baseFormulaProductName.isEmpty(); 1761 } 1762 1763 /** 1764 * @param value {@link #baseFormulaProductName} (The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula".). This is the underlying object with id, value and extensions. The accessor "getBaseFormulaProductName" gives direct access to the value 1765 */ 1766 public NutritionOrderEnteralFormulaComponent setBaseFormulaProductNameElement(StringType value) { 1767 this.baseFormulaProductName = value; 1768 return this; 1769 } 1770 1771 /** 1772 * @return The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". 1773 */ 1774 public String getBaseFormulaProductName() { 1775 return this.baseFormulaProductName == null ? null : this.baseFormulaProductName.getValue(); 1776 } 1777 1778 /** 1779 * @param value The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". 1780 */ 1781 public NutritionOrderEnteralFormulaComponent setBaseFormulaProductName(String value) { 1782 if (Utilities.noString(value)) 1783 this.baseFormulaProductName = null; 1784 else { 1785 if (this.baseFormulaProductName == null) 1786 this.baseFormulaProductName = new StringType(); 1787 this.baseFormulaProductName.setValue(value); 1788 } 1789 return this; 1790 } 1791 1792 /** 1793 * @return {@link #additiveType} (Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.) 1794 */ 1795 public CodeableConcept getAdditiveType() { 1796 if (this.additiveType == null) 1797 if (Configuration.errorOnAutoCreate()) 1798 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.additiveType"); 1799 else if (Configuration.doAutoCreate()) 1800 this.additiveType = new CodeableConcept(); // cc 1801 return this.additiveType; 1802 } 1803 1804 public boolean hasAdditiveType() { 1805 return this.additiveType != null && !this.additiveType.isEmpty(); 1806 } 1807 1808 /** 1809 * @param value {@link #additiveType} (Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.) 1810 */ 1811 public NutritionOrderEnteralFormulaComponent setAdditiveType(CodeableConcept value) { 1812 this.additiveType = value; 1813 return this; 1814 } 1815 1816 /** 1817 * @return {@link #additiveProductName} (The product or brand name of the type of modular component to be added to the formula.). This is the underlying object with id, value and extensions. The accessor "getAdditiveProductName" gives direct access to the value 1818 */ 1819 public StringType getAdditiveProductNameElement() { 1820 if (this.additiveProductName == null) 1821 if (Configuration.errorOnAutoCreate()) 1822 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.additiveProductName"); 1823 else if (Configuration.doAutoCreate()) 1824 this.additiveProductName = new StringType(); // bb 1825 return this.additiveProductName; 1826 } 1827 1828 public boolean hasAdditiveProductNameElement() { 1829 return this.additiveProductName != null && !this.additiveProductName.isEmpty(); 1830 } 1831 1832 public boolean hasAdditiveProductName() { 1833 return this.additiveProductName != null && !this.additiveProductName.isEmpty(); 1834 } 1835 1836 /** 1837 * @param value {@link #additiveProductName} (The product or brand name of the type of modular component to be added to the formula.). This is the underlying object with id, value and extensions. The accessor "getAdditiveProductName" gives direct access to the value 1838 */ 1839 public NutritionOrderEnteralFormulaComponent setAdditiveProductNameElement(StringType value) { 1840 this.additiveProductName = value; 1841 return this; 1842 } 1843 1844 /** 1845 * @return The product or brand name of the type of modular component to be added to the formula. 1846 */ 1847 public String getAdditiveProductName() { 1848 return this.additiveProductName == null ? null : this.additiveProductName.getValue(); 1849 } 1850 1851 /** 1852 * @param value The product or brand name of the type of modular component to be added to the formula. 1853 */ 1854 public NutritionOrderEnteralFormulaComponent setAdditiveProductName(String value) { 1855 if (Utilities.noString(value)) 1856 this.additiveProductName = null; 1857 else { 1858 if (this.additiveProductName == null) 1859 this.additiveProductName = new StringType(); 1860 this.additiveProductName.setValue(value); 1861 } 1862 return this; 1863 } 1864 1865 /** 1866 * @return {@link #caloricDensity} (The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.) 1867 */ 1868 public SimpleQuantity getCaloricDensity() { 1869 if (this.caloricDensity == null) 1870 if (Configuration.errorOnAutoCreate()) 1871 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.caloricDensity"); 1872 else if (Configuration.doAutoCreate()) 1873 this.caloricDensity = new SimpleQuantity(); // cc 1874 return this.caloricDensity; 1875 } 1876 1877 public boolean hasCaloricDensity() { 1878 return this.caloricDensity != null && !this.caloricDensity.isEmpty(); 1879 } 1880 1881 /** 1882 * @param value {@link #caloricDensity} (The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.) 1883 */ 1884 public NutritionOrderEnteralFormulaComponent setCaloricDensity(SimpleQuantity value) { 1885 this.caloricDensity = value; 1886 return this; 1887 } 1888 1889 /** 1890 * @return {@link #routeofAdministration} (The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.) 1891 */ 1892 public CodeableConcept getRouteofAdministration() { 1893 if (this.routeofAdministration == null) 1894 if (Configuration.errorOnAutoCreate()) 1895 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.routeofAdministration"); 1896 else if (Configuration.doAutoCreate()) 1897 this.routeofAdministration = new CodeableConcept(); // cc 1898 return this.routeofAdministration; 1899 } 1900 1901 public boolean hasRouteofAdministration() { 1902 return this.routeofAdministration != null && !this.routeofAdministration.isEmpty(); 1903 } 1904 1905 /** 1906 * @param value {@link #routeofAdministration} (The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.) 1907 */ 1908 public NutritionOrderEnteralFormulaComponent setRouteofAdministration(CodeableConcept value) { 1909 this.routeofAdministration = value; 1910 return this; 1911 } 1912 1913 /** 1914 * @return {@link #administration} (Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.) 1915 */ 1916 public List<NutritionOrderEnteralFormulaAdministrationComponent> getAdministration() { 1917 if (this.administration == null) 1918 this.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 1919 return this.administration; 1920 } 1921 1922 /** 1923 * @return Returns a reference to <code>this</code> for easy method chaining 1924 */ 1925 public NutritionOrderEnteralFormulaComponent setAdministration(List<NutritionOrderEnteralFormulaAdministrationComponent> theAdministration) { 1926 this.administration = theAdministration; 1927 return this; 1928 } 1929 1930 public boolean hasAdministration() { 1931 if (this.administration == null) 1932 return false; 1933 for (NutritionOrderEnteralFormulaAdministrationComponent item : this.administration) 1934 if (!item.isEmpty()) 1935 return true; 1936 return false; 1937 } 1938 1939 public NutritionOrderEnteralFormulaAdministrationComponent addAdministration() { //3 1940 NutritionOrderEnteralFormulaAdministrationComponent t = new NutritionOrderEnteralFormulaAdministrationComponent(); 1941 if (this.administration == null) 1942 this.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 1943 this.administration.add(t); 1944 return t; 1945 } 1946 1947 public NutritionOrderEnteralFormulaComponent addAdministration(NutritionOrderEnteralFormulaAdministrationComponent t) { //3 1948 if (t == null) 1949 return this; 1950 if (this.administration == null) 1951 this.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 1952 this.administration.add(t); 1953 return this; 1954 } 1955 1956 /** 1957 * @return The first repetition of repeating field {@link #administration}, creating it if it does not already exist 1958 */ 1959 public NutritionOrderEnteralFormulaAdministrationComponent getAdministrationFirstRep() { 1960 if (getAdministration().isEmpty()) { 1961 addAdministration(); 1962 } 1963 return getAdministration().get(0); 1964 } 1965 1966 /** 1967 * @return {@link #maxVolumeToDeliver} (The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.) 1968 */ 1969 public SimpleQuantity getMaxVolumeToDeliver() { 1970 if (this.maxVolumeToDeliver == null) 1971 if (Configuration.errorOnAutoCreate()) 1972 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.maxVolumeToDeliver"); 1973 else if (Configuration.doAutoCreate()) 1974 this.maxVolumeToDeliver = new SimpleQuantity(); // cc 1975 return this.maxVolumeToDeliver; 1976 } 1977 1978 public boolean hasMaxVolumeToDeliver() { 1979 return this.maxVolumeToDeliver != null && !this.maxVolumeToDeliver.isEmpty(); 1980 } 1981 1982 /** 1983 * @param value {@link #maxVolumeToDeliver} (The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.) 1984 */ 1985 public NutritionOrderEnteralFormulaComponent setMaxVolumeToDeliver(SimpleQuantity value) { 1986 this.maxVolumeToDeliver = value; 1987 return this; 1988 } 1989 1990 /** 1991 * @return {@link #administrationInstruction} (Free text formula administration, feeding instructions or additional instructions or information.). This is the underlying object with id, value and extensions. The accessor "getAdministrationInstruction" gives direct access to the value 1992 */ 1993 public StringType getAdministrationInstructionElement() { 1994 if (this.administrationInstruction == null) 1995 if (Configuration.errorOnAutoCreate()) 1996 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.administrationInstruction"); 1997 else if (Configuration.doAutoCreate()) 1998 this.administrationInstruction = new StringType(); // bb 1999 return this.administrationInstruction; 2000 } 2001 2002 public boolean hasAdministrationInstructionElement() { 2003 return this.administrationInstruction != null && !this.administrationInstruction.isEmpty(); 2004 } 2005 2006 public boolean hasAdministrationInstruction() { 2007 return this.administrationInstruction != null && !this.administrationInstruction.isEmpty(); 2008 } 2009 2010 /** 2011 * @param value {@link #administrationInstruction} (Free text formula administration, feeding instructions or additional instructions or information.). This is the underlying object with id, value and extensions. The accessor "getAdministrationInstruction" gives direct access to the value 2012 */ 2013 public NutritionOrderEnteralFormulaComponent setAdministrationInstructionElement(StringType value) { 2014 this.administrationInstruction = value; 2015 return this; 2016 } 2017 2018 /** 2019 * @return Free text formula administration, feeding instructions or additional instructions or information. 2020 */ 2021 public String getAdministrationInstruction() { 2022 return this.administrationInstruction == null ? null : this.administrationInstruction.getValue(); 2023 } 2024 2025 /** 2026 * @param value Free text formula administration, feeding instructions or additional instructions or information. 2027 */ 2028 public NutritionOrderEnteralFormulaComponent setAdministrationInstruction(String value) { 2029 if (Utilities.noString(value)) 2030 this.administrationInstruction = null; 2031 else { 2032 if (this.administrationInstruction == null) 2033 this.administrationInstruction = new StringType(); 2034 this.administrationInstruction.setValue(value); 2035 } 2036 return this; 2037 } 2038 2039 protected void listChildren(List<Property> children) { 2040 super.listChildren(children); 2041 children.add(new Property("baseFormulaType", "CodeableConcept", "The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.", 0, 1, baseFormulaType)); 2042 children.add(new Property("baseFormulaProductName", "string", "The product or brand name of the enteral or infant formula product such as \"ACME Adult Standard Formula\".", 0, 1, baseFormulaProductName)); 2043 children.add(new Property("additiveType", "CodeableConcept", "Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.", 0, 1, additiveType)); 2044 children.add(new Property("additiveProductName", "string", "The product or brand name of the type of modular component to be added to the formula.", 0, 1, additiveProductName)); 2045 children.add(new Property("caloricDensity", "SimpleQuantity", "The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.", 0, 1, caloricDensity)); 2046 children.add(new Property("routeofAdministration", "CodeableConcept", "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", 0, 1, routeofAdministration)); 2047 children.add(new Property("administration", "", "Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.", 0, java.lang.Integer.MAX_VALUE, administration)); 2048 children.add(new Property("maxVolumeToDeliver", "SimpleQuantity", "The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.", 0, 1, maxVolumeToDeliver)); 2049 children.add(new Property("administrationInstruction", "string", "Free text formula administration, feeding instructions or additional instructions or information.", 0, 1, administrationInstruction)); 2050 } 2051 2052 @Override 2053 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2054 switch (_hash) { 2055 case -138930641: /*baseFormulaType*/ return new Property("baseFormulaType", "CodeableConcept", "The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.", 0, 1, baseFormulaType); 2056 case -1267705979: /*baseFormulaProductName*/ return new Property("baseFormulaProductName", "string", "The product or brand name of the enteral or infant formula product such as \"ACME Adult Standard Formula\".", 0, 1, baseFormulaProductName); 2057 case -470746842: /*additiveType*/ return new Property("additiveType", "CodeableConcept", "Indicates the type of modular component such as protein, carbohydrate, fat or fiber to be provided in addition to or mixed with the base formula.", 0, 1, additiveType); 2058 case 488079534: /*additiveProductName*/ return new Property("additiveProductName", "string", "The product or brand name of the type of modular component to be added to the formula.", 0, 1, additiveProductName); 2059 case 186983261: /*caloricDensity*/ return new Property("caloricDensity", "SimpleQuantity", "The amount of energy (calories) that the formula should provide per specified volume, typically per mL or fluid oz. For example, an infant may require a formula that provides 24 calories per fluid ounce or an adult may require an enteral formula that provides 1.5 calorie/mL.", 0, 1, caloricDensity); 2060 case -1710107042: /*routeofAdministration*/ return new Property("routeofAdministration", "CodeableConcept", "The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube.", 0, 1, routeofAdministration); 2061 case 1255702622: /*administration*/ return new Property("administration", "", "Formula administration instructions as structured data. This repeating structure allows for changing the administration rate or volume over time for both bolus and continuous feeding. An example of this would be an instruction to increase the rate of continuous feeding every 2 hours.", 0, java.lang.Integer.MAX_VALUE, administration); 2062 case 2017924652: /*maxVolumeToDeliver*/ return new Property("maxVolumeToDeliver", "SimpleQuantity", "The maximum total quantity of formula that may be administered to a subject over the period of time, e.g. 1440 mL over 24 hours.", 0, 1, maxVolumeToDeliver); 2063 case 427085136: /*administrationInstruction*/ return new Property("administrationInstruction", "string", "Free text formula administration, feeding instructions or additional instructions or information.", 0, 1, administrationInstruction); 2064 default: return super.getNamedProperty(_hash, _name, _checkValid); 2065 } 2066 2067 } 2068 2069 @Override 2070 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2071 switch (hash) { 2072 case -138930641: /*baseFormulaType*/ return this.baseFormulaType == null ? new Base[0] : new Base[] {this.baseFormulaType}; // CodeableConcept 2073 case -1267705979: /*baseFormulaProductName*/ return this.baseFormulaProductName == null ? new Base[0] : new Base[] {this.baseFormulaProductName}; // StringType 2074 case -470746842: /*additiveType*/ return this.additiveType == null ? new Base[0] : new Base[] {this.additiveType}; // CodeableConcept 2075 case 488079534: /*additiveProductName*/ return this.additiveProductName == null ? new Base[0] : new Base[] {this.additiveProductName}; // StringType 2076 case 186983261: /*caloricDensity*/ return this.caloricDensity == null ? new Base[0] : new Base[] {this.caloricDensity}; // SimpleQuantity 2077 case -1710107042: /*routeofAdministration*/ return this.routeofAdministration == null ? new Base[0] : new Base[] {this.routeofAdministration}; // CodeableConcept 2078 case 1255702622: /*administration*/ return this.administration == null ? new Base[0] : this.administration.toArray(new Base[this.administration.size()]); // NutritionOrderEnteralFormulaAdministrationComponent 2079 case 2017924652: /*maxVolumeToDeliver*/ return this.maxVolumeToDeliver == null ? new Base[0] : new Base[] {this.maxVolumeToDeliver}; // SimpleQuantity 2080 case 427085136: /*administrationInstruction*/ return this.administrationInstruction == null ? new Base[0] : new Base[] {this.administrationInstruction}; // StringType 2081 default: return super.getProperty(hash, name, checkValid); 2082 } 2083 2084 } 2085 2086 @Override 2087 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2088 switch (hash) { 2089 case -138930641: // baseFormulaType 2090 this.baseFormulaType = castToCodeableConcept(value); // CodeableConcept 2091 return value; 2092 case -1267705979: // baseFormulaProductName 2093 this.baseFormulaProductName = castToString(value); // StringType 2094 return value; 2095 case -470746842: // additiveType 2096 this.additiveType = castToCodeableConcept(value); // CodeableConcept 2097 return value; 2098 case 488079534: // additiveProductName 2099 this.additiveProductName = castToString(value); // StringType 2100 return value; 2101 case 186983261: // caloricDensity 2102 this.caloricDensity = castToSimpleQuantity(value); // SimpleQuantity 2103 return value; 2104 case -1710107042: // routeofAdministration 2105 this.routeofAdministration = castToCodeableConcept(value); // CodeableConcept 2106 return value; 2107 case 1255702622: // administration 2108 this.getAdministration().add((NutritionOrderEnteralFormulaAdministrationComponent) value); // NutritionOrderEnteralFormulaAdministrationComponent 2109 return value; 2110 case 2017924652: // maxVolumeToDeliver 2111 this.maxVolumeToDeliver = castToSimpleQuantity(value); // SimpleQuantity 2112 return value; 2113 case 427085136: // administrationInstruction 2114 this.administrationInstruction = castToString(value); // StringType 2115 return value; 2116 default: return super.setProperty(hash, name, value); 2117 } 2118 2119 } 2120 2121 @Override 2122 public Base setProperty(String name, Base value) throws FHIRException { 2123 if (name.equals("baseFormulaType")) { 2124 this.baseFormulaType = castToCodeableConcept(value); // CodeableConcept 2125 } else if (name.equals("baseFormulaProductName")) { 2126 this.baseFormulaProductName = castToString(value); // StringType 2127 } else if (name.equals("additiveType")) { 2128 this.additiveType = castToCodeableConcept(value); // CodeableConcept 2129 } else if (name.equals("additiveProductName")) { 2130 this.additiveProductName = castToString(value); // StringType 2131 } else if (name.equals("caloricDensity")) { 2132 this.caloricDensity = castToSimpleQuantity(value); // SimpleQuantity 2133 } else if (name.equals("routeofAdministration")) { 2134 this.routeofAdministration = castToCodeableConcept(value); // CodeableConcept 2135 } else if (name.equals("administration")) { 2136 this.getAdministration().add((NutritionOrderEnteralFormulaAdministrationComponent) value); 2137 } else if (name.equals("maxVolumeToDeliver")) { 2138 this.maxVolumeToDeliver = castToSimpleQuantity(value); // SimpleQuantity 2139 } else if (name.equals("administrationInstruction")) { 2140 this.administrationInstruction = castToString(value); // StringType 2141 } else 2142 return super.setProperty(name, value); 2143 return value; 2144 } 2145 2146 @Override 2147 public Base makeProperty(int hash, String name) throws FHIRException { 2148 switch (hash) { 2149 case -138930641: return getBaseFormulaType(); 2150 case -1267705979: return getBaseFormulaProductNameElement(); 2151 case -470746842: return getAdditiveType(); 2152 case 488079534: return getAdditiveProductNameElement(); 2153 case 186983261: return getCaloricDensity(); 2154 case -1710107042: return getRouteofAdministration(); 2155 case 1255702622: return addAdministration(); 2156 case 2017924652: return getMaxVolumeToDeliver(); 2157 case 427085136: return getAdministrationInstructionElement(); 2158 default: return super.makeProperty(hash, name); 2159 } 2160 2161 } 2162 2163 @Override 2164 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2165 switch (hash) { 2166 case -138930641: /*baseFormulaType*/ return new String[] {"CodeableConcept"}; 2167 case -1267705979: /*baseFormulaProductName*/ return new String[] {"string"}; 2168 case -470746842: /*additiveType*/ return new String[] {"CodeableConcept"}; 2169 case 488079534: /*additiveProductName*/ return new String[] {"string"}; 2170 case 186983261: /*caloricDensity*/ return new String[] {"SimpleQuantity"}; 2171 case -1710107042: /*routeofAdministration*/ return new String[] {"CodeableConcept"}; 2172 case 1255702622: /*administration*/ return new String[] {}; 2173 case 2017924652: /*maxVolumeToDeliver*/ return new String[] {"SimpleQuantity"}; 2174 case 427085136: /*administrationInstruction*/ return new String[] {"string"}; 2175 default: return super.getTypesForProperty(hash, name); 2176 } 2177 2178 } 2179 2180 @Override 2181 public Base addChild(String name) throws FHIRException { 2182 if (name.equals("baseFormulaType")) { 2183 this.baseFormulaType = new CodeableConcept(); 2184 return this.baseFormulaType; 2185 } 2186 else if (name.equals("baseFormulaProductName")) { 2187 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.baseFormulaProductName"); 2188 } 2189 else if (name.equals("additiveType")) { 2190 this.additiveType = new CodeableConcept(); 2191 return this.additiveType; 2192 } 2193 else if (name.equals("additiveProductName")) { 2194 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.additiveProductName"); 2195 } 2196 else if (name.equals("caloricDensity")) { 2197 this.caloricDensity = new SimpleQuantity(); 2198 return this.caloricDensity; 2199 } 2200 else if (name.equals("routeofAdministration")) { 2201 this.routeofAdministration = new CodeableConcept(); 2202 return this.routeofAdministration; 2203 } 2204 else if (name.equals("administration")) { 2205 return addAdministration(); 2206 } 2207 else if (name.equals("maxVolumeToDeliver")) { 2208 this.maxVolumeToDeliver = new SimpleQuantity(); 2209 return this.maxVolumeToDeliver; 2210 } 2211 else if (name.equals("administrationInstruction")) { 2212 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.administrationInstruction"); 2213 } 2214 else 2215 return super.addChild(name); 2216 } 2217 2218 public NutritionOrderEnteralFormulaComponent copy() { 2219 NutritionOrderEnteralFormulaComponent dst = new NutritionOrderEnteralFormulaComponent(); 2220 copyValues(dst); 2221 dst.baseFormulaType = baseFormulaType == null ? null : baseFormulaType.copy(); 2222 dst.baseFormulaProductName = baseFormulaProductName == null ? null : baseFormulaProductName.copy(); 2223 dst.additiveType = additiveType == null ? null : additiveType.copy(); 2224 dst.additiveProductName = additiveProductName == null ? null : additiveProductName.copy(); 2225 dst.caloricDensity = caloricDensity == null ? null : caloricDensity.copy(); 2226 dst.routeofAdministration = routeofAdministration == null ? null : routeofAdministration.copy(); 2227 if (administration != null) { 2228 dst.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 2229 for (NutritionOrderEnteralFormulaAdministrationComponent i : administration) 2230 dst.administration.add(i.copy()); 2231 }; 2232 dst.maxVolumeToDeliver = maxVolumeToDeliver == null ? null : maxVolumeToDeliver.copy(); 2233 dst.administrationInstruction = administrationInstruction == null ? null : administrationInstruction.copy(); 2234 return dst; 2235 } 2236 2237 @Override 2238 public boolean equalsDeep(Base other_) { 2239 if (!super.equalsDeep(other_)) 2240 return false; 2241 if (!(other_ instanceof NutritionOrderEnteralFormulaComponent)) 2242 return false; 2243 NutritionOrderEnteralFormulaComponent o = (NutritionOrderEnteralFormulaComponent) other_; 2244 return compareDeep(baseFormulaType, o.baseFormulaType, true) && compareDeep(baseFormulaProductName, o.baseFormulaProductName, true) 2245 && compareDeep(additiveType, o.additiveType, true) && compareDeep(additiveProductName, o.additiveProductName, true) 2246 && compareDeep(caloricDensity, o.caloricDensity, true) && compareDeep(routeofAdministration, o.routeofAdministration, true) 2247 && compareDeep(administration, o.administration, true) && compareDeep(maxVolumeToDeliver, o.maxVolumeToDeliver, true) 2248 && compareDeep(administrationInstruction, o.administrationInstruction, true); 2249 } 2250 2251 @Override 2252 public boolean equalsShallow(Base other_) { 2253 if (!super.equalsShallow(other_)) 2254 return false; 2255 if (!(other_ instanceof NutritionOrderEnteralFormulaComponent)) 2256 return false; 2257 NutritionOrderEnteralFormulaComponent o = (NutritionOrderEnteralFormulaComponent) other_; 2258 return compareValues(baseFormulaProductName, o.baseFormulaProductName, true) && compareValues(additiveProductName, o.additiveProductName, true) 2259 && compareValues(administrationInstruction, o.administrationInstruction, true); 2260 } 2261 2262 public boolean isEmpty() { 2263 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(baseFormulaType, baseFormulaProductName 2264 , additiveType, additiveProductName, caloricDensity, routeofAdministration, administration 2265 , maxVolumeToDeliver, administrationInstruction); 2266 } 2267 2268 public String fhirType() { 2269 return "NutritionOrder.enteralFormula"; 2270 2271 } 2272 2273 } 2274 2275 @Block() 2276 public static class NutritionOrderEnteralFormulaAdministrationComponent extends BackboneElement implements IBaseBackboneElement { 2277 /** 2278 * The time period and frequency at which the enteral formula should be delivered to the patient. 2279 */ 2280 @Child(name = "schedule", type = {Timing.class}, order=1, min=0, max=1, modifier=false, summary=false) 2281 @Description(shortDefinition="Scheduled frequency of enteral feeding", formalDefinition="The time period and frequency at which the enteral formula should be delivered to the patient." ) 2282 protected Timing schedule; 2283 2284 /** 2285 * The volume of formula to provide to the patient per the specified administration schedule. 2286 */ 2287 @Child(name = "quantity", type = {SimpleQuantity.class}, order=2, min=0, max=1, modifier=false, summary=false) 2288 @Description(shortDefinition="The volume of formula to provide", formalDefinition="The volume of formula to provide to the patient per the specified administration schedule." ) 2289 protected SimpleQuantity quantity; 2290 2291 /** 2292 * The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. 2293 */ 2294 @Child(name = "rate", type = {SimpleQuantity.class, Ratio.class}, order=3, min=0, max=1, modifier=false, summary=false) 2295 @Description(shortDefinition="Speed with which the formula is provided per period of time", formalDefinition="The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule." ) 2296 protected Type rate; 2297 2298 private static final long serialVersionUID = 1895031997L; 2299 2300 /** 2301 * Constructor 2302 */ 2303 public NutritionOrderEnteralFormulaAdministrationComponent() { 2304 super(); 2305 } 2306 2307 /** 2308 * @return {@link #schedule} (The time period and frequency at which the enteral formula should be delivered to the patient.) 2309 */ 2310 public Timing getSchedule() { 2311 if (this.schedule == null) 2312 if (Configuration.errorOnAutoCreate()) 2313 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdministrationComponent.schedule"); 2314 else if (Configuration.doAutoCreate()) 2315 this.schedule = new Timing(); // cc 2316 return this.schedule; 2317 } 2318 2319 public boolean hasSchedule() { 2320 return this.schedule != null && !this.schedule.isEmpty(); 2321 } 2322 2323 /** 2324 * @param value {@link #schedule} (The time period and frequency at which the enteral formula should be delivered to the patient.) 2325 */ 2326 public NutritionOrderEnteralFormulaAdministrationComponent setSchedule(Timing value) { 2327 this.schedule = value; 2328 return this; 2329 } 2330 2331 /** 2332 * @return {@link #quantity} (The volume of formula to provide to the patient per the specified administration schedule.) 2333 */ 2334 public SimpleQuantity getQuantity() { 2335 if (this.quantity == null) 2336 if (Configuration.errorOnAutoCreate()) 2337 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdministrationComponent.quantity"); 2338 else if (Configuration.doAutoCreate()) 2339 this.quantity = new SimpleQuantity(); // cc 2340 return this.quantity; 2341 } 2342 2343 public boolean hasQuantity() { 2344 return this.quantity != null && !this.quantity.isEmpty(); 2345 } 2346 2347 /** 2348 * @param value {@link #quantity} (The volume of formula to provide to the patient per the specified administration schedule.) 2349 */ 2350 public NutritionOrderEnteralFormulaAdministrationComponent setQuantity(SimpleQuantity value) { 2351 this.quantity = value; 2352 return this; 2353 } 2354 2355 /** 2356 * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 2357 */ 2358 public Type getRate() { 2359 return this.rate; 2360 } 2361 2362 /** 2363 * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 2364 */ 2365 public SimpleQuantity getRateSimpleQuantity() throws FHIRException { 2366 if (this.rate == null) 2367 return null; 2368 if (!(this.rate instanceof SimpleQuantity)) 2369 throw new FHIRException("Type mismatch: the type SimpleQuantity was expected, but "+this.rate.getClass().getName()+" was encountered"); 2370 return (SimpleQuantity) this.rate; 2371 } 2372 2373 public boolean hasRateSimpleQuantity() { 2374 return this != null && this.rate instanceof SimpleQuantity; 2375 } 2376 2377 /** 2378 * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 2379 */ 2380 public Ratio getRateRatio() throws FHIRException { 2381 if (this.rate == null) 2382 return null; 2383 if (!(this.rate instanceof Ratio)) 2384 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); 2385 return (Ratio) this.rate; 2386 } 2387 2388 public boolean hasRateRatio() { 2389 return this != null && this.rate instanceof Ratio; 2390 } 2391 2392 public boolean hasRate() { 2393 return this.rate != null && !this.rate.isEmpty(); 2394 } 2395 2396 /** 2397 * @param value {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 2398 */ 2399 public NutritionOrderEnteralFormulaAdministrationComponent setRate(Type value) throws FHIRFormatError { 2400 if (value != null && !(value instanceof Quantity || value instanceof Ratio)) 2401 throw new FHIRFormatError("Not the right type for NutritionOrder.enteralFormula.administration.rate[x]: "+value.fhirType()); 2402 this.rate = value; 2403 return this; 2404 } 2405 2406 protected void listChildren(List<Property> children) { 2407 super.listChildren(children); 2408 children.add(new Property("schedule", "Timing", "The time period and frequency at which the enteral formula should be delivered to the patient.", 0, 1, schedule)); 2409 children.add(new Property("quantity", "SimpleQuantity", "The volume of formula to provide to the patient per the specified administration schedule.", 0, 1, quantity)); 2410 children.add(new Property("rate[x]", "SimpleQuantity|Ratio", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, 1, rate)); 2411 } 2412 2413 @Override 2414 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2415 switch (_hash) { 2416 case -697920873: /*schedule*/ return new Property("schedule", "Timing", "The time period and frequency at which the enteral formula should be delivered to the patient.", 0, 1, schedule); 2417 case -1285004149: /*quantity*/ return new Property("quantity", "SimpleQuantity", "The volume of formula to provide to the patient per the specified administration schedule.", 0, 1, quantity); 2418 case 983460768: /*rate[x]*/ return new Property("rate[x]", "SimpleQuantity|Ratio", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, 1, rate); 2419 case 3493088: /*rate*/ return new Property("rate[x]", "SimpleQuantity|Ratio", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, 1, rate); 2420 case -2121057955: /*rateSimpleQuantity*/ return new Property("rate[x]", "SimpleQuantity|Ratio", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, 1, rate); 2421 case 204021515: /*rateRatio*/ return new Property("rate[x]", "SimpleQuantity|Ratio", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, 1, rate); 2422 default: return super.getNamedProperty(_hash, _name, _checkValid); 2423 } 2424 2425 } 2426 2427 @Override 2428 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2429 switch (hash) { 2430 case -697920873: /*schedule*/ return this.schedule == null ? new Base[0] : new Base[] {this.schedule}; // Timing 2431 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 2432 case 3493088: /*rate*/ return this.rate == null ? new Base[0] : new Base[] {this.rate}; // Type 2433 default: return super.getProperty(hash, name, checkValid); 2434 } 2435 2436 } 2437 2438 @Override 2439 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2440 switch (hash) { 2441 case -697920873: // schedule 2442 this.schedule = castToTiming(value); // Timing 2443 return value; 2444 case -1285004149: // quantity 2445 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 2446 return value; 2447 case 3493088: // rate 2448 this.rate = castToType(value); // Type 2449 return value; 2450 default: return super.setProperty(hash, name, value); 2451 } 2452 2453 } 2454 2455 @Override 2456 public Base setProperty(String name, Base value) throws FHIRException { 2457 if (name.equals("schedule")) { 2458 this.schedule = castToTiming(value); // Timing 2459 } else if (name.equals("quantity")) { 2460 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 2461 } else if (name.equals("rate[x]")) { 2462 this.rate = castToType(value); // Type 2463 } else 2464 return super.setProperty(name, value); 2465 return value; 2466 } 2467 2468 @Override 2469 public Base makeProperty(int hash, String name) throws FHIRException { 2470 switch (hash) { 2471 case -697920873: return getSchedule(); 2472 case -1285004149: return getQuantity(); 2473 case 983460768: return getRate(); 2474 case 3493088: return getRate(); 2475 default: return super.makeProperty(hash, name); 2476 } 2477 2478 } 2479 2480 @Override 2481 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2482 switch (hash) { 2483 case -697920873: /*schedule*/ return new String[] {"Timing"}; 2484 case -1285004149: /*quantity*/ return new String[] {"SimpleQuantity"}; 2485 case 3493088: /*rate*/ return new String[] {"SimpleQuantity", "Ratio"}; 2486 default: return super.getTypesForProperty(hash, name); 2487 } 2488 2489 } 2490 2491 @Override 2492 public Base addChild(String name) throws FHIRException { 2493 if (name.equals("schedule")) { 2494 this.schedule = new Timing(); 2495 return this.schedule; 2496 } 2497 else if (name.equals("quantity")) { 2498 this.quantity = new SimpleQuantity(); 2499 return this.quantity; 2500 } 2501 else if (name.equals("rateSimpleQuantity")) { 2502 this.rate = new SimpleQuantity(); 2503 return this.rate; 2504 } 2505 else if (name.equals("rateRatio")) { 2506 this.rate = new Ratio(); 2507 return this.rate; 2508 } 2509 else 2510 return super.addChild(name); 2511 } 2512 2513 public NutritionOrderEnteralFormulaAdministrationComponent copy() { 2514 NutritionOrderEnteralFormulaAdministrationComponent dst = new NutritionOrderEnteralFormulaAdministrationComponent(); 2515 copyValues(dst); 2516 dst.schedule = schedule == null ? null : schedule.copy(); 2517 dst.quantity = quantity == null ? null : quantity.copy(); 2518 dst.rate = rate == null ? null : rate.copy(); 2519 return dst; 2520 } 2521 2522 @Override 2523 public boolean equalsDeep(Base other_) { 2524 if (!super.equalsDeep(other_)) 2525 return false; 2526 if (!(other_ instanceof NutritionOrderEnteralFormulaAdministrationComponent)) 2527 return false; 2528 NutritionOrderEnteralFormulaAdministrationComponent o = (NutritionOrderEnteralFormulaAdministrationComponent) other_; 2529 return compareDeep(schedule, o.schedule, true) && compareDeep(quantity, o.quantity, true) && compareDeep(rate, o.rate, true) 2530 ; 2531 } 2532 2533 @Override 2534 public boolean equalsShallow(Base other_) { 2535 if (!super.equalsShallow(other_)) 2536 return false; 2537 if (!(other_ instanceof NutritionOrderEnteralFormulaAdministrationComponent)) 2538 return false; 2539 NutritionOrderEnteralFormulaAdministrationComponent o = (NutritionOrderEnteralFormulaAdministrationComponent) other_; 2540 return true; 2541 } 2542 2543 public boolean isEmpty() { 2544 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(schedule, quantity, rate 2545 ); 2546 } 2547 2548 public String fhirType() { 2549 return "NutritionOrder.enteralFormula.administration"; 2550 2551 } 2552 2553 } 2554 2555 /** 2556 * Identifiers assigned to this order by the order sender or by the order receiver. 2557 */ 2558 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2559 @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) 2560 protected List<Identifier> identifier; 2561 2562 /** 2563 * The workflow status of the nutrition order/request. 2564 */ 2565 @Child(name = "status", type = {CodeType.class}, order=1, min=0, max=1, modifier=true, summary=true) 2566 @Description(shortDefinition="proposed | draft | planned | requested | active | on-hold | completed | cancelled | entered-in-error", formalDefinition="The workflow status of the nutrition order/request." ) 2567 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/nutrition-request-status") 2568 protected Enumeration<NutritionOrderStatus> status; 2569 2570 /** 2571 * The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding. 2572 */ 2573 @Child(name = "patient", type = {Patient.class}, order=2, min=1, max=1, modifier=false, summary=true) 2574 @Description(shortDefinition="The person who requires the diet, formula or nutritional supplement", formalDefinition="The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) 2575 protected Reference patient; 2576 2577 /** 2578 * The actual object that is the target of the reference (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 2579 */ 2580 protected Patient patientTarget; 2581 2582 /** 2583 * An encounter that provides additional information about the healthcare context in which this request is made. 2584 */ 2585 @Child(name = "encounter", type = {Encounter.class}, order=3, min=0, max=1, modifier=false, summary=false) 2586 @Description(shortDefinition="The encounter associated with this nutrition order", formalDefinition="An encounter that provides additional information about the healthcare context in which this request is made." ) 2587 protected Reference encounter; 2588 2589 /** 2590 * The actual object that is the target of the reference (An encounter that provides additional information about the healthcare context in which this request is made.) 2591 */ 2592 protected Encounter encounterTarget; 2593 2594 /** 2595 * The date and time that this nutrition order was requested. 2596 */ 2597 @Child(name = "dateTime", type = {DateTimeType.class}, order=4, min=1, max=1, modifier=false, summary=true) 2598 @Description(shortDefinition="Date and time the nutrition order was requested", formalDefinition="The date and time that this nutrition order was requested." ) 2599 protected DateTimeType dateTime; 2600 2601 /** 2602 * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. 2603 */ 2604 @Child(name = "orderer", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) 2605 @Description(shortDefinition="Who ordered the diet, formula or nutritional supplement", formalDefinition="The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings." ) 2606 protected Reference orderer; 2607 2608 /** 2609 * The actual object that is the target of the reference (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 2610 */ 2611 protected Practitioner ordererTarget; 2612 2613 /** 2614 * A link to a record of allergies or intolerances which should be included in the nutrition order. 2615 */ 2616 @Child(name = "allergyIntolerance", type = {AllergyIntolerance.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2617 @Description(shortDefinition="List of the patient's food and nutrition-related allergies and intolerances", formalDefinition="A link to a record of allergies or intolerances which should be included in the nutrition order." ) 2618 protected List<Reference> allergyIntolerance; 2619 /** 2620 * The actual objects that are the target of the reference (A link to a record of allergies or intolerances which should be included in the nutrition order.) 2621 */ 2622 protected List<AllergyIntolerance> allergyIntoleranceTarget; 2623 2624 2625 /** 2626 * This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. 2627 */ 2628 @Child(name = "foodPreferenceModifier", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2629 @Description(shortDefinition="Order-specific modifier about the type of food that should be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) 2630 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diet") 2631 protected List<CodeableConcept> foodPreferenceModifier; 2632 2633 /** 2634 * This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings. 2635 */ 2636 @Child(name = "excludeFoodModifier", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2637 @Description(shortDefinition="Order-specific modifier about the type of food that should not be given", formalDefinition="This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings." ) 2638 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/food-type") 2639 protected List<CodeableConcept> excludeFoodModifier; 2640 2641 /** 2642 * Diet given orally in contrast to enteral (tube) feeding. 2643 */ 2644 @Child(name = "oralDiet", type = {}, order=9, min=0, max=1, modifier=false, summary=false) 2645 @Description(shortDefinition="Oral diet components", formalDefinition="Diet given orally in contrast to enteral (tube) feeding." ) 2646 protected NutritionOrderOralDietComponent oralDiet; 2647 2648 /** 2649 * Oral nutritional products given in order to add further nutritional value to the patient's diet. 2650 */ 2651 @Child(name = "supplement", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2652 @Description(shortDefinition="Supplement components", formalDefinition="Oral nutritional products given in order to add further nutritional value to the patient's diet." ) 2653 protected List<NutritionOrderSupplementComponent> supplement; 2654 2655 /** 2656 * Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity. 2657 */ 2658 @Child(name = "enteralFormula", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 2659 @Description(shortDefinition="Enteral formula components", formalDefinition="Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity." ) 2660 protected NutritionOrderEnteralFormulaComponent enteralFormula; 2661 2662 private static final long serialVersionUID = 1429947433L; 2663 2664 /** 2665 * Constructor 2666 */ 2667 public NutritionOrder() { 2668 super(); 2669 } 2670 2671 /** 2672 * Constructor 2673 */ 2674 public NutritionOrder(Reference patient, DateTimeType dateTime) { 2675 super(); 2676 this.patient = patient; 2677 this.dateTime = dateTime; 2678 } 2679 2680 /** 2681 * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) 2682 */ 2683 public List<Identifier> getIdentifier() { 2684 if (this.identifier == null) 2685 this.identifier = new ArrayList<Identifier>(); 2686 return this.identifier; 2687 } 2688 2689 /** 2690 * @return Returns a reference to <code>this</code> for easy method chaining 2691 */ 2692 public NutritionOrder setIdentifier(List<Identifier> theIdentifier) { 2693 this.identifier = theIdentifier; 2694 return this; 2695 } 2696 2697 public boolean hasIdentifier() { 2698 if (this.identifier == null) 2699 return false; 2700 for (Identifier item : this.identifier) 2701 if (!item.isEmpty()) 2702 return true; 2703 return false; 2704 } 2705 2706 public Identifier addIdentifier() { //3 2707 Identifier t = new Identifier(); 2708 if (this.identifier == null) 2709 this.identifier = new ArrayList<Identifier>(); 2710 this.identifier.add(t); 2711 return t; 2712 } 2713 2714 public NutritionOrder addIdentifier(Identifier t) { //3 2715 if (t == null) 2716 return this; 2717 if (this.identifier == null) 2718 this.identifier = new ArrayList<Identifier>(); 2719 this.identifier.add(t); 2720 return this; 2721 } 2722 2723 /** 2724 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 2725 */ 2726 public Identifier getIdentifierFirstRep() { 2727 if (getIdentifier().isEmpty()) { 2728 addIdentifier(); 2729 } 2730 return getIdentifier().get(0); 2731 } 2732 2733 /** 2734 * @return {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2735 */ 2736 public Enumeration<NutritionOrderStatus> getStatusElement() { 2737 if (this.status == null) 2738 if (Configuration.errorOnAutoCreate()) 2739 throw new Error("Attempt to auto-create NutritionOrder.status"); 2740 else if (Configuration.doAutoCreate()) 2741 this.status = new Enumeration<NutritionOrderStatus>(new NutritionOrderStatusEnumFactory()); // bb 2742 return this.status; 2743 } 2744 2745 public boolean hasStatusElement() { 2746 return this.status != null && !this.status.isEmpty(); 2747 } 2748 2749 public boolean hasStatus() { 2750 return this.status != null && !this.status.isEmpty(); 2751 } 2752 2753 /** 2754 * @param value {@link #status} (The workflow status of the nutrition order/request.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2755 */ 2756 public NutritionOrder setStatusElement(Enumeration<NutritionOrderStatus> value) { 2757 this.status = value; 2758 return this; 2759 } 2760 2761 /** 2762 * @return The workflow status of the nutrition order/request. 2763 */ 2764 public NutritionOrderStatus getStatus() { 2765 return this.status == null ? null : this.status.getValue(); 2766 } 2767 2768 /** 2769 * @param value The workflow status of the nutrition order/request. 2770 */ 2771 public NutritionOrder setStatus(NutritionOrderStatus value) { 2772 if (value == null) 2773 this.status = null; 2774 else { 2775 if (this.status == null) 2776 this.status = new Enumeration<NutritionOrderStatus>(new NutritionOrderStatusEnumFactory()); 2777 this.status.setValue(value); 2778 } 2779 return this; 2780 } 2781 2782 /** 2783 * @return {@link #patient} (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 2784 */ 2785 public Reference getPatient() { 2786 if (this.patient == null) 2787 if (Configuration.errorOnAutoCreate()) 2788 throw new Error("Attempt to auto-create NutritionOrder.patient"); 2789 else if (Configuration.doAutoCreate()) 2790 this.patient = new Reference(); // cc 2791 return this.patient; 2792 } 2793 2794 public boolean hasPatient() { 2795 return this.patient != null && !this.patient.isEmpty(); 2796 } 2797 2798 /** 2799 * @param value {@link #patient} (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 2800 */ 2801 public NutritionOrder setPatient(Reference value) { 2802 this.patient = value; 2803 return this; 2804 } 2805 2806 /** 2807 * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 2808 */ 2809 public Patient getPatientTarget() { 2810 if (this.patientTarget == null) 2811 if (Configuration.errorOnAutoCreate()) 2812 throw new Error("Attempt to auto-create NutritionOrder.patient"); 2813 else if (Configuration.doAutoCreate()) 2814 this.patientTarget = new Patient(); // aa 2815 return this.patientTarget; 2816 } 2817 2818 /** 2819 * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 2820 */ 2821 public NutritionOrder setPatientTarget(Patient value) { 2822 this.patientTarget = value; 2823 return this; 2824 } 2825 2826 /** 2827 * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) 2828 */ 2829 public Reference getEncounter() { 2830 if (this.encounter == null) 2831 if (Configuration.errorOnAutoCreate()) 2832 throw new Error("Attempt to auto-create NutritionOrder.encounter"); 2833 else if (Configuration.doAutoCreate()) 2834 this.encounter = new Reference(); // cc 2835 return this.encounter; 2836 } 2837 2838 public boolean hasEncounter() { 2839 return this.encounter != null && !this.encounter.isEmpty(); 2840 } 2841 2842 /** 2843 * @param value {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) 2844 */ 2845 public NutritionOrder setEncounter(Reference value) { 2846 this.encounter = value; 2847 return this; 2848 } 2849 2850 /** 2851 * @return {@link #encounter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) 2852 */ 2853 public Encounter getEncounterTarget() { 2854 if (this.encounterTarget == null) 2855 if (Configuration.errorOnAutoCreate()) 2856 throw new Error("Attempt to auto-create NutritionOrder.encounter"); 2857 else if (Configuration.doAutoCreate()) 2858 this.encounterTarget = new Encounter(); // aa 2859 return this.encounterTarget; 2860 } 2861 2862 /** 2863 * @param value {@link #encounter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (An encounter that provides additional information about the healthcare context in which this request is made.) 2864 */ 2865 public NutritionOrder setEncounterTarget(Encounter value) { 2866 this.encounterTarget = value; 2867 return this; 2868 } 2869 2870 /** 2871 * @return {@link #dateTime} (The date and time that this nutrition order was requested.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 2872 */ 2873 public DateTimeType getDateTimeElement() { 2874 if (this.dateTime == null) 2875 if (Configuration.errorOnAutoCreate()) 2876 throw new Error("Attempt to auto-create NutritionOrder.dateTime"); 2877 else if (Configuration.doAutoCreate()) 2878 this.dateTime = new DateTimeType(); // bb 2879 return this.dateTime; 2880 } 2881 2882 public boolean hasDateTimeElement() { 2883 return this.dateTime != null && !this.dateTime.isEmpty(); 2884 } 2885 2886 public boolean hasDateTime() { 2887 return this.dateTime != null && !this.dateTime.isEmpty(); 2888 } 2889 2890 /** 2891 * @param value {@link #dateTime} (The date and time that this nutrition order was requested.). This is the underlying object with id, value and extensions. The accessor "getDateTime" gives direct access to the value 2892 */ 2893 public NutritionOrder setDateTimeElement(DateTimeType value) { 2894 this.dateTime = value; 2895 return this; 2896 } 2897 2898 /** 2899 * @return The date and time that this nutrition order was requested. 2900 */ 2901 public Date getDateTime() { 2902 return this.dateTime == null ? null : this.dateTime.getValue(); 2903 } 2904 2905 /** 2906 * @param value The date and time that this nutrition order was requested. 2907 */ 2908 public NutritionOrder setDateTime(Date value) { 2909 if (this.dateTime == null) 2910 this.dateTime = new DateTimeType(); 2911 this.dateTime.setValue(value); 2912 return this; 2913 } 2914 2915 /** 2916 * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 2917 */ 2918 public Reference getOrderer() { 2919 if (this.orderer == null) 2920 if (Configuration.errorOnAutoCreate()) 2921 throw new Error("Attempt to auto-create NutritionOrder.orderer"); 2922 else if (Configuration.doAutoCreate()) 2923 this.orderer = new Reference(); // cc 2924 return this.orderer; 2925 } 2926 2927 public boolean hasOrderer() { 2928 return this.orderer != null && !this.orderer.isEmpty(); 2929 } 2930 2931 /** 2932 * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 2933 */ 2934 public NutritionOrder setOrderer(Reference value) { 2935 this.orderer = value; 2936 return this; 2937 } 2938 2939 /** 2940 * @return {@link #orderer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 2941 */ 2942 public Practitioner getOrdererTarget() { 2943 if (this.ordererTarget == null) 2944 if (Configuration.errorOnAutoCreate()) 2945 throw new Error("Attempt to auto-create NutritionOrder.orderer"); 2946 else if (Configuration.doAutoCreate()) 2947 this.ordererTarget = new Practitioner(); // aa 2948 return this.ordererTarget; 2949 } 2950 2951 /** 2952 * @param value {@link #orderer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 2953 */ 2954 public NutritionOrder setOrdererTarget(Practitioner value) { 2955 this.ordererTarget = value; 2956 return this; 2957 } 2958 2959 /** 2960 * @return {@link #allergyIntolerance} (A link to a record of allergies or intolerances which should be included in the nutrition order.) 2961 */ 2962 public List<Reference> getAllergyIntolerance() { 2963 if (this.allergyIntolerance == null) 2964 this.allergyIntolerance = new ArrayList<Reference>(); 2965 return this.allergyIntolerance; 2966 } 2967 2968 /** 2969 * @return Returns a reference to <code>this</code> for easy method chaining 2970 */ 2971 public NutritionOrder setAllergyIntolerance(List<Reference> theAllergyIntolerance) { 2972 this.allergyIntolerance = theAllergyIntolerance; 2973 return this; 2974 } 2975 2976 public boolean hasAllergyIntolerance() { 2977 if (this.allergyIntolerance == null) 2978 return false; 2979 for (Reference item : this.allergyIntolerance) 2980 if (!item.isEmpty()) 2981 return true; 2982 return false; 2983 } 2984 2985 public Reference addAllergyIntolerance() { //3 2986 Reference t = new Reference(); 2987 if (this.allergyIntolerance == null) 2988 this.allergyIntolerance = new ArrayList<Reference>(); 2989 this.allergyIntolerance.add(t); 2990 return t; 2991 } 2992 2993 public NutritionOrder addAllergyIntolerance(Reference t) { //3 2994 if (t == null) 2995 return this; 2996 if (this.allergyIntolerance == null) 2997 this.allergyIntolerance = new ArrayList<Reference>(); 2998 this.allergyIntolerance.add(t); 2999 return this; 3000 } 3001 3002 /** 3003 * @return The first repetition of repeating field {@link #allergyIntolerance}, creating it if it does not already exist 3004 */ 3005 public Reference getAllergyIntoleranceFirstRep() { 3006 if (getAllergyIntolerance().isEmpty()) { 3007 addAllergyIntolerance(); 3008 } 3009 return getAllergyIntolerance().get(0); 3010 } 3011 3012 /** 3013 * @deprecated Use Reference#setResource(IBaseResource) instead 3014 */ 3015 @Deprecated 3016 public List<AllergyIntolerance> getAllergyIntoleranceTarget() { 3017 if (this.allergyIntoleranceTarget == null) 3018 this.allergyIntoleranceTarget = new ArrayList<AllergyIntolerance>(); 3019 return this.allergyIntoleranceTarget; 3020 } 3021 3022 /** 3023 * @deprecated Use Reference#setResource(IBaseResource) instead 3024 */ 3025 @Deprecated 3026 public AllergyIntolerance addAllergyIntoleranceTarget() { 3027 AllergyIntolerance r = new AllergyIntolerance(); 3028 if (this.allergyIntoleranceTarget == null) 3029 this.allergyIntoleranceTarget = new ArrayList<AllergyIntolerance>(); 3030 this.allergyIntoleranceTarget.add(r); 3031 return r; 3032 } 3033 3034 /** 3035 * @return {@link #foodPreferenceModifier} (This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.) 3036 */ 3037 public List<CodeableConcept> getFoodPreferenceModifier() { 3038 if (this.foodPreferenceModifier == null) 3039 this.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 3040 return this.foodPreferenceModifier; 3041 } 3042 3043 /** 3044 * @return Returns a reference to <code>this</code> for easy method chaining 3045 */ 3046 public NutritionOrder setFoodPreferenceModifier(List<CodeableConcept> theFoodPreferenceModifier) { 3047 this.foodPreferenceModifier = theFoodPreferenceModifier; 3048 return this; 3049 } 3050 3051 public boolean hasFoodPreferenceModifier() { 3052 if (this.foodPreferenceModifier == null) 3053 return false; 3054 for (CodeableConcept item : this.foodPreferenceModifier) 3055 if (!item.isEmpty()) 3056 return true; 3057 return false; 3058 } 3059 3060 public CodeableConcept addFoodPreferenceModifier() { //3 3061 CodeableConcept t = new CodeableConcept(); 3062 if (this.foodPreferenceModifier == null) 3063 this.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 3064 this.foodPreferenceModifier.add(t); 3065 return t; 3066 } 3067 3068 public NutritionOrder addFoodPreferenceModifier(CodeableConcept t) { //3 3069 if (t == null) 3070 return this; 3071 if (this.foodPreferenceModifier == null) 3072 this.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 3073 this.foodPreferenceModifier.add(t); 3074 return this; 3075 } 3076 3077 /** 3078 * @return The first repetition of repeating field {@link #foodPreferenceModifier}, creating it if it does not already exist 3079 */ 3080 public CodeableConcept getFoodPreferenceModifierFirstRep() { 3081 if (getFoodPreferenceModifier().isEmpty()) { 3082 addFoodPreferenceModifier(); 3083 } 3084 return getFoodPreferenceModifier().get(0); 3085 } 3086 3087 /** 3088 * @return {@link #excludeFoodModifier} (This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.) 3089 */ 3090 public List<CodeableConcept> getExcludeFoodModifier() { 3091 if (this.excludeFoodModifier == null) 3092 this.excludeFoodModifier = new ArrayList<CodeableConcept>(); 3093 return this.excludeFoodModifier; 3094 } 3095 3096 /** 3097 * @return Returns a reference to <code>this</code> for easy method chaining 3098 */ 3099 public NutritionOrder setExcludeFoodModifier(List<CodeableConcept> theExcludeFoodModifier) { 3100 this.excludeFoodModifier = theExcludeFoodModifier; 3101 return this; 3102 } 3103 3104 public boolean hasExcludeFoodModifier() { 3105 if (this.excludeFoodModifier == null) 3106 return false; 3107 for (CodeableConcept item : this.excludeFoodModifier) 3108 if (!item.isEmpty()) 3109 return true; 3110 return false; 3111 } 3112 3113 public CodeableConcept addExcludeFoodModifier() { //3 3114 CodeableConcept t = new CodeableConcept(); 3115 if (this.excludeFoodModifier == null) 3116 this.excludeFoodModifier = new ArrayList<CodeableConcept>(); 3117 this.excludeFoodModifier.add(t); 3118 return t; 3119 } 3120 3121 public NutritionOrder addExcludeFoodModifier(CodeableConcept t) { //3 3122 if (t == null) 3123 return this; 3124 if (this.excludeFoodModifier == null) 3125 this.excludeFoodModifier = new ArrayList<CodeableConcept>(); 3126 this.excludeFoodModifier.add(t); 3127 return this; 3128 } 3129 3130 /** 3131 * @return The first repetition of repeating field {@link #excludeFoodModifier}, creating it if it does not already exist 3132 */ 3133 public CodeableConcept getExcludeFoodModifierFirstRep() { 3134 if (getExcludeFoodModifier().isEmpty()) { 3135 addExcludeFoodModifier(); 3136 } 3137 return getExcludeFoodModifier().get(0); 3138 } 3139 3140 /** 3141 * @return {@link #oralDiet} (Diet given orally in contrast to enteral (tube) feeding.) 3142 */ 3143 public NutritionOrderOralDietComponent getOralDiet() { 3144 if (this.oralDiet == null) 3145 if (Configuration.errorOnAutoCreate()) 3146 throw new Error("Attempt to auto-create NutritionOrder.oralDiet"); 3147 else if (Configuration.doAutoCreate()) 3148 this.oralDiet = new NutritionOrderOralDietComponent(); // cc 3149 return this.oralDiet; 3150 } 3151 3152 public boolean hasOralDiet() { 3153 return this.oralDiet != null && !this.oralDiet.isEmpty(); 3154 } 3155 3156 /** 3157 * @param value {@link #oralDiet} (Diet given orally in contrast to enteral (tube) feeding.) 3158 */ 3159 public NutritionOrder setOralDiet(NutritionOrderOralDietComponent value) { 3160 this.oralDiet = value; 3161 return this; 3162 } 3163 3164 /** 3165 * @return {@link #supplement} (Oral nutritional products given in order to add further nutritional value to the patient's diet.) 3166 */ 3167 public List<NutritionOrderSupplementComponent> getSupplement() { 3168 if (this.supplement == null) 3169 this.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 3170 return this.supplement; 3171 } 3172 3173 /** 3174 * @return Returns a reference to <code>this</code> for easy method chaining 3175 */ 3176 public NutritionOrder setSupplement(List<NutritionOrderSupplementComponent> theSupplement) { 3177 this.supplement = theSupplement; 3178 return this; 3179 } 3180 3181 public boolean hasSupplement() { 3182 if (this.supplement == null) 3183 return false; 3184 for (NutritionOrderSupplementComponent item : this.supplement) 3185 if (!item.isEmpty()) 3186 return true; 3187 return false; 3188 } 3189 3190 public NutritionOrderSupplementComponent addSupplement() { //3 3191 NutritionOrderSupplementComponent t = new NutritionOrderSupplementComponent(); 3192 if (this.supplement == null) 3193 this.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 3194 this.supplement.add(t); 3195 return t; 3196 } 3197 3198 public NutritionOrder addSupplement(NutritionOrderSupplementComponent t) { //3 3199 if (t == null) 3200 return this; 3201 if (this.supplement == null) 3202 this.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 3203 this.supplement.add(t); 3204 return this; 3205 } 3206 3207 /** 3208 * @return The first repetition of repeating field {@link #supplement}, creating it if it does not already exist 3209 */ 3210 public NutritionOrderSupplementComponent getSupplementFirstRep() { 3211 if (getSupplement().isEmpty()) { 3212 addSupplement(); 3213 } 3214 return getSupplement().get(0); 3215 } 3216 3217 /** 3218 * @return {@link #enteralFormula} (Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.) 3219 */ 3220 public NutritionOrderEnteralFormulaComponent getEnteralFormula() { 3221 if (this.enteralFormula == null) 3222 if (Configuration.errorOnAutoCreate()) 3223 throw new Error("Attempt to auto-create NutritionOrder.enteralFormula"); 3224 else if (Configuration.doAutoCreate()) 3225 this.enteralFormula = new NutritionOrderEnteralFormulaComponent(); // cc 3226 return this.enteralFormula; 3227 } 3228 3229 public boolean hasEnteralFormula() { 3230 return this.enteralFormula != null && !this.enteralFormula.isEmpty(); 3231 } 3232 3233 /** 3234 * @param value {@link #enteralFormula} (Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.) 3235 */ 3236 public NutritionOrder setEnteralFormula(NutritionOrderEnteralFormulaComponent value) { 3237 this.enteralFormula = value; 3238 return this; 3239 } 3240 3241 protected void listChildren(List<Property> children) { 3242 super.listChildren(children); 3243 children.add(new Property("identifier", "Identifier", "Identifiers assigned to this order by the order sender or by the order receiver.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3244 children.add(new Property("status", "code", "The workflow status of the nutrition order/request.", 0, 1, status)); 3245 children.add(new Property("patient", "Reference(Patient)", "The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, 1, patient)); 3246 children.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, 1, encounter)); 3247 children.add(new Property("dateTime", "dateTime", "The date and time that this nutrition order was requested.", 0, 1, dateTime)); 3248 children.add(new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.", 0, 1, orderer)); 3249 children.add(new Property("allergyIntolerance", "Reference(AllergyIntolerance)", "A link to a record of allergies or intolerances which should be included in the nutrition order.", 0, java.lang.Integer.MAX_VALUE, allergyIntolerance)); 3250 children.add(new Property("foodPreferenceModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, foodPreferenceModifier)); 3251 children.add(new Property("excludeFoodModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, excludeFoodModifier)); 3252 children.add(new Property("oralDiet", "", "Diet given orally in contrast to enteral (tube) feeding.", 0, 1, oralDiet)); 3253 children.add(new Property("supplement", "", "Oral nutritional products given in order to add further nutritional value to the patient's diet.", 0, java.lang.Integer.MAX_VALUE, supplement)); 3254 children.add(new Property("enteralFormula", "", "Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.", 0, 1, enteralFormula)); 3255 } 3256 3257 @Override 3258 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3259 switch (_hash) { 3260 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifiers assigned to this order by the order sender or by the order receiver.", 0, java.lang.Integer.MAX_VALUE, identifier); 3261 case -892481550: /*status*/ return new Property("status", "code", "The workflow status of the nutrition order/request.", 0, 1, status); 3262 case -791418107: /*patient*/ return new Property("patient", "Reference(Patient)", "The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, 1, patient); 3263 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, 1, encounter); 3264 case 1792749467: /*dateTime*/ return new Property("dateTime", "dateTime", "The date and time that this nutrition order was requested.", 0, 1, dateTime); 3265 case -1207109509: /*orderer*/ return new Property("orderer", "Reference(Practitioner)", "The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.", 0, 1, orderer); 3266 case -120164120: /*allergyIntolerance*/ return new Property("allergyIntolerance", "Reference(AllergyIntolerance)", "A link to a record of allergies or intolerances which should be included in the nutrition order.", 0, java.lang.Integer.MAX_VALUE, allergyIntolerance); 3267 case 659473872: /*foodPreferenceModifier*/ return new Property("foodPreferenceModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, foodPreferenceModifier); 3268 case 1760260175: /*excludeFoodModifier*/ return new Property("excludeFoodModifier", "CodeableConcept", "This modifier is used to convey order-specific modifiers about the type of food that should NOT be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.", 0, java.lang.Integer.MAX_VALUE, excludeFoodModifier); 3269 case 1153521250: /*oralDiet*/ return new Property("oralDiet", "", "Diet given orally in contrast to enteral (tube) feeding.", 0, 1, oralDiet); 3270 case -711993159: /*supplement*/ return new Property("supplement", "", "Oral nutritional products given in order to add further nutritional value to the patient's diet.", 0, java.lang.Integer.MAX_VALUE, supplement); 3271 case -671083805: /*enteralFormula*/ return new Property("enteralFormula", "", "Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.", 0, 1, enteralFormula); 3272 default: return super.getNamedProperty(_hash, _name, _checkValid); 3273 } 3274 3275 } 3276 3277 @Override 3278 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3279 switch (hash) { 3280 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3281 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<NutritionOrderStatus> 3282 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 3283 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 3284 case 1792749467: /*dateTime*/ return this.dateTime == null ? new Base[0] : new Base[] {this.dateTime}; // DateTimeType 3285 case -1207109509: /*orderer*/ return this.orderer == null ? new Base[0] : new Base[] {this.orderer}; // Reference 3286 case -120164120: /*allergyIntolerance*/ return this.allergyIntolerance == null ? new Base[0] : this.allergyIntolerance.toArray(new Base[this.allergyIntolerance.size()]); // Reference 3287 case 659473872: /*foodPreferenceModifier*/ return this.foodPreferenceModifier == null ? new Base[0] : this.foodPreferenceModifier.toArray(new Base[this.foodPreferenceModifier.size()]); // CodeableConcept 3288 case 1760260175: /*excludeFoodModifier*/ return this.excludeFoodModifier == null ? new Base[0] : this.excludeFoodModifier.toArray(new Base[this.excludeFoodModifier.size()]); // CodeableConcept 3289 case 1153521250: /*oralDiet*/ return this.oralDiet == null ? new Base[0] : new Base[] {this.oralDiet}; // NutritionOrderOralDietComponent 3290 case -711993159: /*supplement*/ return this.supplement == null ? new Base[0] : this.supplement.toArray(new Base[this.supplement.size()]); // NutritionOrderSupplementComponent 3291 case -671083805: /*enteralFormula*/ return this.enteralFormula == null ? new Base[0] : new Base[] {this.enteralFormula}; // NutritionOrderEnteralFormulaComponent 3292 default: return super.getProperty(hash, name, checkValid); 3293 } 3294 3295 } 3296 3297 @Override 3298 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3299 switch (hash) { 3300 case -1618432855: // identifier 3301 this.getIdentifier().add(castToIdentifier(value)); // Identifier 3302 return value; 3303 case -892481550: // status 3304 value = new NutritionOrderStatusEnumFactory().fromType(castToCode(value)); 3305 this.status = (Enumeration) value; // Enumeration<NutritionOrderStatus> 3306 return value; 3307 case -791418107: // patient 3308 this.patient = castToReference(value); // Reference 3309 return value; 3310 case 1524132147: // encounter 3311 this.encounter = castToReference(value); // Reference 3312 return value; 3313 case 1792749467: // dateTime 3314 this.dateTime = castToDateTime(value); // DateTimeType 3315 return value; 3316 case -1207109509: // orderer 3317 this.orderer = castToReference(value); // Reference 3318 return value; 3319 case -120164120: // allergyIntolerance 3320 this.getAllergyIntolerance().add(castToReference(value)); // Reference 3321 return value; 3322 case 659473872: // foodPreferenceModifier 3323 this.getFoodPreferenceModifier().add(castToCodeableConcept(value)); // CodeableConcept 3324 return value; 3325 case 1760260175: // excludeFoodModifier 3326 this.getExcludeFoodModifier().add(castToCodeableConcept(value)); // CodeableConcept 3327 return value; 3328 case 1153521250: // oralDiet 3329 this.oralDiet = (NutritionOrderOralDietComponent) value; // NutritionOrderOralDietComponent 3330 return value; 3331 case -711993159: // supplement 3332 this.getSupplement().add((NutritionOrderSupplementComponent) value); // NutritionOrderSupplementComponent 3333 return value; 3334 case -671083805: // enteralFormula 3335 this.enteralFormula = (NutritionOrderEnteralFormulaComponent) value; // NutritionOrderEnteralFormulaComponent 3336 return value; 3337 default: return super.setProperty(hash, name, value); 3338 } 3339 3340 } 3341 3342 @Override 3343 public Base setProperty(String name, Base value) throws FHIRException { 3344 if (name.equals("identifier")) { 3345 this.getIdentifier().add(castToIdentifier(value)); 3346 } else if (name.equals("status")) { 3347 value = new NutritionOrderStatusEnumFactory().fromType(castToCode(value)); 3348 this.status = (Enumeration) value; // Enumeration<NutritionOrderStatus> 3349 } else if (name.equals("patient")) { 3350 this.patient = castToReference(value); // Reference 3351 } else if (name.equals("encounter")) { 3352 this.encounter = castToReference(value); // Reference 3353 } else if (name.equals("dateTime")) { 3354 this.dateTime = castToDateTime(value); // DateTimeType 3355 } else if (name.equals("orderer")) { 3356 this.orderer = castToReference(value); // Reference 3357 } else if (name.equals("allergyIntolerance")) { 3358 this.getAllergyIntolerance().add(castToReference(value)); 3359 } else if (name.equals("foodPreferenceModifier")) { 3360 this.getFoodPreferenceModifier().add(castToCodeableConcept(value)); 3361 } else if (name.equals("excludeFoodModifier")) { 3362 this.getExcludeFoodModifier().add(castToCodeableConcept(value)); 3363 } else if (name.equals("oralDiet")) { 3364 this.oralDiet = (NutritionOrderOralDietComponent) value; // NutritionOrderOralDietComponent 3365 } else if (name.equals("supplement")) { 3366 this.getSupplement().add((NutritionOrderSupplementComponent) value); 3367 } else if (name.equals("enteralFormula")) { 3368 this.enteralFormula = (NutritionOrderEnteralFormulaComponent) value; // NutritionOrderEnteralFormulaComponent 3369 } else 3370 return super.setProperty(name, value); 3371 return value; 3372 } 3373 3374 @Override 3375 public Base makeProperty(int hash, String name) throws FHIRException { 3376 switch (hash) { 3377 case -1618432855: return addIdentifier(); 3378 case -892481550: return getStatusElement(); 3379 case -791418107: return getPatient(); 3380 case 1524132147: return getEncounter(); 3381 case 1792749467: return getDateTimeElement(); 3382 case -1207109509: return getOrderer(); 3383 case -120164120: return addAllergyIntolerance(); 3384 case 659473872: return addFoodPreferenceModifier(); 3385 case 1760260175: return addExcludeFoodModifier(); 3386 case 1153521250: return getOralDiet(); 3387 case -711993159: return addSupplement(); 3388 case -671083805: return getEnteralFormula(); 3389 default: return super.makeProperty(hash, name); 3390 } 3391 3392 } 3393 3394 @Override 3395 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3396 switch (hash) { 3397 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3398 case -892481550: /*status*/ return new String[] {"code"}; 3399 case -791418107: /*patient*/ return new String[] {"Reference"}; 3400 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 3401 case 1792749467: /*dateTime*/ return new String[] {"dateTime"}; 3402 case -1207109509: /*orderer*/ return new String[] {"Reference"}; 3403 case -120164120: /*allergyIntolerance*/ return new String[] {"Reference"}; 3404 case 659473872: /*foodPreferenceModifier*/ return new String[] {"CodeableConcept"}; 3405 case 1760260175: /*excludeFoodModifier*/ return new String[] {"CodeableConcept"}; 3406 case 1153521250: /*oralDiet*/ return new String[] {}; 3407 case -711993159: /*supplement*/ return new String[] {}; 3408 case -671083805: /*enteralFormula*/ return new String[] {}; 3409 default: return super.getTypesForProperty(hash, name); 3410 } 3411 3412 } 3413 3414 @Override 3415 public Base addChild(String name) throws FHIRException { 3416 if (name.equals("identifier")) { 3417 return addIdentifier(); 3418 } 3419 else if (name.equals("status")) { 3420 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.status"); 3421 } 3422 else if (name.equals("patient")) { 3423 this.patient = new Reference(); 3424 return this.patient; 3425 } 3426 else if (name.equals("encounter")) { 3427 this.encounter = new Reference(); 3428 return this.encounter; 3429 } 3430 else if (name.equals("dateTime")) { 3431 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.dateTime"); 3432 } 3433 else if (name.equals("orderer")) { 3434 this.orderer = new Reference(); 3435 return this.orderer; 3436 } 3437 else if (name.equals("allergyIntolerance")) { 3438 return addAllergyIntolerance(); 3439 } 3440 else if (name.equals("foodPreferenceModifier")) { 3441 return addFoodPreferenceModifier(); 3442 } 3443 else if (name.equals("excludeFoodModifier")) { 3444 return addExcludeFoodModifier(); 3445 } 3446 else if (name.equals("oralDiet")) { 3447 this.oralDiet = new NutritionOrderOralDietComponent(); 3448 return this.oralDiet; 3449 } 3450 else if (name.equals("supplement")) { 3451 return addSupplement(); 3452 } 3453 else if (name.equals("enteralFormula")) { 3454 this.enteralFormula = new NutritionOrderEnteralFormulaComponent(); 3455 return this.enteralFormula; 3456 } 3457 else 3458 return super.addChild(name); 3459 } 3460 3461 public String fhirType() { 3462 return "NutritionOrder"; 3463 3464 } 3465 3466 public NutritionOrder copy() { 3467 NutritionOrder dst = new NutritionOrder(); 3468 copyValues(dst); 3469 if (identifier != null) { 3470 dst.identifier = new ArrayList<Identifier>(); 3471 for (Identifier i : identifier) 3472 dst.identifier.add(i.copy()); 3473 }; 3474 dst.status = status == null ? null : status.copy(); 3475 dst.patient = patient == null ? null : patient.copy(); 3476 dst.encounter = encounter == null ? null : encounter.copy(); 3477 dst.dateTime = dateTime == null ? null : dateTime.copy(); 3478 dst.orderer = orderer == null ? null : orderer.copy(); 3479 if (allergyIntolerance != null) { 3480 dst.allergyIntolerance = new ArrayList<Reference>(); 3481 for (Reference i : allergyIntolerance) 3482 dst.allergyIntolerance.add(i.copy()); 3483 }; 3484 if (foodPreferenceModifier != null) { 3485 dst.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 3486 for (CodeableConcept i : foodPreferenceModifier) 3487 dst.foodPreferenceModifier.add(i.copy()); 3488 }; 3489 if (excludeFoodModifier != null) { 3490 dst.excludeFoodModifier = new ArrayList<CodeableConcept>(); 3491 for (CodeableConcept i : excludeFoodModifier) 3492 dst.excludeFoodModifier.add(i.copy()); 3493 }; 3494 dst.oralDiet = oralDiet == null ? null : oralDiet.copy(); 3495 if (supplement != null) { 3496 dst.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 3497 for (NutritionOrderSupplementComponent i : supplement) 3498 dst.supplement.add(i.copy()); 3499 }; 3500 dst.enteralFormula = enteralFormula == null ? null : enteralFormula.copy(); 3501 return dst; 3502 } 3503 3504 protected NutritionOrder typedCopy() { 3505 return copy(); 3506 } 3507 3508 @Override 3509 public boolean equalsDeep(Base other_) { 3510 if (!super.equalsDeep(other_)) 3511 return false; 3512 if (!(other_ instanceof NutritionOrder)) 3513 return false; 3514 NutritionOrder o = (NutritionOrder) other_; 3515 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(patient, o.patient, true) 3516 && compareDeep(encounter, o.encounter, true) && compareDeep(dateTime, o.dateTime, true) && compareDeep(orderer, o.orderer, true) 3517 && compareDeep(allergyIntolerance, o.allergyIntolerance, true) && compareDeep(foodPreferenceModifier, o.foodPreferenceModifier, true) 3518 && compareDeep(excludeFoodModifier, o.excludeFoodModifier, true) && compareDeep(oralDiet, o.oralDiet, true) 3519 && compareDeep(supplement, o.supplement, true) && compareDeep(enteralFormula, o.enteralFormula, true) 3520 ; 3521 } 3522 3523 @Override 3524 public boolean equalsShallow(Base other_) { 3525 if (!super.equalsShallow(other_)) 3526 return false; 3527 if (!(other_ instanceof NutritionOrder)) 3528 return false; 3529 NutritionOrder o = (NutritionOrder) other_; 3530 return compareValues(status, o.status, true) && compareValues(dateTime, o.dateTime, true); 3531 } 3532 3533 public boolean isEmpty() { 3534 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, patient 3535 , encounter, dateTime, orderer, allergyIntolerance, foodPreferenceModifier, excludeFoodModifier 3536 , oralDiet, supplement, enteralFormula); 3537 } 3538 3539 @Override 3540 public ResourceType getResourceType() { 3541 return ResourceType.NutritionOrder; 3542 } 3543 3544 /** 3545 * Search parameter: <b>identifier</b> 3546 * <p> 3547 * Description: <b>Return nutrition orders with this external identifier</b><br> 3548 * Type: <b>token</b><br> 3549 * Path: <b>NutritionOrder.identifier</b><br> 3550 * </p> 3551 */ 3552 @SearchParamDefinition(name="identifier", path="NutritionOrder.identifier", description="Return nutrition orders with this external identifier", type="token" ) 3553 public static final String SP_IDENTIFIER = "identifier"; 3554 /** 3555 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3556 * <p> 3557 * Description: <b>Return nutrition orders with this external identifier</b><br> 3558 * Type: <b>token</b><br> 3559 * Path: <b>NutritionOrder.identifier</b><br> 3560 * </p> 3561 */ 3562 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3563 3564 /** 3565 * Search parameter: <b>datetime</b> 3566 * <p> 3567 * Description: <b>Return nutrition orders requested on this date</b><br> 3568 * Type: <b>date</b><br> 3569 * Path: <b>NutritionOrder.dateTime</b><br> 3570 * </p> 3571 */ 3572 @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date" ) 3573 public static final String SP_DATETIME = "datetime"; 3574 /** 3575 * <b>Fluent Client</b> search parameter constant for <b>datetime</b> 3576 * <p> 3577 * Description: <b>Return nutrition orders requested on this date</b><br> 3578 * Type: <b>date</b><br> 3579 * Path: <b>NutritionOrder.dateTime</b><br> 3580 * </p> 3581 */ 3582 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATETIME = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATETIME); 3583 3584 /** 3585 * Search parameter: <b>provider</b> 3586 * <p> 3587 * Description: <b>The identify of the provider who placed the nutrition order</b><br> 3588 * Type: <b>reference</b><br> 3589 * Path: <b>NutritionOrder.orderer</b><br> 3590 * </p> 3591 */ 3592 @SearchParamDefinition(name="provider", path="NutritionOrder.orderer", description="The identify of the provider who placed the nutrition order", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 3593 public static final String SP_PROVIDER = "provider"; 3594 /** 3595 * <b>Fluent Client</b> search parameter constant for <b>provider</b> 3596 * <p> 3597 * Description: <b>The identify of the provider who placed the nutrition order</b><br> 3598 * Type: <b>reference</b><br> 3599 * Path: <b>NutritionOrder.orderer</b><br> 3600 * </p> 3601 */ 3602 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); 3603 3604/** 3605 * Constant for fluent queries to be used to add include statements. Specifies 3606 * the path value of "<b>NutritionOrder:provider</b>". 3607 */ 3608 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("NutritionOrder:provider").toLocked(); 3609 3610 /** 3611 * Search parameter: <b>patient</b> 3612 * <p> 3613 * Description: <b>The identity of the person who requires the diet, formula or nutritional supplement</b><br> 3614 * Type: <b>reference</b><br> 3615 * Path: <b>NutritionOrder.patient</b><br> 3616 * </p> 3617 */ 3618 @SearchParamDefinition(name="patient", path="NutritionOrder.patient", description="The identity of the person who requires the diet, formula or nutritional supplement", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 3619 public static final String SP_PATIENT = "patient"; 3620 /** 3621 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 3622 * <p> 3623 * Description: <b>The identity of the person who requires the diet, formula or nutritional supplement</b><br> 3624 * Type: <b>reference</b><br> 3625 * Path: <b>NutritionOrder.patient</b><br> 3626 * </p> 3627 */ 3628 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 3629 3630/** 3631 * Constant for fluent queries to be used to add include statements. Specifies 3632 * the path value of "<b>NutritionOrder:patient</b>". 3633 */ 3634 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("NutritionOrder:patient").toLocked(); 3635 3636 /** 3637 * Search parameter: <b>supplement</b> 3638 * <p> 3639 * Description: <b>Type of supplement product requested</b><br> 3640 * Type: <b>token</b><br> 3641 * Path: <b>NutritionOrder.supplement.type</b><br> 3642 * </p> 3643 */ 3644 @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type", description="Type of supplement product requested", type="token" ) 3645 public static final String SP_SUPPLEMENT = "supplement"; 3646 /** 3647 * <b>Fluent Client</b> search parameter constant for <b>supplement</b> 3648 * <p> 3649 * Description: <b>Type of supplement product requested</b><br> 3650 * Type: <b>token</b><br> 3651 * Path: <b>NutritionOrder.supplement.type</b><br> 3652 * </p> 3653 */ 3654 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUPPLEMENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUPPLEMENT); 3655 3656 /** 3657 * Search parameter: <b>formula</b> 3658 * <p> 3659 * Description: <b>Type of enteral or infant formula</b><br> 3660 * Type: <b>token</b><br> 3661 * Path: <b>NutritionOrder.enteralFormula.baseFormulaType</b><br> 3662 * </p> 3663 */ 3664 @SearchParamDefinition(name="formula", path="NutritionOrder.enteralFormula.baseFormulaType", description="Type of enteral or infant formula", type="token" ) 3665 public static final String SP_FORMULA = "formula"; 3666 /** 3667 * <b>Fluent Client</b> search parameter constant for <b>formula</b> 3668 * <p> 3669 * Description: <b>Type of enteral or infant formula</b><br> 3670 * Type: <b>token</b><br> 3671 * Path: <b>NutritionOrder.enteralFormula.baseFormulaType</b><br> 3672 * </p> 3673 */ 3674 public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORMULA = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FORMULA); 3675 3676 /** 3677 * Search parameter: <b>encounter</b> 3678 * <p> 3679 * Description: <b>Return nutrition orders with this encounter identifier</b><br> 3680 * Type: <b>reference</b><br> 3681 * Path: <b>NutritionOrder.encounter</b><br> 3682 * </p> 3683 */ 3684 @SearchParamDefinition(name="encounter", path="NutritionOrder.encounter", description="Return nutrition orders with this encounter identifier", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } ) 3685 public static final String SP_ENCOUNTER = "encounter"; 3686 /** 3687 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 3688 * <p> 3689 * Description: <b>Return nutrition orders with this encounter identifier</b><br> 3690 * Type: <b>reference</b><br> 3691 * Path: <b>NutritionOrder.encounter</b><br> 3692 * </p> 3693 */ 3694 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 3695 3696/** 3697 * Constant for fluent queries to be used to add include statements. Specifies 3698 * the path value of "<b>NutritionOrder:encounter</b>". 3699 */ 3700 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("NutritionOrder:encounter").toLocked(); 3701 3702 /** 3703 * Search parameter: <b>oraldiet</b> 3704 * <p> 3705 * Description: <b>Type of diet that can be consumed orally (i.e., take via the mouth).</b><br> 3706 * Type: <b>token</b><br> 3707 * Path: <b>NutritionOrder.oralDiet.type</b><br> 3708 * </p> 3709 */ 3710 @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token" ) 3711 public static final String SP_ORALDIET = "oraldiet"; 3712 /** 3713 * <b>Fluent Client</b> search parameter constant for <b>oraldiet</b> 3714 * <p> 3715 * Description: <b>Type of diet that can be consumed orally (i.e., take via the mouth).</b><br> 3716 * Type: <b>token</b><br> 3717 * Path: <b>NutritionOrder.oralDiet.type</b><br> 3718 * </p> 3719 */ 3720 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORALDIET = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORALDIET); 3721 3722 /** 3723 * Search parameter: <b>status</b> 3724 * <p> 3725 * Description: <b>Status of the nutrition order.</b><br> 3726 * Type: <b>token</b><br> 3727 * Path: <b>NutritionOrder.status</b><br> 3728 * </p> 3729 */ 3730 @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token" ) 3731 public static final String SP_STATUS = "status"; 3732 /** 3733 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3734 * <p> 3735 * Description: <b>Status of the nutrition order.</b><br> 3736 * Type: <b>token</b><br> 3737 * Path: <b>NutritionOrder.status</b><br> 3738 * </p> 3739 */ 3740 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3741 3742 /** 3743 * Search parameter: <b>additive</b> 3744 * <p> 3745 * Description: <b>Type of module component to add to the feeding</b><br> 3746 * Type: <b>token</b><br> 3747 * Path: <b>NutritionOrder.enteralFormula.additiveType</b><br> 3748 * </p> 3749 */ 3750 @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additiveType", description="Type of module component to add to the feeding", type="token" ) 3751 public static final String SP_ADDITIVE = "additive"; 3752 /** 3753 * <b>Fluent Client</b> search parameter constant for <b>additive</b> 3754 * <p> 3755 * Description: <b>Type of module component to add to the feeding</b><br> 3756 * Type: <b>token</b><br> 3757 * Path: <b>NutritionOrder.enteralFormula.additiveType</b><br> 3758 * </p> 3759 */ 3760 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDITIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDITIVE); 3761 3762 3763} 3764