001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006import java.math.BigDecimal; 007 008/* 009 Copyright (c) 2011+, HL7, Inc. 010 All rights reserved. 011 012 Redistribution and use in source and binary forms, with or without modification, 013 are permitted provided that the following conditions are met: 014 015 * Redistributions of source code must retain the above copyright notice, this 016 list of conditions and the following disclaimer. 017 * Redistributions in binary form must reproduce the above copyright notice, 018 this list of conditions and the following disclaimer in the documentation 019 and/or other materials provided with the distribution. 020 * Neither the name of HL7 nor the names of its contributors may be used to 021 endorse or promote products derived from this software without specific 022 prior written permission. 023 024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 025 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 026 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 027 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 028 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 029 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 030 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 031 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 032 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 033 POSSIBILITY OF SUCH DAMAGE. 034 035*/ 036 037// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 038import java.util.ArrayList; 039import java.util.Date; 040import java.util.List; 041 042import org.hl7.fhir.exceptions.FHIRException; 043import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 044import org.hl7.fhir.utilities.Utilities; 045 046import ca.uhn.fhir.model.api.annotation.Block; 047import ca.uhn.fhir.model.api.annotation.Child; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.ResourceDef; 050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 051/** 052 * A formal agreement between parties regarding the conduct of business, exchange of information or other matters. 053 */ 054@ResourceDef(name="Contract", profile="http://hl7.org/fhir/Profile/Contract") 055public class Contract extends DomainResource { 056 057 @Block() 058 public static class AgentComponent extends BackboneElement implements IBaseBackboneElement { 059 /** 060 * Who or what parties are assigned roles in this Contract. 061 */ 062 @Child(name = "actor", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) 063 @Description(shortDefinition="Contract Agent Type", formalDefinition="Who or what parties are assigned roles in this Contract." ) 064 protected Reference actor; 065 066 /** 067 * The actual object that is the target of the reference (Who or what parties are assigned roles in this Contract.) 068 */ 069 protected Resource actorTarget; 070 071 /** 072 * Role type of agent assigned roles in this Contract. 073 */ 074 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 075 @Description(shortDefinition="Contract Agent Role", formalDefinition="Role type of agent assigned roles in this Contract." ) 076 protected List<CodeableConcept> role; 077 078 private static final long serialVersionUID = -454551165L; 079 080 /** 081 * Constructor 082 */ 083 public AgentComponent() { 084 super(); 085 } 086 087 /** 088 * Constructor 089 */ 090 public AgentComponent(Reference actor) { 091 super(); 092 this.actor = actor; 093 } 094 095 /** 096 * @return {@link #actor} (Who or what parties are assigned roles in this Contract.) 097 */ 098 public Reference getActor() { 099 if (this.actor == null) 100 if (Configuration.errorOnAutoCreate()) 101 throw new Error("Attempt to auto-create AgentComponent.actor"); 102 else if (Configuration.doAutoCreate()) 103 this.actor = new Reference(); // cc 104 return this.actor; 105 } 106 107 public boolean hasActor() { 108 return this.actor != null && !this.actor.isEmpty(); 109 } 110 111 /** 112 * @param value {@link #actor} (Who or what parties are assigned roles in this Contract.) 113 */ 114 public AgentComponent setActor(Reference value) { 115 this.actor = value; 116 return this; 117 } 118 119 /** 120 * @return {@link #actor} 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. (Who or what parties are assigned roles in this Contract.) 121 */ 122 public Resource getActorTarget() { 123 return this.actorTarget; 124 } 125 126 /** 127 * @param value {@link #actor} 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. (Who or what parties are assigned roles in this Contract.) 128 */ 129 public AgentComponent setActorTarget(Resource value) { 130 this.actorTarget = value; 131 return this; 132 } 133 134 /** 135 * @return {@link #role} (Role type of agent assigned roles in this Contract.) 136 */ 137 public List<CodeableConcept> getRole() { 138 if (this.role == null) 139 this.role = new ArrayList<CodeableConcept>(); 140 return this.role; 141 } 142 143 public boolean hasRole() { 144 if (this.role == null) 145 return false; 146 for (CodeableConcept item : this.role) 147 if (!item.isEmpty()) 148 return true; 149 return false; 150 } 151 152 /** 153 * @return {@link #role} (Role type of agent assigned roles in this Contract.) 154 */ 155 // syntactic sugar 156 public CodeableConcept addRole() { //3 157 CodeableConcept t = new CodeableConcept(); 158 if (this.role == null) 159 this.role = new ArrayList<CodeableConcept>(); 160 this.role.add(t); 161 return t; 162 } 163 164 // syntactic sugar 165 public AgentComponent addRole(CodeableConcept t) { //3 166 if (t == null) 167 return this; 168 if (this.role == null) 169 this.role = new ArrayList<CodeableConcept>(); 170 this.role.add(t); 171 return this; 172 } 173 174 protected void listChildren(List<Property> childrenList) { 175 super.listChildren(childrenList); 176 childrenList.add(new Property("actor", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "Who or what parties are assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, actor)); 177 childrenList.add(new Property("role", "CodeableConcept", "Role type of agent assigned roles in this Contract.", 0, java.lang.Integer.MAX_VALUE, role)); 178 } 179 180 @Override 181 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 182 switch (hash) { 183 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 184 case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept 185 default: return super.getProperty(hash, name, checkValid); 186 } 187 188 } 189 190 @Override 191 public void setProperty(int hash, String name, Base value) throws FHIRException { 192 switch (hash) { 193 case 92645877: // actor 194 this.actor = castToReference(value); // Reference 195 break; 196 case 3506294: // role 197 this.getRole().add(castToCodeableConcept(value)); // CodeableConcept 198 break; 199 default: super.setProperty(hash, name, value); 200 } 201 202 } 203 204 @Override 205 public void setProperty(String name, Base value) throws FHIRException { 206 if (name.equals("actor")) 207 this.actor = castToReference(value); // Reference 208 else if (name.equals("role")) 209 this.getRole().add(castToCodeableConcept(value)); 210 else 211 super.setProperty(name, value); 212 } 213 214 @Override 215 public Base makeProperty(int hash, String name) throws FHIRException { 216 switch (hash) { 217 case 92645877: return getActor(); // Reference 218 case 3506294: return addRole(); // CodeableConcept 219 default: return super.makeProperty(hash, name); 220 } 221 222 } 223 224 @Override 225 public Base addChild(String name) throws FHIRException { 226 if (name.equals("actor")) { 227 this.actor = new Reference(); 228 return this.actor; 229 } 230 else if (name.equals("role")) { 231 return addRole(); 232 } 233 else 234 return super.addChild(name); 235 } 236 237 public AgentComponent copy() { 238 AgentComponent dst = new AgentComponent(); 239 copyValues(dst); 240 dst.actor = actor == null ? null : actor.copy(); 241 if (role != null) { 242 dst.role = new ArrayList<CodeableConcept>(); 243 for (CodeableConcept i : role) 244 dst.role.add(i.copy()); 245 }; 246 return dst; 247 } 248 249 @Override 250 public boolean equalsDeep(Base other) { 251 if (!super.equalsDeep(other)) 252 return false; 253 if (!(other instanceof AgentComponent)) 254 return false; 255 AgentComponent o = (AgentComponent) other; 256 return compareDeep(actor, o.actor, true) && compareDeep(role, o.role, true); 257 } 258 259 @Override 260 public boolean equalsShallow(Base other) { 261 if (!super.equalsShallow(other)) 262 return false; 263 if (!(other instanceof AgentComponent)) 264 return false; 265 AgentComponent o = (AgentComponent) other; 266 return true; 267 } 268 269 public boolean isEmpty() { 270 return super.isEmpty() && (actor == null || actor.isEmpty()) && (role == null || role.isEmpty()) 271 ; 272 } 273 274 public String fhirType() { 275 return "Contract.agent"; 276 277 } 278 279 } 280 281 @Block() 282 public static class SignatoryComponent extends BackboneElement implements IBaseBackboneElement { 283 /** 284 * Role of this Contract signer, e.g. notary, grantee. 285 */ 286 @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=false) 287 @Description(shortDefinition="Contract Signer Type", formalDefinition="Role of this Contract signer, e.g. notary, grantee." ) 288 protected Coding type; 289 290 /** 291 * Party which is a signator to this Contract. 292 */ 293 @Child(name = "party", type = {Organization.class, Patient.class, Practitioner.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=false) 294 @Description(shortDefinition="Contract Signatory Party", formalDefinition="Party which is a signator to this Contract." ) 295 protected Reference party; 296 297 /** 298 * The actual object that is the target of the reference (Party which is a signator to this Contract.) 299 */ 300 protected Resource partyTarget; 301 302 /** 303 * Legally binding Contract DSIG signature contents in Base64. 304 */ 305 @Child(name = "signature", type = {Signature.class}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 306 @Description(shortDefinition="Contract Documentation Signature", formalDefinition="Legally binding Contract DSIG signature contents in Base64." ) 307 protected List<Signature> signature; 308 309 private static final long serialVersionUID = 1948139228L; 310 311 /** 312 * Constructor 313 */ 314 public SignatoryComponent() { 315 super(); 316 } 317 318 /** 319 * Constructor 320 */ 321 public SignatoryComponent(Coding type, Reference party) { 322 super(); 323 this.type = type; 324 this.party = party; 325 } 326 327 /** 328 * @return {@link #type} (Role of this Contract signer, e.g. notary, grantee.) 329 */ 330 public Coding getType() { 331 if (this.type == null) 332 if (Configuration.errorOnAutoCreate()) 333 throw new Error("Attempt to auto-create SignatoryComponent.type"); 334 else if (Configuration.doAutoCreate()) 335 this.type = new Coding(); // cc 336 return this.type; 337 } 338 339 public boolean hasType() { 340 return this.type != null && !this.type.isEmpty(); 341 } 342 343 /** 344 * @param value {@link #type} (Role of this Contract signer, e.g. notary, grantee.) 345 */ 346 public SignatoryComponent setType(Coding value) { 347 this.type = value; 348 return this; 349 } 350 351 /** 352 * @return {@link #party} (Party which is a signator to this Contract.) 353 */ 354 public Reference getParty() { 355 if (this.party == null) 356 if (Configuration.errorOnAutoCreate()) 357 throw new Error("Attempt to auto-create SignatoryComponent.party"); 358 else if (Configuration.doAutoCreate()) 359 this.party = new Reference(); // cc 360 return this.party; 361 } 362 363 public boolean hasParty() { 364 return this.party != null && !this.party.isEmpty(); 365 } 366 367 /** 368 * @param value {@link #party} (Party which is a signator to this Contract.) 369 */ 370 public SignatoryComponent setParty(Reference value) { 371 this.party = value; 372 return this; 373 } 374 375 /** 376 * @return {@link #party} 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. (Party which is a signator to this Contract.) 377 */ 378 public Resource getPartyTarget() { 379 return this.partyTarget; 380 } 381 382 /** 383 * @param value {@link #party} 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. (Party which is a signator to this Contract.) 384 */ 385 public SignatoryComponent setPartyTarget(Resource value) { 386 this.partyTarget = value; 387 return this; 388 } 389 390 /** 391 * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.) 392 */ 393 public List<Signature> getSignature() { 394 if (this.signature == null) 395 this.signature = new ArrayList<Signature>(); 396 return this.signature; 397 } 398 399 public boolean hasSignature() { 400 if (this.signature == null) 401 return false; 402 for (Signature item : this.signature) 403 if (!item.isEmpty()) 404 return true; 405 return false; 406 } 407 408 /** 409 * @return {@link #signature} (Legally binding Contract DSIG signature contents in Base64.) 410 */ 411 // syntactic sugar 412 public Signature addSignature() { //3 413 Signature t = new Signature(); 414 if (this.signature == null) 415 this.signature = new ArrayList<Signature>(); 416 this.signature.add(t); 417 return t; 418 } 419 420 // syntactic sugar 421 public SignatoryComponent addSignature(Signature t) { //3 422 if (t == null) 423 return this; 424 if (this.signature == null) 425 this.signature = new ArrayList<Signature>(); 426 this.signature.add(t); 427 return this; 428 } 429 430 protected void listChildren(List<Property> childrenList) { 431 super.listChildren(childrenList); 432 childrenList.add(new Property("type", "Coding", "Role of this Contract signer, e.g. notary, grantee.", 0, java.lang.Integer.MAX_VALUE, type)); 433 childrenList.add(new Property("party", "Reference(Organization|Patient|Practitioner|RelatedPerson)", "Party which is a signator to this Contract.", 0, java.lang.Integer.MAX_VALUE, party)); 434 childrenList.add(new Property("signature", "Signature", "Legally binding Contract DSIG signature contents in Base64.", 0, java.lang.Integer.MAX_VALUE, signature)); 435 } 436 437 @Override 438 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 439 switch (hash) { 440 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 441 case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Reference 442 case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : this.signature.toArray(new Base[this.signature.size()]); // Signature 443 default: return super.getProperty(hash, name, checkValid); 444 } 445 446 } 447 448 @Override 449 public void setProperty(int hash, String name, Base value) throws FHIRException { 450 switch (hash) { 451 case 3575610: // type 452 this.type = castToCoding(value); // Coding 453 break; 454 case 106437350: // party 455 this.party = castToReference(value); // Reference 456 break; 457 case 1073584312: // signature 458 this.getSignature().add(castToSignature(value)); // Signature 459 break; 460 default: super.setProperty(hash, name, value); 461 } 462 463 } 464 465 @Override 466 public void setProperty(String name, Base value) throws FHIRException { 467 if (name.equals("type")) 468 this.type = castToCoding(value); // Coding 469 else if (name.equals("party")) 470 this.party = castToReference(value); // Reference 471 else if (name.equals("signature")) 472 this.getSignature().add(castToSignature(value)); 473 else 474 super.setProperty(name, value); 475 } 476 477 @Override 478 public Base makeProperty(int hash, String name) throws FHIRException { 479 switch (hash) { 480 case 3575610: return getType(); // Coding 481 case 106437350: return getParty(); // Reference 482 case 1073584312: return addSignature(); // Signature 483 default: return super.makeProperty(hash, name); 484 } 485 486 } 487 488 @Override 489 public Base addChild(String name) throws FHIRException { 490 if (name.equals("type")) { 491 this.type = new Coding(); 492 return this.type; 493 } 494 else if (name.equals("party")) { 495 this.party = new Reference(); 496 return this.party; 497 } 498 else if (name.equals("signature")) { 499 return addSignature(); 500 } 501 else 502 return super.addChild(name); 503 } 504 505 public SignatoryComponent copy() { 506 SignatoryComponent dst = new SignatoryComponent(); 507 copyValues(dst); 508 dst.type = type == null ? null : type.copy(); 509 dst.party = party == null ? null : party.copy(); 510 if (signature != null) { 511 dst.signature = new ArrayList<Signature>(); 512 for (Signature i : signature) 513 dst.signature.add(i.copy()); 514 }; 515 return dst; 516 } 517 518 @Override 519 public boolean equalsDeep(Base other) { 520 if (!super.equalsDeep(other)) 521 return false; 522 if (!(other instanceof SignatoryComponent)) 523 return false; 524 SignatoryComponent o = (SignatoryComponent) other; 525 return compareDeep(type, o.type, true) && compareDeep(party, o.party, true) && compareDeep(signature, o.signature, true) 526 ; 527 } 528 529 @Override 530 public boolean equalsShallow(Base other) { 531 if (!super.equalsShallow(other)) 532 return false; 533 if (!(other instanceof SignatoryComponent)) 534 return false; 535 SignatoryComponent o = (SignatoryComponent) other; 536 return true; 537 } 538 539 public boolean isEmpty() { 540 return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty()) 541 && (signature == null || signature.isEmpty()); 542 } 543 544 public String fhirType() { 545 return "Contract.signer"; 546 547 } 548 549 } 550 551 @Block() 552 public static class ValuedItemComponent extends BackboneElement implements IBaseBackboneElement { 553 /** 554 * Specific type of Contract Valued Item that may be priced. 555 */ 556 @Child(name = "entity", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 557 @Description(shortDefinition="Contract Valued Item Type", formalDefinition="Specific type of Contract Valued Item that may be priced." ) 558 protected Type entity; 559 560 /** 561 * Identifies a Contract Valued Item instance. 562 */ 563 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 564 @Description(shortDefinition="Contract Valued Item Identifier", formalDefinition="Identifies a Contract Valued Item instance." ) 565 protected Identifier identifier; 566 567 /** 568 * Indicates the time during which this Contract ValuedItem information is effective. 569 */ 570 @Child(name = "effectiveTime", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 571 @Description(shortDefinition="Contract Valued Item Effective Tiem", formalDefinition="Indicates the time during which this Contract ValuedItem information is effective." ) 572 protected DateTimeType effectiveTime; 573 574 /** 575 * Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances. 576 */ 577 @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 578 @Description(shortDefinition="Count of Contract Valued Items", formalDefinition="Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances." ) 579 protected SimpleQuantity quantity; 580 581 /** 582 * A Contract Valued Item unit valuation measure. 583 */ 584 @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 585 @Description(shortDefinition="Contract Valued Item fee, charge, or cost", formalDefinition="A Contract Valued Item unit valuation measure." ) 586 protected Money unitPrice; 587 588 /** 589 * A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 590 */ 591 @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) 592 @Description(shortDefinition="Contract Valued Item Price Scaling Factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 593 protected DecimalType factor; 594 595 /** 596 * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 597 */ 598 @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false) 599 @Description(shortDefinition="Contract Valued Item Difficulty Scaling Factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point." ) 600 protected DecimalType points; 601 602 /** 603 * Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. 604 */ 605 @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) 606 @Description(shortDefinition="Total Contract Valued Item Value", formalDefinition="Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) 607 protected Money net; 608 609 private static final long serialVersionUID = 1782449516L; 610 611 /** 612 * Constructor 613 */ 614 public ValuedItemComponent() { 615 super(); 616 } 617 618 /** 619 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 620 */ 621 public Type getEntity() { 622 return this.entity; 623 } 624 625 /** 626 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 627 */ 628 public CodeableConcept getEntityCodeableConcept() throws FHIRException { 629 if (!(this.entity instanceof CodeableConcept)) 630 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.entity.getClass().getName()+" was encountered"); 631 return (CodeableConcept) this.entity; 632 } 633 634 public boolean hasEntityCodeableConcept() { 635 return this.entity instanceof CodeableConcept; 636 } 637 638 /** 639 * @return {@link #entity} (Specific type of Contract Valued Item that may be priced.) 640 */ 641 public Reference getEntityReference() throws FHIRException { 642 if (!(this.entity instanceof Reference)) 643 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.entity.getClass().getName()+" was encountered"); 644 return (Reference) this.entity; 645 } 646 647 public boolean hasEntityReference() { 648 return this.entity instanceof Reference; 649 } 650 651 public boolean hasEntity() { 652 return this.entity != null && !this.entity.isEmpty(); 653 } 654 655 /** 656 * @param value {@link #entity} (Specific type of Contract Valued Item that may be priced.) 657 */ 658 public ValuedItemComponent setEntity(Type value) { 659 this.entity = value; 660 return this; 661 } 662 663 /** 664 * @return {@link #identifier} (Identifies a Contract Valued Item instance.) 665 */ 666 public Identifier getIdentifier() { 667 if (this.identifier == null) 668 if (Configuration.errorOnAutoCreate()) 669 throw new Error("Attempt to auto-create ValuedItemComponent.identifier"); 670 else if (Configuration.doAutoCreate()) 671 this.identifier = new Identifier(); // cc 672 return this.identifier; 673 } 674 675 public boolean hasIdentifier() { 676 return this.identifier != null && !this.identifier.isEmpty(); 677 } 678 679 /** 680 * @param value {@link #identifier} (Identifies a Contract Valued Item instance.) 681 */ 682 public ValuedItemComponent setIdentifier(Identifier value) { 683 this.identifier = value; 684 return this; 685 } 686 687 /** 688 * @return {@link #effectiveTime} (Indicates the time during which this Contract ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value 689 */ 690 public DateTimeType getEffectiveTimeElement() { 691 if (this.effectiveTime == null) 692 if (Configuration.errorOnAutoCreate()) 693 throw new Error("Attempt to auto-create ValuedItemComponent.effectiveTime"); 694 else if (Configuration.doAutoCreate()) 695 this.effectiveTime = new DateTimeType(); // bb 696 return this.effectiveTime; 697 } 698 699 public boolean hasEffectiveTimeElement() { 700 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 701 } 702 703 public boolean hasEffectiveTime() { 704 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 705 } 706 707 /** 708 * @param value {@link #effectiveTime} (Indicates the time during which this Contract ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value 709 */ 710 public ValuedItemComponent setEffectiveTimeElement(DateTimeType value) { 711 this.effectiveTime = value; 712 return this; 713 } 714 715 /** 716 * @return Indicates the time during which this Contract ValuedItem information is effective. 717 */ 718 public Date getEffectiveTime() { 719 return this.effectiveTime == null ? null : this.effectiveTime.getValue(); 720 } 721 722 /** 723 * @param value Indicates the time during which this Contract ValuedItem information is effective. 724 */ 725 public ValuedItemComponent setEffectiveTime(Date value) { 726 if (value == null) 727 this.effectiveTime = null; 728 else { 729 if (this.effectiveTime == null) 730 this.effectiveTime = new DateTimeType(); 731 this.effectiveTime.setValue(value); 732 } 733 return this; 734 } 735 736 /** 737 * @return {@link #quantity} (Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.) 738 */ 739 public SimpleQuantity getQuantity() { 740 if (this.quantity == null) 741 if (Configuration.errorOnAutoCreate()) 742 throw new Error("Attempt to auto-create ValuedItemComponent.quantity"); 743 else if (Configuration.doAutoCreate()) 744 this.quantity = new SimpleQuantity(); // cc 745 return this.quantity; 746 } 747 748 public boolean hasQuantity() { 749 return this.quantity != null && !this.quantity.isEmpty(); 750 } 751 752 /** 753 * @param value {@link #quantity} (Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.) 754 */ 755 public ValuedItemComponent setQuantity(SimpleQuantity value) { 756 this.quantity = value; 757 return this; 758 } 759 760 /** 761 * @return {@link #unitPrice} (A Contract Valued Item unit valuation measure.) 762 */ 763 public Money getUnitPrice() { 764 if (this.unitPrice == null) 765 if (Configuration.errorOnAutoCreate()) 766 throw new Error("Attempt to auto-create ValuedItemComponent.unitPrice"); 767 else if (Configuration.doAutoCreate()) 768 this.unitPrice = new Money(); // cc 769 return this.unitPrice; 770 } 771 772 public boolean hasUnitPrice() { 773 return this.unitPrice != null && !this.unitPrice.isEmpty(); 774 } 775 776 /** 777 * @param value {@link #unitPrice} (A Contract Valued Item unit valuation measure.) 778 */ 779 public ValuedItemComponent setUnitPrice(Money value) { 780 this.unitPrice = value; 781 return this; 782 } 783 784 /** 785 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 786 */ 787 public DecimalType getFactorElement() { 788 if (this.factor == null) 789 if (Configuration.errorOnAutoCreate()) 790 throw new Error("Attempt to auto-create ValuedItemComponent.factor"); 791 else if (Configuration.doAutoCreate()) 792 this.factor = new DecimalType(); // bb 793 return this.factor; 794 } 795 796 public boolean hasFactorElement() { 797 return this.factor != null && !this.factor.isEmpty(); 798 } 799 800 public boolean hasFactor() { 801 return this.factor != null && !this.factor.isEmpty(); 802 } 803 804 /** 805 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 806 */ 807 public ValuedItemComponent setFactorElement(DecimalType value) { 808 this.factor = value; 809 return this; 810 } 811 812 /** 813 * @return A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 814 */ 815 public BigDecimal getFactor() { 816 return this.factor == null ? null : this.factor.getValue(); 817 } 818 819 /** 820 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 821 */ 822 public ValuedItemComponent setFactor(BigDecimal value) { 823 if (value == null) 824 this.factor = null; 825 else { 826 if (this.factor == null) 827 this.factor = new DecimalType(); 828 this.factor.setValue(value); 829 } 830 return this; 831 } 832 833 /** 834 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 835 */ 836 public ValuedItemComponent setFactor(long value) { 837 this.factor = new DecimalType(); 838 this.factor.setValue(value); 839 return this; 840 } 841 842 /** 843 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 844 */ 845 public ValuedItemComponent setFactor(double value) { 846 this.factor = new DecimalType(); 847 this.factor.setValue(value); 848 return this; 849 } 850 851 /** 852 * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 853 */ 854 public DecimalType getPointsElement() { 855 if (this.points == null) 856 if (Configuration.errorOnAutoCreate()) 857 throw new Error("Attempt to auto-create ValuedItemComponent.points"); 858 else if (Configuration.doAutoCreate()) 859 this.points = new DecimalType(); // bb 860 return this.points; 861 } 862 863 public boolean hasPointsElement() { 864 return this.points != null && !this.points.isEmpty(); 865 } 866 867 public boolean hasPoints() { 868 return this.points != null && !this.points.isEmpty(); 869 } 870 871 /** 872 * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 873 */ 874 public ValuedItemComponent setPointsElement(DecimalType value) { 875 this.points = value; 876 return this; 877 } 878 879 /** 880 * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 881 */ 882 public BigDecimal getPoints() { 883 return this.points == null ? null : this.points.getValue(); 884 } 885 886 /** 887 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 888 */ 889 public ValuedItemComponent setPoints(BigDecimal value) { 890 if (value == null) 891 this.points = null; 892 else { 893 if (this.points == null) 894 this.points = new DecimalType(); 895 this.points.setValue(value); 896 } 897 return this; 898 } 899 900 /** 901 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 902 */ 903 public ValuedItemComponent setPoints(long value) { 904 this.points = new DecimalType(); 905 this.points.setValue(value); 906 return this; 907 } 908 909 /** 910 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point. 911 */ 912 public ValuedItemComponent setPoints(double value) { 913 this.points = new DecimalType(); 914 this.points.setValue(value); 915 return this; 916 } 917 918 /** 919 * @return {@link #net} (Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 920 */ 921 public Money getNet() { 922 if (this.net == null) 923 if (Configuration.errorOnAutoCreate()) 924 throw new Error("Attempt to auto-create ValuedItemComponent.net"); 925 else if (Configuration.doAutoCreate()) 926 this.net = new Money(); // cc 927 return this.net; 928 } 929 930 public boolean hasNet() { 931 return this.net != null && !this.net.isEmpty(); 932 } 933 934 /** 935 * @param value {@link #net} (Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 936 */ 937 public ValuedItemComponent setNet(Money value) { 938 this.net = value; 939 return this; 940 } 941 942 protected void listChildren(List<Property> childrenList) { 943 super.listChildren(childrenList); 944 childrenList.add(new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Valued Item that may be priced.", 0, java.lang.Integer.MAX_VALUE, entity)); 945 childrenList.add(new Property("identifier", "Identifier", "Identifies a Contract Valued Item instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 946 childrenList.add(new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract ValuedItem information is effective.", 0, java.lang.Integer.MAX_VALUE, effectiveTime)); 947 childrenList.add(new Property("quantity", "SimpleQuantity", "Specifies the units by which the Contract Valued Item is measured or counted, and quantifies the countable or measurable Contract Valued Item instances.", 0, java.lang.Integer.MAX_VALUE, quantity)); 948 childrenList.add(new Property("unitPrice", "Money", "A Contract Valued Item unit valuation measure.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); 949 childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of the Contract Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); 950 childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Valued Item delivered. The concept of Points allows for assignment of point values for a Contract Valued Item, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); 951 childrenList.add(new Property("net", "Money", "Expresses the product of the Contract Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); 952 } 953 954 @Override 955 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 956 switch (hash) { 957 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : new Base[] {this.entity}; // Type 958 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 959 case -929905388: /*effectiveTime*/ return this.effectiveTime == null ? new Base[0] : new Base[] {this.effectiveTime}; // DateTimeType 960 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 961 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 962 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 963 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 964 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 965 default: return super.getProperty(hash, name, checkValid); 966 } 967 968 } 969 970 @Override 971 public void setProperty(int hash, String name, Base value) throws FHIRException { 972 switch (hash) { 973 case -1298275357: // entity 974 this.entity = (Type) value; // Type 975 break; 976 case -1618432855: // identifier 977 this.identifier = castToIdentifier(value); // Identifier 978 break; 979 case -929905388: // effectiveTime 980 this.effectiveTime = castToDateTime(value); // DateTimeType 981 break; 982 case -1285004149: // quantity 983 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 984 break; 985 case -486196699: // unitPrice 986 this.unitPrice = castToMoney(value); // Money 987 break; 988 case -1282148017: // factor 989 this.factor = castToDecimal(value); // DecimalType 990 break; 991 case -982754077: // points 992 this.points = castToDecimal(value); // DecimalType 993 break; 994 case 108957: // net 995 this.net = castToMoney(value); // Money 996 break; 997 default: super.setProperty(hash, name, value); 998 } 999 1000 } 1001 1002 @Override 1003 public void setProperty(String name, Base value) throws FHIRException { 1004 if (name.equals("entity[x]")) 1005 this.entity = (Type) value; // Type 1006 else if (name.equals("identifier")) 1007 this.identifier = castToIdentifier(value); // Identifier 1008 else if (name.equals("effectiveTime")) 1009 this.effectiveTime = castToDateTime(value); // DateTimeType 1010 else if (name.equals("quantity")) 1011 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 1012 else if (name.equals("unitPrice")) 1013 this.unitPrice = castToMoney(value); // Money 1014 else if (name.equals("factor")) 1015 this.factor = castToDecimal(value); // DecimalType 1016 else if (name.equals("points")) 1017 this.points = castToDecimal(value); // DecimalType 1018 else if (name.equals("net")) 1019 this.net = castToMoney(value); // Money 1020 else 1021 super.setProperty(name, value); 1022 } 1023 1024 @Override 1025 public Base makeProperty(int hash, String name) throws FHIRException { 1026 switch (hash) { 1027 case -740568643: return getEntity(); // Type 1028 case -1618432855: return getIdentifier(); // Identifier 1029 case -929905388: throw new FHIRException("Cannot make property effectiveTime as it is not a complex type"); // DateTimeType 1030 case -1285004149: return getQuantity(); // SimpleQuantity 1031 case -486196699: return getUnitPrice(); // Money 1032 case -1282148017: throw new FHIRException("Cannot make property factor as it is not a complex type"); // DecimalType 1033 case -982754077: throw new FHIRException("Cannot make property points as it is not a complex type"); // DecimalType 1034 case 108957: return getNet(); // Money 1035 default: return super.makeProperty(hash, name); 1036 } 1037 1038 } 1039 1040 @Override 1041 public Base addChild(String name) throws FHIRException { 1042 if (name.equals("entityCodeableConcept")) { 1043 this.entity = new CodeableConcept(); 1044 return this.entity; 1045 } 1046 else if (name.equals("entityReference")) { 1047 this.entity = new Reference(); 1048 return this.entity; 1049 } 1050 else if (name.equals("identifier")) { 1051 this.identifier = new Identifier(); 1052 return this.identifier; 1053 } 1054 else if (name.equals("effectiveTime")) { 1055 throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); 1056 } 1057 else if (name.equals("quantity")) { 1058 this.quantity = new SimpleQuantity(); 1059 return this.quantity; 1060 } 1061 else if (name.equals("unitPrice")) { 1062 this.unitPrice = new Money(); 1063 return this.unitPrice; 1064 } 1065 else if (name.equals("factor")) { 1066 throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); 1067 } 1068 else if (name.equals("points")) { 1069 throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); 1070 } 1071 else if (name.equals("net")) { 1072 this.net = new Money(); 1073 return this.net; 1074 } 1075 else 1076 return super.addChild(name); 1077 } 1078 1079 public ValuedItemComponent copy() { 1080 ValuedItemComponent dst = new ValuedItemComponent(); 1081 copyValues(dst); 1082 dst.entity = entity == null ? null : entity.copy(); 1083 dst.identifier = identifier == null ? null : identifier.copy(); 1084 dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); 1085 dst.quantity = quantity == null ? null : quantity.copy(); 1086 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 1087 dst.factor = factor == null ? null : factor.copy(); 1088 dst.points = points == null ? null : points.copy(); 1089 dst.net = net == null ? null : net.copy(); 1090 return dst; 1091 } 1092 1093 @Override 1094 public boolean equalsDeep(Base other) { 1095 if (!super.equalsDeep(other)) 1096 return false; 1097 if (!(other instanceof ValuedItemComponent)) 1098 return false; 1099 ValuedItemComponent o = (ValuedItemComponent) other; 1100 return compareDeep(entity, o.entity, true) && compareDeep(identifier, o.identifier, true) && compareDeep(effectiveTime, o.effectiveTime, true) 1101 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 1102 && compareDeep(points, o.points, true) && compareDeep(net, o.net, true); 1103 } 1104 1105 @Override 1106 public boolean equalsShallow(Base other) { 1107 if (!super.equalsShallow(other)) 1108 return false; 1109 if (!(other instanceof ValuedItemComponent)) 1110 return false; 1111 ValuedItemComponent o = (ValuedItemComponent) other; 1112 return compareValues(effectiveTime, o.effectiveTime, true) && compareValues(factor, o.factor, true) 1113 && compareValues(points, o.points, true); 1114 } 1115 1116 public boolean isEmpty() { 1117 return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty()) 1118 && (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty()) 1119 && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) 1120 && (net == null || net.isEmpty()); 1121 } 1122 1123 public String fhirType() { 1124 return "Contract.valuedItem"; 1125 1126 } 1127 1128 } 1129 1130 @Block() 1131 public static class TermComponent extends BackboneElement implements IBaseBackboneElement { 1132 /** 1133 * Unique identifier for this particular Contract Provision. 1134 */ 1135 @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=1, modifier=false, summary=true) 1136 @Description(shortDefinition="Contract Term identifier", formalDefinition="Unique identifier for this particular Contract Provision." ) 1137 protected Identifier identifier; 1138 1139 /** 1140 * When this Contract Provision was issued. 1141 */ 1142 @Child(name = "issued", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1143 @Description(shortDefinition="Contract Term Issue Date Time", formalDefinition="When this Contract Provision was issued." ) 1144 protected DateTimeType issued; 1145 1146 /** 1147 * Relevant time or time-period when this Contract Provision is applicable. 1148 */ 1149 @Child(name = "applies", type = {Period.class}, order=3, min=0, max=1, modifier=false, summary=true) 1150 @Description(shortDefinition="Contract Term Effective Time", formalDefinition="Relevant time or time-period when this Contract Provision is applicable." ) 1151 protected Period applies; 1152 1153 /** 1154 * Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit. 1155 */ 1156 @Child(name = "type", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false) 1157 @Description(shortDefinition="Contract Term Type", formalDefinition="Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit." ) 1158 protected CodeableConcept type; 1159 1160 /** 1161 * Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment. 1162 */ 1163 @Child(name = "subType", type = {CodeableConcept.class}, order=5, min=0, max=1, modifier=false, summary=false) 1164 @Description(shortDefinition="Contract Term Subtype", formalDefinition="Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment." ) 1165 protected CodeableConcept subType; 1166 1167 /** 1168 * The matter of concern in the context of this provision of the agrement. 1169 */ 1170 @Child(name = "topic", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1171 @Description(shortDefinition="Context of the Contract term", formalDefinition="The matter of concern in the context of this provision of the agrement." ) 1172 protected List<Reference> topic; 1173 /** 1174 * The actual objects that are the target of the reference (The matter of concern in the context of this provision of the agrement.) 1175 */ 1176 protected List<Resource> topicTarget; 1177 1178 1179 /** 1180 * Action stipulated by this Contract Provision. 1181 */ 1182 @Child(name = "action", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1183 @Description(shortDefinition="Contract Term Action", formalDefinition="Action stipulated by this Contract Provision." ) 1184 protected List<CodeableConcept> action; 1185 1186 /** 1187 * Reason or purpose for the action stipulated by this Contract Provision. 1188 */ 1189 @Child(name = "actionReason", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1190 @Description(shortDefinition="Contract Term Action Reason", formalDefinition="Reason or purpose for the action stipulated by this Contract Provision." ) 1191 protected List<CodeableConcept> actionReason; 1192 1193 /** 1194 * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. 1195 */ 1196 @Child(name = "agent", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1197 @Description(shortDefinition="Contract Term Agent List", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) 1198 protected List<TermAgentComponent> agent; 1199 1200 /** 1201 * Human readable form of this Contract Provision. 1202 */ 1203 @Child(name = "text", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 1204 @Description(shortDefinition="Human readable Contract term text", formalDefinition="Human readable form of this Contract Provision." ) 1205 protected StringType text; 1206 1207 /** 1208 * Contract Provision Valued Item List. 1209 */ 1210 @Child(name = "valuedItem", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1211 @Description(shortDefinition="Contract Term Valued Item", formalDefinition="Contract Provision Valued Item List." ) 1212 protected List<TermValuedItemComponent> valuedItem; 1213 1214 /** 1215 * Nested group of Contract Provisions. 1216 */ 1217 @Child(name = "group", type = {TermComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1218 @Description(shortDefinition="Nested Contract Term Group", formalDefinition="Nested group of Contract Provisions." ) 1219 protected List<TermComponent> group; 1220 1221 private static final long serialVersionUID = -1949614999L; 1222 1223 /** 1224 * Constructor 1225 */ 1226 public TermComponent() { 1227 super(); 1228 } 1229 1230 /** 1231 * @return {@link #identifier} (Unique identifier for this particular Contract Provision.) 1232 */ 1233 public Identifier getIdentifier() { 1234 if (this.identifier == null) 1235 if (Configuration.errorOnAutoCreate()) 1236 throw new Error("Attempt to auto-create TermComponent.identifier"); 1237 else if (Configuration.doAutoCreate()) 1238 this.identifier = new Identifier(); // cc 1239 return this.identifier; 1240 } 1241 1242 public boolean hasIdentifier() { 1243 return this.identifier != null && !this.identifier.isEmpty(); 1244 } 1245 1246 /** 1247 * @param value {@link #identifier} (Unique identifier for this particular Contract Provision.) 1248 */ 1249 public TermComponent setIdentifier(Identifier value) { 1250 this.identifier = value; 1251 return this; 1252 } 1253 1254 /** 1255 * @return {@link #issued} (When this Contract Provision was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 1256 */ 1257 public DateTimeType getIssuedElement() { 1258 if (this.issued == null) 1259 if (Configuration.errorOnAutoCreate()) 1260 throw new Error("Attempt to auto-create TermComponent.issued"); 1261 else if (Configuration.doAutoCreate()) 1262 this.issued = new DateTimeType(); // bb 1263 return this.issued; 1264 } 1265 1266 public boolean hasIssuedElement() { 1267 return this.issued != null && !this.issued.isEmpty(); 1268 } 1269 1270 public boolean hasIssued() { 1271 return this.issued != null && !this.issued.isEmpty(); 1272 } 1273 1274 /** 1275 * @param value {@link #issued} (When this Contract Provision was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 1276 */ 1277 public TermComponent setIssuedElement(DateTimeType value) { 1278 this.issued = value; 1279 return this; 1280 } 1281 1282 /** 1283 * @return When this Contract Provision was issued. 1284 */ 1285 public Date getIssued() { 1286 return this.issued == null ? null : this.issued.getValue(); 1287 } 1288 1289 /** 1290 * @param value When this Contract Provision was issued. 1291 */ 1292 public TermComponent setIssued(Date value) { 1293 if (value == null) 1294 this.issued = null; 1295 else { 1296 if (this.issued == null) 1297 this.issued = new DateTimeType(); 1298 this.issued.setValue(value); 1299 } 1300 return this; 1301 } 1302 1303 /** 1304 * @return {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) 1305 */ 1306 public Period getApplies() { 1307 if (this.applies == null) 1308 if (Configuration.errorOnAutoCreate()) 1309 throw new Error("Attempt to auto-create TermComponent.applies"); 1310 else if (Configuration.doAutoCreate()) 1311 this.applies = new Period(); // cc 1312 return this.applies; 1313 } 1314 1315 public boolean hasApplies() { 1316 return this.applies != null && !this.applies.isEmpty(); 1317 } 1318 1319 /** 1320 * @param value {@link #applies} (Relevant time or time-period when this Contract Provision is applicable.) 1321 */ 1322 public TermComponent setApplies(Period value) { 1323 this.applies = value; 1324 return this; 1325 } 1326 1327 /** 1328 * @return {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) 1329 */ 1330 public CodeableConcept getType() { 1331 if (this.type == null) 1332 if (Configuration.errorOnAutoCreate()) 1333 throw new Error("Attempt to auto-create TermComponent.type"); 1334 else if (Configuration.doAutoCreate()) 1335 this.type = new CodeableConcept(); // cc 1336 return this.type; 1337 } 1338 1339 public boolean hasType() { 1340 return this.type != null && !this.type.isEmpty(); 1341 } 1342 1343 /** 1344 * @param value {@link #type} (Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.) 1345 */ 1346 public TermComponent setType(CodeableConcept value) { 1347 this.type = value; 1348 return this; 1349 } 1350 1351 /** 1352 * @return {@link #subType} (Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.) 1353 */ 1354 public CodeableConcept getSubType() { 1355 if (this.subType == null) 1356 if (Configuration.errorOnAutoCreate()) 1357 throw new Error("Attempt to auto-create TermComponent.subType"); 1358 else if (Configuration.doAutoCreate()) 1359 this.subType = new CodeableConcept(); // cc 1360 return this.subType; 1361 } 1362 1363 public boolean hasSubType() { 1364 return this.subType != null && !this.subType.isEmpty(); 1365 } 1366 1367 /** 1368 * @param value {@link #subType} (Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.) 1369 */ 1370 public TermComponent setSubType(CodeableConcept value) { 1371 this.subType = value; 1372 return this; 1373 } 1374 1375 /** 1376 * @return {@link #topic} (The matter of concern in the context of this provision of the agrement.) 1377 */ 1378 public List<Reference> getTopic() { 1379 if (this.topic == null) 1380 this.topic = new ArrayList<Reference>(); 1381 return this.topic; 1382 } 1383 1384 public boolean hasTopic() { 1385 if (this.topic == null) 1386 return false; 1387 for (Reference item : this.topic) 1388 if (!item.isEmpty()) 1389 return true; 1390 return false; 1391 } 1392 1393 /** 1394 * @return {@link #topic} (The matter of concern in the context of this provision of the agrement.) 1395 */ 1396 // syntactic sugar 1397 public Reference addTopic() { //3 1398 Reference t = new Reference(); 1399 if (this.topic == null) 1400 this.topic = new ArrayList<Reference>(); 1401 this.topic.add(t); 1402 return t; 1403 } 1404 1405 // syntactic sugar 1406 public TermComponent addTopic(Reference t) { //3 1407 if (t == null) 1408 return this; 1409 if (this.topic == null) 1410 this.topic = new ArrayList<Reference>(); 1411 this.topic.add(t); 1412 return this; 1413 } 1414 1415 /** 1416 * @return {@link #topic} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The matter of concern in the context of this provision of the agrement.) 1417 */ 1418 public List<Resource> getTopicTarget() { 1419 if (this.topicTarget == null) 1420 this.topicTarget = new ArrayList<Resource>(); 1421 return this.topicTarget; 1422 } 1423 1424 /** 1425 * @return {@link #action} (Action stipulated by this Contract Provision.) 1426 */ 1427 public List<CodeableConcept> getAction() { 1428 if (this.action == null) 1429 this.action = new ArrayList<CodeableConcept>(); 1430 return this.action; 1431 } 1432 1433 public boolean hasAction() { 1434 if (this.action == null) 1435 return false; 1436 for (CodeableConcept item : this.action) 1437 if (!item.isEmpty()) 1438 return true; 1439 return false; 1440 } 1441 1442 /** 1443 * @return {@link #action} (Action stipulated by this Contract Provision.) 1444 */ 1445 // syntactic sugar 1446 public CodeableConcept addAction() { //3 1447 CodeableConcept t = new CodeableConcept(); 1448 if (this.action == null) 1449 this.action = new ArrayList<CodeableConcept>(); 1450 this.action.add(t); 1451 return t; 1452 } 1453 1454 // syntactic sugar 1455 public TermComponent addAction(CodeableConcept t) { //3 1456 if (t == null) 1457 return this; 1458 if (this.action == null) 1459 this.action = new ArrayList<CodeableConcept>(); 1460 this.action.add(t); 1461 return this; 1462 } 1463 1464 /** 1465 * @return {@link #actionReason} (Reason or purpose for the action stipulated by this Contract Provision.) 1466 */ 1467 public List<CodeableConcept> getActionReason() { 1468 if (this.actionReason == null) 1469 this.actionReason = new ArrayList<CodeableConcept>(); 1470 return this.actionReason; 1471 } 1472 1473 public boolean hasActionReason() { 1474 if (this.actionReason == null) 1475 return false; 1476 for (CodeableConcept item : this.actionReason) 1477 if (!item.isEmpty()) 1478 return true; 1479 return false; 1480 } 1481 1482 /** 1483 * @return {@link #actionReason} (Reason or purpose for the action stipulated by this Contract Provision.) 1484 */ 1485 // syntactic sugar 1486 public CodeableConcept addActionReason() { //3 1487 CodeableConcept t = new CodeableConcept(); 1488 if (this.actionReason == null) 1489 this.actionReason = new ArrayList<CodeableConcept>(); 1490 this.actionReason.add(t); 1491 return t; 1492 } 1493 1494 // syntactic sugar 1495 public TermComponent addActionReason(CodeableConcept t) { //3 1496 if (t == null) 1497 return this; 1498 if (this.actionReason == null) 1499 this.actionReason = new ArrayList<CodeableConcept>(); 1500 this.actionReason.add(t); 1501 return this; 1502 } 1503 1504 /** 1505 * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) 1506 */ 1507 public List<TermAgentComponent> getAgent() { 1508 if (this.agent == null) 1509 this.agent = new ArrayList<TermAgentComponent>(); 1510 return this.agent; 1511 } 1512 1513 public boolean hasAgent() { 1514 if (this.agent == null) 1515 return false; 1516 for (TermAgentComponent item : this.agent) 1517 if (!item.isEmpty()) 1518 return true; 1519 return false; 1520 } 1521 1522 /** 1523 * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) 1524 */ 1525 // syntactic sugar 1526 public TermAgentComponent addAgent() { //3 1527 TermAgentComponent t = new TermAgentComponent(); 1528 if (this.agent == null) 1529 this.agent = new ArrayList<TermAgentComponent>(); 1530 this.agent.add(t); 1531 return t; 1532 } 1533 1534 // syntactic sugar 1535 public TermComponent addAgent(TermAgentComponent t) { //3 1536 if (t == null) 1537 return this; 1538 if (this.agent == null) 1539 this.agent = new ArrayList<TermAgentComponent>(); 1540 this.agent.add(t); 1541 return this; 1542 } 1543 1544 /** 1545 * @return {@link #text} (Human readable form of this Contract Provision.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 1546 */ 1547 public StringType getTextElement() { 1548 if (this.text == null) 1549 if (Configuration.errorOnAutoCreate()) 1550 throw new Error("Attempt to auto-create TermComponent.text"); 1551 else if (Configuration.doAutoCreate()) 1552 this.text = new StringType(); // bb 1553 return this.text; 1554 } 1555 1556 public boolean hasTextElement() { 1557 return this.text != null && !this.text.isEmpty(); 1558 } 1559 1560 public boolean hasText() { 1561 return this.text != null && !this.text.isEmpty(); 1562 } 1563 1564 /** 1565 * @param value {@link #text} (Human readable form of this Contract Provision.). This is the underlying object with id, value and extensions. The accessor "getText" gives direct access to the value 1566 */ 1567 public TermComponent setTextElement(StringType value) { 1568 this.text = value; 1569 return this; 1570 } 1571 1572 /** 1573 * @return Human readable form of this Contract Provision. 1574 */ 1575 public String getText() { 1576 return this.text == null ? null : this.text.getValue(); 1577 } 1578 1579 /** 1580 * @param value Human readable form of this Contract Provision. 1581 */ 1582 public TermComponent setText(String value) { 1583 if (Utilities.noString(value)) 1584 this.text = null; 1585 else { 1586 if (this.text == null) 1587 this.text = new StringType(); 1588 this.text.setValue(value); 1589 } 1590 return this; 1591 } 1592 1593 /** 1594 * @return {@link #valuedItem} (Contract Provision Valued Item List.) 1595 */ 1596 public List<TermValuedItemComponent> getValuedItem() { 1597 if (this.valuedItem == null) 1598 this.valuedItem = new ArrayList<TermValuedItemComponent>(); 1599 return this.valuedItem; 1600 } 1601 1602 public boolean hasValuedItem() { 1603 if (this.valuedItem == null) 1604 return false; 1605 for (TermValuedItemComponent item : this.valuedItem) 1606 if (!item.isEmpty()) 1607 return true; 1608 return false; 1609 } 1610 1611 /** 1612 * @return {@link #valuedItem} (Contract Provision Valued Item List.) 1613 */ 1614 // syntactic sugar 1615 public TermValuedItemComponent addValuedItem() { //3 1616 TermValuedItemComponent t = new TermValuedItemComponent(); 1617 if (this.valuedItem == null) 1618 this.valuedItem = new ArrayList<TermValuedItemComponent>(); 1619 this.valuedItem.add(t); 1620 return t; 1621 } 1622 1623 // syntactic sugar 1624 public TermComponent addValuedItem(TermValuedItemComponent t) { //3 1625 if (t == null) 1626 return this; 1627 if (this.valuedItem == null) 1628 this.valuedItem = new ArrayList<TermValuedItemComponent>(); 1629 this.valuedItem.add(t); 1630 return this; 1631 } 1632 1633 /** 1634 * @return {@link #group} (Nested group of Contract Provisions.) 1635 */ 1636 public List<TermComponent> getGroup() { 1637 if (this.group == null) 1638 this.group = new ArrayList<TermComponent>(); 1639 return this.group; 1640 } 1641 1642 public boolean hasGroup() { 1643 if (this.group == null) 1644 return false; 1645 for (TermComponent item : this.group) 1646 if (!item.isEmpty()) 1647 return true; 1648 return false; 1649 } 1650 1651 /** 1652 * @return {@link #group} (Nested group of Contract Provisions.) 1653 */ 1654 // syntactic sugar 1655 public TermComponent addGroup() { //3 1656 TermComponent t = new TermComponent(); 1657 if (this.group == null) 1658 this.group = new ArrayList<TermComponent>(); 1659 this.group.add(t); 1660 return t; 1661 } 1662 1663 // syntactic sugar 1664 public TermComponent addGroup(TermComponent t) { //3 1665 if (t == null) 1666 return this; 1667 if (this.group == null) 1668 this.group = new ArrayList<TermComponent>(); 1669 this.group.add(t); 1670 return this; 1671 } 1672 1673 protected void listChildren(List<Property> childrenList) { 1674 super.listChildren(childrenList); 1675 childrenList.add(new Property("identifier", "Identifier", "Unique identifier for this particular Contract Provision.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1676 childrenList.add(new Property("issued", "dateTime", "When this Contract Provision was issued.", 0, java.lang.Integer.MAX_VALUE, issued)); 1677 childrenList.add(new Property("applies", "Period", "Relevant time or time-period when this Contract Provision is applicable.", 0, java.lang.Integer.MAX_VALUE, applies)); 1678 childrenList.add(new Property("type", "CodeableConcept", "Type of Contract Provision such as specific requirements, purposes for actions, obligations, prohibitions, e.g. life time maximum benefit.", 0, java.lang.Integer.MAX_VALUE, type)); 1679 childrenList.add(new Property("subType", "CodeableConcept", "Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.", 0, java.lang.Integer.MAX_VALUE, subType)); 1680 childrenList.add(new Property("topic", "Reference(Any)", "The matter of concern in the context of this provision of the agrement.", 0, java.lang.Integer.MAX_VALUE, topic)); 1681 childrenList.add(new Property("action", "CodeableConcept", "Action stipulated by this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, action)); 1682 childrenList.add(new Property("actionReason", "CodeableConcept", "Reason or purpose for the action stipulated by this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, actionReason)); 1683 childrenList.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); 1684 childrenList.add(new Property("text", "string", "Human readable form of this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, text)); 1685 childrenList.add(new Property("valuedItem", "", "Contract Provision Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); 1686 childrenList.add(new Property("group", "@Contract.term", "Nested group of Contract Provisions.", 0, java.lang.Integer.MAX_VALUE, group)); 1687 } 1688 1689 @Override 1690 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1691 switch (hash) { 1692 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1693 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // DateTimeType 1694 case -793235316: /*applies*/ return this.applies == null ? new Base[0] : new Base[] {this.applies}; // Period 1695 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 1696 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : new Base[] {this.subType}; // CodeableConcept 1697 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // Reference 1698 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // CodeableConcept 1699 case 1465121818: /*actionReason*/ return this.actionReason == null ? new Base[0] : this.actionReason.toArray(new Base[this.actionReason.size()]); // CodeableConcept 1700 case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // TermAgentComponent 1701 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType 1702 case 2046675654: /*valuedItem*/ return this.valuedItem == null ? new Base[0] : this.valuedItem.toArray(new Base[this.valuedItem.size()]); // TermValuedItemComponent 1703 case 98629247: /*group*/ return this.group == null ? new Base[0] : this.group.toArray(new Base[this.group.size()]); // TermComponent 1704 default: return super.getProperty(hash, name, checkValid); 1705 } 1706 1707 } 1708 1709 @Override 1710 public void setProperty(int hash, String name, Base value) throws FHIRException { 1711 switch (hash) { 1712 case -1618432855: // identifier 1713 this.identifier = castToIdentifier(value); // Identifier 1714 break; 1715 case -1179159893: // issued 1716 this.issued = castToDateTime(value); // DateTimeType 1717 break; 1718 case -793235316: // applies 1719 this.applies = castToPeriod(value); // Period 1720 break; 1721 case 3575610: // type 1722 this.type = castToCodeableConcept(value); // CodeableConcept 1723 break; 1724 case -1868521062: // subType 1725 this.subType = castToCodeableConcept(value); // CodeableConcept 1726 break; 1727 case 110546223: // topic 1728 this.getTopic().add(castToReference(value)); // Reference 1729 break; 1730 case -1422950858: // action 1731 this.getAction().add(castToCodeableConcept(value)); // CodeableConcept 1732 break; 1733 case 1465121818: // actionReason 1734 this.getActionReason().add(castToCodeableConcept(value)); // CodeableConcept 1735 break; 1736 case 92750597: // agent 1737 this.getAgent().add((TermAgentComponent) value); // TermAgentComponent 1738 break; 1739 case 3556653: // text 1740 this.text = castToString(value); // StringType 1741 break; 1742 case 2046675654: // valuedItem 1743 this.getValuedItem().add((TermValuedItemComponent) value); // TermValuedItemComponent 1744 break; 1745 case 98629247: // group 1746 this.getGroup().add((TermComponent) value); // TermComponent 1747 break; 1748 default: super.setProperty(hash, name, value); 1749 } 1750 1751 } 1752 1753 @Override 1754 public void setProperty(String name, Base value) throws FHIRException { 1755 if (name.equals("identifier")) 1756 this.identifier = castToIdentifier(value); // Identifier 1757 else if (name.equals("issued")) 1758 this.issued = castToDateTime(value); // DateTimeType 1759 else if (name.equals("applies")) 1760 this.applies = castToPeriod(value); // Period 1761 else if (name.equals("type")) 1762 this.type = castToCodeableConcept(value); // CodeableConcept 1763 else if (name.equals("subType")) 1764 this.subType = castToCodeableConcept(value); // CodeableConcept 1765 else if (name.equals("topic")) 1766 this.getTopic().add(castToReference(value)); 1767 else if (name.equals("action")) 1768 this.getAction().add(castToCodeableConcept(value)); 1769 else if (name.equals("actionReason")) 1770 this.getActionReason().add(castToCodeableConcept(value)); 1771 else if (name.equals("agent")) 1772 this.getAgent().add((TermAgentComponent) value); 1773 else if (name.equals("text")) 1774 this.text = castToString(value); // StringType 1775 else if (name.equals("valuedItem")) 1776 this.getValuedItem().add((TermValuedItemComponent) value); 1777 else if (name.equals("group")) 1778 this.getGroup().add((TermComponent) value); 1779 else 1780 super.setProperty(name, value); 1781 } 1782 1783 @Override 1784 public Base makeProperty(int hash, String name) throws FHIRException { 1785 switch (hash) { 1786 case -1618432855: return getIdentifier(); // Identifier 1787 case -1179159893: throw new FHIRException("Cannot make property issued as it is not a complex type"); // DateTimeType 1788 case -793235316: return getApplies(); // Period 1789 case 3575610: return getType(); // CodeableConcept 1790 case -1868521062: return getSubType(); // CodeableConcept 1791 case 110546223: return addTopic(); // Reference 1792 case -1422950858: return addAction(); // CodeableConcept 1793 case 1465121818: return addActionReason(); // CodeableConcept 1794 case 92750597: return addAgent(); // TermAgentComponent 1795 case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType 1796 case 2046675654: return addValuedItem(); // TermValuedItemComponent 1797 case 98629247: return addGroup(); // TermComponent 1798 default: return super.makeProperty(hash, name); 1799 } 1800 1801 } 1802 1803 @Override 1804 public Base addChild(String name) throws FHIRException { 1805 if (name.equals("identifier")) { 1806 this.identifier = new Identifier(); 1807 return this.identifier; 1808 } 1809 else if (name.equals("issued")) { 1810 throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); 1811 } 1812 else if (name.equals("applies")) { 1813 this.applies = new Period(); 1814 return this.applies; 1815 } 1816 else if (name.equals("type")) { 1817 this.type = new CodeableConcept(); 1818 return this.type; 1819 } 1820 else if (name.equals("subType")) { 1821 this.subType = new CodeableConcept(); 1822 return this.subType; 1823 } 1824 else if (name.equals("topic")) { 1825 return addTopic(); 1826 } 1827 else if (name.equals("action")) { 1828 return addAction(); 1829 } 1830 else if (name.equals("actionReason")) { 1831 return addActionReason(); 1832 } 1833 else if (name.equals("agent")) { 1834 return addAgent(); 1835 } 1836 else if (name.equals("text")) { 1837 throw new FHIRException("Cannot call addChild on a primitive type Contract.text"); 1838 } 1839 else if (name.equals("valuedItem")) { 1840 return addValuedItem(); 1841 } 1842 else if (name.equals("group")) { 1843 return addGroup(); 1844 } 1845 else 1846 return super.addChild(name); 1847 } 1848 1849 public TermComponent copy() { 1850 TermComponent dst = new TermComponent(); 1851 copyValues(dst); 1852 dst.identifier = identifier == null ? null : identifier.copy(); 1853 dst.issued = issued == null ? null : issued.copy(); 1854 dst.applies = applies == null ? null : applies.copy(); 1855 dst.type = type == null ? null : type.copy(); 1856 dst.subType = subType == null ? null : subType.copy(); 1857 if (topic != null) { 1858 dst.topic = new ArrayList<Reference>(); 1859 for (Reference i : topic) 1860 dst.topic.add(i.copy()); 1861 }; 1862 if (action != null) { 1863 dst.action = new ArrayList<CodeableConcept>(); 1864 for (CodeableConcept i : action) 1865 dst.action.add(i.copy()); 1866 }; 1867 if (actionReason != null) { 1868 dst.actionReason = new ArrayList<CodeableConcept>(); 1869 for (CodeableConcept i : actionReason) 1870 dst.actionReason.add(i.copy()); 1871 }; 1872 if (agent != null) { 1873 dst.agent = new ArrayList<TermAgentComponent>(); 1874 for (TermAgentComponent i : agent) 1875 dst.agent.add(i.copy()); 1876 }; 1877 dst.text = text == null ? null : text.copy(); 1878 if (valuedItem != null) { 1879 dst.valuedItem = new ArrayList<TermValuedItemComponent>(); 1880 for (TermValuedItemComponent i : valuedItem) 1881 dst.valuedItem.add(i.copy()); 1882 }; 1883 if (group != null) { 1884 dst.group = new ArrayList<TermComponent>(); 1885 for (TermComponent i : group) 1886 dst.group.add(i.copy()); 1887 }; 1888 return dst; 1889 } 1890 1891 @Override 1892 public boolean equalsDeep(Base other) { 1893 if (!super.equalsDeep(other)) 1894 return false; 1895 if (!(other instanceof TermComponent)) 1896 return false; 1897 TermComponent o = (TermComponent) other; 1898 return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) 1899 && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(topic, o.topic, true) 1900 && compareDeep(action, o.action, true) && compareDeep(actionReason, o.actionReason, true) && compareDeep(agent, o.agent, true) 1901 && compareDeep(text, o.text, true) && compareDeep(valuedItem, o.valuedItem, true) && compareDeep(group, o.group, true) 1902 ; 1903 } 1904 1905 @Override 1906 public boolean equalsShallow(Base other) { 1907 if (!super.equalsShallow(other)) 1908 return false; 1909 if (!(other instanceof TermComponent)) 1910 return false; 1911 TermComponent o = (TermComponent) other; 1912 return compareValues(issued, o.issued, true) && compareValues(text, o.text, true); 1913 } 1914 1915 public boolean isEmpty() { 1916 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty()) 1917 && (applies == null || applies.isEmpty()) && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty()) 1918 && (topic == null || topic.isEmpty()) && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty()) 1919 && (agent == null || agent.isEmpty()) && (text == null || text.isEmpty()) && (valuedItem == null || valuedItem.isEmpty()) 1920 && (group == null || group.isEmpty()); 1921 } 1922 1923 public String fhirType() { 1924 return "Contract.term"; 1925 1926 } 1927 1928 } 1929 1930 @Block() 1931 public static class TermAgentComponent extends BackboneElement implements IBaseBackboneElement { 1932 /** 1933 * The agent assigned a role in this Contract Provision. 1934 */ 1935 @Child(name = "actor", type = {Contract.class, Device.class, Group.class, Location.class, Organization.class, Patient.class, Practitioner.class, RelatedPerson.class, Substance.class}, order=1, min=1, max=1, modifier=false, summary=false) 1936 @Description(shortDefinition="Contract Term Agent List", formalDefinition="The agent assigned a role in this Contract Provision." ) 1937 protected Reference actor; 1938 1939 /** 1940 * The actual object that is the target of the reference (The agent assigned a role in this Contract Provision.) 1941 */ 1942 protected Resource actorTarget; 1943 1944 /** 1945 * Role played by the agent assigned this role in the execution of this Contract Provision. 1946 */ 1947 @Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1948 @Description(shortDefinition="Contract Term Agent Role", formalDefinition="Role played by the agent assigned this role in the execution of this Contract Provision." ) 1949 protected List<CodeableConcept> role; 1950 1951 private static final long serialVersionUID = -454551165L; 1952 1953 /** 1954 * Constructor 1955 */ 1956 public TermAgentComponent() { 1957 super(); 1958 } 1959 1960 /** 1961 * Constructor 1962 */ 1963 public TermAgentComponent(Reference actor) { 1964 super(); 1965 this.actor = actor; 1966 } 1967 1968 /** 1969 * @return {@link #actor} (The agent assigned a role in this Contract Provision.) 1970 */ 1971 public Reference getActor() { 1972 if (this.actor == null) 1973 if (Configuration.errorOnAutoCreate()) 1974 throw new Error("Attempt to auto-create TermAgentComponent.actor"); 1975 else if (Configuration.doAutoCreate()) 1976 this.actor = new Reference(); // cc 1977 return this.actor; 1978 } 1979 1980 public boolean hasActor() { 1981 return this.actor != null && !this.actor.isEmpty(); 1982 } 1983 1984 /** 1985 * @param value {@link #actor} (The agent assigned a role in this Contract Provision.) 1986 */ 1987 public TermAgentComponent setActor(Reference value) { 1988 this.actor = value; 1989 return this; 1990 } 1991 1992 /** 1993 * @return {@link #actor} 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 agent assigned a role in this Contract Provision.) 1994 */ 1995 public Resource getActorTarget() { 1996 return this.actorTarget; 1997 } 1998 1999 /** 2000 * @param value {@link #actor} 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 agent assigned a role in this Contract Provision.) 2001 */ 2002 public TermAgentComponent setActorTarget(Resource value) { 2003 this.actorTarget = value; 2004 return this; 2005 } 2006 2007 /** 2008 * @return {@link #role} (Role played by the agent assigned this role in the execution of this Contract Provision.) 2009 */ 2010 public List<CodeableConcept> getRole() { 2011 if (this.role == null) 2012 this.role = new ArrayList<CodeableConcept>(); 2013 return this.role; 2014 } 2015 2016 public boolean hasRole() { 2017 if (this.role == null) 2018 return false; 2019 for (CodeableConcept item : this.role) 2020 if (!item.isEmpty()) 2021 return true; 2022 return false; 2023 } 2024 2025 /** 2026 * @return {@link #role} (Role played by the agent assigned this role in the execution of this Contract Provision.) 2027 */ 2028 // syntactic sugar 2029 public CodeableConcept addRole() { //3 2030 CodeableConcept t = new CodeableConcept(); 2031 if (this.role == null) 2032 this.role = new ArrayList<CodeableConcept>(); 2033 this.role.add(t); 2034 return t; 2035 } 2036 2037 // syntactic sugar 2038 public TermAgentComponent addRole(CodeableConcept t) { //3 2039 if (t == null) 2040 return this; 2041 if (this.role == null) 2042 this.role = new ArrayList<CodeableConcept>(); 2043 this.role.add(t); 2044 return this; 2045 } 2046 2047 protected void listChildren(List<Property> childrenList) { 2048 super.listChildren(childrenList); 2049 childrenList.add(new Property("actor", "Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)", "The agent assigned a role in this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, actor)); 2050 childrenList.add(new Property("role", "CodeableConcept", "Role played by the agent assigned this role in the execution of this Contract Provision.", 0, java.lang.Integer.MAX_VALUE, role)); 2051 } 2052 2053 @Override 2054 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2055 switch (hash) { 2056 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 2057 case 3506294: /*role*/ return this.role == null ? new Base[0] : this.role.toArray(new Base[this.role.size()]); // CodeableConcept 2058 default: return super.getProperty(hash, name, checkValid); 2059 } 2060 2061 } 2062 2063 @Override 2064 public void setProperty(int hash, String name, Base value) throws FHIRException { 2065 switch (hash) { 2066 case 92645877: // actor 2067 this.actor = castToReference(value); // Reference 2068 break; 2069 case 3506294: // role 2070 this.getRole().add(castToCodeableConcept(value)); // CodeableConcept 2071 break; 2072 default: super.setProperty(hash, name, value); 2073 } 2074 2075 } 2076 2077 @Override 2078 public void setProperty(String name, Base value) throws FHIRException { 2079 if (name.equals("actor")) 2080 this.actor = castToReference(value); // Reference 2081 else if (name.equals("role")) 2082 this.getRole().add(castToCodeableConcept(value)); 2083 else 2084 super.setProperty(name, value); 2085 } 2086 2087 @Override 2088 public Base makeProperty(int hash, String name) throws FHIRException { 2089 switch (hash) { 2090 case 92645877: return getActor(); // Reference 2091 case 3506294: return addRole(); // CodeableConcept 2092 default: return super.makeProperty(hash, name); 2093 } 2094 2095 } 2096 2097 @Override 2098 public Base addChild(String name) throws FHIRException { 2099 if (name.equals("actor")) { 2100 this.actor = new Reference(); 2101 return this.actor; 2102 } 2103 else if (name.equals("role")) { 2104 return addRole(); 2105 } 2106 else 2107 return super.addChild(name); 2108 } 2109 2110 public TermAgentComponent copy() { 2111 TermAgentComponent dst = new TermAgentComponent(); 2112 copyValues(dst); 2113 dst.actor = actor == null ? null : actor.copy(); 2114 if (role != null) { 2115 dst.role = new ArrayList<CodeableConcept>(); 2116 for (CodeableConcept i : role) 2117 dst.role.add(i.copy()); 2118 }; 2119 return dst; 2120 } 2121 2122 @Override 2123 public boolean equalsDeep(Base other) { 2124 if (!super.equalsDeep(other)) 2125 return false; 2126 if (!(other instanceof TermAgentComponent)) 2127 return false; 2128 TermAgentComponent o = (TermAgentComponent) other; 2129 return compareDeep(actor, o.actor, true) && compareDeep(role, o.role, true); 2130 } 2131 2132 @Override 2133 public boolean equalsShallow(Base other) { 2134 if (!super.equalsShallow(other)) 2135 return false; 2136 if (!(other instanceof TermAgentComponent)) 2137 return false; 2138 TermAgentComponent o = (TermAgentComponent) other; 2139 return true; 2140 } 2141 2142 public boolean isEmpty() { 2143 return super.isEmpty() && (actor == null || actor.isEmpty()) && (role == null || role.isEmpty()) 2144 ; 2145 } 2146 2147 public String fhirType() { 2148 return "Contract.term.agent"; 2149 2150 } 2151 2152 } 2153 2154 @Block() 2155 public static class TermValuedItemComponent extends BackboneElement implements IBaseBackboneElement { 2156 /** 2157 * Specific type of Contract Provision Valued Item that may be priced. 2158 */ 2159 @Child(name = "entity", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false) 2160 @Description(shortDefinition="Contract Term Valued Item Type", formalDefinition="Specific type of Contract Provision Valued Item that may be priced." ) 2161 protected Type entity; 2162 2163 /** 2164 * Identifies a Contract Provision Valued Item instance. 2165 */ 2166 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 2167 @Description(shortDefinition="Contract Term Valued Item Identifier", formalDefinition="Identifies a Contract Provision Valued Item instance." ) 2168 protected Identifier identifier; 2169 2170 /** 2171 * Indicates the time during which this Contract Term ValuedItem information is effective. 2172 */ 2173 @Child(name = "effectiveTime", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2174 @Description(shortDefinition="Contract Term Valued Item Effective Tiem", formalDefinition="Indicates the time during which this Contract Term ValuedItem information is effective." ) 2175 protected DateTimeType effectiveTime; 2176 2177 /** 2178 * Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances. 2179 */ 2180 @Child(name = "quantity", type = {SimpleQuantity.class}, order=4, min=0, max=1, modifier=false, summary=false) 2181 @Description(shortDefinition="Contract Term Valued Item Count", formalDefinition="Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances." ) 2182 protected SimpleQuantity quantity; 2183 2184 /** 2185 * A Contract Provision Valued Item unit valuation measure. 2186 */ 2187 @Child(name = "unitPrice", type = {Money.class}, order=5, min=0, max=1, modifier=false, summary=false) 2188 @Description(shortDefinition="Contract Term Valued Item fee, charge, or cost", formalDefinition="A Contract Provision Valued Item unit valuation measure." ) 2189 protected Money unitPrice; 2190 2191 /** 2192 * A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2193 */ 2194 @Child(name = "factor", type = {DecimalType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2195 @Description(shortDefinition="Contract Term Valued Item Price Scaling Factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 2196 protected DecimalType factor; 2197 2198 /** 2199 * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. 2200 */ 2201 @Child(name = "points", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2202 @Description(shortDefinition="Contract Term Valued Item Difficulty Scaling Factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point." ) 2203 protected DecimalType points; 2204 2205 /** 2206 * Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. 2207 */ 2208 @Child(name = "net", type = {Money.class}, order=8, min=0, max=1, modifier=false, summary=false) 2209 @Description(shortDefinition="Total Contract Term Valued Item Value", formalDefinition="Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) 2210 protected Money net; 2211 2212 private static final long serialVersionUID = 1782449516L; 2213 2214 /** 2215 * Constructor 2216 */ 2217 public TermValuedItemComponent() { 2218 super(); 2219 } 2220 2221 /** 2222 * @return {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) 2223 */ 2224 public Type getEntity() { 2225 return this.entity; 2226 } 2227 2228 /** 2229 * @return {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) 2230 */ 2231 public CodeableConcept getEntityCodeableConcept() throws FHIRException { 2232 if (!(this.entity instanceof CodeableConcept)) 2233 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.entity.getClass().getName()+" was encountered"); 2234 return (CodeableConcept) this.entity; 2235 } 2236 2237 public boolean hasEntityCodeableConcept() { 2238 return this.entity instanceof CodeableConcept; 2239 } 2240 2241 /** 2242 * @return {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) 2243 */ 2244 public Reference getEntityReference() throws FHIRException { 2245 if (!(this.entity instanceof Reference)) 2246 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.entity.getClass().getName()+" was encountered"); 2247 return (Reference) this.entity; 2248 } 2249 2250 public boolean hasEntityReference() { 2251 return this.entity instanceof Reference; 2252 } 2253 2254 public boolean hasEntity() { 2255 return this.entity != null && !this.entity.isEmpty(); 2256 } 2257 2258 /** 2259 * @param value {@link #entity} (Specific type of Contract Provision Valued Item that may be priced.) 2260 */ 2261 public TermValuedItemComponent setEntity(Type value) { 2262 this.entity = value; 2263 return this; 2264 } 2265 2266 /** 2267 * @return {@link #identifier} (Identifies a Contract Provision Valued Item instance.) 2268 */ 2269 public Identifier getIdentifier() { 2270 if (this.identifier == null) 2271 if (Configuration.errorOnAutoCreate()) 2272 throw new Error("Attempt to auto-create TermValuedItemComponent.identifier"); 2273 else if (Configuration.doAutoCreate()) 2274 this.identifier = new Identifier(); // cc 2275 return this.identifier; 2276 } 2277 2278 public boolean hasIdentifier() { 2279 return this.identifier != null && !this.identifier.isEmpty(); 2280 } 2281 2282 /** 2283 * @param value {@link #identifier} (Identifies a Contract Provision Valued Item instance.) 2284 */ 2285 public TermValuedItemComponent setIdentifier(Identifier value) { 2286 this.identifier = value; 2287 return this; 2288 } 2289 2290 /** 2291 * @return {@link #effectiveTime} (Indicates the time during which this Contract Term ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value 2292 */ 2293 public DateTimeType getEffectiveTimeElement() { 2294 if (this.effectiveTime == null) 2295 if (Configuration.errorOnAutoCreate()) 2296 throw new Error("Attempt to auto-create TermValuedItemComponent.effectiveTime"); 2297 else if (Configuration.doAutoCreate()) 2298 this.effectiveTime = new DateTimeType(); // bb 2299 return this.effectiveTime; 2300 } 2301 2302 public boolean hasEffectiveTimeElement() { 2303 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 2304 } 2305 2306 public boolean hasEffectiveTime() { 2307 return this.effectiveTime != null && !this.effectiveTime.isEmpty(); 2308 } 2309 2310 /** 2311 * @param value {@link #effectiveTime} (Indicates the time during which this Contract Term ValuedItem information is effective.). This is the underlying object with id, value and extensions. The accessor "getEffectiveTime" gives direct access to the value 2312 */ 2313 public TermValuedItemComponent setEffectiveTimeElement(DateTimeType value) { 2314 this.effectiveTime = value; 2315 return this; 2316 } 2317 2318 /** 2319 * @return Indicates the time during which this Contract Term ValuedItem information is effective. 2320 */ 2321 public Date getEffectiveTime() { 2322 return this.effectiveTime == null ? null : this.effectiveTime.getValue(); 2323 } 2324 2325 /** 2326 * @param value Indicates the time during which this Contract Term ValuedItem information is effective. 2327 */ 2328 public TermValuedItemComponent setEffectiveTime(Date value) { 2329 if (value == null) 2330 this.effectiveTime = null; 2331 else { 2332 if (this.effectiveTime == null) 2333 this.effectiveTime = new DateTimeType(); 2334 this.effectiveTime.setValue(value); 2335 } 2336 return this; 2337 } 2338 2339 /** 2340 * @return {@link #quantity} (Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.) 2341 */ 2342 public SimpleQuantity getQuantity() { 2343 if (this.quantity == null) 2344 if (Configuration.errorOnAutoCreate()) 2345 throw new Error("Attempt to auto-create TermValuedItemComponent.quantity"); 2346 else if (Configuration.doAutoCreate()) 2347 this.quantity = new SimpleQuantity(); // cc 2348 return this.quantity; 2349 } 2350 2351 public boolean hasQuantity() { 2352 return this.quantity != null && !this.quantity.isEmpty(); 2353 } 2354 2355 /** 2356 * @param value {@link #quantity} (Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.) 2357 */ 2358 public TermValuedItemComponent setQuantity(SimpleQuantity value) { 2359 this.quantity = value; 2360 return this; 2361 } 2362 2363 /** 2364 * @return {@link #unitPrice} (A Contract Provision Valued Item unit valuation measure.) 2365 */ 2366 public Money getUnitPrice() { 2367 if (this.unitPrice == null) 2368 if (Configuration.errorOnAutoCreate()) 2369 throw new Error("Attempt to auto-create TermValuedItemComponent.unitPrice"); 2370 else if (Configuration.doAutoCreate()) 2371 this.unitPrice = new Money(); // cc 2372 return this.unitPrice; 2373 } 2374 2375 public boolean hasUnitPrice() { 2376 return this.unitPrice != null && !this.unitPrice.isEmpty(); 2377 } 2378 2379 /** 2380 * @param value {@link #unitPrice} (A Contract Provision Valued Item unit valuation measure.) 2381 */ 2382 public TermValuedItemComponent setUnitPrice(Money value) { 2383 this.unitPrice = value; 2384 return this; 2385 } 2386 2387 /** 2388 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 2389 */ 2390 public DecimalType getFactorElement() { 2391 if (this.factor == null) 2392 if (Configuration.errorOnAutoCreate()) 2393 throw new Error("Attempt to auto-create TermValuedItemComponent.factor"); 2394 else if (Configuration.doAutoCreate()) 2395 this.factor = new DecimalType(); // bb 2396 return this.factor; 2397 } 2398 2399 public boolean hasFactorElement() { 2400 return this.factor != null && !this.factor.isEmpty(); 2401 } 2402 2403 public boolean hasFactor() { 2404 return this.factor != null && !this.factor.isEmpty(); 2405 } 2406 2407 /** 2408 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 2409 */ 2410 public TermValuedItemComponent setFactorElement(DecimalType value) { 2411 this.factor = value; 2412 return this; 2413 } 2414 2415 /** 2416 * @return A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2417 */ 2418 public BigDecimal getFactor() { 2419 return this.factor == null ? null : this.factor.getValue(); 2420 } 2421 2422 /** 2423 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2424 */ 2425 public TermValuedItemComponent setFactor(BigDecimal value) { 2426 if (value == null) 2427 this.factor = null; 2428 else { 2429 if (this.factor == null) 2430 this.factor = new DecimalType(); 2431 this.factor.setValue(value); 2432 } 2433 return this; 2434 } 2435 2436 /** 2437 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2438 */ 2439 public TermValuedItemComponent setFactor(long value) { 2440 this.factor = new DecimalType(); 2441 this.factor.setValue(value); 2442 return this; 2443 } 2444 2445 /** 2446 * @param value A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2447 */ 2448 public TermValuedItemComponent setFactor(double value) { 2449 this.factor = new DecimalType(); 2450 this.factor.setValue(value); 2451 return this; 2452 } 2453 2454 /** 2455 * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 2456 */ 2457 public DecimalType getPointsElement() { 2458 if (this.points == null) 2459 if (Configuration.errorOnAutoCreate()) 2460 throw new Error("Attempt to auto-create TermValuedItemComponent.points"); 2461 else if (Configuration.doAutoCreate()) 2462 this.points = new DecimalType(); // bb 2463 return this.points; 2464 } 2465 2466 public boolean hasPointsElement() { 2467 return this.points != null && !this.points.isEmpty(); 2468 } 2469 2470 public boolean hasPoints() { 2471 return this.points != null && !this.points.isEmpty(); 2472 } 2473 2474 /** 2475 * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 2476 */ 2477 public TermValuedItemComponent setPointsElement(DecimalType value) { 2478 this.points = value; 2479 return this; 2480 } 2481 2482 /** 2483 * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. 2484 */ 2485 public BigDecimal getPoints() { 2486 return this.points == null ? null : this.points.getValue(); 2487 } 2488 2489 /** 2490 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. 2491 */ 2492 public TermValuedItemComponent setPoints(BigDecimal value) { 2493 if (value == null) 2494 this.points = null; 2495 else { 2496 if (this.points == null) 2497 this.points = new DecimalType(); 2498 this.points.setValue(value); 2499 } 2500 return this; 2501 } 2502 2503 /** 2504 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. 2505 */ 2506 public TermValuedItemComponent setPoints(long value) { 2507 this.points = new DecimalType(); 2508 this.points.setValue(value); 2509 return this; 2510 } 2511 2512 /** 2513 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point. 2514 */ 2515 public TermValuedItemComponent setPoints(double value) { 2516 this.points = new DecimalType(); 2517 this.points.setValue(value); 2518 return this; 2519 } 2520 2521 /** 2522 * @return {@link #net} (Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 2523 */ 2524 public Money getNet() { 2525 if (this.net == null) 2526 if (Configuration.errorOnAutoCreate()) 2527 throw new Error("Attempt to auto-create TermValuedItemComponent.net"); 2528 else if (Configuration.doAutoCreate()) 2529 this.net = new Money(); // cc 2530 return this.net; 2531 } 2532 2533 public boolean hasNet() { 2534 return this.net != null && !this.net.isEmpty(); 2535 } 2536 2537 /** 2538 * @param value {@link #net} (Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 2539 */ 2540 public TermValuedItemComponent setNet(Money value) { 2541 this.net = value; 2542 return this; 2543 } 2544 2545 protected void listChildren(List<Property> childrenList) { 2546 super.listChildren(childrenList); 2547 childrenList.add(new Property("entity[x]", "CodeableConcept|Reference(Any)", "Specific type of Contract Provision Valued Item that may be priced.", 0, java.lang.Integer.MAX_VALUE, entity)); 2548 childrenList.add(new Property("identifier", "Identifier", "Identifies a Contract Provision Valued Item instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2549 childrenList.add(new Property("effectiveTime", "dateTime", "Indicates the time during which this Contract Term ValuedItem information is effective.", 0, java.lang.Integer.MAX_VALUE, effectiveTime)); 2550 childrenList.add(new Property("quantity", "SimpleQuantity", "Specifies the units by which the Contract Provision Valued Item is measured or counted, and quantifies the countable or measurable Contract Term Valued Item instances.", 0, java.lang.Integer.MAX_VALUE, quantity)); 2551 childrenList.add(new Property("unitPrice", "Money", "A Contract Provision Valued Item unit valuation measure.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); 2552 childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of the Contract Provision Valued Item delivered. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); 2553 childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the Contract Provision Valued Item delivered. The concept of Points allows for assignment of point values for a Contract ProvisionValued Item, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); 2554 childrenList.add(new Property("net", "Money", "Expresses the product of the Contract Provision Valued Item unitQuantity and the unitPriceAmt. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); 2555 } 2556 2557 @Override 2558 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2559 switch (hash) { 2560 case -1298275357: /*entity*/ return this.entity == null ? new Base[0] : new Base[] {this.entity}; // Type 2561 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 2562 case -929905388: /*effectiveTime*/ return this.effectiveTime == null ? new Base[0] : new Base[] {this.effectiveTime}; // DateTimeType 2563 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 2564 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 2565 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 2566 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 2567 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 2568 default: return super.getProperty(hash, name, checkValid); 2569 } 2570 2571 } 2572 2573 @Override 2574 public void setProperty(int hash, String name, Base value) throws FHIRException { 2575 switch (hash) { 2576 case -1298275357: // entity 2577 this.entity = (Type) value; // Type 2578 break; 2579 case -1618432855: // identifier 2580 this.identifier = castToIdentifier(value); // Identifier 2581 break; 2582 case -929905388: // effectiveTime 2583 this.effectiveTime = castToDateTime(value); // DateTimeType 2584 break; 2585 case -1285004149: // quantity 2586 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 2587 break; 2588 case -486196699: // unitPrice 2589 this.unitPrice = castToMoney(value); // Money 2590 break; 2591 case -1282148017: // factor 2592 this.factor = castToDecimal(value); // DecimalType 2593 break; 2594 case -982754077: // points 2595 this.points = castToDecimal(value); // DecimalType 2596 break; 2597 case 108957: // net 2598 this.net = castToMoney(value); // Money 2599 break; 2600 default: super.setProperty(hash, name, value); 2601 } 2602 2603 } 2604 2605 @Override 2606 public void setProperty(String name, Base value) throws FHIRException { 2607 if (name.equals("entity[x]")) 2608 this.entity = (Type) value; // Type 2609 else if (name.equals("identifier")) 2610 this.identifier = castToIdentifier(value); // Identifier 2611 else if (name.equals("effectiveTime")) 2612 this.effectiveTime = castToDateTime(value); // DateTimeType 2613 else if (name.equals("quantity")) 2614 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 2615 else if (name.equals("unitPrice")) 2616 this.unitPrice = castToMoney(value); // Money 2617 else if (name.equals("factor")) 2618 this.factor = castToDecimal(value); // DecimalType 2619 else if (name.equals("points")) 2620 this.points = castToDecimal(value); // DecimalType 2621 else if (name.equals("net")) 2622 this.net = castToMoney(value); // Money 2623 else 2624 super.setProperty(name, value); 2625 } 2626 2627 @Override 2628 public Base makeProperty(int hash, String name) throws FHIRException { 2629 switch (hash) { 2630 case -740568643: return getEntity(); // Type 2631 case -1618432855: return getIdentifier(); // Identifier 2632 case -929905388: throw new FHIRException("Cannot make property effectiveTime as it is not a complex type"); // DateTimeType 2633 case -1285004149: return getQuantity(); // SimpleQuantity 2634 case -486196699: return getUnitPrice(); // Money 2635 case -1282148017: throw new FHIRException("Cannot make property factor as it is not a complex type"); // DecimalType 2636 case -982754077: throw new FHIRException("Cannot make property points as it is not a complex type"); // DecimalType 2637 case 108957: return getNet(); // Money 2638 default: return super.makeProperty(hash, name); 2639 } 2640 2641 } 2642 2643 @Override 2644 public Base addChild(String name) throws FHIRException { 2645 if (name.equals("entityCodeableConcept")) { 2646 this.entity = new CodeableConcept(); 2647 return this.entity; 2648 } 2649 else if (name.equals("entityReference")) { 2650 this.entity = new Reference(); 2651 return this.entity; 2652 } 2653 else if (name.equals("identifier")) { 2654 this.identifier = new Identifier(); 2655 return this.identifier; 2656 } 2657 else if (name.equals("effectiveTime")) { 2658 throw new FHIRException("Cannot call addChild on a primitive type Contract.effectiveTime"); 2659 } 2660 else if (name.equals("quantity")) { 2661 this.quantity = new SimpleQuantity(); 2662 return this.quantity; 2663 } 2664 else if (name.equals("unitPrice")) { 2665 this.unitPrice = new Money(); 2666 return this.unitPrice; 2667 } 2668 else if (name.equals("factor")) { 2669 throw new FHIRException("Cannot call addChild on a primitive type Contract.factor"); 2670 } 2671 else if (name.equals("points")) { 2672 throw new FHIRException("Cannot call addChild on a primitive type Contract.points"); 2673 } 2674 else if (name.equals("net")) { 2675 this.net = new Money(); 2676 return this.net; 2677 } 2678 else 2679 return super.addChild(name); 2680 } 2681 2682 public TermValuedItemComponent copy() { 2683 TermValuedItemComponent dst = new TermValuedItemComponent(); 2684 copyValues(dst); 2685 dst.entity = entity == null ? null : entity.copy(); 2686 dst.identifier = identifier == null ? null : identifier.copy(); 2687 dst.effectiveTime = effectiveTime == null ? null : effectiveTime.copy(); 2688 dst.quantity = quantity == null ? null : quantity.copy(); 2689 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 2690 dst.factor = factor == null ? null : factor.copy(); 2691 dst.points = points == null ? null : points.copy(); 2692 dst.net = net == null ? null : net.copy(); 2693 return dst; 2694 } 2695 2696 @Override 2697 public boolean equalsDeep(Base other) { 2698 if (!super.equalsDeep(other)) 2699 return false; 2700 if (!(other instanceof TermValuedItemComponent)) 2701 return false; 2702 TermValuedItemComponent o = (TermValuedItemComponent) other; 2703 return compareDeep(entity, o.entity, true) && compareDeep(identifier, o.identifier, true) && compareDeep(effectiveTime, o.effectiveTime, true) 2704 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 2705 && compareDeep(points, o.points, true) && compareDeep(net, o.net, true); 2706 } 2707 2708 @Override 2709 public boolean equalsShallow(Base other) { 2710 if (!super.equalsShallow(other)) 2711 return false; 2712 if (!(other instanceof TermValuedItemComponent)) 2713 return false; 2714 TermValuedItemComponent o = (TermValuedItemComponent) other; 2715 return compareValues(effectiveTime, o.effectiveTime, true) && compareValues(factor, o.factor, true) 2716 && compareValues(points, o.points, true); 2717 } 2718 2719 public boolean isEmpty() { 2720 return super.isEmpty() && (entity == null || entity.isEmpty()) && (identifier == null || identifier.isEmpty()) 2721 && (effectiveTime == null || effectiveTime.isEmpty()) && (quantity == null || quantity.isEmpty()) 2722 && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) 2723 && (net == null || net.isEmpty()); 2724 } 2725 2726 public String fhirType() { 2727 return "Contract.term.valuedItem"; 2728 2729 } 2730 2731 } 2732 2733 @Block() 2734 public static class FriendlyLanguageComponent extends BackboneElement implements IBaseBackboneElement { 2735 /** 2736 * Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability. 2737 */ 2738 @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) 2739 @Description(shortDefinition="Easily comprehended representation of this Contract", formalDefinition="Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability." ) 2740 protected Type content; 2741 2742 private static final long serialVersionUID = -1763459053L; 2743 2744 /** 2745 * Constructor 2746 */ 2747 public FriendlyLanguageComponent() { 2748 super(); 2749 } 2750 2751 /** 2752 * Constructor 2753 */ 2754 public FriendlyLanguageComponent(Type content) { 2755 super(); 2756 this.content = content; 2757 } 2758 2759 /** 2760 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 2761 */ 2762 public Type getContent() { 2763 return this.content; 2764 } 2765 2766 /** 2767 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 2768 */ 2769 public Attachment getContentAttachment() throws FHIRException { 2770 if (!(this.content instanceof Attachment)) 2771 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 2772 return (Attachment) this.content; 2773 } 2774 2775 public boolean hasContentAttachment() { 2776 return this.content instanceof Attachment; 2777 } 2778 2779 /** 2780 * @return {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 2781 */ 2782 public Reference getContentReference() throws FHIRException { 2783 if (!(this.content instanceof Reference)) 2784 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 2785 return (Reference) this.content; 2786 } 2787 2788 public boolean hasContentReference() { 2789 return this.content instanceof Reference; 2790 } 2791 2792 public boolean hasContent() { 2793 return this.content != null && !this.content.isEmpty(); 2794 } 2795 2796 /** 2797 * @param value {@link #content} (Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.) 2798 */ 2799 public FriendlyLanguageComponent setContent(Type value) { 2800 this.content = value; 2801 return this; 2802 } 2803 2804 protected void listChildren(List<Property> childrenList) { 2805 super.listChildren(childrenList); 2806 childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Human readable rendering of this Contract in a format and representation intended to enhance comprehension and ensure understandability.", 0, java.lang.Integer.MAX_VALUE, content)); 2807 } 2808 2809 @Override 2810 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2811 switch (hash) { 2812 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 2813 default: return super.getProperty(hash, name, checkValid); 2814 } 2815 2816 } 2817 2818 @Override 2819 public void setProperty(int hash, String name, Base value) throws FHIRException { 2820 switch (hash) { 2821 case 951530617: // content 2822 this.content = (Type) value; // Type 2823 break; 2824 default: super.setProperty(hash, name, value); 2825 } 2826 2827 } 2828 2829 @Override 2830 public void setProperty(String name, Base value) throws FHIRException { 2831 if (name.equals("content[x]")) 2832 this.content = (Type) value; // Type 2833 else 2834 super.setProperty(name, value); 2835 } 2836 2837 @Override 2838 public Base makeProperty(int hash, String name) throws FHIRException { 2839 switch (hash) { 2840 case 264548711: return getContent(); // Type 2841 default: return super.makeProperty(hash, name); 2842 } 2843 2844 } 2845 2846 @Override 2847 public Base addChild(String name) throws FHIRException { 2848 if (name.equals("contentAttachment")) { 2849 this.content = new Attachment(); 2850 return this.content; 2851 } 2852 else if (name.equals("contentReference")) { 2853 this.content = new Reference(); 2854 return this.content; 2855 } 2856 else 2857 return super.addChild(name); 2858 } 2859 2860 public FriendlyLanguageComponent copy() { 2861 FriendlyLanguageComponent dst = new FriendlyLanguageComponent(); 2862 copyValues(dst); 2863 dst.content = content == null ? null : content.copy(); 2864 return dst; 2865 } 2866 2867 @Override 2868 public boolean equalsDeep(Base other) { 2869 if (!super.equalsDeep(other)) 2870 return false; 2871 if (!(other instanceof FriendlyLanguageComponent)) 2872 return false; 2873 FriendlyLanguageComponent o = (FriendlyLanguageComponent) other; 2874 return compareDeep(content, o.content, true); 2875 } 2876 2877 @Override 2878 public boolean equalsShallow(Base other) { 2879 if (!super.equalsShallow(other)) 2880 return false; 2881 if (!(other instanceof FriendlyLanguageComponent)) 2882 return false; 2883 FriendlyLanguageComponent o = (FriendlyLanguageComponent) other; 2884 return true; 2885 } 2886 2887 public boolean isEmpty() { 2888 return super.isEmpty() && (content == null || content.isEmpty()); 2889 } 2890 2891 public String fhirType() { 2892 return "Contract.friendly"; 2893 2894 } 2895 2896 } 2897 2898 @Block() 2899 public static class LegalLanguageComponent extends BackboneElement implements IBaseBackboneElement { 2900 /** 2901 * Contract legal text in human renderable form. 2902 */ 2903 @Child(name = "content", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=1, min=1, max=1, modifier=false, summary=false) 2904 @Description(shortDefinition="Contract Legal Text", formalDefinition="Contract legal text in human renderable form." ) 2905 protected Type content; 2906 2907 private static final long serialVersionUID = -1763459053L; 2908 2909 /** 2910 * Constructor 2911 */ 2912 public LegalLanguageComponent() { 2913 super(); 2914 } 2915 2916 /** 2917 * Constructor 2918 */ 2919 public LegalLanguageComponent(Type content) { 2920 super(); 2921 this.content = content; 2922 } 2923 2924 /** 2925 * @return {@link #content} (Contract legal text in human renderable form.) 2926 */ 2927 public Type getContent() { 2928 return this.content; 2929 } 2930 2931 /** 2932 * @return {@link #content} (Contract legal text in human renderable form.) 2933 */ 2934 public Attachment getContentAttachment() throws FHIRException { 2935 if (!(this.content instanceof Attachment)) 2936 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 2937 return (Attachment) this.content; 2938 } 2939 2940 public boolean hasContentAttachment() { 2941 return this.content instanceof Attachment; 2942 } 2943 2944 /** 2945 * @return {@link #content} (Contract legal text in human renderable form.) 2946 */ 2947 public Reference getContentReference() throws FHIRException { 2948 if (!(this.content instanceof Reference)) 2949 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 2950 return (Reference) this.content; 2951 } 2952 2953 public boolean hasContentReference() { 2954 return this.content instanceof Reference; 2955 } 2956 2957 public boolean hasContent() { 2958 return this.content != null && !this.content.isEmpty(); 2959 } 2960 2961 /** 2962 * @param value {@link #content} (Contract legal text in human renderable form.) 2963 */ 2964 public LegalLanguageComponent setContent(Type value) { 2965 this.content = value; 2966 return this; 2967 } 2968 2969 protected void listChildren(List<Property> childrenList) { 2970 super.listChildren(childrenList); 2971 childrenList.add(new Property("content[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Contract legal text in human renderable form.", 0, java.lang.Integer.MAX_VALUE, content)); 2972 } 2973 2974 @Override 2975 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2976 switch (hash) { 2977 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 2978 default: return super.getProperty(hash, name, checkValid); 2979 } 2980 2981 } 2982 2983 @Override 2984 public void setProperty(int hash, String name, Base value) throws FHIRException { 2985 switch (hash) { 2986 case 951530617: // content 2987 this.content = (Type) value; // Type 2988 break; 2989 default: super.setProperty(hash, name, value); 2990 } 2991 2992 } 2993 2994 @Override 2995 public void setProperty(String name, Base value) throws FHIRException { 2996 if (name.equals("content[x]")) 2997 this.content = (Type) value; // Type 2998 else 2999 super.setProperty(name, value); 3000 } 3001 3002 @Override 3003 public Base makeProperty(int hash, String name) throws FHIRException { 3004 switch (hash) { 3005 case 264548711: return getContent(); // Type 3006 default: return super.makeProperty(hash, name); 3007 } 3008 3009 } 3010 3011 @Override 3012 public Base addChild(String name) throws FHIRException { 3013 if (name.equals("contentAttachment")) { 3014 this.content = new Attachment(); 3015 return this.content; 3016 } 3017 else if (name.equals("contentReference")) { 3018 this.content = new Reference(); 3019 return this.content; 3020 } 3021 else 3022 return super.addChild(name); 3023 } 3024 3025 public LegalLanguageComponent copy() { 3026 LegalLanguageComponent dst = new LegalLanguageComponent(); 3027 copyValues(dst); 3028 dst.content = content == null ? null : content.copy(); 3029 return dst; 3030 } 3031 3032 @Override 3033 public boolean equalsDeep(Base other) { 3034 if (!super.equalsDeep(other)) 3035 return false; 3036 if (!(other instanceof LegalLanguageComponent)) 3037 return false; 3038 LegalLanguageComponent o = (LegalLanguageComponent) other; 3039 return compareDeep(content, o.content, true); 3040 } 3041 3042 @Override 3043 public boolean equalsShallow(Base other) { 3044 if (!super.equalsShallow(other)) 3045 return false; 3046 if (!(other instanceof LegalLanguageComponent)) 3047 return false; 3048 LegalLanguageComponent o = (LegalLanguageComponent) other; 3049 return true; 3050 } 3051 3052 public boolean isEmpty() { 3053 return super.isEmpty() && (content == null || content.isEmpty()); 3054 } 3055 3056 public String fhirType() { 3057 return "Contract.legal"; 3058 3059 } 3060 3061 } 3062 3063 @Block() 3064 public static class ComputableLanguageComponent extends BackboneElement implements IBaseBackboneElement { 3065 /** 3066 * Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal). 3067 */ 3068 @Child(name = "content", type = {Attachment.class, DocumentReference.class}, order=1, min=1, max=1, modifier=false, summary=false) 3069 @Description(shortDefinition="Computable Contract Rules", formalDefinition="Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal)." ) 3070 protected Type content; 3071 3072 private static final long serialVersionUID = -1763459053L; 3073 3074 /** 3075 * Constructor 3076 */ 3077 public ComputableLanguageComponent() { 3078 super(); 3079 } 3080 3081 /** 3082 * Constructor 3083 */ 3084 public ComputableLanguageComponent(Type content) { 3085 super(); 3086 this.content = content; 3087 } 3088 3089 /** 3090 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 3091 */ 3092 public Type getContent() { 3093 return this.content; 3094 } 3095 3096 /** 3097 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 3098 */ 3099 public Attachment getContentAttachment() throws FHIRException { 3100 if (!(this.content instanceof Attachment)) 3101 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.content.getClass().getName()+" was encountered"); 3102 return (Attachment) this.content; 3103 } 3104 3105 public boolean hasContentAttachment() { 3106 return this.content instanceof Attachment; 3107 } 3108 3109 /** 3110 * @return {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 3111 */ 3112 public Reference getContentReference() throws FHIRException { 3113 if (!(this.content instanceof Reference)) 3114 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.content.getClass().getName()+" was encountered"); 3115 return (Reference) this.content; 3116 } 3117 3118 public boolean hasContentReference() { 3119 return this.content instanceof Reference; 3120 } 3121 3122 public boolean hasContent() { 3123 return this.content != null && !this.content.isEmpty(); 3124 } 3125 3126 /** 3127 * @param value {@link #content} (Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).) 3128 */ 3129 public ComputableLanguageComponent setContent(Type value) { 3130 this.content = value; 3131 return this; 3132 } 3133 3134 protected void listChildren(List<Property> childrenList) { 3135 super.listChildren(childrenList); 3136 childrenList.add(new Property("content[x]", "Attachment|Reference(DocumentReference)", "Computable Contract conveyed using a policy rule language (e.g. XACML, DKAL, SecPal).", 0, java.lang.Integer.MAX_VALUE, content)); 3137 } 3138 3139 @Override 3140 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3141 switch (hash) { 3142 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Type 3143 default: return super.getProperty(hash, name, checkValid); 3144 } 3145 3146 } 3147 3148 @Override 3149 public void setProperty(int hash, String name, Base value) throws FHIRException { 3150 switch (hash) { 3151 case 951530617: // content 3152 this.content = (Type) value; // Type 3153 break; 3154 default: super.setProperty(hash, name, value); 3155 } 3156 3157 } 3158 3159 @Override 3160 public void setProperty(String name, Base value) throws FHIRException { 3161 if (name.equals("content[x]")) 3162 this.content = (Type) value; // Type 3163 else 3164 super.setProperty(name, value); 3165 } 3166 3167 @Override 3168 public Base makeProperty(int hash, String name) throws FHIRException { 3169 switch (hash) { 3170 case 264548711: return getContent(); // Type 3171 default: return super.makeProperty(hash, name); 3172 } 3173 3174 } 3175 3176 @Override 3177 public Base addChild(String name) throws FHIRException { 3178 if (name.equals("contentAttachment")) { 3179 this.content = new Attachment(); 3180 return this.content; 3181 } 3182 else if (name.equals("contentReference")) { 3183 this.content = new Reference(); 3184 return this.content; 3185 } 3186 else 3187 return super.addChild(name); 3188 } 3189 3190 public ComputableLanguageComponent copy() { 3191 ComputableLanguageComponent dst = new ComputableLanguageComponent(); 3192 copyValues(dst); 3193 dst.content = content == null ? null : content.copy(); 3194 return dst; 3195 } 3196 3197 @Override 3198 public boolean equalsDeep(Base other) { 3199 if (!super.equalsDeep(other)) 3200 return false; 3201 if (!(other instanceof ComputableLanguageComponent)) 3202 return false; 3203 ComputableLanguageComponent o = (ComputableLanguageComponent) other; 3204 return compareDeep(content, o.content, true); 3205 } 3206 3207 @Override 3208 public boolean equalsShallow(Base other) { 3209 if (!super.equalsShallow(other)) 3210 return false; 3211 if (!(other instanceof ComputableLanguageComponent)) 3212 return false; 3213 ComputableLanguageComponent o = (ComputableLanguageComponent) other; 3214 return true; 3215 } 3216 3217 public boolean isEmpty() { 3218 return super.isEmpty() && (content == null || content.isEmpty()); 3219 } 3220 3221 public String fhirType() { 3222 return "Contract.rule"; 3223 3224 } 3225 3226 } 3227 3228 /** 3229 * Unique identifier for this Contract. 3230 */ 3231 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 3232 @Description(shortDefinition="Contract identifier", formalDefinition="Unique identifier for this Contract." ) 3233 protected Identifier identifier; 3234 3235 /** 3236 * When this Contract was issued. 3237 */ 3238 @Child(name = "issued", type = {DateTimeType.class}, order=1, min=0, max=1, modifier=false, summary=true) 3239 @Description(shortDefinition="When this Contract was issued", formalDefinition="When this Contract was issued." ) 3240 protected DateTimeType issued; 3241 3242 /** 3243 * Relevant time or time-period when this Contract is applicable. 3244 */ 3245 @Child(name = "applies", type = {Period.class}, order=2, min=0, max=1, modifier=false, summary=true) 3246 @Description(shortDefinition="Effective time", formalDefinition="Relevant time or time-period when this Contract is applicable." ) 3247 protected Period applies; 3248 3249 /** 3250 * The target entity impacted by or of interest to parties to the agreement. 3251 */ 3252 @Child(name = "subject", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3253 @Description(shortDefinition="Contract Target Entity", formalDefinition="The target entity impacted by or of interest to parties to the agreement." ) 3254 protected List<Reference> subject; 3255 /** 3256 * The actual objects that are the target of the reference (The target entity impacted by or of interest to parties to the agreement.) 3257 */ 3258 protected List<Resource> subjectTarget; 3259 3260 3261 /** 3262 * The matter of concern in the context of this agreement. 3263 */ 3264 @Child(name = "topic", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3265 @Description(shortDefinition="Context of the Contract", formalDefinition="The matter of concern in the context of this agreement." ) 3266 protected List<Reference> topic; 3267 /** 3268 * The actual objects that are the target of the reference (The matter of concern in the context of this agreement.) 3269 */ 3270 protected List<Resource> topicTarget; 3271 3272 3273 /** 3274 * A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies. 3275 */ 3276 @Child(name = "authority", type = {Organization.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3277 @Description(shortDefinition="Authority under which this Contract has standing", formalDefinition="A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies." ) 3278 protected List<Reference> authority; 3279 /** 3280 * The actual objects that are the target of the reference (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 3281 */ 3282 protected List<Organization> authorityTarget; 3283 3284 3285 /** 3286 * Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources. 3287 */ 3288 @Child(name = "domain", type = {Location.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3289 @Description(shortDefinition="Domain in which this Contract applies", formalDefinition="Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources." ) 3290 protected List<Reference> domain; 3291 /** 3292 * The actual objects that are the target of the reference (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 3293 */ 3294 protected List<Location> domainTarget; 3295 3296 3297 /** 3298 * Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc. 3299 */ 3300 @Child(name = "type", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=true) 3301 @Description(shortDefinition="Contract Type", formalDefinition="Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc." ) 3302 protected CodeableConcept type; 3303 3304 /** 3305 * More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent. 3306 */ 3307 @Child(name = "subType", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3308 @Description(shortDefinition="Contract Subtype", formalDefinition="More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent." ) 3309 protected List<CodeableConcept> subType; 3310 3311 /** 3312 * Action stipulated by this Contract. 3313 */ 3314 @Child(name = "action", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3315 @Description(shortDefinition="Contract Action", formalDefinition="Action stipulated by this Contract." ) 3316 protected List<CodeableConcept> action; 3317 3318 /** 3319 * Reason for action stipulated by this Contract. 3320 */ 3321 @Child(name = "actionReason", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3322 @Description(shortDefinition="Contract Action Reason", formalDefinition="Reason for action stipulated by this Contract." ) 3323 protected List<CodeableConcept> actionReason; 3324 3325 /** 3326 * An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place. 3327 */ 3328 @Child(name = "agent", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3329 @Description(shortDefinition="Contract Agent", formalDefinition="An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place." ) 3330 protected List<AgentComponent> agent; 3331 3332 /** 3333 * Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness. 3334 */ 3335 @Child(name = "signer", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3336 @Description(shortDefinition="Contract Signer", formalDefinition="Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness." ) 3337 protected List<SignatoryComponent> signer; 3338 3339 /** 3340 * Contract Valued Item List. 3341 */ 3342 @Child(name = "valuedItem", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3343 @Description(shortDefinition="Contract Valued Item", formalDefinition="Contract Valued Item List." ) 3344 protected List<ValuedItemComponent> valuedItem; 3345 3346 /** 3347 * One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups. 3348 */ 3349 @Child(name = "term", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3350 @Description(shortDefinition="Contract Term List", formalDefinition="One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups." ) 3351 protected List<TermComponent> term; 3352 3353 /** 3354 * Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract. 3355 */ 3356 @Child(name = "binding", type = {Attachment.class, Composition.class, DocumentReference.class, QuestionnaireResponse.class}, order=15, min=0, max=1, modifier=false, summary=false) 3357 @Description(shortDefinition="Binding Contract", formalDefinition="Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract." ) 3358 protected Type binding; 3359 3360 /** 3361 * The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement. 3362 */ 3363 @Child(name = "friendly", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3364 @Description(shortDefinition="Contract Friendly Language", formalDefinition="The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement." ) 3365 protected List<FriendlyLanguageComponent> friendly; 3366 3367 /** 3368 * List of Legal expressions or representations of this Contract. 3369 */ 3370 @Child(name = "legal", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3371 @Description(shortDefinition="Contract Legal Language", formalDefinition="List of Legal expressions or representations of this Contract." ) 3372 protected List<LegalLanguageComponent> legal; 3373 3374 /** 3375 * List of Computable Policy Rule Language Representations of this Contract. 3376 */ 3377 @Child(name = "rule", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3378 @Description(shortDefinition="Computable Contract Language", formalDefinition="List of Computable Policy Rule Language Representations of this Contract." ) 3379 protected List<ComputableLanguageComponent> rule; 3380 3381 private static final long serialVersionUID = -1116217303L; 3382 3383 /** 3384 * Constructor 3385 */ 3386 public Contract() { 3387 super(); 3388 } 3389 3390 /** 3391 * @return {@link #identifier} (Unique identifier for this Contract.) 3392 */ 3393 public Identifier getIdentifier() { 3394 if (this.identifier == null) 3395 if (Configuration.errorOnAutoCreate()) 3396 throw new Error("Attempt to auto-create Contract.identifier"); 3397 else if (Configuration.doAutoCreate()) 3398 this.identifier = new Identifier(); // cc 3399 return this.identifier; 3400 } 3401 3402 public boolean hasIdentifier() { 3403 return this.identifier != null && !this.identifier.isEmpty(); 3404 } 3405 3406 /** 3407 * @param value {@link #identifier} (Unique identifier for this Contract.) 3408 */ 3409 public Contract setIdentifier(Identifier value) { 3410 this.identifier = value; 3411 return this; 3412 } 3413 3414 /** 3415 * @return {@link #issued} (When this Contract was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 3416 */ 3417 public DateTimeType getIssuedElement() { 3418 if (this.issued == null) 3419 if (Configuration.errorOnAutoCreate()) 3420 throw new Error("Attempt to auto-create Contract.issued"); 3421 else if (Configuration.doAutoCreate()) 3422 this.issued = new DateTimeType(); // bb 3423 return this.issued; 3424 } 3425 3426 public boolean hasIssuedElement() { 3427 return this.issued != null && !this.issued.isEmpty(); 3428 } 3429 3430 public boolean hasIssued() { 3431 return this.issued != null && !this.issued.isEmpty(); 3432 } 3433 3434 /** 3435 * @param value {@link #issued} (When this Contract was issued.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 3436 */ 3437 public Contract setIssuedElement(DateTimeType value) { 3438 this.issued = value; 3439 return this; 3440 } 3441 3442 /** 3443 * @return When this Contract was issued. 3444 */ 3445 public Date getIssued() { 3446 return this.issued == null ? null : this.issued.getValue(); 3447 } 3448 3449 /** 3450 * @param value When this Contract was issued. 3451 */ 3452 public Contract setIssued(Date value) { 3453 if (value == null) 3454 this.issued = null; 3455 else { 3456 if (this.issued == null) 3457 this.issued = new DateTimeType(); 3458 this.issued.setValue(value); 3459 } 3460 return this; 3461 } 3462 3463 /** 3464 * @return {@link #applies} (Relevant time or time-period when this Contract is applicable.) 3465 */ 3466 public Period getApplies() { 3467 if (this.applies == null) 3468 if (Configuration.errorOnAutoCreate()) 3469 throw new Error("Attempt to auto-create Contract.applies"); 3470 else if (Configuration.doAutoCreate()) 3471 this.applies = new Period(); // cc 3472 return this.applies; 3473 } 3474 3475 public boolean hasApplies() { 3476 return this.applies != null && !this.applies.isEmpty(); 3477 } 3478 3479 /** 3480 * @param value {@link #applies} (Relevant time or time-period when this Contract is applicable.) 3481 */ 3482 public Contract setApplies(Period value) { 3483 this.applies = value; 3484 return this; 3485 } 3486 3487 /** 3488 * @return {@link #subject} (The target entity impacted by or of interest to parties to the agreement.) 3489 */ 3490 public List<Reference> getSubject() { 3491 if (this.subject == null) 3492 this.subject = new ArrayList<Reference>(); 3493 return this.subject; 3494 } 3495 3496 public boolean hasSubject() { 3497 if (this.subject == null) 3498 return false; 3499 for (Reference item : this.subject) 3500 if (!item.isEmpty()) 3501 return true; 3502 return false; 3503 } 3504 3505 /** 3506 * @return {@link #subject} (The target entity impacted by or of interest to parties to the agreement.) 3507 */ 3508 // syntactic sugar 3509 public Reference addSubject() { //3 3510 Reference t = new Reference(); 3511 if (this.subject == null) 3512 this.subject = new ArrayList<Reference>(); 3513 this.subject.add(t); 3514 return t; 3515 } 3516 3517 // syntactic sugar 3518 public Contract addSubject(Reference t) { //3 3519 if (t == null) 3520 return this; 3521 if (this.subject == null) 3522 this.subject = new ArrayList<Reference>(); 3523 this.subject.add(t); 3524 return this; 3525 } 3526 3527 /** 3528 * @return {@link #subject} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The target entity impacted by or of interest to parties to the agreement.) 3529 */ 3530 public List<Resource> getSubjectTarget() { 3531 if (this.subjectTarget == null) 3532 this.subjectTarget = new ArrayList<Resource>(); 3533 return this.subjectTarget; 3534 } 3535 3536 /** 3537 * @return {@link #topic} (The matter of concern in the context of this agreement.) 3538 */ 3539 public List<Reference> getTopic() { 3540 if (this.topic == null) 3541 this.topic = new ArrayList<Reference>(); 3542 return this.topic; 3543 } 3544 3545 public boolean hasTopic() { 3546 if (this.topic == null) 3547 return false; 3548 for (Reference item : this.topic) 3549 if (!item.isEmpty()) 3550 return true; 3551 return false; 3552 } 3553 3554 /** 3555 * @return {@link #topic} (The matter of concern in the context of this agreement.) 3556 */ 3557 // syntactic sugar 3558 public Reference addTopic() { //3 3559 Reference t = new Reference(); 3560 if (this.topic == null) 3561 this.topic = new ArrayList<Reference>(); 3562 this.topic.add(t); 3563 return t; 3564 } 3565 3566 // syntactic sugar 3567 public Contract addTopic(Reference t) { //3 3568 if (t == null) 3569 return this; 3570 if (this.topic == null) 3571 this.topic = new ArrayList<Reference>(); 3572 this.topic.add(t); 3573 return this; 3574 } 3575 3576 /** 3577 * @return {@link #topic} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. The matter of concern in the context of this agreement.) 3578 */ 3579 public List<Resource> getTopicTarget() { 3580 if (this.topicTarget == null) 3581 this.topicTarget = new ArrayList<Resource>(); 3582 return this.topicTarget; 3583 } 3584 3585 /** 3586 * @return {@link #authority} (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 3587 */ 3588 public List<Reference> getAuthority() { 3589 if (this.authority == null) 3590 this.authority = new ArrayList<Reference>(); 3591 return this.authority; 3592 } 3593 3594 public boolean hasAuthority() { 3595 if (this.authority == null) 3596 return false; 3597 for (Reference item : this.authority) 3598 if (!item.isEmpty()) 3599 return true; 3600 return false; 3601 } 3602 3603 /** 3604 * @return {@link #authority} (A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 3605 */ 3606 // syntactic sugar 3607 public Reference addAuthority() { //3 3608 Reference t = new Reference(); 3609 if (this.authority == null) 3610 this.authority = new ArrayList<Reference>(); 3611 this.authority.add(t); 3612 return t; 3613 } 3614 3615 // syntactic sugar 3616 public Contract addAuthority(Reference t) { //3 3617 if (t == null) 3618 return this; 3619 if (this.authority == null) 3620 this.authority = new ArrayList<Reference>(); 3621 this.authority.add(t); 3622 return this; 3623 } 3624 3625 /** 3626 * @return {@link #authority} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 3627 */ 3628 public List<Organization> getAuthorityTarget() { 3629 if (this.authorityTarget == null) 3630 this.authorityTarget = new ArrayList<Organization>(); 3631 return this.authorityTarget; 3632 } 3633 3634 // syntactic sugar 3635 /** 3636 * @return {@link #authority} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.) 3637 */ 3638 public Organization addAuthorityTarget() { 3639 Organization r = new Organization(); 3640 if (this.authorityTarget == null) 3641 this.authorityTarget = new ArrayList<Organization>(); 3642 this.authorityTarget.add(r); 3643 return r; 3644 } 3645 3646 /** 3647 * @return {@link #domain} (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 3648 */ 3649 public List<Reference> getDomain() { 3650 if (this.domain == null) 3651 this.domain = new ArrayList<Reference>(); 3652 return this.domain; 3653 } 3654 3655 public boolean hasDomain() { 3656 if (this.domain == null) 3657 return false; 3658 for (Reference item : this.domain) 3659 if (!item.isEmpty()) 3660 return true; 3661 return false; 3662 } 3663 3664 /** 3665 * @return {@link #domain} (Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 3666 */ 3667 // syntactic sugar 3668 public Reference addDomain() { //3 3669 Reference t = new Reference(); 3670 if (this.domain == null) 3671 this.domain = new ArrayList<Reference>(); 3672 this.domain.add(t); 3673 return t; 3674 } 3675 3676 // syntactic sugar 3677 public Contract addDomain(Reference t) { //3 3678 if (t == null) 3679 return this; 3680 if (this.domain == null) 3681 this.domain = new ArrayList<Reference>(); 3682 this.domain.add(t); 3683 return this; 3684 } 3685 3686 /** 3687 * @return {@link #domain} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 3688 */ 3689 public List<Location> getDomainTarget() { 3690 if (this.domainTarget == null) 3691 this.domainTarget = new ArrayList<Location>(); 3692 return this.domainTarget; 3693 } 3694 3695 // syntactic sugar 3696 /** 3697 * @return {@link #domain} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.) 3698 */ 3699 public Location addDomainTarget() { 3700 Location r = new Location(); 3701 if (this.domainTarget == null) 3702 this.domainTarget = new ArrayList<Location>(); 3703 this.domainTarget.add(r); 3704 return r; 3705 } 3706 3707 /** 3708 * @return {@link #type} (Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.) 3709 */ 3710 public CodeableConcept getType() { 3711 if (this.type == null) 3712 if (Configuration.errorOnAutoCreate()) 3713 throw new Error("Attempt to auto-create Contract.type"); 3714 else if (Configuration.doAutoCreate()) 3715 this.type = new CodeableConcept(); // cc 3716 return this.type; 3717 } 3718 3719 public boolean hasType() { 3720 return this.type != null && !this.type.isEmpty(); 3721 } 3722 3723 /** 3724 * @param value {@link #type} (Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.) 3725 */ 3726 public Contract setType(CodeableConcept value) { 3727 this.type = value; 3728 return this; 3729 } 3730 3731 /** 3732 * @return {@link #subType} (More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.) 3733 */ 3734 public List<CodeableConcept> getSubType() { 3735 if (this.subType == null) 3736 this.subType = new ArrayList<CodeableConcept>(); 3737 return this.subType; 3738 } 3739 3740 public boolean hasSubType() { 3741 if (this.subType == null) 3742 return false; 3743 for (CodeableConcept item : this.subType) 3744 if (!item.isEmpty()) 3745 return true; 3746 return false; 3747 } 3748 3749 /** 3750 * @return {@link #subType} (More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.) 3751 */ 3752 // syntactic sugar 3753 public CodeableConcept addSubType() { //3 3754 CodeableConcept t = new CodeableConcept(); 3755 if (this.subType == null) 3756 this.subType = new ArrayList<CodeableConcept>(); 3757 this.subType.add(t); 3758 return t; 3759 } 3760 3761 // syntactic sugar 3762 public Contract addSubType(CodeableConcept t) { //3 3763 if (t == null) 3764 return this; 3765 if (this.subType == null) 3766 this.subType = new ArrayList<CodeableConcept>(); 3767 this.subType.add(t); 3768 return this; 3769 } 3770 3771 /** 3772 * @return {@link #action} (Action stipulated by this Contract.) 3773 */ 3774 public List<CodeableConcept> getAction() { 3775 if (this.action == null) 3776 this.action = new ArrayList<CodeableConcept>(); 3777 return this.action; 3778 } 3779 3780 public boolean hasAction() { 3781 if (this.action == null) 3782 return false; 3783 for (CodeableConcept item : this.action) 3784 if (!item.isEmpty()) 3785 return true; 3786 return false; 3787 } 3788 3789 /** 3790 * @return {@link #action} (Action stipulated by this Contract.) 3791 */ 3792 // syntactic sugar 3793 public CodeableConcept addAction() { //3 3794 CodeableConcept t = new CodeableConcept(); 3795 if (this.action == null) 3796 this.action = new ArrayList<CodeableConcept>(); 3797 this.action.add(t); 3798 return t; 3799 } 3800 3801 // syntactic sugar 3802 public Contract addAction(CodeableConcept t) { //3 3803 if (t == null) 3804 return this; 3805 if (this.action == null) 3806 this.action = new ArrayList<CodeableConcept>(); 3807 this.action.add(t); 3808 return this; 3809 } 3810 3811 /** 3812 * @return {@link #actionReason} (Reason for action stipulated by this Contract.) 3813 */ 3814 public List<CodeableConcept> getActionReason() { 3815 if (this.actionReason == null) 3816 this.actionReason = new ArrayList<CodeableConcept>(); 3817 return this.actionReason; 3818 } 3819 3820 public boolean hasActionReason() { 3821 if (this.actionReason == null) 3822 return false; 3823 for (CodeableConcept item : this.actionReason) 3824 if (!item.isEmpty()) 3825 return true; 3826 return false; 3827 } 3828 3829 /** 3830 * @return {@link #actionReason} (Reason for action stipulated by this Contract.) 3831 */ 3832 // syntactic sugar 3833 public CodeableConcept addActionReason() { //3 3834 CodeableConcept t = new CodeableConcept(); 3835 if (this.actionReason == null) 3836 this.actionReason = new ArrayList<CodeableConcept>(); 3837 this.actionReason.add(t); 3838 return t; 3839 } 3840 3841 // syntactic sugar 3842 public Contract addActionReason(CodeableConcept t) { //3 3843 if (t == null) 3844 return this; 3845 if (this.actionReason == null) 3846 this.actionReason = new ArrayList<CodeableConcept>(); 3847 this.actionReason.add(t); 3848 return this; 3849 } 3850 3851 /** 3852 * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) 3853 */ 3854 public List<AgentComponent> getAgent() { 3855 if (this.agent == null) 3856 this.agent = new ArrayList<AgentComponent>(); 3857 return this.agent; 3858 } 3859 3860 public boolean hasAgent() { 3861 if (this.agent == null) 3862 return false; 3863 for (AgentComponent item : this.agent) 3864 if (!item.isEmpty()) 3865 return true; 3866 return false; 3867 } 3868 3869 /** 3870 * @return {@link #agent} (An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.) 3871 */ 3872 // syntactic sugar 3873 public AgentComponent addAgent() { //3 3874 AgentComponent t = new AgentComponent(); 3875 if (this.agent == null) 3876 this.agent = new ArrayList<AgentComponent>(); 3877 this.agent.add(t); 3878 return t; 3879 } 3880 3881 // syntactic sugar 3882 public Contract addAgent(AgentComponent t) { //3 3883 if (t == null) 3884 return this; 3885 if (this.agent == null) 3886 this.agent = new ArrayList<AgentComponent>(); 3887 this.agent.add(t); 3888 return this; 3889 } 3890 3891 /** 3892 * @return {@link #signer} (Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.) 3893 */ 3894 public List<SignatoryComponent> getSigner() { 3895 if (this.signer == null) 3896 this.signer = new ArrayList<SignatoryComponent>(); 3897 return this.signer; 3898 } 3899 3900 public boolean hasSigner() { 3901 if (this.signer == null) 3902 return false; 3903 for (SignatoryComponent item : this.signer) 3904 if (!item.isEmpty()) 3905 return true; 3906 return false; 3907 } 3908 3909 /** 3910 * @return {@link #signer} (Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.) 3911 */ 3912 // syntactic sugar 3913 public SignatoryComponent addSigner() { //3 3914 SignatoryComponent t = new SignatoryComponent(); 3915 if (this.signer == null) 3916 this.signer = new ArrayList<SignatoryComponent>(); 3917 this.signer.add(t); 3918 return t; 3919 } 3920 3921 // syntactic sugar 3922 public Contract addSigner(SignatoryComponent t) { //3 3923 if (t == null) 3924 return this; 3925 if (this.signer == null) 3926 this.signer = new ArrayList<SignatoryComponent>(); 3927 this.signer.add(t); 3928 return this; 3929 } 3930 3931 /** 3932 * @return {@link #valuedItem} (Contract Valued Item List.) 3933 */ 3934 public List<ValuedItemComponent> getValuedItem() { 3935 if (this.valuedItem == null) 3936 this.valuedItem = new ArrayList<ValuedItemComponent>(); 3937 return this.valuedItem; 3938 } 3939 3940 public boolean hasValuedItem() { 3941 if (this.valuedItem == null) 3942 return false; 3943 for (ValuedItemComponent item : this.valuedItem) 3944 if (!item.isEmpty()) 3945 return true; 3946 return false; 3947 } 3948 3949 /** 3950 * @return {@link #valuedItem} (Contract Valued Item List.) 3951 */ 3952 // syntactic sugar 3953 public ValuedItemComponent addValuedItem() { //3 3954 ValuedItemComponent t = new ValuedItemComponent(); 3955 if (this.valuedItem == null) 3956 this.valuedItem = new ArrayList<ValuedItemComponent>(); 3957 this.valuedItem.add(t); 3958 return t; 3959 } 3960 3961 // syntactic sugar 3962 public Contract addValuedItem(ValuedItemComponent t) { //3 3963 if (t == null) 3964 return this; 3965 if (this.valuedItem == null) 3966 this.valuedItem = new ArrayList<ValuedItemComponent>(); 3967 this.valuedItem.add(t); 3968 return this; 3969 } 3970 3971 /** 3972 * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) 3973 */ 3974 public List<TermComponent> getTerm() { 3975 if (this.term == null) 3976 this.term = new ArrayList<TermComponent>(); 3977 return this.term; 3978 } 3979 3980 public boolean hasTerm() { 3981 if (this.term == null) 3982 return false; 3983 for (TermComponent item : this.term) 3984 if (!item.isEmpty()) 3985 return true; 3986 return false; 3987 } 3988 3989 /** 3990 * @return {@link #term} (One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.) 3991 */ 3992 // syntactic sugar 3993 public TermComponent addTerm() { //3 3994 TermComponent t = new TermComponent(); 3995 if (this.term == null) 3996 this.term = new ArrayList<TermComponent>(); 3997 this.term.add(t); 3998 return t; 3999 } 4000 4001 // syntactic sugar 4002 public Contract addTerm(TermComponent t) { //3 4003 if (t == null) 4004 return this; 4005 if (this.term == null) 4006 this.term = new ArrayList<TermComponent>(); 4007 this.term.add(t); 4008 return this; 4009 } 4010 4011 /** 4012 * @return {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 4013 */ 4014 public Type getBinding() { 4015 return this.binding; 4016 } 4017 4018 /** 4019 * @return {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 4020 */ 4021 public Attachment getBindingAttachment() throws FHIRException { 4022 if (!(this.binding instanceof Attachment)) 4023 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.binding.getClass().getName()+" was encountered"); 4024 return (Attachment) this.binding; 4025 } 4026 4027 public boolean hasBindingAttachment() { 4028 return this.binding instanceof Attachment; 4029 } 4030 4031 /** 4032 * @return {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 4033 */ 4034 public Reference getBindingReference() throws FHIRException { 4035 if (!(this.binding instanceof Reference)) 4036 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.binding.getClass().getName()+" was encountered"); 4037 return (Reference) this.binding; 4038 } 4039 4040 public boolean hasBindingReference() { 4041 return this.binding instanceof Reference; 4042 } 4043 4044 public boolean hasBinding() { 4045 return this.binding != null && !this.binding.isEmpty(); 4046 } 4047 4048 /** 4049 * @param value {@link #binding} (Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the "source of truth" and which would be the basis for legal action related to enforcement of this Contract.) 4050 */ 4051 public Contract setBinding(Type value) { 4052 this.binding = value; 4053 return this; 4054 } 4055 4056 /** 4057 * @return {@link #friendly} (The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.) 4058 */ 4059 public List<FriendlyLanguageComponent> getFriendly() { 4060 if (this.friendly == null) 4061 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 4062 return this.friendly; 4063 } 4064 4065 public boolean hasFriendly() { 4066 if (this.friendly == null) 4067 return false; 4068 for (FriendlyLanguageComponent item : this.friendly) 4069 if (!item.isEmpty()) 4070 return true; 4071 return false; 4072 } 4073 4074 /** 4075 * @return {@link #friendly} (The "patient friendly language" versionof the Contract in whole or in parts. "Patient friendly language" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.) 4076 */ 4077 // syntactic sugar 4078 public FriendlyLanguageComponent addFriendly() { //3 4079 FriendlyLanguageComponent t = new FriendlyLanguageComponent(); 4080 if (this.friendly == null) 4081 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 4082 this.friendly.add(t); 4083 return t; 4084 } 4085 4086 // syntactic sugar 4087 public Contract addFriendly(FriendlyLanguageComponent t) { //3 4088 if (t == null) 4089 return this; 4090 if (this.friendly == null) 4091 this.friendly = new ArrayList<FriendlyLanguageComponent>(); 4092 this.friendly.add(t); 4093 return this; 4094 } 4095 4096 /** 4097 * @return {@link #legal} (List of Legal expressions or representations of this Contract.) 4098 */ 4099 public List<LegalLanguageComponent> getLegal() { 4100 if (this.legal == null) 4101 this.legal = new ArrayList<LegalLanguageComponent>(); 4102 return this.legal; 4103 } 4104 4105 public boolean hasLegal() { 4106 if (this.legal == null) 4107 return false; 4108 for (LegalLanguageComponent item : this.legal) 4109 if (!item.isEmpty()) 4110 return true; 4111 return false; 4112 } 4113 4114 /** 4115 * @return {@link #legal} (List of Legal expressions or representations of this Contract.) 4116 */ 4117 // syntactic sugar 4118 public LegalLanguageComponent addLegal() { //3 4119 LegalLanguageComponent t = new LegalLanguageComponent(); 4120 if (this.legal == null) 4121 this.legal = new ArrayList<LegalLanguageComponent>(); 4122 this.legal.add(t); 4123 return t; 4124 } 4125 4126 // syntactic sugar 4127 public Contract addLegal(LegalLanguageComponent t) { //3 4128 if (t == null) 4129 return this; 4130 if (this.legal == null) 4131 this.legal = new ArrayList<LegalLanguageComponent>(); 4132 this.legal.add(t); 4133 return this; 4134 } 4135 4136 /** 4137 * @return {@link #rule} (List of Computable Policy Rule Language Representations of this Contract.) 4138 */ 4139 public List<ComputableLanguageComponent> getRule() { 4140 if (this.rule == null) 4141 this.rule = new ArrayList<ComputableLanguageComponent>(); 4142 return this.rule; 4143 } 4144 4145 public boolean hasRule() { 4146 if (this.rule == null) 4147 return false; 4148 for (ComputableLanguageComponent item : this.rule) 4149 if (!item.isEmpty()) 4150 return true; 4151 return false; 4152 } 4153 4154 /** 4155 * @return {@link #rule} (List of Computable Policy Rule Language Representations of this Contract.) 4156 */ 4157 // syntactic sugar 4158 public ComputableLanguageComponent addRule() { //3 4159 ComputableLanguageComponent t = new ComputableLanguageComponent(); 4160 if (this.rule == null) 4161 this.rule = new ArrayList<ComputableLanguageComponent>(); 4162 this.rule.add(t); 4163 return t; 4164 } 4165 4166 // syntactic sugar 4167 public Contract addRule(ComputableLanguageComponent t) { //3 4168 if (t == null) 4169 return this; 4170 if (this.rule == null) 4171 this.rule = new ArrayList<ComputableLanguageComponent>(); 4172 this.rule.add(t); 4173 return this; 4174 } 4175 4176 protected void listChildren(List<Property> childrenList) { 4177 super.listChildren(childrenList); 4178 childrenList.add(new Property("identifier", "Identifier", "Unique identifier for this Contract.", 0, java.lang.Integer.MAX_VALUE, identifier)); 4179 childrenList.add(new Property("issued", "dateTime", "When this Contract was issued.", 0, java.lang.Integer.MAX_VALUE, issued)); 4180 childrenList.add(new Property("applies", "Period", "Relevant time or time-period when this Contract is applicable.", 0, java.lang.Integer.MAX_VALUE, applies)); 4181 childrenList.add(new Property("subject", "Reference(Any)", "The target entity impacted by or of interest to parties to the agreement.", 0, java.lang.Integer.MAX_VALUE, subject)); 4182 childrenList.add(new Property("topic", "Reference(Any)", "The matter of concern in the context of this agreement.", 0, java.lang.Integer.MAX_VALUE, topic)); 4183 childrenList.add(new Property("authority", "Reference(Organization)", "A formally or informally recognized grouping of people, principals, organizations, or jurisdictions formed for the purpose of achieving some form of collective action such as the promulgation, administration and enforcement of contracts and policies.", 0, java.lang.Integer.MAX_VALUE, authority)); 4184 childrenList.add(new Property("domain", "Reference(Location)", "Recognized governance framework or system operating with a circumscribed scope in accordance with specified principles, policies, processes or procedures for managing rights, actions, or behaviors of parties or principals relative to resources.", 0, java.lang.Integer.MAX_VALUE, domain)); 4185 childrenList.add(new Property("type", "CodeableConcept", "Type of Contract such as an insurance policy, real estate contract, a will, power of attorny, Privacy or Security policy , trust framework agreement, etc.", 0, java.lang.Integer.MAX_VALUE, type)); 4186 childrenList.add(new Property("subType", "CodeableConcept", "More specific type or specialization of an overarching or more general contract such as auto insurance, home owner insurance, prenupial agreement, Advanced-Directive, or privacy consent.", 0, java.lang.Integer.MAX_VALUE, subType)); 4187 childrenList.add(new Property("action", "CodeableConcept", "Action stipulated by this Contract.", 0, java.lang.Integer.MAX_VALUE, action)); 4188 childrenList.add(new Property("actionReason", "CodeableConcept", "Reason for action stipulated by this Contract.", 0, java.lang.Integer.MAX_VALUE, actionReason)); 4189 childrenList.add(new Property("agent", "", "An actor taking a role in an activity for which it can be assigned some degree of responsibility for the activity taking place.", 0, java.lang.Integer.MAX_VALUE, agent)); 4190 childrenList.add(new Property("signer", "", "Parties with legal standing in the Contract, including the principal parties, the grantor(s) and grantee(s), which are any person or organization bound by the contract, and any ancillary parties, which facilitate the execution of the contract such as a notary or witness.", 0, java.lang.Integer.MAX_VALUE, signer)); 4191 childrenList.add(new Property("valuedItem", "", "Contract Valued Item List.", 0, java.lang.Integer.MAX_VALUE, valuedItem)); 4192 childrenList.add(new Property("term", "", "One or more Contract Provisions, which may be related and conveyed as a group, and may contain nested groups.", 0, java.lang.Integer.MAX_VALUE, term)); 4193 childrenList.add(new Property("binding[x]", "Attachment|Reference(Composition|DocumentReference|QuestionnaireResponse)", "Legally binding Contract: This is the signed and legally recognized representation of the Contract, which is considered the \"source of truth\" and which would be the basis for legal action related to enforcement of this Contract.", 0, java.lang.Integer.MAX_VALUE, binding)); 4194 childrenList.add(new Property("friendly", "", "The \"patient friendly language\" versionof the Contract in whole or in parts. \"Patient friendly language\" means the representation of the Contract and Contract Provisions in a manner that is readily accessible and understandable by a layperson in accordance with best practices for communication styles that ensure that those agreeing to or signing the Contract understand the roles, actions, obligations, responsibilities, and implication of the agreement.", 0, java.lang.Integer.MAX_VALUE, friendly)); 4195 childrenList.add(new Property("legal", "", "List of Legal expressions or representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, legal)); 4196 childrenList.add(new Property("rule", "", "List of Computable Policy Rule Language Representations of this Contract.", 0, java.lang.Integer.MAX_VALUE, rule)); 4197 } 4198 4199 @Override 4200 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4201 switch (hash) { 4202 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 4203 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // DateTimeType 4204 case -793235316: /*applies*/ return this.applies == null ? new Base[0] : new Base[] {this.applies}; // Period 4205 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : this.subject.toArray(new Base[this.subject.size()]); // Reference 4206 case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // Reference 4207 case 1475610435: /*authority*/ return this.authority == null ? new Base[0] : this.authority.toArray(new Base[this.authority.size()]); // Reference 4208 case -1326197564: /*domain*/ return this.domain == null ? new Base[0] : this.domain.toArray(new Base[this.domain.size()]); // Reference 4209 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 4210 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : this.subType.toArray(new Base[this.subType.size()]); // CodeableConcept 4211 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // CodeableConcept 4212 case 1465121818: /*actionReason*/ return this.actionReason == null ? new Base[0] : this.actionReason.toArray(new Base[this.actionReason.size()]); // CodeableConcept 4213 case 92750597: /*agent*/ return this.agent == null ? new Base[0] : this.agent.toArray(new Base[this.agent.size()]); // AgentComponent 4214 case -902467798: /*signer*/ return this.signer == null ? new Base[0] : this.signer.toArray(new Base[this.signer.size()]); // SignatoryComponent 4215 case 2046675654: /*valuedItem*/ return this.valuedItem == null ? new Base[0] : this.valuedItem.toArray(new Base[this.valuedItem.size()]); // ValuedItemComponent 4216 case 3556460: /*term*/ return this.term == null ? new Base[0] : this.term.toArray(new Base[this.term.size()]); // TermComponent 4217 case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // Type 4218 case -1423054677: /*friendly*/ return this.friendly == null ? new Base[0] : this.friendly.toArray(new Base[this.friendly.size()]); // FriendlyLanguageComponent 4219 case 102851257: /*legal*/ return this.legal == null ? new Base[0] : this.legal.toArray(new Base[this.legal.size()]); // LegalLanguageComponent 4220 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ComputableLanguageComponent 4221 default: return super.getProperty(hash, name, checkValid); 4222 } 4223 4224 } 4225 4226 @Override 4227 public void setProperty(int hash, String name, Base value) throws FHIRException { 4228 switch (hash) { 4229 case -1618432855: // identifier 4230 this.identifier = castToIdentifier(value); // Identifier 4231 break; 4232 case -1179159893: // issued 4233 this.issued = castToDateTime(value); // DateTimeType 4234 break; 4235 case -793235316: // applies 4236 this.applies = castToPeriod(value); // Period 4237 break; 4238 case -1867885268: // subject 4239 this.getSubject().add(castToReference(value)); // Reference 4240 break; 4241 case 110546223: // topic 4242 this.getTopic().add(castToReference(value)); // Reference 4243 break; 4244 case 1475610435: // authority 4245 this.getAuthority().add(castToReference(value)); // Reference 4246 break; 4247 case -1326197564: // domain 4248 this.getDomain().add(castToReference(value)); // Reference 4249 break; 4250 case 3575610: // type 4251 this.type = castToCodeableConcept(value); // CodeableConcept 4252 break; 4253 case -1868521062: // subType 4254 this.getSubType().add(castToCodeableConcept(value)); // CodeableConcept 4255 break; 4256 case -1422950858: // action 4257 this.getAction().add(castToCodeableConcept(value)); // CodeableConcept 4258 break; 4259 case 1465121818: // actionReason 4260 this.getActionReason().add(castToCodeableConcept(value)); // CodeableConcept 4261 break; 4262 case 92750597: // agent 4263 this.getAgent().add((AgentComponent) value); // AgentComponent 4264 break; 4265 case -902467798: // signer 4266 this.getSigner().add((SignatoryComponent) value); // SignatoryComponent 4267 break; 4268 case 2046675654: // valuedItem 4269 this.getValuedItem().add((ValuedItemComponent) value); // ValuedItemComponent 4270 break; 4271 case 3556460: // term 4272 this.getTerm().add((TermComponent) value); // TermComponent 4273 break; 4274 case -108220795: // binding 4275 this.binding = (Type) value; // Type 4276 break; 4277 case -1423054677: // friendly 4278 this.getFriendly().add((FriendlyLanguageComponent) value); // FriendlyLanguageComponent 4279 break; 4280 case 102851257: // legal 4281 this.getLegal().add((LegalLanguageComponent) value); // LegalLanguageComponent 4282 break; 4283 case 3512060: // rule 4284 this.getRule().add((ComputableLanguageComponent) value); // ComputableLanguageComponent 4285 break; 4286 default: super.setProperty(hash, name, value); 4287 } 4288 4289 } 4290 4291 @Override 4292 public void setProperty(String name, Base value) throws FHIRException { 4293 if (name.equals("identifier")) 4294 this.identifier = castToIdentifier(value); // Identifier 4295 else if (name.equals("issued")) 4296 this.issued = castToDateTime(value); // DateTimeType 4297 else if (name.equals("applies")) 4298 this.applies = castToPeriod(value); // Period 4299 else if (name.equals("subject")) 4300 this.getSubject().add(castToReference(value)); 4301 else if (name.equals("topic")) 4302 this.getTopic().add(castToReference(value)); 4303 else if (name.equals("authority")) 4304 this.getAuthority().add(castToReference(value)); 4305 else if (name.equals("domain")) 4306 this.getDomain().add(castToReference(value)); 4307 else if (name.equals("type")) 4308 this.type = castToCodeableConcept(value); // CodeableConcept 4309 else if (name.equals("subType")) 4310 this.getSubType().add(castToCodeableConcept(value)); 4311 else if (name.equals("action")) 4312 this.getAction().add(castToCodeableConcept(value)); 4313 else if (name.equals("actionReason")) 4314 this.getActionReason().add(castToCodeableConcept(value)); 4315 else if (name.equals("agent")) 4316 this.getAgent().add((AgentComponent) value); 4317 else if (name.equals("signer")) 4318 this.getSigner().add((SignatoryComponent) value); 4319 else if (name.equals("valuedItem")) 4320 this.getValuedItem().add((ValuedItemComponent) value); 4321 else if (name.equals("term")) 4322 this.getTerm().add((TermComponent) value); 4323 else if (name.equals("binding[x]")) 4324 this.binding = (Type) value; // Type 4325 else if (name.equals("friendly")) 4326 this.getFriendly().add((FriendlyLanguageComponent) value); 4327 else if (name.equals("legal")) 4328 this.getLegal().add((LegalLanguageComponent) value); 4329 else if (name.equals("rule")) 4330 this.getRule().add((ComputableLanguageComponent) value); 4331 else 4332 super.setProperty(name, value); 4333 } 4334 4335 @Override 4336 public Base makeProperty(int hash, String name) throws FHIRException { 4337 switch (hash) { 4338 case -1618432855: return getIdentifier(); // Identifier 4339 case -1179159893: throw new FHIRException("Cannot make property issued as it is not a complex type"); // DateTimeType 4340 case -793235316: return getApplies(); // Period 4341 case -1867885268: return addSubject(); // Reference 4342 case 110546223: return addTopic(); // Reference 4343 case 1475610435: return addAuthority(); // Reference 4344 case -1326197564: return addDomain(); // Reference 4345 case 3575610: return getType(); // CodeableConcept 4346 case -1868521062: return addSubType(); // CodeableConcept 4347 case -1422950858: return addAction(); // CodeableConcept 4348 case 1465121818: return addActionReason(); // CodeableConcept 4349 case 92750597: return addAgent(); // AgentComponent 4350 case -902467798: return addSigner(); // SignatoryComponent 4351 case 2046675654: return addValuedItem(); // ValuedItemComponent 4352 case 3556460: return addTerm(); // TermComponent 4353 case 1514826715: return getBinding(); // Type 4354 case -1423054677: return addFriendly(); // FriendlyLanguageComponent 4355 case 102851257: return addLegal(); // LegalLanguageComponent 4356 case 3512060: return addRule(); // ComputableLanguageComponent 4357 default: return super.makeProperty(hash, name); 4358 } 4359 4360 } 4361 4362 @Override 4363 public Base addChild(String name) throws FHIRException { 4364 if (name.equals("identifier")) { 4365 this.identifier = new Identifier(); 4366 return this.identifier; 4367 } 4368 else if (name.equals("issued")) { 4369 throw new FHIRException("Cannot call addChild on a primitive type Contract.issued"); 4370 } 4371 else if (name.equals("applies")) { 4372 this.applies = new Period(); 4373 return this.applies; 4374 } 4375 else if (name.equals("subject")) { 4376 return addSubject(); 4377 } 4378 else if (name.equals("topic")) { 4379 return addTopic(); 4380 } 4381 else if (name.equals("authority")) { 4382 return addAuthority(); 4383 } 4384 else if (name.equals("domain")) { 4385 return addDomain(); 4386 } 4387 else if (name.equals("type")) { 4388 this.type = new CodeableConcept(); 4389 return this.type; 4390 } 4391 else if (name.equals("subType")) { 4392 return addSubType(); 4393 } 4394 else if (name.equals("action")) { 4395 return addAction(); 4396 } 4397 else if (name.equals("actionReason")) { 4398 return addActionReason(); 4399 } 4400 else if (name.equals("agent")) { 4401 return addAgent(); 4402 } 4403 else if (name.equals("signer")) { 4404 return addSigner(); 4405 } 4406 else if (name.equals("valuedItem")) { 4407 return addValuedItem(); 4408 } 4409 else if (name.equals("term")) { 4410 return addTerm(); 4411 } 4412 else if (name.equals("bindingAttachment")) { 4413 this.binding = new Attachment(); 4414 return this.binding; 4415 } 4416 else if (name.equals("bindingReference")) { 4417 this.binding = new Reference(); 4418 return this.binding; 4419 } 4420 else if (name.equals("friendly")) { 4421 return addFriendly(); 4422 } 4423 else if (name.equals("legal")) { 4424 return addLegal(); 4425 } 4426 else if (name.equals("rule")) { 4427 return addRule(); 4428 } 4429 else 4430 return super.addChild(name); 4431 } 4432 4433 public String fhirType() { 4434 return "Contract"; 4435 4436 } 4437 4438 public Contract copy() { 4439 Contract dst = new Contract(); 4440 copyValues(dst); 4441 dst.identifier = identifier == null ? null : identifier.copy(); 4442 dst.issued = issued == null ? null : issued.copy(); 4443 dst.applies = applies == null ? null : applies.copy(); 4444 if (subject != null) { 4445 dst.subject = new ArrayList<Reference>(); 4446 for (Reference i : subject) 4447 dst.subject.add(i.copy()); 4448 }; 4449 if (topic != null) { 4450 dst.topic = new ArrayList<Reference>(); 4451 for (Reference i : topic) 4452 dst.topic.add(i.copy()); 4453 }; 4454 if (authority != null) { 4455 dst.authority = new ArrayList<Reference>(); 4456 for (Reference i : authority) 4457 dst.authority.add(i.copy()); 4458 }; 4459 if (domain != null) { 4460 dst.domain = new ArrayList<Reference>(); 4461 for (Reference i : domain) 4462 dst.domain.add(i.copy()); 4463 }; 4464 dst.type = type == null ? null : type.copy(); 4465 if (subType != null) { 4466 dst.subType = new ArrayList<CodeableConcept>(); 4467 for (CodeableConcept i : subType) 4468 dst.subType.add(i.copy()); 4469 }; 4470 if (action != null) { 4471 dst.action = new ArrayList<CodeableConcept>(); 4472 for (CodeableConcept i : action) 4473 dst.action.add(i.copy()); 4474 }; 4475 if (actionReason != null) { 4476 dst.actionReason = new ArrayList<CodeableConcept>(); 4477 for (CodeableConcept i : actionReason) 4478 dst.actionReason.add(i.copy()); 4479 }; 4480 if (agent != null) { 4481 dst.agent = new ArrayList<AgentComponent>(); 4482 for (AgentComponent i : agent) 4483 dst.agent.add(i.copy()); 4484 }; 4485 if (signer != null) { 4486 dst.signer = new ArrayList<SignatoryComponent>(); 4487 for (SignatoryComponent i : signer) 4488 dst.signer.add(i.copy()); 4489 }; 4490 if (valuedItem != null) { 4491 dst.valuedItem = new ArrayList<ValuedItemComponent>(); 4492 for (ValuedItemComponent i : valuedItem) 4493 dst.valuedItem.add(i.copy()); 4494 }; 4495 if (term != null) { 4496 dst.term = new ArrayList<TermComponent>(); 4497 for (TermComponent i : term) 4498 dst.term.add(i.copy()); 4499 }; 4500 dst.binding = binding == null ? null : binding.copy(); 4501 if (friendly != null) { 4502 dst.friendly = new ArrayList<FriendlyLanguageComponent>(); 4503 for (FriendlyLanguageComponent i : friendly) 4504 dst.friendly.add(i.copy()); 4505 }; 4506 if (legal != null) { 4507 dst.legal = new ArrayList<LegalLanguageComponent>(); 4508 for (LegalLanguageComponent i : legal) 4509 dst.legal.add(i.copy()); 4510 }; 4511 if (rule != null) { 4512 dst.rule = new ArrayList<ComputableLanguageComponent>(); 4513 for (ComputableLanguageComponent i : rule) 4514 dst.rule.add(i.copy()); 4515 }; 4516 return dst; 4517 } 4518 4519 protected Contract typedCopy() { 4520 return copy(); 4521 } 4522 4523 @Override 4524 public boolean equalsDeep(Base other) { 4525 if (!super.equalsDeep(other)) 4526 return false; 4527 if (!(other instanceof Contract)) 4528 return false; 4529 Contract o = (Contract) other; 4530 return compareDeep(identifier, o.identifier, true) && compareDeep(issued, o.issued, true) && compareDeep(applies, o.applies, true) 4531 && compareDeep(subject, o.subject, true) && compareDeep(topic, o.topic, true) && compareDeep(authority, o.authority, true) 4532 && compareDeep(domain, o.domain, true) && compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) 4533 && compareDeep(action, o.action, true) && compareDeep(actionReason, o.actionReason, true) && compareDeep(agent, o.agent, true) 4534 && compareDeep(signer, o.signer, true) && compareDeep(valuedItem, o.valuedItem, true) && compareDeep(term, o.term, true) 4535 && compareDeep(binding, o.binding, true) && compareDeep(friendly, o.friendly, true) && compareDeep(legal, o.legal, true) 4536 && compareDeep(rule, o.rule, true); 4537 } 4538 4539 @Override 4540 public boolean equalsShallow(Base other) { 4541 if (!super.equalsShallow(other)) 4542 return false; 4543 if (!(other instanceof Contract)) 4544 return false; 4545 Contract o = (Contract) other; 4546 return compareValues(issued, o.issued, true); 4547 } 4548 4549 public boolean isEmpty() { 4550 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (issued == null || issued.isEmpty()) 4551 && (applies == null || applies.isEmpty()) && (subject == null || subject.isEmpty()) && (topic == null || topic.isEmpty()) 4552 && (authority == null || authority.isEmpty()) && (domain == null || domain.isEmpty()) && (type == null || type.isEmpty()) 4553 && (subType == null || subType.isEmpty()) && (action == null || action.isEmpty()) && (actionReason == null || actionReason.isEmpty()) 4554 && (agent == null || agent.isEmpty()) && (signer == null || signer.isEmpty()) && (valuedItem == null || valuedItem.isEmpty()) 4555 && (term == null || term.isEmpty()) && (binding == null || binding.isEmpty()) && (friendly == null || friendly.isEmpty()) 4556 && (legal == null || legal.isEmpty()) && (rule == null || rule.isEmpty()); 4557 } 4558 4559 @Override 4560 public ResourceType getResourceType() { 4561 return ResourceType.Contract; 4562 } 4563 4564 /** 4565 * Search parameter: <b>topic</b> 4566 * <p> 4567 * Description: <b>The identity of the topic of the contract</b><br> 4568 * Type: <b>reference</b><br> 4569 * Path: <b>Contract.topic</b><br> 4570 * </p> 4571 */ 4572 @SearchParamDefinition(name="topic", path="Contract.topic", description="The identity of the topic of the contract", type="reference" ) 4573 public static final String SP_TOPIC = "topic"; 4574 /** 4575 * <b>Fluent Client</b> search parameter constant for <b>topic</b> 4576 * <p> 4577 * Description: <b>The identity of the topic of the contract</b><br> 4578 * Type: <b>reference</b><br> 4579 * Path: <b>Contract.topic</b><br> 4580 * </p> 4581 */ 4582 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TOPIC = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TOPIC); 4583 4584/** 4585 * Constant for fluent queries to be used to add include statements. Specifies 4586 * the path value of "<b>Contract:topic</b>". 4587 */ 4588 public static final ca.uhn.fhir.model.api.Include INCLUDE_TOPIC = new ca.uhn.fhir.model.api.Include("Contract:topic").toLocked(); 4589 4590 /** 4591 * Search parameter: <b>authority</b> 4592 * <p> 4593 * Description: <b>The authority of the contract</b><br> 4594 * Type: <b>reference</b><br> 4595 * Path: <b>Contract.authority</b><br> 4596 * </p> 4597 */ 4598 @SearchParamDefinition(name="authority", path="Contract.authority", description="The authority of the contract", type="reference" ) 4599 public static final String SP_AUTHORITY = "authority"; 4600 /** 4601 * <b>Fluent Client</b> search parameter constant for <b>authority</b> 4602 * <p> 4603 * Description: <b>The authority of the contract</b><br> 4604 * Type: <b>reference</b><br> 4605 * Path: <b>Contract.authority</b><br> 4606 * </p> 4607 */ 4608 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHORITY = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHORITY); 4609 4610/** 4611 * Constant for fluent queries to be used to add include statements. Specifies 4612 * the path value of "<b>Contract:authority</b>". 4613 */ 4614 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHORITY = new ca.uhn.fhir.model.api.Include("Contract:authority").toLocked(); 4615 4616 /** 4617 * Search parameter: <b>signer</b> 4618 * <p> 4619 * Description: <b>Contract Signatory Party</b><br> 4620 * Type: <b>reference</b><br> 4621 * Path: <b>Contract.signer.party</b><br> 4622 * </p> 4623 */ 4624 @SearchParamDefinition(name="signer", path="Contract.signer.party", description="Contract Signatory Party", type="reference" ) 4625 public static final String SP_SIGNER = "signer"; 4626 /** 4627 * <b>Fluent Client</b> search parameter constant for <b>signer</b> 4628 * <p> 4629 * Description: <b>Contract Signatory Party</b><br> 4630 * Type: <b>reference</b><br> 4631 * Path: <b>Contract.signer.party</b><br> 4632 * </p> 4633 */ 4634 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SIGNER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SIGNER); 4635 4636/** 4637 * Constant for fluent queries to be used to add include statements. Specifies 4638 * the path value of "<b>Contract:signer</b>". 4639 */ 4640 public static final ca.uhn.fhir.model.api.Include INCLUDE_SIGNER = new ca.uhn.fhir.model.api.Include("Contract:signer").toLocked(); 4641 4642 /** 4643 * Search parameter: <b>patient</b> 4644 * <p> 4645 * Description: <b>The identity of the subject of the contract (if a patient)</b><br> 4646 * Type: <b>reference</b><br> 4647 * Path: <b>Contract.subject</b><br> 4648 * </p> 4649 */ 4650 @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the subject of the contract (if a patient)", type="reference" ) 4651 public static final String SP_PATIENT = "patient"; 4652 /** 4653 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 4654 * <p> 4655 * Description: <b>The identity of the subject of the contract (if a patient)</b><br> 4656 * Type: <b>reference</b><br> 4657 * Path: <b>Contract.subject</b><br> 4658 * </p> 4659 */ 4660 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 4661 4662/** 4663 * Constant for fluent queries to be used to add include statements. Specifies 4664 * the path value of "<b>Contract:patient</b>". 4665 */ 4666 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Contract:patient").toLocked(); 4667 4668 /** 4669 * Search parameter: <b>subject</b> 4670 * <p> 4671 * Description: <b>The identity of the subject of the contract</b><br> 4672 * Type: <b>reference</b><br> 4673 * Path: <b>Contract.subject</b><br> 4674 * </p> 4675 */ 4676 @SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the subject of the contract", type="reference" ) 4677 public static final String SP_SUBJECT = "subject"; 4678 /** 4679 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 4680 * <p> 4681 * Description: <b>The identity of the subject of the contract</b><br> 4682 * Type: <b>reference</b><br> 4683 * Path: <b>Contract.subject</b><br> 4684 * </p> 4685 */ 4686 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 4687 4688/** 4689 * Constant for fluent queries to be used to add include statements. Specifies 4690 * the path value of "<b>Contract:subject</b>". 4691 */ 4692 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Contract:subject").toLocked(); 4693 4694 /** 4695 * Search parameter: <b>issued</b> 4696 * <p> 4697 * Description: <b>The date/time the contract was issued</b><br> 4698 * Type: <b>date</b><br> 4699 * Path: <b>Contract.issued</b><br> 4700 * </p> 4701 */ 4702 @SearchParamDefinition(name="issued", path="Contract.issued", description="The date/time the contract was issued", type="date" ) 4703 public static final String SP_ISSUED = "issued"; 4704 /** 4705 * <b>Fluent Client</b> search parameter constant for <b>issued</b> 4706 * <p> 4707 * Description: <b>The date/time the contract was issued</b><br> 4708 * Type: <b>date</b><br> 4709 * Path: <b>Contract.issued</b><br> 4710 * </p> 4711 */ 4712 public static final ca.uhn.fhir.rest.gclient.DateClientParam ISSUED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ISSUED); 4713 4714 /** 4715 * Search parameter: <b>domain</b> 4716 * <p> 4717 * Description: <b>The domain of the contract</b><br> 4718 * Type: <b>reference</b><br> 4719 * Path: <b>Contract.domain</b><br> 4720 * </p> 4721 */ 4722 @SearchParamDefinition(name="domain", path="Contract.domain", description="The domain of the contract", type="reference" ) 4723 public static final String SP_DOMAIN = "domain"; 4724 /** 4725 * <b>Fluent Client</b> search parameter constant for <b>domain</b> 4726 * <p> 4727 * Description: <b>The domain of the contract</b><br> 4728 * Type: <b>reference</b><br> 4729 * Path: <b>Contract.domain</b><br> 4730 * </p> 4731 */ 4732 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DOMAIN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DOMAIN); 4733 4734/** 4735 * Constant for fluent queries to be used to add include statements. Specifies 4736 * the path value of "<b>Contract:domain</b>". 4737 */ 4738 public static final ca.uhn.fhir.model.api.Include INCLUDE_DOMAIN = new ca.uhn.fhir.model.api.Include("Contract:domain").toLocked(); 4739 4740 /** 4741 * Search parameter: <b>ttopic</b> 4742 * <p> 4743 * Description: <b>The identity of the topic of the contract terms</b><br> 4744 * Type: <b>reference</b><br> 4745 * Path: <b>Contract.term.topic</b><br> 4746 * </p> 4747 */ 4748 @SearchParamDefinition(name="ttopic", path="Contract.term.topic", description="The identity of the topic of the contract terms", type="reference" ) 4749 public static final String SP_TTOPIC = "ttopic"; 4750 /** 4751 * <b>Fluent Client</b> search parameter constant for <b>ttopic</b> 4752 * <p> 4753 * Description: <b>The identity of the topic of the contract terms</b><br> 4754 * Type: <b>reference</b><br> 4755 * Path: <b>Contract.term.topic</b><br> 4756 * </p> 4757 */ 4758 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TTOPIC = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TTOPIC); 4759 4760/** 4761 * Constant for fluent queries to be used to add include statements. Specifies 4762 * the path value of "<b>Contract:ttopic</b>". 4763 */ 4764 public static final ca.uhn.fhir.model.api.Include INCLUDE_TTOPIC = new ca.uhn.fhir.model.api.Include("Contract:ttopic").toLocked(); 4765 4766 /** 4767 * Search parameter: <b>agent</b> 4768 * <p> 4769 * Description: <b>Agent to the Contact</b><br> 4770 * Type: <b>reference</b><br> 4771 * Path: <b>Contract.agent.actor</b><br> 4772 * </p> 4773 */ 4774 @SearchParamDefinition(name="agent", path="Contract.agent.actor", description="Agent to the Contact", type="reference" ) 4775 public static final String SP_AGENT = "agent"; 4776 /** 4777 * <b>Fluent Client</b> search parameter constant for <b>agent</b> 4778 * <p> 4779 * Description: <b>Agent to the Contact</b><br> 4780 * Type: <b>reference</b><br> 4781 * Path: <b>Contract.agent.actor</b><br> 4782 * </p> 4783 */ 4784 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AGENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AGENT); 4785 4786/** 4787 * Constant for fluent queries to be used to add include statements. Specifies 4788 * the path value of "<b>Contract:agent</b>". 4789 */ 4790 public static final ca.uhn.fhir.model.api.Include INCLUDE_AGENT = new ca.uhn.fhir.model.api.Include("Contract:agent").toLocked(); 4791 4792 /** 4793 * Search parameter: <b>identifier</b> 4794 * <p> 4795 * Description: <b>The identity of the contract</b><br> 4796 * Type: <b>token</b><br> 4797 * Path: <b>Contract.identifier</b><br> 4798 * </p> 4799 */ 4800 @SearchParamDefinition(name="identifier", path="Contract.identifier", description="The identity of the contract", type="token" ) 4801 public static final String SP_IDENTIFIER = "identifier"; 4802 /** 4803 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4804 * <p> 4805 * Description: <b>The identity of the contract</b><br> 4806 * Type: <b>token</b><br> 4807 * Path: <b>Contract.identifier</b><br> 4808 * </p> 4809 */ 4810 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 4811 4812 4813}