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