001package org.hl7.fhir.dstu2016may.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.Description; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043/** 044 * This resource provides the status of the payment for goods and services rendered, and the request and response resource references. 045 */ 046@ResourceDef(name="PaymentNotice", profile="http://hl7.org/fhir/Profile/PaymentNotice") 047public class PaymentNotice extends DomainResource { 048 049 /** 050 * The Response business identifier. 051 */ 052 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 053 @Description(shortDefinition="Business Identifier", formalDefinition="The Response business identifier." ) 054 protected List<Identifier> identifier; 055 056 /** 057 * The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources. 058 */ 059 @Child(name = "ruleset", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=true) 060 @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." ) 061 protected Coding ruleset; 062 063 /** 064 * The style (standard) and version of the original material which was converted into this resource. 065 */ 066 @Child(name = "originalRuleset", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 067 @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) 068 protected Coding originalRuleset; 069 070 /** 071 * The date when this resource was created. 072 */ 073 @Child(name = "created", type = {DateTimeType.class}, order=3, min=0, max=1, modifier=false, summary=true) 074 @Description(shortDefinition="Creation date", formalDefinition="The date when this resource was created." ) 075 protected DateTimeType created; 076 077 /** 078 * The Insurer who is target of the request. 079 */ 080 @Child(name = "target", type = {Identifier.class, Organization.class}, order=4, min=0, max=1, modifier=false, summary=true) 081 @Description(shortDefinition="Insurer or Regulatory body", formalDefinition="The Insurer who is target of the request." ) 082 protected Type target; 083 084 /** 085 * The practitioner who is responsible for the services rendered to the patient. 086 */ 087 @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=5, min=0, max=1, modifier=false, summary=true) 088 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 089 protected Type provider; 090 091 /** 092 * The organization which is responsible for the services rendered to the patient. 093 */ 094 @Child(name = "organization", type = {Identifier.class, Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) 095 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." ) 096 protected Type organization; 097 098 /** 099 * Reference of resource to reverse. 100 */ 101 @Child(name = "request", type = {Identifier.class}, order=7, min=0, max=1, modifier=false, summary=true) 102 @Description(shortDefinition="Request reference", formalDefinition="Reference of resource to reverse." ) 103 protected Type request; 104 105 /** 106 * Reference of response to resource to reverse. 107 */ 108 @Child(name = "response", type = {Identifier.class}, order=8, min=0, max=1, modifier=false, summary=true) 109 @Description(shortDefinition="Response reference", formalDefinition="Reference of response to resource to reverse." ) 110 protected Type response; 111 112 /** 113 * The payment status, typically paid: payment sent, cleared: payment received. 114 */ 115 @Child(name = "paymentStatus", type = {Coding.class}, order=9, min=1, max=1, modifier=false, summary=true) 116 @Description(shortDefinition="Status of the payment", formalDefinition="The payment status, typically paid: payment sent, cleared: payment received." ) 117 protected Coding paymentStatus; 118 119 /** 120 * The date when the above payment action occurrred. 121 */ 122 @Child(name = "statusDate", type = {DateType.class}, order=10, min=0, max=1, modifier=false, summary=true) 123 @Description(shortDefinition="Payment or clearing date", formalDefinition="The date when the above payment action occurrred." ) 124 protected DateType statusDate; 125 126 private static final long serialVersionUID = -771143315L; 127 128 /** 129 * Constructor 130 */ 131 public PaymentNotice() { 132 super(); 133 } 134 135 /** 136 * Constructor 137 */ 138 public PaymentNotice(Coding paymentStatus) { 139 super(); 140 this.paymentStatus = paymentStatus; 141 } 142 143 /** 144 * @return {@link #identifier} (The Response business identifier.) 145 */ 146 public List<Identifier> getIdentifier() { 147 if (this.identifier == null) 148 this.identifier = new ArrayList<Identifier>(); 149 return this.identifier; 150 } 151 152 public boolean hasIdentifier() { 153 if (this.identifier == null) 154 return false; 155 for (Identifier item : this.identifier) 156 if (!item.isEmpty()) 157 return true; 158 return false; 159 } 160 161 /** 162 * @return {@link #identifier} (The Response business identifier.) 163 */ 164 // syntactic sugar 165 public Identifier addIdentifier() { //3 166 Identifier t = new Identifier(); 167 if (this.identifier == null) 168 this.identifier = new ArrayList<Identifier>(); 169 this.identifier.add(t); 170 return t; 171 } 172 173 // syntactic sugar 174 public PaymentNotice addIdentifier(Identifier t) { //3 175 if (t == null) 176 return this; 177 if (this.identifier == null) 178 this.identifier = new ArrayList<Identifier>(); 179 this.identifier.add(t); 180 return this; 181 } 182 183 /** 184 * @return {@link #ruleset} (The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.) 185 */ 186 public Coding getRuleset() { 187 if (this.ruleset == null) 188 if (Configuration.errorOnAutoCreate()) 189 throw new Error("Attempt to auto-create PaymentNotice.ruleset"); 190 else if (Configuration.doAutoCreate()) 191 this.ruleset = new Coding(); // cc 192 return this.ruleset; 193 } 194 195 public boolean hasRuleset() { 196 return this.ruleset != null && !this.ruleset.isEmpty(); 197 } 198 199 /** 200 * @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.) 201 */ 202 public PaymentNotice setRuleset(Coding value) { 203 this.ruleset = value; 204 return this; 205 } 206 207 /** 208 * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 209 */ 210 public Coding getOriginalRuleset() { 211 if (this.originalRuleset == null) 212 if (Configuration.errorOnAutoCreate()) 213 throw new Error("Attempt to auto-create PaymentNotice.originalRuleset"); 214 else if (Configuration.doAutoCreate()) 215 this.originalRuleset = new Coding(); // cc 216 return this.originalRuleset; 217 } 218 219 public boolean hasOriginalRuleset() { 220 return this.originalRuleset != null && !this.originalRuleset.isEmpty(); 221 } 222 223 /** 224 * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 225 */ 226 public PaymentNotice setOriginalRuleset(Coding value) { 227 this.originalRuleset = value; 228 return this; 229 } 230 231 /** 232 * @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 233 */ 234 public DateTimeType getCreatedElement() { 235 if (this.created == null) 236 if (Configuration.errorOnAutoCreate()) 237 throw new Error("Attempt to auto-create PaymentNotice.created"); 238 else if (Configuration.doAutoCreate()) 239 this.created = new DateTimeType(); // bb 240 return this.created; 241 } 242 243 public boolean hasCreatedElement() { 244 return this.created != null && !this.created.isEmpty(); 245 } 246 247 public boolean hasCreated() { 248 return this.created != null && !this.created.isEmpty(); 249 } 250 251 /** 252 * @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 253 */ 254 public PaymentNotice setCreatedElement(DateTimeType value) { 255 this.created = value; 256 return this; 257 } 258 259 /** 260 * @return The date when this resource was created. 261 */ 262 public Date getCreated() { 263 return this.created == null ? null : this.created.getValue(); 264 } 265 266 /** 267 * @param value The date when this resource was created. 268 */ 269 public PaymentNotice setCreated(Date value) { 270 if (value == null) 271 this.created = null; 272 else { 273 if (this.created == null) 274 this.created = new DateTimeType(); 275 this.created.setValue(value); 276 } 277 return this; 278 } 279 280 /** 281 * @return {@link #target} (The Insurer who is target of the request.) 282 */ 283 public Type getTarget() { 284 return this.target; 285 } 286 287 /** 288 * @return {@link #target} (The Insurer who is target of the request.) 289 */ 290 public Identifier getTargetIdentifier() throws FHIRException { 291 if (!(this.target instanceof Identifier)) 292 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); 293 return (Identifier) this.target; 294 } 295 296 public boolean hasTargetIdentifier() { 297 return this.target instanceof Identifier; 298 } 299 300 /** 301 * @return {@link #target} (The Insurer who is target of the request.) 302 */ 303 public Reference getTargetReference() throws FHIRException { 304 if (!(this.target instanceof Reference)) 305 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); 306 return (Reference) this.target; 307 } 308 309 public boolean hasTargetReference() { 310 return this.target instanceof Reference; 311 } 312 313 public boolean hasTarget() { 314 return this.target != null && !this.target.isEmpty(); 315 } 316 317 /** 318 * @param value {@link #target} (The Insurer who is target of the request.) 319 */ 320 public PaymentNotice setTarget(Type value) { 321 this.target = value; 322 return this; 323 } 324 325 /** 326 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 327 */ 328 public Type getProvider() { 329 return this.provider; 330 } 331 332 /** 333 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 334 */ 335 public Identifier getProviderIdentifier() throws FHIRException { 336 if (!(this.provider instanceof Identifier)) 337 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); 338 return (Identifier) this.provider; 339 } 340 341 public boolean hasProviderIdentifier() { 342 return this.provider instanceof Identifier; 343 } 344 345 /** 346 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 347 */ 348 public Reference getProviderReference() throws FHIRException { 349 if (!(this.provider instanceof Reference)) 350 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); 351 return (Reference) this.provider; 352 } 353 354 public boolean hasProviderReference() { 355 return this.provider instanceof Reference; 356 } 357 358 public boolean hasProvider() { 359 return this.provider != null && !this.provider.isEmpty(); 360 } 361 362 /** 363 * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 364 */ 365 public PaymentNotice setProvider(Type value) { 366 this.provider = value; 367 return this; 368 } 369 370 /** 371 * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) 372 */ 373 public Type getOrganization() { 374 return this.organization; 375 } 376 377 /** 378 * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) 379 */ 380 public Identifier getOrganizationIdentifier() throws FHIRException { 381 if (!(this.organization instanceof Identifier)) 382 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); 383 return (Identifier) this.organization; 384 } 385 386 public boolean hasOrganizationIdentifier() { 387 return this.organization instanceof Identifier; 388 } 389 390 /** 391 * @return {@link #organization} (The organization which is responsible for the services rendered to the patient.) 392 */ 393 public Reference getOrganizationReference() throws FHIRException { 394 if (!(this.organization instanceof Reference)) 395 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); 396 return (Reference) this.organization; 397 } 398 399 public boolean hasOrganizationReference() { 400 return this.organization instanceof Reference; 401 } 402 403 public boolean hasOrganization() { 404 return this.organization != null && !this.organization.isEmpty(); 405 } 406 407 /** 408 * @param value {@link #organization} (The organization which is responsible for the services rendered to the patient.) 409 */ 410 public PaymentNotice setOrganization(Type value) { 411 this.organization = value; 412 return this; 413 } 414 415 /** 416 * @return {@link #request} (Reference of resource to reverse.) 417 */ 418 public Type getRequest() { 419 return this.request; 420 } 421 422 /** 423 * @return {@link #request} (Reference of resource to reverse.) 424 */ 425 public Identifier getRequestIdentifier() throws FHIRException { 426 if (!(this.request instanceof Identifier)) 427 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.request.getClass().getName()+" was encountered"); 428 return (Identifier) this.request; 429 } 430 431 public boolean hasRequestIdentifier() { 432 return this.request instanceof Identifier; 433 } 434 435 /** 436 * @return {@link #request} (Reference of resource to reverse.) 437 */ 438 public Reference getRequestReference() throws FHIRException { 439 if (!(this.request instanceof Reference)) 440 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.request.getClass().getName()+" was encountered"); 441 return (Reference) this.request; 442 } 443 444 public boolean hasRequestReference() { 445 return this.request instanceof Reference; 446 } 447 448 public boolean hasRequest() { 449 return this.request != null && !this.request.isEmpty(); 450 } 451 452 /** 453 * @param value {@link #request} (Reference of resource to reverse.) 454 */ 455 public PaymentNotice setRequest(Type value) { 456 this.request = value; 457 return this; 458 } 459 460 /** 461 * @return {@link #response} (Reference of response to resource to reverse.) 462 */ 463 public Type getResponse() { 464 return this.response; 465 } 466 467 /** 468 * @return {@link #response} (Reference of response to resource to reverse.) 469 */ 470 public Identifier getResponseIdentifier() throws FHIRException { 471 if (!(this.response instanceof Identifier)) 472 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.response.getClass().getName()+" was encountered"); 473 return (Identifier) this.response; 474 } 475 476 public boolean hasResponseIdentifier() { 477 return this.response instanceof Identifier; 478 } 479 480 /** 481 * @return {@link #response} (Reference of response to resource to reverse.) 482 */ 483 public Reference getResponseReference() throws FHIRException { 484 if (!(this.response instanceof Reference)) 485 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.response.getClass().getName()+" was encountered"); 486 return (Reference) this.response; 487 } 488 489 public boolean hasResponseReference() { 490 return this.response instanceof Reference; 491 } 492 493 public boolean hasResponse() { 494 return this.response != null && !this.response.isEmpty(); 495 } 496 497 /** 498 * @param value {@link #response} (Reference of response to resource to reverse.) 499 */ 500 public PaymentNotice setResponse(Type value) { 501 this.response = value; 502 return this; 503 } 504 505 /** 506 * @return {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) 507 */ 508 public Coding getPaymentStatus() { 509 if (this.paymentStatus == null) 510 if (Configuration.errorOnAutoCreate()) 511 throw new Error("Attempt to auto-create PaymentNotice.paymentStatus"); 512 else if (Configuration.doAutoCreate()) 513 this.paymentStatus = new Coding(); // cc 514 return this.paymentStatus; 515 } 516 517 public boolean hasPaymentStatus() { 518 return this.paymentStatus != null && !this.paymentStatus.isEmpty(); 519 } 520 521 /** 522 * @param value {@link #paymentStatus} (The payment status, typically paid: payment sent, cleared: payment received.) 523 */ 524 public PaymentNotice setPaymentStatus(Coding value) { 525 this.paymentStatus = value; 526 return this; 527 } 528 529 /** 530 * @return {@link #statusDate} (The date when the above payment action occurrred.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 531 */ 532 public DateType getStatusDateElement() { 533 if (this.statusDate == null) 534 if (Configuration.errorOnAutoCreate()) 535 throw new Error("Attempt to auto-create PaymentNotice.statusDate"); 536 else if (Configuration.doAutoCreate()) 537 this.statusDate = new DateType(); // bb 538 return this.statusDate; 539 } 540 541 public boolean hasStatusDateElement() { 542 return this.statusDate != null && !this.statusDate.isEmpty(); 543 } 544 545 public boolean hasStatusDate() { 546 return this.statusDate != null && !this.statusDate.isEmpty(); 547 } 548 549 /** 550 * @param value {@link #statusDate} (The date when the above payment action occurrred.). This is the underlying object with id, value and extensions. The accessor "getStatusDate" gives direct access to the value 551 */ 552 public PaymentNotice setStatusDateElement(DateType value) { 553 this.statusDate = value; 554 return this; 555 } 556 557 /** 558 * @return The date when the above payment action occurrred. 559 */ 560 public Date getStatusDate() { 561 return this.statusDate == null ? null : this.statusDate.getValue(); 562 } 563 564 /** 565 * @param value The date when the above payment action occurrred. 566 */ 567 public PaymentNotice setStatusDate(Date value) { 568 if (value == null) 569 this.statusDate = null; 570 else { 571 if (this.statusDate == null) 572 this.statusDate = new DateType(); 573 this.statusDate.setValue(value); 574 } 575 return this; 576 } 577 578 protected void listChildren(List<Property> childrenList) { 579 super.listChildren(childrenList); 580 childrenList.add(new Property("identifier", "Identifier", "The Response business identifier.", 0, java.lang.Integer.MAX_VALUE, identifier)); 581 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)); 582 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)); 583 childrenList.add(new Property("created", "dateTime", "The date when this resource was created.", 0, java.lang.Integer.MAX_VALUE, created)); 584 childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "The Insurer who is target of the request.", 0, java.lang.Integer.MAX_VALUE, target)); 585 childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The practitioner who is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, provider)); 586 childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the services rendered to the patient.", 0, java.lang.Integer.MAX_VALUE, organization)); 587 childrenList.add(new Property("request[x]", "Identifier|Reference(Any)", "Reference of resource to reverse.", 0, java.lang.Integer.MAX_VALUE, request)); 588 childrenList.add(new Property("response[x]", "Identifier|Reference(Any)", "Reference of response to resource to reverse.", 0, java.lang.Integer.MAX_VALUE, response)); 589 childrenList.add(new Property("paymentStatus", "Coding", "The payment status, typically paid: payment sent, cleared: payment received.", 0, java.lang.Integer.MAX_VALUE, paymentStatus)); 590 childrenList.add(new Property("statusDate", "date", "The date when the above payment action occurrred.", 0, java.lang.Integer.MAX_VALUE, statusDate)); 591 } 592 593 @Override 594 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 595 switch (hash) { 596 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 597 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding 598 case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding 599 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 600 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type 601 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Type 602 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type 603 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // Type 604 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Type 605 case 1430704536: /*paymentStatus*/ return this.paymentStatus == null ? new Base[0] : new Base[] {this.paymentStatus}; // Coding 606 case 247524032: /*statusDate*/ return this.statusDate == null ? new Base[0] : new Base[] {this.statusDate}; // DateType 607 default: return super.getProperty(hash, name, checkValid); 608 } 609 610 } 611 612 @Override 613 public void setProperty(int hash, String name, Base value) throws FHIRException { 614 switch (hash) { 615 case -1618432855: // identifier 616 this.getIdentifier().add(castToIdentifier(value)); // Identifier 617 break; 618 case 1548678118: // ruleset 619 this.ruleset = castToCoding(value); // Coding 620 break; 621 case 1089373397: // originalRuleset 622 this.originalRuleset = castToCoding(value); // Coding 623 break; 624 case 1028554472: // created 625 this.created = castToDateTime(value); // DateTimeType 626 break; 627 case -880905839: // target 628 this.target = (Type) value; // Type 629 break; 630 case -987494927: // provider 631 this.provider = (Type) value; // Type 632 break; 633 case 1178922291: // organization 634 this.organization = (Type) value; // Type 635 break; 636 case 1095692943: // request 637 this.request = (Type) value; // Type 638 break; 639 case -340323263: // response 640 this.response = (Type) value; // Type 641 break; 642 case 1430704536: // paymentStatus 643 this.paymentStatus = castToCoding(value); // Coding 644 break; 645 case 247524032: // statusDate 646 this.statusDate = castToDate(value); // DateType 647 break; 648 default: super.setProperty(hash, name, value); 649 } 650 651 } 652 653 @Override 654 public void setProperty(String name, Base value) throws FHIRException { 655 if (name.equals("identifier")) 656 this.getIdentifier().add(castToIdentifier(value)); 657 else if (name.equals("ruleset")) 658 this.ruleset = castToCoding(value); // Coding 659 else if (name.equals("originalRuleset")) 660 this.originalRuleset = castToCoding(value); // Coding 661 else if (name.equals("created")) 662 this.created = castToDateTime(value); // DateTimeType 663 else if (name.equals("target[x]")) 664 this.target = (Type) value; // Type 665 else if (name.equals("provider[x]")) 666 this.provider = (Type) value; // Type 667 else if (name.equals("organization[x]")) 668 this.organization = (Type) value; // Type 669 else if (name.equals("request[x]")) 670 this.request = (Type) value; // Type 671 else if (name.equals("response[x]")) 672 this.response = (Type) value; // Type 673 else if (name.equals("paymentStatus")) 674 this.paymentStatus = castToCoding(value); // Coding 675 else if (name.equals("statusDate")) 676 this.statusDate = castToDate(value); // DateType 677 else 678 super.setProperty(name, value); 679 } 680 681 @Override 682 public Base makeProperty(int hash, String name) throws FHIRException { 683 switch (hash) { 684 case -1618432855: return addIdentifier(); // Identifier 685 case 1548678118: return getRuleset(); // Coding 686 case 1089373397: return getOriginalRuleset(); // Coding 687 case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType 688 case -815579825: return getTarget(); // Type 689 case 2064698607: return getProvider(); // Type 690 case 1326483053: return getOrganization(); // Type 691 case 37106577: return getRequest(); // Type 692 case 1847549087: return getResponse(); // Type 693 case 1430704536: return getPaymentStatus(); // Coding 694 case 247524032: throw new FHIRException("Cannot make property statusDate as it is not a complex type"); // DateType 695 default: return super.makeProperty(hash, name); 696 } 697 698 } 699 700 @Override 701 public Base addChild(String name) throws FHIRException { 702 if (name.equals("identifier")) { 703 return addIdentifier(); 704 } 705 else if (name.equals("ruleset")) { 706 this.ruleset = new Coding(); 707 return this.ruleset; 708 } 709 else if (name.equals("originalRuleset")) { 710 this.originalRuleset = new Coding(); 711 return this.originalRuleset; 712 } 713 else if (name.equals("created")) { 714 throw new FHIRException("Cannot call addChild on a primitive type PaymentNotice.created"); 715 } 716 else if (name.equals("targetIdentifier")) { 717 this.target = new Identifier(); 718 return this.target; 719 } 720 else if (name.equals("targetReference")) { 721 this.target = new Reference(); 722 return this.target; 723 } 724 else if (name.equals("providerIdentifier")) { 725 this.provider = new Identifier(); 726 return this.provider; 727 } 728 else if (name.equals("providerReference")) { 729 this.provider = new Reference(); 730 return this.provider; 731 } 732 else if (name.equals("organizationIdentifier")) { 733 this.organization = new Identifier(); 734 return this.organization; 735 } 736 else if (name.equals("organizationReference")) { 737 this.organization = new Reference(); 738 return this.organization; 739 } 740 else if (name.equals("requestIdentifier")) { 741 this.request = new Identifier(); 742 return this.request; 743 } 744 else if (name.equals("requestReference")) { 745 this.request = new Reference(); 746 return this.request; 747 } 748 else if (name.equals("responseIdentifier")) { 749 this.response = new Identifier(); 750 return this.response; 751 } 752 else if (name.equals("responseReference")) { 753 this.response = new Reference(); 754 return this.response; 755 } 756 else if (name.equals("paymentStatus")) { 757 this.paymentStatus = new Coding(); 758 return this.paymentStatus; 759 } 760 else if (name.equals("statusDate")) { 761 throw new FHIRException("Cannot call addChild on a primitive type PaymentNotice.statusDate"); 762 } 763 else 764 return super.addChild(name); 765 } 766 767 public String fhirType() { 768 return "PaymentNotice"; 769 770 } 771 772 public PaymentNotice copy() { 773 PaymentNotice dst = new PaymentNotice(); 774 copyValues(dst); 775 if (identifier != null) { 776 dst.identifier = new ArrayList<Identifier>(); 777 for (Identifier i : identifier) 778 dst.identifier.add(i.copy()); 779 }; 780 dst.ruleset = ruleset == null ? null : ruleset.copy(); 781 dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); 782 dst.created = created == null ? null : created.copy(); 783 dst.target = target == null ? null : target.copy(); 784 dst.provider = provider == null ? null : provider.copy(); 785 dst.organization = organization == null ? null : organization.copy(); 786 dst.request = request == null ? null : request.copy(); 787 dst.response = response == null ? null : response.copy(); 788 dst.paymentStatus = paymentStatus == null ? null : paymentStatus.copy(); 789 dst.statusDate = statusDate == null ? null : statusDate.copy(); 790 return dst; 791 } 792 793 protected PaymentNotice typedCopy() { 794 return copy(); 795 } 796 797 @Override 798 public boolean equalsDeep(Base other) { 799 if (!super.equalsDeep(other)) 800 return false; 801 if (!(other instanceof PaymentNotice)) 802 return false; 803 PaymentNotice o = (PaymentNotice) other; 804 return compareDeep(identifier, o.identifier, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) 805 && compareDeep(created, o.created, true) && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) 806 && compareDeep(organization, o.organization, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) 807 && compareDeep(paymentStatus, o.paymentStatus, true) && compareDeep(statusDate, o.statusDate, true) 808 ; 809 } 810 811 @Override 812 public boolean equalsShallow(Base other) { 813 if (!super.equalsShallow(other)) 814 return false; 815 if (!(other instanceof PaymentNotice)) 816 return false; 817 PaymentNotice o = (PaymentNotice) other; 818 return compareValues(created, o.created, true) && compareValues(statusDate, o.statusDate, true); 819 } 820 821 public boolean isEmpty() { 822 return super.isEmpty() && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) 823 && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) 824 && (target == null || target.isEmpty()) && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) 825 && (request == null || request.isEmpty()) && (response == null || response.isEmpty()) && (paymentStatus == null || paymentStatus.isEmpty()) 826 && (statusDate == null || statusDate.isEmpty()); 827 } 828 829 @Override 830 public ResourceType getResourceType() { 831 return ResourceType.PaymentNotice; 832 } 833 834 /** 835 * Search parameter: <b>paymentstatus</b> 836 * <p> 837 * Description: <b>The type of payment notice</b><br> 838 * Type: <b>token</b><br> 839 * Path: <b>PaymentNotice.paymentStatus</b><br> 840 * </p> 841 */ 842 @SearchParamDefinition(name="paymentstatus", path="PaymentNotice.paymentStatus", description="The type of payment notice", type="token" ) 843 public static final String SP_PAYMENTSTATUS = "paymentstatus"; 844 /** 845 * <b>Fluent Client</b> search parameter constant for <b>paymentstatus</b> 846 * <p> 847 * Description: <b>The type of payment notice</b><br> 848 * Type: <b>token</b><br> 849 * Path: <b>PaymentNotice.paymentStatus</b><br> 850 * </p> 851 */ 852 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PAYMENTSTATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PAYMENTSTATUS); 853 854 /** 855 * Search parameter: <b>statusdate</b> 856 * <p> 857 * Description: <b>The date of the payment action</b><br> 858 * Type: <b>date</b><br> 859 * Path: <b>PaymentNotice.statusDate</b><br> 860 * </p> 861 */ 862 @SearchParamDefinition(name="statusdate", path="PaymentNotice.statusDate", description="The date of the payment action", type="date" ) 863 public static final String SP_STATUSDATE = "statusdate"; 864 /** 865 * <b>Fluent Client</b> search parameter constant for <b>statusdate</b> 866 * <p> 867 * Description: <b>The date of the payment action</b><br> 868 * Type: <b>date</b><br> 869 * Path: <b>PaymentNotice.statusDate</b><br> 870 * </p> 871 */ 872 public static final ca.uhn.fhir.rest.gclient.DateClientParam STATUSDATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_STATUSDATE); 873 874 /** 875 * Search parameter: <b>created</b> 876 * <p> 877 * Description: <b>Creation date fro the notice</b><br> 878 * Type: <b>date</b><br> 879 * Path: <b>PaymentNotice.created</b><br> 880 * </p> 881 */ 882 @SearchParamDefinition(name="created", path="PaymentNotice.created", description="Creation date fro the notice", type="date" ) 883 public static final String SP_CREATED = "created"; 884 /** 885 * <b>Fluent Client</b> search parameter constant for <b>created</b> 886 * <p> 887 * Description: <b>Creation date fro the notice</b><br> 888 * Type: <b>date</b><br> 889 * Path: <b>PaymentNotice.created</b><br> 890 * </p> 891 */ 892 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 893 894 /** 895 * Search parameter: <b>requestidentifier</b> 896 * <p> 897 * Description: <b>The Claim</b><br> 898 * Type: <b>token</b><br> 899 * Path: <b>PaymentNotice.requestIdentifier</b><br> 900 * </p> 901 */ 902 @SearchParamDefinition(name="requestidentifier", path="PaymentNotice.request.as(Identifier)", description="The Claim", type="token" ) 903 public static final String SP_REQUESTIDENTIFIER = "requestidentifier"; 904 /** 905 * <b>Fluent Client</b> search parameter constant for <b>requestidentifier</b> 906 * <p> 907 * Description: <b>The Claim</b><br> 908 * Type: <b>token</b><br> 909 * Path: <b>PaymentNotice.requestIdentifier</b><br> 910 * </p> 911 */ 912 public static final ca.uhn.fhir.rest.gclient.TokenClientParam REQUESTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REQUESTIDENTIFIER); 913 914 /** 915 * Search parameter: <b>providerreference</b> 916 * <p> 917 * Description: <b>The reference to the provider</b><br> 918 * Type: <b>reference</b><br> 919 * Path: <b>PaymentNotice.providerReference</b><br> 920 * </p> 921 */ 922 @SearchParamDefinition(name="providerreference", path="PaymentNotice.provider.as(Reference)", description="The reference to the provider", type="reference" ) 923 public static final String SP_PROVIDERREFERENCE = "providerreference"; 924 /** 925 * <b>Fluent Client</b> search parameter constant for <b>providerreference</b> 926 * <p> 927 * Description: <b>The reference to the provider</b><br> 928 * Type: <b>reference</b><br> 929 * Path: <b>PaymentNotice.providerReference</b><br> 930 * </p> 931 */ 932 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); 933 934/** 935 * Constant for fluent queries to be used to add include statements. Specifies 936 * the path value of "<b>PaymentNotice:providerreference</b>". 937 */ 938 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:providerreference").toLocked(); 939 940 /** 941 * Search parameter: <b>requestreference</b> 942 * <p> 943 * Description: <b>The Claim</b><br> 944 * Type: <b>reference</b><br> 945 * Path: <b>PaymentNotice.requestReference</b><br> 946 * </p> 947 */ 948 @SearchParamDefinition(name="requestreference", path="PaymentNotice.request.as(Reference)", description="The Claim", type="reference" ) 949 public static final String SP_REQUESTREFERENCE = "requestreference"; 950 /** 951 * <b>Fluent Client</b> search parameter constant for <b>requestreference</b> 952 * <p> 953 * Description: <b>The Claim</b><br> 954 * Type: <b>reference</b><br> 955 * Path: <b>PaymentNotice.requestReference</b><br> 956 * </p> 957 */ 958 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam REQUESTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_REQUESTREFERENCE); 959 960/** 961 * Constant for fluent queries to be used to add include statements. Specifies 962 * the path value of "<b>PaymentNotice:requestreference</b>". 963 */ 964 public static final ca.uhn.fhir.model.api.Include INCLUDE_REQUESTREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:requestreference").toLocked(); 965 966 /** 967 * Search parameter: <b>responsereference</b> 968 * <p> 969 * Description: <b>The ClaimResponse</b><br> 970 * Type: <b>reference</b><br> 971 * Path: <b>PaymentNotice.responseReference</b><br> 972 * </p> 973 */ 974 @SearchParamDefinition(name="responsereference", path="PaymentNotice.response.as(Reference)", description="The ClaimResponse", type="reference" ) 975 public static final String SP_RESPONSEREFERENCE = "responsereference"; 976 /** 977 * <b>Fluent Client</b> search parameter constant for <b>responsereference</b> 978 * <p> 979 * Description: <b>The ClaimResponse</b><br> 980 * Type: <b>reference</b><br> 981 * Path: <b>PaymentNotice.responseReference</b><br> 982 * </p> 983 */ 984 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESPONSEREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESPONSEREFERENCE); 985 986/** 987 * Constant for fluent queries to be used to add include statements. Specifies 988 * the path value of "<b>PaymentNotice:responsereference</b>". 989 */ 990 public static final ca.uhn.fhir.model.api.Include INCLUDE_RESPONSEREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:responsereference").toLocked(); 991 992 /** 993 * Search parameter: <b>organizationidentifier</b> 994 * <p> 995 * Description: <b>The organization who generated this resource</b><br> 996 * Type: <b>token</b><br> 997 * Path: <b>PaymentNotice.organizationIdentifier</b><br> 998 * </p> 999 */ 1000 @SearchParamDefinition(name="organizationidentifier", path="PaymentNotice.organization.as(Identifier)", description="The organization who generated this resource", type="token" ) 1001 public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; 1002 /** 1003 * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b> 1004 * <p> 1005 * Description: <b>The organization who generated this resource</b><br> 1006 * Type: <b>token</b><br> 1007 * Path: <b>PaymentNotice.organizationIdentifier</b><br> 1008 * </p> 1009 */ 1010 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); 1011 1012 /** 1013 * Search parameter: <b>organizationreference</b> 1014 * <p> 1015 * Description: <b>The organization who generated this resource</b><br> 1016 * Type: <b>reference</b><br> 1017 * Path: <b>PaymentNotice.organizationReference</b><br> 1018 * </p> 1019 */ 1020 @SearchParamDefinition(name="organizationreference", path="PaymentNotice.organization.as(Reference)", description="The organization who generated this resource", type="reference" ) 1021 public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; 1022 /** 1023 * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b> 1024 * <p> 1025 * Description: <b>The organization who generated this resource</b><br> 1026 * Type: <b>reference</b><br> 1027 * Path: <b>PaymentNotice.organizationReference</b><br> 1028 * </p> 1029 */ 1030 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); 1031 1032/** 1033 * Constant for fluent queries to be used to add include statements. Specifies 1034 * the path value of "<b>PaymentNotice:organizationreference</b>". 1035 */ 1036 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("PaymentNotice:organizationreference").toLocked(); 1037 1038 /** 1039 * Search parameter: <b>responseidentifier</b> 1040 * <p> 1041 * Description: <b>The ClaimResponse</b><br> 1042 * Type: <b>token</b><br> 1043 * Path: <b>PaymentNotice.responseIdentifier</b><br> 1044 * </p> 1045 */ 1046 @SearchParamDefinition(name="responseidentifier", path="PaymentNotice.response.as(Identifier)", description="The ClaimResponse", type="token" ) 1047 public static final String SP_RESPONSEIDENTIFIER = "responseidentifier"; 1048 /** 1049 * <b>Fluent Client</b> search parameter constant for <b>responseidentifier</b> 1050 * <p> 1051 * Description: <b>The ClaimResponse</b><br> 1052 * Type: <b>token</b><br> 1053 * Path: <b>PaymentNotice.responseIdentifier</b><br> 1054 * </p> 1055 */ 1056 public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESPONSEIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESPONSEIDENTIFIER); 1057 1058 /** 1059 * Search parameter: <b>identifier</b> 1060 * <p> 1061 * Description: <b>The business identifier of the notice</b><br> 1062 * Type: <b>token</b><br> 1063 * Path: <b>PaymentNotice.identifier</b><br> 1064 * </p> 1065 */ 1066 @SearchParamDefinition(name="identifier", path="PaymentNotice.identifier", description="The business identifier of the notice", type="token" ) 1067 public static final String SP_IDENTIFIER = "identifier"; 1068 /** 1069 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1070 * <p> 1071 * Description: <b>The business identifier of the notice</b><br> 1072 * Type: <b>token</b><br> 1073 * Path: <b>PaymentNotice.identifier</b><br> 1074 * </p> 1075 */ 1076 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1077 1078 /** 1079 * Search parameter: <b>provideridentifier</b> 1080 * <p> 1081 * Description: <b>The reference to the provider</b><br> 1082 * Type: <b>token</b><br> 1083 * Path: <b>PaymentNotice.providerIdentifier</b><br> 1084 * </p> 1085 */ 1086 @SearchParamDefinition(name="provideridentifier", path="PaymentNotice.provider.as(Identifier)", description="The reference to the provider", type="token" ) 1087 public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; 1088 /** 1089 * <b>Fluent Client</b> search parameter constant for <b>provideridentifier</b> 1090 * <p> 1091 * Description: <b>The reference to the provider</b><br> 1092 * Type: <b>token</b><br> 1093 * Path: <b>PaymentNotice.providerIdentifier</b><br> 1094 * </p> 1095 */ 1096 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); 1097 1098 1099} 1100