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