001package org.hl7.fhir.dstu2.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.dstu2 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057 058import ca.uhn.fhir.model.api.annotation.Child; 059import ca.uhn.fhir.model.api.annotation.Description; 060import ca.uhn.fhir.model.api.annotation.ResourceDef; 061import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 062import org.hl7.fhir.exceptions.FHIRException; 063/** 064 * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. 065 */ 066@ResourceDef(name="PaymentNotice", profile="http://hl7.org/fhir/Profile/PaymentNotice") 067public class PaymentNotice extends DomainResource { 068 069 /** 070 * The Response business identifier. 071 */ 072 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 073 @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) 074 protected List<Identifier> identifier; 075 076 /** 077 * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. 078 */ 079 @Child(name = "ruleset", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) 080 @Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." ) 081 protected Coding ruleset; 082 083 /** 084 * The style (standard) and version of the original material which was converted into this resource. 085 */ 086 @Child(name = "originalRuleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 087 @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) 088 protected Coding originalRuleset; 089 090 /** 091 * The date when this resource was created. 092 */ 093 @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 094 @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) 095 protected DateTimeType created; 096 097 /** 098 * The Insurer who is target of the request. 099 */ 100 @Child(name = "target", type = {Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) 101 @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target of the request." ) 102 protected Reference target; 103 104 /** 105 * The actual object that is the target of the reference (The Insurer who is target of the request.) 106 */ 107 protected Organization targetTarget; 108 109 /** 110 * The practitioner who is responsible for the services rendered to the patient. 111 */ 112 @Child(name = "provider", type = {Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) 113 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 114 protected Reference provider; 115 116 /** 117 * The actual object that is the target of the reference (The practitioner who is responsible for the services rendered to the patient.) 118 */ 119 protected Practitioner providerTarget; 120 121 /** 122 * The organization which is responsible for the services rendered to the patient. 123 */ 124 @Child(name = "organization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) 125 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) 126 protected Reference organization; 127 128 /** 129 * The actual object that is the target of the reference (The organization which is responsible for the services rendered to the patient.) 130 */ 131 protected Organization organizationTarget; 132 133 /** 134 * Reference of resource to reverse. 135 */ 136 @Child(name = "request", type = {}, order=7, min=0, max=1, modifier=false, summary=true) 137 @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) 138 protected Reference request; 139 140 /** 141 * The actual object that is the target of the reference (Reference of resource to reverse.) 142 */ 143 protected Resource requestTarget; 144 145 /** 146 * Reference of response to resource to reverse. 147 */ 148 @Child(name = "response", type = {}, order=8, min=0, max=1, modifier=false, summary=true) 149 @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) 150 protected Reference response; 151 152 /** 153 * The actual object that is the target of the reference (Reference of response to resource to reverse.) 154 */ 155 protected Resource responseTarget; 156 157 /** 158 * The payment status, typically paid: payment sent, cleared: payment received. 159 */ 160 @Child(name = "paymentStatus", type = {Coding.class}, order=9, min=1, max=1, modifier=false, summary=true) 161 @Description(shortDefinition="Status of the payment", formalDefinition="The payment status, typically paid: payment sent, cleared: payment received." ) 162 protected Coding paymentStatus; 163 164 private static final long serialVersionUID = -394826458L; 165 166 /* 167 * Constructor 168 */ 169 public PaymentNotice() { 170 super(); 171 } 172 173 /* 174 * Constructor 175 */ 176 public PaymentNotice(Coding paymentStatus) { 177 super(); 178 this.paymentStatus = paymentStatus; 179 } 180 181 /** 182 * @return {@link #identifier} (The Response business identifier.) 183 */ 184 public List<Identifier> getIdentifier() { 185 if (this.identifier == null) 186 this.identifier = new ArrayList<Identifier>(); 187 return this.identifier; 188 } 189 190 public boolean hasIdentifier() { 191 if (this.identifier == null) 192 return false; 193 for (Identifier item : this.identifier) 194 if (!item.isEmpty()) 195 return true; 196 return false; 197 } 198 199 /** 200 * @return {@link #identifier} (The Response business identifier.) 201 */ 202 // syntactic sugar 203 public Identifier addIdentifier() { //3 204 Identifier t = new Identifier(); 205 if (this.identifier == null) 206 this.identifier = new ArrayList<Identifier>(); 207 this.identifier.add(t); 208 return t; 209 } 210 211 // syntactic sugar 212 public PaymentNotice addIdentifier(Identifier t) { //3 213 if (t == null) 214 return this; 215 if (this.identifier == null) 216 this.identifier = new ArrayList<Identifier>(); 217 this.identifier.add(t); 218 return this; 219 } 220 221 /** 222 * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) 223 */ 224 public Coding getRuleset() { 225 if (this.ruleset == null) 226 if (Configuration.errorOnAutoCreate()) 227 throw new Error("Attempt to auto-create PaymentNotice.ruleset"); 228 else if (Configuration.doAutoCreate()) 229 this.ruleset = new Coding(); // cc 230 return this.ruleset; 231 } 232 233 public boolean hasRuleset() { 234 return this.ruleset != null && !this.ruleset.isEmpty(); 235 } 236 237 /** 238 * @param value {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) 239 */ 240 public PaymentNotice setRuleset(Coding value) { 241 this.ruleset = value; 242 return this; 243 } 244 245 /** 246 * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 247 */ 248 public Coding getOriginalRuleset() { 249 if (this.originalRuleset == null) 250 if (Configuration.errorOnAutoCreate()) 251 throw new Error("Attempt to auto-create PaymentNotice.originalRuleset"); 252 else if (Configuration.doAutoCreate()) 253 this.originalRuleset = new Coding(); // cc 254 return this.originalRuleset; 255 } 256 257 public boolean hasOriginalRuleset() { 258 return this.originalRuleset != null && !this.originalRuleset.isEmpty(); 259 } 260 261 /** 262 * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 263 */ 264 public PaymentNotice setOriginalRuleset(Coding value) { 265 this.originalRuleset = value; 266 return this; 267 } 268 269 /** 270 * @return {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 271 */ 272 public DateTimeType getCreatedElement() { 273 if (this.created == null) 274 if (Configuration.errorOnAutoCreate()) 275 throw new Error("Attempt to auto-create PaymentNotice.created"); 276 else if (Configuration.doAutoCreate()) 277 this.created = new DateTimeType(); // bb 278 return this.created; 279 } 280 281 public boolean hasCreatedElement() { 282 return this.created != null && !this.created.isEmpty(); 283 } 284 285 public boolean hasCreated() { 286 return this.created != null && !this.created.isEmpty(); 287 } 288 289 /** 290 * @param value {@link #created} (The date when this resource was created.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 291 */ 292 public PaymentNotice setCreatedElement(DateTimeType value) { 293 this.created = value; 294 return this; 295 } 296 297 /** 298 * @return The date when this resource was created. 299 */ 300 public Date getCreated() { 301 return this.created == null ? null : this.created.getValue(); 302 } 303 304 /** 305 * @param value The date when this resource was created. 306 */ 307 public PaymentNotice setCreated(Date value) { 308 if (value == null) 309 this.created = null; 310 else { 311 if (this.created == null) 312 this.created = new DateTimeType(); 313 this.created.setValue(value); 314 } 315 return this; 316 } 317 318 /** 319 * @return {@link #target} (The Insurer who is target of the request.) 320 */ 321 public Reference getTarget() { 322 if (this.target == null) 323 if (Configuration.errorOnAutoCreate()) 324 throw new Error("Attempt to auto-create PaymentNotice.target"); 325 else if (Configuration.doAutoCreate()) 326 this.target = new Reference(); // cc 327 return this.target; 328 } 329 330 public boolean hasTarget() { 331 return this.target != null && !this.target.isEmpty(); 332 } 333 334 /** 335 * @param value {@link #target} (The Insurer who is target of the request.) 336 */ 337 public PaymentNotice setTarget(Reference value) { 338 this.target = value; 339 return this; 340 } 341 342 /** 343 * @return {@link #target} 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 Insurer who is target of the request.) 344 */ 345 public Organization getTargetTarget() { 346 if (this.targetTarget == null) 347 if (Configuration.errorOnAutoCreate()) 348 throw new Error("Attempt to auto-create PaymentNotice.target"); 349 else if (Configuration.doAutoCreate()) 350 this.targetTarget = new Organization(); // aa 351 return this.targetTarget; 352 } 353 354 /** 355 * @param value {@link #target} 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 Insurer who is target of the request.) 356 */ 357 public PaymentNotice setTargetTarget(Organization value) { 358 this.targetTarget = value; 359 return this; 360 } 361 362 /** 363 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 364 */ 365 public Reference getProvider() { 366 if (this.provider == null) 367 if (Configuration.errorOnAutoCreate()) 368 throw new Error("Attempt to auto-create PaymentNotice.provider"); 369 else if (Configuration.doAutoCreate()) 370 this.provider = new Reference(); // cc 371 return this.provider; 372 } 373 374 public boolean hasProvider() { 375 return this.provider != null && !this.provider.isEmpty(); 376 } 377 378 /** 379 * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 380 */ 381 public PaymentNotice setProvider(Reference value) { 382 this.provider = value; 383 return this; 384 } 385 386 /** 387 * @return {@link #provider} 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 practitioner who is responsible for the services rendered to the patient.) 388 */ 389 public Practitioner getProviderTarget() { 390 if (this.providerTarget == null) 391 if (Configuration.errorOnAutoCreate()) 392 throw new Error("Attempt to auto-create PaymentNotice.provider"); 393 else if (Configuration.doAutoCreate()) 394 this.providerTarget = new Practitioner(); // aa 395 return this.providerTarget; 396 } 397 398 /** 399 * @param value {@link #provider} 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 practitioner who is responsible for the services rendered to the patient.) 400 */ 401 public PaymentNotice setProviderTarget(Practitioner value) { 402 this.providerTarget = value; 403 return this; 404 } 405 406 /** 407 * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) 408 */ 409 public Reference getOrganization() { 410 if (this.organization == null) 411 if (Configuration.errorOnAutoCreate()) 412 throw new Error("Attempt to auto-create PaymentNotice.organization"); 413 else if (Configuration.doAutoCreate()) 414 this.organization = new Reference(); // cc 415 return this.organization; 416 } 417 418 public boolean hasOrganization() { 419 return this.organization != null && !this.organization.isEmpty(); 420 } 421 422 /** 423 * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) 424 */ 425 public PaymentNotice setOrganization(Reference value) { 426 this.organization = value; 427 return this; 428 } 429 430 /** 431 * @return {@link #organization} 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 organization which is responsible for the services rendered to the patient.) 432 */ 433 public Organization getOrganizationTarget() { 434 if (this.organizationTarget == null) 435 if (Configuration.errorOnAutoCreate()) 436 throw new Error("Attempt to auto-create PaymentNotice.organization"); 437 else if (Configuration.doAutoCreate()) 438 this.organizationTarget = new Organization(); // aa 439 return this.organizationTarget; 440 } 441 442 /** 443 * @param value {@link #organization} 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 organization which is responsible for the services rendered to the patient.) 444 */ 445 public PaymentNotice setOrganizationTarget(Organization value) { 446 this.organizationTarget = value; 447 return this; 448 } 449 450 /** 451 * @return {@link #request} (Reference of resource to reverse.) 452 */ 453 public Reference getRequest() { 454 if (this.request == null) 455 if (Configuration.errorOnAutoCreate()) 456 throw new Error("Attempt to auto-create PaymentNotice.request"); 457 else if (Configuration.doAutoCreate()) 458 this.request = new Reference(); // cc 459 return this.request; 460 } 461 462 public boolean hasRequest() { 463 return this.request != null && !this.request.isEmpty(); 464 } 465 466 /** 467 * @param value {@link #request} (Reference of resource to reverse.) 468 */ 469 public PaymentNotice setRequest(Reference value) { 470 this.request = value; 471 return this; 472 } 473 474 /** 475 * @return {@link #request} 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. (Reference of resource to reverse.) 476 */ 477 public Resource getRequestTarget() { 478 return this.requestTarget; 479 } 480 481 /** 482 * @param value {@link #request} 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. (Reference of resource to reverse.) 483 */ 484 public PaymentNotice setRequestTarget(Resource value) { 485 this.requestTarget = value; 486 return this; 487 } 488 489 /** 490 * @return {@link #response} (Reference of response to resource to reverse.) 491 */ 492 public Reference getResponse() { 493 if (this.response == null) 494 if (Configuration.errorOnAutoCreate()) 495 throw new Error("Attempt to auto-create PaymentNotice.response"); 496 else if (Configuration.doAutoCreate()) 497 this.response = new Reference(); // cc 498 return this.response; 499 } 500 501 public boolean hasResponse() { 502 return this.response != null && !this.response.isEmpty(); 503 } 504 505 /** 506 * @param value {@link #response} (Reference of response to resource to reverse.) 507 */ 508 public PaymentNotice setResponse(Reference value) { 509 this.response = value; 510 return this; 511 } 512 513 /** 514 * @return {@link #response} 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. (Reference of response to resource to reverse.) 515 */ 516 public Resource getResponseTarget() { 517 return this.responseTarget; 518 } 519 520 /** 521 * @param value {@link #response} 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. (Reference of response to resource to reverse.) 522 */ 523 public PaymentNotice setResponseTarget(Resource value) { 524 this.responseTarget = value; 525 return this; 526 } 527 528 /** 529 * @return {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) 530 */ 531 public Coding getPaymentStatus() { 532 if (this.paymentStatus == null) 533 if (Configuration.errorOnAutoCreate()) 534 throw new Error("Attempt to auto-create PaymentNotice.paymentStatus"); 535 else if (Configuration.doAutoCreate()) 536 this.paymentStatus = new Coding(); // cc 537 return this.paymentStatus; 538 } 539 540 public boolean hasPaymentStatus() { 541 return this.paymentStatus != null && !this.paymentStatus.isEmpty(); 542 } 543 544 /** 545 * @param value {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) 546 */ 547 public PaymentNotice setPaymentStatus(Coding value) { 548 this.paymentStatus = value; 549 return this; 550 } 551 552 protected void listChildren(List<Property> childrenList) { 553 super.listChildren(childrenList); 554 childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 555 childrenList.add(new Property("ruleset", "Coding", "The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 556 childrenList.add(new Property("originalRuleset", "Coding", "The style (standard) and version of the original material which was converted into this resource.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); 557 childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); 558 childrenList.add(new Property("target", "Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); 559 childrenList.add(new Property("provider", "Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); 560 childrenList.add(new Property("organization", "Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); 561 childrenList.add(new Property("request", "Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); 562 childrenList.add(new Property("response", "Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); 563 childrenList.add(new Property("paymentStatus", "Coding", "The payment status, typically paid: payment sent, cleared: payment received.", 0, java.lang.Integer.MAX_VALUE, paymentStatus)); 564 } 565 566 @Override 567 public void setProperty(String name, Base value) throws FHIRException { 568 if (name.equals("identifier")) 569 this.getIdentifier().add(castToIdentifier(value)); 570 else if (name.equals("ruleset")) 571 this.ruleset = castToCoding(value); // Coding 572 else if (name.equals("originalRuleset")) 573 this.originalRuleset = castToCoding(value); // Coding 574 else if (name.equals("created")) 575 this.created = castToDateTime(value); // DateTimeType 576 else if (name.equals("target")) 577 this.target = castToReference(value); // Reference 578 else if (name.equals("provider")) 579 this.provider = castToReference(value); // Reference 580 else if (name.equals("organization")) 581 this.organization = castToReference(value); // Reference 582 else if (name.equals("request")) 583 this.request = castToReference(value); // Reference 584 else if (name.equals("response")) 585 this.response = castToReference(value); // Reference 586 else if (name.equals("paymentStatus")) 587 this.paymentStatus = castToCoding(value); // Coding 588 else 589 super.setProperty(name, value); 590 } 591 592 @Override 593 public Base addChild(String name) throws FHIRException { 594 if (name.equals("identifier")) { 595 return addIdentifier(); 596 } 597 else if (name.equals("ruleset")) { 598 this.ruleset = new Coding(); 599 return this.ruleset; 600 } 601 else if (name.equals("originalRuleset")) { 602 this.originalRuleset = new Coding(); 603 return this.originalRuleset; 604 } 605 else if (name.equals("created")) { 606 throw new FHIRException("Cannot call addChild on a primitive type PaymentNotice.created"); 607 } 608 else if (name.equals("target")) { 609 this.target = new Reference(); 610 return this.target; 611 } 612 else if (name.equals("provider")) { 613 this.provider = new Reference(); 614 return this.provider; 615 } 616 else if (name.equals("organization")) { 617 this.organization = new Reference(); 618 return this.organization; 619 } 620 else if (name.equals("request")) { 621 this.request = new Reference(); 622 return this.request; 623 } 624 else if (name.equals("response")) { 625 this.response = new Reference(); 626 return this.response; 627 } 628 else if (name.equals("paymentStatus")) { 629 this.paymentStatus = new Coding(); 630 return this.paymentStatus; 631 } 632 else 633 return super.addChild(name); 634 } 635 636 public String fhirType() { 637 return "PaymentNotice"; 638 639 } 640 641 public PaymentNotice copy() { 642 PaymentNotice dst = new PaymentNotice(); 643 copyValues(dst); 644 if (identifier != null) { 645 dst.identifier = new ArrayList<Identifier>(); 646 for (Identifier i : identifier) 647 dst.identifier.add(i.copy()); 648 }; 649 dst.ruleset = ruleset == null ? null : ruleset.copy(); 650 dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); 651 dst.created = created == null ? null : created.copy(); 652 dst.target = target == null ? null : target.copy(); 653 dst.provider = provider == null ? null : provider.copy(); 654 dst.organization = organization == null ? null : organization.copy(); 655 dst.request = request == null ? null : request.copy(); 656 dst.response = response == null ? null : response.copy(); 657 dst.paymentStatus = paymentStatus == null ? null : paymentStatus.copy(); 658 return dst; 659 } 660 661 protected PaymentNotice typedCopy() { 662 return copy(); 663 } 664 665 @Override 666 public boolean equalsDeep(Base other) { 667 if (!super.equalsDeep(other)) 668 return false; 669 if (!(other instanceof PaymentNotice)) 670 return false; 671 PaymentNotice o = (PaymentNotice) other; 672 return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) 673 && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) 674 && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) 675 && compareDeep(paymentStatus, o.paymentStatus, true); 676 } 677 678 @Override 679 public boolean equalsShallow(Base other) { 680 if (!super.equalsShallow(other)) 681 return false; 682 if (!(other instanceof PaymentNotice)) 683 return false; 684 PaymentNotice o = (PaymentNotice) other; 685 return compareValues(created, o.created, true); 686 } 687 688 public boolean isEmpty() { 689 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) 690 && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) 691 && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) 692 && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (paymentStatus == null || paymentStatus.isEmpty()) 693 ; 694 } 695 696 @Override 697 public ResourceType getResourceType() { 698 return ResourceType.PaymentNotice; 699 } 700 701 @SearchParamDefinition(name="identifier", path="PaymentNotice.identifier", description="The business identifier of the Eligibility", type="token" ) 702 public static final String SP_IDENTIFIER = "identifier"; 703 704} 705