![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.Block; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.ResourceDef; 045import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 046 047/** 048 * A list is a curated collection of resources. 049 */ 050@ResourceDef(name = "List", profile = "http://hl7.org/fhir/StructureDefinition/List") 051public class ListResource extends DomainResource { 052 053 public enum ListStatus { 054 /** 055 * The list is considered to be an active part of the patient's record. 056 */ 057 CURRENT, 058 /** 059 * The list is "old" and should no longer be considered accurate or relevant. 060 */ 061 RETIRED, 062 /** 063 * The list was never accurate. It is retained for medico-legal purposes only. 064 */ 065 ENTEREDINERROR, 066 /** 067 * added to help the parsers with the generic types 068 */ 069 NULL; 070 071 public static ListStatus fromCode(String codeString) throws FHIRException { 072 if (codeString == null || "".equals(codeString)) 073 return null; 074 if ("current".equals(codeString)) 075 return CURRENT; 076 if ("retired".equals(codeString)) 077 return RETIRED; 078 if ("entered-in-error".equals(codeString)) 079 return ENTEREDINERROR; 080 if (Configuration.isAcceptInvalidEnums()) 081 return null; 082 else 083 throw new FHIRException("Unknown ListStatus code '" + codeString + "'"); 084 } 085 086 public String toCode() { 087 switch (this) { 088 case CURRENT: 089 return "current"; 090 case RETIRED: 091 return "retired"; 092 case ENTEREDINERROR: 093 return "entered-in-error"; 094 case NULL: 095 return null; 096 default: 097 return "?"; 098 } 099 } 100 101 public String getSystem() { 102 switch (this) { 103 case CURRENT: 104 return "http://hl7.org/fhir/list-status"; 105 case RETIRED: 106 return "http://hl7.org/fhir/list-status"; 107 case ENTEREDINERROR: 108 return "http://hl7.org/fhir/list-status"; 109 case NULL: 110 return null; 111 default: 112 return "?"; 113 } 114 } 115 116 public String getDefinition() { 117 switch (this) { 118 case CURRENT: 119 return "The list is considered to be an active part of the patient's record."; 120 case RETIRED: 121 return "The list is \"old\" and should no longer be considered accurate or relevant."; 122 case ENTEREDINERROR: 123 return "The list was never accurate. It is retained for medico-legal purposes only."; 124 case NULL: 125 return null; 126 default: 127 return "?"; 128 } 129 } 130 131 public String getDisplay() { 132 switch (this) { 133 case CURRENT: 134 return "Current"; 135 case RETIRED: 136 return "Retired"; 137 case ENTEREDINERROR: 138 return "Entered In Error"; 139 case NULL: 140 return null; 141 default: 142 return "?"; 143 } 144 } 145 } 146 147 public static class ListStatusEnumFactory implements EnumFactory<ListStatus> { 148 public ListStatus fromCode(String codeString) throws IllegalArgumentException { 149 if (codeString == null || "".equals(codeString)) 150 if (codeString == null || "".equals(codeString)) 151 return null; 152 if ("current".equals(codeString)) 153 return ListStatus.CURRENT; 154 if ("retired".equals(codeString)) 155 return ListStatus.RETIRED; 156 if ("entered-in-error".equals(codeString)) 157 return ListStatus.ENTEREDINERROR; 158 throw new IllegalArgumentException("Unknown ListStatus code '" + codeString + "'"); 159 } 160 161 public Enumeration<ListStatus> fromType(PrimitiveType<?> code) throws FHIRException { 162 if (code == null) 163 return null; 164 if (code.isEmpty()) 165 return new Enumeration<ListStatus>(this, ListStatus.NULL, code); 166 String codeString = code.asStringValue(); 167 if (codeString == null || "".equals(codeString)) 168 return new Enumeration<ListStatus>(this, ListStatus.NULL, code); 169 if ("current".equals(codeString)) 170 return new Enumeration<ListStatus>(this, ListStatus.CURRENT, code); 171 if ("retired".equals(codeString)) 172 return new Enumeration<ListStatus>(this, ListStatus.RETIRED, code); 173 if ("entered-in-error".equals(codeString)) 174 return new Enumeration<ListStatus>(this, ListStatus.ENTEREDINERROR, code); 175 throw new FHIRException("Unknown ListStatus code '" + codeString + "'"); 176 } 177 178 public String toCode(ListStatus code) { 179 if (code == ListStatus.CURRENT) 180 return "current"; 181 if (code == ListStatus.RETIRED) 182 return "retired"; 183 if (code == ListStatus.ENTEREDINERROR) 184 return "entered-in-error"; 185 return "?"; 186 } 187 188 public String toSystem(ListStatus code) { 189 return code.getSystem(); 190 } 191 } 192 193 public enum ListMode { 194 /** 195 * This list is the master list, maintained in an ongoing fashion with regular 196 * updates as the real world list it is tracking changes. 197 */ 198 WORKING, 199 /** 200 * This list was prepared as a snapshot. It should not be assumed to be current. 201 */ 202 SNAPSHOT, 203 /** 204 * A point-in-time list that shows what changes have been made or recommended. 205 * E.g. a discharge medication list showing what was added and removed during an 206 * encounter. 207 */ 208 CHANGES, 209 /** 210 * added to help the parsers with the generic types 211 */ 212 NULL; 213 214 public static ListMode fromCode(String codeString) throws FHIRException { 215 if (codeString == null || "".equals(codeString)) 216 return null; 217 if ("working".equals(codeString)) 218 return WORKING; 219 if ("snapshot".equals(codeString)) 220 return SNAPSHOT; 221 if ("changes".equals(codeString)) 222 return CHANGES; 223 if (Configuration.isAcceptInvalidEnums()) 224 return null; 225 else 226 throw new FHIRException("Unknown ListMode code '" + codeString + "'"); 227 } 228 229 public String toCode() { 230 switch (this) { 231 case WORKING: 232 return "working"; 233 case SNAPSHOT: 234 return "snapshot"; 235 case CHANGES: 236 return "changes"; 237 case NULL: 238 return null; 239 default: 240 return "?"; 241 } 242 } 243 244 public String getSystem() { 245 switch (this) { 246 case WORKING: 247 return "http://hl7.org/fhir/list-mode"; 248 case SNAPSHOT: 249 return "http://hl7.org/fhir/list-mode"; 250 case CHANGES: 251 return "http://hl7.org/fhir/list-mode"; 252 case NULL: 253 return null; 254 default: 255 return "?"; 256 } 257 } 258 259 public String getDefinition() { 260 switch (this) { 261 case WORKING: 262 return "This list is the master list, maintained in an ongoing fashion with regular updates as the real world list it is tracking changes."; 263 case SNAPSHOT: 264 return "This list was prepared as a snapshot. It should not be assumed to be current."; 265 case CHANGES: 266 return "A point-in-time list that shows what changes have been made or recommended. E.g. a discharge medication list showing what was added and removed during an encounter."; 267 case NULL: 268 return null; 269 default: 270 return "?"; 271 } 272 } 273 274 public String getDisplay() { 275 switch (this) { 276 case WORKING: 277 return "Working List"; 278 case SNAPSHOT: 279 return "Snapshot List"; 280 case CHANGES: 281 return "Change List"; 282 case NULL: 283 return null; 284 default: 285 return "?"; 286 } 287 } 288 } 289 290 public static class ListModeEnumFactory implements EnumFactory<ListMode> { 291 public ListMode fromCode(String codeString) throws IllegalArgumentException { 292 if (codeString == null || "".equals(codeString)) 293 if (codeString == null || "".equals(codeString)) 294 return null; 295 if ("working".equals(codeString)) 296 return ListMode.WORKING; 297 if ("snapshot".equals(codeString)) 298 return ListMode.SNAPSHOT; 299 if ("changes".equals(codeString)) 300 return ListMode.CHANGES; 301 throw new IllegalArgumentException("Unknown ListMode code '" + codeString + "'"); 302 } 303 304 public Enumeration<ListMode> fromType(PrimitiveType<?> code) throws FHIRException { 305 if (code == null) 306 return null; 307 if (code.isEmpty()) 308 return new Enumeration<ListMode>(this, ListMode.NULL, code); 309 String codeString = code.asStringValue(); 310 if (codeString == null || "".equals(codeString)) 311 return new Enumeration<ListMode>(this, ListMode.NULL, code); 312 if ("working".equals(codeString)) 313 return new Enumeration<ListMode>(this, ListMode.WORKING, code); 314 if ("snapshot".equals(codeString)) 315 return new Enumeration<ListMode>(this, ListMode.SNAPSHOT, code); 316 if ("changes".equals(codeString)) 317 return new Enumeration<ListMode>(this, ListMode.CHANGES, code); 318 throw new FHIRException("Unknown ListMode code '" + codeString + "'"); 319 } 320 321 public String toCode(ListMode code) { 322 if (code == ListMode.WORKING) 323 return "working"; 324 if (code == ListMode.SNAPSHOT) 325 return "snapshot"; 326 if (code == ListMode.CHANGES) 327 return "changes"; 328 return "?"; 329 } 330 331 public String toSystem(ListMode code) { 332 return code.getSystem(); 333 } 334 } 335 336 @Block() 337 public static class ListEntryComponent extends BackboneElement implements IBaseBackboneElement { 338 /** 339 * The flag allows the system constructing the list to indicate the role and 340 * significance of the item in the list. 341 */ 342 @Child(name = "flag", type = { 343 CodeableConcept.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 344 @Description(shortDefinition = "Status/Workflow information about this item", formalDefinition = "The flag allows the system constructing the list to indicate the role and significance of the item in the list.") 345 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-item-flag") 346 protected CodeableConcept flag; 347 348 /** 349 * True if this item is marked as deleted in the list. 350 */ 351 @Child(name = "deleted", type = { 352 BooleanType.class }, order = 2, min = 0, max = 1, modifier = true, summary = false) 353 @Description(shortDefinition = "If this item is actually marked as deleted", formalDefinition = "True if this item is marked as deleted in the list.") 354 protected BooleanType deleted; 355 356 /** 357 * When this item was added to the list. 358 */ 359 @Child(name = "date", type = { DateTimeType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 360 @Description(shortDefinition = "When item added to list", formalDefinition = "When this item was added to the list.") 361 protected DateTimeType date; 362 363 /** 364 * A reference to the actual resource from which data was derived. 365 */ 366 @Child(name = "item", type = { Reference.class }, order = 4, min = 1, max = 1, modifier = false, summary = false) 367 @Description(shortDefinition = "Actual entry", formalDefinition = "A reference to the actual resource from which data was derived.") 368 protected Reference item; 369 370 /** 371 * The actual object that is the target of the reference (A reference to the 372 * actual resource from which data was derived.) 373 */ 374 protected Resource itemTarget; 375 376 private static final long serialVersionUID = -758164425L; 377 378 /** 379 * Constructor 380 */ 381 public ListEntryComponent() { 382 super(); 383 } 384 385 /** 386 * Constructor 387 */ 388 public ListEntryComponent(Reference item) { 389 super(); 390 this.item = item; 391 } 392 393 /** 394 * @return {@link #flag} (The flag allows the system constructing the list to 395 * indicate the role and significance of the item in the list.) 396 */ 397 public CodeableConcept getFlag() { 398 if (this.flag == null) 399 if (Configuration.errorOnAutoCreate()) 400 throw new Error("Attempt to auto-create ListEntryComponent.flag"); 401 else if (Configuration.doAutoCreate()) 402 this.flag = new CodeableConcept(); // cc 403 return this.flag; 404 } 405 406 public boolean hasFlag() { 407 return this.flag != null && !this.flag.isEmpty(); 408 } 409 410 /** 411 * @param value {@link #flag} (The flag allows the system constructing the list 412 * to indicate the role and significance of the item in the list.) 413 */ 414 public ListEntryComponent setFlag(CodeableConcept value) { 415 this.flag = value; 416 return this; 417 } 418 419 /** 420 * @return {@link #deleted} (True if this item is marked as deleted in the 421 * list.). This is the underlying object with id, value and extensions. 422 * The accessor "getDeleted" gives direct access to the value 423 */ 424 public BooleanType getDeletedElement() { 425 if (this.deleted == null) 426 if (Configuration.errorOnAutoCreate()) 427 throw new Error("Attempt to auto-create ListEntryComponent.deleted"); 428 else if (Configuration.doAutoCreate()) 429 this.deleted = new BooleanType(); // bb 430 return this.deleted; 431 } 432 433 public boolean hasDeletedElement() { 434 return this.deleted != null && !this.deleted.isEmpty(); 435 } 436 437 public boolean hasDeleted() { 438 return this.deleted != null && !this.deleted.isEmpty(); 439 } 440 441 /** 442 * @param value {@link #deleted} (True if this item is marked as deleted in the 443 * list.). This is the underlying object with id, value and 444 * extensions. The accessor "getDeleted" gives direct access to the 445 * value 446 */ 447 public ListEntryComponent setDeletedElement(BooleanType value) { 448 this.deleted = value; 449 return this; 450 } 451 452 /** 453 * @return True if this item is marked as deleted in the list. 454 */ 455 public boolean getDeleted() { 456 return this.deleted == null || this.deleted.isEmpty() ? false : this.deleted.getValue(); 457 } 458 459 /** 460 * @param value True if this item is marked as deleted in the list. 461 */ 462 public ListEntryComponent setDeleted(boolean value) { 463 if (this.deleted == null) 464 this.deleted = new BooleanType(); 465 this.deleted.setValue(value); 466 return this; 467 } 468 469 /** 470 * @return {@link #date} (When this item was added to the list.). This is the 471 * underlying object with id, value and extensions. The accessor 472 * "getDate" gives direct access to the value 473 */ 474 public DateTimeType getDateElement() { 475 if (this.date == null) 476 if (Configuration.errorOnAutoCreate()) 477 throw new Error("Attempt to auto-create ListEntryComponent.date"); 478 else if (Configuration.doAutoCreate()) 479 this.date = new DateTimeType(); // bb 480 return this.date; 481 } 482 483 public boolean hasDateElement() { 484 return this.date != null && !this.date.isEmpty(); 485 } 486 487 public boolean hasDate() { 488 return this.date != null && !this.date.isEmpty(); 489 } 490 491 /** 492 * @param value {@link #date} (When this item was added to the list.). This is 493 * the underlying object with id, value and extensions. The 494 * accessor "getDate" gives direct access to the value 495 */ 496 public ListEntryComponent setDateElement(DateTimeType value) { 497 this.date = value; 498 return this; 499 } 500 501 /** 502 * @return When this item was added to the list. 503 */ 504 public Date getDate() { 505 return this.date == null ? null : this.date.getValue(); 506 } 507 508 /** 509 * @param value When this item was added to the list. 510 */ 511 public ListEntryComponent setDate(Date value) { 512 if (value == null) 513 this.date = null; 514 else { 515 if (this.date == null) 516 this.date = new DateTimeType(); 517 this.date.setValue(value); 518 } 519 return this; 520 } 521 522 /** 523 * @return {@link #item} (A reference to the actual resource from which data was 524 * derived.) 525 */ 526 public Reference getItem() { 527 if (this.item == null) 528 if (Configuration.errorOnAutoCreate()) 529 throw new Error("Attempt to auto-create ListEntryComponent.item"); 530 else if (Configuration.doAutoCreate()) 531 this.item = new Reference(); // cc 532 return this.item; 533 } 534 535 public boolean hasItem() { 536 return this.item != null && !this.item.isEmpty(); 537 } 538 539 /** 540 * @param value {@link #item} (A reference to the actual resource from which 541 * data was derived.) 542 */ 543 public ListEntryComponent setItem(Reference value) { 544 this.item = value; 545 return this; 546 } 547 548 /** 549 * @return {@link #item} The actual object that is the target of the reference. 550 * The reference library doesn't populate this, but you can use it to 551 * hold the resource if you resolve it. (A reference to the actual 552 * resource from which data was derived.) 553 */ 554 public Resource getItemTarget() { 555 return this.itemTarget; 556 } 557 558 /** 559 * @param value {@link #item} The actual object that is the target of the 560 * reference. The reference library doesn't use these, but you can 561 * use it to hold the resource if you resolve it. (A reference to 562 * the actual resource from which data was derived.) 563 */ 564 public ListEntryComponent setItemTarget(Resource value) { 565 this.itemTarget = value; 566 return this; 567 } 568 569 protected void listChildren(List<Property> children) { 570 super.listChildren(children); 571 children.add(new Property("flag", "CodeableConcept", 572 "The flag allows the system constructing the list to indicate the role and significance of the item in the list.", 573 0, 1, flag)); 574 children.add( 575 new Property("deleted", "boolean", "True if this item is marked as deleted in the list.", 0, 1, deleted)); 576 children.add(new Property("date", "dateTime", "When this item was added to the list.", 0, 1, date)); 577 children.add(new Property("item", "Reference(Any)", 578 "A reference to the actual resource from which data was derived.", 0, 1, item)); 579 } 580 581 @Override 582 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 583 switch (_hash) { 584 case 3145580: 585 /* flag */ return new Property("flag", "CodeableConcept", 586 "The flag allows the system constructing the list to indicate the role and significance of the item in the list.", 587 0, 1, flag); 588 case 1550463001: 589 /* deleted */ return new Property("deleted", "boolean", "True if this item is marked as deleted in the list.", 590 0, 1, deleted); 591 case 3076014: 592 /* date */ return new Property("date", "dateTime", "When this item was added to the list.", 0, 1, date); 593 case 3242771: 594 /* item */ return new Property("item", "Reference(Any)", 595 "A reference to the actual resource from which data was derived.", 0, 1, item); 596 default: 597 return super.getNamedProperty(_hash, _name, _checkValid); 598 } 599 600 } 601 602 @Override 603 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 604 switch (hash) { 605 case 3145580: 606 /* flag */ return this.flag == null ? new Base[0] : new Base[] { this.flag }; // CodeableConcept 607 case 1550463001: 608 /* deleted */ return this.deleted == null ? new Base[0] : new Base[] { this.deleted }; // BooleanType 609 case 3076014: 610 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType 611 case 3242771: 612 /* item */ return this.item == null ? new Base[0] : new Base[] { this.item }; // Reference 613 default: 614 return super.getProperty(hash, name, checkValid); 615 } 616 617 } 618 619 @Override 620 public Base setProperty(int hash, String name, Base value) throws FHIRException { 621 switch (hash) { 622 case 3145580: // flag 623 this.flag = castToCodeableConcept(value); // CodeableConcept 624 return value; 625 case 1550463001: // deleted 626 this.deleted = castToBoolean(value); // BooleanType 627 return value; 628 case 3076014: // date 629 this.date = castToDateTime(value); // DateTimeType 630 return value; 631 case 3242771: // item 632 this.item = castToReference(value); // Reference 633 return value; 634 default: 635 return super.setProperty(hash, name, value); 636 } 637 638 } 639 640 @Override 641 public Base setProperty(String name, Base value) throws FHIRException { 642 if (name.equals("flag")) { 643 this.flag = castToCodeableConcept(value); // CodeableConcept 644 } else if (name.equals("deleted")) { 645 this.deleted = castToBoolean(value); // BooleanType 646 } else if (name.equals("date")) { 647 this.date = castToDateTime(value); // DateTimeType 648 } else if (name.equals("item")) { 649 this.item = castToReference(value); // Reference 650 } else 651 return super.setProperty(name, value); 652 return value; 653 } 654 655 @Override 656 public void removeChild(String name, Base value) throws FHIRException { 657 if (name.equals("flag")) { 658 this.flag = null; 659 } else if (name.equals("deleted")) { 660 this.deleted = null; 661 } else if (name.equals("date")) { 662 this.date = null; 663 } else if (name.equals("item")) { 664 this.item = null; 665 } else 666 super.removeChild(name, value); 667 668 } 669 670 @Override 671 public Base makeProperty(int hash, String name) throws FHIRException { 672 switch (hash) { 673 case 3145580: 674 return getFlag(); 675 case 1550463001: 676 return getDeletedElement(); 677 case 3076014: 678 return getDateElement(); 679 case 3242771: 680 return getItem(); 681 default: 682 return super.makeProperty(hash, name); 683 } 684 685 } 686 687 @Override 688 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 689 switch (hash) { 690 case 3145580: 691 /* flag */ return new String[] { "CodeableConcept" }; 692 case 1550463001: 693 /* deleted */ return new String[] { "boolean" }; 694 case 3076014: 695 /* date */ return new String[] { "dateTime" }; 696 case 3242771: 697 /* item */ return new String[] { "Reference" }; 698 default: 699 return super.getTypesForProperty(hash, name); 700 } 701 702 } 703 704 @Override 705 public Base addChild(String name) throws FHIRException { 706 if (name.equals("flag")) { 707 this.flag = new CodeableConcept(); 708 return this.flag; 709 } else if (name.equals("deleted")) { 710 throw new FHIRException("Cannot call addChild on a singleton property List.deleted"); 711 } else if (name.equals("date")) { 712 throw new FHIRException("Cannot call addChild on a singleton property List.date"); 713 } else if (name.equals("item")) { 714 this.item = new Reference(); 715 return this.item; 716 } else 717 return super.addChild(name); 718 } 719 720 public ListEntryComponent copy() { 721 ListEntryComponent dst = new ListEntryComponent(); 722 copyValues(dst); 723 return dst; 724 } 725 726 public void copyValues(ListEntryComponent dst) { 727 super.copyValues(dst); 728 dst.flag = flag == null ? null : flag.copy(); 729 dst.deleted = deleted == null ? null : deleted.copy(); 730 dst.date = date == null ? null : date.copy(); 731 dst.item = item == null ? null : item.copy(); 732 } 733 734 @Override 735 public boolean equalsDeep(Base other_) { 736 if (!super.equalsDeep(other_)) 737 return false; 738 if (!(other_ instanceof ListEntryComponent)) 739 return false; 740 ListEntryComponent o = (ListEntryComponent) other_; 741 return compareDeep(flag, o.flag, true) && compareDeep(deleted, o.deleted, true) && compareDeep(date, o.date, true) 742 && compareDeep(item, o.item, true); 743 } 744 745 @Override 746 public boolean equalsShallow(Base other_) { 747 if (!super.equalsShallow(other_)) 748 return false; 749 if (!(other_ instanceof ListEntryComponent)) 750 return false; 751 ListEntryComponent o = (ListEntryComponent) other_; 752 return compareValues(deleted, o.deleted, true) && compareValues(date, o.date, true); 753 } 754 755 public boolean isEmpty() { 756 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(flag, deleted, date, item); 757 } 758 759 public String fhirType() { 760 return "List.entry"; 761 762 } 763 764 } 765 766 /** 767 * Identifier for the List assigned for business purposes outside the context of 768 * FHIR. 769 */ 770 @Child(name = "identifier", type = { 771 Identifier.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 772 @Description(shortDefinition = "Business identifier", formalDefinition = "Identifier for the List assigned for business purposes outside the context of FHIR.") 773 protected List<Identifier> identifier; 774 775 /** 776 * Indicates the current state of this list. 777 */ 778 @Child(name = "status", type = { CodeType.class }, order = 1, min = 1, max = 1, modifier = true, summary = true) 779 @Description(shortDefinition = "current | retired | entered-in-error", formalDefinition = "Indicates the current state of this list.") 780 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-status") 781 protected Enumeration<ListStatus> status; 782 783 /** 784 * How this list was prepared - whether it is a working list that is suitable 785 * for being maintained on an ongoing basis, or if it represents a snapshot of a 786 * list of items from another source, or whether it is a prepared list where 787 * items may be marked as added, modified or deleted. 788 */ 789 @Child(name = "mode", type = { CodeType.class }, order = 2, min = 1, max = 1, modifier = true, summary = true) 790 @Description(shortDefinition = "working | snapshot | changes", formalDefinition = "How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.") 791 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-mode") 792 protected Enumeration<ListMode> mode; 793 794 /** 795 * A label for the list assigned by the author. 796 */ 797 @Child(name = "title", type = { StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 798 @Description(shortDefinition = "Descriptive name for the list", formalDefinition = "A label for the list assigned by the author.") 799 protected StringType title; 800 801 /** 802 * This code defines the purpose of the list - why it was created. 803 */ 804 @Child(name = "code", type = { CodeableConcept.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 805 @Description(shortDefinition = "What the purpose of this list is", formalDefinition = "This code defines the purpose of the list - why it was created.") 806 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-example-codes") 807 protected CodeableConcept code; 808 809 /** 810 * The common subject (or patient) of the resources that are in the list if 811 * there is one. 812 */ 813 @Child(name = "subject", type = { Patient.class, Group.class, Device.class, 814 Location.class }, order = 5, min = 0, max = 1, modifier = false, summary = true) 815 @Description(shortDefinition = "If all resources have the same subject", formalDefinition = "The common subject (or patient) of the resources that are in the list if there is one.") 816 protected Reference subject; 817 818 /** 819 * The actual object that is the target of the reference (The common subject (or 820 * patient) of the resources that are in the list if there is one.) 821 */ 822 protected Resource subjectTarget; 823 824 /** 825 * The encounter that is the context in which this list was created. 826 */ 827 @Child(name = "encounter", type = { Encounter.class }, order = 6, min = 0, max = 1, modifier = false, summary = false) 828 @Description(shortDefinition = "Context in which list created", formalDefinition = "The encounter that is the context in which this list was created.") 829 protected Reference encounter; 830 831 /** 832 * The actual object that is the target of the reference (The encounter that is 833 * the context in which this list was created.) 834 */ 835 protected Encounter encounterTarget; 836 837 /** 838 * The date that the list was prepared. 839 */ 840 @Child(name = "date", type = { DateTimeType.class }, order = 7, min = 0, max = 1, modifier = false, summary = true) 841 @Description(shortDefinition = "When the list was prepared", formalDefinition = "The date that the list was prepared.") 842 protected DateTimeType date; 843 844 /** 845 * The entity responsible for deciding what the contents of the list were. Where 846 * the list was created by a human, this is the same as the author of the list. 847 */ 848 @Child(name = "source", type = { Practitioner.class, PractitionerRole.class, Patient.class, 849 Device.class }, order = 8, min = 0, max = 1, modifier = false, summary = true) 850 @Description(shortDefinition = "Who and/or what defined the list contents (aka Author)", formalDefinition = "The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.") 851 protected Reference source; 852 853 /** 854 * The actual object that is the target of the reference (The entity responsible 855 * for deciding what the contents of the list were. Where the list was created 856 * by a human, this is the same as the author of the list.) 857 */ 858 protected Resource sourceTarget; 859 860 /** 861 * What order applies to the items in the list. 862 */ 863 @Child(name = "orderedBy", type = { 864 CodeableConcept.class }, order = 9, min = 0, max = 1, modifier = false, summary = false) 865 @Description(shortDefinition = "What order the list has", formalDefinition = "What order applies to the items in the list.") 866 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-order") 867 protected CodeableConcept orderedBy; 868 869 /** 870 * Comments that apply to the overall list. 871 */ 872 @Child(name = "note", type = { 873 Annotation.class }, order = 10, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 874 @Description(shortDefinition = "Comments about the list", formalDefinition = "Comments that apply to the overall list.") 875 protected List<Annotation> note; 876 877 /** 878 * Entries in this list. 879 */ 880 @Child(name = "entry", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 881 @Description(shortDefinition = "Entries in the list", formalDefinition = "Entries in this list.") 882 protected List<ListEntryComponent> entry; 883 884 /** 885 * If the list is empty, why the list is empty. 886 */ 887 @Child(name = "emptyReason", type = { 888 CodeableConcept.class }, order = 12, min = 0, max = 1, modifier = false, summary = false) 889 @Description(shortDefinition = "Why list is empty", formalDefinition = "If the list is empty, why the list is empty.") 890 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/list-empty-reason") 891 protected CodeableConcept emptyReason; 892 893 private static final long serialVersionUID = 2071342704L; 894 895 /** 896 * Constructor 897 */ 898 public ListResource() { 899 super(); 900 } 901 902 /** 903 * Constructor 904 */ 905 public ListResource(Enumeration<ListStatus> status, Enumeration<ListMode> mode) { 906 super(); 907 this.status = status; 908 this.mode = mode; 909 } 910 911 /** 912 * @return {@link #identifier} (Identifier for the List assigned for business 913 * purposes outside the context of FHIR.) 914 */ 915 public List<Identifier> getIdentifier() { 916 if (this.identifier == null) 917 this.identifier = new ArrayList<Identifier>(); 918 return this.identifier; 919 } 920 921 /** 922 * @return Returns a reference to <code>this</code> for easy method chaining 923 */ 924 public ListResource setIdentifier(List<Identifier> theIdentifier) { 925 this.identifier = theIdentifier; 926 return this; 927 } 928 929 public boolean hasIdentifier() { 930 if (this.identifier == null) 931 return false; 932 for (Identifier item : this.identifier) 933 if (!item.isEmpty()) 934 return true; 935 return false; 936 } 937 938 public Identifier addIdentifier() { // 3 939 Identifier t = new Identifier(); 940 if (this.identifier == null) 941 this.identifier = new ArrayList<Identifier>(); 942 this.identifier.add(t); 943 return t; 944 } 945 946 public ListResource addIdentifier(Identifier t) { // 3 947 if (t == null) 948 return this; 949 if (this.identifier == null) 950 this.identifier = new ArrayList<Identifier>(); 951 this.identifier.add(t); 952 return this; 953 } 954 955 /** 956 * @return The first repetition of repeating field {@link #identifier}, creating 957 * it if it does not already exist 958 */ 959 public Identifier getIdentifierFirstRep() { 960 if (getIdentifier().isEmpty()) { 961 addIdentifier(); 962 } 963 return getIdentifier().get(0); 964 } 965 966 /** 967 * @return {@link #status} (Indicates the current state of this list.). This is 968 * the underlying object with id, value and extensions. The accessor 969 * "getStatus" gives direct access to the value 970 */ 971 public Enumeration<ListStatus> getStatusElement() { 972 if (this.status == null) 973 if (Configuration.errorOnAutoCreate()) 974 throw new Error("Attempt to auto-create List.status"); 975 else if (Configuration.doAutoCreate()) 976 this.status = new Enumeration<ListStatus>(new ListStatusEnumFactory()); // bb 977 return this.status; 978 } 979 980 public boolean hasStatusElement() { 981 return this.status != null && !this.status.isEmpty(); 982 } 983 984 public boolean hasStatus() { 985 return this.status != null && !this.status.isEmpty(); 986 } 987 988 /** 989 * @param value {@link #status} (Indicates the current state of this list.). 990 * This is the underlying object with id, value and extensions. The 991 * accessor "getStatus" gives direct access to the value 992 */ 993 public ListResource setStatusElement(Enumeration<ListStatus> value) { 994 this.status = value; 995 return this; 996 } 997 998 /** 999 * @return Indicates the current state of this list. 1000 */ 1001 public ListStatus getStatus() { 1002 return this.status == null ? null : this.status.getValue(); 1003 } 1004 1005 /** 1006 * @param value Indicates the current state of this list. 1007 */ 1008 public ListResource setStatus(ListStatus value) { 1009 if (this.status == null) 1010 this.status = new Enumeration<ListStatus>(new ListStatusEnumFactory()); 1011 this.status.setValue(value); 1012 return this; 1013 } 1014 1015 /** 1016 * @return {@link #mode} (How this list was prepared - whether it is a working 1017 * list that is suitable for being maintained on an ongoing basis, or if 1018 * it represents a snapshot of a list of items from another source, or 1019 * whether it is a prepared list where items may be marked as added, 1020 * modified or deleted.). This is the underlying object with id, value 1021 * and extensions. The accessor "getMode" gives direct access to the 1022 * value 1023 */ 1024 public Enumeration<ListMode> getModeElement() { 1025 if (this.mode == null) 1026 if (Configuration.errorOnAutoCreate()) 1027 throw new Error("Attempt to auto-create List.mode"); 1028 else if (Configuration.doAutoCreate()) 1029 this.mode = new Enumeration<ListMode>(new ListModeEnumFactory()); // bb 1030 return this.mode; 1031 } 1032 1033 public boolean hasModeElement() { 1034 return this.mode != null && !this.mode.isEmpty(); 1035 } 1036 1037 public boolean hasMode() { 1038 return this.mode != null && !this.mode.isEmpty(); 1039 } 1040 1041 /** 1042 * @param value {@link #mode} (How this list was prepared - whether it is a 1043 * working list that is suitable for being maintained on an ongoing 1044 * basis, or if it represents a snapshot of a list of items from 1045 * another source, or whether it is a prepared list where items may 1046 * be marked as added, modified or deleted.). This is the 1047 * underlying object with id, value and extensions. The accessor 1048 * "getMode" gives direct access to the value 1049 */ 1050 public ListResource setModeElement(Enumeration<ListMode> value) { 1051 this.mode = value; 1052 return this; 1053 } 1054 1055 /** 1056 * @return How this list was prepared - whether it is a working list that is 1057 * suitable for being maintained on an ongoing basis, or if it 1058 * represents a snapshot of a list of items from another source, or 1059 * whether it is a prepared list where items may be marked as added, 1060 * modified or deleted. 1061 */ 1062 public ListMode getMode() { 1063 return this.mode == null ? null : this.mode.getValue(); 1064 } 1065 1066 /** 1067 * @param value How this list was prepared - whether it is a working list that 1068 * is suitable for being maintained on an ongoing basis, or if it 1069 * represents a snapshot of a list of items from another source, or 1070 * whether it is a prepared list where items may be marked as 1071 * added, modified or deleted. 1072 */ 1073 public ListResource setMode(ListMode value) { 1074 if (this.mode == null) 1075 this.mode = new Enumeration<ListMode>(new ListModeEnumFactory()); 1076 this.mode.setValue(value); 1077 return this; 1078 } 1079 1080 /** 1081 * @return {@link #title} (A label for the list assigned by the author.). This 1082 * is the underlying object with id, value and extensions. The accessor 1083 * "getTitle" gives direct access to the value 1084 */ 1085 public StringType getTitleElement() { 1086 if (this.title == null) 1087 if (Configuration.errorOnAutoCreate()) 1088 throw new Error("Attempt to auto-create List.title"); 1089 else if (Configuration.doAutoCreate()) 1090 this.title = new StringType(); // bb 1091 return this.title; 1092 } 1093 1094 public boolean hasTitleElement() { 1095 return this.title != null && !this.title.isEmpty(); 1096 } 1097 1098 public boolean hasTitle() { 1099 return this.title != null && !this.title.isEmpty(); 1100 } 1101 1102 /** 1103 * @param value {@link #title} (A label for the list assigned by the author.). 1104 * This is the underlying object with id, value and extensions. The 1105 * accessor "getTitle" gives direct access to the value 1106 */ 1107 public ListResource setTitleElement(StringType value) { 1108 this.title = value; 1109 return this; 1110 } 1111 1112 /** 1113 * @return A label for the list assigned by the author. 1114 */ 1115 public String getTitle() { 1116 return this.title == null ? null : this.title.getValue(); 1117 } 1118 1119 /** 1120 * @param value A label for the list assigned by the author. 1121 */ 1122 public ListResource setTitle(String value) { 1123 if (Utilities.noString(value)) 1124 this.title = null; 1125 else { 1126 if (this.title == null) 1127 this.title = new StringType(); 1128 this.title.setValue(value); 1129 } 1130 return this; 1131 } 1132 1133 /** 1134 * @return {@link #code} (This code defines the purpose of the list - why it was 1135 * created.) 1136 */ 1137 public CodeableConcept getCode() { 1138 if (this.code == null) 1139 if (Configuration.errorOnAutoCreate()) 1140 throw new Error("Attempt to auto-create List.code"); 1141 else if (Configuration.doAutoCreate()) 1142 this.code = new CodeableConcept(); // cc 1143 return this.code; 1144 } 1145 1146 public boolean hasCode() { 1147 return this.code != null && !this.code.isEmpty(); 1148 } 1149 1150 /** 1151 * @param value {@link #code} (This code defines the purpose of the list - why 1152 * it was created.) 1153 */ 1154 public ListResource setCode(CodeableConcept value) { 1155 this.code = value; 1156 return this; 1157 } 1158 1159 /** 1160 * @return {@link #subject} (The common subject (or patient) of the resources 1161 * that are in the list if there is one.) 1162 */ 1163 public Reference getSubject() { 1164 if (this.subject == null) 1165 if (Configuration.errorOnAutoCreate()) 1166 throw new Error("Attempt to auto-create List.subject"); 1167 else if (Configuration.doAutoCreate()) 1168 this.subject = new Reference(); // cc 1169 return this.subject; 1170 } 1171 1172 public boolean hasSubject() { 1173 return this.subject != null && !this.subject.isEmpty(); 1174 } 1175 1176 /** 1177 * @param value {@link #subject} (The common subject (or patient) of the 1178 * resources that are in the list if there is one.) 1179 */ 1180 public ListResource setSubject(Reference value) { 1181 this.subject = value; 1182 return this; 1183 } 1184 1185 /** 1186 * @return {@link #subject} The actual object that is the target of the 1187 * reference. The reference library doesn't populate this, but you can 1188 * use it to hold the resource if you resolve it. (The common subject 1189 * (or patient) of the resources that are in the list if there is one.) 1190 */ 1191 public Resource getSubjectTarget() { 1192 return this.subjectTarget; 1193 } 1194 1195 /** 1196 * @param value {@link #subject} The actual object that is the target of the 1197 * reference. The reference library doesn't use these, but you can 1198 * use it to hold the resource if you resolve it. (The common 1199 * subject (or patient) of the resources that are in the list if 1200 * there is one.) 1201 */ 1202 public ListResource setSubjectTarget(Resource value) { 1203 this.subjectTarget = value; 1204 return this; 1205 } 1206 1207 /** 1208 * @return {@link #encounter} (The encounter that is the context in which this 1209 * list was created.) 1210 */ 1211 public Reference getEncounter() { 1212 if (this.encounter == null) 1213 if (Configuration.errorOnAutoCreate()) 1214 throw new Error("Attempt to auto-create List.encounter"); 1215 else if (Configuration.doAutoCreate()) 1216 this.encounter = new Reference(); // cc 1217 return this.encounter; 1218 } 1219 1220 public boolean hasEncounter() { 1221 return this.encounter != null && !this.encounter.isEmpty(); 1222 } 1223 1224 /** 1225 * @param value {@link #encounter} (The encounter that is the context in which 1226 * this list was created.) 1227 */ 1228 public ListResource setEncounter(Reference value) { 1229 this.encounter = value; 1230 return this; 1231 } 1232 1233 /** 1234 * @return {@link #encounter} The actual object that is the target of the 1235 * reference. The reference library doesn't populate this, but you can 1236 * use it to hold the resource if you resolve it. (The encounter that is 1237 * the context in which this list was created.) 1238 */ 1239 public Encounter getEncounterTarget() { 1240 if (this.encounterTarget == null) 1241 if (Configuration.errorOnAutoCreate()) 1242 throw new Error("Attempt to auto-create List.encounter"); 1243 else if (Configuration.doAutoCreate()) 1244 this.encounterTarget = new Encounter(); // aa 1245 return this.encounterTarget; 1246 } 1247 1248 /** 1249 * @param value {@link #encounter} The actual object that is the target of the 1250 * reference. The reference library doesn't use these, but you can 1251 * use it to hold the resource if you resolve it. (The encounter 1252 * that is the context in which this list was created.) 1253 */ 1254 public ListResource setEncounterTarget(Encounter value) { 1255 this.encounterTarget = value; 1256 return this; 1257 } 1258 1259 /** 1260 * @return {@link #date} (The date that the list was prepared.). This is the 1261 * underlying object with id, value and extensions. The accessor 1262 * "getDate" gives direct access to the value 1263 */ 1264 public DateTimeType getDateElement() { 1265 if (this.date == null) 1266 if (Configuration.errorOnAutoCreate()) 1267 throw new Error("Attempt to auto-create List.date"); 1268 else if (Configuration.doAutoCreate()) 1269 this.date = new DateTimeType(); // bb 1270 return this.date; 1271 } 1272 1273 public boolean hasDateElement() { 1274 return this.date != null && !this.date.isEmpty(); 1275 } 1276 1277 public boolean hasDate() { 1278 return this.date != null && !this.date.isEmpty(); 1279 } 1280 1281 /** 1282 * @param value {@link #date} (The date that the list was prepared.). This is 1283 * the underlying object with id, value and extensions. The 1284 * accessor "getDate" gives direct access to the value 1285 */ 1286 public ListResource setDateElement(DateTimeType value) { 1287 this.date = value; 1288 return this; 1289 } 1290 1291 /** 1292 * @return The date that the list was prepared. 1293 */ 1294 public Date getDate() { 1295 return this.date == null ? null : this.date.getValue(); 1296 } 1297 1298 /** 1299 * @param value The date that the list was prepared. 1300 */ 1301 public ListResource setDate(Date value) { 1302 if (value == null) 1303 this.date = null; 1304 else { 1305 if (this.date == null) 1306 this.date = new DateTimeType(); 1307 this.date.setValue(value); 1308 } 1309 return this; 1310 } 1311 1312 /** 1313 * @return {@link #source} (The entity responsible for deciding what the 1314 * contents of the list were. Where the list was created by a human, 1315 * this is the same as the author of the list.) 1316 */ 1317 public Reference getSource() { 1318 if (this.source == null) 1319 if (Configuration.errorOnAutoCreate()) 1320 throw new Error("Attempt to auto-create List.source"); 1321 else if (Configuration.doAutoCreate()) 1322 this.source = new Reference(); // cc 1323 return this.source; 1324 } 1325 1326 public boolean hasSource() { 1327 return this.source != null && !this.source.isEmpty(); 1328 } 1329 1330 /** 1331 * @param value {@link #source} (The entity responsible for deciding what the 1332 * contents of the list were. Where the list was created by a 1333 * human, this is the same as the author of the list.) 1334 */ 1335 public ListResource setSource(Reference value) { 1336 this.source = value; 1337 return this; 1338 } 1339 1340 /** 1341 * @return {@link #source} The actual object that is the target of the 1342 * reference. The reference library doesn't populate this, but you can 1343 * use it to hold the resource if you resolve it. (The entity 1344 * responsible for deciding what the contents of the list were. Where 1345 * the list was created by a human, this is the same as the author of 1346 * the list.) 1347 */ 1348 public Resource getSourceTarget() { 1349 return this.sourceTarget; 1350 } 1351 1352 /** 1353 * @param value {@link #source} The actual object that is the target of the 1354 * reference. The reference library doesn't use these, but you can 1355 * use it to hold the resource if you resolve it. (The entity 1356 * responsible for deciding what the contents of the list were. 1357 * Where the list was created by a human, this is the same as the 1358 * author of the list.) 1359 */ 1360 public ListResource setSourceTarget(Resource value) { 1361 this.sourceTarget = value; 1362 return this; 1363 } 1364 1365 /** 1366 * @return {@link #orderedBy} (What order applies to the items in the list.) 1367 */ 1368 public CodeableConcept getOrderedBy() { 1369 if (this.orderedBy == null) 1370 if (Configuration.errorOnAutoCreate()) 1371 throw new Error("Attempt to auto-create List.orderedBy"); 1372 else if (Configuration.doAutoCreate()) 1373 this.orderedBy = new CodeableConcept(); // cc 1374 return this.orderedBy; 1375 } 1376 1377 public boolean hasOrderedBy() { 1378 return this.orderedBy != null && !this.orderedBy.isEmpty(); 1379 } 1380 1381 /** 1382 * @param value {@link #orderedBy} (What order applies to the items in the 1383 * list.) 1384 */ 1385 public ListResource setOrderedBy(CodeableConcept value) { 1386 this.orderedBy = value; 1387 return this; 1388 } 1389 1390 /** 1391 * @return {@link #note} (Comments that apply to the overall list.) 1392 */ 1393 public List<Annotation> getNote() { 1394 if (this.note == null) 1395 this.note = new ArrayList<Annotation>(); 1396 return this.note; 1397 } 1398 1399 /** 1400 * @return Returns a reference to <code>this</code> for easy method chaining 1401 */ 1402 public ListResource setNote(List<Annotation> theNote) { 1403 this.note = theNote; 1404 return this; 1405 } 1406 1407 public boolean hasNote() { 1408 if (this.note == null) 1409 return false; 1410 for (Annotation item : this.note) 1411 if (!item.isEmpty()) 1412 return true; 1413 return false; 1414 } 1415 1416 public Annotation addNote() { // 3 1417 Annotation t = new Annotation(); 1418 if (this.note == null) 1419 this.note = new ArrayList<Annotation>(); 1420 this.note.add(t); 1421 return t; 1422 } 1423 1424 public ListResource addNote(Annotation t) { // 3 1425 if (t == null) 1426 return this; 1427 if (this.note == null) 1428 this.note = new ArrayList<Annotation>(); 1429 this.note.add(t); 1430 return this; 1431 } 1432 1433 /** 1434 * @return The first repetition of repeating field {@link #note}, creating it if 1435 * it does not already exist 1436 */ 1437 public Annotation getNoteFirstRep() { 1438 if (getNote().isEmpty()) { 1439 addNote(); 1440 } 1441 return getNote().get(0); 1442 } 1443 1444 /** 1445 * @return {@link #entry} (Entries in this list.) 1446 */ 1447 public List<ListEntryComponent> getEntry() { 1448 if (this.entry == null) 1449 this.entry = new ArrayList<ListEntryComponent>(); 1450 return this.entry; 1451 } 1452 1453 /** 1454 * @return Returns a reference to <code>this</code> for easy method chaining 1455 */ 1456 public ListResource setEntry(List<ListEntryComponent> theEntry) { 1457 this.entry = theEntry; 1458 return this; 1459 } 1460 1461 public boolean hasEntry() { 1462 if (this.entry == null) 1463 return false; 1464 for (ListEntryComponent item : this.entry) 1465 if (!item.isEmpty()) 1466 return true; 1467 return false; 1468 } 1469 1470 public ListEntryComponent addEntry() { // 3 1471 ListEntryComponent t = new ListEntryComponent(); 1472 if (this.entry == null) 1473 this.entry = new ArrayList<ListEntryComponent>(); 1474 this.entry.add(t); 1475 return t; 1476 } 1477 1478 public ListResource addEntry(ListEntryComponent t) { // 3 1479 if (t == null) 1480 return this; 1481 if (this.entry == null) 1482 this.entry = new ArrayList<ListEntryComponent>(); 1483 this.entry.add(t); 1484 return this; 1485 } 1486 1487 /** 1488 * @return The first repetition of repeating field {@link #entry}, creating it 1489 * if it does not already exist 1490 */ 1491 public ListEntryComponent getEntryFirstRep() { 1492 if (getEntry().isEmpty()) { 1493 addEntry(); 1494 } 1495 return getEntry().get(0); 1496 } 1497 1498 /** 1499 * @return {@link #emptyReason} (If the list is empty, why the list is empty.) 1500 */ 1501 public CodeableConcept getEmptyReason() { 1502 if (this.emptyReason == null) 1503 if (Configuration.errorOnAutoCreate()) 1504 throw new Error("Attempt to auto-create List.emptyReason"); 1505 else if (Configuration.doAutoCreate()) 1506 this.emptyReason = new CodeableConcept(); // cc 1507 return this.emptyReason; 1508 } 1509 1510 public boolean hasEmptyReason() { 1511 return this.emptyReason != null && !this.emptyReason.isEmpty(); 1512 } 1513 1514 /** 1515 * @param value {@link #emptyReason} (If the list is empty, why the list is 1516 * empty.) 1517 */ 1518 public ListResource setEmptyReason(CodeableConcept value) { 1519 this.emptyReason = value; 1520 return this; 1521 } 1522 1523 protected void listChildren(List<Property> children) { 1524 super.listChildren(children); 1525 children.add(new Property("identifier", "Identifier", 1526 "Identifier for the List assigned for business purposes outside the context of FHIR.", 0, 1527 java.lang.Integer.MAX_VALUE, identifier)); 1528 children.add(new Property("status", "code", "Indicates the current state of this list.", 0, 1, status)); 1529 children.add(new Property("mode", "code", 1530 "How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 1531 0, 1, mode)); 1532 children.add(new Property("title", "string", "A label for the list assigned by the author.", 0, 1, title)); 1533 children.add(new Property("code", "CodeableConcept", 1534 "This code defines the purpose of the list - why it was created.", 0, 1, code)); 1535 children.add(new Property("subject", "Reference(Patient|Group|Device|Location)", 1536 "The common subject (or patient) of the resources that are in the list if there is one.", 0, 1, subject)); 1537 children.add(new Property("encounter", "Reference(Encounter)", 1538 "The encounter that is the context in which this list was created.", 0, 1, encounter)); 1539 children.add(new Property("date", "dateTime", "The date that the list was prepared.", 0, 1, date)); 1540 children.add(new Property("source", "Reference(Practitioner|PractitionerRole|Patient|Device)", 1541 "The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.", 1542 0, 1, source)); 1543 children.add( 1544 new Property("orderedBy", "CodeableConcept", "What order applies to the items in the list.", 0, 1, orderedBy)); 1545 children.add(new Property("note", "Annotation", "Comments that apply to the overall list.", 0, 1546 java.lang.Integer.MAX_VALUE, note)); 1547 children.add(new Property("entry", "", "Entries in this list.", 0, java.lang.Integer.MAX_VALUE, entry)); 1548 children.add(new Property("emptyReason", "CodeableConcept", "If the list is empty, why the list is empty.", 0, 1, 1549 emptyReason)); 1550 } 1551 1552 @Override 1553 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1554 switch (_hash) { 1555 case -1618432855: 1556 /* identifier */ return new Property("identifier", "Identifier", 1557 "Identifier for the List assigned for business purposes outside the context of FHIR.", 0, 1558 java.lang.Integer.MAX_VALUE, identifier); 1559 case -892481550: 1560 /* status */ return new Property("status", "code", "Indicates the current state of this list.", 0, 1, status); 1561 case 3357091: 1562 /* mode */ return new Property("mode", "code", 1563 "How this list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 1564 0, 1, mode); 1565 case 110371416: 1566 /* title */ return new Property("title", "string", "A label for the list assigned by the author.", 0, 1, title); 1567 case 3059181: 1568 /* code */ return new Property("code", "CodeableConcept", 1569 "This code defines the purpose of the list - why it was created.", 0, 1, code); 1570 case -1867885268: 1571 /* subject */ return new Property("subject", "Reference(Patient|Group|Device|Location)", 1572 "The common subject (or patient) of the resources that are in the list if there is one.", 0, 1, subject); 1573 case 1524132147: 1574 /* encounter */ return new Property("encounter", "Reference(Encounter)", 1575 "The encounter that is the context in which this list was created.", 0, 1, encounter); 1576 case 3076014: 1577 /* date */ return new Property("date", "dateTime", "The date that the list was prepared.", 0, 1, date); 1578 case -896505829: 1579 /* source */ return new Property("source", "Reference(Practitioner|PractitionerRole|Patient|Device)", 1580 "The entity responsible for deciding what the contents of the list were. Where the list was created by a human, this is the same as the author of the list.", 1581 0, 1, source); 1582 case -391079516: 1583 /* orderedBy */ return new Property("orderedBy", "CodeableConcept", 1584 "What order applies to the items in the list.", 0, 1, orderedBy); 1585 case 3387378: 1586 /* note */ return new Property("note", "Annotation", "Comments that apply to the overall list.", 0, 1587 java.lang.Integer.MAX_VALUE, note); 1588 case 96667762: 1589 /* entry */ return new Property("entry", "", "Entries in this list.", 0, java.lang.Integer.MAX_VALUE, entry); 1590 case 1140135409: 1591 /* emptyReason */ return new Property("emptyReason", "CodeableConcept", 1592 "If the list is empty, why the list is empty.", 0, 1, emptyReason); 1593 default: 1594 return super.getNamedProperty(_hash, _name, _checkValid); 1595 } 1596 1597 } 1598 1599 @Override 1600 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1601 switch (hash) { 1602 case -1618432855: 1603 /* identifier */ return this.identifier == null ? new Base[0] 1604 : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1605 case -892481550: 1606 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<ListStatus> 1607 case 3357091: 1608 /* mode */ return this.mode == null ? new Base[0] : new Base[] { this.mode }; // Enumeration<ListMode> 1609 case 110371416: 1610 /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType 1611 case 3059181: 1612 /* code */ return this.code == null ? new Base[0] : new Base[] { this.code }; // CodeableConcept 1613 case -1867885268: 1614 /* subject */ return this.subject == null ? new Base[0] : new Base[] { this.subject }; // Reference 1615 case 1524132147: 1616 /* encounter */ return this.encounter == null ? new Base[0] : new Base[] { this.encounter }; // Reference 1617 case 3076014: 1618 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType 1619 case -896505829: 1620 /* source */ return this.source == null ? new Base[0] : new Base[] { this.source }; // Reference 1621 case -391079516: 1622 /* orderedBy */ return this.orderedBy == null ? new Base[0] : new Base[] { this.orderedBy }; // CodeableConcept 1623 case 3387378: 1624 /* note */ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1625 case 96667762: 1626 /* entry */ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // ListEntryComponent 1627 case 1140135409: 1628 /* emptyReason */ return this.emptyReason == null ? new Base[0] : new Base[] { this.emptyReason }; // CodeableConcept 1629 default: 1630 return super.getProperty(hash, name, checkValid); 1631 } 1632 1633 } 1634 1635 @Override 1636 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1637 switch (hash) { 1638 case -1618432855: // identifier 1639 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1640 return value; 1641 case -892481550: // status 1642 value = new ListStatusEnumFactory().fromType(castToCode(value)); 1643 this.status = (Enumeration) value; // Enumeration<ListStatus> 1644 return value; 1645 case 3357091: // mode 1646 value = new ListModeEnumFactory().fromType(castToCode(value)); 1647 this.mode = (Enumeration) value; // Enumeration<ListMode> 1648 return value; 1649 case 110371416: // title 1650 this.title = castToString(value); // StringType 1651 return value; 1652 case 3059181: // code 1653 this.code = castToCodeableConcept(value); // CodeableConcept 1654 return value; 1655 case -1867885268: // subject 1656 this.subject = castToReference(value); // Reference 1657 return value; 1658 case 1524132147: // encounter 1659 this.encounter = castToReference(value); // Reference 1660 return value; 1661 case 3076014: // date 1662 this.date = castToDateTime(value); // DateTimeType 1663 return value; 1664 case -896505829: // source 1665 this.source = castToReference(value); // Reference 1666 return value; 1667 case -391079516: // orderedBy 1668 this.orderedBy = castToCodeableConcept(value); // CodeableConcept 1669 return value; 1670 case 3387378: // note 1671 this.getNote().add(castToAnnotation(value)); // Annotation 1672 return value; 1673 case 96667762: // entry 1674 this.getEntry().add((ListEntryComponent) value); // ListEntryComponent 1675 return value; 1676 case 1140135409: // emptyReason 1677 this.emptyReason = castToCodeableConcept(value); // CodeableConcept 1678 return value; 1679 default: 1680 return super.setProperty(hash, name, value); 1681 } 1682 1683 } 1684 1685 @Override 1686 public Base setProperty(String name, Base value) throws FHIRException { 1687 if (name.equals("identifier")) { 1688 this.getIdentifier().add(castToIdentifier(value)); 1689 } else if (name.equals("status")) { 1690 value = new ListStatusEnumFactory().fromType(castToCode(value)); 1691 this.status = (Enumeration) value; // Enumeration<ListStatus> 1692 } else if (name.equals("mode")) { 1693 value = new ListModeEnumFactory().fromType(castToCode(value)); 1694 this.mode = (Enumeration) value; // Enumeration<ListMode> 1695 } else if (name.equals("title")) { 1696 this.title = castToString(value); // StringType 1697 } else if (name.equals("code")) { 1698 this.code = castToCodeableConcept(value); // CodeableConcept 1699 } else if (name.equals("subject")) { 1700 this.subject = castToReference(value); // Reference 1701 } else if (name.equals("encounter")) { 1702 this.encounter = castToReference(value); // Reference 1703 } else if (name.equals("date")) { 1704 this.date = castToDateTime(value); // DateTimeType 1705 } else if (name.equals("source")) { 1706 this.source = castToReference(value); // Reference 1707 } else if (name.equals("orderedBy")) { 1708 this.orderedBy = castToCodeableConcept(value); // CodeableConcept 1709 } else if (name.equals("note")) { 1710 this.getNote().add(castToAnnotation(value)); 1711 } else if (name.equals("entry")) { 1712 this.getEntry().add((ListEntryComponent) value); 1713 } else if (name.equals("emptyReason")) { 1714 this.emptyReason = castToCodeableConcept(value); // CodeableConcept 1715 } else 1716 return super.setProperty(name, value); 1717 return value; 1718 } 1719 1720 @Override 1721 public void removeChild(String name, Base value) throws FHIRException { 1722 if (name.equals("identifier")) { 1723 this.getIdentifier().remove(castToIdentifier(value)); 1724 } else if (name.equals("status")) { 1725 this.status = null; 1726 } else if (name.equals("mode")) { 1727 this.mode = null; 1728 } else if (name.equals("title")) { 1729 this.title = null; 1730 } else if (name.equals("code")) { 1731 this.code = null; 1732 } else if (name.equals("subject")) { 1733 this.subject = null; 1734 } else if (name.equals("encounter")) { 1735 this.encounter = null; 1736 } else if (name.equals("date")) { 1737 this.date = null; 1738 } else if (name.equals("source")) { 1739 this.source = null; 1740 } else if (name.equals("orderedBy")) { 1741 this.orderedBy = null; 1742 } else if (name.equals("note")) { 1743 this.getNote().remove(castToAnnotation(value)); 1744 } else if (name.equals("entry")) { 1745 this.getEntry().remove((ListEntryComponent) value); 1746 } else if (name.equals("emptyReason")) { 1747 this.emptyReason = null; 1748 } else 1749 super.removeChild(name, value); 1750 1751 } 1752 1753 @Override 1754 public Base makeProperty(int hash, String name) throws FHIRException { 1755 switch (hash) { 1756 case -1618432855: 1757 return addIdentifier(); 1758 case -892481550: 1759 return getStatusElement(); 1760 case 3357091: 1761 return getModeElement(); 1762 case 110371416: 1763 return getTitleElement(); 1764 case 3059181: 1765 return getCode(); 1766 case -1867885268: 1767 return getSubject(); 1768 case 1524132147: 1769 return getEncounter(); 1770 case 3076014: 1771 return getDateElement(); 1772 case -896505829: 1773 return getSource(); 1774 case -391079516: 1775 return getOrderedBy(); 1776 case 3387378: 1777 return addNote(); 1778 case 96667762: 1779 return addEntry(); 1780 case 1140135409: 1781 return getEmptyReason(); 1782 default: 1783 return super.makeProperty(hash, name); 1784 } 1785 1786 } 1787 1788 @Override 1789 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1790 switch (hash) { 1791 case -1618432855: 1792 /* identifier */ return new String[] { "Identifier" }; 1793 case -892481550: 1794 /* status */ return new String[] { "code" }; 1795 case 3357091: 1796 /* mode */ return new String[] { "code" }; 1797 case 110371416: 1798 /* title */ return new String[] { "string" }; 1799 case 3059181: 1800 /* code */ return new String[] { "CodeableConcept" }; 1801 case -1867885268: 1802 /* subject */ return new String[] { "Reference" }; 1803 case 1524132147: 1804 /* encounter */ return new String[] { "Reference" }; 1805 case 3076014: 1806 /* date */ return new String[] { "dateTime" }; 1807 case -896505829: 1808 /* source */ return new String[] { "Reference" }; 1809 case -391079516: 1810 /* orderedBy */ return new String[] { "CodeableConcept" }; 1811 case 3387378: 1812 /* note */ return new String[] { "Annotation" }; 1813 case 96667762: 1814 /* entry */ return new String[] {}; 1815 case 1140135409: 1816 /* emptyReason */ return new String[] { "CodeableConcept" }; 1817 default: 1818 return super.getTypesForProperty(hash, name); 1819 } 1820 1821 } 1822 1823 @Override 1824 public Base addChild(String name) throws FHIRException { 1825 if (name.equals("identifier")) { 1826 return addIdentifier(); 1827 } else if (name.equals("status")) { 1828 throw new FHIRException("Cannot call addChild on a singleton property List.status"); 1829 } else if (name.equals("mode")) { 1830 throw new FHIRException("Cannot call addChild on a singleton property List.mode"); 1831 } else if (name.equals("title")) { 1832 throw new FHIRException("Cannot call addChild on a singleton property List.title"); 1833 } else if (name.equals("code")) { 1834 this.code = new CodeableConcept(); 1835 return this.code; 1836 } else if (name.equals("subject")) { 1837 this.subject = new Reference(); 1838 return this.subject; 1839 } else if (name.equals("encounter")) { 1840 this.encounter = new Reference(); 1841 return this.encounter; 1842 } else if (name.equals("date")) { 1843 throw new FHIRException("Cannot call addChild on a singleton property List.date"); 1844 } else if (name.equals("source")) { 1845 this.source = new Reference(); 1846 return this.source; 1847 } else if (name.equals("orderedBy")) { 1848 this.orderedBy = new CodeableConcept(); 1849 return this.orderedBy; 1850 } else if (name.equals("note")) { 1851 return addNote(); 1852 } else if (name.equals("entry")) { 1853 return addEntry(); 1854 } else if (name.equals("emptyReason")) { 1855 this.emptyReason = new CodeableConcept(); 1856 return this.emptyReason; 1857 } else 1858 return super.addChild(name); 1859 } 1860 1861 public String fhirType() { 1862 return "List"; 1863 1864 } 1865 1866 public ListResource copy() { 1867 ListResource dst = new ListResource(); 1868 copyValues(dst); 1869 return dst; 1870 } 1871 1872 public void copyValues(ListResource dst) { 1873 super.copyValues(dst); 1874 if (identifier != null) { 1875 dst.identifier = new ArrayList<Identifier>(); 1876 for (Identifier i : identifier) 1877 dst.identifier.add(i.copy()); 1878 } 1879 ; 1880 dst.status = status == null ? null : status.copy(); 1881 dst.mode = mode == null ? null : mode.copy(); 1882 dst.title = title == null ? null : title.copy(); 1883 dst.code = code == null ? null : code.copy(); 1884 dst.subject = subject == null ? null : subject.copy(); 1885 dst.encounter = encounter == null ? null : encounter.copy(); 1886 dst.date = date == null ? null : date.copy(); 1887 dst.source = source == null ? null : source.copy(); 1888 dst.orderedBy = orderedBy == null ? null : orderedBy.copy(); 1889 if (note != null) { 1890 dst.note = new ArrayList<Annotation>(); 1891 for (Annotation i : note) 1892 dst.note.add(i.copy()); 1893 } 1894 ; 1895 if (entry != null) { 1896 dst.entry = new ArrayList<ListEntryComponent>(); 1897 for (ListEntryComponent i : entry) 1898 dst.entry.add(i.copy()); 1899 } 1900 ; 1901 dst.emptyReason = emptyReason == null ? null : emptyReason.copy(); 1902 } 1903 1904 protected ListResource typedCopy() { 1905 return copy(); 1906 } 1907 1908 @Override 1909 public boolean equalsDeep(Base other_) { 1910 if (!super.equalsDeep(other_)) 1911 return false; 1912 if (!(other_ instanceof ListResource)) 1913 return false; 1914 ListResource o = (ListResource) other_; 1915 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) 1916 && compareDeep(mode, o.mode, true) && compareDeep(title, o.title, true) && compareDeep(code, o.code, true) 1917 && compareDeep(subject, o.subject, true) && compareDeep(encounter, o.encounter, true) 1918 && compareDeep(date, o.date, true) && compareDeep(source, o.source, true) 1919 && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(note, o.note, true) 1920 && compareDeep(entry, o.entry, true) && compareDeep(emptyReason, o.emptyReason, true); 1921 } 1922 1923 @Override 1924 public boolean equalsShallow(Base other_) { 1925 if (!super.equalsShallow(other_)) 1926 return false; 1927 if (!(other_ instanceof ListResource)) 1928 return false; 1929 ListResource o = (ListResource) other_; 1930 return compareValues(status, o.status, true) && compareValues(mode, o.mode, true) 1931 && compareValues(title, o.title, true) && compareValues(date, o.date, true); 1932 } 1933 1934 public boolean isEmpty() { 1935 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, mode, title, code, subject, 1936 encounter, date, source, orderedBy, note, entry, emptyReason); 1937 } 1938 1939 @Override 1940 public ResourceType getResourceType() { 1941 return ResourceType.List; 1942 } 1943 1944 /** 1945 * Search parameter: <b>date</b> 1946 * <p> 1947 * Description: <b>When the list was prepared</b><br> 1948 * Type: <b>date</b><br> 1949 * Path: <b>List.date</b><br> 1950 * </p> 1951 */ 1952 @SearchParamDefinition(name = "date", path = "List.date", description = "When the list was prepared", type = "date") 1953 public static final String SP_DATE = "date"; 1954 /** 1955 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1956 * <p> 1957 * Description: <b>When the list was prepared</b><br> 1958 * Type: <b>date</b><br> 1959 * Path: <b>List.date</b><br> 1960 * </p> 1961 */ 1962 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam( 1963 SP_DATE); 1964 1965 /** 1966 * Search parameter: <b>identifier</b> 1967 * <p> 1968 * Description: <b>Business identifier</b><br> 1969 * Type: <b>token</b><br> 1970 * Path: <b>List.identifier</b><br> 1971 * </p> 1972 */ 1973 @SearchParamDefinition(name = "identifier", path = "List.identifier", description = "Business identifier", type = "token") 1974 public static final String SP_IDENTIFIER = "identifier"; 1975 /** 1976 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1977 * <p> 1978 * Description: <b>Business identifier</b><br> 1979 * Type: <b>token</b><br> 1980 * Path: <b>List.identifier</b><br> 1981 * </p> 1982 */ 1983 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam( 1984 SP_IDENTIFIER); 1985 1986 /** 1987 * Search parameter: <b>item</b> 1988 * <p> 1989 * Description: <b>Actual entry</b><br> 1990 * Type: <b>reference</b><br> 1991 * Path: <b>List.entry.item</b><br> 1992 * </p> 1993 */ 1994 @SearchParamDefinition(name = "item", path = "List.entry.item", description = "Actual entry", type = "reference") 1995 public static final String SP_ITEM = "item"; 1996 /** 1997 * <b>Fluent Client</b> search parameter constant for <b>item</b> 1998 * <p> 1999 * Description: <b>Actual entry</b><br> 2000 * Type: <b>reference</b><br> 2001 * Path: <b>List.entry.item</b><br> 2002 * </p> 2003 */ 2004 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ITEM = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2005 SP_ITEM); 2006 2007 /** 2008 * Constant for fluent queries to be used to add include statements. Specifies 2009 * the path value of "<b>List:item</b>". 2010 */ 2011 public static final ca.uhn.fhir.model.api.Include INCLUDE_ITEM = new ca.uhn.fhir.model.api.Include("List:item") 2012 .toLocked(); 2013 2014 /** 2015 * Search parameter: <b>empty-reason</b> 2016 * <p> 2017 * Description: <b>Why list is empty</b><br> 2018 * Type: <b>token</b><br> 2019 * Path: <b>List.emptyReason</b><br> 2020 * </p> 2021 */ 2022 @SearchParamDefinition(name = "empty-reason", path = "List.emptyReason", description = "Why list is empty", type = "token") 2023 public static final String SP_EMPTY_REASON = "empty-reason"; 2024 /** 2025 * <b>Fluent Client</b> search parameter constant for <b>empty-reason</b> 2026 * <p> 2027 * Description: <b>Why list is empty</b><br> 2028 * Type: <b>token</b><br> 2029 * Path: <b>List.emptyReason</b><br> 2030 * </p> 2031 */ 2032 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EMPTY_REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam( 2033 SP_EMPTY_REASON); 2034 2035 /** 2036 * Search parameter: <b>code</b> 2037 * <p> 2038 * Description: <b>What the purpose of this list is</b><br> 2039 * Type: <b>token</b><br> 2040 * Path: <b>List.code</b><br> 2041 * </p> 2042 */ 2043 @SearchParamDefinition(name = "code", path = "List.code", description = "What the purpose of this list is", type = "token") 2044 public static final String SP_CODE = "code"; 2045 /** 2046 * <b>Fluent Client</b> search parameter constant for <b>code</b> 2047 * <p> 2048 * Description: <b>What the purpose of this list is</b><br> 2049 * Type: <b>token</b><br> 2050 * Path: <b>List.code</b><br> 2051 * </p> 2052 */ 2053 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam( 2054 SP_CODE); 2055 2056 /** 2057 * Search parameter: <b>notes</b> 2058 * <p> 2059 * Description: <b>The annotation - text content (as markdown)</b><br> 2060 * Type: <b>string</b><br> 2061 * Path: <b>List.note.text</b><br> 2062 * </p> 2063 */ 2064 @SearchParamDefinition(name = "notes", path = "List.note.text", description = "The annotation - text content (as markdown)", type = "string") 2065 public static final String SP_NOTES = "notes"; 2066 /** 2067 * <b>Fluent Client</b> search parameter constant for <b>notes</b> 2068 * <p> 2069 * Description: <b>The annotation - text content (as markdown)</b><br> 2070 * Type: <b>string</b><br> 2071 * Path: <b>List.note.text</b><br> 2072 * </p> 2073 */ 2074 public static final ca.uhn.fhir.rest.gclient.StringClientParam NOTES = new ca.uhn.fhir.rest.gclient.StringClientParam( 2075 SP_NOTES); 2076 2077 /** 2078 * Search parameter: <b>subject</b> 2079 * <p> 2080 * Description: <b>If all resources have the same subject</b><br> 2081 * Type: <b>reference</b><br> 2082 * Path: <b>List.subject</b><br> 2083 * </p> 2084 */ 2085 @SearchParamDefinition(name = "subject", path = "List.subject", description = "If all resources have the same subject", type = "reference", providesMembershipIn = { 2086 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Base FHIR compartment definition for Device"), 2087 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Base FHIR compartment definition for Patient") }, target = { 2088 Device.class, Group.class, Location.class, Patient.class }) 2089 public static final String SP_SUBJECT = "subject"; 2090 /** 2091 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2092 * <p> 2093 * Description: <b>If all resources have the same subject</b><br> 2094 * Type: <b>reference</b><br> 2095 * Path: <b>List.subject</b><br> 2096 * </p> 2097 */ 2098 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2099 SP_SUBJECT); 2100 2101 /** 2102 * Constant for fluent queries to be used to add include statements. Specifies 2103 * the path value of "<b>List:subject</b>". 2104 */ 2105 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("List:subject") 2106 .toLocked(); 2107 2108 /** 2109 * Search parameter: <b>patient</b> 2110 * <p> 2111 * Description: <b>If all resources have the same subject</b><br> 2112 * Type: <b>reference</b><br> 2113 * Path: <b>List.subject</b><br> 2114 * </p> 2115 */ 2116 @SearchParamDefinition(name = "patient", path = "List.subject.where(resolve() is Patient)", description = "If all resources have the same subject", type = "reference", target = { 2117 Patient.class }) 2118 public static final String SP_PATIENT = "patient"; 2119 /** 2120 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2121 * <p> 2122 * Description: <b>If all resources have the same subject</b><br> 2123 * Type: <b>reference</b><br> 2124 * Path: <b>List.subject</b><br> 2125 * </p> 2126 */ 2127 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2128 SP_PATIENT); 2129 2130 /** 2131 * Constant for fluent queries to be used to add include statements. Specifies 2132 * the path value of "<b>List:patient</b>". 2133 */ 2134 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("List:patient") 2135 .toLocked(); 2136 2137 /** 2138 * Search parameter: <b>source</b> 2139 * <p> 2140 * Description: <b>Who and/or what defined the list contents (aka 2141 * Author)</b><br> 2142 * Type: <b>reference</b><br> 2143 * Path: <b>List.source</b><br> 2144 * </p> 2145 */ 2146 @SearchParamDefinition(name = "source", path = "List.source", description = "Who and/or what defined the list contents (aka Author)", type = "reference", providesMembershipIn = { 2147 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Base FHIR compartment definition for Device"), 2148 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Base FHIR compartment definition for Patient"), 2149 @ca.uhn.fhir.model.api.annotation.Compartment(name = "Base FHIR compartment definition for Practitioner") }, target = { 2150 Device.class, Patient.class, Practitioner.class, PractitionerRole.class }) 2151 public static final String SP_SOURCE = "source"; 2152 /** 2153 * <b>Fluent Client</b> search parameter constant for <b>source</b> 2154 * <p> 2155 * Description: <b>Who and/or what defined the list contents (aka 2156 * Author)</b><br> 2157 * Type: <b>reference</b><br> 2158 * Path: <b>List.source</b><br> 2159 * </p> 2160 */ 2161 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2162 SP_SOURCE); 2163 2164 /** 2165 * Constant for fluent queries to be used to add include statements. Specifies 2166 * the path value of "<b>List:source</b>". 2167 */ 2168 public static final ca.uhn.fhir.model.api.Include INCLUDE_SOURCE = new ca.uhn.fhir.model.api.Include("List:source") 2169 .toLocked(); 2170 2171 /** 2172 * Search parameter: <b>encounter</b> 2173 * <p> 2174 * Description: <b>Context in which list created</b><br> 2175 * Type: <b>reference</b><br> 2176 * Path: <b>List.encounter</b><br> 2177 * </p> 2178 */ 2179 @SearchParamDefinition(name = "encounter", path = "List.encounter", description = "Context in which list created", type = "reference", target = { 2180 Encounter.class }) 2181 public static final String SP_ENCOUNTER = "encounter"; 2182 /** 2183 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 2184 * <p> 2185 * Description: <b>Context in which list created</b><br> 2186 * Type: <b>reference</b><br> 2187 * Path: <b>List.encounter</b><br> 2188 * </p> 2189 */ 2190 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 2191 SP_ENCOUNTER); 2192 2193 /** 2194 * Constant for fluent queries to be used to add include statements. Specifies 2195 * the path value of "<b>List:encounter</b>". 2196 */ 2197 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include( 2198 "List:encounter").toLocked(); 2199 2200 /** 2201 * Search parameter: <b>title</b> 2202 * <p> 2203 * Description: <b>Descriptive name for the list</b><br> 2204 * Type: <b>string</b><br> 2205 * Path: <b>List.title</b><br> 2206 * </p> 2207 */ 2208 @SearchParamDefinition(name = "title", path = "List.title", description = "Descriptive name for the list", type = "string") 2209 public static final String SP_TITLE = "title"; 2210 /** 2211 * <b>Fluent Client</b> search parameter constant for <b>title</b> 2212 * <p> 2213 * Description: <b>Descriptive name for the list</b><br> 2214 * Type: <b>string</b><br> 2215 * Path: <b>List.title</b><br> 2216 * </p> 2217 */ 2218 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam( 2219 SP_TITLE); 2220 2221 /** 2222 * Search parameter: <b>status</b> 2223 * <p> 2224 * Description: <b>current | retired | entered-in-error</b><br> 2225 * Type: <b>token</b><br> 2226 * Path: <b>List.status</b><br> 2227 * </p> 2228 */ 2229 @SearchParamDefinition(name = "status", path = "List.status", description = "current | retired | entered-in-error", type = "token") 2230 public static final String SP_STATUS = "status"; 2231 /** 2232 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2233 * <p> 2234 * Description: <b>current | retired | entered-in-error</b><br> 2235 * Type: <b>token</b><br> 2236 * Path: <b>List.status</b><br> 2237 * </p> 2238 */ 2239 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam( 2240 SP_STATUS); 2241 2242}