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