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