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