
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. 052 */ 053@ResourceDef(name="NutritionOrder", profile="http://hl7.org/fhir/StructureDefinition/NutritionOrder") 054public class NutritionOrder extends DomainResource { 055 056 @Block() 057 public static class NutritionOrderOralDietComponent extends BackboneElement implements IBaseBackboneElement { 058 /** 059 * The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet. 060 */ 061 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 062 @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." ) 063 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diet-type") 064 protected List<CodeableConcept> type; 065 066 /** 067 * Schedule information for an oral diet. 068 */ 069 @Child(name = "schedule", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 070 @Description(shortDefinition="Scheduling information for oral diets", formalDefinition="Schedule information for an oral diet." ) 071 protected OralDietScheduleComponent schedule; 072 073 /** 074 * Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet. 075 */ 076 @Child(name = "nutrient", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 077 @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." ) 078 protected List<NutritionOrderOralDietNutrientComponent> nutrient; 079 080 /** 081 * Class that describes any texture modifications required for the patient to safely consume various types of solid foods. 082 */ 083 @Child(name = "texture", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 084 @Description(shortDefinition="Required texture modifications", formalDefinition="Class that describes any texture modifications required for the patient to safely consume various types of solid foods." ) 085 protected List<NutritionOrderOralDietTextureComponent> texture; 086 087 /** 088 * The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient. 089 */ 090 @Child(name = "fluidConsistencyType", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 091 @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." ) 092 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/consistency-type") 093 protected List<CodeableConcept> fluidConsistencyType; 094 095 /** 096 * Free text or additional instructions or information pertaining to the oral diet. 097 */ 098 @Child(name = "instruction", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 099 @Description(shortDefinition="Instructions or additional information about the oral diet", formalDefinition="Free text or additional instructions or information pertaining to the oral diet." ) 100 protected StringType instruction; 101 102 private static final long serialVersionUID = -1779061880L; 103 104 /** 105 * Constructor 106 */ 107 public NutritionOrderOralDietComponent() { 108 super(); 109 } 110 111 /** 112 * @return {@link #type} (The kind of diet or dietary restriction such as fiber restricted diet or diabetic diet.) 113 */ 114 public List<CodeableConcept> getType() { 115 if (this.type == null) 116 this.type = new ArrayList<CodeableConcept>(); 117 return this.type; 118 } 119 120 /** 121 * @return Returns a reference to <code>this</code> for easy method chaining 122 */ 123 public NutritionOrderOralDietComponent setType(List<CodeableConcept> theType) { 124 this.type = theType; 125 return this; 126 } 127 128 public boolean hasType() { 129 if (this.type == null) 130 return false; 131 for (CodeableConcept item : this.type) 132 if (!item.isEmpty()) 133 return true; 134 return false; 135 } 136 137 public CodeableConcept addType() { //3 138 CodeableConcept t = new CodeableConcept(); 139 if (this.type == null) 140 this.type = new ArrayList<CodeableConcept>(); 141 this.type.add(t); 142 return t; 143 } 144 145 public NutritionOrderOralDietComponent addType(CodeableConcept t) { //3 146 if (t == null) 147 return this; 148 if (this.type == null) 149 this.type = new ArrayList<CodeableConcept>(); 150 this.type.add(t); 151 return this; 152 } 153 154 /** 155 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 156 */ 157 public CodeableConcept getTypeFirstRep() { 158 if (getType().isEmpty()) { 159 addType(); 160 } 161 return getType().get(0); 162 } 163 164 /** 165 * @return {@link #schedule} (Schedule information for an oral diet.) 166 */ 167 public OralDietScheduleComponent getSchedule() { 168 if (this.schedule == null) 169 if (Configuration.errorOnAutoCreate()) 170 throw new Error("Attempt to auto-create NutritionOrderOralDietComponent.schedule"); 171 else if (Configuration.doAutoCreate()) 172 this.schedule = new OralDietScheduleComponent(); // cc 173 return this.schedule; 174 } 175 176 public boolean hasSchedule() { 177 return this.schedule != null && !this.schedule.isEmpty(); 178 } 179 180 /** 181 * @param value {@link #schedule} (Schedule information for an oral diet.) 182 */ 183 public NutritionOrderOralDietComponent setSchedule(OralDietScheduleComponent value) { 184 this.schedule = value; 185 return this; 186 } 187 188 /** 189 * @return {@link #nutrient} (Class that defines the quantity and type of nutrient modifications (for example carbohydrate, fiber or sodium) required for the oral diet.) 190 */ 191 public List<NutritionOrderOralDietNutrientComponent> getNutrient() { 192 if (this.nutrient == null) 193 this.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 194 return this.nutrient; 195 } 196 197 /** 198 * @return Returns a reference to <code>this</code> for easy method chaining 199 */ 200 public NutritionOrderOralDietComponent setNutrient(List<NutritionOrderOralDietNutrientComponent> theNutrient) { 201 this.nutrient = theNutrient; 202 return this; 203 } 204 205 public boolean hasNutrient() { 206 if (this.nutrient == null) 207 return false; 208 for (NutritionOrderOralDietNutrientComponent item : this.nutrient) 209 if (!item.isEmpty()) 210 return true; 211 return false; 212 } 213 214 public NutritionOrderOralDietNutrientComponent addNutrient() { //3 215 NutritionOrderOralDietNutrientComponent t = new NutritionOrderOralDietNutrientComponent(); 216 if (this.nutrient == null) 217 this.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 218 this.nutrient.add(t); 219 return t; 220 } 221 222 public NutritionOrderOralDietComponent addNutrient(NutritionOrderOralDietNutrientComponent t) { //3 223 if (t == null) 224 return this; 225 if (this.nutrient == null) 226 this.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 227 this.nutrient.add(t); 228 return this; 229 } 230 231 /** 232 * @return The first repetition of repeating field {@link #nutrient}, creating it if it does not already exist {3} 233 */ 234 public NutritionOrderOralDietNutrientComponent getNutrientFirstRep() { 235 if (getNutrient().isEmpty()) { 236 addNutrient(); 237 } 238 return getNutrient().get(0); 239 } 240 241 /** 242 * @return {@link #texture} (Class that describes any texture modifications required for the patient to safely consume various types of solid foods.) 243 */ 244 public List<NutritionOrderOralDietTextureComponent> getTexture() { 245 if (this.texture == null) 246 this.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 247 return this.texture; 248 } 249 250 /** 251 * @return Returns a reference to <code>this</code> for easy method chaining 252 */ 253 public NutritionOrderOralDietComponent setTexture(List<NutritionOrderOralDietTextureComponent> theTexture) { 254 this.texture = theTexture; 255 return this; 256 } 257 258 public boolean hasTexture() { 259 if (this.texture == null) 260 return false; 261 for (NutritionOrderOralDietTextureComponent item : this.texture) 262 if (!item.isEmpty()) 263 return true; 264 return false; 265 } 266 267 public NutritionOrderOralDietTextureComponent addTexture() { //3 268 NutritionOrderOralDietTextureComponent t = new NutritionOrderOralDietTextureComponent(); 269 if (this.texture == null) 270 this.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 271 this.texture.add(t); 272 return t; 273 } 274 275 public NutritionOrderOralDietComponent addTexture(NutritionOrderOralDietTextureComponent t) { //3 276 if (t == null) 277 return this; 278 if (this.texture == null) 279 this.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 280 this.texture.add(t); 281 return this; 282 } 283 284 /** 285 * @return The first repetition of repeating field {@link #texture}, creating it if it does not already exist {3} 286 */ 287 public NutritionOrderOralDietTextureComponent getTextureFirstRep() { 288 if (getTexture().isEmpty()) { 289 addTexture(); 290 } 291 return getTexture().get(0); 292 } 293 294 /** 295 * @return {@link #fluidConsistencyType} (The required consistency (e.g. honey-thick, nectar-thick, thin, thickened.) of liquids or fluids served to the patient.) 296 */ 297 public List<CodeableConcept> getFluidConsistencyType() { 298 if (this.fluidConsistencyType == null) 299 this.fluidConsistencyType = new ArrayList<CodeableConcept>(); 300 return this.fluidConsistencyType; 301 } 302 303 /** 304 * @return Returns a reference to <code>this</code> for easy method chaining 305 */ 306 public NutritionOrderOralDietComponent setFluidConsistencyType(List<CodeableConcept> theFluidConsistencyType) { 307 this.fluidConsistencyType = theFluidConsistencyType; 308 return this; 309 } 310 311 public boolean hasFluidConsistencyType() { 312 if (this.fluidConsistencyType == null) 313 return false; 314 for (CodeableConcept item : this.fluidConsistencyType) 315 if (!item.isEmpty()) 316 return true; 317 return false; 318 } 319 320 public CodeableConcept addFluidConsistencyType() { //3 321 CodeableConcept t = new CodeableConcept(); 322 if (this.fluidConsistencyType == null) 323 this.fluidConsistencyType = new ArrayList<CodeableConcept>(); 324 this.fluidConsistencyType.add(t); 325 return t; 326 } 327 328 public NutritionOrderOralDietComponent addFluidConsistencyType(CodeableConcept t) { //3 329 if (t == null) 330 return this; 331 if (this.fluidConsistencyType == null) 332 this.fluidConsistencyType = new ArrayList<CodeableConcept>(); 333 this.fluidConsistencyType.add(t); 334 return this; 335 } 336 337 /** 338 * @return The first repetition of repeating field {@link #fluidConsistencyType}, creating it if it does not already exist {3} 339 */ 340 public CodeableConcept getFluidConsistencyTypeFirstRep() { 341 if (getFluidConsistencyType().isEmpty()) { 342 addFluidConsistencyType(); 343 } 344 return getFluidConsistencyType().get(0); 345 } 346 347 /** 348 * @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 349 */ 350 public StringType getInstructionElement() { 351 if (this.instruction == null) 352 if (Configuration.errorOnAutoCreate()) 353 throw new Error("Attempt to auto-create NutritionOrderOralDietComponent.instruction"); 354 else if (Configuration.doAutoCreate()) 355 this.instruction = new StringType(); // bb 356 return this.instruction; 357 } 358 359 public boolean hasInstructionElement() { 360 return this.instruction != null && !this.instruction.isEmpty(); 361 } 362 363 public boolean hasInstruction() { 364 return this.instruction != null && !this.instruction.isEmpty(); 365 } 366 367 /** 368 * @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 369 */ 370 public NutritionOrderOralDietComponent setInstructionElement(StringType value) { 371 this.instruction = value; 372 return this; 373 } 374 375 /** 376 * @return Free text or additional instructions or information pertaining to the oral diet. 377 */ 378 public String getInstruction() { 379 return this.instruction == null ? null : this.instruction.getValue(); 380 } 381 382 /** 383 * @param value Free text or additional instructions or information pertaining to the oral diet. 384 */ 385 public NutritionOrderOralDietComponent setInstruction(String value) { 386 if (Utilities.noString(value)) 387 this.instruction = null; 388 else { 389 if (this.instruction == null) 390 this.instruction = new StringType(); 391 this.instruction.setValue(value); 392 } 393 return this; 394 } 395 396 protected void listChildren(List<Property> children) { 397 super.listChildren(children); 398 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)); 399 children.add(new Property("schedule", "", "Schedule information for an oral diet.", 0, 1, schedule)); 400 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)); 401 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)); 402 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)); 403 children.add(new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral diet.", 0, 1, instruction)); 404 } 405 406 @Override 407 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 408 switch (_hash) { 409 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); 410 case -697920873: /*schedule*/ return new Property("schedule", "", "Schedule information for an oral diet.", 0, 1, schedule); 411 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); 412 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); 413 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); 414 case 301526158: /*instruction*/ return new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral diet.", 0, 1, instruction); 415 default: return super.getNamedProperty(_hash, _name, _checkValid); 416 } 417 418 } 419 420 @Override 421 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 422 switch (hash) { 423 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 424 case -697920873: /*schedule*/ return this.schedule == null ? new Base[0] : new Base[] {this.schedule}; // OralDietScheduleComponent 425 case -1671151641: /*nutrient*/ return this.nutrient == null ? new Base[0] : this.nutrient.toArray(new Base[this.nutrient.size()]); // NutritionOrderOralDietNutrientComponent 426 case -1417816805: /*texture*/ return this.texture == null ? new Base[0] : this.texture.toArray(new Base[this.texture.size()]); // NutritionOrderOralDietTextureComponent 427 case -525105592: /*fluidConsistencyType*/ return this.fluidConsistencyType == null ? new Base[0] : this.fluidConsistencyType.toArray(new Base[this.fluidConsistencyType.size()]); // CodeableConcept 428 case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // StringType 429 default: return super.getProperty(hash, name, checkValid); 430 } 431 432 } 433 434 @Override 435 public Base setProperty(int hash, String name, Base value) throws FHIRException { 436 switch (hash) { 437 case 3575610: // type 438 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 439 return value; 440 case -697920873: // schedule 441 this.schedule = (OralDietScheduleComponent) value; // OralDietScheduleComponent 442 return value; 443 case -1671151641: // nutrient 444 this.getNutrient().add((NutritionOrderOralDietNutrientComponent) value); // NutritionOrderOralDietNutrientComponent 445 return value; 446 case -1417816805: // texture 447 this.getTexture().add((NutritionOrderOralDietTextureComponent) value); // NutritionOrderOralDietTextureComponent 448 return value; 449 case -525105592: // fluidConsistencyType 450 this.getFluidConsistencyType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 451 return value; 452 case 301526158: // instruction 453 this.instruction = TypeConvertor.castToString(value); // StringType 454 return value; 455 default: return super.setProperty(hash, name, value); 456 } 457 458 } 459 460 @Override 461 public Base setProperty(String name, Base value) throws FHIRException { 462 if (name.equals("type")) { 463 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 464 } else if (name.equals("schedule")) { 465 this.schedule = (OralDietScheduleComponent) value; // OralDietScheduleComponent 466 } else if (name.equals("nutrient")) { 467 this.getNutrient().add((NutritionOrderOralDietNutrientComponent) value); 468 } else if (name.equals("texture")) { 469 this.getTexture().add((NutritionOrderOralDietTextureComponent) value); 470 } else if (name.equals("fluidConsistencyType")) { 471 this.getFluidConsistencyType().add(TypeConvertor.castToCodeableConcept(value)); 472 } else if (name.equals("instruction")) { 473 this.instruction = TypeConvertor.castToString(value); // StringType 474 } else 475 return super.setProperty(name, value); 476 return value; 477 } 478 479 @Override 480 public Base makeProperty(int hash, String name) throws FHIRException { 481 switch (hash) { 482 case 3575610: return addType(); 483 case -697920873: return getSchedule(); 484 case -1671151641: return addNutrient(); 485 case -1417816805: return addTexture(); 486 case -525105592: return addFluidConsistencyType(); 487 case 301526158: return getInstructionElement(); 488 default: return super.makeProperty(hash, name); 489 } 490 491 } 492 493 @Override 494 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 495 switch (hash) { 496 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 497 case -697920873: /*schedule*/ return new String[] {}; 498 case -1671151641: /*nutrient*/ return new String[] {}; 499 case -1417816805: /*texture*/ return new String[] {}; 500 case -525105592: /*fluidConsistencyType*/ return new String[] {"CodeableConcept"}; 501 case 301526158: /*instruction*/ return new String[] {"string"}; 502 default: return super.getTypesForProperty(hash, name); 503 } 504 505 } 506 507 @Override 508 public Base addChild(String name) throws FHIRException { 509 if (name.equals("type")) { 510 return addType(); 511 } 512 else if (name.equals("schedule")) { 513 this.schedule = new OralDietScheduleComponent(); 514 return this.schedule; 515 } 516 else if (name.equals("nutrient")) { 517 return addNutrient(); 518 } 519 else if (name.equals("texture")) { 520 return addTexture(); 521 } 522 else if (name.equals("fluidConsistencyType")) { 523 return addFluidConsistencyType(); 524 } 525 else if (name.equals("instruction")) { 526 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.oralDiet.instruction"); 527 } 528 else 529 return super.addChild(name); 530 } 531 532 public NutritionOrderOralDietComponent copy() { 533 NutritionOrderOralDietComponent dst = new NutritionOrderOralDietComponent(); 534 copyValues(dst); 535 return dst; 536 } 537 538 public void copyValues(NutritionOrderOralDietComponent dst) { 539 super.copyValues(dst); 540 if (type != null) { 541 dst.type = new ArrayList<CodeableConcept>(); 542 for (CodeableConcept i : type) 543 dst.type.add(i.copy()); 544 }; 545 dst.schedule = schedule == null ? null : schedule.copy(); 546 if (nutrient != null) { 547 dst.nutrient = new ArrayList<NutritionOrderOralDietNutrientComponent>(); 548 for (NutritionOrderOralDietNutrientComponent i : nutrient) 549 dst.nutrient.add(i.copy()); 550 }; 551 if (texture != null) { 552 dst.texture = new ArrayList<NutritionOrderOralDietTextureComponent>(); 553 for (NutritionOrderOralDietTextureComponent i : texture) 554 dst.texture.add(i.copy()); 555 }; 556 if (fluidConsistencyType != null) { 557 dst.fluidConsistencyType = new ArrayList<CodeableConcept>(); 558 for (CodeableConcept i : fluidConsistencyType) 559 dst.fluidConsistencyType.add(i.copy()); 560 }; 561 dst.instruction = instruction == null ? null : instruction.copy(); 562 } 563 564 @Override 565 public boolean equalsDeep(Base other_) { 566 if (!super.equalsDeep(other_)) 567 return false; 568 if (!(other_ instanceof NutritionOrderOralDietComponent)) 569 return false; 570 NutritionOrderOralDietComponent o = (NutritionOrderOralDietComponent) other_; 571 return compareDeep(type, o.type, true) && compareDeep(schedule, o.schedule, true) && compareDeep(nutrient, o.nutrient, true) 572 && compareDeep(texture, o.texture, true) && compareDeep(fluidConsistencyType, o.fluidConsistencyType, true) 573 && compareDeep(instruction, o.instruction, true); 574 } 575 576 @Override 577 public boolean equalsShallow(Base other_) { 578 if (!super.equalsShallow(other_)) 579 return false; 580 if (!(other_ instanceof NutritionOrderOralDietComponent)) 581 return false; 582 NutritionOrderOralDietComponent o = (NutritionOrderOralDietComponent) other_; 583 return compareValues(instruction, o.instruction, true); 584 } 585 586 public boolean isEmpty() { 587 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, schedule, nutrient 588 , texture, fluidConsistencyType, instruction); 589 } 590 591 public String fhirType() { 592 return "NutritionOrder.oralDiet"; 593 594 } 595 596 } 597 598 @Block() 599 public static class OralDietScheduleComponent extends BackboneElement implements IBaseBackboneElement { 600 /** 601 * 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. 602 */ 603 @Child(name = "timing", type = {Timing.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 604 @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." ) 605 protected List<Timing> timing; 606 607 /** 608 * Indicates whether the product is only taken when needed within a specific dosing schedule. 609 */ 610 @Child(name = "asNeeded", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 611 @Description(shortDefinition="Take 'as needed'", formalDefinition="Indicates whether the product is only taken when needed within a specific dosing schedule." ) 612 protected BooleanType asNeeded; 613 614 /** 615 * Indicates whether the product is only taken based on a precondition for taking the product. 616 */ 617 @Child(name = "asNeededFor", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 618 @Description(shortDefinition="Take 'as needed' for x", formalDefinition="Indicates whether the product is only taken based on a precondition for taking the product." ) 619 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-as-needed-reason") 620 protected CodeableConcept asNeededFor; 621 622 private static final long serialVersionUID = -1051458478L; 623 624 /** 625 * Constructor 626 */ 627 public OralDietScheduleComponent() { 628 super(); 629 } 630 631 /** 632 * @return {@link #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.) 633 */ 634 public List<Timing> getTiming() { 635 if (this.timing == null) 636 this.timing = new ArrayList<Timing>(); 637 return this.timing; 638 } 639 640 /** 641 * @return Returns a reference to <code>this</code> for easy method chaining 642 */ 643 public OralDietScheduleComponent setTiming(List<Timing> theTiming) { 644 this.timing = theTiming; 645 return this; 646 } 647 648 public boolean hasTiming() { 649 if (this.timing == null) 650 return false; 651 for (Timing item : this.timing) 652 if (!item.isEmpty()) 653 return true; 654 return false; 655 } 656 657 public Timing addTiming() { //3 658 Timing t = new Timing(); 659 if (this.timing == null) 660 this.timing = new ArrayList<Timing>(); 661 this.timing.add(t); 662 return t; 663 } 664 665 public OralDietScheduleComponent addTiming(Timing t) { //3 666 if (t == null) 667 return this; 668 if (this.timing == null) 669 this.timing = new ArrayList<Timing>(); 670 this.timing.add(t); 671 return this; 672 } 673 674 /** 675 * @return The first repetition of repeating field {@link #timing}, creating it if it does not already exist {3} 676 */ 677 public Timing getTimingFirstRep() { 678 if (getTiming().isEmpty()) { 679 addTiming(); 680 } 681 return getTiming().get(0); 682 } 683 684 /** 685 * @return {@link #asNeeded} (Indicates whether the product is only taken when needed within a specific dosing schedule.). This is the underlying object with id, value and extensions. The accessor "getAsNeeded" gives direct access to the value 686 */ 687 public BooleanType getAsNeededElement() { 688 if (this.asNeeded == null) 689 if (Configuration.errorOnAutoCreate()) 690 throw new Error("Attempt to auto-create OralDietScheduleComponent.asNeeded"); 691 else if (Configuration.doAutoCreate()) 692 this.asNeeded = new BooleanType(); // bb 693 return this.asNeeded; 694 } 695 696 public boolean hasAsNeededElement() { 697 return this.asNeeded != null && !this.asNeeded.isEmpty(); 698 } 699 700 public boolean hasAsNeeded() { 701 return this.asNeeded != null && !this.asNeeded.isEmpty(); 702 } 703 704 /** 705 * @param value {@link #asNeeded} (Indicates whether the product is only taken when needed within a specific dosing schedule.). This is the underlying object with id, value and extensions. The accessor "getAsNeeded" gives direct access to the value 706 */ 707 public OralDietScheduleComponent setAsNeededElement(BooleanType value) { 708 this.asNeeded = value; 709 return this; 710 } 711 712 /** 713 * @return Indicates whether the product is only taken when needed within a specific dosing schedule. 714 */ 715 public boolean getAsNeeded() { 716 return this.asNeeded == null || this.asNeeded.isEmpty() ? false : this.asNeeded.getValue(); 717 } 718 719 /** 720 * @param value Indicates whether the product is only taken when needed within a specific dosing schedule. 721 */ 722 public OralDietScheduleComponent setAsNeeded(boolean value) { 723 if (this.asNeeded == null) 724 this.asNeeded = new BooleanType(); 725 this.asNeeded.setValue(value); 726 return this; 727 } 728 729 /** 730 * @return {@link #asNeededFor} (Indicates whether the product is only taken based on a precondition for taking the product.) 731 */ 732 public CodeableConcept getAsNeededFor() { 733 if (this.asNeededFor == null) 734 if (Configuration.errorOnAutoCreate()) 735 throw new Error("Attempt to auto-create OralDietScheduleComponent.asNeededFor"); 736 else if (Configuration.doAutoCreate()) 737 this.asNeededFor = new CodeableConcept(); // cc 738 return this.asNeededFor; 739 } 740 741 public boolean hasAsNeededFor() { 742 return this.asNeededFor != null && !this.asNeededFor.isEmpty(); 743 } 744 745 /** 746 * @param value {@link #asNeededFor} (Indicates whether the product is only taken based on a precondition for taking the product.) 747 */ 748 public OralDietScheduleComponent setAsNeededFor(CodeableConcept value) { 749 this.asNeededFor = value; 750 return this; 751 } 752 753 protected void listChildren(List<Property> children) { 754 super.listChildren(children); 755 children.add(new Property("timing", "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, timing)); 756 children.add(new Property("asNeeded", "boolean", "Indicates whether the product is only taken when needed within a specific dosing schedule.", 0, 1, asNeeded)); 757 children.add(new Property("asNeededFor", "CodeableConcept", "Indicates whether the product is only taken based on a precondition for taking the product.", 0, 1, asNeededFor)); 758 } 759 760 @Override 761 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 762 switch (_hash) { 763 case -873664438: /*timing*/ return new Property("timing", "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, timing); 764 case -1432923513: /*asNeeded*/ return new Property("asNeeded", "boolean", "Indicates whether the product is only taken when needed within a specific dosing schedule.", 0, 1, asNeeded); 765 case -544350014: /*asNeededFor*/ return new Property("asNeededFor", "CodeableConcept", "Indicates whether the product is only taken based on a precondition for taking the product.", 0, 1, asNeededFor); 766 default: return super.getNamedProperty(_hash, _name, _checkValid); 767 } 768 769 } 770 771 @Override 772 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 773 switch (hash) { 774 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : this.timing.toArray(new Base[this.timing.size()]); // Timing 775 case -1432923513: /*asNeeded*/ return this.asNeeded == null ? new Base[0] : new Base[] {this.asNeeded}; // BooleanType 776 case -544350014: /*asNeededFor*/ return this.asNeededFor == null ? new Base[0] : new Base[] {this.asNeededFor}; // CodeableConcept 777 default: return super.getProperty(hash, name, checkValid); 778 } 779 780 } 781 782 @Override 783 public Base setProperty(int hash, String name, Base value) throws FHIRException { 784 switch (hash) { 785 case -873664438: // timing 786 this.getTiming().add(TypeConvertor.castToTiming(value)); // Timing 787 return value; 788 case -1432923513: // asNeeded 789 this.asNeeded = TypeConvertor.castToBoolean(value); // BooleanType 790 return value; 791 case -544350014: // asNeededFor 792 this.asNeededFor = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 793 return value; 794 default: return super.setProperty(hash, name, value); 795 } 796 797 } 798 799 @Override 800 public Base setProperty(String name, Base value) throws FHIRException { 801 if (name.equals("timing")) { 802 this.getTiming().add(TypeConvertor.castToTiming(value)); 803 } else if (name.equals("asNeeded")) { 804 this.asNeeded = TypeConvertor.castToBoolean(value); // BooleanType 805 } else if (name.equals("asNeededFor")) { 806 this.asNeededFor = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 807 } else 808 return super.setProperty(name, value); 809 return value; 810 } 811 812 @Override 813 public Base makeProperty(int hash, String name) throws FHIRException { 814 switch (hash) { 815 case -873664438: return addTiming(); 816 case -1432923513: return getAsNeededElement(); 817 case -544350014: return getAsNeededFor(); 818 default: return super.makeProperty(hash, name); 819 } 820 821 } 822 823 @Override 824 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 825 switch (hash) { 826 case -873664438: /*timing*/ return new String[] {"Timing"}; 827 case -1432923513: /*asNeeded*/ return new String[] {"boolean"}; 828 case -544350014: /*asNeededFor*/ return new String[] {"CodeableConcept"}; 829 default: return super.getTypesForProperty(hash, name); 830 } 831 832 } 833 834 @Override 835 public Base addChild(String name) throws FHIRException { 836 if (name.equals("timing")) { 837 return addTiming(); 838 } 839 else if (name.equals("asNeeded")) { 840 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.oralDiet.schedule.asNeeded"); 841 } 842 else if (name.equals("asNeededFor")) { 843 this.asNeededFor = new CodeableConcept(); 844 return this.asNeededFor; 845 } 846 else 847 return super.addChild(name); 848 } 849 850 public OralDietScheduleComponent copy() { 851 OralDietScheduleComponent dst = new OralDietScheduleComponent(); 852 copyValues(dst); 853 return dst; 854 } 855 856 public void copyValues(OralDietScheduleComponent dst) { 857 super.copyValues(dst); 858 if (timing != null) { 859 dst.timing = new ArrayList<Timing>(); 860 for (Timing i : timing) 861 dst.timing.add(i.copy()); 862 }; 863 dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); 864 dst.asNeededFor = asNeededFor == null ? null : asNeededFor.copy(); 865 } 866 867 @Override 868 public boolean equalsDeep(Base other_) { 869 if (!super.equalsDeep(other_)) 870 return false; 871 if (!(other_ instanceof OralDietScheduleComponent)) 872 return false; 873 OralDietScheduleComponent o = (OralDietScheduleComponent) other_; 874 return compareDeep(timing, o.timing, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(asNeededFor, o.asNeededFor, true) 875 ; 876 } 877 878 @Override 879 public boolean equalsShallow(Base other_) { 880 if (!super.equalsShallow(other_)) 881 return false; 882 if (!(other_ instanceof OralDietScheduleComponent)) 883 return false; 884 OralDietScheduleComponent o = (OralDietScheduleComponent) other_; 885 return compareValues(asNeeded, o.asNeeded, true); 886 } 887 888 public boolean isEmpty() { 889 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(timing, asNeeded, asNeededFor 890 ); 891 } 892 893 public String fhirType() { 894 return "NutritionOrder.oralDiet.schedule"; 895 896 } 897 898 } 899 900 @Block() 901 public static class NutritionOrderOralDietNutrientComponent extends BackboneElement implements IBaseBackboneElement { 902 /** 903 * The nutrient that is being modified such as carbohydrate or sodium. 904 */ 905 @Child(name = "modifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 906 @Description(shortDefinition="Type of nutrient that is being modified", formalDefinition="The nutrient that is being modified such as carbohydrate or sodium." ) 907 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/nutrient-code") 908 protected CodeableConcept modifier; 909 910 /** 911 * The quantity of the specified nutrient to include in diet. 912 */ 913 @Child(name = "amount", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=false) 914 @Description(shortDefinition="Quantity of the specified nutrient", formalDefinition="The quantity of the specified nutrient to include in diet." ) 915 protected Quantity amount; 916 917 private static final long serialVersionUID = 1042462093L; 918 919 /** 920 * Constructor 921 */ 922 public NutritionOrderOralDietNutrientComponent() { 923 super(); 924 } 925 926 /** 927 * @return {@link #modifier} (The nutrient that is being modified such as carbohydrate or sodium.) 928 */ 929 public CodeableConcept getModifier() { 930 if (this.modifier == null) 931 if (Configuration.errorOnAutoCreate()) 932 throw new Error("Attempt to auto-create NutritionOrderOralDietNutrientComponent.modifier"); 933 else if (Configuration.doAutoCreate()) 934 this.modifier = new CodeableConcept(); // cc 935 return this.modifier; 936 } 937 938 public boolean hasModifier() { 939 return this.modifier != null && !this.modifier.isEmpty(); 940 } 941 942 /** 943 * @param value {@link #modifier} (The nutrient that is being modified such as carbohydrate or sodium.) 944 */ 945 public NutritionOrderOralDietNutrientComponent setModifier(CodeableConcept value) { 946 this.modifier = value; 947 return this; 948 } 949 950 /** 951 * @return {@link #amount} (The quantity of the specified nutrient to include in diet.) 952 */ 953 public Quantity getAmount() { 954 if (this.amount == null) 955 if (Configuration.errorOnAutoCreate()) 956 throw new Error("Attempt to auto-create NutritionOrderOralDietNutrientComponent.amount"); 957 else if (Configuration.doAutoCreate()) 958 this.amount = new Quantity(); // cc 959 return this.amount; 960 } 961 962 public boolean hasAmount() { 963 return this.amount != null && !this.amount.isEmpty(); 964 } 965 966 /** 967 * @param value {@link #amount} (The quantity of the specified nutrient to include in diet.) 968 */ 969 public NutritionOrderOralDietNutrientComponent setAmount(Quantity value) { 970 this.amount = value; 971 return this; 972 } 973 974 protected void listChildren(List<Property> children) { 975 super.listChildren(children); 976 children.add(new Property("modifier", "CodeableConcept", "The nutrient that is being modified such as carbohydrate or sodium.", 0, 1, modifier)); 977 children.add(new Property("amount", "Quantity", "The quantity of the specified nutrient to include in diet.", 0, 1, amount)); 978 } 979 980 @Override 981 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 982 switch (_hash) { 983 case -615513385: /*modifier*/ return new Property("modifier", "CodeableConcept", "The nutrient that is being modified such as carbohydrate or sodium.", 0, 1, modifier); 984 case -1413853096: /*amount*/ return new Property("amount", "Quantity", "The quantity of the specified nutrient to include in diet.", 0, 1, amount); 985 default: return super.getNamedProperty(_hash, _name, _checkValid); 986 } 987 988 } 989 990 @Override 991 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 992 switch (hash) { 993 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : new Base[] {this.modifier}; // CodeableConcept 994 case -1413853096: /*amount*/ return this.amount == null ? new Base[0] : new Base[] {this.amount}; // Quantity 995 default: return super.getProperty(hash, name, checkValid); 996 } 997 998 } 999 1000 @Override 1001 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1002 switch (hash) { 1003 case -615513385: // modifier 1004 this.modifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1005 return value; 1006 case -1413853096: // amount 1007 this.amount = TypeConvertor.castToQuantity(value); // Quantity 1008 return value; 1009 default: return super.setProperty(hash, name, value); 1010 } 1011 1012 } 1013 1014 @Override 1015 public Base setProperty(String name, Base value) throws FHIRException { 1016 if (name.equals("modifier")) { 1017 this.modifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1018 } else if (name.equals("amount")) { 1019 this.amount = TypeConvertor.castToQuantity(value); // Quantity 1020 } else 1021 return super.setProperty(name, value); 1022 return value; 1023 } 1024 1025 @Override 1026 public Base makeProperty(int hash, String name) throws FHIRException { 1027 switch (hash) { 1028 case -615513385: return getModifier(); 1029 case -1413853096: return getAmount(); 1030 default: return super.makeProperty(hash, name); 1031 } 1032 1033 } 1034 1035 @Override 1036 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1037 switch (hash) { 1038 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 1039 case -1413853096: /*amount*/ return new String[] {"Quantity"}; 1040 default: return super.getTypesForProperty(hash, name); 1041 } 1042 1043 } 1044 1045 @Override 1046 public Base addChild(String name) throws FHIRException { 1047 if (name.equals("modifier")) { 1048 this.modifier = new CodeableConcept(); 1049 return this.modifier; 1050 } 1051 else if (name.equals("amount")) { 1052 this.amount = new Quantity(); 1053 return this.amount; 1054 } 1055 else 1056 return super.addChild(name); 1057 } 1058 1059 public NutritionOrderOralDietNutrientComponent copy() { 1060 NutritionOrderOralDietNutrientComponent dst = new NutritionOrderOralDietNutrientComponent(); 1061 copyValues(dst); 1062 return dst; 1063 } 1064 1065 public void copyValues(NutritionOrderOralDietNutrientComponent dst) { 1066 super.copyValues(dst); 1067 dst.modifier = modifier == null ? null : modifier.copy(); 1068 dst.amount = amount == null ? null : amount.copy(); 1069 } 1070 1071 @Override 1072 public boolean equalsDeep(Base other_) { 1073 if (!super.equalsDeep(other_)) 1074 return false; 1075 if (!(other_ instanceof NutritionOrderOralDietNutrientComponent)) 1076 return false; 1077 NutritionOrderOralDietNutrientComponent o = (NutritionOrderOralDietNutrientComponent) other_; 1078 return compareDeep(modifier, o.modifier, true) && compareDeep(amount, o.amount, true); 1079 } 1080 1081 @Override 1082 public boolean equalsShallow(Base other_) { 1083 if (!super.equalsShallow(other_)) 1084 return false; 1085 if (!(other_ instanceof NutritionOrderOralDietNutrientComponent)) 1086 return false; 1087 NutritionOrderOralDietNutrientComponent o = (NutritionOrderOralDietNutrientComponent) other_; 1088 return true; 1089 } 1090 1091 public boolean isEmpty() { 1092 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(modifier, amount); 1093 } 1094 1095 public String fhirType() { 1096 return "NutritionOrder.oralDiet.nutrient"; 1097 1098 } 1099 1100 } 1101 1102 @Block() 1103 public static class NutritionOrderOralDietTextureComponent extends BackboneElement implements IBaseBackboneElement { 1104 /** 1105 * Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed. 1106 */ 1107 @Child(name = "modifier", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 1108 @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." ) 1109 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/texture-code") 1110 protected CodeableConcept modifier; 1111 1112 /** 1113 * The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types. 1114 */ 1115 @Child(name = "foodType", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1116 @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." ) 1117 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/modified-foodtype") 1118 protected CodeableConcept foodType; 1119 1120 private static final long serialVersionUID = -56402817L; 1121 1122 /** 1123 * Constructor 1124 */ 1125 public NutritionOrderOralDietTextureComponent() { 1126 super(); 1127 } 1128 1129 /** 1130 * @return {@link #modifier} (Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.) 1131 */ 1132 public CodeableConcept getModifier() { 1133 if (this.modifier == null) 1134 if (Configuration.errorOnAutoCreate()) 1135 throw new Error("Attempt to auto-create NutritionOrderOralDietTextureComponent.modifier"); 1136 else if (Configuration.doAutoCreate()) 1137 this.modifier = new CodeableConcept(); // cc 1138 return this.modifier; 1139 } 1140 1141 public boolean hasModifier() { 1142 return this.modifier != null && !this.modifier.isEmpty(); 1143 } 1144 1145 /** 1146 * @param value {@link #modifier} (Any texture modifications (for solid foods) that should be made, e.g. easy to chew, chopped, ground, and pureed.) 1147 */ 1148 public NutritionOrderOralDietTextureComponent setModifier(CodeableConcept value) { 1149 this.modifier = value; 1150 return this; 1151 } 1152 1153 /** 1154 * @return {@link #foodType} (The food type(s) (e.g. meats, all foods) that the texture modification applies to. This could be all foods types.) 1155 */ 1156 public CodeableConcept getFoodType() { 1157 if (this.foodType == null) 1158 if (Configuration.errorOnAutoCreate()) 1159 throw new Error("Attempt to auto-create NutritionOrderOralDietTextureComponent.foodType"); 1160 else if (Configuration.doAutoCreate()) 1161 this.foodType = new CodeableConcept(); // cc 1162 return this.foodType; 1163 } 1164 1165 public boolean hasFoodType() { 1166 return this.foodType != null && !this.foodType.isEmpty(); 1167 } 1168 1169 /** 1170 * @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.) 1171 */ 1172 public NutritionOrderOralDietTextureComponent setFoodType(CodeableConcept value) { 1173 this.foodType = value; 1174 return this; 1175 } 1176 1177 protected void listChildren(List<Property> children) { 1178 super.listChildren(children); 1179 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)); 1180 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)); 1181 } 1182 1183 @Override 1184 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1185 switch (_hash) { 1186 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); 1187 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); 1188 default: return super.getNamedProperty(_hash, _name, _checkValid); 1189 } 1190 1191 } 1192 1193 @Override 1194 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1195 switch (hash) { 1196 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : new Base[] {this.modifier}; // CodeableConcept 1197 case 379498680: /*foodType*/ return this.foodType == null ? new Base[0] : new Base[] {this.foodType}; // CodeableConcept 1198 default: return super.getProperty(hash, name, checkValid); 1199 } 1200 1201 } 1202 1203 @Override 1204 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1205 switch (hash) { 1206 case -615513385: // modifier 1207 this.modifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1208 return value; 1209 case 379498680: // foodType 1210 this.foodType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1211 return value; 1212 default: return super.setProperty(hash, name, value); 1213 } 1214 1215 } 1216 1217 @Override 1218 public Base setProperty(String name, Base value) throws FHIRException { 1219 if (name.equals("modifier")) { 1220 this.modifier = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1221 } else if (name.equals("foodType")) { 1222 this.foodType = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1223 } else 1224 return super.setProperty(name, value); 1225 return value; 1226 } 1227 1228 @Override 1229 public Base makeProperty(int hash, String name) throws FHIRException { 1230 switch (hash) { 1231 case -615513385: return getModifier(); 1232 case 379498680: return getFoodType(); 1233 default: return super.makeProperty(hash, name); 1234 } 1235 1236 } 1237 1238 @Override 1239 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1240 switch (hash) { 1241 case -615513385: /*modifier*/ return new String[] {"CodeableConcept"}; 1242 case 379498680: /*foodType*/ return new String[] {"CodeableConcept"}; 1243 default: return super.getTypesForProperty(hash, name); 1244 } 1245 1246 } 1247 1248 @Override 1249 public Base addChild(String name) throws FHIRException { 1250 if (name.equals("modifier")) { 1251 this.modifier = new CodeableConcept(); 1252 return this.modifier; 1253 } 1254 else if (name.equals("foodType")) { 1255 this.foodType = new CodeableConcept(); 1256 return this.foodType; 1257 } 1258 else 1259 return super.addChild(name); 1260 } 1261 1262 public NutritionOrderOralDietTextureComponent copy() { 1263 NutritionOrderOralDietTextureComponent dst = new NutritionOrderOralDietTextureComponent(); 1264 copyValues(dst); 1265 return dst; 1266 } 1267 1268 public void copyValues(NutritionOrderOralDietTextureComponent dst) { 1269 super.copyValues(dst); 1270 dst.modifier = modifier == null ? null : modifier.copy(); 1271 dst.foodType = foodType == null ? null : foodType.copy(); 1272 } 1273 1274 @Override 1275 public boolean equalsDeep(Base other_) { 1276 if (!super.equalsDeep(other_)) 1277 return false; 1278 if (!(other_ instanceof NutritionOrderOralDietTextureComponent)) 1279 return false; 1280 NutritionOrderOralDietTextureComponent o = (NutritionOrderOralDietTextureComponent) other_; 1281 return compareDeep(modifier, o.modifier, true) && compareDeep(foodType, o.foodType, true); 1282 } 1283 1284 @Override 1285 public boolean equalsShallow(Base other_) { 1286 if (!super.equalsShallow(other_)) 1287 return false; 1288 if (!(other_ instanceof NutritionOrderOralDietTextureComponent)) 1289 return false; 1290 NutritionOrderOralDietTextureComponent o = (NutritionOrderOralDietTextureComponent) other_; 1291 return true; 1292 } 1293 1294 public boolean isEmpty() { 1295 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(modifier, foodType); 1296 } 1297 1298 public String fhirType() { 1299 return "NutritionOrder.oralDiet.texture"; 1300 1301 } 1302 1303 } 1304 1305 @Block() 1306 public static class NutritionOrderSupplementComponent extends BackboneElement implements IBaseBackboneElement { 1307 /** 1308 * The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement. 1309 */ 1310 @Child(name = "type", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=true) 1311 @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." ) 1312 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/supplement-type") 1313 protected CodeableReference type; 1314 1315 /** 1316 * The product or brand name of the nutritional supplement such as "Acme Protein Shake". 1317 */ 1318 @Child(name = "productName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1319 @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\"." ) 1320 protected StringType productName; 1321 1322 /** 1323 * Schedule information for a supplement. 1324 */ 1325 @Child(name = "schedule", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 1326 @Description(shortDefinition="Scheduling information for supplements", formalDefinition="Schedule information for a supplement." ) 1327 protected SupplementScheduleComponent schedule; 1328 1329 /** 1330 * The amount of the nutritional supplement to be given. 1331 */ 1332 @Child(name = "quantity", type = {Quantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 1333 @Description(shortDefinition="Amount of the nutritional supplement", formalDefinition="The amount of the nutritional supplement to be given." ) 1334 protected Quantity quantity; 1335 1336 /** 1337 * Free text or additional instructions or information pertaining to the oral supplement. 1338 */ 1339 @Child(name = "instruction", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1340 @Description(shortDefinition="Instructions or additional information about the oral supplement", formalDefinition="Free text or additional instructions or information pertaining to the oral supplement." ) 1341 protected StringType instruction; 1342 1343 private static final long serialVersionUID = 648731928L; 1344 1345 /** 1346 * Constructor 1347 */ 1348 public NutritionOrderSupplementComponent() { 1349 super(); 1350 } 1351 1352 /** 1353 * @return {@link #type} (The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.) 1354 */ 1355 public CodeableReference getType() { 1356 if (this.type == null) 1357 if (Configuration.errorOnAutoCreate()) 1358 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.type"); 1359 else if (Configuration.doAutoCreate()) 1360 this.type = new CodeableReference(); // cc 1361 return this.type; 1362 } 1363 1364 public boolean hasType() { 1365 return this.type != null && !this.type.isEmpty(); 1366 } 1367 1368 /** 1369 * @param value {@link #type} (The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.) 1370 */ 1371 public NutritionOrderSupplementComponent setType(CodeableReference value) { 1372 this.type = value; 1373 return this; 1374 } 1375 1376 /** 1377 * @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 1378 */ 1379 public StringType getProductNameElement() { 1380 if (this.productName == null) 1381 if (Configuration.errorOnAutoCreate()) 1382 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.productName"); 1383 else if (Configuration.doAutoCreate()) 1384 this.productName = new StringType(); // bb 1385 return this.productName; 1386 } 1387 1388 public boolean hasProductNameElement() { 1389 return this.productName != null && !this.productName.isEmpty(); 1390 } 1391 1392 public boolean hasProductName() { 1393 return this.productName != null && !this.productName.isEmpty(); 1394 } 1395 1396 /** 1397 * @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 1398 */ 1399 public NutritionOrderSupplementComponent setProductNameElement(StringType value) { 1400 this.productName = value; 1401 return this; 1402 } 1403 1404 /** 1405 * @return The product or brand name of the nutritional supplement such as "Acme Protein Shake". 1406 */ 1407 public String getProductName() { 1408 return this.productName == null ? null : this.productName.getValue(); 1409 } 1410 1411 /** 1412 * @param value The product or brand name of the nutritional supplement such as "Acme Protein Shake". 1413 */ 1414 public NutritionOrderSupplementComponent setProductName(String value) { 1415 if (Utilities.noString(value)) 1416 this.productName = null; 1417 else { 1418 if (this.productName == null) 1419 this.productName = new StringType(); 1420 this.productName.setValue(value); 1421 } 1422 return this; 1423 } 1424 1425 /** 1426 * @return {@link #schedule} (Schedule information for a supplement.) 1427 */ 1428 public SupplementScheduleComponent getSchedule() { 1429 if (this.schedule == null) 1430 if (Configuration.errorOnAutoCreate()) 1431 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.schedule"); 1432 else if (Configuration.doAutoCreate()) 1433 this.schedule = new SupplementScheduleComponent(); // cc 1434 return this.schedule; 1435 } 1436 1437 public boolean hasSchedule() { 1438 return this.schedule != null && !this.schedule.isEmpty(); 1439 } 1440 1441 /** 1442 * @param value {@link #schedule} (Schedule information for a supplement.) 1443 */ 1444 public NutritionOrderSupplementComponent setSchedule(SupplementScheduleComponent value) { 1445 this.schedule = value; 1446 return this; 1447 } 1448 1449 /** 1450 * @return {@link #quantity} (The amount of the nutritional supplement to be given.) 1451 */ 1452 public Quantity getQuantity() { 1453 if (this.quantity == null) 1454 if (Configuration.errorOnAutoCreate()) 1455 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.quantity"); 1456 else if (Configuration.doAutoCreate()) 1457 this.quantity = new Quantity(); // cc 1458 return this.quantity; 1459 } 1460 1461 public boolean hasQuantity() { 1462 return this.quantity != null && !this.quantity.isEmpty(); 1463 } 1464 1465 /** 1466 * @param value {@link #quantity} (The amount of the nutritional supplement to be given.) 1467 */ 1468 public NutritionOrderSupplementComponent setQuantity(Quantity value) { 1469 this.quantity = value; 1470 return this; 1471 } 1472 1473 /** 1474 * @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 1475 */ 1476 public StringType getInstructionElement() { 1477 if (this.instruction == null) 1478 if (Configuration.errorOnAutoCreate()) 1479 throw new Error("Attempt to auto-create NutritionOrderSupplementComponent.instruction"); 1480 else if (Configuration.doAutoCreate()) 1481 this.instruction = new StringType(); // bb 1482 return this.instruction; 1483 } 1484 1485 public boolean hasInstructionElement() { 1486 return this.instruction != null && !this.instruction.isEmpty(); 1487 } 1488 1489 public boolean hasInstruction() { 1490 return this.instruction != null && !this.instruction.isEmpty(); 1491 } 1492 1493 /** 1494 * @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 1495 */ 1496 public NutritionOrderSupplementComponent setInstructionElement(StringType value) { 1497 this.instruction = value; 1498 return this; 1499 } 1500 1501 /** 1502 * @return Free text or additional instructions or information pertaining to the oral supplement. 1503 */ 1504 public String getInstruction() { 1505 return this.instruction == null ? null : this.instruction.getValue(); 1506 } 1507 1508 /** 1509 * @param value Free text or additional instructions or information pertaining to the oral supplement. 1510 */ 1511 public NutritionOrderSupplementComponent setInstruction(String value) { 1512 if (Utilities.noString(value)) 1513 this.instruction = null; 1514 else { 1515 if (this.instruction == null) 1516 this.instruction = new StringType(); 1517 this.instruction.setValue(value); 1518 } 1519 return this; 1520 } 1521 1522 protected void listChildren(List<Property> children) { 1523 super.listChildren(children); 1524 children.add(new Property("type", "CodeableReference(NutritionProduct)", "The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.", 0, 1, type)); 1525 children.add(new Property("productName", "string", "The product or brand name of the nutritional supplement such as \"Acme Protein Shake\".", 0, 1, productName)); 1526 children.add(new Property("schedule", "", "Schedule information for a supplement.", 0, 1, schedule)); 1527 children.add(new Property("quantity", "Quantity", "The amount of the nutritional supplement to be given.", 0, 1, quantity)); 1528 children.add(new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral supplement.", 0, 1, instruction)); 1529 } 1530 1531 @Override 1532 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1533 switch (_hash) { 1534 case 3575610: /*type*/ return new Property("type", "CodeableReference(NutritionProduct)", "The kind of nutritional supplement product required such as a high protein or pediatric clear liquid supplement.", 0, 1, type); 1535 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); 1536 case -697920873: /*schedule*/ return new Property("schedule", "", "Schedule information for a supplement.", 0, 1, schedule); 1537 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The amount of the nutritional supplement to be given.", 0, 1, quantity); 1538 case 301526158: /*instruction*/ return new Property("instruction", "string", "Free text or additional instructions or information pertaining to the oral supplement.", 0, 1, instruction); 1539 default: return super.getNamedProperty(_hash, _name, _checkValid); 1540 } 1541 1542 } 1543 1544 @Override 1545 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1546 switch (hash) { 1547 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableReference 1548 case -1491817446: /*productName*/ return this.productName == null ? new Base[0] : new Base[] {this.productName}; // StringType 1549 case -697920873: /*schedule*/ return this.schedule == null ? new Base[0] : new Base[] {this.schedule}; // SupplementScheduleComponent 1550 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 1551 case 301526158: /*instruction*/ return this.instruction == null ? new Base[0] : new Base[] {this.instruction}; // StringType 1552 default: return super.getProperty(hash, name, checkValid); 1553 } 1554 1555 } 1556 1557 @Override 1558 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1559 switch (hash) { 1560 case 3575610: // type 1561 this.type = TypeConvertor.castToCodeableReference(value); // CodeableReference 1562 return value; 1563 case -1491817446: // productName 1564 this.productName = TypeConvertor.castToString(value); // StringType 1565 return value; 1566 case -697920873: // schedule 1567 this.schedule = (SupplementScheduleComponent) value; // SupplementScheduleComponent 1568 return value; 1569 case -1285004149: // quantity 1570 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1571 return value; 1572 case 301526158: // instruction 1573 this.instruction = TypeConvertor.castToString(value); // StringType 1574 return value; 1575 default: return super.setProperty(hash, name, value); 1576 } 1577 1578 } 1579 1580 @Override 1581 public Base setProperty(String name, Base value) throws FHIRException { 1582 if (name.equals("type")) { 1583 this.type = TypeConvertor.castToCodeableReference(value); // CodeableReference 1584 } else if (name.equals("productName")) { 1585 this.productName = TypeConvertor.castToString(value); // StringType 1586 } else if (name.equals("schedule")) { 1587 this.schedule = (SupplementScheduleComponent) value; // SupplementScheduleComponent 1588 } else if (name.equals("quantity")) { 1589 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 1590 } else if (name.equals("instruction")) { 1591 this.instruction = TypeConvertor.castToString(value); // StringType 1592 } else 1593 return super.setProperty(name, value); 1594 return value; 1595 } 1596 1597 @Override 1598 public Base makeProperty(int hash, String name) throws FHIRException { 1599 switch (hash) { 1600 case 3575610: return getType(); 1601 case -1491817446: return getProductNameElement(); 1602 case -697920873: return getSchedule(); 1603 case -1285004149: return getQuantity(); 1604 case 301526158: return getInstructionElement(); 1605 default: return super.makeProperty(hash, name); 1606 } 1607 1608 } 1609 1610 @Override 1611 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1612 switch (hash) { 1613 case 3575610: /*type*/ return new String[] {"CodeableReference"}; 1614 case -1491817446: /*productName*/ return new String[] {"string"}; 1615 case -697920873: /*schedule*/ return new String[] {}; 1616 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 1617 case 301526158: /*instruction*/ return new String[] {"string"}; 1618 default: return super.getTypesForProperty(hash, name); 1619 } 1620 1621 } 1622 1623 @Override 1624 public Base addChild(String name) throws FHIRException { 1625 if (name.equals("type")) { 1626 this.type = new CodeableReference(); 1627 return this.type; 1628 } 1629 else if (name.equals("productName")) { 1630 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.supplement.productName"); 1631 } 1632 else if (name.equals("schedule")) { 1633 this.schedule = new SupplementScheduleComponent(); 1634 return this.schedule; 1635 } 1636 else if (name.equals("quantity")) { 1637 this.quantity = new Quantity(); 1638 return this.quantity; 1639 } 1640 else if (name.equals("instruction")) { 1641 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.supplement.instruction"); 1642 } 1643 else 1644 return super.addChild(name); 1645 } 1646 1647 public NutritionOrderSupplementComponent copy() { 1648 NutritionOrderSupplementComponent dst = new NutritionOrderSupplementComponent(); 1649 copyValues(dst); 1650 return dst; 1651 } 1652 1653 public void copyValues(NutritionOrderSupplementComponent dst) { 1654 super.copyValues(dst); 1655 dst.type = type == null ? null : type.copy(); 1656 dst.productName = productName == null ? null : productName.copy(); 1657 dst.schedule = schedule == null ? null : schedule.copy(); 1658 dst.quantity = quantity == null ? null : quantity.copy(); 1659 dst.instruction = instruction == null ? null : instruction.copy(); 1660 } 1661 1662 @Override 1663 public boolean equalsDeep(Base other_) { 1664 if (!super.equalsDeep(other_)) 1665 return false; 1666 if (!(other_ instanceof NutritionOrderSupplementComponent)) 1667 return false; 1668 NutritionOrderSupplementComponent o = (NutritionOrderSupplementComponent) other_; 1669 return compareDeep(type, o.type, true) && compareDeep(productName, o.productName, true) && compareDeep(schedule, o.schedule, true) 1670 && compareDeep(quantity, o.quantity, true) && compareDeep(instruction, o.instruction, true); 1671 } 1672 1673 @Override 1674 public boolean equalsShallow(Base other_) { 1675 if (!super.equalsShallow(other_)) 1676 return false; 1677 if (!(other_ instanceof NutritionOrderSupplementComponent)) 1678 return false; 1679 NutritionOrderSupplementComponent o = (NutritionOrderSupplementComponent) other_; 1680 return compareValues(productName, o.productName, true) && compareValues(instruction, o.instruction, true) 1681 ; 1682 } 1683 1684 public boolean isEmpty() { 1685 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, productName, schedule 1686 , quantity, instruction); 1687 } 1688 1689 public String fhirType() { 1690 return "NutritionOrder.supplement"; 1691 1692 } 1693 1694 } 1695 1696 @Block() 1697 public static class SupplementScheduleComponent extends BackboneElement implements IBaseBackboneElement { 1698 /** 1699 * The time period and frequency at which the supplement should be given. The supplement should be given for the combination of all schedules if more than one schedule is present. 1700 */ 1701 @Child(name = "timing", type = {Timing.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1702 @Description(shortDefinition="Scheduled frequency of diet", formalDefinition="The time period and frequency at which the supplement should be given. The supplement should be given for the combination of all schedules if more than one schedule is present." ) 1703 protected List<Timing> timing; 1704 1705 /** 1706 * Indicates whether the supplement is only taken when needed within a specific dosing schedule. 1707 */ 1708 @Child(name = "asNeeded", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1709 @Description(shortDefinition="Take 'as needed'", formalDefinition="Indicates whether the supplement is only taken when needed within a specific dosing schedule." ) 1710 protected BooleanType asNeeded; 1711 1712 /** 1713 * Indicates whether the supplement is only taken based on a precondition for taking the supplement. 1714 */ 1715 @Child(name = "asNeededFor", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 1716 @Description(shortDefinition="Take 'as needed' for x", formalDefinition="Indicates whether the supplement is only taken based on a precondition for taking the supplement." ) 1717 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-as-needed-reason") 1718 protected CodeableConcept asNeededFor; 1719 1720 private static final long serialVersionUID = -1051458478L; 1721 1722 /** 1723 * Constructor 1724 */ 1725 public SupplementScheduleComponent() { 1726 super(); 1727 } 1728 1729 /** 1730 * @return {@link #timing} (The time period and frequency at which the supplement should be given. The supplement should be given for the combination of all schedules if more than one schedule is present.) 1731 */ 1732 public List<Timing> getTiming() { 1733 if (this.timing == null) 1734 this.timing = new ArrayList<Timing>(); 1735 return this.timing; 1736 } 1737 1738 /** 1739 * @return Returns a reference to <code>this</code> for easy method chaining 1740 */ 1741 public SupplementScheduleComponent setTiming(List<Timing> theTiming) { 1742 this.timing = theTiming; 1743 return this; 1744 } 1745 1746 public boolean hasTiming() { 1747 if (this.timing == null) 1748 return false; 1749 for (Timing item : this.timing) 1750 if (!item.isEmpty()) 1751 return true; 1752 return false; 1753 } 1754 1755 public Timing addTiming() { //3 1756 Timing t = new Timing(); 1757 if (this.timing == null) 1758 this.timing = new ArrayList<Timing>(); 1759 this.timing.add(t); 1760 return t; 1761 } 1762 1763 public SupplementScheduleComponent addTiming(Timing t) { //3 1764 if (t == null) 1765 return this; 1766 if (this.timing == null) 1767 this.timing = new ArrayList<Timing>(); 1768 this.timing.add(t); 1769 return this; 1770 } 1771 1772 /** 1773 * @return The first repetition of repeating field {@link #timing}, creating it if it does not already exist {3} 1774 */ 1775 public Timing getTimingFirstRep() { 1776 if (getTiming().isEmpty()) { 1777 addTiming(); 1778 } 1779 return getTiming().get(0); 1780 } 1781 1782 /** 1783 * @return {@link #asNeeded} (Indicates whether the supplement is only taken when needed within a specific dosing schedule.). This is the underlying object with id, value and extensions. The accessor "getAsNeeded" gives direct access to the value 1784 */ 1785 public BooleanType getAsNeededElement() { 1786 if (this.asNeeded == null) 1787 if (Configuration.errorOnAutoCreate()) 1788 throw new Error("Attempt to auto-create SupplementScheduleComponent.asNeeded"); 1789 else if (Configuration.doAutoCreate()) 1790 this.asNeeded = new BooleanType(); // bb 1791 return this.asNeeded; 1792 } 1793 1794 public boolean hasAsNeededElement() { 1795 return this.asNeeded != null && !this.asNeeded.isEmpty(); 1796 } 1797 1798 public boolean hasAsNeeded() { 1799 return this.asNeeded != null && !this.asNeeded.isEmpty(); 1800 } 1801 1802 /** 1803 * @param value {@link #asNeeded} (Indicates whether the supplement is only taken when needed within a specific dosing schedule.). This is the underlying object with id, value and extensions. The accessor "getAsNeeded" gives direct access to the value 1804 */ 1805 public SupplementScheduleComponent setAsNeededElement(BooleanType value) { 1806 this.asNeeded = value; 1807 return this; 1808 } 1809 1810 /** 1811 * @return Indicates whether the supplement is only taken when needed within a specific dosing schedule. 1812 */ 1813 public boolean getAsNeeded() { 1814 return this.asNeeded == null || this.asNeeded.isEmpty() ? false : this.asNeeded.getValue(); 1815 } 1816 1817 /** 1818 * @param value Indicates whether the supplement is only taken when needed within a specific dosing schedule. 1819 */ 1820 public SupplementScheduleComponent setAsNeeded(boolean value) { 1821 if (this.asNeeded == null) 1822 this.asNeeded = new BooleanType(); 1823 this.asNeeded.setValue(value); 1824 return this; 1825 } 1826 1827 /** 1828 * @return {@link #asNeededFor} (Indicates whether the supplement is only taken based on a precondition for taking the supplement.) 1829 */ 1830 public CodeableConcept getAsNeededFor() { 1831 if (this.asNeededFor == null) 1832 if (Configuration.errorOnAutoCreate()) 1833 throw new Error("Attempt to auto-create SupplementScheduleComponent.asNeededFor"); 1834 else if (Configuration.doAutoCreate()) 1835 this.asNeededFor = new CodeableConcept(); // cc 1836 return this.asNeededFor; 1837 } 1838 1839 public boolean hasAsNeededFor() { 1840 return this.asNeededFor != null && !this.asNeededFor.isEmpty(); 1841 } 1842 1843 /** 1844 * @param value {@link #asNeededFor} (Indicates whether the supplement is only taken based on a precondition for taking the supplement.) 1845 */ 1846 public SupplementScheduleComponent setAsNeededFor(CodeableConcept value) { 1847 this.asNeededFor = value; 1848 return this; 1849 } 1850 1851 protected void listChildren(List<Property> children) { 1852 super.listChildren(children); 1853 children.add(new Property("timing", "Timing", "The time period and frequency at which the supplement 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, timing)); 1854 children.add(new Property("asNeeded", "boolean", "Indicates whether the supplement is only taken when needed within a specific dosing schedule.", 0, 1, asNeeded)); 1855 children.add(new Property("asNeededFor", "CodeableConcept", "Indicates whether the supplement is only taken based on a precondition for taking the supplement.", 0, 1, asNeededFor)); 1856 } 1857 1858 @Override 1859 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1860 switch (_hash) { 1861 case -873664438: /*timing*/ return new Property("timing", "Timing", "The time period and frequency at which the supplement 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, timing); 1862 case -1432923513: /*asNeeded*/ return new Property("asNeeded", "boolean", "Indicates whether the supplement is only taken when needed within a specific dosing schedule.", 0, 1, asNeeded); 1863 case -544350014: /*asNeededFor*/ return new Property("asNeededFor", "CodeableConcept", "Indicates whether the supplement is only taken based on a precondition for taking the supplement.", 0, 1, asNeededFor); 1864 default: return super.getNamedProperty(_hash, _name, _checkValid); 1865 } 1866 1867 } 1868 1869 @Override 1870 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1871 switch (hash) { 1872 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : this.timing.toArray(new Base[this.timing.size()]); // Timing 1873 case -1432923513: /*asNeeded*/ return this.asNeeded == null ? new Base[0] : new Base[] {this.asNeeded}; // BooleanType 1874 case -544350014: /*asNeededFor*/ return this.asNeededFor == null ? new Base[0] : new Base[] {this.asNeededFor}; // CodeableConcept 1875 default: return super.getProperty(hash, name, checkValid); 1876 } 1877 1878 } 1879 1880 @Override 1881 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1882 switch (hash) { 1883 case -873664438: // timing 1884 this.getTiming().add(TypeConvertor.castToTiming(value)); // Timing 1885 return value; 1886 case -1432923513: // asNeeded 1887 this.asNeeded = TypeConvertor.castToBoolean(value); // BooleanType 1888 return value; 1889 case -544350014: // asNeededFor 1890 this.asNeededFor = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1891 return value; 1892 default: return super.setProperty(hash, name, value); 1893 } 1894 1895 } 1896 1897 @Override 1898 public Base setProperty(String name, Base value) throws FHIRException { 1899 if (name.equals("timing")) { 1900 this.getTiming().add(TypeConvertor.castToTiming(value)); 1901 } else if (name.equals("asNeeded")) { 1902 this.asNeeded = TypeConvertor.castToBoolean(value); // BooleanType 1903 } else if (name.equals("asNeededFor")) { 1904 this.asNeededFor = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 1905 } else 1906 return super.setProperty(name, value); 1907 return value; 1908 } 1909 1910 @Override 1911 public Base makeProperty(int hash, String name) throws FHIRException { 1912 switch (hash) { 1913 case -873664438: return addTiming(); 1914 case -1432923513: return getAsNeededElement(); 1915 case -544350014: return getAsNeededFor(); 1916 default: return super.makeProperty(hash, name); 1917 } 1918 1919 } 1920 1921 @Override 1922 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1923 switch (hash) { 1924 case -873664438: /*timing*/ return new String[] {"Timing"}; 1925 case -1432923513: /*asNeeded*/ return new String[] {"boolean"}; 1926 case -544350014: /*asNeededFor*/ return new String[] {"CodeableConcept"}; 1927 default: return super.getTypesForProperty(hash, name); 1928 } 1929 1930 } 1931 1932 @Override 1933 public Base addChild(String name) throws FHIRException { 1934 if (name.equals("timing")) { 1935 return addTiming(); 1936 } 1937 else if (name.equals("asNeeded")) { 1938 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.supplement.schedule.asNeeded"); 1939 } 1940 else if (name.equals("asNeededFor")) { 1941 this.asNeededFor = new CodeableConcept(); 1942 return this.asNeededFor; 1943 } 1944 else 1945 return super.addChild(name); 1946 } 1947 1948 public SupplementScheduleComponent copy() { 1949 SupplementScheduleComponent dst = new SupplementScheduleComponent(); 1950 copyValues(dst); 1951 return dst; 1952 } 1953 1954 public void copyValues(SupplementScheduleComponent dst) { 1955 super.copyValues(dst); 1956 if (timing != null) { 1957 dst.timing = new ArrayList<Timing>(); 1958 for (Timing i : timing) 1959 dst.timing.add(i.copy()); 1960 }; 1961 dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); 1962 dst.asNeededFor = asNeededFor == null ? null : asNeededFor.copy(); 1963 } 1964 1965 @Override 1966 public boolean equalsDeep(Base other_) { 1967 if (!super.equalsDeep(other_)) 1968 return false; 1969 if (!(other_ instanceof SupplementScheduleComponent)) 1970 return false; 1971 SupplementScheduleComponent o = (SupplementScheduleComponent) other_; 1972 return compareDeep(timing, o.timing, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(asNeededFor, o.asNeededFor, true) 1973 ; 1974 } 1975 1976 @Override 1977 public boolean equalsShallow(Base other_) { 1978 if (!super.equalsShallow(other_)) 1979 return false; 1980 if (!(other_ instanceof SupplementScheduleComponent)) 1981 return false; 1982 SupplementScheduleComponent o = (SupplementScheduleComponent) other_; 1983 return compareValues(asNeeded, o.asNeeded, true); 1984 } 1985 1986 public boolean isEmpty() { 1987 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(timing, asNeeded, asNeededFor 1988 ); 1989 } 1990 1991 public String fhirType() { 1992 return "NutritionOrder.supplement.schedule"; 1993 1994 } 1995 1996 } 1997 1998 @Block() 1999 public static class NutritionOrderEnteralFormulaComponent extends BackboneElement implements IBaseBackboneElement { 2000 /** 2001 * The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula. 2002 */ 2003 @Child(name = "baseFormulaType", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=true) 2004 @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." ) 2005 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/entformula-type") 2006 protected CodeableReference baseFormulaType; 2007 2008 /** 2009 * The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". 2010 */ 2011 @Child(name = "baseFormulaProductName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2012 @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\"." ) 2013 protected StringType baseFormulaProductName; 2014 2015 /** 2016 * The intended type of device that is to be used for the administration of the enteral formula. 2017 */ 2018 @Child(name = "deliveryDevice", type = {CodeableReference.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2019 @Description(shortDefinition="Intended type of device for the administration", formalDefinition="The intended type of device that is to be used for the administration of the enteral formula." ) 2020 protected List<CodeableReference> deliveryDevice; 2021 2022 /** 2023 * Indicates modular components to be provided in addition or mixed with the base formula. 2024 */ 2025 @Child(name = "additive", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2026 @Description(shortDefinition="Components to add to the feeding", formalDefinition="Indicates modular components to be provided in addition or mixed with the base formula." ) 2027 protected List<NutritionOrderEnteralFormulaAdditiveComponent> additive; 2028 2029 /** 2030 * 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. 2031 */ 2032 @Child(name = "caloricDensity", type = {Quantity.class}, order=5, min=0, max=1, modifier=false, summary=false) 2033 @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." ) 2034 protected Quantity caloricDensity; 2035 2036 /** 2037 * The route or physiological path of administration into the patient's gastrointestinal tract for purposes of providing the formula feeding, e.g. nasogastric tube. 2038 */ 2039 @Child(name = "routeOfAdministration", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 2040 @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." ) 2041 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/enteral-route") 2042 protected CodeableConcept routeOfAdministration; 2043 2044 /** 2045 * 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. 2046 */ 2047 @Child(name = "administration", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2048 @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." ) 2049 protected List<NutritionOrderEnteralFormulaAdministrationComponent> administration; 2050 2051 /** 2052 * 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. 2053 */ 2054 @Child(name = "maxVolumeToDeliver", type = {Quantity.class}, order=8, min=0, max=1, modifier=false, summary=false) 2055 @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." ) 2056 protected Quantity maxVolumeToDeliver; 2057 2058 /** 2059 * Free text formula administration, feeding instructions or additional instructions or information. 2060 */ 2061 @Child(name = "administrationInstruction", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=true) 2062 @Description(shortDefinition="Formula feeding instructions expressed as text", formalDefinition="Free text formula administration, feeding instructions or additional instructions or information." ) 2063 protected MarkdownType administrationInstruction; 2064 2065 private static final long serialVersionUID = -694080614L; 2066 2067 /** 2068 * Constructor 2069 */ 2070 public NutritionOrderEnteralFormulaComponent() { 2071 super(); 2072 } 2073 2074 /** 2075 * @return {@link #baseFormulaType} (The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.) 2076 */ 2077 public CodeableReference getBaseFormulaType() { 2078 if (this.baseFormulaType == null) 2079 if (Configuration.errorOnAutoCreate()) 2080 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.baseFormulaType"); 2081 else if (Configuration.doAutoCreate()) 2082 this.baseFormulaType = new CodeableReference(); // cc 2083 return this.baseFormulaType; 2084 } 2085 2086 public boolean hasBaseFormulaType() { 2087 return this.baseFormulaType != null && !this.baseFormulaType.isEmpty(); 2088 } 2089 2090 /** 2091 * @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.) 2092 */ 2093 public NutritionOrderEnteralFormulaComponent setBaseFormulaType(CodeableReference value) { 2094 this.baseFormulaType = value; 2095 return this; 2096 } 2097 2098 /** 2099 * @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 2100 */ 2101 public StringType getBaseFormulaProductNameElement() { 2102 if (this.baseFormulaProductName == null) 2103 if (Configuration.errorOnAutoCreate()) 2104 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.baseFormulaProductName"); 2105 else if (Configuration.doAutoCreate()) 2106 this.baseFormulaProductName = new StringType(); // bb 2107 return this.baseFormulaProductName; 2108 } 2109 2110 public boolean hasBaseFormulaProductNameElement() { 2111 return this.baseFormulaProductName != null && !this.baseFormulaProductName.isEmpty(); 2112 } 2113 2114 public boolean hasBaseFormulaProductName() { 2115 return this.baseFormulaProductName != null && !this.baseFormulaProductName.isEmpty(); 2116 } 2117 2118 /** 2119 * @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 2120 */ 2121 public NutritionOrderEnteralFormulaComponent setBaseFormulaProductNameElement(StringType value) { 2122 this.baseFormulaProductName = value; 2123 return this; 2124 } 2125 2126 /** 2127 * @return The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". 2128 */ 2129 public String getBaseFormulaProductName() { 2130 return this.baseFormulaProductName == null ? null : this.baseFormulaProductName.getValue(); 2131 } 2132 2133 /** 2134 * @param value The product or brand name of the enteral or infant formula product such as "ACME Adult Standard Formula". 2135 */ 2136 public NutritionOrderEnteralFormulaComponent setBaseFormulaProductName(String value) { 2137 if (Utilities.noString(value)) 2138 this.baseFormulaProductName = null; 2139 else { 2140 if (this.baseFormulaProductName == null) 2141 this.baseFormulaProductName = new StringType(); 2142 this.baseFormulaProductName.setValue(value); 2143 } 2144 return this; 2145 } 2146 2147 /** 2148 * @return {@link #deliveryDevice} (The intended type of device that is to be used for the administration of the enteral formula.) 2149 */ 2150 public List<CodeableReference> getDeliveryDevice() { 2151 if (this.deliveryDevice == null) 2152 this.deliveryDevice = new ArrayList<CodeableReference>(); 2153 return this.deliveryDevice; 2154 } 2155 2156 /** 2157 * @return Returns a reference to <code>this</code> for easy method chaining 2158 */ 2159 public NutritionOrderEnteralFormulaComponent setDeliveryDevice(List<CodeableReference> theDeliveryDevice) { 2160 this.deliveryDevice = theDeliveryDevice; 2161 return this; 2162 } 2163 2164 public boolean hasDeliveryDevice() { 2165 if (this.deliveryDevice == null) 2166 return false; 2167 for (CodeableReference item : this.deliveryDevice) 2168 if (!item.isEmpty()) 2169 return true; 2170 return false; 2171 } 2172 2173 public CodeableReference addDeliveryDevice() { //3 2174 CodeableReference t = new CodeableReference(); 2175 if (this.deliveryDevice == null) 2176 this.deliveryDevice = new ArrayList<CodeableReference>(); 2177 this.deliveryDevice.add(t); 2178 return t; 2179 } 2180 2181 public NutritionOrderEnteralFormulaComponent addDeliveryDevice(CodeableReference t) { //3 2182 if (t == null) 2183 return this; 2184 if (this.deliveryDevice == null) 2185 this.deliveryDevice = new ArrayList<CodeableReference>(); 2186 this.deliveryDevice.add(t); 2187 return this; 2188 } 2189 2190 /** 2191 * @return The first repetition of repeating field {@link #deliveryDevice}, creating it if it does not already exist {3} 2192 */ 2193 public CodeableReference getDeliveryDeviceFirstRep() { 2194 if (getDeliveryDevice().isEmpty()) { 2195 addDeliveryDevice(); 2196 } 2197 return getDeliveryDevice().get(0); 2198 } 2199 2200 /** 2201 * @return {@link #additive} (Indicates modular components to be provided in addition or mixed with the base formula.) 2202 */ 2203 public List<NutritionOrderEnteralFormulaAdditiveComponent> getAdditive() { 2204 if (this.additive == null) 2205 this.additive = new ArrayList<NutritionOrderEnteralFormulaAdditiveComponent>(); 2206 return this.additive; 2207 } 2208 2209 /** 2210 * @return Returns a reference to <code>this</code> for easy method chaining 2211 */ 2212 public NutritionOrderEnteralFormulaComponent setAdditive(List<NutritionOrderEnteralFormulaAdditiveComponent> theAdditive) { 2213 this.additive = theAdditive; 2214 return this; 2215 } 2216 2217 public boolean hasAdditive() { 2218 if (this.additive == null) 2219 return false; 2220 for (NutritionOrderEnteralFormulaAdditiveComponent item : this.additive) 2221 if (!item.isEmpty()) 2222 return true; 2223 return false; 2224 } 2225 2226 public NutritionOrderEnteralFormulaAdditiveComponent addAdditive() { //3 2227 NutritionOrderEnteralFormulaAdditiveComponent t = new NutritionOrderEnteralFormulaAdditiveComponent(); 2228 if (this.additive == null) 2229 this.additive = new ArrayList<NutritionOrderEnteralFormulaAdditiveComponent>(); 2230 this.additive.add(t); 2231 return t; 2232 } 2233 2234 public NutritionOrderEnteralFormulaComponent addAdditive(NutritionOrderEnteralFormulaAdditiveComponent t) { //3 2235 if (t == null) 2236 return this; 2237 if (this.additive == null) 2238 this.additive = new ArrayList<NutritionOrderEnteralFormulaAdditiveComponent>(); 2239 this.additive.add(t); 2240 return this; 2241 } 2242 2243 /** 2244 * @return The first repetition of repeating field {@link #additive}, creating it if it does not already exist {3} 2245 */ 2246 public NutritionOrderEnteralFormulaAdditiveComponent getAdditiveFirstRep() { 2247 if (getAdditive().isEmpty()) { 2248 addAdditive(); 2249 } 2250 return getAdditive().get(0); 2251 } 2252 2253 /** 2254 * @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.) 2255 */ 2256 public Quantity getCaloricDensity() { 2257 if (this.caloricDensity == null) 2258 if (Configuration.errorOnAutoCreate()) 2259 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.caloricDensity"); 2260 else if (Configuration.doAutoCreate()) 2261 this.caloricDensity = new Quantity(); // cc 2262 return this.caloricDensity; 2263 } 2264 2265 public boolean hasCaloricDensity() { 2266 return this.caloricDensity != null && !this.caloricDensity.isEmpty(); 2267 } 2268 2269 /** 2270 * @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.) 2271 */ 2272 public NutritionOrderEnteralFormulaComponent setCaloricDensity(Quantity value) { 2273 this.caloricDensity = value; 2274 return this; 2275 } 2276 2277 /** 2278 * @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.) 2279 */ 2280 public CodeableConcept getRouteOfAdministration() { 2281 if (this.routeOfAdministration == null) 2282 if (Configuration.errorOnAutoCreate()) 2283 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.routeOfAdministration"); 2284 else if (Configuration.doAutoCreate()) 2285 this.routeOfAdministration = new CodeableConcept(); // cc 2286 return this.routeOfAdministration; 2287 } 2288 2289 public boolean hasRouteOfAdministration() { 2290 return this.routeOfAdministration != null && !this.routeOfAdministration.isEmpty(); 2291 } 2292 2293 /** 2294 * @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.) 2295 */ 2296 public NutritionOrderEnteralFormulaComponent setRouteOfAdministration(CodeableConcept value) { 2297 this.routeOfAdministration = value; 2298 return this; 2299 } 2300 2301 /** 2302 * @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.) 2303 */ 2304 public List<NutritionOrderEnteralFormulaAdministrationComponent> getAdministration() { 2305 if (this.administration == null) 2306 this.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 2307 return this.administration; 2308 } 2309 2310 /** 2311 * @return Returns a reference to <code>this</code> for easy method chaining 2312 */ 2313 public NutritionOrderEnteralFormulaComponent setAdministration(List<NutritionOrderEnteralFormulaAdministrationComponent> theAdministration) { 2314 this.administration = theAdministration; 2315 return this; 2316 } 2317 2318 public boolean hasAdministration() { 2319 if (this.administration == null) 2320 return false; 2321 for (NutritionOrderEnteralFormulaAdministrationComponent item : this.administration) 2322 if (!item.isEmpty()) 2323 return true; 2324 return false; 2325 } 2326 2327 public NutritionOrderEnteralFormulaAdministrationComponent addAdministration() { //3 2328 NutritionOrderEnteralFormulaAdministrationComponent t = new NutritionOrderEnteralFormulaAdministrationComponent(); 2329 if (this.administration == null) 2330 this.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 2331 this.administration.add(t); 2332 return t; 2333 } 2334 2335 public NutritionOrderEnteralFormulaComponent addAdministration(NutritionOrderEnteralFormulaAdministrationComponent t) { //3 2336 if (t == null) 2337 return this; 2338 if (this.administration == null) 2339 this.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 2340 this.administration.add(t); 2341 return this; 2342 } 2343 2344 /** 2345 * @return The first repetition of repeating field {@link #administration}, creating it if it does not already exist {3} 2346 */ 2347 public NutritionOrderEnteralFormulaAdministrationComponent getAdministrationFirstRep() { 2348 if (getAdministration().isEmpty()) { 2349 addAdministration(); 2350 } 2351 return getAdministration().get(0); 2352 } 2353 2354 /** 2355 * @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.) 2356 */ 2357 public Quantity getMaxVolumeToDeliver() { 2358 if (this.maxVolumeToDeliver == null) 2359 if (Configuration.errorOnAutoCreate()) 2360 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.maxVolumeToDeliver"); 2361 else if (Configuration.doAutoCreate()) 2362 this.maxVolumeToDeliver = new Quantity(); // cc 2363 return this.maxVolumeToDeliver; 2364 } 2365 2366 public boolean hasMaxVolumeToDeliver() { 2367 return this.maxVolumeToDeliver != null && !this.maxVolumeToDeliver.isEmpty(); 2368 } 2369 2370 /** 2371 * @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.) 2372 */ 2373 public NutritionOrderEnteralFormulaComponent setMaxVolumeToDeliver(Quantity value) { 2374 this.maxVolumeToDeliver = value; 2375 return this; 2376 } 2377 2378 /** 2379 * @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 2380 */ 2381 public MarkdownType getAdministrationInstructionElement() { 2382 if (this.administrationInstruction == null) 2383 if (Configuration.errorOnAutoCreate()) 2384 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaComponent.administrationInstruction"); 2385 else if (Configuration.doAutoCreate()) 2386 this.administrationInstruction = new MarkdownType(); // bb 2387 return this.administrationInstruction; 2388 } 2389 2390 public boolean hasAdministrationInstructionElement() { 2391 return this.administrationInstruction != null && !this.administrationInstruction.isEmpty(); 2392 } 2393 2394 public boolean hasAdministrationInstruction() { 2395 return this.administrationInstruction != null && !this.administrationInstruction.isEmpty(); 2396 } 2397 2398 /** 2399 * @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 2400 */ 2401 public NutritionOrderEnteralFormulaComponent setAdministrationInstructionElement(MarkdownType value) { 2402 this.administrationInstruction = value; 2403 return this; 2404 } 2405 2406 /** 2407 * @return Free text formula administration, feeding instructions or additional instructions or information. 2408 */ 2409 public String getAdministrationInstruction() { 2410 return this.administrationInstruction == null ? null : this.administrationInstruction.getValue(); 2411 } 2412 2413 /** 2414 * @param value Free text formula administration, feeding instructions or additional instructions or information. 2415 */ 2416 public NutritionOrderEnteralFormulaComponent setAdministrationInstruction(String value) { 2417 if (Utilities.noString(value)) 2418 this.administrationInstruction = null; 2419 else { 2420 if (this.administrationInstruction == null) 2421 this.administrationInstruction = new MarkdownType(); 2422 this.administrationInstruction.setValue(value); 2423 } 2424 return this; 2425 } 2426 2427 protected void listChildren(List<Property> children) { 2428 super.listChildren(children); 2429 children.add(new Property("baseFormulaType", "CodeableReference(NutritionProduct)", "The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.", 0, 1, baseFormulaType)); 2430 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)); 2431 children.add(new Property("deliveryDevice", "CodeableReference(DeviceDefinition)", "The intended type of device that is to be used for the administration of the enteral formula.", 0, java.lang.Integer.MAX_VALUE, deliveryDevice)); 2432 children.add(new Property("additive", "", "Indicates modular components to be provided in addition or mixed with the base formula.", 0, java.lang.Integer.MAX_VALUE, additive)); 2433 children.add(new Property("caloricDensity", "Quantity", "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)); 2434 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)); 2435 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)); 2436 children.add(new Property("maxVolumeToDeliver", "Quantity", "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)); 2437 children.add(new Property("administrationInstruction", "markdown", "Free text formula administration, feeding instructions or additional instructions or information.", 0, 1, administrationInstruction)); 2438 } 2439 2440 @Override 2441 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2442 switch (_hash) { 2443 case -138930641: /*baseFormulaType*/ return new Property("baseFormulaType", "CodeableReference(NutritionProduct)", "The type of enteral or infant formula such as an adult standard formula with fiber or a soy-based infant formula.", 0, 1, baseFormulaType); 2444 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); 2445 case 2060803946: /*deliveryDevice*/ return new Property("deliveryDevice", "CodeableReference(DeviceDefinition)", "The intended type of device that is to be used for the administration of the enteral formula.", 0, java.lang.Integer.MAX_VALUE, deliveryDevice); 2446 case -1226589236: /*additive*/ return new Property("additive", "", "Indicates modular components to be provided in addition or mixed with the base formula.", 0, java.lang.Integer.MAX_VALUE, additive); 2447 case 186983261: /*caloricDensity*/ return new Property("caloricDensity", "Quantity", "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); 2448 case 1742084734: /*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); 2449 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); 2450 case 2017924652: /*maxVolumeToDeliver*/ return new Property("maxVolumeToDeliver", "Quantity", "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); 2451 case 427085136: /*administrationInstruction*/ return new Property("administrationInstruction", "markdown", "Free text formula administration, feeding instructions or additional instructions or information.", 0, 1, administrationInstruction); 2452 default: return super.getNamedProperty(_hash, _name, _checkValid); 2453 } 2454 2455 } 2456 2457 @Override 2458 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2459 switch (hash) { 2460 case -138930641: /*baseFormulaType*/ return this.baseFormulaType == null ? new Base[0] : new Base[] {this.baseFormulaType}; // CodeableReference 2461 case -1267705979: /*baseFormulaProductName*/ return this.baseFormulaProductName == null ? new Base[0] : new Base[] {this.baseFormulaProductName}; // StringType 2462 case 2060803946: /*deliveryDevice*/ return this.deliveryDevice == null ? new Base[0] : this.deliveryDevice.toArray(new Base[this.deliveryDevice.size()]); // CodeableReference 2463 case -1226589236: /*additive*/ return this.additive == null ? new Base[0] : this.additive.toArray(new Base[this.additive.size()]); // NutritionOrderEnteralFormulaAdditiveComponent 2464 case 186983261: /*caloricDensity*/ return this.caloricDensity == null ? new Base[0] : new Base[] {this.caloricDensity}; // Quantity 2465 case 1742084734: /*routeOfAdministration*/ return this.routeOfAdministration == null ? new Base[0] : new Base[] {this.routeOfAdministration}; // CodeableConcept 2466 case 1255702622: /*administration*/ return this.administration == null ? new Base[0] : this.administration.toArray(new Base[this.administration.size()]); // NutritionOrderEnteralFormulaAdministrationComponent 2467 case 2017924652: /*maxVolumeToDeliver*/ return this.maxVolumeToDeliver == null ? new Base[0] : new Base[] {this.maxVolumeToDeliver}; // Quantity 2468 case 427085136: /*administrationInstruction*/ return this.administrationInstruction == null ? new Base[0] : new Base[] {this.administrationInstruction}; // MarkdownType 2469 default: return super.getProperty(hash, name, checkValid); 2470 } 2471 2472 } 2473 2474 @Override 2475 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2476 switch (hash) { 2477 case -138930641: // baseFormulaType 2478 this.baseFormulaType = TypeConvertor.castToCodeableReference(value); // CodeableReference 2479 return value; 2480 case -1267705979: // baseFormulaProductName 2481 this.baseFormulaProductName = TypeConvertor.castToString(value); // StringType 2482 return value; 2483 case 2060803946: // deliveryDevice 2484 this.getDeliveryDevice().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 2485 return value; 2486 case -1226589236: // additive 2487 this.getAdditive().add((NutritionOrderEnteralFormulaAdditiveComponent) value); // NutritionOrderEnteralFormulaAdditiveComponent 2488 return value; 2489 case 186983261: // caloricDensity 2490 this.caloricDensity = TypeConvertor.castToQuantity(value); // Quantity 2491 return value; 2492 case 1742084734: // routeOfAdministration 2493 this.routeOfAdministration = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2494 return value; 2495 case 1255702622: // administration 2496 this.getAdministration().add((NutritionOrderEnteralFormulaAdministrationComponent) value); // NutritionOrderEnteralFormulaAdministrationComponent 2497 return value; 2498 case 2017924652: // maxVolumeToDeliver 2499 this.maxVolumeToDeliver = TypeConvertor.castToQuantity(value); // Quantity 2500 return value; 2501 case 427085136: // administrationInstruction 2502 this.administrationInstruction = TypeConvertor.castToMarkdown(value); // MarkdownType 2503 return value; 2504 default: return super.setProperty(hash, name, value); 2505 } 2506 2507 } 2508 2509 @Override 2510 public Base setProperty(String name, Base value) throws FHIRException { 2511 if (name.equals("baseFormulaType")) { 2512 this.baseFormulaType = TypeConvertor.castToCodeableReference(value); // CodeableReference 2513 } else if (name.equals("baseFormulaProductName")) { 2514 this.baseFormulaProductName = TypeConvertor.castToString(value); // StringType 2515 } else if (name.equals("deliveryDevice")) { 2516 this.getDeliveryDevice().add(TypeConvertor.castToCodeableReference(value)); 2517 } else if (name.equals("additive")) { 2518 this.getAdditive().add((NutritionOrderEnteralFormulaAdditiveComponent) value); 2519 } else if (name.equals("caloricDensity")) { 2520 this.caloricDensity = TypeConvertor.castToQuantity(value); // Quantity 2521 } else if (name.equals("routeOfAdministration")) { 2522 this.routeOfAdministration = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2523 } else if (name.equals("administration")) { 2524 this.getAdministration().add((NutritionOrderEnteralFormulaAdministrationComponent) value); 2525 } else if (name.equals("maxVolumeToDeliver")) { 2526 this.maxVolumeToDeliver = TypeConvertor.castToQuantity(value); // Quantity 2527 } else if (name.equals("administrationInstruction")) { 2528 this.administrationInstruction = TypeConvertor.castToMarkdown(value); // MarkdownType 2529 } else 2530 return super.setProperty(name, value); 2531 return value; 2532 } 2533 2534 @Override 2535 public Base makeProperty(int hash, String name) throws FHIRException { 2536 switch (hash) { 2537 case -138930641: return getBaseFormulaType(); 2538 case -1267705979: return getBaseFormulaProductNameElement(); 2539 case 2060803946: return addDeliveryDevice(); 2540 case -1226589236: return addAdditive(); 2541 case 186983261: return getCaloricDensity(); 2542 case 1742084734: return getRouteOfAdministration(); 2543 case 1255702622: return addAdministration(); 2544 case 2017924652: return getMaxVolumeToDeliver(); 2545 case 427085136: return getAdministrationInstructionElement(); 2546 default: return super.makeProperty(hash, name); 2547 } 2548 2549 } 2550 2551 @Override 2552 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2553 switch (hash) { 2554 case -138930641: /*baseFormulaType*/ return new String[] {"CodeableReference"}; 2555 case -1267705979: /*baseFormulaProductName*/ return new String[] {"string"}; 2556 case 2060803946: /*deliveryDevice*/ return new String[] {"CodeableReference"}; 2557 case -1226589236: /*additive*/ return new String[] {}; 2558 case 186983261: /*caloricDensity*/ return new String[] {"Quantity"}; 2559 case 1742084734: /*routeOfAdministration*/ return new String[] {"CodeableConcept"}; 2560 case 1255702622: /*administration*/ return new String[] {}; 2561 case 2017924652: /*maxVolumeToDeliver*/ return new String[] {"Quantity"}; 2562 case 427085136: /*administrationInstruction*/ return new String[] {"markdown"}; 2563 default: return super.getTypesForProperty(hash, name); 2564 } 2565 2566 } 2567 2568 @Override 2569 public Base addChild(String name) throws FHIRException { 2570 if (name.equals("baseFormulaType")) { 2571 this.baseFormulaType = new CodeableReference(); 2572 return this.baseFormulaType; 2573 } 2574 else if (name.equals("baseFormulaProductName")) { 2575 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.enteralFormula.baseFormulaProductName"); 2576 } 2577 else if (name.equals("deliveryDevice")) { 2578 return addDeliveryDevice(); 2579 } 2580 else if (name.equals("additive")) { 2581 return addAdditive(); 2582 } 2583 else if (name.equals("caloricDensity")) { 2584 this.caloricDensity = new Quantity(); 2585 return this.caloricDensity; 2586 } 2587 else if (name.equals("routeOfAdministration")) { 2588 this.routeOfAdministration = new CodeableConcept(); 2589 return this.routeOfAdministration; 2590 } 2591 else if (name.equals("administration")) { 2592 return addAdministration(); 2593 } 2594 else if (name.equals("maxVolumeToDeliver")) { 2595 this.maxVolumeToDeliver = new Quantity(); 2596 return this.maxVolumeToDeliver; 2597 } 2598 else if (name.equals("administrationInstruction")) { 2599 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.enteralFormula.administrationInstruction"); 2600 } 2601 else 2602 return super.addChild(name); 2603 } 2604 2605 public NutritionOrderEnteralFormulaComponent copy() { 2606 NutritionOrderEnteralFormulaComponent dst = new NutritionOrderEnteralFormulaComponent(); 2607 copyValues(dst); 2608 return dst; 2609 } 2610 2611 public void copyValues(NutritionOrderEnteralFormulaComponent dst) { 2612 super.copyValues(dst); 2613 dst.baseFormulaType = baseFormulaType == null ? null : baseFormulaType.copy(); 2614 dst.baseFormulaProductName = baseFormulaProductName == null ? null : baseFormulaProductName.copy(); 2615 if (deliveryDevice != null) { 2616 dst.deliveryDevice = new ArrayList<CodeableReference>(); 2617 for (CodeableReference i : deliveryDevice) 2618 dst.deliveryDevice.add(i.copy()); 2619 }; 2620 if (additive != null) { 2621 dst.additive = new ArrayList<NutritionOrderEnteralFormulaAdditiveComponent>(); 2622 for (NutritionOrderEnteralFormulaAdditiveComponent i : additive) 2623 dst.additive.add(i.copy()); 2624 }; 2625 dst.caloricDensity = caloricDensity == null ? null : caloricDensity.copy(); 2626 dst.routeOfAdministration = routeOfAdministration == null ? null : routeOfAdministration.copy(); 2627 if (administration != null) { 2628 dst.administration = new ArrayList<NutritionOrderEnteralFormulaAdministrationComponent>(); 2629 for (NutritionOrderEnteralFormulaAdministrationComponent i : administration) 2630 dst.administration.add(i.copy()); 2631 }; 2632 dst.maxVolumeToDeliver = maxVolumeToDeliver == null ? null : maxVolumeToDeliver.copy(); 2633 dst.administrationInstruction = administrationInstruction == null ? null : administrationInstruction.copy(); 2634 } 2635 2636 @Override 2637 public boolean equalsDeep(Base other_) { 2638 if (!super.equalsDeep(other_)) 2639 return false; 2640 if (!(other_ instanceof NutritionOrderEnteralFormulaComponent)) 2641 return false; 2642 NutritionOrderEnteralFormulaComponent o = (NutritionOrderEnteralFormulaComponent) other_; 2643 return compareDeep(baseFormulaType, o.baseFormulaType, true) && compareDeep(baseFormulaProductName, o.baseFormulaProductName, true) 2644 && compareDeep(deliveryDevice, o.deliveryDevice, true) && compareDeep(additive, o.additive, true) 2645 && compareDeep(caloricDensity, o.caloricDensity, true) && compareDeep(routeOfAdministration, o.routeOfAdministration, true) 2646 && compareDeep(administration, o.administration, true) && compareDeep(maxVolumeToDeliver, o.maxVolumeToDeliver, true) 2647 && compareDeep(administrationInstruction, o.administrationInstruction, true); 2648 } 2649 2650 @Override 2651 public boolean equalsShallow(Base other_) { 2652 if (!super.equalsShallow(other_)) 2653 return false; 2654 if (!(other_ instanceof NutritionOrderEnteralFormulaComponent)) 2655 return false; 2656 NutritionOrderEnteralFormulaComponent o = (NutritionOrderEnteralFormulaComponent) other_; 2657 return compareValues(baseFormulaProductName, o.baseFormulaProductName, true) && compareValues(administrationInstruction, o.administrationInstruction, true) 2658 ; 2659 } 2660 2661 public boolean isEmpty() { 2662 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(baseFormulaType, baseFormulaProductName 2663 , deliveryDevice, additive, caloricDensity, routeOfAdministration, administration 2664 , maxVolumeToDeliver, administrationInstruction); 2665 } 2666 2667 public String fhirType() { 2668 return "NutritionOrder.enteralFormula"; 2669 2670 } 2671 2672 } 2673 2674 @Block() 2675 public static class NutritionOrderEnteralFormulaAdditiveComponent extends BackboneElement implements IBaseBackboneElement { 2676 /** 2677 * 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. 2678 */ 2679 @Child(name = "type", type = {CodeableReference.class}, order=1, min=0, max=1, modifier=false, summary=false) 2680 @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." ) 2681 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/entformula-additive") 2682 protected CodeableReference type; 2683 2684 /** 2685 * The product or brand name of the type of modular component to be added to the formula. 2686 */ 2687 @Child(name = "productName", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2688 @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." ) 2689 protected StringType productName; 2690 2691 /** 2692 * The amount of additive to be given in addition or to be mixed in with the base formula. 2693 */ 2694 @Child(name = "quantity", type = {Quantity.class}, order=3, min=0, max=1, modifier=false, summary=false) 2695 @Description(shortDefinition="Amount of additive to be given or mixed in", formalDefinition="The amount of additive to be given in addition or to be mixed in with the base formula." ) 2696 protected Quantity quantity; 2697 2698 private static final long serialVersionUID = 2072791035L; 2699 2700 /** 2701 * Constructor 2702 */ 2703 public NutritionOrderEnteralFormulaAdditiveComponent() { 2704 super(); 2705 } 2706 2707 /** 2708 * @return {@link #type} (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.) 2709 */ 2710 public CodeableReference getType() { 2711 if (this.type == null) 2712 if (Configuration.errorOnAutoCreate()) 2713 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdditiveComponent.type"); 2714 else if (Configuration.doAutoCreate()) 2715 this.type = new CodeableReference(); // cc 2716 return this.type; 2717 } 2718 2719 public boolean hasType() { 2720 return this.type != null && !this.type.isEmpty(); 2721 } 2722 2723 /** 2724 * @param value {@link #type} (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.) 2725 */ 2726 public NutritionOrderEnteralFormulaAdditiveComponent setType(CodeableReference value) { 2727 this.type = value; 2728 return this; 2729 } 2730 2731 /** 2732 * @return {@link #productName} (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 "getProductName" gives direct access to the value 2733 */ 2734 public StringType getProductNameElement() { 2735 if (this.productName == null) 2736 if (Configuration.errorOnAutoCreate()) 2737 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdditiveComponent.productName"); 2738 else if (Configuration.doAutoCreate()) 2739 this.productName = new StringType(); // bb 2740 return this.productName; 2741 } 2742 2743 public boolean hasProductNameElement() { 2744 return this.productName != null && !this.productName.isEmpty(); 2745 } 2746 2747 public boolean hasProductName() { 2748 return this.productName != null && !this.productName.isEmpty(); 2749 } 2750 2751 /** 2752 * @param value {@link #productName} (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 "getProductName" gives direct access to the value 2753 */ 2754 public NutritionOrderEnteralFormulaAdditiveComponent setProductNameElement(StringType value) { 2755 this.productName = value; 2756 return this; 2757 } 2758 2759 /** 2760 * @return The product or brand name of the type of modular component to be added to the formula. 2761 */ 2762 public String getProductName() { 2763 return this.productName == null ? null : this.productName.getValue(); 2764 } 2765 2766 /** 2767 * @param value The product or brand name of the type of modular component to be added to the formula. 2768 */ 2769 public NutritionOrderEnteralFormulaAdditiveComponent setProductName(String value) { 2770 if (Utilities.noString(value)) 2771 this.productName = null; 2772 else { 2773 if (this.productName == null) 2774 this.productName = new StringType(); 2775 this.productName.setValue(value); 2776 } 2777 return this; 2778 } 2779 2780 /** 2781 * @return {@link #quantity} (The amount of additive to be given in addition or to be mixed in with the base formula.) 2782 */ 2783 public Quantity getQuantity() { 2784 if (this.quantity == null) 2785 if (Configuration.errorOnAutoCreate()) 2786 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdditiveComponent.quantity"); 2787 else if (Configuration.doAutoCreate()) 2788 this.quantity = new Quantity(); // cc 2789 return this.quantity; 2790 } 2791 2792 public boolean hasQuantity() { 2793 return this.quantity != null && !this.quantity.isEmpty(); 2794 } 2795 2796 /** 2797 * @param value {@link #quantity} (The amount of additive to be given in addition or to be mixed in with the base formula.) 2798 */ 2799 public NutritionOrderEnteralFormulaAdditiveComponent setQuantity(Quantity value) { 2800 this.quantity = value; 2801 return this; 2802 } 2803 2804 protected void listChildren(List<Property> children) { 2805 super.listChildren(children); 2806 children.add(new Property("type", "CodeableReference(NutritionProduct)", "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, type)); 2807 children.add(new Property("productName", "string", "The product or brand name of the type of modular component to be added to the formula.", 0, 1, productName)); 2808 children.add(new Property("quantity", "Quantity", "The amount of additive to be given in addition or to be mixed in with the base formula.", 0, 1, quantity)); 2809 } 2810 2811 @Override 2812 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2813 switch (_hash) { 2814 case 3575610: /*type*/ return new Property("type", "CodeableReference(NutritionProduct)", "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, type); 2815 case -1491817446: /*productName*/ return new Property("productName", "string", "The product or brand name of the type of modular component to be added to the formula.", 0, 1, productName); 2816 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The amount of additive to be given in addition or to be mixed in with the base formula.", 0, 1, quantity); 2817 default: return super.getNamedProperty(_hash, _name, _checkValid); 2818 } 2819 2820 } 2821 2822 @Override 2823 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2824 switch (hash) { 2825 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableReference 2826 case -1491817446: /*productName*/ return this.productName == null ? new Base[0] : new Base[] {this.productName}; // StringType 2827 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 2828 default: return super.getProperty(hash, name, checkValid); 2829 } 2830 2831 } 2832 2833 @Override 2834 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2835 switch (hash) { 2836 case 3575610: // type 2837 this.type = TypeConvertor.castToCodeableReference(value); // CodeableReference 2838 return value; 2839 case -1491817446: // productName 2840 this.productName = TypeConvertor.castToString(value); // StringType 2841 return value; 2842 case -1285004149: // quantity 2843 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 2844 return value; 2845 default: return super.setProperty(hash, name, value); 2846 } 2847 2848 } 2849 2850 @Override 2851 public Base setProperty(String name, Base value) throws FHIRException { 2852 if (name.equals("type")) { 2853 this.type = TypeConvertor.castToCodeableReference(value); // CodeableReference 2854 } else if (name.equals("productName")) { 2855 this.productName = TypeConvertor.castToString(value); // StringType 2856 } else if (name.equals("quantity")) { 2857 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 2858 } else 2859 return super.setProperty(name, value); 2860 return value; 2861 } 2862 2863 @Override 2864 public Base makeProperty(int hash, String name) throws FHIRException { 2865 switch (hash) { 2866 case 3575610: return getType(); 2867 case -1491817446: return getProductNameElement(); 2868 case -1285004149: return getQuantity(); 2869 default: return super.makeProperty(hash, name); 2870 } 2871 2872 } 2873 2874 @Override 2875 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2876 switch (hash) { 2877 case 3575610: /*type*/ return new String[] {"CodeableReference"}; 2878 case -1491817446: /*productName*/ return new String[] {"string"}; 2879 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 2880 default: return super.getTypesForProperty(hash, name); 2881 } 2882 2883 } 2884 2885 @Override 2886 public Base addChild(String name) throws FHIRException { 2887 if (name.equals("type")) { 2888 this.type = new CodeableReference(); 2889 return this.type; 2890 } 2891 else if (name.equals("productName")) { 2892 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.enteralFormula.additive.productName"); 2893 } 2894 else if (name.equals("quantity")) { 2895 this.quantity = new Quantity(); 2896 return this.quantity; 2897 } 2898 else 2899 return super.addChild(name); 2900 } 2901 2902 public NutritionOrderEnteralFormulaAdditiveComponent copy() { 2903 NutritionOrderEnteralFormulaAdditiveComponent dst = new NutritionOrderEnteralFormulaAdditiveComponent(); 2904 copyValues(dst); 2905 return dst; 2906 } 2907 2908 public void copyValues(NutritionOrderEnteralFormulaAdditiveComponent dst) { 2909 super.copyValues(dst); 2910 dst.type = type == null ? null : type.copy(); 2911 dst.productName = productName == null ? null : productName.copy(); 2912 dst.quantity = quantity == null ? null : quantity.copy(); 2913 } 2914 2915 @Override 2916 public boolean equalsDeep(Base other_) { 2917 if (!super.equalsDeep(other_)) 2918 return false; 2919 if (!(other_ instanceof NutritionOrderEnteralFormulaAdditiveComponent)) 2920 return false; 2921 NutritionOrderEnteralFormulaAdditiveComponent o = (NutritionOrderEnteralFormulaAdditiveComponent) other_; 2922 return compareDeep(type, o.type, true) && compareDeep(productName, o.productName, true) && compareDeep(quantity, o.quantity, true) 2923 ; 2924 } 2925 2926 @Override 2927 public boolean equalsShallow(Base other_) { 2928 if (!super.equalsShallow(other_)) 2929 return false; 2930 if (!(other_ instanceof NutritionOrderEnteralFormulaAdditiveComponent)) 2931 return false; 2932 NutritionOrderEnteralFormulaAdditiveComponent o = (NutritionOrderEnteralFormulaAdditiveComponent) other_; 2933 return compareValues(productName, o.productName, true); 2934 } 2935 2936 public boolean isEmpty() { 2937 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, productName, quantity 2938 ); 2939 } 2940 2941 public String fhirType() { 2942 return "NutritionOrder.enteralFormula.additive"; 2943 2944 } 2945 2946 } 2947 2948 @Block() 2949 public static class NutritionOrderEnteralFormulaAdministrationComponent extends BackboneElement implements IBaseBackboneElement { 2950 /** 2951 * Schedule information for an enteral formula. 2952 */ 2953 @Child(name = "schedule", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 2954 @Description(shortDefinition="Scheduling information for enteral formula products", formalDefinition="Schedule information for an enteral formula." ) 2955 protected EnteralFormulaScheduleComponent schedule; 2956 2957 /** 2958 * The volume of formula to provide to the patient per the specified administration schedule. 2959 */ 2960 @Child(name = "quantity", type = {Quantity.class}, order=2, min=0, max=1, modifier=false, summary=false) 2961 @Description(shortDefinition="The volume of formula to provide", formalDefinition="The volume of formula to provide to the patient per the specified administration schedule." ) 2962 protected Quantity quantity; 2963 2964 /** 2965 * The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. 2966 */ 2967 @Child(name = "rate", type = {Quantity.class, Ratio.class}, order=3, min=0, max=1, modifier=false, summary=false) 2968 @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." ) 2969 protected DataType rate; 2970 2971 private static final long serialVersionUID = 42374218L; 2972 2973 /** 2974 * Constructor 2975 */ 2976 public NutritionOrderEnteralFormulaAdministrationComponent() { 2977 super(); 2978 } 2979 2980 /** 2981 * @return {@link #schedule} (Schedule information for an enteral formula.) 2982 */ 2983 public EnteralFormulaScheduleComponent getSchedule() { 2984 if (this.schedule == null) 2985 if (Configuration.errorOnAutoCreate()) 2986 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdministrationComponent.schedule"); 2987 else if (Configuration.doAutoCreate()) 2988 this.schedule = new EnteralFormulaScheduleComponent(); // cc 2989 return this.schedule; 2990 } 2991 2992 public boolean hasSchedule() { 2993 return this.schedule != null && !this.schedule.isEmpty(); 2994 } 2995 2996 /** 2997 * @param value {@link #schedule} (Schedule information for an enteral formula.) 2998 */ 2999 public NutritionOrderEnteralFormulaAdministrationComponent setSchedule(EnteralFormulaScheduleComponent value) { 3000 this.schedule = value; 3001 return this; 3002 } 3003 3004 /** 3005 * @return {@link #quantity} (The volume of formula to provide to the patient per the specified administration schedule.) 3006 */ 3007 public Quantity getQuantity() { 3008 if (this.quantity == null) 3009 if (Configuration.errorOnAutoCreate()) 3010 throw new Error("Attempt to auto-create NutritionOrderEnteralFormulaAdministrationComponent.quantity"); 3011 else if (Configuration.doAutoCreate()) 3012 this.quantity = new Quantity(); // cc 3013 return this.quantity; 3014 } 3015 3016 public boolean hasQuantity() { 3017 return this.quantity != null && !this.quantity.isEmpty(); 3018 } 3019 3020 /** 3021 * @param value {@link #quantity} (The volume of formula to provide to the patient per the specified administration schedule.) 3022 */ 3023 public NutritionOrderEnteralFormulaAdministrationComponent setQuantity(Quantity value) { 3024 this.quantity = value; 3025 return this; 3026 } 3027 3028 /** 3029 * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 3030 */ 3031 public DataType getRate() { 3032 return this.rate; 3033 } 3034 3035 /** 3036 * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 3037 */ 3038 public Quantity getRateQuantity() throws FHIRException { 3039 if (this.rate == null) 3040 this.rate = new Quantity(); 3041 if (!(this.rate instanceof Quantity)) 3042 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.rate.getClass().getName()+" was encountered"); 3043 return (Quantity) this.rate; 3044 } 3045 3046 public boolean hasRateQuantity() { 3047 return this != null && this.rate instanceof Quantity; 3048 } 3049 3050 /** 3051 * @return {@link #rate} (The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.) 3052 */ 3053 public Ratio getRateRatio() throws FHIRException { 3054 if (this.rate == null) 3055 this.rate = new Ratio(); 3056 if (!(this.rate instanceof Ratio)) 3057 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.rate.getClass().getName()+" was encountered"); 3058 return (Ratio) this.rate; 3059 } 3060 3061 public boolean hasRateRatio() { 3062 return this != null && this.rate instanceof Ratio; 3063 } 3064 3065 public boolean hasRate() { 3066 return this.rate != null && !this.rate.isEmpty(); 3067 } 3068 3069 /** 3070 * @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.) 3071 */ 3072 public NutritionOrderEnteralFormulaAdministrationComponent setRate(DataType value) { 3073 if (value != null && !(value instanceof Quantity || value instanceof Ratio)) 3074 throw new FHIRException("Not the right type for NutritionOrder.enteralFormula.administration.rate[x]: "+value.fhirType()); 3075 this.rate = value; 3076 return this; 3077 } 3078 3079 protected void listChildren(List<Property> children) { 3080 super.listChildren(children); 3081 children.add(new Property("schedule", "", "Schedule information for an enteral formula.", 0, 1, schedule)); 3082 children.add(new Property("quantity", "Quantity", "The volume of formula to provide to the patient per the specified administration schedule.", 0, 1, quantity)); 3083 children.add(new Property("rate[x]", "Quantity|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)); 3084 } 3085 3086 @Override 3087 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3088 switch (_hash) { 3089 case -697920873: /*schedule*/ return new Property("schedule", "", "Schedule information for an enteral formula.", 0, 1, schedule); 3090 case -1285004149: /*quantity*/ return new Property("quantity", "Quantity", "The volume of formula to provide to the patient per the specified administration schedule.", 0, 1, quantity); 3091 case 983460768: /*rate[x]*/ return new Property("rate[x]", "Quantity|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); 3092 case 3493088: /*rate*/ return new Property("rate[x]", "Quantity|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); 3093 case -1085459061: /*rateQuantity*/ return new Property("rate[x]", "Quantity", "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", 0, 1, rate); 3094 case 204021515: /*rateRatio*/ return new Property("rate[x]", "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); 3095 default: return super.getNamedProperty(_hash, _name, _checkValid); 3096 } 3097 3098 } 3099 3100 @Override 3101 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3102 switch (hash) { 3103 case -697920873: /*schedule*/ return this.schedule == null ? new Base[0] : new Base[] {this.schedule}; // EnteralFormulaScheduleComponent 3104 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // Quantity 3105 case 3493088: /*rate*/ return this.rate == null ? new Base[0] : new Base[] {this.rate}; // DataType 3106 default: return super.getProperty(hash, name, checkValid); 3107 } 3108 3109 } 3110 3111 @Override 3112 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3113 switch (hash) { 3114 case -697920873: // schedule 3115 this.schedule = (EnteralFormulaScheduleComponent) value; // EnteralFormulaScheduleComponent 3116 return value; 3117 case -1285004149: // quantity 3118 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 3119 return value; 3120 case 3493088: // rate 3121 this.rate = TypeConvertor.castToType(value); // DataType 3122 return value; 3123 default: return super.setProperty(hash, name, value); 3124 } 3125 3126 } 3127 3128 @Override 3129 public Base setProperty(String name, Base value) throws FHIRException { 3130 if (name.equals("schedule")) { 3131 this.schedule = (EnteralFormulaScheduleComponent) value; // EnteralFormulaScheduleComponent 3132 } else if (name.equals("quantity")) { 3133 this.quantity = TypeConvertor.castToQuantity(value); // Quantity 3134 } else if (name.equals("rate[x]")) { 3135 this.rate = TypeConvertor.castToType(value); // DataType 3136 } else 3137 return super.setProperty(name, value); 3138 return value; 3139 } 3140 3141 @Override 3142 public Base makeProperty(int hash, String name) throws FHIRException { 3143 switch (hash) { 3144 case -697920873: return getSchedule(); 3145 case -1285004149: return getQuantity(); 3146 case 983460768: return getRate(); 3147 case 3493088: return getRate(); 3148 default: return super.makeProperty(hash, name); 3149 } 3150 3151 } 3152 3153 @Override 3154 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3155 switch (hash) { 3156 case -697920873: /*schedule*/ return new String[] {}; 3157 case -1285004149: /*quantity*/ return new String[] {"Quantity"}; 3158 case 3493088: /*rate*/ return new String[] {"Quantity", "Ratio"}; 3159 default: return super.getTypesForProperty(hash, name); 3160 } 3161 3162 } 3163 3164 @Override 3165 public Base addChild(String name) throws FHIRException { 3166 if (name.equals("schedule")) { 3167 this.schedule = new EnteralFormulaScheduleComponent(); 3168 return this.schedule; 3169 } 3170 else if (name.equals("quantity")) { 3171 this.quantity = new Quantity(); 3172 return this.quantity; 3173 } 3174 else if (name.equals("rateQuantity")) { 3175 this.rate = new Quantity(); 3176 return this.rate; 3177 } 3178 else if (name.equals("rateRatio")) { 3179 this.rate = new Ratio(); 3180 return this.rate; 3181 } 3182 else 3183 return super.addChild(name); 3184 } 3185 3186 public NutritionOrderEnteralFormulaAdministrationComponent copy() { 3187 NutritionOrderEnteralFormulaAdministrationComponent dst = new NutritionOrderEnteralFormulaAdministrationComponent(); 3188 copyValues(dst); 3189 return dst; 3190 } 3191 3192 public void copyValues(NutritionOrderEnteralFormulaAdministrationComponent dst) { 3193 super.copyValues(dst); 3194 dst.schedule = schedule == null ? null : schedule.copy(); 3195 dst.quantity = quantity == null ? null : quantity.copy(); 3196 dst.rate = rate == null ? null : rate.copy(); 3197 } 3198 3199 @Override 3200 public boolean equalsDeep(Base other_) { 3201 if (!super.equalsDeep(other_)) 3202 return false; 3203 if (!(other_ instanceof NutritionOrderEnteralFormulaAdministrationComponent)) 3204 return false; 3205 NutritionOrderEnteralFormulaAdministrationComponent o = (NutritionOrderEnteralFormulaAdministrationComponent) other_; 3206 return compareDeep(schedule, o.schedule, true) && compareDeep(quantity, o.quantity, true) && compareDeep(rate, o.rate, true) 3207 ; 3208 } 3209 3210 @Override 3211 public boolean equalsShallow(Base other_) { 3212 if (!super.equalsShallow(other_)) 3213 return false; 3214 if (!(other_ instanceof NutritionOrderEnteralFormulaAdministrationComponent)) 3215 return false; 3216 NutritionOrderEnteralFormulaAdministrationComponent o = (NutritionOrderEnteralFormulaAdministrationComponent) other_; 3217 return true; 3218 } 3219 3220 public boolean isEmpty() { 3221 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(schedule, quantity, rate 3222 ); 3223 } 3224 3225 public String fhirType() { 3226 return "NutritionOrder.enteralFormula.administration"; 3227 3228 } 3229 3230 } 3231 3232 @Block() 3233 public static class EnteralFormulaScheduleComponent extends BackboneElement implements IBaseBackboneElement { 3234 /** 3235 * The time period and frequency at which the enteral formula should be given. The enteral formula should be given for the combination of all schedules if more than one schedule is present. 3236 */ 3237 @Child(name = "timing", type = {Timing.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3238 @Description(shortDefinition="Scheduled frequency of enteral formula", formalDefinition="The time period and frequency at which the enteral formula should be given. The enteral formula should be given for the combination of all schedules if more than one schedule is present." ) 3239 protected List<Timing> timing; 3240 3241 /** 3242 * Indicates whether the enteral formula is only taken when needed within a specific dosing schedule. 3243 */ 3244 @Child(name = "asNeeded", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3245 @Description(shortDefinition="Take 'as needed'", formalDefinition="Indicates whether the enteral formula is only taken when needed within a specific dosing schedule." ) 3246 protected BooleanType asNeeded; 3247 3248 /** 3249 * Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula. 3250 */ 3251 @Child(name = "asNeededFor", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false) 3252 @Description(shortDefinition="Take 'as needed' for x", formalDefinition="Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula." ) 3253 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/medication-as-needed-reason") 3254 protected CodeableConcept asNeededFor; 3255 3256 private static final long serialVersionUID = -1051458478L; 3257 3258 /** 3259 * Constructor 3260 */ 3261 public EnteralFormulaScheduleComponent() { 3262 super(); 3263 } 3264 3265 /** 3266 * @return {@link #timing} (The time period and frequency at which the enteral formula should be given. The enteral formula should be given for the combination of all schedules if more than one schedule is present.) 3267 */ 3268 public List<Timing> getTiming() { 3269 if (this.timing == null) 3270 this.timing = new ArrayList<Timing>(); 3271 return this.timing; 3272 } 3273 3274 /** 3275 * @return Returns a reference to <code>this</code> for easy method chaining 3276 */ 3277 public EnteralFormulaScheduleComponent setTiming(List<Timing> theTiming) { 3278 this.timing = theTiming; 3279 return this; 3280 } 3281 3282 public boolean hasTiming() { 3283 if (this.timing == null) 3284 return false; 3285 for (Timing item : this.timing) 3286 if (!item.isEmpty()) 3287 return true; 3288 return false; 3289 } 3290 3291 public Timing addTiming() { //3 3292 Timing t = new Timing(); 3293 if (this.timing == null) 3294 this.timing = new ArrayList<Timing>(); 3295 this.timing.add(t); 3296 return t; 3297 } 3298 3299 public EnteralFormulaScheduleComponent addTiming(Timing t) { //3 3300 if (t == null) 3301 return this; 3302 if (this.timing == null) 3303 this.timing = new ArrayList<Timing>(); 3304 this.timing.add(t); 3305 return this; 3306 } 3307 3308 /** 3309 * @return The first repetition of repeating field {@link #timing}, creating it if it does not already exist {3} 3310 */ 3311 public Timing getTimingFirstRep() { 3312 if (getTiming().isEmpty()) { 3313 addTiming(); 3314 } 3315 return getTiming().get(0); 3316 } 3317 3318 /** 3319 * @return {@link #asNeeded} (Indicates whether the enteral formula is only taken when needed within a specific dosing schedule.). This is the underlying object with id, value and extensions. The accessor "getAsNeeded" gives direct access to the value 3320 */ 3321 public BooleanType getAsNeededElement() { 3322 if (this.asNeeded == null) 3323 if (Configuration.errorOnAutoCreate()) 3324 throw new Error("Attempt to auto-create EnteralFormulaScheduleComponent.asNeeded"); 3325 else if (Configuration.doAutoCreate()) 3326 this.asNeeded = new BooleanType(); // bb 3327 return this.asNeeded; 3328 } 3329 3330 public boolean hasAsNeededElement() { 3331 return this.asNeeded != null && !this.asNeeded.isEmpty(); 3332 } 3333 3334 public boolean hasAsNeeded() { 3335 return this.asNeeded != null && !this.asNeeded.isEmpty(); 3336 } 3337 3338 /** 3339 * @param value {@link #asNeeded} (Indicates whether the enteral formula is only taken when needed within a specific dosing schedule.). This is the underlying object with id, value and extensions. The accessor "getAsNeeded" gives direct access to the value 3340 */ 3341 public EnteralFormulaScheduleComponent setAsNeededElement(BooleanType value) { 3342 this.asNeeded = value; 3343 return this; 3344 } 3345 3346 /** 3347 * @return Indicates whether the enteral formula is only taken when needed within a specific dosing schedule. 3348 */ 3349 public boolean getAsNeeded() { 3350 return this.asNeeded == null || this.asNeeded.isEmpty() ? false : this.asNeeded.getValue(); 3351 } 3352 3353 /** 3354 * @param value Indicates whether the enteral formula is only taken when needed within a specific dosing schedule. 3355 */ 3356 public EnteralFormulaScheduleComponent setAsNeeded(boolean value) { 3357 if (this.asNeeded == null) 3358 this.asNeeded = new BooleanType(); 3359 this.asNeeded.setValue(value); 3360 return this; 3361 } 3362 3363 /** 3364 * @return {@link #asNeededFor} (Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula.) 3365 */ 3366 public CodeableConcept getAsNeededFor() { 3367 if (this.asNeededFor == null) 3368 if (Configuration.errorOnAutoCreate()) 3369 throw new Error("Attempt to auto-create EnteralFormulaScheduleComponent.asNeededFor"); 3370 else if (Configuration.doAutoCreate()) 3371 this.asNeededFor = new CodeableConcept(); // cc 3372 return this.asNeededFor; 3373 } 3374 3375 public boolean hasAsNeededFor() { 3376 return this.asNeededFor != null && !this.asNeededFor.isEmpty(); 3377 } 3378 3379 /** 3380 * @param value {@link #asNeededFor} (Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula.) 3381 */ 3382 public EnteralFormulaScheduleComponent setAsNeededFor(CodeableConcept value) { 3383 this.asNeededFor = value; 3384 return this; 3385 } 3386 3387 protected void listChildren(List<Property> children) { 3388 super.listChildren(children); 3389 children.add(new Property("timing", "Timing", "The time period and frequency at which the enteral formula should be given. The enteral formula should be given for the combination of all schedules if more than one schedule is present.", 0, java.lang.Integer.MAX_VALUE, timing)); 3390 children.add(new Property("asNeeded", "boolean", "Indicates whether the enteral formula is only taken when needed within a specific dosing schedule.", 0, 1, asNeeded)); 3391 children.add(new Property("asNeededFor", "CodeableConcept", "Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula.", 0, 1, asNeededFor)); 3392 } 3393 3394 @Override 3395 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3396 switch (_hash) { 3397 case -873664438: /*timing*/ return new Property("timing", "Timing", "The time period and frequency at which the enteral formula should be given. The enteral formula should be given for the combination of all schedules if more than one schedule is present.", 0, java.lang.Integer.MAX_VALUE, timing); 3398 case -1432923513: /*asNeeded*/ return new Property("asNeeded", "boolean", "Indicates whether the enteral formula is only taken when needed within a specific dosing schedule.", 0, 1, asNeeded); 3399 case -544350014: /*asNeededFor*/ return new Property("asNeededFor", "CodeableConcept", "Indicates whether the enteral formula is only taken based on a precondition for taking the enteral formula.", 0, 1, asNeededFor); 3400 default: return super.getNamedProperty(_hash, _name, _checkValid); 3401 } 3402 3403 } 3404 3405 @Override 3406 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3407 switch (hash) { 3408 case -873664438: /*timing*/ return this.timing == null ? new Base[0] : this.timing.toArray(new Base[this.timing.size()]); // Timing 3409 case -1432923513: /*asNeeded*/ return this.asNeeded == null ? new Base[0] : new Base[] {this.asNeeded}; // BooleanType 3410 case -544350014: /*asNeededFor*/ return this.asNeededFor == null ? new Base[0] : new Base[] {this.asNeededFor}; // CodeableConcept 3411 default: return super.getProperty(hash, name, checkValid); 3412 } 3413 3414 } 3415 3416 @Override 3417 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3418 switch (hash) { 3419 case -873664438: // timing 3420 this.getTiming().add(TypeConvertor.castToTiming(value)); // Timing 3421 return value; 3422 case -1432923513: // asNeeded 3423 this.asNeeded = TypeConvertor.castToBoolean(value); // BooleanType 3424 return value; 3425 case -544350014: // asNeededFor 3426 this.asNeededFor = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3427 return value; 3428 default: return super.setProperty(hash, name, value); 3429 } 3430 3431 } 3432 3433 @Override 3434 public Base setProperty(String name, Base value) throws FHIRException { 3435 if (name.equals("timing")) { 3436 this.getTiming().add(TypeConvertor.castToTiming(value)); 3437 } else if (name.equals("asNeeded")) { 3438 this.asNeeded = TypeConvertor.castToBoolean(value); // BooleanType 3439 } else if (name.equals("asNeededFor")) { 3440 this.asNeededFor = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3441 } else 3442 return super.setProperty(name, value); 3443 return value; 3444 } 3445 3446 @Override 3447 public Base makeProperty(int hash, String name) throws FHIRException { 3448 switch (hash) { 3449 case -873664438: return addTiming(); 3450 case -1432923513: return getAsNeededElement(); 3451 case -544350014: return getAsNeededFor(); 3452 default: return super.makeProperty(hash, name); 3453 } 3454 3455 } 3456 3457 @Override 3458 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3459 switch (hash) { 3460 case -873664438: /*timing*/ return new String[] {"Timing"}; 3461 case -1432923513: /*asNeeded*/ return new String[] {"boolean"}; 3462 case -544350014: /*asNeededFor*/ return new String[] {"CodeableConcept"}; 3463 default: return super.getTypesForProperty(hash, name); 3464 } 3465 3466 } 3467 3468 @Override 3469 public Base addChild(String name) throws FHIRException { 3470 if (name.equals("timing")) { 3471 return addTiming(); 3472 } 3473 else if (name.equals("asNeeded")) { 3474 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.enteralFormula.administration.schedule.asNeeded"); 3475 } 3476 else if (name.equals("asNeededFor")) { 3477 this.asNeededFor = new CodeableConcept(); 3478 return this.asNeededFor; 3479 } 3480 else 3481 return super.addChild(name); 3482 } 3483 3484 public EnteralFormulaScheduleComponent copy() { 3485 EnteralFormulaScheduleComponent dst = new EnteralFormulaScheduleComponent(); 3486 copyValues(dst); 3487 return dst; 3488 } 3489 3490 public void copyValues(EnteralFormulaScheduleComponent dst) { 3491 super.copyValues(dst); 3492 if (timing != null) { 3493 dst.timing = new ArrayList<Timing>(); 3494 for (Timing i : timing) 3495 dst.timing.add(i.copy()); 3496 }; 3497 dst.asNeeded = asNeeded == null ? null : asNeeded.copy(); 3498 dst.asNeededFor = asNeededFor == null ? null : asNeededFor.copy(); 3499 } 3500 3501 @Override 3502 public boolean equalsDeep(Base other_) { 3503 if (!super.equalsDeep(other_)) 3504 return false; 3505 if (!(other_ instanceof EnteralFormulaScheduleComponent)) 3506 return false; 3507 EnteralFormulaScheduleComponent o = (EnteralFormulaScheduleComponent) other_; 3508 return compareDeep(timing, o.timing, true) && compareDeep(asNeeded, o.asNeeded, true) && compareDeep(asNeededFor, o.asNeededFor, true) 3509 ; 3510 } 3511 3512 @Override 3513 public boolean equalsShallow(Base other_) { 3514 if (!super.equalsShallow(other_)) 3515 return false; 3516 if (!(other_ instanceof EnteralFormulaScheduleComponent)) 3517 return false; 3518 EnteralFormulaScheduleComponent o = (EnteralFormulaScheduleComponent) other_; 3519 return compareValues(asNeeded, o.asNeeded, true); 3520 } 3521 3522 public boolean isEmpty() { 3523 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(timing, asNeeded, asNeededFor 3524 ); 3525 } 3526 3527 public String fhirType() { 3528 return "NutritionOrder.enteralFormula.administration.schedule"; 3529 3530 } 3531 3532 } 3533 3534 /** 3535 * Identifiers assigned to this order by the order sender or by the order receiver. 3536 */ 3537 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3538 @Description(shortDefinition="Identifiers assigned to this order", formalDefinition="Identifiers assigned to this order by the order sender or by the order receiver." ) 3539 protected List<Identifier> identifier; 3540 3541 /** 3542 * The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder. 3543 */ 3544 @Child(name = "instantiatesCanonical", type = {CanonicalType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3545 @Description(shortDefinition="Instantiates FHIR protocol or definition", formalDefinition="The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder." ) 3546 protected List<CanonicalType> instantiatesCanonical; 3547 3548 /** 3549 * The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder. 3550 */ 3551 @Child(name = "instantiatesUri", type = {UriType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3552 @Description(shortDefinition="Instantiates external protocol or definition", formalDefinition="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder." ) 3553 protected List<UriType> instantiatesUri; 3554 3555 /** 3556 * The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder. 3557 */ 3558 @Child(name = "instantiates", type = {UriType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3559 @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." ) 3560 protected List<UriType> instantiates; 3561 3562 /** 3563 * A plan or request that is fulfilled in whole or in part by this nutrition order. 3564 */ 3565 @Child(name = "basedOn", type = {CarePlan.class, NutritionOrder.class, ServiceRequest.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3566 @Description(shortDefinition="What this order fulfills", formalDefinition="A plan or request that is fulfilled in whole or in part by this nutrition order." ) 3567 protected List<Reference> basedOn; 3568 3569 /** 3570 * A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier. 3571 */ 3572 @Child(name = "groupIdentifier", type = {Identifier.class}, order=5, min=0, max=1, modifier=false, summary=true) 3573 @Description(shortDefinition="Composite Request ID", formalDefinition="A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier." ) 3574 protected Identifier groupIdentifier; 3575 3576 /** 3577 * The workflow status of the nutrition order/request. 3578 */ 3579 @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true) 3580 @Description(shortDefinition="draft | active | on-hold | revoked | completed | entered-in-error | unknown", formalDefinition="The workflow status of the nutrition order/request." ) 3581 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-status") 3582 protected Enumeration<RequestStatus> status; 3583 3584 /** 3585 * Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain. 3586 */ 3587 @Child(name = "intent", type = {CodeType.class}, order=7, min=1, max=1, modifier=true, summary=true) 3588 @Description(shortDefinition="proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option", formalDefinition="Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain." ) 3589 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-intent") 3590 protected Enumeration<RequestIntent> intent; 3591 3592 /** 3593 * Indicates how quickly the Nutrition Order should be addressed with respect to other requests. 3594 */ 3595 @Child(name = "priority", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=false) 3596 @Description(shortDefinition="routine | urgent | asap | stat", formalDefinition="Indicates how quickly the Nutrition Order should be addressed with respect to other requests." ) 3597 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/request-priority") 3598 protected Enumeration<RequestPriority> priority; 3599 3600 /** 3601 * The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding. 3602 */ 3603 @Child(name = "subject", type = {Patient.class, Group.class}, order=9, min=1, max=1, modifier=false, summary=true) 3604 @Description(shortDefinition="Who requires the diet, formula or nutritional supplement", formalDefinition="The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding." ) 3605 protected Reference subject; 3606 3607 /** 3608 * An encounter that provides additional information about the healthcare context in which this request is made. 3609 */ 3610 @Child(name = "encounter", type = {Encounter.class}, order=10, min=0, max=1, modifier=false, summary=false) 3611 @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." ) 3612 protected Reference encounter; 3613 3614 /** 3615 * Information to support fulfilling (i.e. dispensing or administering) of the nutrition, for example, patient height and weight). 3616 */ 3617 @Child(name = "supportingInformation", type = {Reference.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3618 @Description(shortDefinition="Information to support fulfilling of the nutrition order", formalDefinition="Information to support fulfilling (i.e. dispensing or administering) of the nutrition, for example, patient height and weight)." ) 3619 protected List<Reference> supportingInformation; 3620 3621 /** 3622 * The date and time that this nutrition order was requested. 3623 */ 3624 @Child(name = "dateTime", type = {DateTimeType.class}, order=12, min=1, max=1, modifier=false, summary=true) 3625 @Description(shortDefinition="Date and time the nutrition order was requested", formalDefinition="The date and time that this nutrition order was requested." ) 3626 protected DateTimeType dateTime; 3627 3628 /** 3629 * The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings. 3630 */ 3631 @Child(name = "orderer", type = {Practitioner.class, PractitionerRole.class}, order=13, min=0, max=1, modifier=false, summary=true) 3632 @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." ) 3633 protected Reference orderer; 3634 3635 /** 3636 * The specified desired performer of the nutrition order. 3637 */ 3638 @Child(name = "performer", type = {CodeableReference.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3639 @Description(shortDefinition="Who is desired to perform the administration of what is being ordered", formalDefinition="The specified desired performer of the nutrition order." ) 3640 protected List<CodeableReference> performer; 3641 3642 /** 3643 * A link to a record of allergies or intolerances which should be included in the nutrition order. 3644 */ 3645 @Child(name = "allergyIntolerance", type = {AllergyIntolerance.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3646 @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." ) 3647 protected List<Reference> allergyIntolerance; 3648 3649 /** 3650 * 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. 3651 */ 3652 @Child(name = "foodPreferenceModifier", type = {CodeableConcept.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3653 @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." ) 3654 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/encounter-diet") 3655 protected List<CodeableConcept> foodPreferenceModifier; 3656 3657 /** 3658 * 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. 3659 */ 3660 @Child(name = "excludeFoodModifier", type = {CodeableConcept.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3661 @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." ) 3662 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/food-type") 3663 protected List<CodeableConcept> excludeFoodModifier; 3664 3665 /** 3666 * This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item. 3667 */ 3668 @Child(name = "outsideFoodAllowed", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false) 3669 @Description(shortDefinition="Capture when a food item is brought in by the patient and/or family", formalDefinition="This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item." ) 3670 protected BooleanType outsideFoodAllowed; 3671 3672 /** 3673 * Diet given orally in contrast to enteral (tube) feeding. 3674 */ 3675 @Child(name = "oralDiet", type = {}, order=19, min=0, max=1, modifier=false, summary=false) 3676 @Description(shortDefinition="Oral diet components", formalDefinition="Diet given orally in contrast to enteral (tube) feeding." ) 3677 protected NutritionOrderOralDietComponent oralDiet; 3678 3679 /** 3680 * Oral nutritional products given in order to add further nutritional value to the patient's diet. 3681 */ 3682 @Child(name = "supplement", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3683 @Description(shortDefinition="Supplement components", formalDefinition="Oral nutritional products given in order to add further nutritional value to the patient's diet." ) 3684 protected List<NutritionOrderSupplementComponent> supplement; 3685 3686 /** 3687 * Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity. 3688 */ 3689 @Child(name = "enteralFormula", type = {}, order=21, min=0, max=1, modifier=false, summary=false) 3690 @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." ) 3691 protected NutritionOrderEnteralFormulaComponent enteralFormula; 3692 3693 /** 3694 * Comments made about the nutrition order by the requester, performer, subject or other participants. 3695 */ 3696 @Child(name = "note", type = {Annotation.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3697 @Description(shortDefinition="Comments", formalDefinition="Comments made about the nutrition order by the requester, performer, subject or other participants." ) 3698 protected List<Annotation> note; 3699 3700 private static final long serialVersionUID = -659986813L; 3701 3702 /** 3703 * Constructor 3704 */ 3705 public NutritionOrder() { 3706 super(); 3707 } 3708 3709 /** 3710 * Constructor 3711 */ 3712 public NutritionOrder(RequestStatus status, RequestIntent intent, Reference subject, Date dateTime) { 3713 super(); 3714 this.setStatus(status); 3715 this.setIntent(intent); 3716 this.setSubject(subject); 3717 this.setDateTime(dateTime); 3718 } 3719 3720 /** 3721 * @return {@link #identifier} (Identifiers assigned to this order by the order sender or by the order receiver.) 3722 */ 3723 public List<Identifier> getIdentifier() { 3724 if (this.identifier == null) 3725 this.identifier = new ArrayList<Identifier>(); 3726 return this.identifier; 3727 } 3728 3729 /** 3730 * @return Returns a reference to <code>this</code> for easy method chaining 3731 */ 3732 public NutritionOrder setIdentifier(List<Identifier> theIdentifier) { 3733 this.identifier = theIdentifier; 3734 return this; 3735 } 3736 3737 public boolean hasIdentifier() { 3738 if (this.identifier == null) 3739 return false; 3740 for (Identifier item : this.identifier) 3741 if (!item.isEmpty()) 3742 return true; 3743 return false; 3744 } 3745 3746 public Identifier addIdentifier() { //3 3747 Identifier t = new Identifier(); 3748 if (this.identifier == null) 3749 this.identifier = new ArrayList<Identifier>(); 3750 this.identifier.add(t); 3751 return t; 3752 } 3753 3754 public NutritionOrder addIdentifier(Identifier t) { //3 3755 if (t == null) 3756 return this; 3757 if (this.identifier == null) 3758 this.identifier = new ArrayList<Identifier>(); 3759 this.identifier.add(t); 3760 return this; 3761 } 3762 3763 /** 3764 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 3765 */ 3766 public Identifier getIdentifierFirstRep() { 3767 if (getIdentifier().isEmpty()) { 3768 addIdentifier(); 3769 } 3770 return getIdentifier().get(0); 3771 } 3772 3773 /** 3774 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3775 */ 3776 public List<CanonicalType> getInstantiatesCanonical() { 3777 if (this.instantiatesCanonical == null) 3778 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3779 return this.instantiatesCanonical; 3780 } 3781 3782 /** 3783 * @return Returns a reference to <code>this</code> for easy method chaining 3784 */ 3785 public NutritionOrder setInstantiatesCanonical(List<CanonicalType> theInstantiatesCanonical) { 3786 this.instantiatesCanonical = theInstantiatesCanonical; 3787 return this; 3788 } 3789 3790 public boolean hasInstantiatesCanonical() { 3791 if (this.instantiatesCanonical == null) 3792 return false; 3793 for (CanonicalType item : this.instantiatesCanonical) 3794 if (!item.isEmpty()) 3795 return true; 3796 return false; 3797 } 3798 3799 /** 3800 * @return {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3801 */ 3802 public CanonicalType addInstantiatesCanonicalElement() {//2 3803 CanonicalType t = new CanonicalType(); 3804 if (this.instantiatesCanonical == null) 3805 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3806 this.instantiatesCanonical.add(t); 3807 return t; 3808 } 3809 3810 /** 3811 * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3812 */ 3813 public NutritionOrder addInstantiatesCanonical(String value) { //1 3814 CanonicalType t = new CanonicalType(); 3815 t.setValue(value); 3816 if (this.instantiatesCanonical == null) 3817 this.instantiatesCanonical = new ArrayList<CanonicalType>(); 3818 this.instantiatesCanonical.add(t); 3819 return this; 3820 } 3821 3822 /** 3823 * @param value {@link #instantiatesCanonical} (The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3824 */ 3825 public boolean hasInstantiatesCanonical(String value) { 3826 if (this.instantiatesCanonical == null) 3827 return false; 3828 for (CanonicalType v : this.instantiatesCanonical) 3829 if (v.getValue().equals(value)) // canonical 3830 return true; 3831 return false; 3832 } 3833 3834 /** 3835 * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3836 */ 3837 public List<UriType> getInstantiatesUri() { 3838 if (this.instantiatesUri == null) 3839 this.instantiatesUri = new ArrayList<UriType>(); 3840 return this.instantiatesUri; 3841 } 3842 3843 /** 3844 * @return Returns a reference to <code>this</code> for easy method chaining 3845 */ 3846 public NutritionOrder setInstantiatesUri(List<UriType> theInstantiatesUri) { 3847 this.instantiatesUri = theInstantiatesUri; 3848 return this; 3849 } 3850 3851 public boolean hasInstantiatesUri() { 3852 if (this.instantiatesUri == null) 3853 return false; 3854 for (UriType item : this.instantiatesUri) 3855 if (!item.isEmpty()) 3856 return true; 3857 return false; 3858 } 3859 3860 /** 3861 * @return {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3862 */ 3863 public UriType addInstantiatesUriElement() {//2 3864 UriType t = new UriType(); 3865 if (this.instantiatesUri == null) 3866 this.instantiatesUri = new ArrayList<UriType>(); 3867 this.instantiatesUri.add(t); 3868 return t; 3869 } 3870 3871 /** 3872 * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3873 */ 3874 public NutritionOrder addInstantiatesUri(String value) { //1 3875 UriType t = new UriType(); 3876 t.setValue(value); 3877 if (this.instantiatesUri == null) 3878 this.instantiatesUri = new ArrayList<UriType>(); 3879 this.instantiatesUri.add(t); 3880 return this; 3881 } 3882 3883 /** 3884 * @param value {@link #instantiatesUri} (The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.) 3885 */ 3886 public boolean hasInstantiatesUri(String value) { 3887 if (this.instantiatesUri == null) 3888 return false; 3889 for (UriType v : this.instantiatesUri) 3890 if (v.getValue().equals(value)) // uri 3891 return true; 3892 return false; 3893 } 3894 3895 /** 3896 * @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.) 3897 */ 3898 public List<UriType> getInstantiates() { 3899 if (this.instantiates == null) 3900 this.instantiates = new ArrayList<UriType>(); 3901 return this.instantiates; 3902 } 3903 3904 /** 3905 * @return Returns a reference to <code>this</code> for easy method chaining 3906 */ 3907 public NutritionOrder setInstantiates(List<UriType> theInstantiates) { 3908 this.instantiates = theInstantiates; 3909 return this; 3910 } 3911 3912 public boolean hasInstantiates() { 3913 if (this.instantiates == null) 3914 return false; 3915 for (UriType item : this.instantiates) 3916 if (!item.isEmpty()) 3917 return true; 3918 return false; 3919 } 3920 3921 /** 3922 * @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.) 3923 */ 3924 public UriType addInstantiatesElement() {//2 3925 UriType t = new UriType(); 3926 if (this.instantiates == null) 3927 this.instantiates = new ArrayList<UriType>(); 3928 this.instantiates.add(t); 3929 return t; 3930 } 3931 3932 /** 3933 * @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.) 3934 */ 3935 public NutritionOrder addInstantiates(String value) { //1 3936 UriType t = new UriType(); 3937 t.setValue(value); 3938 if (this.instantiates == null) 3939 this.instantiates = new ArrayList<UriType>(); 3940 this.instantiates.add(t); 3941 return this; 3942 } 3943 3944 /** 3945 * @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.) 3946 */ 3947 public boolean hasInstantiates(String value) { 3948 if (this.instantiates == null) 3949 return false; 3950 for (UriType v : this.instantiates) 3951 if (v.getValue().equals(value)) // uri 3952 return true; 3953 return false; 3954 } 3955 3956 /** 3957 * @return {@link #basedOn} (A plan or request that is fulfilled in whole or in part by this nutrition order.) 3958 */ 3959 public List<Reference> getBasedOn() { 3960 if (this.basedOn == null) 3961 this.basedOn = new ArrayList<Reference>(); 3962 return this.basedOn; 3963 } 3964 3965 /** 3966 * @return Returns a reference to <code>this</code> for easy method chaining 3967 */ 3968 public NutritionOrder setBasedOn(List<Reference> theBasedOn) { 3969 this.basedOn = theBasedOn; 3970 return this; 3971 } 3972 3973 public boolean hasBasedOn() { 3974 if (this.basedOn == null) 3975 return false; 3976 for (Reference item : this.basedOn) 3977 if (!item.isEmpty()) 3978 return true; 3979 return false; 3980 } 3981 3982 public Reference addBasedOn() { //3 3983 Reference t = new Reference(); 3984 if (this.basedOn == null) 3985 this.basedOn = new ArrayList<Reference>(); 3986 this.basedOn.add(t); 3987 return t; 3988 } 3989 3990 public NutritionOrder addBasedOn(Reference t) { //3 3991 if (t == null) 3992 return this; 3993 if (this.basedOn == null) 3994 this.basedOn = new ArrayList<Reference>(); 3995 this.basedOn.add(t); 3996 return this; 3997 } 3998 3999 /** 4000 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist {3} 4001 */ 4002 public Reference getBasedOnFirstRep() { 4003 if (getBasedOn().isEmpty()) { 4004 addBasedOn(); 4005 } 4006 return getBasedOn().get(0); 4007 } 4008 4009 /** 4010 * @return {@link #groupIdentifier} (A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier.) 4011 */ 4012 public Identifier getGroupIdentifier() { 4013 if (this.groupIdentifier == null) 4014 if (Configuration.errorOnAutoCreate()) 4015 throw new Error("Attempt to auto-create NutritionOrder.groupIdentifier"); 4016 else if (Configuration.doAutoCreate()) 4017 this.groupIdentifier = new Identifier(); // cc 4018 return this.groupIdentifier; 4019 } 4020 4021 public boolean hasGroupIdentifier() { 4022 return this.groupIdentifier != null && !this.groupIdentifier.isEmpty(); 4023 } 4024 4025 /** 4026 * @param value {@link #groupIdentifier} (A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier.) 4027 */ 4028 public NutritionOrder setGroupIdentifier(Identifier value) { 4029 this.groupIdentifier = value; 4030 return this; 4031 } 4032 4033 /** 4034 * @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 4035 */ 4036 public Enumeration<RequestStatus> getStatusElement() { 4037 if (this.status == null) 4038 if (Configuration.errorOnAutoCreate()) 4039 throw new Error("Attempt to auto-create NutritionOrder.status"); 4040 else if (Configuration.doAutoCreate()) 4041 this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); // bb 4042 return this.status; 4043 } 4044 4045 public boolean hasStatusElement() { 4046 return this.status != null && !this.status.isEmpty(); 4047 } 4048 4049 public boolean hasStatus() { 4050 return this.status != null && !this.status.isEmpty(); 4051 } 4052 4053 /** 4054 * @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 4055 */ 4056 public NutritionOrder setStatusElement(Enumeration<RequestStatus> value) { 4057 this.status = value; 4058 return this; 4059 } 4060 4061 /** 4062 * @return The workflow status of the nutrition order/request. 4063 */ 4064 public RequestStatus getStatus() { 4065 return this.status == null ? null : this.status.getValue(); 4066 } 4067 4068 /** 4069 * @param value The workflow status of the nutrition order/request. 4070 */ 4071 public NutritionOrder setStatus(RequestStatus value) { 4072 if (this.status == null) 4073 this.status = new Enumeration<RequestStatus>(new RequestStatusEnumFactory()); 4074 this.status.setValue(value); 4075 return this; 4076 } 4077 4078 /** 4079 * @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 4080 */ 4081 public Enumeration<RequestIntent> getIntentElement() { 4082 if (this.intent == null) 4083 if (Configuration.errorOnAutoCreate()) 4084 throw new Error("Attempt to auto-create NutritionOrder.intent"); 4085 else if (Configuration.doAutoCreate()) 4086 this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); // bb 4087 return this.intent; 4088 } 4089 4090 public boolean hasIntentElement() { 4091 return this.intent != null && !this.intent.isEmpty(); 4092 } 4093 4094 public boolean hasIntent() { 4095 return this.intent != null && !this.intent.isEmpty(); 4096 } 4097 4098 /** 4099 * @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 4100 */ 4101 public NutritionOrder setIntentElement(Enumeration<RequestIntent> value) { 4102 this.intent = value; 4103 return this; 4104 } 4105 4106 /** 4107 * @return Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain. 4108 */ 4109 public RequestIntent getIntent() { 4110 return this.intent == null ? null : this.intent.getValue(); 4111 } 4112 4113 /** 4114 * @param value Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain. 4115 */ 4116 public NutritionOrder setIntent(RequestIntent value) { 4117 if (this.intent == null) 4118 this.intent = new Enumeration<RequestIntent>(new RequestIntentEnumFactory()); 4119 this.intent.setValue(value); 4120 return this; 4121 } 4122 4123 /** 4124 * @return {@link #priority} (Indicates how quickly the Nutrition Order should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 4125 */ 4126 public Enumeration<RequestPriority> getPriorityElement() { 4127 if (this.priority == null) 4128 if (Configuration.errorOnAutoCreate()) 4129 throw new Error("Attempt to auto-create NutritionOrder.priority"); 4130 else if (Configuration.doAutoCreate()) 4131 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); // bb 4132 return this.priority; 4133 } 4134 4135 public boolean hasPriorityElement() { 4136 return this.priority != null && !this.priority.isEmpty(); 4137 } 4138 4139 public boolean hasPriority() { 4140 return this.priority != null && !this.priority.isEmpty(); 4141 } 4142 4143 /** 4144 * @param value {@link #priority} (Indicates how quickly the Nutrition Order should be addressed with respect to other requests.). This is the underlying object with id, value and extensions. The accessor "getPriority" gives direct access to the value 4145 */ 4146 public NutritionOrder setPriorityElement(Enumeration<RequestPriority> value) { 4147 this.priority = value; 4148 return this; 4149 } 4150 4151 /** 4152 * @return Indicates how quickly the Nutrition Order should be addressed with respect to other requests. 4153 */ 4154 public RequestPriority getPriority() { 4155 return this.priority == null ? null : this.priority.getValue(); 4156 } 4157 4158 /** 4159 * @param value Indicates how quickly the Nutrition Order should be addressed with respect to other requests. 4160 */ 4161 public NutritionOrder setPriority(RequestPriority value) { 4162 if (value == null) 4163 this.priority = null; 4164 else { 4165 if (this.priority == null) 4166 this.priority = new Enumeration<RequestPriority>(new RequestPriorityEnumFactory()); 4167 this.priority.setValue(value); 4168 } 4169 return this; 4170 } 4171 4172 /** 4173 * @return {@link #subject} (The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 4174 */ 4175 public Reference getSubject() { 4176 if (this.subject == null) 4177 if (Configuration.errorOnAutoCreate()) 4178 throw new Error("Attempt to auto-create NutritionOrder.subject"); 4179 else if (Configuration.doAutoCreate()) 4180 this.subject = new Reference(); // cc 4181 return this.subject; 4182 } 4183 4184 public boolean hasSubject() { 4185 return this.subject != null && !this.subject.isEmpty(); 4186 } 4187 4188 /** 4189 * @param value {@link #subject} (The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.) 4190 */ 4191 public NutritionOrder setSubject(Reference value) { 4192 this.subject = value; 4193 return this; 4194 } 4195 4196 /** 4197 * @return {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) 4198 */ 4199 public Reference getEncounter() { 4200 if (this.encounter == null) 4201 if (Configuration.errorOnAutoCreate()) 4202 throw new Error("Attempt to auto-create NutritionOrder.encounter"); 4203 else if (Configuration.doAutoCreate()) 4204 this.encounter = new Reference(); // cc 4205 return this.encounter; 4206 } 4207 4208 public boolean hasEncounter() { 4209 return this.encounter != null && !this.encounter.isEmpty(); 4210 } 4211 4212 /** 4213 * @param value {@link #encounter} (An encounter that provides additional information about the healthcare context in which this request is made.) 4214 */ 4215 public NutritionOrder setEncounter(Reference value) { 4216 this.encounter = value; 4217 return this; 4218 } 4219 4220 /** 4221 * @return {@link #supportingInformation} (Information to support fulfilling (i.e. dispensing or administering) of the nutrition, for example, patient height and weight).) 4222 */ 4223 public List<Reference> getSupportingInformation() { 4224 if (this.supportingInformation == null) 4225 this.supportingInformation = new ArrayList<Reference>(); 4226 return this.supportingInformation; 4227 } 4228 4229 /** 4230 * @return Returns a reference to <code>this</code> for easy method chaining 4231 */ 4232 public NutritionOrder setSupportingInformation(List<Reference> theSupportingInformation) { 4233 this.supportingInformation = theSupportingInformation; 4234 return this; 4235 } 4236 4237 public boolean hasSupportingInformation() { 4238 if (this.supportingInformation == null) 4239 return false; 4240 for (Reference item : this.supportingInformation) 4241 if (!item.isEmpty()) 4242 return true; 4243 return false; 4244 } 4245 4246 public Reference addSupportingInformation() { //3 4247 Reference t = new Reference(); 4248 if (this.supportingInformation == null) 4249 this.supportingInformation = new ArrayList<Reference>(); 4250 this.supportingInformation.add(t); 4251 return t; 4252 } 4253 4254 public NutritionOrder addSupportingInformation(Reference t) { //3 4255 if (t == null) 4256 return this; 4257 if (this.supportingInformation == null) 4258 this.supportingInformation = new ArrayList<Reference>(); 4259 this.supportingInformation.add(t); 4260 return this; 4261 } 4262 4263 /** 4264 * @return The first repetition of repeating field {@link #supportingInformation}, creating it if it does not already exist {3} 4265 */ 4266 public Reference getSupportingInformationFirstRep() { 4267 if (getSupportingInformation().isEmpty()) { 4268 addSupportingInformation(); 4269 } 4270 return getSupportingInformation().get(0); 4271 } 4272 4273 /** 4274 * @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 4275 */ 4276 public DateTimeType getDateTimeElement() { 4277 if (this.dateTime == null) 4278 if (Configuration.errorOnAutoCreate()) 4279 throw new Error("Attempt to auto-create NutritionOrder.dateTime"); 4280 else if (Configuration.doAutoCreate()) 4281 this.dateTime = new DateTimeType(); // bb 4282 return this.dateTime; 4283 } 4284 4285 public boolean hasDateTimeElement() { 4286 return this.dateTime != null && !this.dateTime.isEmpty(); 4287 } 4288 4289 public boolean hasDateTime() { 4290 return this.dateTime != null && !this.dateTime.isEmpty(); 4291 } 4292 4293 /** 4294 * @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 4295 */ 4296 public NutritionOrder setDateTimeElement(DateTimeType value) { 4297 this.dateTime = value; 4298 return this; 4299 } 4300 4301 /** 4302 * @return The date and time that this nutrition order was requested. 4303 */ 4304 public Date getDateTime() { 4305 return this.dateTime == null ? null : this.dateTime.getValue(); 4306 } 4307 4308 /** 4309 * @param value The date and time that this nutrition order was requested. 4310 */ 4311 public NutritionOrder setDateTime(Date value) { 4312 if (this.dateTime == null) 4313 this.dateTime = new DateTimeType(); 4314 this.dateTime.setValue(value); 4315 return this; 4316 } 4317 4318 /** 4319 * @return {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 4320 */ 4321 public Reference getOrderer() { 4322 if (this.orderer == null) 4323 if (Configuration.errorOnAutoCreate()) 4324 throw new Error("Attempt to auto-create NutritionOrder.orderer"); 4325 else if (Configuration.doAutoCreate()) 4326 this.orderer = new Reference(); // cc 4327 return this.orderer; 4328 } 4329 4330 public boolean hasOrderer() { 4331 return this.orderer != null && !this.orderer.isEmpty(); 4332 } 4333 4334 /** 4335 * @param value {@link #orderer} (The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.) 4336 */ 4337 public NutritionOrder setOrderer(Reference value) { 4338 this.orderer = value; 4339 return this; 4340 } 4341 4342 /** 4343 * @return {@link #performer} (The specified desired performer of the nutrition order.) 4344 */ 4345 public List<CodeableReference> getPerformer() { 4346 if (this.performer == null) 4347 this.performer = new ArrayList<CodeableReference>(); 4348 return this.performer; 4349 } 4350 4351 /** 4352 * @return Returns a reference to <code>this</code> for easy method chaining 4353 */ 4354 public NutritionOrder setPerformer(List<CodeableReference> thePerformer) { 4355 this.performer = thePerformer; 4356 return this; 4357 } 4358 4359 public boolean hasPerformer() { 4360 if (this.performer == null) 4361 return false; 4362 for (CodeableReference item : this.performer) 4363 if (!item.isEmpty()) 4364 return true; 4365 return false; 4366 } 4367 4368 public CodeableReference addPerformer() { //3 4369 CodeableReference t = new CodeableReference(); 4370 if (this.performer == null) 4371 this.performer = new ArrayList<CodeableReference>(); 4372 this.performer.add(t); 4373 return t; 4374 } 4375 4376 public NutritionOrder addPerformer(CodeableReference t) { //3 4377 if (t == null) 4378 return this; 4379 if (this.performer == null) 4380 this.performer = new ArrayList<CodeableReference>(); 4381 this.performer.add(t); 4382 return this; 4383 } 4384 4385 /** 4386 * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist {3} 4387 */ 4388 public CodeableReference getPerformerFirstRep() { 4389 if (getPerformer().isEmpty()) { 4390 addPerformer(); 4391 } 4392 return getPerformer().get(0); 4393 } 4394 4395 /** 4396 * @return {@link #allergyIntolerance} (A link to a record of allergies or intolerances which should be included in the nutrition order.) 4397 */ 4398 public List<Reference> getAllergyIntolerance() { 4399 if (this.allergyIntolerance == null) 4400 this.allergyIntolerance = new ArrayList<Reference>(); 4401 return this.allergyIntolerance; 4402 } 4403 4404 /** 4405 * @return Returns a reference to <code>this</code> for easy method chaining 4406 */ 4407 public NutritionOrder setAllergyIntolerance(List<Reference> theAllergyIntolerance) { 4408 this.allergyIntolerance = theAllergyIntolerance; 4409 return this; 4410 } 4411 4412 public boolean hasAllergyIntolerance() { 4413 if (this.allergyIntolerance == null) 4414 return false; 4415 for (Reference item : this.allergyIntolerance) 4416 if (!item.isEmpty()) 4417 return true; 4418 return false; 4419 } 4420 4421 public Reference addAllergyIntolerance() { //3 4422 Reference t = new Reference(); 4423 if (this.allergyIntolerance == null) 4424 this.allergyIntolerance = new ArrayList<Reference>(); 4425 this.allergyIntolerance.add(t); 4426 return t; 4427 } 4428 4429 public NutritionOrder addAllergyIntolerance(Reference t) { //3 4430 if (t == null) 4431 return this; 4432 if (this.allergyIntolerance == null) 4433 this.allergyIntolerance = new ArrayList<Reference>(); 4434 this.allergyIntolerance.add(t); 4435 return this; 4436 } 4437 4438 /** 4439 * @return The first repetition of repeating field {@link #allergyIntolerance}, creating it if it does not already exist {3} 4440 */ 4441 public Reference getAllergyIntoleranceFirstRep() { 4442 if (getAllergyIntolerance().isEmpty()) { 4443 addAllergyIntolerance(); 4444 } 4445 return getAllergyIntolerance().get(0); 4446 } 4447 4448 /** 4449 * @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.) 4450 */ 4451 public List<CodeableConcept> getFoodPreferenceModifier() { 4452 if (this.foodPreferenceModifier == null) 4453 this.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 4454 return this.foodPreferenceModifier; 4455 } 4456 4457 /** 4458 * @return Returns a reference to <code>this</code> for easy method chaining 4459 */ 4460 public NutritionOrder setFoodPreferenceModifier(List<CodeableConcept> theFoodPreferenceModifier) { 4461 this.foodPreferenceModifier = theFoodPreferenceModifier; 4462 return this; 4463 } 4464 4465 public boolean hasFoodPreferenceModifier() { 4466 if (this.foodPreferenceModifier == null) 4467 return false; 4468 for (CodeableConcept item : this.foodPreferenceModifier) 4469 if (!item.isEmpty()) 4470 return true; 4471 return false; 4472 } 4473 4474 public CodeableConcept addFoodPreferenceModifier() { //3 4475 CodeableConcept t = new CodeableConcept(); 4476 if (this.foodPreferenceModifier == null) 4477 this.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 4478 this.foodPreferenceModifier.add(t); 4479 return t; 4480 } 4481 4482 public NutritionOrder addFoodPreferenceModifier(CodeableConcept t) { //3 4483 if (t == null) 4484 return this; 4485 if (this.foodPreferenceModifier == null) 4486 this.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 4487 this.foodPreferenceModifier.add(t); 4488 return this; 4489 } 4490 4491 /** 4492 * @return The first repetition of repeating field {@link #foodPreferenceModifier}, creating it if it does not already exist {3} 4493 */ 4494 public CodeableConcept getFoodPreferenceModifierFirstRep() { 4495 if (getFoodPreferenceModifier().isEmpty()) { 4496 addFoodPreferenceModifier(); 4497 } 4498 return getFoodPreferenceModifier().get(0); 4499 } 4500 4501 /** 4502 * @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.) 4503 */ 4504 public List<CodeableConcept> getExcludeFoodModifier() { 4505 if (this.excludeFoodModifier == null) 4506 this.excludeFoodModifier = new ArrayList<CodeableConcept>(); 4507 return this.excludeFoodModifier; 4508 } 4509 4510 /** 4511 * @return Returns a reference to <code>this</code> for easy method chaining 4512 */ 4513 public NutritionOrder setExcludeFoodModifier(List<CodeableConcept> theExcludeFoodModifier) { 4514 this.excludeFoodModifier = theExcludeFoodModifier; 4515 return this; 4516 } 4517 4518 public boolean hasExcludeFoodModifier() { 4519 if (this.excludeFoodModifier == null) 4520 return false; 4521 for (CodeableConcept item : this.excludeFoodModifier) 4522 if (!item.isEmpty()) 4523 return true; 4524 return false; 4525 } 4526 4527 public CodeableConcept addExcludeFoodModifier() { //3 4528 CodeableConcept t = new CodeableConcept(); 4529 if (this.excludeFoodModifier == null) 4530 this.excludeFoodModifier = new ArrayList<CodeableConcept>(); 4531 this.excludeFoodModifier.add(t); 4532 return t; 4533 } 4534 4535 public NutritionOrder addExcludeFoodModifier(CodeableConcept t) { //3 4536 if (t == null) 4537 return this; 4538 if (this.excludeFoodModifier == null) 4539 this.excludeFoodModifier = new ArrayList<CodeableConcept>(); 4540 this.excludeFoodModifier.add(t); 4541 return this; 4542 } 4543 4544 /** 4545 * @return The first repetition of repeating field {@link #excludeFoodModifier}, creating it if it does not already exist {3} 4546 */ 4547 public CodeableConcept getExcludeFoodModifierFirstRep() { 4548 if (getExcludeFoodModifier().isEmpty()) { 4549 addExcludeFoodModifier(); 4550 } 4551 return getExcludeFoodModifier().get(0); 4552 } 4553 4554 /** 4555 * @return {@link #outsideFoodAllowed} (This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item.). This is the underlying object with id, value and extensions. The accessor "getOutsideFoodAllowed" gives direct access to the value 4556 */ 4557 public BooleanType getOutsideFoodAllowedElement() { 4558 if (this.outsideFoodAllowed == null) 4559 if (Configuration.errorOnAutoCreate()) 4560 throw new Error("Attempt to auto-create NutritionOrder.outsideFoodAllowed"); 4561 else if (Configuration.doAutoCreate()) 4562 this.outsideFoodAllowed = new BooleanType(); // bb 4563 return this.outsideFoodAllowed; 4564 } 4565 4566 public boolean hasOutsideFoodAllowedElement() { 4567 return this.outsideFoodAllowed != null && !this.outsideFoodAllowed.isEmpty(); 4568 } 4569 4570 public boolean hasOutsideFoodAllowed() { 4571 return this.outsideFoodAllowed != null && !this.outsideFoodAllowed.isEmpty(); 4572 } 4573 4574 /** 4575 * @param value {@link #outsideFoodAllowed} (This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item.). This is the underlying object with id, value and extensions. The accessor "getOutsideFoodAllowed" gives direct access to the value 4576 */ 4577 public NutritionOrder setOutsideFoodAllowedElement(BooleanType value) { 4578 this.outsideFoodAllowed = value; 4579 return this; 4580 } 4581 4582 /** 4583 * @return This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item. 4584 */ 4585 public boolean getOutsideFoodAllowed() { 4586 return this.outsideFoodAllowed == null || this.outsideFoodAllowed.isEmpty() ? false : this.outsideFoodAllowed.getValue(); 4587 } 4588 4589 /** 4590 * @param value This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item. 4591 */ 4592 public NutritionOrder setOutsideFoodAllowed(boolean value) { 4593 if (this.outsideFoodAllowed == null) 4594 this.outsideFoodAllowed = new BooleanType(); 4595 this.outsideFoodAllowed.setValue(value); 4596 return this; 4597 } 4598 4599 /** 4600 * @return {@link #oralDiet} (Diet given orally in contrast to enteral (tube) feeding.) 4601 */ 4602 public NutritionOrderOralDietComponent getOralDiet() { 4603 if (this.oralDiet == null) 4604 if (Configuration.errorOnAutoCreate()) 4605 throw new Error("Attempt to auto-create NutritionOrder.oralDiet"); 4606 else if (Configuration.doAutoCreate()) 4607 this.oralDiet = new NutritionOrderOralDietComponent(); // cc 4608 return this.oralDiet; 4609 } 4610 4611 public boolean hasOralDiet() { 4612 return this.oralDiet != null && !this.oralDiet.isEmpty(); 4613 } 4614 4615 /** 4616 * @param value {@link #oralDiet} (Diet given orally in contrast to enteral (tube) feeding.) 4617 */ 4618 public NutritionOrder setOralDiet(NutritionOrderOralDietComponent value) { 4619 this.oralDiet = value; 4620 return this; 4621 } 4622 4623 /** 4624 * @return {@link #supplement} (Oral nutritional products given in order to add further nutritional value to the patient's diet.) 4625 */ 4626 public List<NutritionOrderSupplementComponent> getSupplement() { 4627 if (this.supplement == null) 4628 this.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 4629 return this.supplement; 4630 } 4631 4632 /** 4633 * @return Returns a reference to <code>this</code> for easy method chaining 4634 */ 4635 public NutritionOrder setSupplement(List<NutritionOrderSupplementComponent> theSupplement) { 4636 this.supplement = theSupplement; 4637 return this; 4638 } 4639 4640 public boolean hasSupplement() { 4641 if (this.supplement == null) 4642 return false; 4643 for (NutritionOrderSupplementComponent item : this.supplement) 4644 if (!item.isEmpty()) 4645 return true; 4646 return false; 4647 } 4648 4649 public NutritionOrderSupplementComponent addSupplement() { //3 4650 NutritionOrderSupplementComponent t = new NutritionOrderSupplementComponent(); 4651 if (this.supplement == null) 4652 this.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 4653 this.supplement.add(t); 4654 return t; 4655 } 4656 4657 public NutritionOrder addSupplement(NutritionOrderSupplementComponent t) { //3 4658 if (t == null) 4659 return this; 4660 if (this.supplement == null) 4661 this.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 4662 this.supplement.add(t); 4663 return this; 4664 } 4665 4666 /** 4667 * @return The first repetition of repeating field {@link #supplement}, creating it if it does not already exist {3} 4668 */ 4669 public NutritionOrderSupplementComponent getSupplementFirstRep() { 4670 if (getSupplement().isEmpty()) { 4671 addSupplement(); 4672 } 4673 return getSupplement().get(0); 4674 } 4675 4676 /** 4677 * @return {@link #enteralFormula} (Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.) 4678 */ 4679 public NutritionOrderEnteralFormulaComponent getEnteralFormula() { 4680 if (this.enteralFormula == null) 4681 if (Configuration.errorOnAutoCreate()) 4682 throw new Error("Attempt to auto-create NutritionOrder.enteralFormula"); 4683 else if (Configuration.doAutoCreate()) 4684 this.enteralFormula = new NutritionOrderEnteralFormulaComponent(); // cc 4685 return this.enteralFormula; 4686 } 4687 4688 public boolean hasEnteralFormula() { 4689 return this.enteralFormula != null && !this.enteralFormula.isEmpty(); 4690 } 4691 4692 /** 4693 * @param value {@link #enteralFormula} (Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.) 4694 */ 4695 public NutritionOrder setEnteralFormula(NutritionOrderEnteralFormulaComponent value) { 4696 this.enteralFormula = value; 4697 return this; 4698 } 4699 4700 /** 4701 * @return {@link #note} (Comments made about the nutrition order by the requester, performer, subject or other participants.) 4702 */ 4703 public List<Annotation> getNote() { 4704 if (this.note == null) 4705 this.note = new ArrayList<Annotation>(); 4706 return this.note; 4707 } 4708 4709 /** 4710 * @return Returns a reference to <code>this</code> for easy method chaining 4711 */ 4712 public NutritionOrder setNote(List<Annotation> theNote) { 4713 this.note = theNote; 4714 return this; 4715 } 4716 4717 public boolean hasNote() { 4718 if (this.note == null) 4719 return false; 4720 for (Annotation item : this.note) 4721 if (!item.isEmpty()) 4722 return true; 4723 return false; 4724 } 4725 4726 public Annotation addNote() { //3 4727 Annotation t = new Annotation(); 4728 if (this.note == null) 4729 this.note = new ArrayList<Annotation>(); 4730 this.note.add(t); 4731 return t; 4732 } 4733 4734 public NutritionOrder addNote(Annotation t) { //3 4735 if (t == null) 4736 return this; 4737 if (this.note == null) 4738 this.note = new ArrayList<Annotation>(); 4739 this.note.add(t); 4740 return this; 4741 } 4742 4743 /** 4744 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 4745 */ 4746 public Annotation getNoteFirstRep() { 4747 if (getNote().isEmpty()) { 4748 addNote(); 4749 } 4750 return getNote().get(0); 4751 } 4752 4753 protected void listChildren(List<Property> children) { 4754 super.listChildren(children); 4755 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)); 4756 children.add(new Property("instantiatesCanonical", "canonical(ActivityDefinition|PlanDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical)); 4757 children.add(new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri)); 4758 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)); 4759 children.add(new Property("basedOn", "Reference(CarePlan|NutritionOrder|ServiceRequest)", "A plan or request that is fulfilled in whole or in part by this nutrition order.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 4760 children.add(new Property("groupIdentifier", "Identifier", "A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier.", 0, 1, groupIdentifier)); 4761 children.add(new Property("status", "code", "The workflow status of the nutrition order/request.", 0, 1, status)); 4762 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)); 4763 children.add(new Property("priority", "code", "Indicates how quickly the Nutrition Order should be addressed with respect to other requests.", 0, 1, priority)); 4764 children.add(new Property("subject", "Reference(Patient|Group)", "The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, 1, subject)); 4765 children.add(new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, 1, encounter)); 4766 children.add(new Property("supportingInformation", "Reference(Any)", "Information to support fulfilling (i.e. dispensing or administering) of the nutrition, for example, patient height and weight).", 0, java.lang.Integer.MAX_VALUE, supportingInformation)); 4767 children.add(new Property("dateTime", "dateTime", "The date and time that this nutrition order was requested.", 0, 1, dateTime)); 4768 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)); 4769 children.add(new Property("performer", "CodeableReference(CareTeam|Practitioner|PractitionerRole|RelatedPerson|Patient|Organization)", "The specified desired performer of the nutrition order.", 0, java.lang.Integer.MAX_VALUE, performer)); 4770 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)); 4771 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)); 4772 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)); 4773 children.add(new Property("outsideFoodAllowed", "boolean", "This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item.", 0, 1, outsideFoodAllowed)); 4774 children.add(new Property("oralDiet", "", "Diet given orally in contrast to enteral (tube) feeding.", 0, 1, oralDiet)); 4775 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)); 4776 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)); 4777 children.add(new Property("note", "Annotation", "Comments made about the nutrition order by the requester, performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note)); 4778 } 4779 4780 @Override 4781 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4782 switch (_hash) { 4783 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); 4784 case 8911915: /*instantiatesCanonical*/ return new Property("instantiatesCanonical", "canonical(ActivityDefinition|PlanDefinition)", "The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", 0, java.lang.Integer.MAX_VALUE, instantiatesCanonical); 4785 case -1926393373: /*instantiatesUri*/ return new Property("instantiatesUri", "uri", "The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.", 0, java.lang.Integer.MAX_VALUE, instantiatesUri); 4786 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); 4787 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|NutritionOrder|ServiceRequest)", "A plan or request that is fulfilled in whole or in part by this nutrition order.", 0, java.lang.Integer.MAX_VALUE, basedOn); 4788 case -445338488: /*groupIdentifier*/ return new Property("groupIdentifier", "Identifier", "A shared identifier common to all nutrition orders that were authorized more or less simultaneously by a single author, representing the composite or group identifier.", 0, 1, groupIdentifier); 4789 case -892481550: /*status*/ return new Property("status", "code", "The workflow status of the nutrition order/request.", 0, 1, status); 4790 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); 4791 case -1165461084: /*priority*/ return new Property("priority", "code", "Indicates how quickly the Nutrition Order should be addressed with respect to other requests.", 0, 1, priority); 4792 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group)", "The person or set of individuals who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.", 0, 1, subject); 4793 case 1524132147: /*encounter*/ return new Property("encounter", "Reference(Encounter)", "An encounter that provides additional information about the healthcare context in which this request is made.", 0, 1, encounter); 4794 case -1248768647: /*supportingInformation*/ return new Property("supportingInformation", "Reference(Any)", "Information to support fulfilling (i.e. dispensing or administering) of the nutrition, for example, patient height and weight).", 0, java.lang.Integer.MAX_VALUE, supportingInformation); 4795 case 1792749467: /*dateTime*/ return new Property("dateTime", "dateTime", "The date and time that this nutrition order was requested.", 0, 1, dateTime); 4796 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); 4797 case 481140686: /*performer*/ return new Property("performer", "CodeableReference(CareTeam|Practitioner|PractitionerRole|RelatedPerson|Patient|Organization)", "The specified desired performer of the nutrition order.", 0, java.lang.Integer.MAX_VALUE, performer); 4798 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); 4799 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); 4800 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); 4801 case 833777797: /*outsideFoodAllowed*/ return new Property("outsideFoodAllowed", "boolean", "This modifier is used to convey whether a food item is allowed to be brought in by the patient and/or family. If set to true, indicates that the receiving system does not need to supply the food item.", 0, 1, outsideFoodAllowed); 4802 case 1153521250: /*oralDiet*/ return new Property("oralDiet", "", "Diet given orally in contrast to enteral (tube) feeding.", 0, 1, oralDiet); 4803 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); 4804 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); 4805 case 3387378: /*note*/ return new Property("note", "Annotation", "Comments made about the nutrition order by the requester, performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note); 4806 default: return super.getNamedProperty(_hash, _name, _checkValid); 4807 } 4808 4809 } 4810 4811 @Override 4812 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4813 switch (hash) { 4814 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 4815 case 8911915: /*instantiatesCanonical*/ return this.instantiatesCanonical == null ? new Base[0] : this.instantiatesCanonical.toArray(new Base[this.instantiatesCanonical.size()]); // CanonicalType 4816 case -1926393373: /*instantiatesUri*/ return this.instantiatesUri == null ? new Base[0] : this.instantiatesUri.toArray(new Base[this.instantiatesUri.size()]); // UriType 4817 case -246883639: /*instantiates*/ return this.instantiates == null ? new Base[0] : this.instantiates.toArray(new Base[this.instantiates.size()]); // UriType 4818 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 4819 case -445338488: /*groupIdentifier*/ return this.groupIdentifier == null ? new Base[0] : new Base[] {this.groupIdentifier}; // Identifier 4820 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<RequestStatus> 4821 case -1183762788: /*intent*/ return this.intent == null ? new Base[0] : new Base[] {this.intent}; // Enumeration<RequestIntent> 4822 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Enumeration<RequestPriority> 4823 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 4824 case 1524132147: /*encounter*/ return this.encounter == null ? new Base[0] : new Base[] {this.encounter}; // Reference 4825 case -1248768647: /*supportingInformation*/ return this.supportingInformation == null ? new Base[0] : this.supportingInformation.toArray(new Base[this.supportingInformation.size()]); // Reference 4826 case 1792749467: /*dateTime*/ return this.dateTime == null ? new Base[0] : new Base[] {this.dateTime}; // DateTimeType 4827 case -1207109509: /*orderer*/ return this.orderer == null ? new Base[0] : new Base[] {this.orderer}; // Reference 4828 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // CodeableReference 4829 case -120164120: /*allergyIntolerance*/ return this.allergyIntolerance == null ? new Base[0] : this.allergyIntolerance.toArray(new Base[this.allergyIntolerance.size()]); // Reference 4830 case 659473872: /*foodPreferenceModifier*/ return this.foodPreferenceModifier == null ? new Base[0] : this.foodPreferenceModifier.toArray(new Base[this.foodPreferenceModifier.size()]); // CodeableConcept 4831 case 1760260175: /*excludeFoodModifier*/ return this.excludeFoodModifier == null ? new Base[0] : this.excludeFoodModifier.toArray(new Base[this.excludeFoodModifier.size()]); // CodeableConcept 4832 case 833777797: /*outsideFoodAllowed*/ return this.outsideFoodAllowed == null ? new Base[0] : new Base[] {this.outsideFoodAllowed}; // BooleanType 4833 case 1153521250: /*oralDiet*/ return this.oralDiet == null ? new Base[0] : new Base[] {this.oralDiet}; // NutritionOrderOralDietComponent 4834 case -711993159: /*supplement*/ return this.supplement == null ? new Base[0] : this.supplement.toArray(new Base[this.supplement.size()]); // NutritionOrderSupplementComponent 4835 case -671083805: /*enteralFormula*/ return this.enteralFormula == null ? new Base[0] : new Base[] {this.enteralFormula}; // NutritionOrderEnteralFormulaComponent 4836 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 4837 default: return super.getProperty(hash, name, checkValid); 4838 } 4839 4840 } 4841 4842 @Override 4843 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4844 switch (hash) { 4845 case -1618432855: // identifier 4846 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 4847 return value; 4848 case 8911915: // instantiatesCanonical 4849 this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType 4850 return value; 4851 case -1926393373: // instantiatesUri 4852 this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); // UriType 4853 return value; 4854 case -246883639: // instantiates 4855 this.getInstantiates().add(TypeConvertor.castToUri(value)); // UriType 4856 return value; 4857 case -332612366: // basedOn 4858 this.getBasedOn().add(TypeConvertor.castToReference(value)); // Reference 4859 return value; 4860 case -445338488: // groupIdentifier 4861 this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier 4862 return value; 4863 case -892481550: // status 4864 value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 4865 this.status = (Enumeration) value; // Enumeration<RequestStatus> 4866 return value; 4867 case -1183762788: // intent 4868 value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value)); 4869 this.intent = (Enumeration) value; // Enumeration<RequestIntent> 4870 return value; 4871 case -1165461084: // priority 4872 value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value)); 4873 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 4874 return value; 4875 case -1867885268: // subject 4876 this.subject = TypeConvertor.castToReference(value); // Reference 4877 return value; 4878 case 1524132147: // encounter 4879 this.encounter = TypeConvertor.castToReference(value); // Reference 4880 return value; 4881 case -1248768647: // supportingInformation 4882 this.getSupportingInformation().add(TypeConvertor.castToReference(value)); // Reference 4883 return value; 4884 case 1792749467: // dateTime 4885 this.dateTime = TypeConvertor.castToDateTime(value); // DateTimeType 4886 return value; 4887 case -1207109509: // orderer 4888 this.orderer = TypeConvertor.castToReference(value); // Reference 4889 return value; 4890 case 481140686: // performer 4891 this.getPerformer().add(TypeConvertor.castToCodeableReference(value)); // CodeableReference 4892 return value; 4893 case -120164120: // allergyIntolerance 4894 this.getAllergyIntolerance().add(TypeConvertor.castToReference(value)); // Reference 4895 return value; 4896 case 659473872: // foodPreferenceModifier 4897 this.getFoodPreferenceModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4898 return value; 4899 case 1760260175: // excludeFoodModifier 4900 this.getExcludeFoodModifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 4901 return value; 4902 case 833777797: // outsideFoodAllowed 4903 this.outsideFoodAllowed = TypeConvertor.castToBoolean(value); // BooleanType 4904 return value; 4905 case 1153521250: // oralDiet 4906 this.oralDiet = (NutritionOrderOralDietComponent) value; // NutritionOrderOralDietComponent 4907 return value; 4908 case -711993159: // supplement 4909 this.getSupplement().add((NutritionOrderSupplementComponent) value); // NutritionOrderSupplementComponent 4910 return value; 4911 case -671083805: // enteralFormula 4912 this.enteralFormula = (NutritionOrderEnteralFormulaComponent) value; // NutritionOrderEnteralFormulaComponent 4913 return value; 4914 case 3387378: // note 4915 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 4916 return value; 4917 default: return super.setProperty(hash, name, value); 4918 } 4919 4920 } 4921 4922 @Override 4923 public Base setProperty(String name, Base value) throws FHIRException { 4924 if (name.equals("identifier")) { 4925 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 4926 } else if (name.equals("instantiatesCanonical")) { 4927 this.getInstantiatesCanonical().add(TypeConvertor.castToCanonical(value)); 4928 } else if (name.equals("instantiatesUri")) { 4929 this.getInstantiatesUri().add(TypeConvertor.castToUri(value)); 4930 } else if (name.equals("instantiates")) { 4931 this.getInstantiates().add(TypeConvertor.castToUri(value)); 4932 } else if (name.equals("basedOn")) { 4933 this.getBasedOn().add(TypeConvertor.castToReference(value)); 4934 } else if (name.equals("groupIdentifier")) { 4935 this.groupIdentifier = TypeConvertor.castToIdentifier(value); // Identifier 4936 } else if (name.equals("status")) { 4937 value = new RequestStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 4938 this.status = (Enumeration) value; // Enumeration<RequestStatus> 4939 } else if (name.equals("intent")) { 4940 value = new RequestIntentEnumFactory().fromType(TypeConvertor.castToCode(value)); 4941 this.intent = (Enumeration) value; // Enumeration<RequestIntent> 4942 } else if (name.equals("priority")) { 4943 value = new RequestPriorityEnumFactory().fromType(TypeConvertor.castToCode(value)); 4944 this.priority = (Enumeration) value; // Enumeration<RequestPriority> 4945 } else if (name.equals("subject")) { 4946 this.subject = TypeConvertor.castToReference(value); // Reference 4947 } else if (name.equals("encounter")) { 4948 this.encounter = TypeConvertor.castToReference(value); // Reference 4949 } else if (name.equals("supportingInformation")) { 4950 this.getSupportingInformation().add(TypeConvertor.castToReference(value)); 4951 } else if (name.equals("dateTime")) { 4952 this.dateTime = TypeConvertor.castToDateTime(value); // DateTimeType 4953 } else if (name.equals("orderer")) { 4954 this.orderer = TypeConvertor.castToReference(value); // Reference 4955 } else if (name.equals("performer")) { 4956 this.getPerformer().add(TypeConvertor.castToCodeableReference(value)); 4957 } else if (name.equals("allergyIntolerance")) { 4958 this.getAllergyIntolerance().add(TypeConvertor.castToReference(value)); 4959 } else if (name.equals("foodPreferenceModifier")) { 4960 this.getFoodPreferenceModifier().add(TypeConvertor.castToCodeableConcept(value)); 4961 } else if (name.equals("excludeFoodModifier")) { 4962 this.getExcludeFoodModifier().add(TypeConvertor.castToCodeableConcept(value)); 4963 } else if (name.equals("outsideFoodAllowed")) { 4964 this.outsideFoodAllowed = TypeConvertor.castToBoolean(value); // BooleanType 4965 } else if (name.equals("oralDiet")) { 4966 this.oralDiet = (NutritionOrderOralDietComponent) value; // NutritionOrderOralDietComponent 4967 } else if (name.equals("supplement")) { 4968 this.getSupplement().add((NutritionOrderSupplementComponent) value); 4969 } else if (name.equals("enteralFormula")) { 4970 this.enteralFormula = (NutritionOrderEnteralFormulaComponent) value; // NutritionOrderEnteralFormulaComponent 4971 } else if (name.equals("note")) { 4972 this.getNote().add(TypeConvertor.castToAnnotation(value)); 4973 } else 4974 return super.setProperty(name, value); 4975 return value; 4976 } 4977 4978 @Override 4979 public Base makeProperty(int hash, String name) throws FHIRException { 4980 switch (hash) { 4981 case -1618432855: return addIdentifier(); 4982 case 8911915: return addInstantiatesCanonicalElement(); 4983 case -1926393373: return addInstantiatesUriElement(); 4984 case -246883639: return addInstantiatesElement(); 4985 case -332612366: return addBasedOn(); 4986 case -445338488: return getGroupIdentifier(); 4987 case -892481550: return getStatusElement(); 4988 case -1183762788: return getIntentElement(); 4989 case -1165461084: return getPriorityElement(); 4990 case -1867885268: return getSubject(); 4991 case 1524132147: return getEncounter(); 4992 case -1248768647: return addSupportingInformation(); 4993 case 1792749467: return getDateTimeElement(); 4994 case -1207109509: return getOrderer(); 4995 case 481140686: return addPerformer(); 4996 case -120164120: return addAllergyIntolerance(); 4997 case 659473872: return addFoodPreferenceModifier(); 4998 case 1760260175: return addExcludeFoodModifier(); 4999 case 833777797: return getOutsideFoodAllowedElement(); 5000 case 1153521250: return getOralDiet(); 5001 case -711993159: return addSupplement(); 5002 case -671083805: return getEnteralFormula(); 5003 case 3387378: return addNote(); 5004 default: return super.makeProperty(hash, name); 5005 } 5006 5007 } 5008 5009 @Override 5010 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5011 switch (hash) { 5012 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 5013 case 8911915: /*instantiatesCanonical*/ return new String[] {"canonical"}; 5014 case -1926393373: /*instantiatesUri*/ return new String[] {"uri"}; 5015 case -246883639: /*instantiates*/ return new String[] {"uri"}; 5016 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 5017 case -445338488: /*groupIdentifier*/ return new String[] {"Identifier"}; 5018 case -892481550: /*status*/ return new String[] {"code"}; 5019 case -1183762788: /*intent*/ return new String[] {"code"}; 5020 case -1165461084: /*priority*/ return new String[] {"code"}; 5021 case -1867885268: /*subject*/ return new String[] {"Reference"}; 5022 case 1524132147: /*encounter*/ return new String[] {"Reference"}; 5023 case -1248768647: /*supportingInformation*/ return new String[] {"Reference"}; 5024 case 1792749467: /*dateTime*/ return new String[] {"dateTime"}; 5025 case -1207109509: /*orderer*/ return new String[] {"Reference"}; 5026 case 481140686: /*performer*/ return new String[] {"CodeableReference"}; 5027 case -120164120: /*allergyIntolerance*/ return new String[] {"Reference"}; 5028 case 659473872: /*foodPreferenceModifier*/ return new String[] {"CodeableConcept"}; 5029 case 1760260175: /*excludeFoodModifier*/ return new String[] {"CodeableConcept"}; 5030 case 833777797: /*outsideFoodAllowed*/ return new String[] {"boolean"}; 5031 case 1153521250: /*oralDiet*/ return new String[] {}; 5032 case -711993159: /*supplement*/ return new String[] {}; 5033 case -671083805: /*enteralFormula*/ return new String[] {}; 5034 case 3387378: /*note*/ return new String[] {"Annotation"}; 5035 default: return super.getTypesForProperty(hash, name); 5036 } 5037 5038 } 5039 5040 @Override 5041 public Base addChild(String name) throws FHIRException { 5042 if (name.equals("identifier")) { 5043 return addIdentifier(); 5044 } 5045 else if (name.equals("instantiatesCanonical")) { 5046 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instantiatesCanonical"); 5047 } 5048 else if (name.equals("instantiatesUri")) { 5049 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instantiatesUri"); 5050 } 5051 else if (name.equals("instantiates")) { 5052 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.instantiates"); 5053 } 5054 else if (name.equals("basedOn")) { 5055 return addBasedOn(); 5056 } 5057 else if (name.equals("groupIdentifier")) { 5058 this.groupIdentifier = new Identifier(); 5059 return this.groupIdentifier; 5060 } 5061 else if (name.equals("status")) { 5062 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.status"); 5063 } 5064 else if (name.equals("intent")) { 5065 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.intent"); 5066 } 5067 else if (name.equals("priority")) { 5068 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.priority"); 5069 } 5070 else if (name.equals("subject")) { 5071 this.subject = new Reference(); 5072 return this.subject; 5073 } 5074 else if (name.equals("encounter")) { 5075 this.encounter = new Reference(); 5076 return this.encounter; 5077 } 5078 else if (name.equals("supportingInformation")) { 5079 return addSupportingInformation(); 5080 } 5081 else if (name.equals("dateTime")) { 5082 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.dateTime"); 5083 } 5084 else if (name.equals("orderer")) { 5085 this.orderer = new Reference(); 5086 return this.orderer; 5087 } 5088 else if (name.equals("performer")) { 5089 return addPerformer(); 5090 } 5091 else if (name.equals("allergyIntolerance")) { 5092 return addAllergyIntolerance(); 5093 } 5094 else if (name.equals("foodPreferenceModifier")) { 5095 return addFoodPreferenceModifier(); 5096 } 5097 else if (name.equals("excludeFoodModifier")) { 5098 return addExcludeFoodModifier(); 5099 } 5100 else if (name.equals("outsideFoodAllowed")) { 5101 throw new FHIRException("Cannot call addChild on a primitive type NutritionOrder.outsideFoodAllowed"); 5102 } 5103 else if (name.equals("oralDiet")) { 5104 this.oralDiet = new NutritionOrderOralDietComponent(); 5105 return this.oralDiet; 5106 } 5107 else if (name.equals("supplement")) { 5108 return addSupplement(); 5109 } 5110 else if (name.equals("enteralFormula")) { 5111 this.enteralFormula = new NutritionOrderEnteralFormulaComponent(); 5112 return this.enteralFormula; 5113 } 5114 else if (name.equals("note")) { 5115 return addNote(); 5116 } 5117 else 5118 return super.addChild(name); 5119 } 5120 5121 public String fhirType() { 5122 return "NutritionOrder"; 5123 5124 } 5125 5126 public NutritionOrder copy() { 5127 NutritionOrder dst = new NutritionOrder(); 5128 copyValues(dst); 5129 return dst; 5130 } 5131 5132 public void copyValues(NutritionOrder dst) { 5133 super.copyValues(dst); 5134 if (identifier != null) { 5135 dst.identifier = new ArrayList<Identifier>(); 5136 for (Identifier i : identifier) 5137 dst.identifier.add(i.copy()); 5138 }; 5139 if (instantiatesCanonical != null) { 5140 dst.instantiatesCanonical = new ArrayList<CanonicalType>(); 5141 for (CanonicalType i : instantiatesCanonical) 5142 dst.instantiatesCanonical.add(i.copy()); 5143 }; 5144 if (instantiatesUri != null) { 5145 dst.instantiatesUri = new ArrayList<UriType>(); 5146 for (UriType i : instantiatesUri) 5147 dst.instantiatesUri.add(i.copy()); 5148 }; 5149 if (instantiates != null) { 5150 dst.instantiates = new ArrayList<UriType>(); 5151 for (UriType i : instantiates) 5152 dst.instantiates.add(i.copy()); 5153 }; 5154 if (basedOn != null) { 5155 dst.basedOn = new ArrayList<Reference>(); 5156 for (Reference i : basedOn) 5157 dst.basedOn.add(i.copy()); 5158 }; 5159 dst.groupIdentifier = groupIdentifier == null ? null : groupIdentifier.copy(); 5160 dst.status = status == null ? null : status.copy(); 5161 dst.intent = intent == null ? null : intent.copy(); 5162 dst.priority = priority == null ? null : priority.copy(); 5163 dst.subject = subject == null ? null : subject.copy(); 5164 dst.encounter = encounter == null ? null : encounter.copy(); 5165 if (supportingInformation != null) { 5166 dst.supportingInformation = new ArrayList<Reference>(); 5167 for (Reference i : supportingInformation) 5168 dst.supportingInformation.add(i.copy()); 5169 }; 5170 dst.dateTime = dateTime == null ? null : dateTime.copy(); 5171 dst.orderer = orderer == null ? null : orderer.copy(); 5172 if (performer != null) { 5173 dst.performer = new ArrayList<CodeableReference>(); 5174 for (CodeableReference i : performer) 5175 dst.performer.add(i.copy()); 5176 }; 5177 if (allergyIntolerance != null) { 5178 dst.allergyIntolerance = new ArrayList<Reference>(); 5179 for (Reference i : allergyIntolerance) 5180 dst.allergyIntolerance.add(i.copy()); 5181 }; 5182 if (foodPreferenceModifier != null) { 5183 dst.foodPreferenceModifier = new ArrayList<CodeableConcept>(); 5184 for (CodeableConcept i : foodPreferenceModifier) 5185 dst.foodPreferenceModifier.add(i.copy()); 5186 }; 5187 if (excludeFoodModifier != null) { 5188 dst.excludeFoodModifier = new ArrayList<CodeableConcept>(); 5189 for (CodeableConcept i : excludeFoodModifier) 5190 dst.excludeFoodModifier.add(i.copy()); 5191 }; 5192 dst.outsideFoodAllowed = outsideFoodAllowed == null ? null : outsideFoodAllowed.copy(); 5193 dst.oralDiet = oralDiet == null ? null : oralDiet.copy(); 5194 if (supplement != null) { 5195 dst.supplement = new ArrayList<NutritionOrderSupplementComponent>(); 5196 for (NutritionOrderSupplementComponent i : supplement) 5197 dst.supplement.add(i.copy()); 5198 }; 5199 dst.enteralFormula = enteralFormula == null ? null : enteralFormula.copy(); 5200 if (note != null) { 5201 dst.note = new ArrayList<Annotation>(); 5202 for (Annotation i : note) 5203 dst.note.add(i.copy()); 5204 }; 5205 } 5206 5207 protected NutritionOrder typedCopy() { 5208 return copy(); 5209 } 5210 5211 @Override 5212 public boolean equalsDeep(Base other_) { 5213 if (!super.equalsDeep(other_)) 5214 return false; 5215 if (!(other_ instanceof NutritionOrder)) 5216 return false; 5217 NutritionOrder o = (NutritionOrder) other_; 5218 return compareDeep(identifier, o.identifier, true) && compareDeep(instantiatesCanonical, o.instantiatesCanonical, true) 5219 && compareDeep(instantiatesUri, o.instantiatesUri, true) && compareDeep(instantiates, o.instantiates, true) 5220 && compareDeep(basedOn, o.basedOn, true) && compareDeep(groupIdentifier, o.groupIdentifier, true) 5221 && compareDeep(status, o.status, true) && compareDeep(intent, o.intent, true) && compareDeep(priority, o.priority, true) 5222 && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) && compareDeep(supportingInformation, o.supportingInformation, true) 5223 && compareDeep(dateTime, o.dateTime, true) && compareDeep(orderer, o.orderer, true) && compareDeep(performer, o.performer, true) 5224 && compareDeep(allergyIntolerance, o.allergyIntolerance, true) && compareDeep(foodPreferenceModifier, o.foodPreferenceModifier, true) 5225 && compareDeep(excludeFoodModifier, o.excludeFoodModifier, true) && compareDeep(outsideFoodAllowed, o.outsideFoodAllowed, true) 5226 && compareDeep(oralDiet, o.oralDiet, true) && compareDeep(supplement, o.supplement, true) && compareDeep(enteralFormula, o.enteralFormula, true) 5227 && compareDeep(note, o.note, true); 5228 } 5229 5230 @Override 5231 public boolean equalsShallow(Base other_) { 5232 if (!super.equalsShallow(other_)) 5233 return false; 5234 if (!(other_ instanceof NutritionOrder)) 5235 return false; 5236 NutritionOrder o = (NutritionOrder) other_; 5237 return compareValues(instantiatesCanonical, o.instantiatesCanonical, true) && compareValues(instantiatesUri, o.instantiatesUri, true) 5238 && compareValues(instantiates, o.instantiates, true) && compareValues(status, o.status, true) && compareValues(intent, o.intent, true) 5239 && compareValues(priority, o.priority, true) && compareValues(dateTime, o.dateTime, true) && compareValues(outsideFoodAllowed, o.outsideFoodAllowed, true) 5240 ; 5241 } 5242 5243 public boolean isEmpty() { 5244 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, instantiatesCanonical 5245 , instantiatesUri, instantiates, basedOn, groupIdentifier, status, intent, priority 5246 , subject, encounter, supportingInformation, dateTime, orderer, performer, allergyIntolerance 5247 , foodPreferenceModifier, excludeFoodModifier, outsideFoodAllowed, oralDiet, supplement 5248 , enteralFormula, note); 5249 } 5250 5251 @Override 5252 public ResourceType getResourceType() { 5253 return ResourceType.NutritionOrder; 5254 } 5255 5256 /** 5257 * Search parameter: <b>additive</b> 5258 * <p> 5259 * Description: <b>Type of module component to add to the feeding</b><br> 5260 * Type: <b>token</b><br> 5261 * Path: <b>NutritionOrder.enteralFormula.additive.type.concept</b><br> 5262 * </p> 5263 */ 5264 @SearchParamDefinition(name="additive", path="NutritionOrder.enteralFormula.additive.type.concept", description="Type of module component to add to the feeding", type="token" ) 5265 public static final String SP_ADDITIVE = "additive"; 5266 /** 5267 * <b>Fluent Client</b> search parameter constant for <b>additive</b> 5268 * <p> 5269 * Description: <b>Type of module component to add to the feeding</b><br> 5270 * Type: <b>token</b><br> 5271 * Path: <b>NutritionOrder.enteralFormula.additive.type.concept</b><br> 5272 * </p> 5273 */ 5274 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ADDITIVE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ADDITIVE); 5275 5276 /** 5277 * Search parameter: <b>datetime</b> 5278 * <p> 5279 * Description: <b>Return nutrition orders requested on this date</b><br> 5280 * Type: <b>date</b><br> 5281 * Path: <b>NutritionOrder.dateTime</b><br> 5282 * </p> 5283 */ 5284 @SearchParamDefinition(name="datetime", path="NutritionOrder.dateTime", description="Return nutrition orders requested on this date", type="date" ) 5285 public static final String SP_DATETIME = "datetime"; 5286 /** 5287 * <b>Fluent Client</b> search parameter constant for <b>datetime</b> 5288 * <p> 5289 * Description: <b>Return nutrition orders requested on this date</b><br> 5290 * Type: <b>date</b><br> 5291 * Path: <b>NutritionOrder.dateTime</b><br> 5292 * </p> 5293 */ 5294 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATETIME = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATETIME); 5295 5296 /** 5297 * Search parameter: <b>formula</b> 5298 * <p> 5299 * Description: <b>Type of enteral or infant formula</b><br> 5300 * Type: <b>token</b><br> 5301 * Path: <b>NutritionOrder.enteralFormula.baseFormulaType.concept</b><br> 5302 * </p> 5303 */ 5304 @SearchParamDefinition(name="formula", path="NutritionOrder.enteralFormula.baseFormulaType.concept", description="Type of enteral or infant formula", type="token" ) 5305 public static final String SP_FORMULA = "formula"; 5306 /** 5307 * <b>Fluent Client</b> search parameter constant for <b>formula</b> 5308 * <p> 5309 * Description: <b>Type of enteral or infant formula</b><br> 5310 * Type: <b>token</b><br> 5311 * Path: <b>NutritionOrder.enteralFormula.baseFormulaType.concept</b><br> 5312 * </p> 5313 */ 5314 public static final ca.uhn.fhir.rest.gclient.TokenClientParam FORMULA = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FORMULA); 5315 5316 /** 5317 * Search parameter: <b>group-identifier</b> 5318 * <p> 5319 * Description: <b>Composite Request ID</b><br> 5320 * Type: <b>token</b><br> 5321 * Path: <b>NutritionOrder.groupIdentifier</b><br> 5322 * </p> 5323 */ 5324 @SearchParamDefinition(name="group-identifier", path="NutritionOrder.groupIdentifier", description="Composite Request ID", type="token" ) 5325 public static final String SP_GROUP_IDENTIFIER = "group-identifier"; 5326 /** 5327 * <b>Fluent Client</b> search parameter constant for <b>group-identifier</b> 5328 * <p> 5329 * Description: <b>Composite Request ID</b><br> 5330 * Type: <b>token</b><br> 5331 * Path: <b>NutritionOrder.groupIdentifier</b><br> 5332 * </p> 5333 */ 5334 public static final ca.uhn.fhir.rest.gclient.TokenClientParam GROUP_IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_GROUP_IDENTIFIER); 5335 5336 /** 5337 * Search parameter: <b>oraldiet</b> 5338 * <p> 5339 * Description: <b>Type of diet that can be consumed orally (i.e., take via the mouth).</b><br> 5340 * Type: <b>token</b><br> 5341 * Path: <b>NutritionOrder.oralDiet.type</b><br> 5342 * </p> 5343 */ 5344 @SearchParamDefinition(name="oraldiet", path="NutritionOrder.oralDiet.type", description="Type of diet that can be consumed orally (i.e., take via the mouth).", type="token" ) 5345 public static final String SP_ORALDIET = "oraldiet"; 5346 /** 5347 * <b>Fluent Client</b> search parameter constant for <b>oraldiet</b> 5348 * <p> 5349 * Description: <b>Type of diet that can be consumed orally (i.e., take via the mouth).</b><br> 5350 * Type: <b>token</b><br> 5351 * Path: <b>NutritionOrder.oralDiet.type</b><br> 5352 * </p> 5353 */ 5354 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORALDIET = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORALDIET); 5355 5356 /** 5357 * Search parameter: <b>provider</b> 5358 * <p> 5359 * Description: <b>The identity of the provider who placed the nutrition order</b><br> 5360 * Type: <b>reference</b><br> 5361 * Path: <b>NutritionOrder.orderer</b><br> 5362 * </p> 5363 */ 5364 @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="Base FHIR compartment definition for Practitioner") }, target={Practitioner.class, PractitionerRole.class } ) 5365 public static final String SP_PROVIDER = "provider"; 5366 /** 5367 * <b>Fluent Client</b> search parameter constant for <b>provider</b> 5368 * <p> 5369 * Description: <b>The identity of the provider who placed the nutrition order</b><br> 5370 * Type: <b>reference</b><br> 5371 * Path: <b>NutritionOrder.orderer</b><br> 5372 * </p> 5373 */ 5374 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDER); 5375 5376/** 5377 * Constant for fluent queries to be used to add include statements. Specifies 5378 * the path value of "<b>NutritionOrder:provider</b>". 5379 */ 5380 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDER = new ca.uhn.fhir.model.api.Include("NutritionOrder:provider").toLocked(); 5381 5382 /** 5383 * Search parameter: <b>status</b> 5384 * <p> 5385 * Description: <b>Status of the nutrition order.</b><br> 5386 * Type: <b>token</b><br> 5387 * Path: <b>NutritionOrder.status</b><br> 5388 * </p> 5389 */ 5390 @SearchParamDefinition(name="status", path="NutritionOrder.status", description="Status of the nutrition order.", type="token" ) 5391 public static final String SP_STATUS = "status"; 5392 /** 5393 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5394 * <p> 5395 * Description: <b>Status of the nutrition order.</b><br> 5396 * Type: <b>token</b><br> 5397 * Path: <b>NutritionOrder.status</b><br> 5398 * </p> 5399 */ 5400 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 5401 5402 /** 5403 * Search parameter: <b>subject</b> 5404 * <p> 5405 * Description: <b>The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement</b><br> 5406 * Type: <b>reference</b><br> 5407 * Path: <b>NutritionOrder.subject</b><br> 5408 * </p> 5409 */ 5410 @SearchParamDefinition(name="subject", path="NutritionOrder.subject", description="The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement", type="reference", target={Group.class, Patient.class } ) 5411 public static final String SP_SUBJECT = "subject"; 5412 /** 5413 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 5414 * <p> 5415 * Description: <b>The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement</b><br> 5416 * Type: <b>reference</b><br> 5417 * Path: <b>NutritionOrder.subject</b><br> 5418 * </p> 5419 */ 5420 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 5421 5422/** 5423 * Constant for fluent queries to be used to add include statements. Specifies 5424 * the path value of "<b>NutritionOrder:subject</b>". 5425 */ 5426 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("NutritionOrder:subject").toLocked(); 5427 5428 /** 5429 * Search parameter: <b>supplement</b> 5430 * <p> 5431 * Description: <b>Type of supplement product requested</b><br> 5432 * Type: <b>token</b><br> 5433 * Path: <b>NutritionOrder.supplement.type.concept</b><br> 5434 * </p> 5435 */ 5436 @SearchParamDefinition(name="supplement", path="NutritionOrder.supplement.type.concept", description="Type of supplement product requested", type="token" ) 5437 public static final String SP_SUPPLEMENT = "supplement"; 5438 /** 5439 * <b>Fluent Client</b> search parameter constant for <b>supplement</b> 5440 * <p> 5441 * Description: <b>Type of supplement product requested</b><br> 5442 * Type: <b>token</b><br> 5443 * Path: <b>NutritionOrder.supplement.type.concept</b><br> 5444 * </p> 5445 */ 5446 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUPPLEMENT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUPPLEMENT); 5447 5448 /** 5449 * Search parameter: <b>encounter</b> 5450 * <p> 5451 * Description: <b>Multiple Resources: 5452 5453* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent 5454* [CarePlan](careplan.html): The Encounter during which this CarePlan was created 5455* [ChargeItem](chargeitem.html): Encounter associated with event 5456* [Claim](claim.html): Encounters associated with a billed line item 5457* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created 5458* [Communication](communication.html): The Encounter during which this Communication was created 5459* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created 5460* [Composition](composition.html): Context of the Composition 5461* [Condition](condition.html): The Encounter during which this Condition was created 5462* [DeviceRequest](devicerequest.html): Encounter during which request was created 5463* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made 5464* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values 5465* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item 5466* [Flag](flag.html): Alert relevant during encounter 5467* [ImagingStudy](imagingstudy.html): The context of the study 5468* [List](list.html): Context in which list created 5469* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter 5470* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter 5471* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter 5472* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier 5473* [Observation](observation.html): Encounter related to the observation 5474* [Procedure](procedure.html): The Encounter during which this Procedure was created 5475* [Provenance](provenance.html): Encounter related to the Provenance 5476* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response 5477* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to 5478* [RiskAssessment](riskassessment.html): Where was assessment performed? 5479* [ServiceRequest](servicerequest.html): An encounter in which this request is made 5480* [Task](task.html): Search by encounter 5481* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier 5482</b><br> 5483 * Type: <b>reference</b><br> 5484 * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br> 5485 * </p> 5486 */ 5487 @SearchParamDefinition(name="encounter", path="AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter", description="Multiple Resources: \r\n\r\n* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent\r\n* [CarePlan](careplan.html): The Encounter during which this CarePlan was created\r\n* [ChargeItem](chargeitem.html): Encounter associated with event\r\n* [Claim](claim.html): Encounters associated with a billed line item\r\n* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created\r\n* [Communication](communication.html): The Encounter during which this Communication was created\r\n* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created\r\n* [Composition](composition.html): Context of the Composition\r\n* [Condition](condition.html): The Encounter during which this Condition was created\r\n* [DeviceRequest](devicerequest.html): Encounter during which request was created\r\n* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made\r\n* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values\r\n* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item\r\n* [Flag](flag.html): Alert relevant during encounter\r\n* [ImagingStudy](imagingstudy.html): The context of the study\r\n* [List](list.html): Context in which list created\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier\r\n* [Observation](observation.html): Encounter related to the observation\r\n* [Procedure](procedure.html): The Encounter during which this Procedure was created\r\n* [Provenance](provenance.html): Encounter related to the Provenance\r\n* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response\r\n* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to\r\n* [RiskAssessment](riskassessment.html): Where was assessment performed?\r\n* [ServiceRequest](servicerequest.html): An encounter in which this request is made\r\n* [Task](task.html): Search by encounter\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Encounter") }, target={Encounter.class } ) 5488 public static final String SP_ENCOUNTER = "encounter"; 5489 /** 5490 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 5491 * <p> 5492 * Description: <b>Multiple Resources: 5493 5494* [AuditEvent](auditevent.html): Encounter related to the activity recorded in the AuditEvent 5495* [CarePlan](careplan.html): The Encounter during which this CarePlan was created 5496* [ChargeItem](chargeitem.html): Encounter associated with event 5497* [Claim](claim.html): Encounters associated with a billed line item 5498* [ClinicalImpression](clinicalimpression.html): The Encounter during which this ClinicalImpression was created 5499* [Communication](communication.html): The Encounter during which this Communication was created 5500* [CommunicationRequest](communicationrequest.html): The Encounter during which this CommunicationRequest was created 5501* [Composition](composition.html): Context of the Composition 5502* [Condition](condition.html): The Encounter during which this Condition was created 5503* [DeviceRequest](devicerequest.html): Encounter during which request was created 5504* [DiagnosticReport](diagnosticreport.html): The Encounter when the order was made 5505* [EncounterHistory](encounterhistory.html): The Encounter associated with this set of history values 5506* [ExplanationOfBenefit](explanationofbenefit.html): Encounters associated with a billed line item 5507* [Flag](flag.html): Alert relevant during encounter 5508* [ImagingStudy](imagingstudy.html): The context of the study 5509* [List](list.html): Context in which list created 5510* [MedicationDispense](medicationdispense.html): Returns dispenses with a specific encounter 5511* [MedicationStatement](medicationstatement.html): Returns statements for a specific encounter 5512* [NutritionIntake](nutritionintake.html): Returns statements for a specific encounter 5513* [NutritionOrder](nutritionorder.html): Return nutrition orders with this encounter identifier 5514* [Observation](observation.html): Encounter related to the observation 5515* [Procedure](procedure.html): The Encounter during which this Procedure was created 5516* [Provenance](provenance.html): Encounter related to the Provenance 5517* [QuestionnaireResponse](questionnaireresponse.html): Encounter associated with the questionnaire response 5518* [RequestOrchestration](requestorchestration.html): The encounter the request orchestration applies to 5519* [RiskAssessment](riskassessment.html): Where was assessment performed? 5520* [ServiceRequest](servicerequest.html): An encounter in which this request is made 5521* [Task](task.html): Search by encounter 5522* [VisionPrescription](visionprescription.html): Return prescriptions with this encounter identifier 5523</b><br> 5524 * Type: <b>reference</b><br> 5525 * Path: <b>AuditEvent.encounter | CarePlan.encounter | ChargeItem.encounter | Claim.item.encounter | ClinicalImpression.encounter | Communication.encounter | CommunicationRequest.encounter | Composition.encounter | Condition.encounter | DeviceRequest.encounter | DiagnosticReport.encounter | EncounterHistory.encounter | ExplanationOfBenefit.item.encounter | Flag.encounter | ImagingStudy.encounter | List.encounter | MedicationDispense.encounter | MedicationStatement.encounter | NutritionIntake.encounter | NutritionOrder.encounter | Observation.encounter | Procedure.encounter | Provenance.encounter | QuestionnaireResponse.encounter | RequestOrchestration.encounter | RiskAssessment.encounter | ServiceRequest.encounter | Task.encounter | VisionPrescription.encounter</b><br> 5526 * </p> 5527 */ 5528 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 5529 5530/** 5531 * Constant for fluent queries to be used to add include statements. Specifies 5532 * the path value of "<b>NutritionOrder:encounter</b>". 5533 */ 5534 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("NutritionOrder:encounter").toLocked(); 5535 5536 /** 5537 * Search parameter: <b>identifier</b> 5538 * <p> 5539 * Description: <b>Multiple Resources: 5540 5541* [Account](account.html): Account number 5542* [AdverseEvent](adverseevent.html): Business identifier for the event 5543* [AllergyIntolerance](allergyintolerance.html): External ids for this item 5544* [Appointment](appointment.html): An Identifier of the Appointment 5545* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response 5546* [Basic](basic.html): Business identifier 5547* [BodyStructure](bodystructure.html): Bodystructure identifier 5548* [CarePlan](careplan.html): External Ids for this plan 5549* [CareTeam](careteam.html): External Ids for this team 5550* [ChargeItem](chargeitem.html): Business Identifier for item 5551* [Claim](claim.html): The primary identifier of the financial resource 5552* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse 5553* [ClinicalImpression](clinicalimpression.html): Business identifier 5554* [Communication](communication.html): Unique identifier 5555* [CommunicationRequest](communicationrequest.html): Unique identifier 5556* [Composition](composition.html): Version-independent identifier for the Composition 5557* [Condition](condition.html): A unique identifier of the condition record 5558* [Consent](consent.html): Identifier for this record (external references) 5559* [Contract](contract.html): The identity of the contract 5560* [Coverage](coverage.html): The primary identifier of the insured and the coverage 5561* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility 5562* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier 5563* [DetectedIssue](detectedissue.html): Unique id for the detected issue 5564* [DeviceRequest](devicerequest.html): Business identifier for request/order 5565* [DeviceUsage](deviceusage.html): Search by identifier 5566* [DiagnosticReport](diagnosticreport.html): An identifier for the report 5567* [DocumentReference](documentreference.html): Identifier of the attachment binary 5568* [Encounter](encounter.html): Identifier(s) by which this encounter is known 5569* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment 5570* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 5571* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit 5572* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 5573* [Flag](flag.html): Business identifier 5574* [Goal](goal.html): External Ids for this goal 5575* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response 5576* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection 5577* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 5578* [Immunization](immunization.html): Business identifier 5579* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation 5580* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier 5581* [Invoice](invoice.html): Business Identifier for item 5582* [List](list.html): Business identifier 5583* [MeasureReport](measurereport.html): External identifier of the measure report to be returned 5584* [Medication](medication.html): Returns medications with this external identifier 5585* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 5586* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 5587* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 5588* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 5589* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence 5590* [NutritionIntake](nutritionintake.html): Return statements with this external identifier 5591* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 5592* [Observation](observation.html): The unique id for a particular observation 5593* [Person](person.html): A person Identifier 5594* [Procedure](procedure.html): A unique identifier for a procedure 5595* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response 5596* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson 5597* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration 5598* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study 5599* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 5600* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 5601* [Specimen](specimen.html): The unique identifier associated with the specimen 5602* [SupplyDelivery](supplydelivery.html): External identifier 5603* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 5604* [Task](task.html): Search for a task instance by its business identifier 5605* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 5606</b><br> 5607 * Type: <b>token</b><br> 5608 * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br> 5609 * </p> 5610 */ 5611 @SearchParamDefinition(name="identifier", path="Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier", description="Multiple Resources: \r\n\r\n* [Account](account.html): Account number\r\n* [AdverseEvent](adverseevent.html): Business identifier for the event\r\n* [AllergyIntolerance](allergyintolerance.html): External ids for this item\r\n* [Appointment](appointment.html): An Identifier of the Appointment\r\n* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response\r\n* [Basic](basic.html): Business identifier\r\n* [BodyStructure](bodystructure.html): Bodystructure identifier\r\n* [CarePlan](careplan.html): External Ids for this plan\r\n* [CareTeam](careteam.html): External Ids for this team\r\n* [ChargeItem](chargeitem.html): Business Identifier for item\r\n* [Claim](claim.html): The primary identifier of the financial resource\r\n* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse\r\n* [ClinicalImpression](clinicalimpression.html): Business identifier\r\n* [Communication](communication.html): Unique identifier\r\n* [CommunicationRequest](communicationrequest.html): Unique identifier\r\n* [Composition](composition.html): Version-independent identifier for the Composition\r\n* [Condition](condition.html): A unique identifier of the condition record\r\n* [Consent](consent.html): Identifier for this record (external references)\r\n* [Contract](contract.html): The identity of the contract\r\n* [Coverage](coverage.html): The primary identifier of the insured and the coverage\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier\r\n* [DetectedIssue](detectedissue.html): Unique id for the detected issue\r\n* [DeviceRequest](devicerequest.html): Business identifier for request/order\r\n* [DeviceUsage](deviceusage.html): Search by identifier\r\n* [DiagnosticReport](diagnosticreport.html): An identifier for the report\r\n* [DocumentReference](documentreference.html): Identifier of the attachment binary\r\n* [Encounter](encounter.html): Identifier(s) by which this encounter is known\r\n* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment\r\n* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit\r\n* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier\r\n* [Flag](flag.html): Business identifier\r\n* [Goal](goal.html): External Ids for this goal\r\n* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response\r\n* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection\r\n* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID\r\n* [Immunization](immunization.html): Business identifier\r\n* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier\r\n* [Invoice](invoice.html): Business Identifier for item\r\n* [List](list.html): Business identifier\r\n* [MeasureReport](measurereport.html): External identifier of the measure report to be returned\r\n* [Medication](medication.html): Returns medications with this external identifier\r\n* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier\r\n* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier\r\n* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier\r\n* [MedicationStatement](medicationstatement.html): Return statements with this external identifier\r\n* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence\r\n* [NutritionIntake](nutritionintake.html): Return statements with this external identifier\r\n* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier\r\n* [Observation](observation.html): The unique id for a particular observation\r\n* [Person](person.html): A person Identifier\r\n* [Procedure](procedure.html): A unique identifier for a procedure\r\n* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response\r\n* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson\r\n* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration\r\n* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study\r\n* [RiskAssessment](riskassessment.html): Unique identifier for the assessment\r\n* [ServiceRequest](servicerequest.html): Identifiers assigned to this order\r\n* [Specimen](specimen.html): The unique identifier associated with the specimen\r\n* [SupplyDelivery](supplydelivery.html): External identifier\r\n* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest\r\n* [Task](task.html): Search for a task instance by its business identifier\r\n* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier\r\n", type="token" ) 5612 public static final String SP_IDENTIFIER = "identifier"; 5613 /** 5614 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5615 * <p> 5616 * Description: <b>Multiple Resources: 5617 5618* [Account](account.html): Account number 5619* [AdverseEvent](adverseevent.html): Business identifier for the event 5620* [AllergyIntolerance](allergyintolerance.html): External ids for this item 5621* [Appointment](appointment.html): An Identifier of the Appointment 5622* [AppointmentResponse](appointmentresponse.html): An Identifier in this appointment response 5623* [Basic](basic.html): Business identifier 5624* [BodyStructure](bodystructure.html): Bodystructure identifier 5625* [CarePlan](careplan.html): External Ids for this plan 5626* [CareTeam](careteam.html): External Ids for this team 5627* [ChargeItem](chargeitem.html): Business Identifier for item 5628* [Claim](claim.html): The primary identifier of the financial resource 5629* [ClaimResponse](claimresponse.html): The identity of the ClaimResponse 5630* [ClinicalImpression](clinicalimpression.html): Business identifier 5631* [Communication](communication.html): Unique identifier 5632* [CommunicationRequest](communicationrequest.html): Unique identifier 5633* [Composition](composition.html): Version-independent identifier for the Composition 5634* [Condition](condition.html): A unique identifier of the condition record 5635* [Consent](consent.html): Identifier for this record (external references) 5636* [Contract](contract.html): The identity of the contract 5637* [Coverage](coverage.html): The primary identifier of the insured and the coverage 5638* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The business identifier of the Eligibility 5639* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The business identifier 5640* [DetectedIssue](detectedissue.html): Unique id for the detected issue 5641* [DeviceRequest](devicerequest.html): Business identifier for request/order 5642* [DeviceUsage](deviceusage.html): Search by identifier 5643* [DiagnosticReport](diagnosticreport.html): An identifier for the report 5644* [DocumentReference](documentreference.html): Identifier of the attachment binary 5645* [Encounter](encounter.html): Identifier(s) by which this encounter is known 5646* [EnrollmentRequest](enrollmentrequest.html): The business identifier of the Enrollment 5647* [EpisodeOfCare](episodeofcare.html): Business Identifier(s) relevant for this EpisodeOfCare 5648* [ExplanationOfBenefit](explanationofbenefit.html): The business identifier of the Explanation of Benefit 5649* [FamilyMemberHistory](familymemberhistory.html): A search by a record identifier 5650* [Flag](flag.html): Business identifier 5651* [Goal](goal.html): External Ids for this goal 5652* [GuidanceResponse](guidanceresponse.html): The identifier of the guidance response 5653* [ImagingSelection](imagingselection.html): Identifiers for the imaging selection 5654* [ImagingStudy](imagingstudy.html): Identifiers for the Study, such as DICOM Study Instance UID 5655* [Immunization](immunization.html): Business identifier 5656* [ImmunizationEvaluation](immunizationevaluation.html): ID of the evaluation 5657* [ImmunizationRecommendation](immunizationrecommendation.html): Business identifier 5658* [Invoice](invoice.html): Business Identifier for item 5659* [List](list.html): Business identifier 5660* [MeasureReport](measurereport.html): External identifier of the measure report to be returned 5661* [Medication](medication.html): Returns medications with this external identifier 5662* [MedicationAdministration](medicationadministration.html): Return administrations with this external identifier 5663* [MedicationDispense](medicationdispense.html): Returns dispenses with this external identifier 5664* [MedicationRequest](medicationrequest.html): Return prescriptions with this external identifier 5665* [MedicationStatement](medicationstatement.html): Return statements with this external identifier 5666* [MolecularSequence](molecularsequence.html): The unique identity for a particular sequence 5667* [NutritionIntake](nutritionintake.html): Return statements with this external identifier 5668* [NutritionOrder](nutritionorder.html): Return nutrition orders with this external identifier 5669* [Observation](observation.html): The unique id for a particular observation 5670* [Person](person.html): A person Identifier 5671* [Procedure](procedure.html): A unique identifier for a procedure 5672* [QuestionnaireResponse](questionnaireresponse.html): The unique identifier for the questionnaire response 5673* [RelatedPerson](relatedperson.html): An Identifier of the RelatedPerson 5674* [RequestOrchestration](requestorchestration.html): External identifiers for the request orchestration 5675* [ResearchSubject](researchsubject.html): Business Identifier for research subject in a study 5676* [RiskAssessment](riskassessment.html): Unique identifier for the assessment 5677* [ServiceRequest](servicerequest.html): Identifiers assigned to this order 5678* [Specimen](specimen.html): The unique identifier associated with the specimen 5679* [SupplyDelivery](supplydelivery.html): External identifier 5680* [SupplyRequest](supplyrequest.html): Business Identifier for SupplyRequest 5681* [Task](task.html): Search for a task instance by its business identifier 5682* [VisionPrescription](visionprescription.html): Return prescriptions with this external identifier 5683</b><br> 5684 * Type: <b>token</b><br> 5685 * Path: <b>Account.identifier | AdverseEvent.identifier | AllergyIntolerance.identifier | Appointment.identifier | AppointmentResponse.identifier | Basic.identifier | BodyStructure.identifier | CarePlan.identifier | CareTeam.identifier | ChargeItem.identifier | Claim.identifier | ClaimResponse.identifier | ClinicalImpression.identifier | Communication.identifier | CommunicationRequest.identifier | Composition.identifier | Condition.identifier | Consent.identifier | Contract.identifier | Coverage.identifier | CoverageEligibilityRequest.identifier | CoverageEligibilityResponse.identifier | DetectedIssue.identifier | DeviceRequest.identifier | DeviceUsage.identifier | DiagnosticReport.identifier | DocumentReference.identifier | Encounter.identifier | EnrollmentRequest.identifier | EpisodeOfCare.identifier | ExplanationOfBenefit.identifier | FamilyMemberHistory.identifier | Flag.identifier | Goal.identifier | GuidanceResponse.identifier | ImagingSelection.identifier | ImagingStudy.identifier | Immunization.identifier | ImmunizationEvaluation.identifier | ImmunizationRecommendation.identifier | Invoice.identifier | List.identifier | MeasureReport.identifier | Medication.identifier | MedicationAdministration.identifier | MedicationDispense.identifier | MedicationRequest.identifier | MedicationStatement.identifier | MolecularSequence.identifier | NutritionIntake.identifier | NutritionOrder.identifier | Observation.identifier | Person.identifier | Procedure.identifier | QuestionnaireResponse.identifier | RelatedPerson.identifier | RequestOrchestration.identifier | ResearchSubject.identifier | RiskAssessment.identifier | ServiceRequest.identifier | Specimen.identifier | SupplyDelivery.identifier | SupplyRequest.identifier | Task.identifier | VisionPrescription.identifier</b><br> 5686 * </p> 5687 */ 5688 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 5689 5690 /** 5691 * Search parameter: <b>patient</b> 5692 * <p> 5693 * Description: <b>Multiple Resources: 5694 5695* [Account](account.html): The entity that caused the expenses 5696* [AdverseEvent](adverseevent.html): Subject impacted by event 5697* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 5698* [Appointment](appointment.html): One of the individuals of the appointment is this patient 5699* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient 5700* [AuditEvent](auditevent.html): Where the activity involved patient data 5701* [Basic](basic.html): Identifies the focus of this resource 5702* [BodyStructure](bodystructure.html): Who this is about 5703* [CarePlan](careplan.html): Who the care plan is for 5704* [CareTeam](careteam.html): Who care team is for 5705* [ChargeItem](chargeitem.html): Individual service was done for/to 5706* [Claim](claim.html): Patient receiving the products or services 5707* [ClaimResponse](claimresponse.html): The subject of care 5708* [ClinicalImpression](clinicalimpression.html): Patient assessed 5709* [Communication](communication.html): Focus of message 5710* [CommunicationRequest](communicationrequest.html): Focus of message 5711* [Composition](composition.html): Who and/or what the composition is about 5712* [Condition](condition.html): Who has the condition? 5713* [Consent](consent.html): Who the consent applies to 5714* [Contract](contract.html): The identity of the subject of the contract (if a patient) 5715* [Coverage](coverage.html): Retrieve coverages for a patient 5716* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient 5717* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient 5718* [DetectedIssue](detectedissue.html): Associated patient 5719* [DeviceRequest](devicerequest.html): Individual the service is ordered for 5720* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 5721* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 5722* [DocumentReference](documentreference.html): Who/what is the subject of the document 5723* [Encounter](encounter.html): The patient present at the encounter 5724* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled 5725* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 5726* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient 5727* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 5728* [Flag](flag.html): The identity of a subject to list flags for 5729* [Goal](goal.html): Who this goal is intended for 5730* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results 5731* [ImagingSelection](imagingselection.html): Who the study is about 5732* [ImagingStudy](imagingstudy.html): Who the study is about 5733* [Immunization](immunization.html): The patient for the vaccination record 5734* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated 5735* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for 5736* [Invoice](invoice.html): Recipient(s) of goods and services 5737* [List](list.html): If all resources have the same subject 5738* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for 5739* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 5740* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 5741* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 5742* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. 5743* [MolecularSequence](molecularsequence.html): The subject that the sequence is about 5744* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. 5745* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement 5746* [Observation](observation.html): The subject that the observation is about (if patient) 5747* [Person](person.html): The Person links to this Patient 5748* [Procedure](procedure.html): Search by subject - a patient 5749* [Provenance](provenance.html): Where the activity involved patient data 5750* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response 5751* [RelatedPerson](relatedperson.html): The patient this related person is related to 5752* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations 5753* [ResearchSubject](researchsubject.html): Who or what is part of study 5754* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 5755* [ServiceRequest](servicerequest.html): Search by subject - a patient 5756* [Specimen](specimen.html): The patient the specimen comes from 5757* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 5758* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined 5759* [Task](task.html): Search by patient 5760* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 5761</b><br> 5762 * Type: <b>reference</b><br> 5763 * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br> 5764 * </p> 5765 */ 5766 @SearchParamDefinition(name="patient", path="Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient", description="Multiple Resources: \r\n\r\n* [Account](account.html): The entity that caused the expenses\r\n* [AdverseEvent](adverseevent.html): Subject impacted by event\r\n* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for\r\n* [Appointment](appointment.html): One of the individuals of the appointment is this patient\r\n* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient\r\n* [AuditEvent](auditevent.html): Where the activity involved patient data\r\n* [Basic](basic.html): Identifies the focus of this resource\r\n* [BodyStructure](bodystructure.html): Who this is about\r\n* [CarePlan](careplan.html): Who the care plan is for\r\n* [CareTeam](careteam.html): Who care team is for\r\n* [ChargeItem](chargeitem.html): Individual service was done for/to\r\n* [Claim](claim.html): Patient receiving the products or services\r\n* [ClaimResponse](claimresponse.html): The subject of care\r\n* [ClinicalImpression](clinicalimpression.html): Patient assessed\r\n* [Communication](communication.html): Focus of message\r\n* [CommunicationRequest](communicationrequest.html): Focus of message\r\n* [Composition](composition.html): Who and/or what the composition is about\r\n* [Condition](condition.html): Who has the condition?\r\n* [Consent](consent.html): Who the consent applies to\r\n* [Contract](contract.html): The identity of the subject of the contract (if a patient)\r\n* [Coverage](coverage.html): Retrieve coverages for a patient\r\n* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient\r\n* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient\r\n* [DetectedIssue](detectedissue.html): Associated patient\r\n* [DeviceRequest](devicerequest.html): Individual the service is ordered for\r\n* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device\r\n* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient\r\n* [DocumentReference](documentreference.html): Who/what is the subject of the document\r\n* [Encounter](encounter.html): The patient present at the encounter\r\n* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled\r\n* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care\r\n* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient\r\n* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for\r\n* [Flag](flag.html): The identity of a subject to list flags for\r\n* [Goal](goal.html): Who this goal is intended for\r\n* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results\r\n* [ImagingSelection](imagingselection.html): Who the study is about\r\n* [ImagingStudy](imagingstudy.html): Who the study is about\r\n* [Immunization](immunization.html): The patient for the vaccination record\r\n* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated\r\n* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for\r\n* [Invoice](invoice.html): Recipient(s) of goods and services\r\n* [List](list.html): If all resources have the same subject\r\n* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for\r\n* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for\r\n* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for\r\n* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient\r\n* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient.\r\n* [MolecularSequence](molecularsequence.html): The subject that the sequence is about\r\n* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient.\r\n* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement\r\n* [Observation](observation.html): The subject that the observation is about (if patient)\r\n* [Person](person.html): The Person links to this Patient\r\n* [Procedure](procedure.html): Search by subject - a patient\r\n* [Provenance](provenance.html): Where the activity involved patient data\r\n* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response\r\n* [RelatedPerson](relatedperson.html): The patient this related person is related to\r\n* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations\r\n* [ResearchSubject](researchsubject.html): Who or what is part of study\r\n* [RiskAssessment](riskassessment.html): Who/what does assessment apply to?\r\n* [ServiceRequest](servicerequest.html): Search by subject - a patient\r\n* [Specimen](specimen.html): The patient the specimen comes from\r\n* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied\r\n* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined\r\n* [Task](task.html): Search by patient\r\n* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for\r\n", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Base FHIR compartment definition for Patient") }, target={Patient.class } ) 5767 public static final String SP_PATIENT = "patient"; 5768 /** 5769 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 5770 * <p> 5771 * Description: <b>Multiple Resources: 5772 5773* [Account](account.html): The entity that caused the expenses 5774* [AdverseEvent](adverseevent.html): Subject impacted by event 5775* [AllergyIntolerance](allergyintolerance.html): Who the sensitivity is for 5776* [Appointment](appointment.html): One of the individuals of the appointment is this patient 5777* [AppointmentResponse](appointmentresponse.html): This Response is for this Patient 5778* [AuditEvent](auditevent.html): Where the activity involved patient data 5779* [Basic](basic.html): Identifies the focus of this resource 5780* [BodyStructure](bodystructure.html): Who this is about 5781* [CarePlan](careplan.html): Who the care plan is for 5782* [CareTeam](careteam.html): Who care team is for 5783* [ChargeItem](chargeitem.html): Individual service was done for/to 5784* [Claim](claim.html): Patient receiving the products or services 5785* [ClaimResponse](claimresponse.html): The subject of care 5786* [ClinicalImpression](clinicalimpression.html): Patient assessed 5787* [Communication](communication.html): Focus of message 5788* [CommunicationRequest](communicationrequest.html): Focus of message 5789* [Composition](composition.html): Who and/or what the composition is about 5790* [Condition](condition.html): Who has the condition? 5791* [Consent](consent.html): Who the consent applies to 5792* [Contract](contract.html): The identity of the subject of the contract (if a patient) 5793* [Coverage](coverage.html): Retrieve coverages for a patient 5794* [CoverageEligibilityRequest](coverageeligibilityrequest.html): The reference to the patient 5795* [CoverageEligibilityResponse](coverageeligibilityresponse.html): The reference to the patient 5796* [DetectedIssue](detectedissue.html): Associated patient 5797* [DeviceRequest](devicerequest.html): Individual the service is ordered for 5798* [DeviceUsage](deviceusage.html): Search by patient who used / uses the device 5799* [DiagnosticReport](diagnosticreport.html): The subject of the report if a patient 5800* [DocumentReference](documentreference.html): Who/what is the subject of the document 5801* [Encounter](encounter.html): The patient present at the encounter 5802* [EnrollmentRequest](enrollmentrequest.html): The party to be enrolled 5803* [EpisodeOfCare](episodeofcare.html): The patient who is the focus of this episode of care 5804* [ExplanationOfBenefit](explanationofbenefit.html): The reference to the patient 5805* [FamilyMemberHistory](familymemberhistory.html): The identity of a subject to list family member history items for 5806* [Flag](flag.html): The identity of a subject to list flags for 5807* [Goal](goal.html): Who this goal is intended for 5808* [GuidanceResponse](guidanceresponse.html): The identity of a patient to search for guidance response results 5809* [ImagingSelection](imagingselection.html): Who the study is about 5810* [ImagingStudy](imagingstudy.html): Who the study is about 5811* [Immunization](immunization.html): The patient for the vaccination record 5812* [ImmunizationEvaluation](immunizationevaluation.html): The patient being evaluated 5813* [ImmunizationRecommendation](immunizationrecommendation.html): Who this profile is for 5814* [Invoice](invoice.html): Recipient(s) of goods and services 5815* [List](list.html): If all resources have the same subject 5816* [MeasureReport](measurereport.html): The identity of a patient to search for individual measure report results for 5817* [MedicationAdministration](medicationadministration.html): The identity of a patient to list administrations for 5818* [MedicationDispense](medicationdispense.html): The identity of a patient to list dispenses for 5819* [MedicationRequest](medicationrequest.html): Returns prescriptions for a specific patient 5820* [MedicationStatement](medicationstatement.html): Returns statements for a specific patient. 5821* [MolecularSequence](molecularsequence.html): The subject that the sequence is about 5822* [NutritionIntake](nutritionintake.html): Returns statements for a specific patient. 5823* [NutritionOrder](nutritionorder.html): The identity of the individual or set of individuals who requires the diet, formula or nutritional supplement 5824* [Observation](observation.html): The subject that the observation is about (if patient) 5825* [Person](person.html): The Person links to this Patient 5826* [Procedure](procedure.html): Search by subject - a patient 5827* [Provenance](provenance.html): Where the activity involved patient data 5828* [QuestionnaireResponse](questionnaireresponse.html): The patient that is the subject of the questionnaire response 5829* [RelatedPerson](relatedperson.html): The patient this related person is related to 5830* [RequestOrchestration](requestorchestration.html): The identity of a patient to search for request orchestrations 5831* [ResearchSubject](researchsubject.html): Who or what is part of study 5832* [RiskAssessment](riskassessment.html): Who/what does assessment apply to? 5833* [ServiceRequest](servicerequest.html): Search by subject - a patient 5834* [Specimen](specimen.html): The patient the specimen comes from 5835* [SupplyDelivery](supplydelivery.html): Patient for whom the item is supplied 5836* [SupplyRequest](supplyrequest.html): The patient or subject for whom the supply is destined 5837* [Task](task.html): Search by patient 5838* [VisionPrescription](visionprescription.html): The identity of a patient to list dispenses for 5839</b><br> 5840 * Type: <b>reference</b><br> 5841 * Path: <b>Account.subject.where(resolve() is Patient) | AdverseEvent.subject.where(resolve() is Patient) | AllergyIntolerance.patient | Appointment.participant.actor.where(resolve() is Patient) | Appointment.subject.where(resolve() is Patient) | AppointmentResponse.actor.where(resolve() is Patient) | AuditEvent.patient | Basic.subject.where(resolve() is Patient) | BodyStructure.patient | CarePlan.subject.where(resolve() is Patient) | CareTeam.subject.where(resolve() is Patient) | ChargeItem.subject.where(resolve() is Patient) | Claim.patient | ClaimResponse.patient | ClinicalImpression.subject.where(resolve() is Patient) | Communication.subject.where(resolve() is Patient) | CommunicationRequest.subject.where(resolve() is Patient) | Composition.subject.where(resolve() is Patient) | Condition.subject.where(resolve() is Patient) | Consent.subject.where(resolve() is Patient) | Contract.subject.where(resolve() is Patient) | Coverage.beneficiary | CoverageEligibilityRequest.patient | CoverageEligibilityResponse.patient | DetectedIssue.subject.where(resolve() is Patient) | DeviceRequest.subject.where(resolve() is Patient) | DeviceUsage.patient | DiagnosticReport.subject.where(resolve() is Patient) | DocumentReference.subject.where(resolve() is Patient) | Encounter.subject.where(resolve() is Patient) | EnrollmentRequest.candidate | EpisodeOfCare.patient | ExplanationOfBenefit.patient | FamilyMemberHistory.patient | Flag.subject.where(resolve() is Patient) | Goal.subject.where(resolve() is Patient) | GuidanceResponse.subject.where(resolve() is Patient) | ImagingSelection.subject.where(resolve() is Patient) | ImagingStudy.subject.where(resolve() is Patient) | Immunization.patient | ImmunizationEvaluation.patient | ImmunizationRecommendation.patient | Invoice.subject.where(resolve() is Patient) | List.subject.where(resolve() is Patient) | MeasureReport.subject.where(resolve() is Patient) | MedicationAdministration.subject.where(resolve() is Patient) | MedicationDispense.subject.where(resolve() is Patient) | MedicationRequest.subject.where(resolve() is Patient) | MedicationStatement.subject.where(resolve() is Patient) | MolecularSequence.subject.where(resolve() is Patient) | NutritionIntake.subject.where(resolve() is Patient) | NutritionOrder.subject.where(resolve() is Patient) | Observation.subject.where(resolve() is Patient) | Person.link.target.where(resolve() is Patient) | Procedure.subject.where(resolve() is Patient) | Provenance.patient | QuestionnaireResponse.subject.where(resolve() is Patient) | RelatedPerson.patient | RequestOrchestration.subject.where(resolve() is Patient) | ResearchSubject.subject.where(resolve() is Patient) | RiskAssessment.subject.where(resolve() is Patient) | ServiceRequest.subject.where(resolve() is Patient) | Specimen.subject.where(resolve() is Patient) | SupplyDelivery.patient | SupplyRequest.deliverFor | Task.for.where(resolve() is Patient) | VisionPrescription.patient</b><br> 5842 * </p> 5843 */ 5844 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 5845 5846/** 5847 * Constant for fluent queries to be used to add include statements. Specifies 5848 * the path value of "<b>NutritionOrder:patient</b>". 5849 */ 5850 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("NutritionOrder:patient").toLocked(); 5851 5852 5853} 5854