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