001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006import java.math.BigDecimal; 007 008/* 009 Copyright (c) 2011+, HL7, Inc. 010 All rights reserved. 011 012 Redistribution and use in source and binary forms, with or without modification, 013 are permitted provided that the following conditions are met: 014 015 * Redistributions of source code must retain the above copyright notice, this 016 list of conditions and the following disclaimer. 017 * Redistributions in binary form must reproduce the above copyright notice, 018 this list of conditions and the following disclaimer in the documentation 019 and/or other materials provided with the distribution. 020 * Neither the name of HL7 nor the names of its contributors may be used to 021 endorse or promote products derived from this software without specific 022 prior written permission. 023 024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 025 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 026 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 027 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 028 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 029 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 030 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 031 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 032 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 033 POSSIBILITY OF SUCH DAMAGE. 034 035*/ 036 037// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 038import java.util.ArrayList; 039import java.util.Date; 040import java.util.List; 041 042import org.hl7.fhir.exceptions.FHIRException; 043import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 044import org.hl7.fhir.utilities.Utilities; 045 046import ca.uhn.fhir.model.api.annotation.Block; 047import ca.uhn.fhir.model.api.annotation.Child; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.ResourceDef; 050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 051/** 052 * A provider issued list of services and products provided, or to be provided, to a patient which is provided to an insurer for payment recovery. 053 */ 054@ResourceDef(name="Claim", profile="http://hl7.org/fhir/Profile/Claim") 055public class Claim extends DomainResource { 056 057 public enum ClaimType { 058 /** 059 * A claim for Institution based, typically in-patient, goods and services. 060 */ 061 INSTITUTIONAL, 062 /** 063 * A claim for Oral Health (Dentist, Denturist, Hygienist) goods and services. 064 */ 065 ORAL, 066 /** 067 * A claim for Pharmacy based goods and services. 068 */ 069 PHARMACY, 070 /** 071 * A claim for Professional, typically out-patient, goods and services. 072 */ 073 PROFESSIONAL, 074 /** 075 * A claim for Vision (Opthamologist, Optometrist and Optician) goods and services. 076 */ 077 VISION, 078 /** 079 * added to help the parsers 080 */ 081 NULL; 082 public static ClaimType fromCode(String codeString) throws FHIRException { 083 if (codeString == null || "".equals(codeString)) 084 return null; 085 if ("institutional".equals(codeString)) 086 return INSTITUTIONAL; 087 if ("oral".equals(codeString)) 088 return ORAL; 089 if ("pharmacy".equals(codeString)) 090 return PHARMACY; 091 if ("professional".equals(codeString)) 092 return PROFESSIONAL; 093 if ("vision".equals(codeString)) 094 return VISION; 095 throw new FHIRException("Unknown ClaimType code '"+codeString+"'"); 096 } 097 public String toCode() { 098 switch (this) { 099 case INSTITUTIONAL: return "institutional"; 100 case ORAL: return "oral"; 101 case PHARMACY: return "pharmacy"; 102 case PROFESSIONAL: return "professional"; 103 case VISION: return "vision"; 104 case NULL: return null; 105 default: return "?"; 106 } 107 } 108 public String getSystem() { 109 switch (this) { 110 case INSTITUTIONAL: return "http://hl7.org/fhir/claim-type-link"; 111 case ORAL: return "http://hl7.org/fhir/claim-type-link"; 112 case PHARMACY: return "http://hl7.org/fhir/claim-type-link"; 113 case PROFESSIONAL: return "http://hl7.org/fhir/claim-type-link"; 114 case VISION: return "http://hl7.org/fhir/claim-type-link"; 115 case NULL: return null; 116 default: return "?"; 117 } 118 } 119 public String getDefinition() { 120 switch (this) { 121 case INSTITUTIONAL: return "A claim for Institution based, typically in-patient, goods and services."; 122 case ORAL: return "A claim for Oral Health (Dentist, Denturist, Hygienist) goods and services."; 123 case PHARMACY: return "A claim for Pharmacy based goods and services."; 124 case PROFESSIONAL: return "A claim for Professional, typically out-patient, goods and services."; 125 case VISION: return "A claim for Vision (Opthamologist, Optometrist and Optician) goods and services."; 126 case NULL: return null; 127 default: return "?"; 128 } 129 } 130 public String getDisplay() { 131 switch (this) { 132 case INSTITUTIONAL: return "Institutional"; 133 case ORAL: return "Oral Health"; 134 case PHARMACY: return "Pharmacy"; 135 case PROFESSIONAL: return "Professional"; 136 case VISION: return "Vision"; 137 case NULL: return null; 138 default: return "?"; 139 } 140 } 141 } 142 143 public static class ClaimTypeEnumFactory implements EnumFactory<ClaimType> { 144 public ClaimType fromCode(String codeString) throws IllegalArgumentException { 145 if (codeString == null || "".equals(codeString)) 146 if (codeString == null || "".equals(codeString)) 147 return null; 148 if ("institutional".equals(codeString)) 149 return ClaimType.INSTITUTIONAL; 150 if ("oral".equals(codeString)) 151 return ClaimType.ORAL; 152 if ("pharmacy".equals(codeString)) 153 return ClaimType.PHARMACY; 154 if ("professional".equals(codeString)) 155 return ClaimType.PROFESSIONAL; 156 if ("vision".equals(codeString)) 157 return ClaimType.VISION; 158 throw new IllegalArgumentException("Unknown ClaimType code '"+codeString+"'"); 159 } 160 public Enumeration<ClaimType> fromType(Base code) throws FHIRException { 161 if (code == null || code.isEmpty()) 162 return null; 163 String codeString = ((PrimitiveType) code).asStringValue(); 164 if (codeString == null || "".equals(codeString)) 165 return null; 166 if ("institutional".equals(codeString)) 167 return new Enumeration<ClaimType>(this, ClaimType.INSTITUTIONAL); 168 if ("oral".equals(codeString)) 169 return new Enumeration<ClaimType>(this, ClaimType.ORAL); 170 if ("pharmacy".equals(codeString)) 171 return new Enumeration<ClaimType>(this, ClaimType.PHARMACY); 172 if ("professional".equals(codeString)) 173 return new Enumeration<ClaimType>(this, ClaimType.PROFESSIONAL); 174 if ("vision".equals(codeString)) 175 return new Enumeration<ClaimType>(this, ClaimType.VISION); 176 throw new FHIRException("Unknown ClaimType code '"+codeString+"'"); 177 } 178 public String toCode(ClaimType code) { 179 if (code == ClaimType.INSTITUTIONAL) 180 return "institutional"; 181 if (code == ClaimType.ORAL) 182 return "oral"; 183 if (code == ClaimType.PHARMACY) 184 return "pharmacy"; 185 if (code == ClaimType.PROFESSIONAL) 186 return "professional"; 187 if (code == ClaimType.VISION) 188 return "vision"; 189 return "?"; 190 } 191 public String toSystem(ClaimType code) { 192 return code.getSystem(); 193 } 194 } 195 196 public enum Use { 197 /** 198 * The treatment is complete and this represents a Claim for the services. 199 */ 200 COMPLETE, 201 /** 202 * The treatment is proposed and this represents a Pre-authorization for the services. 203 */ 204 PROPOSED, 205 /** 206 * The treatment is proposed and this represents a Pre-determination for the services. 207 */ 208 EXPLORATORY, 209 /** 210 * A locally defined or otherwise resolved status. 211 */ 212 OTHER, 213 /** 214 * added to help the parsers 215 */ 216 NULL; 217 public static Use fromCode(String codeString) throws FHIRException { 218 if (codeString == null || "".equals(codeString)) 219 return null; 220 if ("complete".equals(codeString)) 221 return COMPLETE; 222 if ("proposed".equals(codeString)) 223 return PROPOSED; 224 if ("exploratory".equals(codeString)) 225 return EXPLORATORY; 226 if ("other".equals(codeString)) 227 return OTHER; 228 throw new FHIRException("Unknown Use code '"+codeString+"'"); 229 } 230 public String toCode() { 231 switch (this) { 232 case COMPLETE: return "complete"; 233 case PROPOSED: return "proposed"; 234 case EXPLORATORY: return "exploratory"; 235 case OTHER: return "other"; 236 case NULL: return null; 237 default: return "?"; 238 } 239 } 240 public String getSystem() { 241 switch (this) { 242 case COMPLETE: return "http://hl7.org/fhir/claim-use-link"; 243 case PROPOSED: return "http://hl7.org/fhir/claim-use-link"; 244 case EXPLORATORY: return "http://hl7.org/fhir/claim-use-link"; 245 case OTHER: return "http://hl7.org/fhir/claim-use-link"; 246 case NULL: return null; 247 default: return "?"; 248 } 249 } 250 public String getDefinition() { 251 switch (this) { 252 case COMPLETE: return "The treatment is complete and this represents a Claim for the services."; 253 case PROPOSED: return "The treatment is proposed and this represents a Pre-authorization for the services."; 254 case EXPLORATORY: return "The treatment is proposed and this represents a Pre-determination for the services."; 255 case OTHER: return "A locally defined or otherwise resolved status."; 256 case NULL: return null; 257 default: return "?"; 258 } 259 } 260 public String getDisplay() { 261 switch (this) { 262 case COMPLETE: return "Complete"; 263 case PROPOSED: return "Proposed"; 264 case EXPLORATORY: return "Exploratory"; 265 case OTHER: return "Other"; 266 case NULL: return null; 267 default: return "?"; 268 } 269 } 270 } 271 272 public static class UseEnumFactory implements EnumFactory<Use> { 273 public Use fromCode(String codeString) throws IllegalArgumentException { 274 if (codeString == null || "".equals(codeString)) 275 if (codeString == null || "".equals(codeString)) 276 return null; 277 if ("complete".equals(codeString)) 278 return Use.COMPLETE; 279 if ("proposed".equals(codeString)) 280 return Use.PROPOSED; 281 if ("exploratory".equals(codeString)) 282 return Use.EXPLORATORY; 283 if ("other".equals(codeString)) 284 return Use.OTHER; 285 throw new IllegalArgumentException("Unknown Use code '"+codeString+"'"); 286 } 287 public Enumeration<Use> fromType(Base code) throws FHIRException { 288 if (code == null || code.isEmpty()) 289 return null; 290 String codeString = ((PrimitiveType) code).asStringValue(); 291 if (codeString == null || "".equals(codeString)) 292 return null; 293 if ("complete".equals(codeString)) 294 return new Enumeration<Use>(this, Use.COMPLETE); 295 if ("proposed".equals(codeString)) 296 return new Enumeration<Use>(this, Use.PROPOSED); 297 if ("exploratory".equals(codeString)) 298 return new Enumeration<Use>(this, Use.EXPLORATORY); 299 if ("other".equals(codeString)) 300 return new Enumeration<Use>(this, Use.OTHER); 301 throw new FHIRException("Unknown Use code '"+codeString+"'"); 302 } 303 public String toCode(Use code) { 304 if (code == Use.COMPLETE) 305 return "complete"; 306 if (code == Use.PROPOSED) 307 return "proposed"; 308 if (code == Use.EXPLORATORY) 309 return "exploratory"; 310 if (code == Use.OTHER) 311 return "other"; 312 return "?"; 313 } 314 public String toSystem(Use code) { 315 return code.getSystem(); 316 } 317 } 318 319 @Block() 320 public static class RelatedClaimsComponent extends BackboneElement implements IBaseBackboneElement { 321 /** 322 * Other claims which are related to this claim such as prior claim versions or for related services. 323 */ 324 @Child(name = "claim", type = {Identifier.class, Claim.class}, order=1, min=0, max=1, modifier=false, summary=true) 325 @Description(shortDefinition="Reference to the related claim", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) 326 protected Type claim; 327 328 /** 329 * For example prior or umbrella. 330 */ 331 @Child(name = "relationship", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 332 @Description(shortDefinition="How the reference claim is related", formalDefinition="For example prior or umbrella." ) 333 protected Coding relationship; 334 335 /** 336 * An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # . 337 */ 338 @Child(name = "reference", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 339 @Description(shortDefinition="Related file or case reference", formalDefinition="An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # ." ) 340 protected Identifier reference; 341 342 private static final long serialVersionUID = -2033217402L; 343 344 /** 345 * Constructor 346 */ 347 public RelatedClaimsComponent() { 348 super(); 349 } 350 351 /** 352 * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) 353 */ 354 public Type getClaim() { 355 return this.claim; 356 } 357 358 /** 359 * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) 360 */ 361 public Identifier getClaimIdentifier() throws FHIRException { 362 if (!(this.claim instanceof Identifier)) 363 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.claim.getClass().getName()+" was encountered"); 364 return (Identifier) this.claim; 365 } 366 367 public boolean hasClaimIdentifier() { 368 return this.claim instanceof Identifier; 369 } 370 371 /** 372 * @return {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) 373 */ 374 public Reference getClaimReference() throws FHIRException { 375 if (!(this.claim instanceof Reference)) 376 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.claim.getClass().getName()+" was encountered"); 377 return (Reference) this.claim; 378 } 379 380 public boolean hasClaimReference() { 381 return this.claim instanceof Reference; 382 } 383 384 public boolean hasClaim() { 385 return this.claim != null && !this.claim.isEmpty(); 386 } 387 388 /** 389 * @param value {@link #claim} (Other claims which are related to this claim such as prior claim versions or for related services.) 390 */ 391 public RelatedClaimsComponent setClaim(Type value) { 392 this.claim = value; 393 return this; 394 } 395 396 /** 397 * @return {@link #relationship} (For example prior or umbrella.) 398 */ 399 public Coding getRelationship() { 400 if (this.relationship == null) 401 if (Configuration.errorOnAutoCreate()) 402 throw new Error("Attempt to auto-create RelatedClaimsComponent.relationship"); 403 else if (Configuration.doAutoCreate()) 404 this.relationship = new Coding(); // cc 405 return this.relationship; 406 } 407 408 public boolean hasRelationship() { 409 return this.relationship != null && !this.relationship.isEmpty(); 410 } 411 412 /** 413 * @param value {@link #relationship} (For example prior or umbrella.) 414 */ 415 public RelatedClaimsComponent setRelationship(Coding value) { 416 this.relationship = value; 417 return this; 418 } 419 420 /** 421 * @return {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .) 422 */ 423 public Identifier getReference() { 424 if (this.reference == null) 425 if (Configuration.errorOnAutoCreate()) 426 throw new Error("Attempt to auto-create RelatedClaimsComponent.reference"); 427 else if (Configuration.doAutoCreate()) 428 this.reference = new Identifier(); // cc 429 return this.reference; 430 } 431 432 public boolean hasReference() { 433 return this.reference != null && !this.reference.isEmpty(); 434 } 435 436 /** 437 * @param value {@link #reference} (An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .) 438 */ 439 public RelatedClaimsComponent setReference(Identifier value) { 440 this.reference = value; 441 return this; 442 } 443 444 protected void listChildren(List<Property> childrenList) { 445 super.listChildren(childrenList); 446 childrenList.add(new Property("claim[x]", "Identifier|Reference(Claim)", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, claim)); 447 childrenList.add(new Property("relationship", "Coding", "For example prior or umbrella.", 0, java.lang.Integer.MAX_VALUE, relationship)); 448 childrenList.add(new Property("reference", "Identifier", "An alternate organizational reference to the case or file to which this particular claim pertains - eg Property/Casualy insurer claim # or Workers Compensation case # .", 0, java.lang.Integer.MAX_VALUE, reference)); 449 } 450 451 @Override 452 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 453 switch (hash) { 454 case 94742588: /*claim*/ return this.claim == null ? new Base[0] : new Base[] {this.claim}; // Type 455 case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Coding 456 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Identifier 457 default: return super.getProperty(hash, name, checkValid); 458 } 459 460 } 461 462 @Override 463 public void setProperty(int hash, String name, Base value) throws FHIRException { 464 switch (hash) { 465 case 94742588: // claim 466 this.claim = (Type) value; // Type 467 break; 468 case -261851592: // relationship 469 this.relationship = castToCoding(value); // Coding 470 break; 471 case -925155509: // reference 472 this.reference = castToIdentifier(value); // Identifier 473 break; 474 default: super.setProperty(hash, name, value); 475 } 476 477 } 478 479 @Override 480 public void setProperty(String name, Base value) throws FHIRException { 481 if (name.equals("claim[x]")) 482 this.claim = (Type) value; // Type 483 else if (name.equals("relationship")) 484 this.relationship = castToCoding(value); // Coding 485 else if (name.equals("reference")) 486 this.reference = castToIdentifier(value); // Identifier 487 else 488 super.setProperty(name, value); 489 } 490 491 @Override 492 public Base makeProperty(int hash, String name) throws FHIRException { 493 switch (hash) { 494 case 683016900: return getClaim(); // Type 495 case -261851592: return getRelationship(); // Coding 496 case -925155509: return getReference(); // Identifier 497 default: return super.makeProperty(hash, name); 498 } 499 500 } 501 502 @Override 503 public Base addChild(String name) throws FHIRException { 504 if (name.equals("claimIdentifier")) { 505 this.claim = new Identifier(); 506 return this.claim; 507 } 508 else if (name.equals("claimReference")) { 509 this.claim = new Reference(); 510 return this.claim; 511 } 512 else if (name.equals("relationship")) { 513 this.relationship = new Coding(); 514 return this.relationship; 515 } 516 else if (name.equals("reference")) { 517 this.reference = new Identifier(); 518 return this.reference; 519 } 520 else 521 return super.addChild(name); 522 } 523 524 public RelatedClaimsComponent copy() { 525 RelatedClaimsComponent dst = new RelatedClaimsComponent(); 526 copyValues(dst); 527 dst.claim = claim == null ? null : claim.copy(); 528 dst.relationship = relationship == null ? null : relationship.copy(); 529 dst.reference = reference == null ? null : reference.copy(); 530 return dst; 531 } 532 533 @Override 534 public boolean equalsDeep(Base other) { 535 if (!super.equalsDeep(other)) 536 return false; 537 if (!(other instanceof RelatedClaimsComponent)) 538 return false; 539 RelatedClaimsComponent o = (RelatedClaimsComponent) other; 540 return compareDeep(claim, o.claim, true) && compareDeep(relationship, o.relationship, true) && compareDeep(reference, o.reference, true) 541 ; 542 } 543 544 @Override 545 public boolean equalsShallow(Base other) { 546 if (!super.equalsShallow(other)) 547 return false; 548 if (!(other instanceof RelatedClaimsComponent)) 549 return false; 550 RelatedClaimsComponent o = (RelatedClaimsComponent) other; 551 return true; 552 } 553 554 public boolean isEmpty() { 555 return super.isEmpty() && (claim == null || claim.isEmpty()) && (relationship == null || relationship.isEmpty()) 556 && (reference == null || reference.isEmpty()); 557 } 558 559 public String fhirType() { 560 return "Claim.related"; 561 562 } 563 564 } 565 566 @Block() 567 public static class PayeeComponent extends BackboneElement implements IBaseBackboneElement { 568 /** 569 * Type of Party to be reimbursed: Subscriber, provider, other. 570 */ 571 @Child(name = "type", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) 572 @Description(shortDefinition="Type of party: Subscriber, Provider, other", formalDefinition="Type of Party to be reimbursed: Subscriber, provider, other." ) 573 protected Coding type; 574 575 /** 576 * Party to be reimbursed: Subscriber, provider, other. 577 */ 578 @Child(name = "party", type = {Identifier.class, Practitioner.class, Organization.class, Patient.class, RelatedPerson.class}, order=2, min=0, max=1, modifier=false, summary=true) 579 @Description(shortDefinition="Party to receive the payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." ) 580 protected Type party; 581 582 private static final long serialVersionUID = 1304353420L; 583 584 /** 585 * Constructor 586 */ 587 public PayeeComponent() { 588 super(); 589 } 590 591 /** 592 * Constructor 593 */ 594 public PayeeComponent(Coding type) { 595 super(); 596 this.type = type; 597 } 598 599 /** 600 * @return {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) 601 */ 602 public Coding getType() { 603 if (this.type == null) 604 if (Configuration.errorOnAutoCreate()) 605 throw new Error("Attempt to auto-create PayeeComponent.type"); 606 else if (Configuration.doAutoCreate()) 607 this.type = new Coding(); // cc 608 return this.type; 609 } 610 611 public boolean hasType() { 612 return this.type != null && !this.type.isEmpty(); 613 } 614 615 /** 616 * @param value {@link #type} (Type of Party to be reimbursed: Subscriber, provider, other.) 617 */ 618 public PayeeComponent setType(Coding value) { 619 this.type = value; 620 return this; 621 } 622 623 /** 624 * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) 625 */ 626 public Type getParty() { 627 return this.party; 628 } 629 630 /** 631 * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) 632 */ 633 public Identifier getPartyIdentifier() throws FHIRException { 634 if (!(this.party instanceof Identifier)) 635 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.party.getClass().getName()+" was encountered"); 636 return (Identifier) this.party; 637 } 638 639 public boolean hasPartyIdentifier() { 640 return this.party instanceof Identifier; 641 } 642 643 /** 644 * @return {@link #party} (Party to be reimbursed: Subscriber, provider, other.) 645 */ 646 public Reference getPartyReference() throws FHIRException { 647 if (!(this.party instanceof Reference)) 648 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.party.getClass().getName()+" was encountered"); 649 return (Reference) this.party; 650 } 651 652 public boolean hasPartyReference() { 653 return this.party instanceof Reference; 654 } 655 656 public boolean hasParty() { 657 return this.party != null && !this.party.isEmpty(); 658 } 659 660 /** 661 * @param value {@link #party} (Party to be reimbursed: Subscriber, provider, other.) 662 */ 663 public PayeeComponent setParty(Type value) { 664 this.party = value; 665 return this; 666 } 667 668 protected void listChildren(List<Property> childrenList) { 669 super.listChildren(childrenList); 670 childrenList.add(new Property("type", "Coding", "Type of Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, type)); 671 childrenList.add(new Property("party[x]", "Identifier|Reference(Practitioner|Organization|Patient|RelatedPerson)", "Party to be reimbursed: Subscriber, provider, other.", 0, java.lang.Integer.MAX_VALUE, party)); 672 } 673 674 @Override 675 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 676 switch (hash) { 677 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 678 case 106437350: /*party*/ return this.party == null ? new Base[0] : new Base[] {this.party}; // Type 679 default: return super.getProperty(hash, name, checkValid); 680 } 681 682 } 683 684 @Override 685 public void setProperty(int hash, String name, Base value) throws FHIRException { 686 switch (hash) { 687 case 3575610: // type 688 this.type = castToCoding(value); // Coding 689 break; 690 case 106437350: // party 691 this.party = (Type) value; // Type 692 break; 693 default: super.setProperty(hash, name, value); 694 } 695 696 } 697 698 @Override 699 public void setProperty(String name, Base value) throws FHIRException { 700 if (name.equals("type")) 701 this.type = castToCoding(value); // Coding 702 else if (name.equals("party[x]")) 703 this.party = (Type) value; // Type 704 else 705 super.setProperty(name, value); 706 } 707 708 @Override 709 public Base makeProperty(int hash, String name) throws FHIRException { 710 switch (hash) { 711 case 3575610: return getType(); // Coding 712 case 1189320666: return getParty(); // Type 713 default: return super.makeProperty(hash, name); 714 } 715 716 } 717 718 @Override 719 public Base addChild(String name) throws FHIRException { 720 if (name.equals("type")) { 721 this.type = new Coding(); 722 return this.type; 723 } 724 else if (name.equals("partyIdentifier")) { 725 this.party = new Identifier(); 726 return this.party; 727 } 728 else if (name.equals("partyReference")) { 729 this.party = new Reference(); 730 return this.party; 731 } 732 else 733 return super.addChild(name); 734 } 735 736 public PayeeComponent copy() { 737 PayeeComponent dst = new PayeeComponent(); 738 copyValues(dst); 739 dst.type = type == null ? null : type.copy(); 740 dst.party = party == null ? null : party.copy(); 741 return dst; 742 } 743 744 @Override 745 public boolean equalsDeep(Base other) { 746 if (!super.equalsDeep(other)) 747 return false; 748 if (!(other instanceof PayeeComponent)) 749 return false; 750 PayeeComponent o = (PayeeComponent) other; 751 return compareDeep(type, o.type, true) && compareDeep(party, o.party, true); 752 } 753 754 @Override 755 public boolean equalsShallow(Base other) { 756 if (!super.equalsShallow(other)) 757 return false; 758 if (!(other instanceof PayeeComponent)) 759 return false; 760 PayeeComponent o = (PayeeComponent) other; 761 return true; 762 } 763 764 public boolean isEmpty() { 765 return super.isEmpty() && (type == null || type.isEmpty()) && (party == null || party.isEmpty()) 766 ; 767 } 768 769 public String fhirType() { 770 return "Claim.payee"; 771 772 } 773 774 } 775 776 @Block() 777 public static class DiagnosisComponent extends BackboneElement implements IBaseBackboneElement { 778 /** 779 * Sequence of diagnosis which serves to order and provide a link. 780 */ 781 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) 782 @Description(shortDefinition="Number to covey order of diagnosis", formalDefinition="Sequence of diagnosis which serves to order and provide a link." ) 783 protected PositiveIntType sequence; 784 785 /** 786 * The diagnosis. 787 */ 788 @Child(name = "diagnosis", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) 789 @Description(shortDefinition="Patient's list of diagnosis", formalDefinition="The diagnosis." ) 790 protected Coding diagnosis; 791 792 private static final long serialVersionUID = -795010186L; 793 794 /** 795 * Constructor 796 */ 797 public DiagnosisComponent() { 798 super(); 799 } 800 801 /** 802 * Constructor 803 */ 804 public DiagnosisComponent(PositiveIntType sequence, Coding diagnosis) { 805 super(); 806 this.sequence = sequence; 807 this.diagnosis = diagnosis; 808 } 809 810 /** 811 * @return {@link #sequence} (Sequence of diagnosis which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 812 */ 813 public PositiveIntType getSequenceElement() { 814 if (this.sequence == null) 815 if (Configuration.errorOnAutoCreate()) 816 throw new Error("Attempt to auto-create DiagnosisComponent.sequence"); 817 else if (Configuration.doAutoCreate()) 818 this.sequence = new PositiveIntType(); // bb 819 return this.sequence; 820 } 821 822 public boolean hasSequenceElement() { 823 return this.sequence != null && !this.sequence.isEmpty(); 824 } 825 826 public boolean hasSequence() { 827 return this.sequence != null && !this.sequence.isEmpty(); 828 } 829 830 /** 831 * @param value {@link #sequence} (Sequence of diagnosis which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 832 */ 833 public DiagnosisComponent setSequenceElement(PositiveIntType value) { 834 this.sequence = value; 835 return this; 836 } 837 838 /** 839 * @return Sequence of diagnosis which serves to order and provide a link. 840 */ 841 public int getSequence() { 842 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 843 } 844 845 /** 846 * @param value Sequence of diagnosis which serves to order and provide a link. 847 */ 848 public DiagnosisComponent setSequence(int value) { 849 if (this.sequence == null) 850 this.sequence = new PositiveIntType(); 851 this.sequence.setValue(value); 852 return this; 853 } 854 855 /** 856 * @return {@link #diagnosis} (The diagnosis.) 857 */ 858 public Coding getDiagnosis() { 859 if (this.diagnosis == null) 860 if (Configuration.errorOnAutoCreate()) 861 throw new Error("Attempt to auto-create DiagnosisComponent.diagnosis"); 862 else if (Configuration.doAutoCreate()) 863 this.diagnosis = new Coding(); // cc 864 return this.diagnosis; 865 } 866 867 public boolean hasDiagnosis() { 868 return this.diagnosis != null && !this.diagnosis.isEmpty(); 869 } 870 871 /** 872 * @param value {@link #diagnosis} (The diagnosis.) 873 */ 874 public DiagnosisComponent setDiagnosis(Coding value) { 875 this.diagnosis = value; 876 return this; 877 } 878 879 protected void listChildren(List<Property> childrenList) { 880 super.listChildren(childrenList); 881 childrenList.add(new Property("sequence", "positiveInt", "Sequence of diagnosis which serves to order and provide a link.", 0, java.lang.Integer.MAX_VALUE, sequence)); 882 childrenList.add(new Property("diagnosis", "Coding", "The diagnosis.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); 883 } 884 885 @Override 886 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 887 switch (hash) { 888 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 889 case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : new Base[] {this.diagnosis}; // Coding 890 default: return super.getProperty(hash, name, checkValid); 891 } 892 893 } 894 895 @Override 896 public void setProperty(int hash, String name, Base value) throws FHIRException { 897 switch (hash) { 898 case 1349547969: // sequence 899 this.sequence = castToPositiveInt(value); // PositiveIntType 900 break; 901 case 1196993265: // diagnosis 902 this.diagnosis = castToCoding(value); // Coding 903 break; 904 default: super.setProperty(hash, name, value); 905 } 906 907 } 908 909 @Override 910 public void setProperty(String name, Base value) throws FHIRException { 911 if (name.equals("sequence")) 912 this.sequence = castToPositiveInt(value); // PositiveIntType 913 else if (name.equals("diagnosis")) 914 this.diagnosis = castToCoding(value); // Coding 915 else 916 super.setProperty(name, value); 917 } 918 919 @Override 920 public Base makeProperty(int hash, String name) throws FHIRException { 921 switch (hash) { 922 case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType 923 case 1196993265: return getDiagnosis(); // Coding 924 default: return super.makeProperty(hash, name); 925 } 926 927 } 928 929 @Override 930 public Base addChild(String name) throws FHIRException { 931 if (name.equals("sequence")) { 932 throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); 933 } 934 else if (name.equals("diagnosis")) { 935 this.diagnosis = new Coding(); 936 return this.diagnosis; 937 } 938 else 939 return super.addChild(name); 940 } 941 942 public DiagnosisComponent copy() { 943 DiagnosisComponent dst = new DiagnosisComponent(); 944 copyValues(dst); 945 dst.sequence = sequence == null ? null : sequence.copy(); 946 dst.diagnosis = diagnosis == null ? null : diagnosis.copy(); 947 return dst; 948 } 949 950 @Override 951 public boolean equalsDeep(Base other) { 952 if (!super.equalsDeep(other)) 953 return false; 954 if (!(other instanceof DiagnosisComponent)) 955 return false; 956 DiagnosisComponent o = (DiagnosisComponent) other; 957 return compareDeep(sequence, o.sequence, true) && compareDeep(diagnosis, o.diagnosis, true); 958 } 959 960 @Override 961 public boolean equalsShallow(Base other) { 962 if (!super.equalsShallow(other)) 963 return false; 964 if (!(other instanceof DiagnosisComponent)) 965 return false; 966 DiagnosisComponent o = (DiagnosisComponent) other; 967 return compareValues(sequence, o.sequence, true); 968 } 969 970 public boolean isEmpty() { 971 return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (diagnosis == null || diagnosis.isEmpty()) 972 ; 973 } 974 975 public String fhirType() { 976 return "Claim.diagnosis"; 977 978 } 979 980 } 981 982 @Block() 983 public static class ProcedureComponent extends BackboneElement implements IBaseBackboneElement { 984 /** 985 * Sequence of procedures which serves to order and provide a link. 986 */ 987 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) 988 @Description(shortDefinition="Procedure sequence for reference", formalDefinition="Sequence of procedures which serves to order and provide a link." ) 989 protected PositiveIntType sequence; 990 991 /** 992 * Date and optionally time the procedure was performed . 993 */ 994 @Child(name = "date", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 995 @Description(shortDefinition="When the procedure was performed", formalDefinition="Date and optionally time the procedure was performed ." ) 996 protected DateTimeType date; 997 998 /** 999 * The procedure code. 1000 */ 1001 @Child(name = "procedure", type = {Coding.class, Procedure.class}, order=3, min=1, max=1, modifier=false, summary=true) 1002 @Description(shortDefinition="Patient's list of procedures performed", formalDefinition="The procedure code." ) 1003 protected Type procedure; 1004 1005 private static final long serialVersionUID = 864307347L; 1006 1007 /** 1008 * Constructor 1009 */ 1010 public ProcedureComponent() { 1011 super(); 1012 } 1013 1014 /** 1015 * Constructor 1016 */ 1017 public ProcedureComponent(PositiveIntType sequence, Type procedure) { 1018 super(); 1019 this.sequence = sequence; 1020 this.procedure = procedure; 1021 } 1022 1023 /** 1024 * @return {@link #sequence} (Sequence of procedures which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1025 */ 1026 public PositiveIntType getSequenceElement() { 1027 if (this.sequence == null) 1028 if (Configuration.errorOnAutoCreate()) 1029 throw new Error("Attempt to auto-create ProcedureComponent.sequence"); 1030 else if (Configuration.doAutoCreate()) 1031 this.sequence = new PositiveIntType(); // bb 1032 return this.sequence; 1033 } 1034 1035 public boolean hasSequenceElement() { 1036 return this.sequence != null && !this.sequence.isEmpty(); 1037 } 1038 1039 public boolean hasSequence() { 1040 return this.sequence != null && !this.sequence.isEmpty(); 1041 } 1042 1043 /** 1044 * @param value {@link #sequence} (Sequence of procedures which serves to order and provide a link.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1045 */ 1046 public ProcedureComponent setSequenceElement(PositiveIntType value) { 1047 this.sequence = value; 1048 return this; 1049 } 1050 1051 /** 1052 * @return Sequence of procedures which serves to order and provide a link. 1053 */ 1054 public int getSequence() { 1055 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 1056 } 1057 1058 /** 1059 * @param value Sequence of procedures which serves to order and provide a link. 1060 */ 1061 public ProcedureComponent setSequence(int value) { 1062 if (this.sequence == null) 1063 this.sequence = new PositiveIntType(); 1064 this.sequence.setValue(value); 1065 return this; 1066 } 1067 1068 /** 1069 * @return {@link #date} (Date and optionally time the procedure was performed .). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1070 */ 1071 public DateTimeType getDateElement() { 1072 if (this.date == null) 1073 if (Configuration.errorOnAutoCreate()) 1074 throw new Error("Attempt to auto-create ProcedureComponent.date"); 1075 else if (Configuration.doAutoCreate()) 1076 this.date = new DateTimeType(); // bb 1077 return this.date; 1078 } 1079 1080 public boolean hasDateElement() { 1081 return this.date != null && !this.date.isEmpty(); 1082 } 1083 1084 public boolean hasDate() { 1085 return this.date != null && !this.date.isEmpty(); 1086 } 1087 1088 /** 1089 * @param value {@link #date} (Date and optionally time the procedure was performed .). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1090 */ 1091 public ProcedureComponent setDateElement(DateTimeType value) { 1092 this.date = value; 1093 return this; 1094 } 1095 1096 /** 1097 * @return Date and optionally time the procedure was performed . 1098 */ 1099 public Date getDate() { 1100 return this.date == null ? null : this.date.getValue(); 1101 } 1102 1103 /** 1104 * @param value Date and optionally time the procedure was performed . 1105 */ 1106 public ProcedureComponent setDate(Date value) { 1107 if (value == null) 1108 this.date = null; 1109 else { 1110 if (this.date == null) 1111 this.date = new DateTimeType(); 1112 this.date.setValue(value); 1113 } 1114 return this; 1115 } 1116 1117 /** 1118 * @return {@link #procedure} (The procedure code.) 1119 */ 1120 public Type getProcedure() { 1121 return this.procedure; 1122 } 1123 1124 /** 1125 * @return {@link #procedure} (The procedure code.) 1126 */ 1127 public Coding getProcedureCoding() throws FHIRException { 1128 if (!(this.procedure instanceof Coding)) 1129 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.procedure.getClass().getName()+" was encountered"); 1130 return (Coding) this.procedure; 1131 } 1132 1133 public boolean hasProcedureCoding() { 1134 return this.procedure instanceof Coding; 1135 } 1136 1137 /** 1138 * @return {@link #procedure} (The procedure code.) 1139 */ 1140 public Reference getProcedureReference() throws FHIRException { 1141 if (!(this.procedure instanceof Reference)) 1142 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.procedure.getClass().getName()+" was encountered"); 1143 return (Reference) this.procedure; 1144 } 1145 1146 public boolean hasProcedureReference() { 1147 return this.procedure instanceof Reference; 1148 } 1149 1150 public boolean hasProcedure() { 1151 return this.procedure != null && !this.procedure.isEmpty(); 1152 } 1153 1154 /** 1155 * @param value {@link #procedure} (The procedure code.) 1156 */ 1157 public ProcedureComponent setProcedure(Type value) { 1158 this.procedure = value; 1159 return this; 1160 } 1161 1162 protected void listChildren(List<Property> childrenList) { 1163 super.listChildren(childrenList); 1164 childrenList.add(new Property("sequence", "positiveInt", "Sequence of procedures which serves to order and provide a link.", 0, java.lang.Integer.MAX_VALUE, sequence)); 1165 childrenList.add(new Property("date", "dateTime", "Date and optionally time the procedure was performed .", 0, java.lang.Integer.MAX_VALUE, date)); 1166 childrenList.add(new Property("procedure[x]", "Coding|Reference(Procedure)", "The procedure code.", 0, java.lang.Integer.MAX_VALUE, procedure)); 1167 } 1168 1169 @Override 1170 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1171 switch (hash) { 1172 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 1173 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 1174 case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : new Base[] {this.procedure}; // Type 1175 default: return super.getProperty(hash, name, checkValid); 1176 } 1177 1178 } 1179 1180 @Override 1181 public void setProperty(int hash, String name, Base value) throws FHIRException { 1182 switch (hash) { 1183 case 1349547969: // sequence 1184 this.sequence = castToPositiveInt(value); // PositiveIntType 1185 break; 1186 case 3076014: // date 1187 this.date = castToDateTime(value); // DateTimeType 1188 break; 1189 case -1095204141: // procedure 1190 this.procedure = (Type) value; // Type 1191 break; 1192 default: super.setProperty(hash, name, value); 1193 } 1194 1195 } 1196 1197 @Override 1198 public void setProperty(String name, Base value) throws FHIRException { 1199 if (name.equals("sequence")) 1200 this.sequence = castToPositiveInt(value); // PositiveIntType 1201 else if (name.equals("date")) 1202 this.date = castToDateTime(value); // DateTimeType 1203 else if (name.equals("procedure[x]")) 1204 this.procedure = (Type) value; // Type 1205 else 1206 super.setProperty(name, value); 1207 } 1208 1209 @Override 1210 public Base makeProperty(int hash, String name) throws FHIRException { 1211 switch (hash) { 1212 case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType 1213 case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType 1214 case 1640074445: return getProcedure(); // Type 1215 default: return super.makeProperty(hash, name); 1216 } 1217 1218 } 1219 1220 @Override 1221 public Base addChild(String name) throws FHIRException { 1222 if (name.equals("sequence")) { 1223 throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); 1224 } 1225 else if (name.equals("date")) { 1226 throw new FHIRException("Cannot call addChild on a primitive type Claim.date"); 1227 } 1228 else if (name.equals("procedureCoding")) { 1229 this.procedure = new Coding(); 1230 return this.procedure; 1231 } 1232 else if (name.equals("procedureReference")) { 1233 this.procedure = new Reference(); 1234 return this.procedure; 1235 } 1236 else 1237 return super.addChild(name); 1238 } 1239 1240 public ProcedureComponent copy() { 1241 ProcedureComponent dst = new ProcedureComponent(); 1242 copyValues(dst); 1243 dst.sequence = sequence == null ? null : sequence.copy(); 1244 dst.date = date == null ? null : date.copy(); 1245 dst.procedure = procedure == null ? null : procedure.copy(); 1246 return dst; 1247 } 1248 1249 @Override 1250 public boolean equalsDeep(Base other) { 1251 if (!super.equalsDeep(other)) 1252 return false; 1253 if (!(other instanceof ProcedureComponent)) 1254 return false; 1255 ProcedureComponent o = (ProcedureComponent) other; 1256 return compareDeep(sequence, o.sequence, true) && compareDeep(date, o.date, true) && compareDeep(procedure, o.procedure, true) 1257 ; 1258 } 1259 1260 @Override 1261 public boolean equalsShallow(Base other) { 1262 if (!super.equalsShallow(other)) 1263 return false; 1264 if (!(other instanceof ProcedureComponent)) 1265 return false; 1266 ProcedureComponent o = (ProcedureComponent) other; 1267 return compareValues(sequence, o.sequence, true) && compareValues(date, o.date, true); 1268 } 1269 1270 public boolean isEmpty() { 1271 return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (date == null || date.isEmpty()) 1272 && (procedure == null || procedure.isEmpty()); 1273 } 1274 1275 public String fhirType() { 1276 return "Claim.procedure"; 1277 1278 } 1279 1280 } 1281 1282 @Block() 1283 public static class CoverageComponent extends BackboneElement implements IBaseBackboneElement { 1284 /** 1285 * A service line item. 1286 */ 1287 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1288 @Description(shortDefinition="Service instance identifier", formalDefinition="A service line item." ) 1289 protected PositiveIntType sequence; 1290 1291 /** 1292 * The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. 1293 */ 1294 @Child(name = "focal", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1295 @Description(shortDefinition="Is the focal Coverage", formalDefinition="The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated." ) 1296 protected BooleanType focal; 1297 1298 /** 1299 * Reference to the program or plan identification, underwriter or payor. 1300 */ 1301 @Child(name = "coverage", type = {Identifier.class, Coverage.class}, order=3, min=1, max=1, modifier=false, summary=true) 1302 @Description(shortDefinition="Insurance information", formalDefinition="Reference to the program or plan identification, underwriter or payor." ) 1303 protected Type coverage; 1304 1305 /** 1306 * The contract number of a business agreement which describes the terms and conditions. 1307 */ 1308 @Child(name = "businessArrangement", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 1309 @Description(shortDefinition="Business agreement", formalDefinition="The contract number of a business agreement which describes the terms and conditions." ) 1310 protected StringType businessArrangement; 1311 1312 /** 1313 * A list of references from the Insurer to which these services pertain. 1314 */ 1315 @Child(name = "preAuthRef", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1316 @Description(shortDefinition="Pre-Authorization/Determination Reference", formalDefinition="A list of references from the Insurer to which these services pertain." ) 1317 protected List<StringType> preAuthRef; 1318 1319 /** 1320 * The Coverages adjudication details. 1321 */ 1322 @Child(name = "claimResponse", type = {ClaimResponse.class}, order=6, min=0, max=1, modifier=false, summary=true) 1323 @Description(shortDefinition="Adjudication results", formalDefinition="The Coverages adjudication details." ) 1324 protected Reference claimResponse; 1325 1326 /** 1327 * The actual object that is the target of the reference (The Coverages adjudication details.) 1328 */ 1329 protected ClaimResponse claimResponseTarget; 1330 1331 /** 1332 * The style (standard) and version of the original material which was converted into this resource. 1333 */ 1334 @Child(name = "originalRuleset", type = {Coding.class}, order=7, min=0, max=1, modifier=false, summary=true) 1335 @Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." ) 1336 protected Coding originalRuleset; 1337 1338 private static final long serialVersionUID = 2031704818L; 1339 1340 /** 1341 * Constructor 1342 */ 1343 public CoverageComponent() { 1344 super(); 1345 } 1346 1347 /** 1348 * Constructor 1349 */ 1350 public CoverageComponent(PositiveIntType sequence, BooleanType focal, Type coverage) { 1351 super(); 1352 this.sequence = sequence; 1353 this.focal = focal; 1354 this.coverage = coverage; 1355 } 1356 1357 /** 1358 * @return {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1359 */ 1360 public PositiveIntType getSequenceElement() { 1361 if (this.sequence == null) 1362 if (Configuration.errorOnAutoCreate()) 1363 throw new Error("Attempt to auto-create CoverageComponent.sequence"); 1364 else if (Configuration.doAutoCreate()) 1365 this.sequence = new PositiveIntType(); // bb 1366 return this.sequence; 1367 } 1368 1369 public boolean hasSequenceElement() { 1370 return this.sequence != null && !this.sequence.isEmpty(); 1371 } 1372 1373 public boolean hasSequence() { 1374 return this.sequence != null && !this.sequence.isEmpty(); 1375 } 1376 1377 /** 1378 * @param value {@link #sequence} (A service line item.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 1379 */ 1380 public CoverageComponent setSequenceElement(PositiveIntType value) { 1381 this.sequence = value; 1382 return this; 1383 } 1384 1385 /** 1386 * @return A service line item. 1387 */ 1388 public int getSequence() { 1389 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 1390 } 1391 1392 /** 1393 * @param value A service line item. 1394 */ 1395 public CoverageComponent setSequence(int value) { 1396 if (this.sequence == null) 1397 this.sequence = new PositiveIntType(); 1398 this.sequence.setValue(value); 1399 return this; 1400 } 1401 1402 /** 1403 * @return {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value 1404 */ 1405 public BooleanType getFocalElement() { 1406 if (this.focal == null) 1407 if (Configuration.errorOnAutoCreate()) 1408 throw new Error("Attempt to auto-create CoverageComponent.focal"); 1409 else if (Configuration.doAutoCreate()) 1410 this.focal = new BooleanType(); // bb 1411 return this.focal; 1412 } 1413 1414 public boolean hasFocalElement() { 1415 return this.focal != null && !this.focal.isEmpty(); 1416 } 1417 1418 public boolean hasFocal() { 1419 return this.focal != null && !this.focal.isEmpty(); 1420 } 1421 1422 /** 1423 * @param value {@link #focal} (The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.). This is the underlying object with id, value and extensions. The accessor "getFocal" gives direct access to the value 1424 */ 1425 public CoverageComponent setFocalElement(BooleanType value) { 1426 this.focal = value; 1427 return this; 1428 } 1429 1430 /** 1431 * @return The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. 1432 */ 1433 public boolean getFocal() { 1434 return this.focal == null || this.focal.isEmpty() ? false : this.focal.getValue(); 1435 } 1436 1437 /** 1438 * @param value The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated. 1439 */ 1440 public CoverageComponent setFocal(boolean value) { 1441 if (this.focal == null) 1442 this.focal = new BooleanType(); 1443 this.focal.setValue(value); 1444 return this; 1445 } 1446 1447 /** 1448 * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) 1449 */ 1450 public Type getCoverage() { 1451 return this.coverage; 1452 } 1453 1454 /** 1455 * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) 1456 */ 1457 public Identifier getCoverageIdentifier() throws FHIRException { 1458 if (!(this.coverage instanceof Identifier)) 1459 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.coverage.getClass().getName()+" was encountered"); 1460 return (Identifier) this.coverage; 1461 } 1462 1463 public boolean hasCoverageIdentifier() { 1464 return this.coverage instanceof Identifier; 1465 } 1466 1467 /** 1468 * @return {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) 1469 */ 1470 public Reference getCoverageReference() throws FHIRException { 1471 if (!(this.coverage instanceof Reference)) 1472 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.coverage.getClass().getName()+" was encountered"); 1473 return (Reference) this.coverage; 1474 } 1475 1476 public boolean hasCoverageReference() { 1477 return this.coverage instanceof Reference; 1478 } 1479 1480 public boolean hasCoverage() { 1481 return this.coverage != null && !this.coverage.isEmpty(); 1482 } 1483 1484 /** 1485 * @param value {@link #coverage} (Reference to the program or plan identification, underwriter or payor.) 1486 */ 1487 public CoverageComponent setCoverage(Type value) { 1488 this.coverage = value; 1489 return this; 1490 } 1491 1492 /** 1493 * @return {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value 1494 */ 1495 public StringType getBusinessArrangementElement() { 1496 if (this.businessArrangement == null) 1497 if (Configuration.errorOnAutoCreate()) 1498 throw new Error("Attempt to auto-create CoverageComponent.businessArrangement"); 1499 else if (Configuration.doAutoCreate()) 1500 this.businessArrangement = new StringType(); // bb 1501 return this.businessArrangement; 1502 } 1503 1504 public boolean hasBusinessArrangementElement() { 1505 return this.businessArrangement != null && !this.businessArrangement.isEmpty(); 1506 } 1507 1508 public boolean hasBusinessArrangement() { 1509 return this.businessArrangement != null && !this.businessArrangement.isEmpty(); 1510 } 1511 1512 /** 1513 * @param value {@link #businessArrangement} (The contract number of a business agreement which describes the terms and conditions.). This is the underlying object with id, value and extensions. The accessor "getBusinessArrangement" gives direct access to the value 1514 */ 1515 public CoverageComponent setBusinessArrangementElement(StringType value) { 1516 this.businessArrangement = value; 1517 return this; 1518 } 1519 1520 /** 1521 * @return The contract number of a business agreement which describes the terms and conditions. 1522 */ 1523 public String getBusinessArrangement() { 1524 return this.businessArrangement == null ? null : this.businessArrangement.getValue(); 1525 } 1526 1527 /** 1528 * @param value The contract number of a business agreement which describes the terms and conditions. 1529 */ 1530 public CoverageComponent setBusinessArrangement(String value) { 1531 if (Utilities.noString(value)) 1532 this.businessArrangement = null; 1533 else { 1534 if (this.businessArrangement == null) 1535 this.businessArrangement = new StringType(); 1536 this.businessArrangement.setValue(value); 1537 } 1538 return this; 1539 } 1540 1541 /** 1542 * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 1543 */ 1544 public List<StringType> getPreAuthRef() { 1545 if (this.preAuthRef == null) 1546 this.preAuthRef = new ArrayList<StringType>(); 1547 return this.preAuthRef; 1548 } 1549 1550 public boolean hasPreAuthRef() { 1551 if (this.preAuthRef == null) 1552 return false; 1553 for (StringType item : this.preAuthRef) 1554 if (!item.isEmpty()) 1555 return true; 1556 return false; 1557 } 1558 1559 /** 1560 * @return {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 1561 */ 1562 // syntactic sugar 1563 public StringType addPreAuthRefElement() {//2 1564 StringType t = new StringType(); 1565 if (this.preAuthRef == null) 1566 this.preAuthRef = new ArrayList<StringType>(); 1567 this.preAuthRef.add(t); 1568 return t; 1569 } 1570 1571 /** 1572 * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 1573 */ 1574 public CoverageComponent addPreAuthRef(String value) { //1 1575 StringType t = new StringType(); 1576 t.setValue(value); 1577 if (this.preAuthRef == null) 1578 this.preAuthRef = new ArrayList<StringType>(); 1579 this.preAuthRef.add(t); 1580 return this; 1581 } 1582 1583 /** 1584 * @param value {@link #preAuthRef} (A list of references from the Insurer to which these services pertain.) 1585 */ 1586 public boolean hasPreAuthRef(String value) { 1587 if (this.preAuthRef == null) 1588 return false; 1589 for (StringType v : this.preAuthRef) 1590 if (v.equals(value)) // string 1591 return true; 1592 return false; 1593 } 1594 1595 /** 1596 * @return {@link #claimResponse} (The Coverages adjudication details.) 1597 */ 1598 public Reference getClaimResponse() { 1599 if (this.claimResponse == null) 1600 if (Configuration.errorOnAutoCreate()) 1601 throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); 1602 else if (Configuration.doAutoCreate()) 1603 this.claimResponse = new Reference(); // cc 1604 return this.claimResponse; 1605 } 1606 1607 public boolean hasClaimResponse() { 1608 return this.claimResponse != null && !this.claimResponse.isEmpty(); 1609 } 1610 1611 /** 1612 * @param value {@link #claimResponse} (The Coverages adjudication details.) 1613 */ 1614 public CoverageComponent setClaimResponse(Reference value) { 1615 this.claimResponse = value; 1616 return this; 1617 } 1618 1619 /** 1620 * @return {@link #claimResponse} 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 Coverages adjudication details.) 1621 */ 1622 public ClaimResponse getClaimResponseTarget() { 1623 if (this.claimResponseTarget == null) 1624 if (Configuration.errorOnAutoCreate()) 1625 throw new Error("Attempt to auto-create CoverageComponent.claimResponse"); 1626 else if (Configuration.doAutoCreate()) 1627 this.claimResponseTarget = new ClaimResponse(); // aa 1628 return this.claimResponseTarget; 1629 } 1630 1631 /** 1632 * @param value {@link #claimResponse} 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 Coverages adjudication details.) 1633 */ 1634 public CoverageComponent setClaimResponseTarget(ClaimResponse value) { 1635 this.claimResponseTarget = value; 1636 return this; 1637 } 1638 1639 /** 1640 * @return {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 1641 */ 1642 public Coding getOriginalRuleset() { 1643 if (this.originalRuleset == null) 1644 if (Configuration.errorOnAutoCreate()) 1645 throw new Error("Attempt to auto-create CoverageComponent.originalRuleset"); 1646 else if (Configuration.doAutoCreate()) 1647 this.originalRuleset = new Coding(); // cc 1648 return this.originalRuleset; 1649 } 1650 1651 public boolean hasOriginalRuleset() { 1652 return this.originalRuleset != null && !this.originalRuleset.isEmpty(); 1653 } 1654 1655 /** 1656 * @param value {@link #originalRuleset} (The style (standard) and version of the original material which was converted into this resource.) 1657 */ 1658 public CoverageComponent setOriginalRuleset(Coding value) { 1659 this.originalRuleset = value; 1660 return this; 1661 } 1662 1663 protected void listChildren(List<Property> childrenList) { 1664 super.listChildren(childrenList); 1665 childrenList.add(new Property("sequence", "positiveInt", "A service line item.", 0, java.lang.Integer.MAX_VALUE, sequence)); 1666 childrenList.add(new Property("focal", "boolean", "The instance number of the Coverage which is the focus for adjudication. The Coverage against which the claim is to be adjudicated.", 0, java.lang.Integer.MAX_VALUE, focal)); 1667 childrenList.add(new Property("coverage[x]", "Identifier|Reference(Coverage)", "Reference to the program or plan identification, underwriter or payor.", 0, java.lang.Integer.MAX_VALUE, coverage)); 1668 childrenList.add(new Property("businessArrangement", "string", "The contract number of a business agreement which describes the terms and conditions.", 0, java.lang.Integer.MAX_VALUE, businessArrangement)); 1669 childrenList.add(new Property("preAuthRef", "string", "A list of references from the Insurer to which these services pertain.", 0, java.lang.Integer.MAX_VALUE, preAuthRef)); 1670 childrenList.add(new Property("claimResponse", "Reference(ClaimResponse)", "The Coverages adjudication details.", 0, java.lang.Integer.MAX_VALUE, claimResponse)); 1671 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)); 1672 } 1673 1674 @Override 1675 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1676 switch (hash) { 1677 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 1678 case 97604197: /*focal*/ return this.focal == null ? new Base[0] : new Base[] {this.focal}; // BooleanType 1679 case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : new Base[] {this.coverage}; // Type 1680 case 259920682: /*businessArrangement*/ return this.businessArrangement == null ? new Base[0] : new Base[] {this.businessArrangement}; // StringType 1681 case 522246568: /*preAuthRef*/ return this.preAuthRef == null ? new Base[0] : this.preAuthRef.toArray(new Base[this.preAuthRef.size()]); // StringType 1682 case 689513629: /*claimResponse*/ return this.claimResponse == null ? new Base[0] : new Base[] {this.claimResponse}; // Reference 1683 case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding 1684 default: return super.getProperty(hash, name, checkValid); 1685 } 1686 1687 } 1688 1689 @Override 1690 public void setProperty(int hash, String name, Base value) throws FHIRException { 1691 switch (hash) { 1692 case 1349547969: // sequence 1693 this.sequence = castToPositiveInt(value); // PositiveIntType 1694 break; 1695 case 97604197: // focal 1696 this.focal = castToBoolean(value); // BooleanType 1697 break; 1698 case -351767064: // coverage 1699 this.coverage = (Type) value; // Type 1700 break; 1701 case 259920682: // businessArrangement 1702 this.businessArrangement = castToString(value); // StringType 1703 break; 1704 case 522246568: // preAuthRef 1705 this.getPreAuthRef().add(castToString(value)); // StringType 1706 break; 1707 case 689513629: // claimResponse 1708 this.claimResponse = castToReference(value); // Reference 1709 break; 1710 case 1089373397: // originalRuleset 1711 this.originalRuleset = castToCoding(value); // Coding 1712 break; 1713 default: super.setProperty(hash, name, value); 1714 } 1715 1716 } 1717 1718 @Override 1719 public void setProperty(String name, Base value) throws FHIRException { 1720 if (name.equals("sequence")) 1721 this.sequence = castToPositiveInt(value); // PositiveIntType 1722 else if (name.equals("focal")) 1723 this.focal = castToBoolean(value); // BooleanType 1724 else if (name.equals("coverage[x]")) 1725 this.coverage = (Type) value; // Type 1726 else if (name.equals("businessArrangement")) 1727 this.businessArrangement = castToString(value); // StringType 1728 else if (name.equals("preAuthRef")) 1729 this.getPreAuthRef().add(castToString(value)); 1730 else if (name.equals("claimResponse")) 1731 this.claimResponse = castToReference(value); // Reference 1732 else if (name.equals("originalRuleset")) 1733 this.originalRuleset = castToCoding(value); // Coding 1734 else 1735 super.setProperty(name, value); 1736 } 1737 1738 @Override 1739 public Base makeProperty(int hash, String name) throws FHIRException { 1740 switch (hash) { 1741 case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType 1742 case 97604197: throw new FHIRException("Cannot make property focal as it is not a complex type"); // BooleanType 1743 case 227689880: return getCoverage(); // Type 1744 case 259920682: throw new FHIRException("Cannot make property businessArrangement as it is not a complex type"); // StringType 1745 case 522246568: throw new FHIRException("Cannot make property preAuthRef as it is not a complex type"); // StringType 1746 case 689513629: return getClaimResponse(); // Reference 1747 case 1089373397: return getOriginalRuleset(); // Coding 1748 default: return super.makeProperty(hash, name); 1749 } 1750 1751 } 1752 1753 @Override 1754 public Base addChild(String name) throws FHIRException { 1755 if (name.equals("sequence")) { 1756 throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); 1757 } 1758 else if (name.equals("focal")) { 1759 throw new FHIRException("Cannot call addChild on a primitive type Claim.focal"); 1760 } 1761 else if (name.equals("coverageIdentifier")) { 1762 this.coverage = new Identifier(); 1763 return this.coverage; 1764 } 1765 else if (name.equals("coverageReference")) { 1766 this.coverage = new Reference(); 1767 return this.coverage; 1768 } 1769 else if (name.equals("businessArrangement")) { 1770 throw new FHIRException("Cannot call addChild on a primitive type Claim.businessArrangement"); 1771 } 1772 else if (name.equals("preAuthRef")) { 1773 throw new FHIRException("Cannot call addChild on a primitive type Claim.preAuthRef"); 1774 } 1775 else if (name.equals("claimResponse")) { 1776 this.claimResponse = new Reference(); 1777 return this.claimResponse; 1778 } 1779 else if (name.equals("originalRuleset")) { 1780 this.originalRuleset = new Coding(); 1781 return this.originalRuleset; 1782 } 1783 else 1784 return super.addChild(name); 1785 } 1786 1787 public CoverageComponent copy() { 1788 CoverageComponent dst = new CoverageComponent(); 1789 copyValues(dst); 1790 dst.sequence = sequence == null ? null : sequence.copy(); 1791 dst.focal = focal == null ? null : focal.copy(); 1792 dst.coverage = coverage == null ? null : coverage.copy(); 1793 dst.businessArrangement = businessArrangement == null ? null : businessArrangement.copy(); 1794 if (preAuthRef != null) { 1795 dst.preAuthRef = new ArrayList<StringType>(); 1796 for (StringType i : preAuthRef) 1797 dst.preAuthRef.add(i.copy()); 1798 }; 1799 dst.claimResponse = claimResponse == null ? null : claimResponse.copy(); 1800 dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); 1801 return dst; 1802 } 1803 1804 @Override 1805 public boolean equalsDeep(Base other) { 1806 if (!super.equalsDeep(other)) 1807 return false; 1808 if (!(other instanceof CoverageComponent)) 1809 return false; 1810 CoverageComponent o = (CoverageComponent) other; 1811 return compareDeep(sequence, o.sequence, true) && compareDeep(focal, o.focal, true) && compareDeep(coverage, o.coverage, true) 1812 && compareDeep(businessArrangement, o.businessArrangement, true) && compareDeep(preAuthRef, o.preAuthRef, true) 1813 && compareDeep(claimResponse, o.claimResponse, true) && compareDeep(originalRuleset, o.originalRuleset, true) 1814 ; 1815 } 1816 1817 @Override 1818 public boolean equalsShallow(Base other) { 1819 if (!super.equalsShallow(other)) 1820 return false; 1821 if (!(other instanceof CoverageComponent)) 1822 return false; 1823 CoverageComponent o = (CoverageComponent) other; 1824 return compareValues(sequence, o.sequence, true) && compareValues(focal, o.focal, true) && compareValues(businessArrangement, o.businessArrangement, true) 1825 && compareValues(preAuthRef, o.preAuthRef, true); 1826 } 1827 1828 public boolean isEmpty() { 1829 return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (focal == null || focal.isEmpty()) 1830 && (coverage == null || coverage.isEmpty()) && (businessArrangement == null || businessArrangement.isEmpty()) 1831 && (preAuthRef == null || preAuthRef.isEmpty()) && (claimResponse == null || claimResponse.isEmpty()) 1832 && (originalRuleset == null || originalRuleset.isEmpty()); 1833 } 1834 1835 public String fhirType() { 1836 return "Claim.coverage"; 1837 1838 } 1839 1840 } 1841 1842 @Block() 1843 public static class OnsetComponent extends BackboneElement implements IBaseBackboneElement { 1844 /** 1845 * The start or start and end dates for the treatable condition. 1846 */ 1847 @Child(name = "time", type = {DateType.class, Period.class}, order=1, min=0, max=1, modifier=false, summary=true) 1848 @Description(shortDefinition="Illness, injury or treatable condition date", formalDefinition="The start or start and end dates for the treatable condition." ) 1849 protected Type time; 1850 1851 /** 1852 * Onset typifications eg. Start of pregnancy, start of illnes, etc. 1853 */ 1854 @Child(name = "type", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 1855 @Description(shortDefinition="Onset of what", formalDefinition="Onset typifications eg. Start of pregnancy, start of illnes, etc." ) 1856 protected Coding type; 1857 1858 private static final long serialVersionUID = -560173231L; 1859 1860 /** 1861 * Constructor 1862 */ 1863 public OnsetComponent() { 1864 super(); 1865 } 1866 1867 /** 1868 * @return {@link #time} (The start or start and end dates for the treatable condition.) 1869 */ 1870 public Type getTime() { 1871 return this.time; 1872 } 1873 1874 /** 1875 * @return {@link #time} (The start or start and end dates for the treatable condition.) 1876 */ 1877 public DateType getTimeDateType() throws FHIRException { 1878 if (!(this.time instanceof DateType)) 1879 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.time.getClass().getName()+" was encountered"); 1880 return (DateType) this.time; 1881 } 1882 1883 public boolean hasTimeDateType() { 1884 return this.time instanceof DateType; 1885 } 1886 1887 /** 1888 * @return {@link #time} (The start or start and end dates for the treatable condition.) 1889 */ 1890 public Period getTimePeriod() throws FHIRException { 1891 if (!(this.time instanceof Period)) 1892 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.time.getClass().getName()+" was encountered"); 1893 return (Period) this.time; 1894 } 1895 1896 public boolean hasTimePeriod() { 1897 return this.time instanceof Period; 1898 } 1899 1900 public boolean hasTime() { 1901 return this.time != null && !this.time.isEmpty(); 1902 } 1903 1904 /** 1905 * @param value {@link #time} (The start or start and end dates for the treatable condition.) 1906 */ 1907 public OnsetComponent setTime(Type value) { 1908 this.time = value; 1909 return this; 1910 } 1911 1912 /** 1913 * @return {@link #type} (Onset typifications eg. Start of pregnancy, start of illnes, etc.) 1914 */ 1915 public Coding getType() { 1916 if (this.type == null) 1917 if (Configuration.errorOnAutoCreate()) 1918 throw new Error("Attempt to auto-create OnsetComponent.type"); 1919 else if (Configuration.doAutoCreate()) 1920 this.type = new Coding(); // cc 1921 return this.type; 1922 } 1923 1924 public boolean hasType() { 1925 return this.type != null && !this.type.isEmpty(); 1926 } 1927 1928 /** 1929 * @param value {@link #type} (Onset typifications eg. Start of pregnancy, start of illnes, etc.) 1930 */ 1931 public OnsetComponent setType(Coding value) { 1932 this.type = value; 1933 return this; 1934 } 1935 1936 protected void listChildren(List<Property> childrenList) { 1937 super.listChildren(childrenList); 1938 childrenList.add(new Property("time[x]", "date|Period", "The start or start and end dates for the treatable condition.", 0, java.lang.Integer.MAX_VALUE, time)); 1939 childrenList.add(new Property("type", "Coding", "Onset typifications eg. Start of pregnancy, start of illnes, etc.", 0, java.lang.Integer.MAX_VALUE, type)); 1940 } 1941 1942 @Override 1943 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1944 switch (hash) { 1945 case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // Type 1946 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 1947 default: return super.getProperty(hash, name, checkValid); 1948 } 1949 1950 } 1951 1952 @Override 1953 public void setProperty(int hash, String name, Base value) throws FHIRException { 1954 switch (hash) { 1955 case 3560141: // time 1956 this.time = (Type) value; // Type 1957 break; 1958 case 3575610: // type 1959 this.type = castToCoding(value); // Coding 1960 break; 1961 default: super.setProperty(hash, name, value); 1962 } 1963 1964 } 1965 1966 @Override 1967 public void setProperty(String name, Base value) throws FHIRException { 1968 if (name.equals("time[x]")) 1969 this.time = (Type) value; // Type 1970 else if (name.equals("type")) 1971 this.type = castToCoding(value); // Coding 1972 else 1973 super.setProperty(name, value); 1974 } 1975 1976 @Override 1977 public Base makeProperty(int hash, String name) throws FHIRException { 1978 switch (hash) { 1979 case -1313930605: return getTime(); // Type 1980 case 3575610: return getType(); // Coding 1981 default: return super.makeProperty(hash, name); 1982 } 1983 1984 } 1985 1986 @Override 1987 public Base addChild(String name) throws FHIRException { 1988 if (name.equals("timeDate")) { 1989 this.time = new DateType(); 1990 return this.time; 1991 } 1992 else if (name.equals("timePeriod")) { 1993 this.time = new Period(); 1994 return this.time; 1995 } 1996 else if (name.equals("type")) { 1997 this.type = new Coding(); 1998 return this.type; 1999 } 2000 else 2001 return super.addChild(name); 2002 } 2003 2004 public OnsetComponent copy() { 2005 OnsetComponent dst = new OnsetComponent(); 2006 copyValues(dst); 2007 dst.time = time == null ? null : time.copy(); 2008 dst.type = type == null ? null : type.copy(); 2009 return dst; 2010 } 2011 2012 @Override 2013 public boolean equalsDeep(Base other) { 2014 if (!super.equalsDeep(other)) 2015 return false; 2016 if (!(other instanceof OnsetComponent)) 2017 return false; 2018 OnsetComponent o = (OnsetComponent) other; 2019 return compareDeep(time, o.time, true) && compareDeep(type, o.type, true); 2020 } 2021 2022 @Override 2023 public boolean equalsShallow(Base other) { 2024 if (!super.equalsShallow(other)) 2025 return false; 2026 if (!(other instanceof OnsetComponent)) 2027 return false; 2028 OnsetComponent o = (OnsetComponent) other; 2029 return true; 2030 } 2031 2032 public boolean isEmpty() { 2033 return super.isEmpty() && (time == null || time.isEmpty()) && (type == null || type.isEmpty()) 2034 ; 2035 } 2036 2037 public String fhirType() { 2038 return "Claim.onset"; 2039 2040 } 2041 2042 } 2043 2044 @Block() 2045 public static class ItemsComponent extends BackboneElement implements IBaseBackboneElement { 2046 /** 2047 * A service line number. 2048 */ 2049 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2050 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 2051 protected PositiveIntType sequence; 2052 2053 /** 2054 * The type of product or service. 2055 */ 2056 @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) 2057 @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) 2058 protected Coding type; 2059 2060 /** 2061 * The practitioner who is responsible for the services rendered to the patient. 2062 */ 2063 @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=3, min=0, max=1, modifier=false, summary=true) 2064 @Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." ) 2065 protected Type provider; 2066 2067 /** 2068 * The practitioner who is supervising the work of the servicing provider(s). 2069 */ 2070 @Child(name = "supervisor", type = {Identifier.class, Practitioner.class}, order=4, min=0, max=1, modifier=false, summary=true) 2071 @Description(shortDefinition="Supervising Practitioner", formalDefinition="The practitioner who is supervising the work of the servicing provider(s)." ) 2072 protected Type supervisor; 2073 2074 /** 2075 * The qualification which is applicable for this service. 2076 */ 2077 @Child(name = "providerQualification", type = {Coding.class}, order=5, min=0, max=1, modifier=false, summary=true) 2078 @Description(shortDefinition="Type, classification or Specialization", formalDefinition="The qualification which is applicable for this service." ) 2079 protected Coding providerQualification; 2080 2081 /** 2082 * Diagnosis applicable for this service or product line. 2083 */ 2084 @Child(name = "diagnosisLinkId", type = {PositiveIntType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2085 @Description(shortDefinition="Applicable diagnoses", formalDefinition="Diagnosis applicable for this service or product line." ) 2086 protected List<PositiveIntType> diagnosisLinkId; 2087 2088 /** 2089 * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. 2090 */ 2091 @Child(name = "service", type = {Coding.class}, order=7, min=1, max=1, modifier=false, summary=true) 2092 @Description(shortDefinition="Item Code", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) 2093 protected Coding service; 2094 2095 /** 2096 * Unusual circumstances which may influence adjudication. 2097 */ 2098 @Child(name = "serviceModifier", type = {Coding.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2099 @Description(shortDefinition="Service/Product modifiers", formalDefinition="Unusual circumstances which may influence adjudication." ) 2100 protected List<Coding> serviceModifier; 2101 2102 /** 2103 * Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen. 2104 */ 2105 @Child(name = "modifier", type = {Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2106 @Description(shortDefinition="Service/Product billing modifiers", formalDefinition="Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen." ) 2107 protected List<Coding> modifier; 2108 2109 /** 2110 * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. 2111 */ 2112 @Child(name = "programCode", type = {Coding.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2113 @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) 2114 protected List<Coding> programCode; 2115 2116 /** 2117 * The date or dates when the enclosed suite of services were performed or completed. 2118 */ 2119 @Child(name = "serviced", type = {DateType.class, Period.class}, order=11, min=0, max=1, modifier=false, summary=true) 2120 @Description(shortDefinition="Date or dates of Service", formalDefinition="The date or dates when the enclosed suite of services were performed or completed." ) 2121 protected Type serviced; 2122 2123 /** 2124 * Where the service was provided. 2125 */ 2126 @Child(name = "place", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) 2127 @Description(shortDefinition="Place of service", formalDefinition="Where the service was provided." ) 2128 protected Coding place; 2129 2130 /** 2131 * The number of repetitions of a service or product. 2132 */ 2133 @Child(name = "quantity", type = {SimpleQuantity.class}, order=13, min=0, max=1, modifier=false, summary=true) 2134 @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) 2135 protected SimpleQuantity quantity; 2136 2137 /** 2138 * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. 2139 */ 2140 @Child(name = "unitPrice", type = {Money.class}, order=14, min=0, max=1, modifier=false, summary=true) 2141 @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) 2142 protected Money unitPrice; 2143 2144 /** 2145 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2146 */ 2147 @Child(name = "factor", type = {DecimalType.class}, order=15, min=0, max=1, modifier=false, summary=true) 2148 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 2149 protected DecimalType factor; 2150 2151 /** 2152 * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 2153 */ 2154 @Child(name = "points", type = {DecimalType.class}, order=16, min=0, max=1, modifier=false, summary=true) 2155 @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) 2156 protected DecimalType points; 2157 2158 /** 2159 * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. 2160 */ 2161 @Child(name = "net", type = {Money.class}, order=17, min=0, max=1, modifier=false, summary=true) 2162 @Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) 2163 protected Money net; 2164 2165 /** 2166 * List of Unique Device Identifiers associated with this line item. 2167 */ 2168 @Child(name = "udi", type = {Device.class}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2169 @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) 2170 protected List<Reference> udi; 2171 /** 2172 * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) 2173 */ 2174 protected List<Device> udiTarget; 2175 2176 2177 /** 2178 * Physical service site on the patient (limb, tooth, etc). 2179 */ 2180 @Child(name = "bodySite", type = {Coding.class}, order=19, min=0, max=1, modifier=false, summary=true) 2181 @Description(shortDefinition="Service Location", formalDefinition="Physical service site on the patient (limb, tooth, etc)." ) 2182 protected Coding bodySite; 2183 2184 /** 2185 * A region or surface of the site, eg. limb region or tooth surface(s). 2186 */ 2187 @Child(name = "subSite", type = {Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2188 @Description(shortDefinition="Service Sub-location", formalDefinition="A region or surface of the site, eg. limb region or tooth surface(s)." ) 2189 protected List<Coding> subSite; 2190 2191 /** 2192 * Second tier of goods and services. 2193 */ 2194 @Child(name = "detail", type = {}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2195 @Description(shortDefinition="Additional items", formalDefinition="Second tier of goods and services." ) 2196 protected List<DetailComponent> detail; 2197 2198 /** 2199 * The materials and placement date of prior fixed prosthesis. 2200 */ 2201 @Child(name = "prosthesis", type = {}, order=22, min=0, max=1, modifier=false, summary=true) 2202 @Description(shortDefinition="Prosthetic details", formalDefinition="The materials and placement date of prior fixed prosthesis." ) 2203 protected ProsthesisComponent prosthesis; 2204 2205 private static final long serialVersionUID = 1007480127L; 2206 2207 /** 2208 * Constructor 2209 */ 2210 public ItemsComponent() { 2211 super(); 2212 } 2213 2214 /** 2215 * Constructor 2216 */ 2217 public ItemsComponent(PositiveIntType sequence, Coding type, Coding service) { 2218 super(); 2219 this.sequence = sequence; 2220 this.type = type; 2221 this.service = service; 2222 } 2223 2224 /** 2225 * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 2226 */ 2227 public PositiveIntType getSequenceElement() { 2228 if (this.sequence == null) 2229 if (Configuration.errorOnAutoCreate()) 2230 throw new Error("Attempt to auto-create ItemsComponent.sequence"); 2231 else if (Configuration.doAutoCreate()) 2232 this.sequence = new PositiveIntType(); // bb 2233 return this.sequence; 2234 } 2235 2236 public boolean hasSequenceElement() { 2237 return this.sequence != null && !this.sequence.isEmpty(); 2238 } 2239 2240 public boolean hasSequence() { 2241 return this.sequence != null && !this.sequence.isEmpty(); 2242 } 2243 2244 /** 2245 * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 2246 */ 2247 public ItemsComponent setSequenceElement(PositiveIntType value) { 2248 this.sequence = value; 2249 return this; 2250 } 2251 2252 /** 2253 * @return A service line number. 2254 */ 2255 public int getSequence() { 2256 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 2257 } 2258 2259 /** 2260 * @param value A service line number. 2261 */ 2262 public ItemsComponent setSequence(int value) { 2263 if (this.sequence == null) 2264 this.sequence = new PositiveIntType(); 2265 this.sequence.setValue(value); 2266 return this; 2267 } 2268 2269 /** 2270 * @return {@link #type} (The type of product or service.) 2271 */ 2272 public Coding getType() { 2273 if (this.type == null) 2274 if (Configuration.errorOnAutoCreate()) 2275 throw new Error("Attempt to auto-create ItemsComponent.type"); 2276 else if (Configuration.doAutoCreate()) 2277 this.type = new Coding(); // cc 2278 return this.type; 2279 } 2280 2281 public boolean hasType() { 2282 return this.type != null && !this.type.isEmpty(); 2283 } 2284 2285 /** 2286 * @param value {@link #type} (The type of product or service.) 2287 */ 2288 public ItemsComponent setType(Coding value) { 2289 this.type = value; 2290 return this; 2291 } 2292 2293 /** 2294 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 2295 */ 2296 public Type getProvider() { 2297 return this.provider; 2298 } 2299 2300 /** 2301 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 2302 */ 2303 public Identifier getProviderIdentifier() throws FHIRException { 2304 if (!(this.provider instanceof Identifier)) 2305 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); 2306 return (Identifier) this.provider; 2307 } 2308 2309 public boolean hasProviderIdentifier() { 2310 return this.provider instanceof Identifier; 2311 } 2312 2313 /** 2314 * @return {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 2315 */ 2316 public Reference getProviderReference() throws FHIRException { 2317 if (!(this.provider instanceof Reference)) 2318 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); 2319 return (Reference) this.provider; 2320 } 2321 2322 public boolean hasProviderReference() { 2323 return this.provider instanceof Reference; 2324 } 2325 2326 public boolean hasProvider() { 2327 return this.provider != null && !this.provider.isEmpty(); 2328 } 2329 2330 /** 2331 * @param value {@link #provider} (The practitioner who is responsible for the services rendered to the patient.) 2332 */ 2333 public ItemsComponent setProvider(Type value) { 2334 this.provider = value; 2335 return this; 2336 } 2337 2338 /** 2339 * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) 2340 */ 2341 public Type getSupervisor() { 2342 return this.supervisor; 2343 } 2344 2345 /** 2346 * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) 2347 */ 2348 public Identifier getSupervisorIdentifier() throws FHIRException { 2349 if (!(this.supervisor instanceof Identifier)) 2350 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.supervisor.getClass().getName()+" was encountered"); 2351 return (Identifier) this.supervisor; 2352 } 2353 2354 public boolean hasSupervisorIdentifier() { 2355 return this.supervisor instanceof Identifier; 2356 } 2357 2358 /** 2359 * @return {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) 2360 */ 2361 public Reference getSupervisorReference() throws FHIRException { 2362 if (!(this.supervisor instanceof Reference)) 2363 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.supervisor.getClass().getName()+" was encountered"); 2364 return (Reference) this.supervisor; 2365 } 2366 2367 public boolean hasSupervisorReference() { 2368 return this.supervisor instanceof Reference; 2369 } 2370 2371 public boolean hasSupervisor() { 2372 return this.supervisor != null && !this.supervisor.isEmpty(); 2373 } 2374 2375 /** 2376 * @param value {@link #supervisor} (The practitioner who is supervising the work of the servicing provider(s).) 2377 */ 2378 public ItemsComponent setSupervisor(Type value) { 2379 this.supervisor = value; 2380 return this; 2381 } 2382 2383 /** 2384 * @return {@link #providerQualification} (The qualification which is applicable for this service.) 2385 */ 2386 public Coding getProviderQualification() { 2387 if (this.providerQualification == null) 2388 if (Configuration.errorOnAutoCreate()) 2389 throw new Error("Attempt to auto-create ItemsComponent.providerQualification"); 2390 else if (Configuration.doAutoCreate()) 2391 this.providerQualification = new Coding(); // cc 2392 return this.providerQualification; 2393 } 2394 2395 public boolean hasProviderQualification() { 2396 return this.providerQualification != null && !this.providerQualification.isEmpty(); 2397 } 2398 2399 /** 2400 * @param value {@link #providerQualification} (The qualification which is applicable for this service.) 2401 */ 2402 public ItemsComponent setProviderQualification(Coding value) { 2403 this.providerQualification = value; 2404 return this; 2405 } 2406 2407 /** 2408 * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) 2409 */ 2410 public List<PositiveIntType> getDiagnosisLinkId() { 2411 if (this.diagnosisLinkId == null) 2412 this.diagnosisLinkId = new ArrayList<PositiveIntType>(); 2413 return this.diagnosisLinkId; 2414 } 2415 2416 public boolean hasDiagnosisLinkId() { 2417 if (this.diagnosisLinkId == null) 2418 return false; 2419 for (PositiveIntType item : this.diagnosisLinkId) 2420 if (!item.isEmpty()) 2421 return true; 2422 return false; 2423 } 2424 2425 /** 2426 * @return {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) 2427 */ 2428 // syntactic sugar 2429 public PositiveIntType addDiagnosisLinkIdElement() {//2 2430 PositiveIntType t = new PositiveIntType(); 2431 if (this.diagnosisLinkId == null) 2432 this.diagnosisLinkId = new ArrayList<PositiveIntType>(); 2433 this.diagnosisLinkId.add(t); 2434 return t; 2435 } 2436 2437 /** 2438 * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) 2439 */ 2440 public ItemsComponent addDiagnosisLinkId(int value) { //1 2441 PositiveIntType t = new PositiveIntType(); 2442 t.setValue(value); 2443 if (this.diagnosisLinkId == null) 2444 this.diagnosisLinkId = new ArrayList<PositiveIntType>(); 2445 this.diagnosisLinkId.add(t); 2446 return this; 2447 } 2448 2449 /** 2450 * @param value {@link #diagnosisLinkId} (Diagnosis applicable for this service or product line.) 2451 */ 2452 public boolean hasDiagnosisLinkId(int value) { 2453 if (this.diagnosisLinkId == null) 2454 return false; 2455 for (PositiveIntType v : this.diagnosisLinkId) 2456 if (v.equals(value)) // positiveInt 2457 return true; 2458 return false; 2459 } 2460 2461 /** 2462 * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) 2463 */ 2464 public Coding getService() { 2465 if (this.service == null) 2466 if (Configuration.errorOnAutoCreate()) 2467 throw new Error("Attempt to auto-create ItemsComponent.service"); 2468 else if (Configuration.doAutoCreate()) 2469 this.service = new Coding(); // cc 2470 return this.service; 2471 } 2472 2473 public boolean hasService() { 2474 return this.service != null && !this.service.isEmpty(); 2475 } 2476 2477 /** 2478 * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) 2479 */ 2480 public ItemsComponent setService(Coding value) { 2481 this.service = value; 2482 return this; 2483 } 2484 2485 /** 2486 * @return {@link #serviceModifier} (Unusual circumstances which may influence adjudication.) 2487 */ 2488 public List<Coding> getServiceModifier() { 2489 if (this.serviceModifier == null) 2490 this.serviceModifier = new ArrayList<Coding>(); 2491 return this.serviceModifier; 2492 } 2493 2494 public boolean hasServiceModifier() { 2495 if (this.serviceModifier == null) 2496 return false; 2497 for (Coding item : this.serviceModifier) 2498 if (!item.isEmpty()) 2499 return true; 2500 return false; 2501 } 2502 2503 /** 2504 * @return {@link #serviceModifier} (Unusual circumstances which may influence adjudication.) 2505 */ 2506 // syntactic sugar 2507 public Coding addServiceModifier() { //3 2508 Coding t = new Coding(); 2509 if (this.serviceModifier == null) 2510 this.serviceModifier = new ArrayList<Coding>(); 2511 this.serviceModifier.add(t); 2512 return t; 2513 } 2514 2515 // syntactic sugar 2516 public ItemsComponent addServiceModifier(Coding t) { //3 2517 if (t == null) 2518 return this; 2519 if (this.serviceModifier == null) 2520 this.serviceModifier = new ArrayList<Coding>(); 2521 this.serviceModifier.add(t); 2522 return this; 2523 } 2524 2525 /** 2526 * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) 2527 */ 2528 public List<Coding> getModifier() { 2529 if (this.modifier == null) 2530 this.modifier = new ArrayList<Coding>(); 2531 return this.modifier; 2532 } 2533 2534 public boolean hasModifier() { 2535 if (this.modifier == null) 2536 return false; 2537 for (Coding item : this.modifier) 2538 if (!item.isEmpty()) 2539 return true; 2540 return false; 2541 } 2542 2543 /** 2544 * @return {@link #modifier} (Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.) 2545 */ 2546 // syntactic sugar 2547 public Coding addModifier() { //3 2548 Coding t = new Coding(); 2549 if (this.modifier == null) 2550 this.modifier = new ArrayList<Coding>(); 2551 this.modifier.add(t); 2552 return t; 2553 } 2554 2555 // syntactic sugar 2556 public ItemsComponent addModifier(Coding t) { //3 2557 if (t == null) 2558 return this; 2559 if (this.modifier == null) 2560 this.modifier = new ArrayList<Coding>(); 2561 this.modifier.add(t); 2562 return this; 2563 } 2564 2565 /** 2566 * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) 2567 */ 2568 public List<Coding> getProgramCode() { 2569 if (this.programCode == null) 2570 this.programCode = new ArrayList<Coding>(); 2571 return this.programCode; 2572 } 2573 2574 public boolean hasProgramCode() { 2575 if (this.programCode == null) 2576 return false; 2577 for (Coding item : this.programCode) 2578 if (!item.isEmpty()) 2579 return true; 2580 return false; 2581 } 2582 2583 /** 2584 * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) 2585 */ 2586 // syntactic sugar 2587 public Coding addProgramCode() { //3 2588 Coding t = new Coding(); 2589 if (this.programCode == null) 2590 this.programCode = new ArrayList<Coding>(); 2591 this.programCode.add(t); 2592 return t; 2593 } 2594 2595 // syntactic sugar 2596 public ItemsComponent addProgramCode(Coding t) { //3 2597 if (t == null) 2598 return this; 2599 if (this.programCode == null) 2600 this.programCode = new ArrayList<Coding>(); 2601 this.programCode.add(t); 2602 return this; 2603 } 2604 2605 /** 2606 * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) 2607 */ 2608 public Type getServiced() { 2609 return this.serviced; 2610 } 2611 2612 /** 2613 * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) 2614 */ 2615 public DateType getServicedDateType() throws FHIRException { 2616 if (!(this.serviced instanceof DateType)) 2617 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.serviced.getClass().getName()+" was encountered"); 2618 return (DateType) this.serviced; 2619 } 2620 2621 public boolean hasServicedDateType() { 2622 return this.serviced instanceof DateType; 2623 } 2624 2625 /** 2626 * @return {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) 2627 */ 2628 public Period getServicedPeriod() throws FHIRException { 2629 if (!(this.serviced instanceof Period)) 2630 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.serviced.getClass().getName()+" was encountered"); 2631 return (Period) this.serviced; 2632 } 2633 2634 public boolean hasServicedPeriod() { 2635 return this.serviced instanceof Period; 2636 } 2637 2638 public boolean hasServiced() { 2639 return this.serviced != null && !this.serviced.isEmpty(); 2640 } 2641 2642 /** 2643 * @param value {@link #serviced} (The date or dates when the enclosed suite of services were performed or completed.) 2644 */ 2645 public ItemsComponent setServiced(Type value) { 2646 this.serviced = value; 2647 return this; 2648 } 2649 2650 /** 2651 * @return {@link #place} (Where the service was provided.) 2652 */ 2653 public Coding getPlace() { 2654 if (this.place == null) 2655 if (Configuration.errorOnAutoCreate()) 2656 throw new Error("Attempt to auto-create ItemsComponent.place"); 2657 else if (Configuration.doAutoCreate()) 2658 this.place = new Coding(); // cc 2659 return this.place; 2660 } 2661 2662 public boolean hasPlace() { 2663 return this.place != null && !this.place.isEmpty(); 2664 } 2665 2666 /** 2667 * @param value {@link #place} (Where the service was provided.) 2668 */ 2669 public ItemsComponent setPlace(Coding value) { 2670 this.place = value; 2671 return this; 2672 } 2673 2674 /** 2675 * @return {@link #quantity} (The number of repetitions of a service or product.) 2676 */ 2677 public SimpleQuantity getQuantity() { 2678 if (this.quantity == null) 2679 if (Configuration.errorOnAutoCreate()) 2680 throw new Error("Attempt to auto-create ItemsComponent.quantity"); 2681 else if (Configuration.doAutoCreate()) 2682 this.quantity = new SimpleQuantity(); // cc 2683 return this.quantity; 2684 } 2685 2686 public boolean hasQuantity() { 2687 return this.quantity != null && !this.quantity.isEmpty(); 2688 } 2689 2690 /** 2691 * @param value {@link #quantity} (The number of repetitions of a service or product.) 2692 */ 2693 public ItemsComponent setQuantity(SimpleQuantity value) { 2694 this.quantity = value; 2695 return this; 2696 } 2697 2698 /** 2699 * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) 2700 */ 2701 public Money getUnitPrice() { 2702 if (this.unitPrice == null) 2703 if (Configuration.errorOnAutoCreate()) 2704 throw new Error("Attempt to auto-create ItemsComponent.unitPrice"); 2705 else if (Configuration.doAutoCreate()) 2706 this.unitPrice = new Money(); // cc 2707 return this.unitPrice; 2708 } 2709 2710 public boolean hasUnitPrice() { 2711 return this.unitPrice != null && !this.unitPrice.isEmpty(); 2712 } 2713 2714 /** 2715 * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) 2716 */ 2717 public ItemsComponent setUnitPrice(Money value) { 2718 this.unitPrice = value; 2719 return this; 2720 } 2721 2722 /** 2723 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 2724 */ 2725 public DecimalType getFactorElement() { 2726 if (this.factor == null) 2727 if (Configuration.errorOnAutoCreate()) 2728 throw new Error("Attempt to auto-create ItemsComponent.factor"); 2729 else if (Configuration.doAutoCreate()) 2730 this.factor = new DecimalType(); // bb 2731 return this.factor; 2732 } 2733 2734 public boolean hasFactorElement() { 2735 return this.factor != null && !this.factor.isEmpty(); 2736 } 2737 2738 public boolean hasFactor() { 2739 return this.factor != null && !this.factor.isEmpty(); 2740 } 2741 2742 /** 2743 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 2744 */ 2745 public ItemsComponent setFactorElement(DecimalType value) { 2746 this.factor = value; 2747 return this; 2748 } 2749 2750 /** 2751 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2752 */ 2753 public BigDecimal getFactor() { 2754 return this.factor == null ? null : this.factor.getValue(); 2755 } 2756 2757 /** 2758 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2759 */ 2760 public ItemsComponent setFactor(BigDecimal value) { 2761 if (value == null) 2762 this.factor = null; 2763 else { 2764 if (this.factor == null) 2765 this.factor = new DecimalType(); 2766 this.factor.setValue(value); 2767 } 2768 return this; 2769 } 2770 2771 /** 2772 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2773 */ 2774 public ItemsComponent setFactor(long value) { 2775 this.factor = new DecimalType(); 2776 this.factor.setValue(value); 2777 return this; 2778 } 2779 2780 /** 2781 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 2782 */ 2783 public ItemsComponent setFactor(double value) { 2784 this.factor = new DecimalType(); 2785 this.factor.setValue(value); 2786 return this; 2787 } 2788 2789 /** 2790 * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 2791 */ 2792 public DecimalType getPointsElement() { 2793 if (this.points == null) 2794 if (Configuration.errorOnAutoCreate()) 2795 throw new Error("Attempt to auto-create ItemsComponent.points"); 2796 else if (Configuration.doAutoCreate()) 2797 this.points = new DecimalType(); // bb 2798 return this.points; 2799 } 2800 2801 public boolean hasPointsElement() { 2802 return this.points != null && !this.points.isEmpty(); 2803 } 2804 2805 public boolean hasPoints() { 2806 return this.points != null && !this.points.isEmpty(); 2807 } 2808 2809 /** 2810 * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 2811 */ 2812 public ItemsComponent setPointsElement(DecimalType value) { 2813 this.points = value; 2814 return this; 2815 } 2816 2817 /** 2818 * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 2819 */ 2820 public BigDecimal getPoints() { 2821 return this.points == null ? null : this.points.getValue(); 2822 } 2823 2824 /** 2825 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 2826 */ 2827 public ItemsComponent setPoints(BigDecimal value) { 2828 if (value == null) 2829 this.points = null; 2830 else { 2831 if (this.points == null) 2832 this.points = new DecimalType(); 2833 this.points.setValue(value); 2834 } 2835 return this; 2836 } 2837 2838 /** 2839 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 2840 */ 2841 public ItemsComponent setPoints(long value) { 2842 this.points = new DecimalType(); 2843 this.points.setValue(value); 2844 return this; 2845 } 2846 2847 /** 2848 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 2849 */ 2850 public ItemsComponent setPoints(double value) { 2851 this.points = new DecimalType(); 2852 this.points.setValue(value); 2853 return this; 2854 } 2855 2856 /** 2857 * @return {@link #net} (The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 2858 */ 2859 public Money getNet() { 2860 if (this.net == null) 2861 if (Configuration.errorOnAutoCreate()) 2862 throw new Error("Attempt to auto-create ItemsComponent.net"); 2863 else if (Configuration.doAutoCreate()) 2864 this.net = new Money(); // cc 2865 return this.net; 2866 } 2867 2868 public boolean hasNet() { 2869 return this.net != null && !this.net.isEmpty(); 2870 } 2871 2872 /** 2873 * @param value {@link #net} (The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 2874 */ 2875 public ItemsComponent setNet(Money value) { 2876 this.net = value; 2877 return this; 2878 } 2879 2880 /** 2881 * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) 2882 */ 2883 public List<Reference> getUdi() { 2884 if (this.udi == null) 2885 this.udi = new ArrayList<Reference>(); 2886 return this.udi; 2887 } 2888 2889 public boolean hasUdi() { 2890 if (this.udi == null) 2891 return false; 2892 for (Reference item : this.udi) 2893 if (!item.isEmpty()) 2894 return true; 2895 return false; 2896 } 2897 2898 /** 2899 * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) 2900 */ 2901 // syntactic sugar 2902 public Reference addUdi() { //3 2903 Reference t = new Reference(); 2904 if (this.udi == null) 2905 this.udi = new ArrayList<Reference>(); 2906 this.udi.add(t); 2907 return t; 2908 } 2909 2910 // syntactic sugar 2911 public ItemsComponent addUdi(Reference t) { //3 2912 if (t == null) 2913 return this; 2914 if (this.udi == null) 2915 this.udi = new ArrayList<Reference>(); 2916 this.udi.add(t); 2917 return this; 2918 } 2919 2920 /** 2921 * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) 2922 */ 2923 public List<Device> getUdiTarget() { 2924 if (this.udiTarget == null) 2925 this.udiTarget = new ArrayList<Device>(); 2926 return this.udiTarget; 2927 } 2928 2929 // syntactic sugar 2930 /** 2931 * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) 2932 */ 2933 public Device addUdiTarget() { 2934 Device r = new Device(); 2935 if (this.udiTarget == null) 2936 this.udiTarget = new ArrayList<Device>(); 2937 this.udiTarget.add(r); 2938 return r; 2939 } 2940 2941 /** 2942 * @return {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) 2943 */ 2944 public Coding getBodySite() { 2945 if (this.bodySite == null) 2946 if (Configuration.errorOnAutoCreate()) 2947 throw new Error("Attempt to auto-create ItemsComponent.bodySite"); 2948 else if (Configuration.doAutoCreate()) 2949 this.bodySite = new Coding(); // cc 2950 return this.bodySite; 2951 } 2952 2953 public boolean hasBodySite() { 2954 return this.bodySite != null && !this.bodySite.isEmpty(); 2955 } 2956 2957 /** 2958 * @param value {@link #bodySite} (Physical service site on the patient (limb, tooth, etc).) 2959 */ 2960 public ItemsComponent setBodySite(Coding value) { 2961 this.bodySite = value; 2962 return this; 2963 } 2964 2965 /** 2966 * @return {@link #subSite} (A region or surface of the site, eg. limb region or tooth surface(s).) 2967 */ 2968 public List<Coding> getSubSite() { 2969 if (this.subSite == null) 2970 this.subSite = new ArrayList<Coding>(); 2971 return this.subSite; 2972 } 2973 2974 public boolean hasSubSite() { 2975 if (this.subSite == null) 2976 return false; 2977 for (Coding item : this.subSite) 2978 if (!item.isEmpty()) 2979 return true; 2980 return false; 2981 } 2982 2983 /** 2984 * @return {@link #subSite} (A region or surface of the site, eg. limb region or tooth surface(s).) 2985 */ 2986 // syntactic sugar 2987 public Coding addSubSite() { //3 2988 Coding t = new Coding(); 2989 if (this.subSite == null) 2990 this.subSite = new ArrayList<Coding>(); 2991 this.subSite.add(t); 2992 return t; 2993 } 2994 2995 // syntactic sugar 2996 public ItemsComponent addSubSite(Coding t) { //3 2997 if (t == null) 2998 return this; 2999 if (this.subSite == null) 3000 this.subSite = new ArrayList<Coding>(); 3001 this.subSite.add(t); 3002 return this; 3003 } 3004 3005 /** 3006 * @return {@link #detail} (Second tier of goods and services.) 3007 */ 3008 public List<DetailComponent> getDetail() { 3009 if (this.detail == null) 3010 this.detail = new ArrayList<DetailComponent>(); 3011 return this.detail; 3012 } 3013 3014 public boolean hasDetail() { 3015 if (this.detail == null) 3016 return false; 3017 for (DetailComponent item : this.detail) 3018 if (!item.isEmpty()) 3019 return true; 3020 return false; 3021 } 3022 3023 /** 3024 * @return {@link #detail} (Second tier of goods and services.) 3025 */ 3026 // syntactic sugar 3027 public DetailComponent addDetail() { //3 3028 DetailComponent t = new DetailComponent(); 3029 if (this.detail == null) 3030 this.detail = new ArrayList<DetailComponent>(); 3031 this.detail.add(t); 3032 return t; 3033 } 3034 3035 // syntactic sugar 3036 public ItemsComponent addDetail(DetailComponent t) { //3 3037 if (t == null) 3038 return this; 3039 if (this.detail == null) 3040 this.detail = new ArrayList<DetailComponent>(); 3041 this.detail.add(t); 3042 return this; 3043 } 3044 3045 /** 3046 * @return {@link #prosthesis} (The materials and placement date of prior fixed prosthesis.) 3047 */ 3048 public ProsthesisComponent getProsthesis() { 3049 if (this.prosthesis == null) 3050 if (Configuration.errorOnAutoCreate()) 3051 throw new Error("Attempt to auto-create ItemsComponent.prosthesis"); 3052 else if (Configuration.doAutoCreate()) 3053 this.prosthesis = new ProsthesisComponent(); // cc 3054 return this.prosthesis; 3055 } 3056 3057 public boolean hasProsthesis() { 3058 return this.prosthesis != null && !this.prosthesis.isEmpty(); 3059 } 3060 3061 /** 3062 * @param value {@link #prosthesis} (The materials and placement date of prior fixed prosthesis.) 3063 */ 3064 public ItemsComponent setProsthesis(ProsthesisComponent value) { 3065 this.prosthesis = value; 3066 return this; 3067 } 3068 3069 protected void listChildren(List<Property> childrenList) { 3070 super.listChildren(childrenList); 3071 childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); 3072 childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); 3073 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)); 3074 childrenList.add(new Property("supervisor[x]", "Identifier|Reference(Practitioner)", "The practitioner who is supervising the work of the servicing provider(s).", 0, java.lang.Integer.MAX_VALUE, supervisor)); 3075 childrenList.add(new Property("providerQualification", "Coding", "The qualification which is applicable for this service.", 0, java.lang.Integer.MAX_VALUE, providerQualification)); 3076 childrenList.add(new Property("diagnosisLinkId", "positiveInt", "Diagnosis applicable for this service or product line.", 0, java.lang.Integer.MAX_VALUE, diagnosisLinkId)); 3077 childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); 3078 childrenList.add(new Property("serviceModifier", "Coding", "Unusual circumstances which may influence adjudication.", 0, java.lang.Integer.MAX_VALUE, serviceModifier)); 3079 childrenList.add(new Property("modifier", "Coding", "Item typification or modifiers codes, eg for Oral whether the treatment is cosmetic or associated with TMJ, or an appliance was lost or stolen.", 0, java.lang.Integer.MAX_VALUE, modifier)); 3080 childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); 3081 childrenList.add(new Property("serviced[x]", "date|Period", "The date or dates when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, serviced)); 3082 childrenList.add(new Property("place", "Coding", "Where the service was provided.", 0, java.lang.Integer.MAX_VALUE, place)); 3083 childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); 3084 childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); 3085 childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); 3086 childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); 3087 childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); 3088 childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 3089 childrenList.add(new Property("bodySite", "Coding", "Physical service site on the patient (limb, tooth, etc).", 0, java.lang.Integer.MAX_VALUE, bodySite)); 3090 childrenList.add(new Property("subSite", "Coding", "A region or surface of the site, eg. limb region or tooth surface(s).", 0, java.lang.Integer.MAX_VALUE, subSite)); 3091 childrenList.add(new Property("detail", "", "Second tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, detail)); 3092 childrenList.add(new Property("prosthesis", "", "The materials and placement date of prior fixed prosthesis.", 0, java.lang.Integer.MAX_VALUE, prosthesis)); 3093 } 3094 3095 @Override 3096 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3097 switch (hash) { 3098 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 3099 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 3100 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Type 3101 case -1697229976: /*supervisor*/ return this.supervisor == null ? new Base[0] : new Base[] {this.supervisor}; // Type 3102 case -1240156290: /*providerQualification*/ return this.providerQualification == null ? new Base[0] : new Base[] {this.providerQualification}; // Coding 3103 case -1659207418: /*diagnosisLinkId*/ return this.diagnosisLinkId == null ? new Base[0] : this.diagnosisLinkId.toArray(new Base[this.diagnosisLinkId.size()]); // PositiveIntType 3104 case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // Coding 3105 case 615164076: /*serviceModifier*/ return this.serviceModifier == null ? new Base[0] : this.serviceModifier.toArray(new Base[this.serviceModifier.size()]); // Coding 3106 case -615513385: /*modifier*/ return this.modifier == null ? new Base[0] : this.modifier.toArray(new Base[this.modifier.size()]); // Coding 3107 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // Coding 3108 case 1379209295: /*serviced*/ return this.serviced == null ? new Base[0] : new Base[] {this.serviced}; // Type 3109 case 106748167: /*place*/ return this.place == null ? new Base[0] : new Base[] {this.place}; // Coding 3110 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 3111 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 3112 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 3113 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 3114 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 3115 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 3116 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // Coding 3117 case -1868566105: /*subSite*/ return this.subSite == null ? new Base[0] : this.subSite.toArray(new Base[this.subSite.size()]); // Coding 3118 case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : this.detail.toArray(new Base[this.detail.size()]); // DetailComponent 3119 case -2138744398: /*prosthesis*/ return this.prosthesis == null ? new Base[0] : new Base[] {this.prosthesis}; // ProsthesisComponent 3120 default: return super.getProperty(hash, name, checkValid); 3121 } 3122 3123 } 3124 3125 @Override 3126 public void setProperty(int hash, String name, Base value) throws FHIRException { 3127 switch (hash) { 3128 case 1349547969: // sequence 3129 this.sequence = castToPositiveInt(value); // PositiveIntType 3130 break; 3131 case 3575610: // type 3132 this.type = castToCoding(value); // Coding 3133 break; 3134 case -987494927: // provider 3135 this.provider = (Type) value; // Type 3136 break; 3137 case -1697229976: // supervisor 3138 this.supervisor = (Type) value; // Type 3139 break; 3140 case -1240156290: // providerQualification 3141 this.providerQualification = castToCoding(value); // Coding 3142 break; 3143 case -1659207418: // diagnosisLinkId 3144 this.getDiagnosisLinkId().add(castToPositiveInt(value)); // PositiveIntType 3145 break; 3146 case 1984153269: // service 3147 this.service = castToCoding(value); // Coding 3148 break; 3149 case 615164076: // serviceModifier 3150 this.getServiceModifier().add(castToCoding(value)); // Coding 3151 break; 3152 case -615513385: // modifier 3153 this.getModifier().add(castToCoding(value)); // Coding 3154 break; 3155 case 1010065041: // programCode 3156 this.getProgramCode().add(castToCoding(value)); // Coding 3157 break; 3158 case 1379209295: // serviced 3159 this.serviced = (Type) value; // Type 3160 break; 3161 case 106748167: // place 3162 this.place = castToCoding(value); // Coding 3163 break; 3164 case -1285004149: // quantity 3165 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 3166 break; 3167 case -486196699: // unitPrice 3168 this.unitPrice = castToMoney(value); // Money 3169 break; 3170 case -1282148017: // factor 3171 this.factor = castToDecimal(value); // DecimalType 3172 break; 3173 case -982754077: // points 3174 this.points = castToDecimal(value); // DecimalType 3175 break; 3176 case 108957: // net 3177 this.net = castToMoney(value); // Money 3178 break; 3179 case 115642: // udi 3180 this.getUdi().add(castToReference(value)); // Reference 3181 break; 3182 case 1702620169: // bodySite 3183 this.bodySite = castToCoding(value); // Coding 3184 break; 3185 case -1868566105: // subSite 3186 this.getSubSite().add(castToCoding(value)); // Coding 3187 break; 3188 case -1335224239: // detail 3189 this.getDetail().add((DetailComponent) value); // DetailComponent 3190 break; 3191 case -2138744398: // prosthesis 3192 this.prosthesis = (ProsthesisComponent) value; // ProsthesisComponent 3193 break; 3194 default: super.setProperty(hash, name, value); 3195 } 3196 3197 } 3198 3199 @Override 3200 public void setProperty(String name, Base value) throws FHIRException { 3201 if (name.equals("sequence")) 3202 this.sequence = castToPositiveInt(value); // PositiveIntType 3203 else if (name.equals("type")) 3204 this.type = castToCoding(value); // Coding 3205 else if (name.equals("provider[x]")) 3206 this.provider = (Type) value; // Type 3207 else if (name.equals("supervisor[x]")) 3208 this.supervisor = (Type) value; // Type 3209 else if (name.equals("providerQualification")) 3210 this.providerQualification = castToCoding(value); // Coding 3211 else if (name.equals("diagnosisLinkId")) 3212 this.getDiagnosisLinkId().add(castToPositiveInt(value)); 3213 else if (name.equals("service")) 3214 this.service = castToCoding(value); // Coding 3215 else if (name.equals("serviceModifier")) 3216 this.getServiceModifier().add(castToCoding(value)); 3217 else if (name.equals("modifier")) 3218 this.getModifier().add(castToCoding(value)); 3219 else if (name.equals("programCode")) 3220 this.getProgramCode().add(castToCoding(value)); 3221 else if (name.equals("serviced[x]")) 3222 this.serviced = (Type) value; // Type 3223 else if (name.equals("place")) 3224 this.place = castToCoding(value); // Coding 3225 else if (name.equals("quantity")) 3226 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 3227 else if (name.equals("unitPrice")) 3228 this.unitPrice = castToMoney(value); // Money 3229 else if (name.equals("factor")) 3230 this.factor = castToDecimal(value); // DecimalType 3231 else if (name.equals("points")) 3232 this.points = castToDecimal(value); // DecimalType 3233 else if (name.equals("net")) 3234 this.net = castToMoney(value); // Money 3235 else if (name.equals("udi")) 3236 this.getUdi().add(castToReference(value)); 3237 else if (name.equals("bodySite")) 3238 this.bodySite = castToCoding(value); // Coding 3239 else if (name.equals("subSite")) 3240 this.getSubSite().add(castToCoding(value)); 3241 else if (name.equals("detail")) 3242 this.getDetail().add((DetailComponent) value); 3243 else if (name.equals("prosthesis")) 3244 this.prosthesis = (ProsthesisComponent) value; // ProsthesisComponent 3245 else 3246 super.setProperty(name, value); 3247 } 3248 3249 @Override 3250 public Base makeProperty(int hash, String name) throws FHIRException { 3251 switch (hash) { 3252 case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType 3253 case 3575610: return getType(); // Coding 3254 case 2064698607: return getProvider(); // Type 3255 case -1823115240: return getSupervisor(); // Type 3256 case -1240156290: return getProviderQualification(); // Coding 3257 case -1659207418: throw new FHIRException("Cannot make property diagnosisLinkId as it is not a complex type"); // PositiveIntType 3258 case 1984153269: return getService(); // Coding 3259 case 615164076: return addServiceModifier(); // Coding 3260 case -615513385: return addModifier(); // Coding 3261 case 1010065041: return addProgramCode(); // Coding 3262 case -1927922223: return getServiced(); // Type 3263 case 106748167: return getPlace(); // Coding 3264 case -1285004149: return getQuantity(); // SimpleQuantity 3265 case -486196699: return getUnitPrice(); // Money 3266 case -1282148017: throw new FHIRException("Cannot make property factor as it is not a complex type"); // DecimalType 3267 case -982754077: throw new FHIRException("Cannot make property points as it is not a complex type"); // DecimalType 3268 case 108957: return getNet(); // Money 3269 case 115642: return addUdi(); // Reference 3270 case 1702620169: return getBodySite(); // Coding 3271 case -1868566105: return addSubSite(); // Coding 3272 case -1335224239: return addDetail(); // DetailComponent 3273 case -2138744398: return getProsthesis(); // ProsthesisComponent 3274 default: return super.makeProperty(hash, name); 3275 } 3276 3277 } 3278 3279 @Override 3280 public Base addChild(String name) throws FHIRException { 3281 if (name.equals("sequence")) { 3282 throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); 3283 } 3284 else if (name.equals("type")) { 3285 this.type = new Coding(); 3286 return this.type; 3287 } 3288 else if (name.equals("providerIdentifier")) { 3289 this.provider = new Identifier(); 3290 return this.provider; 3291 } 3292 else if (name.equals("providerReference")) { 3293 this.provider = new Reference(); 3294 return this.provider; 3295 } 3296 else if (name.equals("supervisorIdentifier")) { 3297 this.supervisor = new Identifier(); 3298 return this.supervisor; 3299 } 3300 else if (name.equals("supervisorReference")) { 3301 this.supervisor = new Reference(); 3302 return this.supervisor; 3303 } 3304 else if (name.equals("providerQualification")) { 3305 this.providerQualification = new Coding(); 3306 return this.providerQualification; 3307 } 3308 else if (name.equals("diagnosisLinkId")) { 3309 throw new FHIRException("Cannot call addChild on a primitive type Claim.diagnosisLinkId"); 3310 } 3311 else if (name.equals("service")) { 3312 this.service = new Coding(); 3313 return this.service; 3314 } 3315 else if (name.equals("serviceModifier")) { 3316 return addServiceModifier(); 3317 } 3318 else if (name.equals("modifier")) { 3319 return addModifier(); 3320 } 3321 else if (name.equals("programCode")) { 3322 return addProgramCode(); 3323 } 3324 else if (name.equals("servicedDate")) { 3325 this.serviced = new DateType(); 3326 return this.serviced; 3327 } 3328 else if (name.equals("servicedPeriod")) { 3329 this.serviced = new Period(); 3330 return this.serviced; 3331 } 3332 else if (name.equals("place")) { 3333 this.place = new Coding(); 3334 return this.place; 3335 } 3336 else if (name.equals("quantity")) { 3337 this.quantity = new SimpleQuantity(); 3338 return this.quantity; 3339 } 3340 else if (name.equals("unitPrice")) { 3341 this.unitPrice = new Money(); 3342 return this.unitPrice; 3343 } 3344 else if (name.equals("factor")) { 3345 throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); 3346 } 3347 else if (name.equals("points")) { 3348 throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); 3349 } 3350 else if (name.equals("net")) { 3351 this.net = new Money(); 3352 return this.net; 3353 } 3354 else if (name.equals("udi")) { 3355 return addUdi(); 3356 } 3357 else if (name.equals("bodySite")) { 3358 this.bodySite = new Coding(); 3359 return this.bodySite; 3360 } 3361 else if (name.equals("subSite")) { 3362 return addSubSite(); 3363 } 3364 else if (name.equals("detail")) { 3365 return addDetail(); 3366 } 3367 else if (name.equals("prosthesis")) { 3368 this.prosthesis = new ProsthesisComponent(); 3369 return this.prosthesis; 3370 } 3371 else 3372 return super.addChild(name); 3373 } 3374 3375 public ItemsComponent copy() { 3376 ItemsComponent dst = new ItemsComponent(); 3377 copyValues(dst); 3378 dst.sequence = sequence == null ? null : sequence.copy(); 3379 dst.type = type == null ? null : type.copy(); 3380 dst.provider = provider == null ? null : provider.copy(); 3381 dst.supervisor = supervisor == null ? null : supervisor.copy(); 3382 dst.providerQualification = providerQualification == null ? null : providerQualification.copy(); 3383 if (diagnosisLinkId != null) { 3384 dst.diagnosisLinkId = new ArrayList<PositiveIntType>(); 3385 for (PositiveIntType i : diagnosisLinkId) 3386 dst.diagnosisLinkId.add(i.copy()); 3387 }; 3388 dst.service = service == null ? null : service.copy(); 3389 if (serviceModifier != null) { 3390 dst.serviceModifier = new ArrayList<Coding>(); 3391 for (Coding i : serviceModifier) 3392 dst.serviceModifier.add(i.copy()); 3393 }; 3394 if (modifier != null) { 3395 dst.modifier = new ArrayList<Coding>(); 3396 for (Coding i : modifier) 3397 dst.modifier.add(i.copy()); 3398 }; 3399 if (programCode != null) { 3400 dst.programCode = new ArrayList<Coding>(); 3401 for (Coding i : programCode) 3402 dst.programCode.add(i.copy()); 3403 }; 3404 dst.serviced = serviced == null ? null : serviced.copy(); 3405 dst.place = place == null ? null : place.copy(); 3406 dst.quantity = quantity == null ? null : quantity.copy(); 3407 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 3408 dst.factor = factor == null ? null : factor.copy(); 3409 dst.points = points == null ? null : points.copy(); 3410 dst.net = net == null ? null : net.copy(); 3411 if (udi != null) { 3412 dst.udi = new ArrayList<Reference>(); 3413 for (Reference i : udi) 3414 dst.udi.add(i.copy()); 3415 }; 3416 dst.bodySite = bodySite == null ? null : bodySite.copy(); 3417 if (subSite != null) { 3418 dst.subSite = new ArrayList<Coding>(); 3419 for (Coding i : subSite) 3420 dst.subSite.add(i.copy()); 3421 }; 3422 if (detail != null) { 3423 dst.detail = new ArrayList<DetailComponent>(); 3424 for (DetailComponent i : detail) 3425 dst.detail.add(i.copy()); 3426 }; 3427 dst.prosthesis = prosthesis == null ? null : prosthesis.copy(); 3428 return dst; 3429 } 3430 3431 @Override 3432 public boolean equalsDeep(Base other) { 3433 if (!super.equalsDeep(other)) 3434 return false; 3435 if (!(other instanceof ItemsComponent)) 3436 return false; 3437 ItemsComponent o = (ItemsComponent) other; 3438 return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(provider, o.provider, true) 3439 && compareDeep(supervisor, o.supervisor, true) && compareDeep(providerQualification, o.providerQualification, true) 3440 && compareDeep(diagnosisLinkId, o.diagnosisLinkId, true) && compareDeep(service, o.service, true) 3441 && compareDeep(serviceModifier, o.serviceModifier, true) && compareDeep(modifier, o.modifier, true) 3442 && compareDeep(programCode, o.programCode, true) && compareDeep(serviced, o.serviced, true) && compareDeep(place, o.place, true) 3443 && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) && compareDeep(factor, o.factor, true) 3444 && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) && compareDeep(udi, o.udi, true) 3445 && compareDeep(bodySite, o.bodySite, true) && compareDeep(subSite, o.subSite, true) && compareDeep(detail, o.detail, true) 3446 && compareDeep(prosthesis, o.prosthesis, true); 3447 } 3448 3449 @Override 3450 public boolean equalsShallow(Base other) { 3451 if (!super.equalsShallow(other)) 3452 return false; 3453 if (!(other instanceof ItemsComponent)) 3454 return false; 3455 ItemsComponent o = (ItemsComponent) other; 3456 return compareValues(sequence, o.sequence, true) && compareValues(diagnosisLinkId, o.diagnosisLinkId, true) 3457 && compareValues(factor, o.factor, true) && compareValues(points, o.points, true); 3458 } 3459 3460 public boolean isEmpty() { 3461 return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) 3462 && (provider == null || provider.isEmpty()) && (supervisor == null || supervisor.isEmpty()) 3463 && (providerQualification == null || providerQualification.isEmpty()) && (diagnosisLinkId == null || diagnosisLinkId.isEmpty()) 3464 && (service == null || service.isEmpty()) && (serviceModifier == null || serviceModifier.isEmpty()) 3465 && (modifier == null || modifier.isEmpty()) && (programCode == null || programCode.isEmpty()) 3466 && (serviced == null || serviced.isEmpty()) && (place == null || place.isEmpty()) && (quantity == null || quantity.isEmpty()) 3467 && (unitPrice == null || unitPrice.isEmpty()) && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) 3468 && (net == null || net.isEmpty()) && (udi == null || udi.isEmpty()) && (bodySite == null || bodySite.isEmpty()) 3469 && (subSite == null || subSite.isEmpty()) && (detail == null || detail.isEmpty()) && (prosthesis == null || prosthesis.isEmpty()) 3470 ; 3471 } 3472 3473 public String fhirType() { 3474 return "Claim.item"; 3475 3476 } 3477 3478 } 3479 3480 @Block() 3481 public static class DetailComponent extends BackboneElement implements IBaseBackboneElement { 3482 /** 3483 * A service line number. 3484 */ 3485 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) 3486 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 3487 protected PositiveIntType sequence; 3488 3489 /** 3490 * The type of product or service. 3491 */ 3492 @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) 3493 @Description(shortDefinition="Group or type of product or service", formalDefinition="The type of product or service." ) 3494 protected Coding type; 3495 3496 /** 3497 * If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied. 3498 */ 3499 @Child(name = "service", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=true) 3500 @Description(shortDefinition="Additional item codes", formalDefinition="If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied." ) 3501 protected Coding service; 3502 3503 /** 3504 * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. 3505 */ 3506 @Child(name = "programCode", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3507 @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) 3508 protected List<Coding> programCode; 3509 3510 /** 3511 * The number of repetitions of a service or product. 3512 */ 3513 @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) 3514 @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) 3515 protected SimpleQuantity quantity; 3516 3517 /** 3518 * If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group. 3519 */ 3520 @Child(name = "unitPrice", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) 3521 @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group." ) 3522 protected Money unitPrice; 3523 3524 /** 3525 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 3526 */ 3527 @Child(name = "factor", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) 3528 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 3529 protected DecimalType factor; 3530 3531 /** 3532 * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 3533 */ 3534 @Child(name = "points", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) 3535 @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) 3536 protected DecimalType points; 3537 3538 /** 3539 * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. 3540 */ 3541 @Child(name = "net", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) 3542 @Description(shortDefinition="Total additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) 3543 protected Money net; 3544 3545 /** 3546 * List of Unique Device Identifiers associated with this line item. 3547 */ 3548 @Child(name = "udi", type = {Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3549 @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) 3550 protected List<Reference> udi; 3551 /** 3552 * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) 3553 */ 3554 protected List<Device> udiTarget; 3555 3556 3557 /** 3558 * Third tier of goods and services. 3559 */ 3560 @Child(name = "subDetail", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3561 @Description(shortDefinition="Additional items", formalDefinition="Third tier of goods and services." ) 3562 protected List<SubDetailComponent> subDetail; 3563 3564 private static final long serialVersionUID = -1099698352L; 3565 3566 /** 3567 * Constructor 3568 */ 3569 public DetailComponent() { 3570 super(); 3571 } 3572 3573 /** 3574 * Constructor 3575 */ 3576 public DetailComponent(PositiveIntType sequence, Coding type, Coding service) { 3577 super(); 3578 this.sequence = sequence; 3579 this.type = type; 3580 this.service = service; 3581 } 3582 3583 /** 3584 * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 3585 */ 3586 public PositiveIntType getSequenceElement() { 3587 if (this.sequence == null) 3588 if (Configuration.errorOnAutoCreate()) 3589 throw new Error("Attempt to auto-create DetailComponent.sequence"); 3590 else if (Configuration.doAutoCreate()) 3591 this.sequence = new PositiveIntType(); // bb 3592 return this.sequence; 3593 } 3594 3595 public boolean hasSequenceElement() { 3596 return this.sequence != null && !this.sequence.isEmpty(); 3597 } 3598 3599 public boolean hasSequence() { 3600 return this.sequence != null && !this.sequence.isEmpty(); 3601 } 3602 3603 /** 3604 * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 3605 */ 3606 public DetailComponent setSequenceElement(PositiveIntType value) { 3607 this.sequence = value; 3608 return this; 3609 } 3610 3611 /** 3612 * @return A service line number. 3613 */ 3614 public int getSequence() { 3615 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 3616 } 3617 3618 /** 3619 * @param value A service line number. 3620 */ 3621 public DetailComponent setSequence(int value) { 3622 if (this.sequence == null) 3623 this.sequence = new PositiveIntType(); 3624 this.sequence.setValue(value); 3625 return this; 3626 } 3627 3628 /** 3629 * @return {@link #type} (The type of product or service.) 3630 */ 3631 public Coding getType() { 3632 if (this.type == null) 3633 if (Configuration.errorOnAutoCreate()) 3634 throw new Error("Attempt to auto-create DetailComponent.type"); 3635 else if (Configuration.doAutoCreate()) 3636 this.type = new Coding(); // cc 3637 return this.type; 3638 } 3639 3640 public boolean hasType() { 3641 return this.type != null && !this.type.isEmpty(); 3642 } 3643 3644 /** 3645 * @param value {@link #type} (The type of product or service.) 3646 */ 3647 public DetailComponent setType(Coding value) { 3648 this.type = value; 3649 return this; 3650 } 3651 3652 /** 3653 * @return {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) 3654 */ 3655 public Coding getService() { 3656 if (this.service == null) 3657 if (Configuration.errorOnAutoCreate()) 3658 throw new Error("Attempt to auto-create DetailComponent.service"); 3659 else if (Configuration.doAutoCreate()) 3660 this.service = new Coding(); // cc 3661 return this.service; 3662 } 3663 3664 public boolean hasService() { 3665 return this.service != null && !this.service.isEmpty(); 3666 } 3667 3668 /** 3669 * @param value {@link #service} (If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.) 3670 */ 3671 public DetailComponent setService(Coding value) { 3672 this.service = value; 3673 return this; 3674 } 3675 3676 /** 3677 * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) 3678 */ 3679 public List<Coding> getProgramCode() { 3680 if (this.programCode == null) 3681 this.programCode = new ArrayList<Coding>(); 3682 return this.programCode; 3683 } 3684 3685 public boolean hasProgramCode() { 3686 if (this.programCode == null) 3687 return false; 3688 for (Coding item : this.programCode) 3689 if (!item.isEmpty()) 3690 return true; 3691 return false; 3692 } 3693 3694 /** 3695 * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) 3696 */ 3697 // syntactic sugar 3698 public Coding addProgramCode() { //3 3699 Coding t = new Coding(); 3700 if (this.programCode == null) 3701 this.programCode = new ArrayList<Coding>(); 3702 this.programCode.add(t); 3703 return t; 3704 } 3705 3706 // syntactic sugar 3707 public DetailComponent addProgramCode(Coding t) { //3 3708 if (t == null) 3709 return this; 3710 if (this.programCode == null) 3711 this.programCode = new ArrayList<Coding>(); 3712 this.programCode.add(t); 3713 return this; 3714 } 3715 3716 /** 3717 * @return {@link #quantity} (The number of repetitions of a service or product.) 3718 */ 3719 public SimpleQuantity getQuantity() { 3720 if (this.quantity == null) 3721 if (Configuration.errorOnAutoCreate()) 3722 throw new Error("Attempt to auto-create DetailComponent.quantity"); 3723 else if (Configuration.doAutoCreate()) 3724 this.quantity = new SimpleQuantity(); // cc 3725 return this.quantity; 3726 } 3727 3728 public boolean hasQuantity() { 3729 return this.quantity != null && !this.quantity.isEmpty(); 3730 } 3731 3732 /** 3733 * @param value {@link #quantity} (The number of repetitions of a service or product.) 3734 */ 3735 public DetailComponent setQuantity(SimpleQuantity value) { 3736 this.quantity = value; 3737 return this; 3738 } 3739 3740 /** 3741 * @return {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) 3742 */ 3743 public Money getUnitPrice() { 3744 if (this.unitPrice == null) 3745 if (Configuration.errorOnAutoCreate()) 3746 throw new Error("Attempt to auto-create DetailComponent.unitPrice"); 3747 else if (Configuration.doAutoCreate()) 3748 this.unitPrice = new Money(); // cc 3749 return this.unitPrice; 3750 } 3751 3752 public boolean hasUnitPrice() { 3753 return this.unitPrice != null && !this.unitPrice.isEmpty(); 3754 } 3755 3756 /** 3757 * @param value {@link #unitPrice} (If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.) 3758 */ 3759 public DetailComponent setUnitPrice(Money value) { 3760 this.unitPrice = value; 3761 return this; 3762 } 3763 3764 /** 3765 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 3766 */ 3767 public DecimalType getFactorElement() { 3768 if (this.factor == null) 3769 if (Configuration.errorOnAutoCreate()) 3770 throw new Error("Attempt to auto-create DetailComponent.factor"); 3771 else if (Configuration.doAutoCreate()) 3772 this.factor = new DecimalType(); // bb 3773 return this.factor; 3774 } 3775 3776 public boolean hasFactorElement() { 3777 return this.factor != null && !this.factor.isEmpty(); 3778 } 3779 3780 public boolean hasFactor() { 3781 return this.factor != null && !this.factor.isEmpty(); 3782 } 3783 3784 /** 3785 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 3786 */ 3787 public DetailComponent setFactorElement(DecimalType value) { 3788 this.factor = value; 3789 return this; 3790 } 3791 3792 /** 3793 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 3794 */ 3795 public BigDecimal getFactor() { 3796 return this.factor == null ? null : this.factor.getValue(); 3797 } 3798 3799 /** 3800 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 3801 */ 3802 public DetailComponent setFactor(BigDecimal value) { 3803 if (value == null) 3804 this.factor = null; 3805 else { 3806 if (this.factor == null) 3807 this.factor = new DecimalType(); 3808 this.factor.setValue(value); 3809 } 3810 return this; 3811 } 3812 3813 /** 3814 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 3815 */ 3816 public DetailComponent setFactor(long value) { 3817 this.factor = new DecimalType(); 3818 this.factor.setValue(value); 3819 return this; 3820 } 3821 3822 /** 3823 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 3824 */ 3825 public DetailComponent setFactor(double value) { 3826 this.factor = new DecimalType(); 3827 this.factor.setValue(value); 3828 return this; 3829 } 3830 3831 /** 3832 * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 3833 */ 3834 public DecimalType getPointsElement() { 3835 if (this.points == null) 3836 if (Configuration.errorOnAutoCreate()) 3837 throw new Error("Attempt to auto-create DetailComponent.points"); 3838 else if (Configuration.doAutoCreate()) 3839 this.points = new DecimalType(); // bb 3840 return this.points; 3841 } 3842 3843 public boolean hasPointsElement() { 3844 return this.points != null && !this.points.isEmpty(); 3845 } 3846 3847 public boolean hasPoints() { 3848 return this.points != null && !this.points.isEmpty(); 3849 } 3850 3851 /** 3852 * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 3853 */ 3854 public DetailComponent setPointsElement(DecimalType value) { 3855 this.points = value; 3856 return this; 3857 } 3858 3859 /** 3860 * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 3861 */ 3862 public BigDecimal getPoints() { 3863 return this.points == null ? null : this.points.getValue(); 3864 } 3865 3866 /** 3867 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 3868 */ 3869 public DetailComponent setPoints(BigDecimal value) { 3870 if (value == null) 3871 this.points = null; 3872 else { 3873 if (this.points == null) 3874 this.points = new DecimalType(); 3875 this.points.setValue(value); 3876 } 3877 return this; 3878 } 3879 3880 /** 3881 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 3882 */ 3883 public DetailComponent setPoints(long value) { 3884 this.points = new DecimalType(); 3885 this.points.setValue(value); 3886 return this; 3887 } 3888 3889 /** 3890 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 3891 */ 3892 public DetailComponent setPoints(double value) { 3893 this.points = new DecimalType(); 3894 this.points.setValue(value); 3895 return this; 3896 } 3897 3898 /** 3899 * @return {@link #net} (The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 3900 */ 3901 public Money getNet() { 3902 if (this.net == null) 3903 if (Configuration.errorOnAutoCreate()) 3904 throw new Error("Attempt to auto-create DetailComponent.net"); 3905 else if (Configuration.doAutoCreate()) 3906 this.net = new Money(); // cc 3907 return this.net; 3908 } 3909 3910 public boolean hasNet() { 3911 return this.net != null && !this.net.isEmpty(); 3912 } 3913 3914 /** 3915 * @param value {@link #net} (The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 3916 */ 3917 public DetailComponent setNet(Money value) { 3918 this.net = value; 3919 return this; 3920 } 3921 3922 /** 3923 * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) 3924 */ 3925 public List<Reference> getUdi() { 3926 if (this.udi == null) 3927 this.udi = new ArrayList<Reference>(); 3928 return this.udi; 3929 } 3930 3931 public boolean hasUdi() { 3932 if (this.udi == null) 3933 return false; 3934 for (Reference item : this.udi) 3935 if (!item.isEmpty()) 3936 return true; 3937 return false; 3938 } 3939 3940 /** 3941 * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) 3942 */ 3943 // syntactic sugar 3944 public Reference addUdi() { //3 3945 Reference t = new Reference(); 3946 if (this.udi == null) 3947 this.udi = new ArrayList<Reference>(); 3948 this.udi.add(t); 3949 return t; 3950 } 3951 3952 // syntactic sugar 3953 public DetailComponent addUdi(Reference t) { //3 3954 if (t == null) 3955 return this; 3956 if (this.udi == null) 3957 this.udi = new ArrayList<Reference>(); 3958 this.udi.add(t); 3959 return this; 3960 } 3961 3962 /** 3963 * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) 3964 */ 3965 public List<Device> getUdiTarget() { 3966 if (this.udiTarget == null) 3967 this.udiTarget = new ArrayList<Device>(); 3968 return this.udiTarget; 3969 } 3970 3971 // syntactic sugar 3972 /** 3973 * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) 3974 */ 3975 public Device addUdiTarget() { 3976 Device r = new Device(); 3977 if (this.udiTarget == null) 3978 this.udiTarget = new ArrayList<Device>(); 3979 this.udiTarget.add(r); 3980 return r; 3981 } 3982 3983 /** 3984 * @return {@link #subDetail} (Third tier of goods and services.) 3985 */ 3986 public List<SubDetailComponent> getSubDetail() { 3987 if (this.subDetail == null) 3988 this.subDetail = new ArrayList<SubDetailComponent>(); 3989 return this.subDetail; 3990 } 3991 3992 public boolean hasSubDetail() { 3993 if (this.subDetail == null) 3994 return false; 3995 for (SubDetailComponent item : this.subDetail) 3996 if (!item.isEmpty()) 3997 return true; 3998 return false; 3999 } 4000 4001 /** 4002 * @return {@link #subDetail} (Third tier of goods and services.) 4003 */ 4004 // syntactic sugar 4005 public SubDetailComponent addSubDetail() { //3 4006 SubDetailComponent t = new SubDetailComponent(); 4007 if (this.subDetail == null) 4008 this.subDetail = new ArrayList<SubDetailComponent>(); 4009 this.subDetail.add(t); 4010 return t; 4011 } 4012 4013 // syntactic sugar 4014 public DetailComponent addSubDetail(SubDetailComponent t) { //3 4015 if (t == null) 4016 return this; 4017 if (this.subDetail == null) 4018 this.subDetail = new ArrayList<SubDetailComponent>(); 4019 this.subDetail.add(t); 4020 return this; 4021 } 4022 4023 protected void listChildren(List<Property> childrenList) { 4024 super.listChildren(childrenList); 4025 childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); 4026 childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); 4027 childrenList.add(new Property("service", "Coding", "If a grouping item then 'GROUP' otherwise it is a node therefore a code to indicate the Professional Service or Product supplied.", 0, java.lang.Integer.MAX_VALUE, service)); 4028 childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); 4029 childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); 4030 childrenList.add(new Property("unitPrice", "Money", "If the item is a node then this is the fee for the product or service, otherwise this is the total of the fees for the children of the group.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); 4031 childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); 4032 childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); 4033 childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); 4034 childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 4035 childrenList.add(new Property("subDetail", "", "Third tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, subDetail)); 4036 } 4037 4038 @Override 4039 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4040 switch (hash) { 4041 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 4042 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 4043 case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // Coding 4044 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // Coding 4045 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 4046 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 4047 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 4048 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 4049 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 4050 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 4051 case -828829007: /*subDetail*/ return this.subDetail == null ? new Base[0] : this.subDetail.toArray(new Base[this.subDetail.size()]); // SubDetailComponent 4052 default: return super.getProperty(hash, name, checkValid); 4053 } 4054 4055 } 4056 4057 @Override 4058 public void setProperty(int hash, String name, Base value) throws FHIRException { 4059 switch (hash) { 4060 case 1349547969: // sequence 4061 this.sequence = castToPositiveInt(value); // PositiveIntType 4062 break; 4063 case 3575610: // type 4064 this.type = castToCoding(value); // Coding 4065 break; 4066 case 1984153269: // service 4067 this.service = castToCoding(value); // Coding 4068 break; 4069 case 1010065041: // programCode 4070 this.getProgramCode().add(castToCoding(value)); // Coding 4071 break; 4072 case -1285004149: // quantity 4073 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 4074 break; 4075 case -486196699: // unitPrice 4076 this.unitPrice = castToMoney(value); // Money 4077 break; 4078 case -1282148017: // factor 4079 this.factor = castToDecimal(value); // DecimalType 4080 break; 4081 case -982754077: // points 4082 this.points = castToDecimal(value); // DecimalType 4083 break; 4084 case 108957: // net 4085 this.net = castToMoney(value); // Money 4086 break; 4087 case 115642: // udi 4088 this.getUdi().add(castToReference(value)); // Reference 4089 break; 4090 case -828829007: // subDetail 4091 this.getSubDetail().add((SubDetailComponent) value); // SubDetailComponent 4092 break; 4093 default: super.setProperty(hash, name, value); 4094 } 4095 4096 } 4097 4098 @Override 4099 public void setProperty(String name, Base value) throws FHIRException { 4100 if (name.equals("sequence")) 4101 this.sequence = castToPositiveInt(value); // PositiveIntType 4102 else if (name.equals("type")) 4103 this.type = castToCoding(value); // Coding 4104 else if (name.equals("service")) 4105 this.service = castToCoding(value); // Coding 4106 else if (name.equals("programCode")) 4107 this.getProgramCode().add(castToCoding(value)); 4108 else if (name.equals("quantity")) 4109 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 4110 else if (name.equals("unitPrice")) 4111 this.unitPrice = castToMoney(value); // Money 4112 else if (name.equals("factor")) 4113 this.factor = castToDecimal(value); // DecimalType 4114 else if (name.equals("points")) 4115 this.points = castToDecimal(value); // DecimalType 4116 else if (name.equals("net")) 4117 this.net = castToMoney(value); // Money 4118 else if (name.equals("udi")) 4119 this.getUdi().add(castToReference(value)); 4120 else if (name.equals("subDetail")) 4121 this.getSubDetail().add((SubDetailComponent) value); 4122 else 4123 super.setProperty(name, value); 4124 } 4125 4126 @Override 4127 public Base makeProperty(int hash, String name) throws FHIRException { 4128 switch (hash) { 4129 case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType 4130 case 3575610: return getType(); // Coding 4131 case 1984153269: return getService(); // Coding 4132 case 1010065041: return addProgramCode(); // Coding 4133 case -1285004149: return getQuantity(); // SimpleQuantity 4134 case -486196699: return getUnitPrice(); // Money 4135 case -1282148017: throw new FHIRException("Cannot make property factor as it is not a complex type"); // DecimalType 4136 case -982754077: throw new FHIRException("Cannot make property points as it is not a complex type"); // DecimalType 4137 case 108957: return getNet(); // Money 4138 case 115642: return addUdi(); // Reference 4139 case -828829007: return addSubDetail(); // SubDetailComponent 4140 default: return super.makeProperty(hash, name); 4141 } 4142 4143 } 4144 4145 @Override 4146 public Base addChild(String name) throws FHIRException { 4147 if (name.equals("sequence")) { 4148 throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); 4149 } 4150 else if (name.equals("type")) { 4151 this.type = new Coding(); 4152 return this.type; 4153 } 4154 else if (name.equals("service")) { 4155 this.service = new Coding(); 4156 return this.service; 4157 } 4158 else if (name.equals("programCode")) { 4159 return addProgramCode(); 4160 } 4161 else if (name.equals("quantity")) { 4162 this.quantity = new SimpleQuantity(); 4163 return this.quantity; 4164 } 4165 else if (name.equals("unitPrice")) { 4166 this.unitPrice = new Money(); 4167 return this.unitPrice; 4168 } 4169 else if (name.equals("factor")) { 4170 throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); 4171 } 4172 else if (name.equals("points")) { 4173 throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); 4174 } 4175 else if (name.equals("net")) { 4176 this.net = new Money(); 4177 return this.net; 4178 } 4179 else if (name.equals("udi")) { 4180 return addUdi(); 4181 } 4182 else if (name.equals("subDetail")) { 4183 return addSubDetail(); 4184 } 4185 else 4186 return super.addChild(name); 4187 } 4188 4189 public DetailComponent copy() { 4190 DetailComponent dst = new DetailComponent(); 4191 copyValues(dst); 4192 dst.sequence = sequence == null ? null : sequence.copy(); 4193 dst.type = type == null ? null : type.copy(); 4194 dst.service = service == null ? null : service.copy(); 4195 if (programCode != null) { 4196 dst.programCode = new ArrayList<Coding>(); 4197 for (Coding i : programCode) 4198 dst.programCode.add(i.copy()); 4199 }; 4200 dst.quantity = quantity == null ? null : quantity.copy(); 4201 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 4202 dst.factor = factor == null ? null : factor.copy(); 4203 dst.points = points == null ? null : points.copy(); 4204 dst.net = net == null ? null : net.copy(); 4205 if (udi != null) { 4206 dst.udi = new ArrayList<Reference>(); 4207 for (Reference i : udi) 4208 dst.udi.add(i.copy()); 4209 }; 4210 if (subDetail != null) { 4211 dst.subDetail = new ArrayList<SubDetailComponent>(); 4212 for (SubDetailComponent i : subDetail) 4213 dst.subDetail.add(i.copy()); 4214 }; 4215 return dst; 4216 } 4217 4218 @Override 4219 public boolean equalsDeep(Base other) { 4220 if (!super.equalsDeep(other)) 4221 return false; 4222 if (!(other instanceof DetailComponent)) 4223 return false; 4224 DetailComponent o = (DetailComponent) other; 4225 return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) 4226 && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) 4227 && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) 4228 && compareDeep(udi, o.udi, true) && compareDeep(subDetail, o.subDetail, true); 4229 } 4230 4231 @Override 4232 public boolean equalsShallow(Base other) { 4233 if (!super.equalsShallow(other)) 4234 return false; 4235 if (!(other instanceof DetailComponent)) 4236 return false; 4237 DetailComponent o = (DetailComponent) other; 4238 return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) 4239 ; 4240 } 4241 4242 public boolean isEmpty() { 4243 return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) 4244 && (service == null || service.isEmpty()) && (programCode == null || programCode.isEmpty()) 4245 && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) 4246 && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) 4247 && (udi == null || udi.isEmpty()) && (subDetail == null || subDetail.isEmpty()); 4248 } 4249 4250 public String fhirType() { 4251 return "Claim.item.detail"; 4252 4253 } 4254 4255 } 4256 4257 @Block() 4258 public static class SubDetailComponent extends BackboneElement implements IBaseBackboneElement { 4259 /** 4260 * A service line number. 4261 */ 4262 @Child(name = "sequence", type = {PositiveIntType.class}, order=1, min=1, max=1, modifier=false, summary=true) 4263 @Description(shortDefinition="Service instance", formalDefinition="A service line number." ) 4264 protected PositiveIntType sequence; 4265 4266 /** 4267 * The type of product or service. 4268 */ 4269 @Child(name = "type", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) 4270 @Description(shortDefinition="Type of product or service", formalDefinition="The type of product or service." ) 4271 protected Coding type; 4272 4273 /** 4274 * The fee for an addittional service or product or charge. 4275 */ 4276 @Child(name = "service", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=true) 4277 @Description(shortDefinition="Additional item codes", formalDefinition="The fee for an addittional service or product or charge." ) 4278 protected Coding service; 4279 4280 /** 4281 * For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program. 4282 */ 4283 @Child(name = "programCode", type = {Coding.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4284 @Description(shortDefinition="Program specific reason for item inclusion", formalDefinition="For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program." ) 4285 protected List<Coding> programCode; 4286 4287 /** 4288 * The number of repetitions of a service or product. 4289 */ 4290 @Child(name = "quantity", type = {SimpleQuantity.class}, order=5, min=0, max=1, modifier=false, summary=true) 4291 @Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." ) 4292 protected SimpleQuantity quantity; 4293 4294 /** 4295 * The fee for an addittional service or product or charge. 4296 */ 4297 @Child(name = "unitPrice", type = {Money.class}, order=6, min=0, max=1, modifier=false, summary=true) 4298 @Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The fee for an addittional service or product or charge." ) 4299 protected Money unitPrice; 4300 4301 /** 4302 * A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4303 */ 4304 @Child(name = "factor", type = {DecimalType.class}, order=7, min=0, max=1, modifier=false, summary=true) 4305 @Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." ) 4306 protected DecimalType factor; 4307 4308 /** 4309 * An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 4310 */ 4311 @Child(name = "points", type = {DecimalType.class}, order=8, min=0, max=1, modifier=false, summary=true) 4312 @Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." ) 4313 protected DecimalType points; 4314 4315 /** 4316 * The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied. 4317 */ 4318 @Child(name = "net", type = {Money.class}, order=9, min=0, max=1, modifier=false, summary=true) 4319 @Description(shortDefinition="Net additional item cost", formalDefinition="The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." ) 4320 protected Money net; 4321 4322 /** 4323 * List of Unique Device Identifiers associated with this line item. 4324 */ 4325 @Child(name = "udi", type = {Device.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4326 @Description(shortDefinition="Unique Device Identifier", formalDefinition="List of Unique Device Identifiers associated with this line item." ) 4327 protected List<Reference> udi; 4328 /** 4329 * The actual objects that are the target of the reference (List of Unique Device Identifiers associated with this line item.) 4330 */ 4331 protected List<Device> udiTarget; 4332 4333 4334 private static final long serialVersionUID = 846630321L; 4335 4336 /** 4337 * Constructor 4338 */ 4339 public SubDetailComponent() { 4340 super(); 4341 } 4342 4343 /** 4344 * Constructor 4345 */ 4346 public SubDetailComponent(PositiveIntType sequence, Coding type, Coding service) { 4347 super(); 4348 this.sequence = sequence; 4349 this.type = type; 4350 this.service = service; 4351 } 4352 4353 /** 4354 * @return {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 4355 */ 4356 public PositiveIntType getSequenceElement() { 4357 if (this.sequence == null) 4358 if (Configuration.errorOnAutoCreate()) 4359 throw new Error("Attempt to auto-create SubDetailComponent.sequence"); 4360 else if (Configuration.doAutoCreate()) 4361 this.sequence = new PositiveIntType(); // bb 4362 return this.sequence; 4363 } 4364 4365 public boolean hasSequenceElement() { 4366 return this.sequence != null && !this.sequence.isEmpty(); 4367 } 4368 4369 public boolean hasSequence() { 4370 return this.sequence != null && !this.sequence.isEmpty(); 4371 } 4372 4373 /** 4374 * @param value {@link #sequence} (A service line number.). This is the underlying object with id, value and extensions. The accessor "getSequence" gives direct access to the value 4375 */ 4376 public SubDetailComponent setSequenceElement(PositiveIntType value) { 4377 this.sequence = value; 4378 return this; 4379 } 4380 4381 /** 4382 * @return A service line number. 4383 */ 4384 public int getSequence() { 4385 return this.sequence == null || this.sequence.isEmpty() ? 0 : this.sequence.getValue(); 4386 } 4387 4388 /** 4389 * @param value A service line number. 4390 */ 4391 public SubDetailComponent setSequence(int value) { 4392 if (this.sequence == null) 4393 this.sequence = new PositiveIntType(); 4394 this.sequence.setValue(value); 4395 return this; 4396 } 4397 4398 /** 4399 * @return {@link #type} (The type of product or service.) 4400 */ 4401 public Coding getType() { 4402 if (this.type == null) 4403 if (Configuration.errorOnAutoCreate()) 4404 throw new Error("Attempt to auto-create SubDetailComponent.type"); 4405 else if (Configuration.doAutoCreate()) 4406 this.type = new Coding(); // cc 4407 return this.type; 4408 } 4409 4410 public boolean hasType() { 4411 return this.type != null && !this.type.isEmpty(); 4412 } 4413 4414 /** 4415 * @param value {@link #type} (The type of product or service.) 4416 */ 4417 public SubDetailComponent setType(Coding value) { 4418 this.type = value; 4419 return this; 4420 } 4421 4422 /** 4423 * @return {@link #service} (The fee for an addittional service or product or charge.) 4424 */ 4425 public Coding getService() { 4426 if (this.service == null) 4427 if (Configuration.errorOnAutoCreate()) 4428 throw new Error("Attempt to auto-create SubDetailComponent.service"); 4429 else if (Configuration.doAutoCreate()) 4430 this.service = new Coding(); // cc 4431 return this.service; 4432 } 4433 4434 public boolean hasService() { 4435 return this.service != null && !this.service.isEmpty(); 4436 } 4437 4438 /** 4439 * @param value {@link #service} (The fee for an addittional service or product or charge.) 4440 */ 4441 public SubDetailComponent setService(Coding value) { 4442 this.service = value; 4443 return this; 4444 } 4445 4446 /** 4447 * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) 4448 */ 4449 public List<Coding> getProgramCode() { 4450 if (this.programCode == null) 4451 this.programCode = new ArrayList<Coding>(); 4452 return this.programCode; 4453 } 4454 4455 public boolean hasProgramCode() { 4456 if (this.programCode == null) 4457 return false; 4458 for (Coding item : this.programCode) 4459 if (!item.isEmpty()) 4460 return true; 4461 return false; 4462 } 4463 4464 /** 4465 * @return {@link #programCode} (For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.) 4466 */ 4467 // syntactic sugar 4468 public Coding addProgramCode() { //3 4469 Coding t = new Coding(); 4470 if (this.programCode == null) 4471 this.programCode = new ArrayList<Coding>(); 4472 this.programCode.add(t); 4473 return t; 4474 } 4475 4476 // syntactic sugar 4477 public SubDetailComponent addProgramCode(Coding t) { //3 4478 if (t == null) 4479 return this; 4480 if (this.programCode == null) 4481 this.programCode = new ArrayList<Coding>(); 4482 this.programCode.add(t); 4483 return this; 4484 } 4485 4486 /** 4487 * @return {@link #quantity} (The number of repetitions of a service or product.) 4488 */ 4489 public SimpleQuantity getQuantity() { 4490 if (this.quantity == null) 4491 if (Configuration.errorOnAutoCreate()) 4492 throw new Error("Attempt to auto-create SubDetailComponent.quantity"); 4493 else if (Configuration.doAutoCreate()) 4494 this.quantity = new SimpleQuantity(); // cc 4495 return this.quantity; 4496 } 4497 4498 public boolean hasQuantity() { 4499 return this.quantity != null && !this.quantity.isEmpty(); 4500 } 4501 4502 /** 4503 * @param value {@link #quantity} (The number of repetitions of a service or product.) 4504 */ 4505 public SubDetailComponent setQuantity(SimpleQuantity value) { 4506 this.quantity = value; 4507 return this; 4508 } 4509 4510 /** 4511 * @return {@link #unitPrice} (The fee for an addittional service or product or charge.) 4512 */ 4513 public Money getUnitPrice() { 4514 if (this.unitPrice == null) 4515 if (Configuration.errorOnAutoCreate()) 4516 throw new Error("Attempt to auto-create SubDetailComponent.unitPrice"); 4517 else if (Configuration.doAutoCreate()) 4518 this.unitPrice = new Money(); // cc 4519 return this.unitPrice; 4520 } 4521 4522 public boolean hasUnitPrice() { 4523 return this.unitPrice != null && !this.unitPrice.isEmpty(); 4524 } 4525 4526 /** 4527 * @param value {@link #unitPrice} (The fee for an addittional service or product or charge.) 4528 */ 4529 public SubDetailComponent setUnitPrice(Money value) { 4530 this.unitPrice = value; 4531 return this; 4532 } 4533 4534 /** 4535 * @return {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 4536 */ 4537 public DecimalType getFactorElement() { 4538 if (this.factor == null) 4539 if (Configuration.errorOnAutoCreate()) 4540 throw new Error("Attempt to auto-create SubDetailComponent.factor"); 4541 else if (Configuration.doAutoCreate()) 4542 this.factor = new DecimalType(); // bb 4543 return this.factor; 4544 } 4545 4546 public boolean hasFactorElement() { 4547 return this.factor != null && !this.factor.isEmpty(); 4548 } 4549 4550 public boolean hasFactor() { 4551 return this.factor != null && !this.factor.isEmpty(); 4552 } 4553 4554 /** 4555 * @param value {@link #factor} (A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.). This is the underlying object with id, value and extensions. The accessor "getFactor" gives direct access to the value 4556 */ 4557 public SubDetailComponent setFactorElement(DecimalType value) { 4558 this.factor = value; 4559 return this; 4560 } 4561 4562 /** 4563 * @return A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4564 */ 4565 public BigDecimal getFactor() { 4566 return this.factor == null ? null : this.factor.getValue(); 4567 } 4568 4569 /** 4570 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4571 */ 4572 public SubDetailComponent setFactor(BigDecimal value) { 4573 if (value == null) 4574 this.factor = null; 4575 else { 4576 if (this.factor == null) 4577 this.factor = new DecimalType(); 4578 this.factor.setValue(value); 4579 } 4580 return this; 4581 } 4582 4583 /** 4584 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4585 */ 4586 public SubDetailComponent setFactor(long value) { 4587 this.factor = new DecimalType(); 4588 this.factor.setValue(value); 4589 return this; 4590 } 4591 4592 /** 4593 * @param value A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. 4594 */ 4595 public SubDetailComponent setFactor(double value) { 4596 this.factor = new DecimalType(); 4597 this.factor.setValue(value); 4598 return this; 4599 } 4600 4601 /** 4602 * @return {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 4603 */ 4604 public DecimalType getPointsElement() { 4605 if (this.points == null) 4606 if (Configuration.errorOnAutoCreate()) 4607 throw new Error("Attempt to auto-create SubDetailComponent.points"); 4608 else if (Configuration.doAutoCreate()) 4609 this.points = new DecimalType(); // bb 4610 return this.points; 4611 } 4612 4613 public boolean hasPointsElement() { 4614 return this.points != null && !this.points.isEmpty(); 4615 } 4616 4617 public boolean hasPoints() { 4618 return this.points != null && !this.points.isEmpty(); 4619 } 4620 4621 /** 4622 * @param value {@link #points} (An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.). This is the underlying object with id, value and extensions. The accessor "getPoints" gives direct access to the value 4623 */ 4624 public SubDetailComponent setPointsElement(DecimalType value) { 4625 this.points = value; 4626 return this; 4627 } 4628 4629 /** 4630 * @return An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 4631 */ 4632 public BigDecimal getPoints() { 4633 return this.points == null ? null : this.points.getValue(); 4634 } 4635 4636 /** 4637 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 4638 */ 4639 public SubDetailComponent setPoints(BigDecimal value) { 4640 if (value == null) 4641 this.points = null; 4642 else { 4643 if (this.points == null) 4644 this.points = new DecimalType(); 4645 this.points.setValue(value); 4646 } 4647 return this; 4648 } 4649 4650 /** 4651 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 4652 */ 4653 public SubDetailComponent setPoints(long value) { 4654 this.points = new DecimalType(); 4655 this.points.setValue(value); 4656 return this; 4657 } 4658 4659 /** 4660 * @param value An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point. 4661 */ 4662 public SubDetailComponent setPoints(double value) { 4663 this.points = new DecimalType(); 4664 this.points.setValue(value); 4665 return this; 4666 } 4667 4668 /** 4669 * @return {@link #net} (The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 4670 */ 4671 public Money getNet() { 4672 if (this.net == null) 4673 if (Configuration.errorOnAutoCreate()) 4674 throw new Error("Attempt to auto-create SubDetailComponent.net"); 4675 else if (Configuration.doAutoCreate()) 4676 this.net = new Money(); // cc 4677 return this.net; 4678 } 4679 4680 public boolean hasNet() { 4681 return this.net != null && !this.net.isEmpty(); 4682 } 4683 4684 /** 4685 * @param value {@link #net} (The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.) 4686 */ 4687 public SubDetailComponent setNet(Money value) { 4688 this.net = value; 4689 return this; 4690 } 4691 4692 /** 4693 * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) 4694 */ 4695 public List<Reference> getUdi() { 4696 if (this.udi == null) 4697 this.udi = new ArrayList<Reference>(); 4698 return this.udi; 4699 } 4700 4701 public boolean hasUdi() { 4702 if (this.udi == null) 4703 return false; 4704 for (Reference item : this.udi) 4705 if (!item.isEmpty()) 4706 return true; 4707 return false; 4708 } 4709 4710 /** 4711 * @return {@link #udi} (List of Unique Device Identifiers associated with this line item.) 4712 */ 4713 // syntactic sugar 4714 public Reference addUdi() { //3 4715 Reference t = new Reference(); 4716 if (this.udi == null) 4717 this.udi = new ArrayList<Reference>(); 4718 this.udi.add(t); 4719 return t; 4720 } 4721 4722 // syntactic sugar 4723 public SubDetailComponent addUdi(Reference t) { //3 4724 if (t == null) 4725 return this; 4726 if (this.udi == null) 4727 this.udi = new ArrayList<Reference>(); 4728 this.udi.add(t); 4729 return this; 4730 } 4731 4732 /** 4733 * @return {@link #udi} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) 4734 */ 4735 public List<Device> getUdiTarget() { 4736 if (this.udiTarget == null) 4737 this.udiTarget = new ArrayList<Device>(); 4738 return this.udiTarget; 4739 } 4740 4741 // syntactic sugar 4742 /** 4743 * @return {@link #udi} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. List of Unique Device Identifiers associated with this line item.) 4744 */ 4745 public Device addUdiTarget() { 4746 Device r = new Device(); 4747 if (this.udiTarget == null) 4748 this.udiTarget = new ArrayList<Device>(); 4749 this.udiTarget.add(r); 4750 return r; 4751 } 4752 4753 protected void listChildren(List<Property> childrenList) { 4754 super.listChildren(childrenList); 4755 childrenList.add(new Property("sequence", "positiveInt", "A service line number.", 0, java.lang.Integer.MAX_VALUE, sequence)); 4756 childrenList.add(new Property("type", "Coding", "The type of product or service.", 0, java.lang.Integer.MAX_VALUE, type)); 4757 childrenList.add(new Property("service", "Coding", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, service)); 4758 childrenList.add(new Property("programCode", "Coding", "For programs which require reson codes for the inclusion, covering, of this billed item under the program or sub-program.", 0, java.lang.Integer.MAX_VALUE, programCode)); 4759 childrenList.add(new Property("quantity", "SimpleQuantity", "The number of repetitions of a service or product.", 0, java.lang.Integer.MAX_VALUE, quantity)); 4760 childrenList.add(new Property("unitPrice", "Money", "The fee for an addittional service or product or charge.", 0, java.lang.Integer.MAX_VALUE, unitPrice)); 4761 childrenList.add(new Property("factor", "decimal", "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", 0, java.lang.Integer.MAX_VALUE, factor)); 4762 childrenList.add(new Property("points", "decimal", "An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.", 0, java.lang.Integer.MAX_VALUE, points)); 4763 childrenList.add(new Property("net", "Money", "The quantity times the unit price for an addittional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.", 0, java.lang.Integer.MAX_VALUE, net)); 4764 childrenList.add(new Property("udi", "Reference(Device)", "List of Unique Device Identifiers associated with this line item.", 0, java.lang.Integer.MAX_VALUE, udi)); 4765 } 4766 4767 @Override 4768 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4769 switch (hash) { 4770 case 1349547969: /*sequence*/ return this.sequence == null ? new Base[0] : new Base[] {this.sequence}; // PositiveIntType 4771 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 4772 case 1984153269: /*service*/ return this.service == null ? new Base[0] : new Base[] {this.service}; // Coding 4773 case 1010065041: /*programCode*/ return this.programCode == null ? new Base[0] : this.programCode.toArray(new Base[this.programCode.size()]); // Coding 4774 case -1285004149: /*quantity*/ return this.quantity == null ? new Base[0] : new Base[] {this.quantity}; // SimpleQuantity 4775 case -486196699: /*unitPrice*/ return this.unitPrice == null ? new Base[0] : new Base[] {this.unitPrice}; // Money 4776 case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType 4777 case -982754077: /*points*/ return this.points == null ? new Base[0] : new Base[] {this.points}; // DecimalType 4778 case 108957: /*net*/ return this.net == null ? new Base[0] : new Base[] {this.net}; // Money 4779 case 115642: /*udi*/ return this.udi == null ? new Base[0] : this.udi.toArray(new Base[this.udi.size()]); // Reference 4780 default: return super.getProperty(hash, name, checkValid); 4781 } 4782 4783 } 4784 4785 @Override 4786 public void setProperty(int hash, String name, Base value) throws FHIRException { 4787 switch (hash) { 4788 case 1349547969: // sequence 4789 this.sequence = castToPositiveInt(value); // PositiveIntType 4790 break; 4791 case 3575610: // type 4792 this.type = castToCoding(value); // Coding 4793 break; 4794 case 1984153269: // service 4795 this.service = castToCoding(value); // Coding 4796 break; 4797 case 1010065041: // programCode 4798 this.getProgramCode().add(castToCoding(value)); // Coding 4799 break; 4800 case -1285004149: // quantity 4801 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 4802 break; 4803 case -486196699: // unitPrice 4804 this.unitPrice = castToMoney(value); // Money 4805 break; 4806 case -1282148017: // factor 4807 this.factor = castToDecimal(value); // DecimalType 4808 break; 4809 case -982754077: // points 4810 this.points = castToDecimal(value); // DecimalType 4811 break; 4812 case 108957: // net 4813 this.net = castToMoney(value); // Money 4814 break; 4815 case 115642: // udi 4816 this.getUdi().add(castToReference(value)); // Reference 4817 break; 4818 default: super.setProperty(hash, name, value); 4819 } 4820 4821 } 4822 4823 @Override 4824 public void setProperty(String name, Base value) throws FHIRException { 4825 if (name.equals("sequence")) 4826 this.sequence = castToPositiveInt(value); // PositiveIntType 4827 else if (name.equals("type")) 4828 this.type = castToCoding(value); // Coding 4829 else if (name.equals("service")) 4830 this.service = castToCoding(value); // Coding 4831 else if (name.equals("programCode")) 4832 this.getProgramCode().add(castToCoding(value)); 4833 else if (name.equals("quantity")) 4834 this.quantity = castToSimpleQuantity(value); // SimpleQuantity 4835 else if (name.equals("unitPrice")) 4836 this.unitPrice = castToMoney(value); // Money 4837 else if (name.equals("factor")) 4838 this.factor = castToDecimal(value); // DecimalType 4839 else if (name.equals("points")) 4840 this.points = castToDecimal(value); // DecimalType 4841 else if (name.equals("net")) 4842 this.net = castToMoney(value); // Money 4843 else if (name.equals("udi")) 4844 this.getUdi().add(castToReference(value)); 4845 else 4846 super.setProperty(name, value); 4847 } 4848 4849 @Override 4850 public Base makeProperty(int hash, String name) throws FHIRException { 4851 switch (hash) { 4852 case 1349547969: throw new FHIRException("Cannot make property sequence as it is not a complex type"); // PositiveIntType 4853 case 3575610: return getType(); // Coding 4854 case 1984153269: return getService(); // Coding 4855 case 1010065041: return addProgramCode(); // Coding 4856 case -1285004149: return getQuantity(); // SimpleQuantity 4857 case -486196699: return getUnitPrice(); // Money 4858 case -1282148017: throw new FHIRException("Cannot make property factor as it is not a complex type"); // DecimalType 4859 case -982754077: throw new FHIRException("Cannot make property points as it is not a complex type"); // DecimalType 4860 case 108957: return getNet(); // Money 4861 case 115642: return addUdi(); // Reference 4862 default: return super.makeProperty(hash, name); 4863 } 4864 4865 } 4866 4867 @Override 4868 public Base addChild(String name) throws FHIRException { 4869 if (name.equals("sequence")) { 4870 throw new FHIRException("Cannot call addChild on a primitive type Claim.sequence"); 4871 } 4872 else if (name.equals("type")) { 4873 this.type = new Coding(); 4874 return this.type; 4875 } 4876 else if (name.equals("service")) { 4877 this.service = new Coding(); 4878 return this.service; 4879 } 4880 else if (name.equals("programCode")) { 4881 return addProgramCode(); 4882 } 4883 else if (name.equals("quantity")) { 4884 this.quantity = new SimpleQuantity(); 4885 return this.quantity; 4886 } 4887 else if (name.equals("unitPrice")) { 4888 this.unitPrice = new Money(); 4889 return this.unitPrice; 4890 } 4891 else if (name.equals("factor")) { 4892 throw new FHIRException("Cannot call addChild on a primitive type Claim.factor"); 4893 } 4894 else if (name.equals("points")) { 4895 throw new FHIRException("Cannot call addChild on a primitive type Claim.points"); 4896 } 4897 else if (name.equals("net")) { 4898 this.net = new Money(); 4899 return this.net; 4900 } 4901 else if (name.equals("udi")) { 4902 return addUdi(); 4903 } 4904 else 4905 return super.addChild(name); 4906 } 4907 4908 public SubDetailComponent copy() { 4909 SubDetailComponent dst = new SubDetailComponent(); 4910 copyValues(dst); 4911 dst.sequence = sequence == null ? null : sequence.copy(); 4912 dst.type = type == null ? null : type.copy(); 4913 dst.service = service == null ? null : service.copy(); 4914 if (programCode != null) { 4915 dst.programCode = new ArrayList<Coding>(); 4916 for (Coding i : programCode) 4917 dst.programCode.add(i.copy()); 4918 }; 4919 dst.quantity = quantity == null ? null : quantity.copy(); 4920 dst.unitPrice = unitPrice == null ? null : unitPrice.copy(); 4921 dst.factor = factor == null ? null : factor.copy(); 4922 dst.points = points == null ? null : points.copy(); 4923 dst.net = net == null ? null : net.copy(); 4924 if (udi != null) { 4925 dst.udi = new ArrayList<Reference>(); 4926 for (Reference i : udi) 4927 dst.udi.add(i.copy()); 4928 }; 4929 return dst; 4930 } 4931 4932 @Override 4933 public boolean equalsDeep(Base other) { 4934 if (!super.equalsDeep(other)) 4935 return false; 4936 if (!(other instanceof SubDetailComponent)) 4937 return false; 4938 SubDetailComponent o = (SubDetailComponent) other; 4939 return compareDeep(sequence, o.sequence, true) && compareDeep(type, o.type, true) && compareDeep(service, o.service, true) 4940 && compareDeep(programCode, o.programCode, true) && compareDeep(quantity, o.quantity, true) && compareDeep(unitPrice, o.unitPrice, true) 4941 && compareDeep(factor, o.factor, true) && compareDeep(points, o.points, true) && compareDeep(net, o.net, true) 4942 && compareDeep(udi, o.udi, true); 4943 } 4944 4945 @Override 4946 public boolean equalsShallow(Base other) { 4947 if (!super.equalsShallow(other)) 4948 return false; 4949 if (!(other instanceof SubDetailComponent)) 4950 return false; 4951 SubDetailComponent o = (SubDetailComponent) other; 4952 return compareValues(sequence, o.sequence, true) && compareValues(factor, o.factor, true) && compareValues(points, o.points, true) 4953 ; 4954 } 4955 4956 public boolean isEmpty() { 4957 return super.isEmpty() && (sequence == null || sequence.isEmpty()) && (type == null || type.isEmpty()) 4958 && (service == null || service.isEmpty()) && (programCode == null || programCode.isEmpty()) 4959 && (quantity == null || quantity.isEmpty()) && (unitPrice == null || unitPrice.isEmpty()) 4960 && (factor == null || factor.isEmpty()) && (points == null || points.isEmpty()) && (net == null || net.isEmpty()) 4961 && (udi == null || udi.isEmpty()); 4962 } 4963 4964 public String fhirType() { 4965 return "Claim.item.detail.subDetail"; 4966 4967 } 4968 4969 } 4970 4971 @Block() 4972 public static class ProsthesisComponent extends BackboneElement implements IBaseBackboneElement { 4973 /** 4974 * Indicates whether this is the initial placement of a fixed prosthesis. 4975 */ 4976 @Child(name = "initial", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true) 4977 @Description(shortDefinition="Is this the initial service", formalDefinition="Indicates whether this is the initial placement of a fixed prosthesis." ) 4978 protected BooleanType initial; 4979 4980 /** 4981 * Date of the initial placement. 4982 */ 4983 @Child(name = "priorDate", type = {DateType.class}, order=2, min=0, max=1, modifier=false, summary=true) 4984 @Description(shortDefinition="Initial service Date", formalDefinition="Date of the initial placement." ) 4985 protected DateType priorDate; 4986 4987 /** 4988 * Material of the prior denture or bridge prosthesis. (Oral). 4989 */ 4990 @Child(name = "priorMaterial", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) 4991 @Description(shortDefinition="Prosthetic Material", formalDefinition="Material of the prior denture or bridge prosthesis. (Oral)." ) 4992 protected Coding priorMaterial; 4993 4994 private static final long serialVersionUID = 1739349641L; 4995 4996 /** 4997 * Constructor 4998 */ 4999 public ProsthesisComponent() { 5000 super(); 5001 } 5002 5003 /** 5004 * @return {@link #initial} (Indicates whether this is the initial placement of a fixed prosthesis.). This is the underlying object with id, value and extensions. The accessor "getInitial" gives direct access to the value 5005 */ 5006 public BooleanType getInitialElement() { 5007 if (this.initial == null) 5008 if (Configuration.errorOnAutoCreate()) 5009 throw new Error("Attempt to auto-create ProsthesisComponent.initial"); 5010 else if (Configuration.doAutoCreate()) 5011 this.initial = new BooleanType(); // bb 5012 return this.initial; 5013 } 5014 5015 public boolean hasInitialElement() { 5016 return this.initial != null && !this.initial.isEmpty(); 5017 } 5018 5019 public boolean hasInitial() { 5020 return this.initial != null && !this.initial.isEmpty(); 5021 } 5022 5023 /** 5024 * @param value {@link #initial} (Indicates whether this is the initial placement of a fixed prosthesis.). This is the underlying object with id, value and extensions. The accessor "getInitial" gives direct access to the value 5025 */ 5026 public ProsthesisComponent setInitialElement(BooleanType value) { 5027 this.initial = value; 5028 return this; 5029 } 5030 5031 /** 5032 * @return Indicates whether this is the initial placement of a fixed prosthesis. 5033 */ 5034 public boolean getInitial() { 5035 return this.initial == null || this.initial.isEmpty() ? false : this.initial.getValue(); 5036 } 5037 5038 /** 5039 * @param value Indicates whether this is the initial placement of a fixed prosthesis. 5040 */ 5041 public ProsthesisComponent setInitial(boolean value) { 5042 if (this.initial == null) 5043 this.initial = new BooleanType(); 5044 this.initial.setValue(value); 5045 return this; 5046 } 5047 5048 /** 5049 * @return {@link #priorDate} (Date of the initial placement.). This is the underlying object with id, value and extensions. The accessor "getPriorDate" gives direct access to the value 5050 */ 5051 public DateType getPriorDateElement() { 5052 if (this.priorDate == null) 5053 if (Configuration.errorOnAutoCreate()) 5054 throw new Error("Attempt to auto-create ProsthesisComponent.priorDate"); 5055 else if (Configuration.doAutoCreate()) 5056 this.priorDate = new DateType(); // bb 5057 return this.priorDate; 5058 } 5059 5060 public boolean hasPriorDateElement() { 5061 return this.priorDate != null && !this.priorDate.isEmpty(); 5062 } 5063 5064 public boolean hasPriorDate() { 5065 return this.priorDate != null && !this.priorDate.isEmpty(); 5066 } 5067 5068 /** 5069 * @param value {@link #priorDate} (Date of the initial placement.). This is the underlying object with id, value and extensions. The accessor "getPriorDate" gives direct access to the value 5070 */ 5071 public ProsthesisComponent setPriorDateElement(DateType value) { 5072 this.priorDate = value; 5073 return this; 5074 } 5075 5076 /** 5077 * @return Date of the initial placement. 5078 */ 5079 public Date getPriorDate() { 5080 return this.priorDate == null ? null : this.priorDate.getValue(); 5081 } 5082 5083 /** 5084 * @param value Date of the initial placement. 5085 */ 5086 public ProsthesisComponent setPriorDate(Date value) { 5087 if (value == null) 5088 this.priorDate = null; 5089 else { 5090 if (this.priorDate == null) 5091 this.priorDate = new DateType(); 5092 this.priorDate.setValue(value); 5093 } 5094 return this; 5095 } 5096 5097 /** 5098 * @return {@link #priorMaterial} (Material of the prior denture or bridge prosthesis. (Oral).) 5099 */ 5100 public Coding getPriorMaterial() { 5101 if (this.priorMaterial == null) 5102 if (Configuration.errorOnAutoCreate()) 5103 throw new Error("Attempt to auto-create ProsthesisComponent.priorMaterial"); 5104 else if (Configuration.doAutoCreate()) 5105 this.priorMaterial = new Coding(); // cc 5106 return this.priorMaterial; 5107 } 5108 5109 public boolean hasPriorMaterial() { 5110 return this.priorMaterial != null && !this.priorMaterial.isEmpty(); 5111 } 5112 5113 /** 5114 * @param value {@link #priorMaterial} (Material of the prior denture or bridge prosthesis. (Oral).) 5115 */ 5116 public ProsthesisComponent setPriorMaterial(Coding value) { 5117 this.priorMaterial = value; 5118 return this; 5119 } 5120 5121 protected void listChildren(List<Property> childrenList) { 5122 super.listChildren(childrenList); 5123 childrenList.add(new Property("initial", "boolean", "Indicates whether this is the initial placement of a fixed prosthesis.", 0, java.lang.Integer.MAX_VALUE, initial)); 5124 childrenList.add(new Property("priorDate", "date", "Date of the initial placement.", 0, java.lang.Integer.MAX_VALUE, priorDate)); 5125 childrenList.add(new Property("priorMaterial", "Coding", "Material of the prior denture or bridge prosthesis. (Oral).", 0, java.lang.Integer.MAX_VALUE, priorMaterial)); 5126 } 5127 5128 @Override 5129 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5130 switch (hash) { 5131 case 1948342084: /*initial*/ return this.initial == null ? new Base[0] : new Base[] {this.initial}; // BooleanType 5132 case -1770675816: /*priorDate*/ return this.priorDate == null ? new Base[0] : new Base[] {this.priorDate}; // DateType 5133 case -532999663: /*priorMaterial*/ return this.priorMaterial == null ? new Base[0] : new Base[] {this.priorMaterial}; // Coding 5134 default: return super.getProperty(hash, name, checkValid); 5135 } 5136 5137 } 5138 5139 @Override 5140 public void setProperty(int hash, String name, Base value) throws FHIRException { 5141 switch (hash) { 5142 case 1948342084: // initial 5143 this.initial = castToBoolean(value); // BooleanType 5144 break; 5145 case -1770675816: // priorDate 5146 this.priorDate = castToDate(value); // DateType 5147 break; 5148 case -532999663: // priorMaterial 5149 this.priorMaterial = castToCoding(value); // Coding 5150 break; 5151 default: super.setProperty(hash, name, value); 5152 } 5153 5154 } 5155 5156 @Override 5157 public void setProperty(String name, Base value) throws FHIRException { 5158 if (name.equals("initial")) 5159 this.initial = castToBoolean(value); // BooleanType 5160 else if (name.equals("priorDate")) 5161 this.priorDate = castToDate(value); // DateType 5162 else if (name.equals("priorMaterial")) 5163 this.priorMaterial = castToCoding(value); // Coding 5164 else 5165 super.setProperty(name, value); 5166 } 5167 5168 @Override 5169 public Base makeProperty(int hash, String name) throws FHIRException { 5170 switch (hash) { 5171 case 1948342084: throw new FHIRException("Cannot make property initial as it is not a complex type"); // BooleanType 5172 case -1770675816: throw new FHIRException("Cannot make property priorDate as it is not a complex type"); // DateType 5173 case -532999663: return getPriorMaterial(); // Coding 5174 default: return super.makeProperty(hash, name); 5175 } 5176 5177 } 5178 5179 @Override 5180 public Base addChild(String name) throws FHIRException { 5181 if (name.equals("initial")) { 5182 throw new FHIRException("Cannot call addChild on a primitive type Claim.initial"); 5183 } 5184 else if (name.equals("priorDate")) { 5185 throw new FHIRException("Cannot call addChild on a primitive type Claim.priorDate"); 5186 } 5187 else if (name.equals("priorMaterial")) { 5188 this.priorMaterial = new Coding(); 5189 return this.priorMaterial; 5190 } 5191 else 5192 return super.addChild(name); 5193 } 5194 5195 public ProsthesisComponent copy() { 5196 ProsthesisComponent dst = new ProsthesisComponent(); 5197 copyValues(dst); 5198 dst.initial = initial == null ? null : initial.copy(); 5199 dst.priorDate = priorDate == null ? null : priorDate.copy(); 5200 dst.priorMaterial = priorMaterial == null ? null : priorMaterial.copy(); 5201 return dst; 5202 } 5203 5204 @Override 5205 public boolean equalsDeep(Base other) { 5206 if (!super.equalsDeep(other)) 5207 return false; 5208 if (!(other instanceof ProsthesisComponent)) 5209 return false; 5210 ProsthesisComponent o = (ProsthesisComponent) other; 5211 return compareDeep(initial, o.initial, true) && compareDeep(priorDate, o.priorDate, true) && compareDeep(priorMaterial, o.priorMaterial, true) 5212 ; 5213 } 5214 5215 @Override 5216 public boolean equalsShallow(Base other) { 5217 if (!super.equalsShallow(other)) 5218 return false; 5219 if (!(other instanceof ProsthesisComponent)) 5220 return false; 5221 ProsthesisComponent o = (ProsthesisComponent) other; 5222 return compareValues(initial, o.initial, true) && compareValues(priorDate, o.priorDate, true); 5223 } 5224 5225 public boolean isEmpty() { 5226 return super.isEmpty() && (initial == null || initial.isEmpty()) && (priorDate == null || priorDate.isEmpty()) 5227 && (priorMaterial == null || priorMaterial.isEmpty()); 5228 } 5229 5230 public String fhirType() { 5231 return "Claim.item.prosthesis"; 5232 5233 } 5234 5235 } 5236 5237 @Block() 5238 public static class MissingTeethComponent extends BackboneElement implements IBaseBackboneElement { 5239 /** 5240 * The code identifying which tooth is missing. 5241 */ 5242 @Child(name = "tooth", type = {Coding.class}, order=1, min=1, max=1, modifier=false, summary=true) 5243 @Description(shortDefinition="Tooth Code", formalDefinition="The code identifying which tooth is missing." ) 5244 protected Coding tooth; 5245 5246 /** 5247 * Missing reason may be: E-extraction, O-other. 5248 */ 5249 @Child(name = "reason", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=true) 5250 @Description(shortDefinition="Indicates whether it was extracted or other reason", formalDefinition="Missing reason may be: E-extraction, O-other." ) 5251 protected Coding reason; 5252 5253 /** 5254 * The date of the extraction either known from records or patient reported estimate. 5255 */ 5256 @Child(name = "extractionDate", type = {DateType.class}, order=3, min=0, max=1, modifier=false, summary=true) 5257 @Description(shortDefinition="Date tooth was extracted if known", formalDefinition="The date of the extraction either known from records or patient reported estimate." ) 5258 protected DateType extractionDate; 5259 5260 private static final long serialVersionUID = 352913313L; 5261 5262 /** 5263 * Constructor 5264 */ 5265 public MissingTeethComponent() { 5266 super(); 5267 } 5268 5269 /** 5270 * Constructor 5271 */ 5272 public MissingTeethComponent(Coding tooth) { 5273 super(); 5274 this.tooth = tooth; 5275 } 5276 5277 /** 5278 * @return {@link #tooth} (The code identifying which tooth is missing.) 5279 */ 5280 public Coding getTooth() { 5281 if (this.tooth == null) 5282 if (Configuration.errorOnAutoCreate()) 5283 throw new Error("Attempt to auto-create MissingTeethComponent.tooth"); 5284 else if (Configuration.doAutoCreate()) 5285 this.tooth = new Coding(); // cc 5286 return this.tooth; 5287 } 5288 5289 public boolean hasTooth() { 5290 return this.tooth != null && !this.tooth.isEmpty(); 5291 } 5292 5293 /** 5294 * @param value {@link #tooth} (The code identifying which tooth is missing.) 5295 */ 5296 public MissingTeethComponent setTooth(Coding value) { 5297 this.tooth = value; 5298 return this; 5299 } 5300 5301 /** 5302 * @return {@link #reason} (Missing reason may be: E-extraction, O-other.) 5303 */ 5304 public Coding getReason() { 5305 if (this.reason == null) 5306 if (Configuration.errorOnAutoCreate()) 5307 throw new Error("Attempt to auto-create MissingTeethComponent.reason"); 5308 else if (Configuration.doAutoCreate()) 5309 this.reason = new Coding(); // cc 5310 return this.reason; 5311 } 5312 5313 public boolean hasReason() { 5314 return this.reason != null && !this.reason.isEmpty(); 5315 } 5316 5317 /** 5318 * @param value {@link #reason} (Missing reason may be: E-extraction, O-other.) 5319 */ 5320 public MissingTeethComponent setReason(Coding value) { 5321 this.reason = value; 5322 return this; 5323 } 5324 5325 /** 5326 * @return {@link #extractionDate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractionDate" gives direct access to the value 5327 */ 5328 public DateType getExtractionDateElement() { 5329 if (this.extractionDate == null) 5330 if (Configuration.errorOnAutoCreate()) 5331 throw new Error("Attempt to auto-create MissingTeethComponent.extractionDate"); 5332 else if (Configuration.doAutoCreate()) 5333 this.extractionDate = new DateType(); // bb 5334 return this.extractionDate; 5335 } 5336 5337 public boolean hasExtractionDateElement() { 5338 return this.extractionDate != null && !this.extractionDate.isEmpty(); 5339 } 5340 5341 public boolean hasExtractionDate() { 5342 return this.extractionDate != null && !this.extractionDate.isEmpty(); 5343 } 5344 5345 /** 5346 * @param value {@link #extractionDate} (The date of the extraction either known from records or patient reported estimate.). This is the underlying object with id, value and extensions. The accessor "getExtractionDate" gives direct access to the value 5347 */ 5348 public MissingTeethComponent setExtractionDateElement(DateType value) { 5349 this.extractionDate = value; 5350 return this; 5351 } 5352 5353 /** 5354 * @return The date of the extraction either known from records or patient reported estimate. 5355 */ 5356 public Date getExtractionDate() { 5357 return this.extractionDate == null ? null : this.extractionDate.getValue(); 5358 } 5359 5360 /** 5361 * @param value The date of the extraction either known from records or patient reported estimate. 5362 */ 5363 public MissingTeethComponent setExtractionDate(Date value) { 5364 if (value == null) 5365 this.extractionDate = null; 5366 else { 5367 if (this.extractionDate == null) 5368 this.extractionDate = new DateType(); 5369 this.extractionDate.setValue(value); 5370 } 5371 return this; 5372 } 5373 5374 protected void listChildren(List<Property> childrenList) { 5375 super.listChildren(childrenList); 5376 childrenList.add(new Property("tooth", "Coding", "The code identifying which tooth is missing.", 0, java.lang.Integer.MAX_VALUE, tooth)); 5377 childrenList.add(new Property("reason", "Coding", "Missing reason may be: E-extraction, O-other.", 0, java.lang.Integer.MAX_VALUE, reason)); 5378 childrenList.add(new Property("extractionDate", "date", "The date of the extraction either known from records or patient reported estimate.", 0, java.lang.Integer.MAX_VALUE, extractionDate)); 5379 } 5380 5381 @Override 5382 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5383 switch (hash) { 5384 case 110545608: /*tooth*/ return this.tooth == null ? new Base[0] : new Base[] {this.tooth}; // Coding 5385 case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // Coding 5386 case 580646965: /*extractionDate*/ return this.extractionDate == null ? new Base[0] : new Base[] {this.extractionDate}; // DateType 5387 default: return super.getProperty(hash, name, checkValid); 5388 } 5389 5390 } 5391 5392 @Override 5393 public void setProperty(int hash, String name, Base value) throws FHIRException { 5394 switch (hash) { 5395 case 110545608: // tooth 5396 this.tooth = castToCoding(value); // Coding 5397 break; 5398 case -934964668: // reason 5399 this.reason = castToCoding(value); // Coding 5400 break; 5401 case 580646965: // extractionDate 5402 this.extractionDate = castToDate(value); // DateType 5403 break; 5404 default: super.setProperty(hash, name, value); 5405 } 5406 5407 } 5408 5409 @Override 5410 public void setProperty(String name, Base value) throws FHIRException { 5411 if (name.equals("tooth")) 5412 this.tooth = castToCoding(value); // Coding 5413 else if (name.equals("reason")) 5414 this.reason = castToCoding(value); // Coding 5415 else if (name.equals("extractionDate")) 5416 this.extractionDate = castToDate(value); // DateType 5417 else 5418 super.setProperty(name, value); 5419 } 5420 5421 @Override 5422 public Base makeProperty(int hash, String name) throws FHIRException { 5423 switch (hash) { 5424 case 110545608: return getTooth(); // Coding 5425 case -934964668: return getReason(); // Coding 5426 case 580646965: throw new FHIRException("Cannot make property extractionDate as it is not a complex type"); // DateType 5427 default: return super.makeProperty(hash, name); 5428 } 5429 5430 } 5431 5432 @Override 5433 public Base addChild(String name) throws FHIRException { 5434 if (name.equals("tooth")) { 5435 this.tooth = new Coding(); 5436 return this.tooth; 5437 } 5438 else if (name.equals("reason")) { 5439 this.reason = new Coding(); 5440 return this.reason; 5441 } 5442 else if (name.equals("extractionDate")) { 5443 throw new FHIRException("Cannot call addChild on a primitive type Claim.extractionDate"); 5444 } 5445 else 5446 return super.addChild(name); 5447 } 5448 5449 public MissingTeethComponent copy() { 5450 MissingTeethComponent dst = new MissingTeethComponent(); 5451 copyValues(dst); 5452 dst.tooth = tooth == null ? null : tooth.copy(); 5453 dst.reason = reason == null ? null : reason.copy(); 5454 dst.extractionDate = extractionDate == null ? null : extractionDate.copy(); 5455 return dst; 5456 } 5457 5458 @Override 5459 public boolean equalsDeep(Base other) { 5460 if (!super.equalsDeep(other)) 5461 return false; 5462 if (!(other instanceof MissingTeethComponent)) 5463 return false; 5464 MissingTeethComponent o = (MissingTeethComponent) other; 5465 return compareDeep(tooth, o.tooth, true) && compareDeep(reason, o.reason, true) && compareDeep(extractionDate, o.extractionDate, true) 5466 ; 5467 } 5468 5469 @Override 5470 public boolean equalsShallow(Base other) { 5471 if (!super.equalsShallow(other)) 5472 return false; 5473 if (!(other instanceof MissingTeethComponent)) 5474 return false; 5475 MissingTeethComponent o = (MissingTeethComponent) other; 5476 return compareValues(extractionDate, o.extractionDate, true); 5477 } 5478 5479 public boolean isEmpty() { 5480 return super.isEmpty() && (tooth == null || tooth.isEmpty()) && (reason == null || reason.isEmpty()) 5481 && (extractionDate == null || extractionDate.isEmpty()); 5482 } 5483 5484 public String fhirType() { 5485 return "Claim.missingTeeth"; 5486 5487 } 5488 5489 } 5490 5491 /** 5492 * The category of claim. 5493 */ 5494 @Child(name = "type", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true) 5495 @Description(shortDefinition="institutional | oral | pharmacy | professional | vision", formalDefinition="The category of claim." ) 5496 protected Enumeration<ClaimType> type; 5497 5498 /** 5499 * A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType. 5500 */ 5501 @Child(name = "subType", type = {Coding.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5502 @Description(shortDefinition="Finer grained claim type information", formalDefinition="A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType." ) 5503 protected List<Coding> subType; 5504 5505 /** 5506 * The business identifier for the instance: claim number, pre-determination or pre-authorization number. 5507 */ 5508 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5509 @Description(shortDefinition="Claim number", formalDefinition="The business identifier for the instance: claim number, pre-determination or pre-authorization number." ) 5510 protected List<Identifier> identifier; 5511 5512 /** 5513 * The version of the specification on which this instance relies. 5514 */ 5515 @Child(name = "ruleset", type = {Coding.class}, order=3, min=0, max=1, modifier=false, summary=true) 5516 @Description(shortDefinition="Current specification followed", formalDefinition="The version of the specification on which this instance relies." ) 5517 protected Coding ruleset; 5518 5519 /** 5520 * The version of the specification from which the original instance was created. 5521 */ 5522 @Child(name = "originalRuleset", type = {Coding.class}, order=4, min=0, max=1, modifier=false, summary=true) 5523 @Description(shortDefinition="Original specification followed", formalDefinition="The version of the specification from which the original instance was created." ) 5524 protected Coding originalRuleset; 5525 5526 /** 5527 * The date when the enclosed suite of services were performed or completed. 5528 */ 5529 @Child(name = "created", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 5530 @Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." ) 5531 protected DateTimeType created; 5532 5533 /** 5534 * The billable period for which charges are being submitted. 5535 */ 5536 @Child(name = "billablePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true) 5537 @Description(shortDefinition="Period for charge submission", formalDefinition="The billable period for which charges are being submitted." ) 5538 protected Period billablePeriod; 5539 5540 /** 5541 * Insurer Identifier, typical BIN number (6 digit). 5542 */ 5543 @Child(name = "target", type = {Identifier.class, Organization.class}, order=7, min=0, max=1, modifier=false, summary=true) 5544 @Description(shortDefinition="Insurer", formalDefinition="Insurer Identifier, typical BIN number (6 digit)." ) 5545 protected Type target; 5546 5547 /** 5548 * The provider which is responsible for the bill, claim pre-determination, pre-authorization. 5549 */ 5550 @Child(name = "provider", type = {Identifier.class, Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) 5551 @Description(shortDefinition="Responsible provider", formalDefinition="The provider which is responsible for the bill, claim pre-determination, pre-authorization." ) 5552 protected Type provider; 5553 5554 /** 5555 * The organization which is responsible for the bill, claim pre-determination, pre-authorization. 5556 */ 5557 @Child(name = "organization", type = {Identifier.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=true) 5558 @Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the bill, claim pre-determination, pre-authorization." ) 5559 protected Type organization; 5560 5561 /** 5562 * Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). 5563 */ 5564 @Child(name = "use", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=true) 5565 @Description(shortDefinition="complete | proposed | exploratory | other", formalDefinition="Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination)." ) 5566 protected Enumeration<Use> use; 5567 5568 /** 5569 * Immediate (STAT), best effort (NORMAL), deferred (DEFER). 5570 */ 5571 @Child(name = "priority", type = {Coding.class}, order=11, min=0, max=1, modifier=false, summary=true) 5572 @Description(shortDefinition="Desired processing priority", formalDefinition="Immediate (STAT), best effort (NORMAL), deferred (DEFER)." ) 5573 protected Coding priority; 5574 5575 /** 5576 * In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested. 5577 */ 5578 @Child(name = "fundsReserve", type = {Coding.class}, order=12, min=0, max=1, modifier=false, summary=true) 5579 @Description(shortDefinition="Funds requested to be reserved", formalDefinition="In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested." ) 5580 protected Coding fundsReserve; 5581 5582 /** 5583 * Person who created the invoice/claim/pre-determination or pre-authorization. 5584 */ 5585 @Child(name = "enterer", type = {Identifier.class, Practitioner.class}, order=13, min=0, max=1, modifier=false, summary=true) 5586 @Description(shortDefinition="Author", formalDefinition="Person who created the invoice/claim/pre-determination or pre-authorization." ) 5587 protected Type enterer; 5588 5589 /** 5590 * Facility where the services were provided. 5591 */ 5592 @Child(name = "facility", type = {Identifier.class, Location.class}, order=14, min=0, max=1, modifier=false, summary=true) 5593 @Description(shortDefinition="Servicing Facility", formalDefinition="Facility where the services were provided." ) 5594 protected Type facility; 5595 5596 /** 5597 * Other claims which are related to this claim such as prior claim versions or for related services. 5598 */ 5599 @Child(name = "related", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5600 @Description(shortDefinition="Related Claims which may be revelant to processing this claimn", formalDefinition="Other claims which are related to this claim such as prior claim versions or for related services." ) 5601 protected List<RelatedClaimsComponent> related; 5602 5603 /** 5604 * Prescription to support the dispensing of Pharmacy or Vision products. 5605 */ 5606 @Child(name = "prescription", type = {Identifier.class, MedicationOrder.class, VisionPrescription.class}, order=16, min=0, max=1, modifier=false, summary=true) 5607 @Description(shortDefinition="Prescription", formalDefinition="Prescription to support the dispensing of Pharmacy or Vision products." ) 5608 protected Type prescription; 5609 5610 /** 5611 * Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products. 5612 */ 5613 @Child(name = "originalPrescription", type = {Identifier.class, MedicationOrder.class}, order=17, min=0, max=1, modifier=false, summary=true) 5614 @Description(shortDefinition="Original Prescription", formalDefinition="Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products." ) 5615 protected Type originalPrescription; 5616 5617 /** 5618 * The party to be reimbursed for the services. 5619 */ 5620 @Child(name = "payee", type = {}, order=18, min=0, max=1, modifier=false, summary=true) 5621 @Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="The party to be reimbursed for the services." ) 5622 protected PayeeComponent payee; 5623 5624 /** 5625 * The referral resource which lists the date, practitioner, reason and other supporting information. 5626 */ 5627 @Child(name = "referral", type = {Identifier.class, ReferralRequest.class}, order=19, min=0, max=1, modifier=false, summary=true) 5628 @Description(shortDefinition="Treatment Referral", formalDefinition="The referral resource which lists the date, practitioner, reason and other supporting information." ) 5629 protected Type referral; 5630 5631 /** 5632 * **Insert definition of Occurrence codes. 5633 */ 5634 @Child(name = "occurrenceCode", type = {Coding.class}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5635 @Description(shortDefinition="Occurrence Codes", formalDefinition="**Insert definition of Occurrence codes." ) 5636 protected List<Coding> occurrenceCode; 5637 5638 /** 5639 * **Insert definition of Occurrence Span codes. 5640 */ 5641 @Child(name = "occurenceSpanCode", type = {Coding.class}, order=21, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5642 @Description(shortDefinition="Occurrence Span Codes", formalDefinition="**Insert definition of Occurrence Span codes." ) 5643 protected List<Coding> occurenceSpanCode; 5644 5645 /** 5646 * **Insert definition of Value codes. 5647 */ 5648 @Child(name = "valueCode", type = {Coding.class}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5649 @Description(shortDefinition="Value Codes", formalDefinition="**Insert definition of Value codes." ) 5650 protected List<Coding> valueCode; 5651 5652 /** 5653 * Ordered list of patient diagnosis for which care is sought. 5654 */ 5655 @Child(name = "diagnosis", type = {}, order=23, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5656 @Description(shortDefinition="Diagnosis", formalDefinition="Ordered list of patient diagnosis for which care is sought." ) 5657 protected List<DiagnosisComponent> diagnosis; 5658 5659 /** 5660 * Ordered list of patient procedures performed to support the adjudication. 5661 */ 5662 @Child(name = "procedure", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5663 @Description(shortDefinition="Procedures performed", formalDefinition="Ordered list of patient procedures performed to support the adjudication." ) 5664 protected List<ProcedureComponent> procedure; 5665 5666 /** 5667 * List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication. 5668 */ 5669 @Child(name = "specialCondition", type = {Coding.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5670 @Description(shortDefinition="List of special Conditions", formalDefinition="List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication." ) 5671 protected List<Coding> specialCondition; 5672 5673 /** 5674 * Patient Resource. 5675 */ 5676 @Child(name = "patient", type = {Identifier.class, Patient.class}, order=26, min=1, max=1, modifier=false, summary=true) 5677 @Description(shortDefinition="The subject of the Products and Services", formalDefinition="Patient Resource." ) 5678 protected Type patient; 5679 5680 /** 5681 * Financial instrument by which payment information for health care. 5682 */ 5683 @Child(name = "coverage", type = {}, order=27, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5684 @Description(shortDefinition="Insurance or medical plan", formalDefinition="Financial instrument by which payment information for health care." ) 5685 protected List<CoverageComponent> coverage; 5686 5687 /** 5688 * Date of an accident which these services are addressing. 5689 */ 5690 @Child(name = "accidentDate", type = {DateType.class}, order=28, min=0, max=1, modifier=false, summary=true) 5691 @Description(shortDefinition="When the accident occurred", formalDefinition="Date of an accident which these services are addressing." ) 5692 protected DateType accidentDate; 5693 5694 /** 5695 * Type of accident: work, auto, etc. 5696 */ 5697 @Child(name = "accidentType", type = {Coding.class}, order=29, min=0, max=1, modifier=false, summary=true) 5698 @Description(shortDefinition="The nature of the accident", formalDefinition="Type of accident: work, auto, etc." ) 5699 protected Coding accidentType; 5700 5701 /** 5702 * Accident Place. 5703 */ 5704 @Child(name = "accidentLocation", type = {Address.class, Location.class}, order=30, min=0, max=1, modifier=false, summary=true) 5705 @Description(shortDefinition="Accident Place", formalDefinition="Accident Place." ) 5706 protected Type accidentLocation; 5707 5708 /** 5709 * A list of intervention and exception codes which may influence the adjudication of the claim. 5710 */ 5711 @Child(name = "interventionException", type = {Coding.class}, order=31, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5712 @Description(shortDefinition="Intervention and exception code (Pharma)", formalDefinition="A list of intervention and exception codes which may influence the adjudication of the claim." ) 5713 protected List<Coding> interventionException; 5714 5715 /** 5716 * Period, start and last dates of aspects of the Condition or related services. 5717 */ 5718 @Child(name = "onset", type = {}, order=32, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5719 @Description(shortDefinition="Condition related Onset related dates and codes", formalDefinition="Period, start and last dates of aspects of the Condition or related services." ) 5720 protected List<OnsetComponent> onset; 5721 5722 /** 5723 * The start and optional end dates of when the patient was precluded from working due to the treatable condition(s). 5724 */ 5725 @Child(name = "employmentImpacted", type = {Period.class}, order=33, min=0, max=1, modifier=false, summary=true) 5726 @Description(shortDefinition="Period unable to work", formalDefinition="The start and optional end dates of when the patient was precluded from working due to the treatable condition(s)." ) 5727 protected Period employmentImpacted; 5728 5729 /** 5730 * The start and optional end dates of when the patient was confined to a treatment center. 5731 */ 5732 @Child(name = "hospitalization", type = {Period.class}, order=34, min=0, max=1, modifier=false, summary=true) 5733 @Description(shortDefinition="Period in hospital", formalDefinition="The start and optional end dates of when the patient was confined to a treatment center." ) 5734 protected Period hospitalization; 5735 5736 /** 5737 * First tier of goods and services. 5738 */ 5739 @Child(name = "item", type = {}, order=35, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5740 @Description(shortDefinition="Goods and Services", formalDefinition="First tier of goods and services." ) 5741 protected List<ItemsComponent> item; 5742 5743 /** 5744 * The total value of the claim. 5745 */ 5746 @Child(name = "total", type = {Money.class}, order=36, min=0, max=1, modifier=false, summary=true) 5747 @Description(shortDefinition="Total claim cost", formalDefinition="The total value of the claim." ) 5748 protected Money total; 5749 5750 /** 5751 * Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission. 5752 */ 5753 @Child(name = "additionalMaterial", type = {Coding.class}, order=37, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5754 @Description(shortDefinition="Additional supporting materials and documents", formalDefinition="Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission." ) 5755 protected List<Coding> additionalMaterial; 5756 5757 /** 5758 * A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons. 5759 */ 5760 @Child(name = "missingTeeth", type = {}, order=38, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5761 @Description(shortDefinition="Only if type = oral", formalDefinition="A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons." ) 5762 protected List<MissingTeethComponent> missingTeeth; 5763 5764 private static final long serialVersionUID = 1478562254L; 5765 5766 /** 5767 * Constructor 5768 */ 5769 public Claim() { 5770 super(); 5771 } 5772 5773 /** 5774 * Constructor 5775 */ 5776 public Claim(Enumeration<ClaimType> type, Type patient) { 5777 super(); 5778 this.type = type; 5779 this.patient = patient; 5780 } 5781 5782 /** 5783 * @return {@link #type} (The category of claim.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 5784 */ 5785 public Enumeration<ClaimType> getTypeElement() { 5786 if (this.type == null) 5787 if (Configuration.errorOnAutoCreate()) 5788 throw new Error("Attempt to auto-create Claim.type"); 5789 else if (Configuration.doAutoCreate()) 5790 this.type = new Enumeration<ClaimType>(new ClaimTypeEnumFactory()); // bb 5791 return this.type; 5792 } 5793 5794 public boolean hasTypeElement() { 5795 return this.type != null && !this.type.isEmpty(); 5796 } 5797 5798 public boolean hasType() { 5799 return this.type != null && !this.type.isEmpty(); 5800 } 5801 5802 /** 5803 * @param value {@link #type} (The category of claim.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 5804 */ 5805 public Claim setTypeElement(Enumeration<ClaimType> value) { 5806 this.type = value; 5807 return this; 5808 } 5809 5810 /** 5811 * @return The category of claim. 5812 */ 5813 public ClaimType getType() { 5814 return this.type == null ? null : this.type.getValue(); 5815 } 5816 5817 /** 5818 * @param value The category of claim. 5819 */ 5820 public Claim setType(ClaimType value) { 5821 if (this.type == null) 5822 this.type = new Enumeration<ClaimType>(new ClaimTypeEnumFactory()); 5823 this.type.setValue(value); 5824 return this; 5825 } 5826 5827 /** 5828 * @return {@link #subType} (A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.) 5829 */ 5830 public List<Coding> getSubType() { 5831 if (this.subType == null) 5832 this.subType = new ArrayList<Coding>(); 5833 return this.subType; 5834 } 5835 5836 public boolean hasSubType() { 5837 if (this.subType == null) 5838 return false; 5839 for (Coding item : this.subType) 5840 if (!item.isEmpty()) 5841 return true; 5842 return false; 5843 } 5844 5845 /** 5846 * @return {@link #subType} (A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.) 5847 */ 5848 // syntactic sugar 5849 public Coding addSubType() { //3 5850 Coding t = new Coding(); 5851 if (this.subType == null) 5852 this.subType = new ArrayList<Coding>(); 5853 this.subType.add(t); 5854 return t; 5855 } 5856 5857 // syntactic sugar 5858 public Claim addSubType(Coding t) { //3 5859 if (t == null) 5860 return this; 5861 if (this.subType == null) 5862 this.subType = new ArrayList<Coding>(); 5863 this.subType.add(t); 5864 return this; 5865 } 5866 5867 /** 5868 * @return {@link #identifier} (The business identifier for the instance: claim number, pre-determination or pre-authorization number.) 5869 */ 5870 public List<Identifier> getIdentifier() { 5871 if (this.identifier == null) 5872 this.identifier = new ArrayList<Identifier>(); 5873 return this.identifier; 5874 } 5875 5876 public boolean hasIdentifier() { 5877 if (this.identifier == null) 5878 return false; 5879 for (Identifier item : this.identifier) 5880 if (!item.isEmpty()) 5881 return true; 5882 return false; 5883 } 5884 5885 /** 5886 * @return {@link #identifier} (The business identifier for the instance: claim number, pre-determination or pre-authorization number.) 5887 */ 5888 // syntactic sugar 5889 public Identifier addIdentifier() { //3 5890 Identifier t = new Identifier(); 5891 if (this.identifier == null) 5892 this.identifier = new ArrayList<Identifier>(); 5893 this.identifier.add(t); 5894 return t; 5895 } 5896 5897 // syntactic sugar 5898 public Claim addIdentifier(Identifier t) { //3 5899 if (t == null) 5900 return this; 5901 if (this.identifier == null) 5902 this.identifier = new ArrayList<Identifier>(); 5903 this.identifier.add(t); 5904 return this; 5905 } 5906 5907 /** 5908 * @return {@link #ruleset} (The version of the specification on which this instance relies.) 5909 */ 5910 public Coding getRuleset() { 5911 if (this.ruleset == null) 5912 if (Configuration.errorOnAutoCreate()) 5913 throw new Error("Attempt to auto-create Claim.ruleset"); 5914 else if (Configuration.doAutoCreate()) 5915 this.ruleset = new Coding(); // cc 5916 return this.ruleset; 5917 } 5918 5919 public boolean hasRuleset() { 5920 return this.ruleset != null && !this.ruleset.isEmpty(); 5921 } 5922 5923 /** 5924 * @param value {@link #ruleset} (The version of the specification on which this instance relies.) 5925 */ 5926 public Claim setRuleset(Coding value) { 5927 this.ruleset = value; 5928 return this; 5929 } 5930 5931 /** 5932 * @return {@link #originalRuleset} (The version of the specification from which the original instance was created.) 5933 */ 5934 public Coding getOriginalRuleset() { 5935 if (this.originalRuleset == null) 5936 if (Configuration.errorOnAutoCreate()) 5937 throw new Error("Attempt to auto-create Claim.originalRuleset"); 5938 else if (Configuration.doAutoCreate()) 5939 this.originalRuleset = new Coding(); // cc 5940 return this.originalRuleset; 5941 } 5942 5943 public boolean hasOriginalRuleset() { 5944 return this.originalRuleset != null && !this.originalRuleset.isEmpty(); 5945 } 5946 5947 /** 5948 * @param value {@link #originalRuleset} (The version of the specification from which the original instance was created.) 5949 */ 5950 public Claim setOriginalRuleset(Coding value) { 5951 this.originalRuleset = value; 5952 return this; 5953 } 5954 5955 /** 5956 * @return {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 5957 */ 5958 public DateTimeType getCreatedElement() { 5959 if (this.created == null) 5960 if (Configuration.errorOnAutoCreate()) 5961 throw new Error("Attempt to auto-create Claim.created"); 5962 else if (Configuration.doAutoCreate()) 5963 this.created = new DateTimeType(); // bb 5964 return this.created; 5965 } 5966 5967 public boolean hasCreatedElement() { 5968 return this.created != null && !this.created.isEmpty(); 5969 } 5970 5971 public boolean hasCreated() { 5972 return this.created != null && !this.created.isEmpty(); 5973 } 5974 5975 /** 5976 * @param value {@link #created} (The date when the enclosed suite of services were performed or completed.). This is the underlying object with id, value and extensions. The accessor "getCreated" gives direct access to the value 5977 */ 5978 public Claim setCreatedElement(DateTimeType value) { 5979 this.created = value; 5980 return this; 5981 } 5982 5983 /** 5984 * @return The date when the enclosed suite of services were performed or completed. 5985 */ 5986 public Date getCreated() { 5987 return this.created == null ? null : this.created.getValue(); 5988 } 5989 5990 /** 5991 * @param value The date when the enclosed suite of services were performed or completed. 5992 */ 5993 public Claim setCreated(Date value) { 5994 if (value == null) 5995 this.created = null; 5996 else { 5997 if (this.created == null) 5998 this.created = new DateTimeType(); 5999 this.created.setValue(value); 6000 } 6001 return this; 6002 } 6003 6004 /** 6005 * @return {@link #billablePeriod} (The billable period for which charges are being submitted.) 6006 */ 6007 public Period getBillablePeriod() { 6008 if (this.billablePeriod == null) 6009 if (Configuration.errorOnAutoCreate()) 6010 throw new Error("Attempt to auto-create Claim.billablePeriod"); 6011 else if (Configuration.doAutoCreate()) 6012 this.billablePeriod = new Period(); // cc 6013 return this.billablePeriod; 6014 } 6015 6016 public boolean hasBillablePeriod() { 6017 return this.billablePeriod != null && !this.billablePeriod.isEmpty(); 6018 } 6019 6020 /** 6021 * @param value {@link #billablePeriod} (The billable period for which charges are being submitted.) 6022 */ 6023 public Claim setBillablePeriod(Period value) { 6024 this.billablePeriod = value; 6025 return this; 6026 } 6027 6028 /** 6029 * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) 6030 */ 6031 public Type getTarget() { 6032 return this.target; 6033 } 6034 6035 /** 6036 * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) 6037 */ 6038 public Identifier getTargetIdentifier() throws FHIRException { 6039 if (!(this.target instanceof Identifier)) 6040 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.target.getClass().getName()+" was encountered"); 6041 return (Identifier) this.target; 6042 } 6043 6044 public boolean hasTargetIdentifier() { 6045 return this.target instanceof Identifier; 6046 } 6047 6048 /** 6049 * @return {@link #target} (Insurer Identifier, typical BIN number (6 digit).) 6050 */ 6051 public Reference getTargetReference() throws FHIRException { 6052 if (!(this.target instanceof Reference)) 6053 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.target.getClass().getName()+" was encountered"); 6054 return (Reference) this.target; 6055 } 6056 6057 public boolean hasTargetReference() { 6058 return this.target instanceof Reference; 6059 } 6060 6061 public boolean hasTarget() { 6062 return this.target != null && !this.target.isEmpty(); 6063 } 6064 6065 /** 6066 * @param value {@link #target} (Insurer Identifier, typical BIN number (6 digit).) 6067 */ 6068 public Claim setTarget(Type value) { 6069 this.target = value; 6070 return this; 6071 } 6072 6073 /** 6074 * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) 6075 */ 6076 public Type getProvider() { 6077 return this.provider; 6078 } 6079 6080 /** 6081 * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) 6082 */ 6083 public Identifier getProviderIdentifier() throws FHIRException { 6084 if (!(this.provider instanceof Identifier)) 6085 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.provider.getClass().getName()+" was encountered"); 6086 return (Identifier) this.provider; 6087 } 6088 6089 public boolean hasProviderIdentifier() { 6090 return this.provider instanceof Identifier; 6091 } 6092 6093 /** 6094 * @return {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) 6095 */ 6096 public Reference getProviderReference() throws FHIRException { 6097 if (!(this.provider instanceof Reference)) 6098 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.provider.getClass().getName()+" was encountered"); 6099 return (Reference) this.provider; 6100 } 6101 6102 public boolean hasProviderReference() { 6103 return this.provider instanceof Reference; 6104 } 6105 6106 public boolean hasProvider() { 6107 return this.provider != null && !this.provider.isEmpty(); 6108 } 6109 6110 /** 6111 * @param value {@link #provider} (The provider which is responsible for the bill, claim pre-determination, pre-authorization.) 6112 */ 6113 public Claim setProvider(Type value) { 6114 this.provider = value; 6115 return this; 6116 } 6117 6118 /** 6119 * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) 6120 */ 6121 public Type getOrganization() { 6122 return this.organization; 6123 } 6124 6125 /** 6126 * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) 6127 */ 6128 public Identifier getOrganizationIdentifier() throws FHIRException { 6129 if (!(this.organization instanceof Identifier)) 6130 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.organization.getClass().getName()+" was encountered"); 6131 return (Identifier) this.organization; 6132 } 6133 6134 public boolean hasOrganizationIdentifier() { 6135 return this.organization instanceof Identifier; 6136 } 6137 6138 /** 6139 * @return {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) 6140 */ 6141 public Reference getOrganizationReference() throws FHIRException { 6142 if (!(this.organization instanceof Reference)) 6143 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.organization.getClass().getName()+" was encountered"); 6144 return (Reference) this.organization; 6145 } 6146 6147 public boolean hasOrganizationReference() { 6148 return this.organization instanceof Reference; 6149 } 6150 6151 public boolean hasOrganization() { 6152 return this.organization != null && !this.organization.isEmpty(); 6153 } 6154 6155 /** 6156 * @param value {@link #organization} (The organization which is responsible for the bill, claim pre-determination, pre-authorization.) 6157 */ 6158 public Claim setOrganization(Type value) { 6159 this.organization = value; 6160 return this; 6161 } 6162 6163 /** 6164 * @return {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 6165 */ 6166 public Enumeration<Use> getUseElement() { 6167 if (this.use == null) 6168 if (Configuration.errorOnAutoCreate()) 6169 throw new Error("Attempt to auto-create Claim.use"); 6170 else if (Configuration.doAutoCreate()) 6171 this.use = new Enumeration<Use>(new UseEnumFactory()); // bb 6172 return this.use; 6173 } 6174 6175 public boolean hasUseElement() { 6176 return this.use != null && !this.use.isEmpty(); 6177 } 6178 6179 public boolean hasUse() { 6180 return this.use != null && !this.use.isEmpty(); 6181 } 6182 6183 /** 6184 * @param value {@link #use} (Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 6185 */ 6186 public Claim setUseElement(Enumeration<Use> value) { 6187 this.use = value; 6188 return this; 6189 } 6190 6191 /** 6192 * @return Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). 6193 */ 6194 public Use getUse() { 6195 return this.use == null ? null : this.use.getValue(); 6196 } 6197 6198 /** 6199 * @param value Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination). 6200 */ 6201 public Claim setUse(Use value) { 6202 if (value == null) 6203 this.use = null; 6204 else { 6205 if (this.use == null) 6206 this.use = new Enumeration<Use>(new UseEnumFactory()); 6207 this.use.setValue(value); 6208 } 6209 return this; 6210 } 6211 6212 /** 6213 * @return {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) 6214 */ 6215 public Coding getPriority() { 6216 if (this.priority == null) 6217 if (Configuration.errorOnAutoCreate()) 6218 throw new Error("Attempt to auto-create Claim.priority"); 6219 else if (Configuration.doAutoCreate()) 6220 this.priority = new Coding(); // cc 6221 return this.priority; 6222 } 6223 6224 public boolean hasPriority() { 6225 return this.priority != null && !this.priority.isEmpty(); 6226 } 6227 6228 /** 6229 * @param value {@link #priority} (Immediate (STAT), best effort (NORMAL), deferred (DEFER).) 6230 */ 6231 public Claim setPriority(Coding value) { 6232 this.priority = value; 6233 return this; 6234 } 6235 6236 /** 6237 * @return {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) 6238 */ 6239 public Coding getFundsReserve() { 6240 if (this.fundsReserve == null) 6241 if (Configuration.errorOnAutoCreate()) 6242 throw new Error("Attempt to auto-create Claim.fundsReserve"); 6243 else if (Configuration.doAutoCreate()) 6244 this.fundsReserve = new Coding(); // cc 6245 return this.fundsReserve; 6246 } 6247 6248 public boolean hasFundsReserve() { 6249 return this.fundsReserve != null && !this.fundsReserve.isEmpty(); 6250 } 6251 6252 /** 6253 * @param value {@link #fundsReserve} (In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.) 6254 */ 6255 public Claim setFundsReserve(Coding value) { 6256 this.fundsReserve = value; 6257 return this; 6258 } 6259 6260 /** 6261 * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) 6262 */ 6263 public Type getEnterer() { 6264 return this.enterer; 6265 } 6266 6267 /** 6268 * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) 6269 */ 6270 public Identifier getEntererIdentifier() throws FHIRException { 6271 if (!(this.enterer instanceof Identifier)) 6272 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.enterer.getClass().getName()+" was encountered"); 6273 return (Identifier) this.enterer; 6274 } 6275 6276 public boolean hasEntererIdentifier() { 6277 return this.enterer instanceof Identifier; 6278 } 6279 6280 /** 6281 * @return {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) 6282 */ 6283 public Reference getEntererReference() throws FHIRException { 6284 if (!(this.enterer instanceof Reference)) 6285 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.enterer.getClass().getName()+" was encountered"); 6286 return (Reference) this.enterer; 6287 } 6288 6289 public boolean hasEntererReference() { 6290 return this.enterer instanceof Reference; 6291 } 6292 6293 public boolean hasEnterer() { 6294 return this.enterer != null && !this.enterer.isEmpty(); 6295 } 6296 6297 /** 6298 * @param value {@link #enterer} (Person who created the invoice/claim/pre-determination or pre-authorization.) 6299 */ 6300 public Claim setEnterer(Type value) { 6301 this.enterer = value; 6302 return this; 6303 } 6304 6305 /** 6306 * @return {@link #facility} (Facility where the services were provided.) 6307 */ 6308 public Type getFacility() { 6309 return this.facility; 6310 } 6311 6312 /** 6313 * @return {@link #facility} (Facility where the services were provided.) 6314 */ 6315 public Identifier getFacilityIdentifier() throws FHIRException { 6316 if (!(this.facility instanceof Identifier)) 6317 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.facility.getClass().getName()+" was encountered"); 6318 return (Identifier) this.facility; 6319 } 6320 6321 public boolean hasFacilityIdentifier() { 6322 return this.facility instanceof Identifier; 6323 } 6324 6325 /** 6326 * @return {@link #facility} (Facility where the services were provided.) 6327 */ 6328 public Reference getFacilityReference() throws FHIRException { 6329 if (!(this.facility instanceof Reference)) 6330 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.facility.getClass().getName()+" was encountered"); 6331 return (Reference) this.facility; 6332 } 6333 6334 public boolean hasFacilityReference() { 6335 return this.facility instanceof Reference; 6336 } 6337 6338 public boolean hasFacility() { 6339 return this.facility != null && !this.facility.isEmpty(); 6340 } 6341 6342 /** 6343 * @param value {@link #facility} (Facility where the services were provided.) 6344 */ 6345 public Claim setFacility(Type value) { 6346 this.facility = value; 6347 return this; 6348 } 6349 6350 /** 6351 * @return {@link #related} (Other claims which are related to this claim such as prior claim versions or for related services.) 6352 */ 6353 public List<RelatedClaimsComponent> getRelated() { 6354 if (this.related == null) 6355 this.related = new ArrayList<RelatedClaimsComponent>(); 6356 return this.related; 6357 } 6358 6359 public boolean hasRelated() { 6360 if (this.related == null) 6361 return false; 6362 for (RelatedClaimsComponent item : this.related) 6363 if (!item.isEmpty()) 6364 return true; 6365 return false; 6366 } 6367 6368 /** 6369 * @return {@link #related} (Other claims which are related to this claim such as prior claim versions or for related services.) 6370 */ 6371 // syntactic sugar 6372 public RelatedClaimsComponent addRelated() { //3 6373 RelatedClaimsComponent t = new RelatedClaimsComponent(); 6374 if (this.related == null) 6375 this.related = new ArrayList<RelatedClaimsComponent>(); 6376 this.related.add(t); 6377 return t; 6378 } 6379 6380 // syntactic sugar 6381 public Claim addRelated(RelatedClaimsComponent t) { //3 6382 if (t == null) 6383 return this; 6384 if (this.related == null) 6385 this.related = new ArrayList<RelatedClaimsComponent>(); 6386 this.related.add(t); 6387 return this; 6388 } 6389 6390 /** 6391 * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) 6392 */ 6393 public Type getPrescription() { 6394 return this.prescription; 6395 } 6396 6397 /** 6398 * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) 6399 */ 6400 public Identifier getPrescriptionIdentifier() throws FHIRException { 6401 if (!(this.prescription instanceof Identifier)) 6402 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.prescription.getClass().getName()+" was encountered"); 6403 return (Identifier) this.prescription; 6404 } 6405 6406 public boolean hasPrescriptionIdentifier() { 6407 return this.prescription instanceof Identifier; 6408 } 6409 6410 /** 6411 * @return {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) 6412 */ 6413 public Reference getPrescriptionReference() throws FHIRException { 6414 if (!(this.prescription instanceof Reference)) 6415 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.prescription.getClass().getName()+" was encountered"); 6416 return (Reference) this.prescription; 6417 } 6418 6419 public boolean hasPrescriptionReference() { 6420 return this.prescription instanceof Reference; 6421 } 6422 6423 public boolean hasPrescription() { 6424 return this.prescription != null && !this.prescription.isEmpty(); 6425 } 6426 6427 /** 6428 * @param value {@link #prescription} (Prescription to support the dispensing of Pharmacy or Vision products.) 6429 */ 6430 public Claim setPrescription(Type value) { 6431 this.prescription = value; 6432 return this; 6433 } 6434 6435 /** 6436 * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) 6437 */ 6438 public Type getOriginalPrescription() { 6439 return this.originalPrescription; 6440 } 6441 6442 /** 6443 * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) 6444 */ 6445 public Identifier getOriginalPrescriptionIdentifier() throws FHIRException { 6446 if (!(this.originalPrescription instanceof Identifier)) 6447 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.originalPrescription.getClass().getName()+" was encountered"); 6448 return (Identifier) this.originalPrescription; 6449 } 6450 6451 public boolean hasOriginalPrescriptionIdentifier() { 6452 return this.originalPrescription instanceof Identifier; 6453 } 6454 6455 /** 6456 * @return {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) 6457 */ 6458 public Reference getOriginalPrescriptionReference() throws FHIRException { 6459 if (!(this.originalPrescription instanceof Reference)) 6460 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.originalPrescription.getClass().getName()+" was encountered"); 6461 return (Reference) this.originalPrescription; 6462 } 6463 6464 public boolean hasOriginalPrescriptionReference() { 6465 return this.originalPrescription instanceof Reference; 6466 } 6467 6468 public boolean hasOriginalPrescription() { 6469 return this.originalPrescription != null && !this.originalPrescription.isEmpty(); 6470 } 6471 6472 /** 6473 * @param value {@link #originalPrescription} (Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.) 6474 */ 6475 public Claim setOriginalPrescription(Type value) { 6476 this.originalPrescription = value; 6477 return this; 6478 } 6479 6480 /** 6481 * @return {@link #payee} (The party to be reimbursed for the services.) 6482 */ 6483 public PayeeComponent getPayee() { 6484 if (this.payee == null) 6485 if (Configuration.errorOnAutoCreate()) 6486 throw new Error("Attempt to auto-create Claim.payee"); 6487 else if (Configuration.doAutoCreate()) 6488 this.payee = new PayeeComponent(); // cc 6489 return this.payee; 6490 } 6491 6492 public boolean hasPayee() { 6493 return this.payee != null && !this.payee.isEmpty(); 6494 } 6495 6496 /** 6497 * @param value {@link #payee} (The party to be reimbursed for the services.) 6498 */ 6499 public Claim setPayee(PayeeComponent value) { 6500 this.payee = value; 6501 return this; 6502 } 6503 6504 /** 6505 * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) 6506 */ 6507 public Type getReferral() { 6508 return this.referral; 6509 } 6510 6511 /** 6512 * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) 6513 */ 6514 public Identifier getReferralIdentifier() throws FHIRException { 6515 if (!(this.referral instanceof Identifier)) 6516 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.referral.getClass().getName()+" was encountered"); 6517 return (Identifier) this.referral; 6518 } 6519 6520 public boolean hasReferralIdentifier() { 6521 return this.referral instanceof Identifier; 6522 } 6523 6524 /** 6525 * @return {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) 6526 */ 6527 public Reference getReferralReference() throws FHIRException { 6528 if (!(this.referral instanceof Reference)) 6529 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.referral.getClass().getName()+" was encountered"); 6530 return (Reference) this.referral; 6531 } 6532 6533 public boolean hasReferralReference() { 6534 return this.referral instanceof Reference; 6535 } 6536 6537 public boolean hasReferral() { 6538 return this.referral != null && !this.referral.isEmpty(); 6539 } 6540 6541 /** 6542 * @param value {@link #referral} (The referral resource which lists the date, practitioner, reason and other supporting information.) 6543 */ 6544 public Claim setReferral(Type value) { 6545 this.referral = value; 6546 return this; 6547 } 6548 6549 /** 6550 * @return {@link #occurrenceCode} (**Insert definition of Occurrence codes.) 6551 */ 6552 public List<Coding> getOccurrenceCode() { 6553 if (this.occurrenceCode == null) 6554 this.occurrenceCode = new ArrayList<Coding>(); 6555 return this.occurrenceCode; 6556 } 6557 6558 public boolean hasOccurrenceCode() { 6559 if (this.occurrenceCode == null) 6560 return false; 6561 for (Coding item : this.occurrenceCode) 6562 if (!item.isEmpty()) 6563 return true; 6564 return false; 6565 } 6566 6567 /** 6568 * @return {@link #occurrenceCode} (**Insert definition of Occurrence codes.) 6569 */ 6570 // syntactic sugar 6571 public Coding addOccurrenceCode() { //3 6572 Coding t = new Coding(); 6573 if (this.occurrenceCode == null) 6574 this.occurrenceCode = new ArrayList<Coding>(); 6575 this.occurrenceCode.add(t); 6576 return t; 6577 } 6578 6579 // syntactic sugar 6580 public Claim addOccurrenceCode(Coding t) { //3 6581 if (t == null) 6582 return this; 6583 if (this.occurrenceCode == null) 6584 this.occurrenceCode = new ArrayList<Coding>(); 6585 this.occurrenceCode.add(t); 6586 return this; 6587 } 6588 6589 /** 6590 * @return {@link #occurenceSpanCode} (**Insert definition of Occurrence Span codes.) 6591 */ 6592 public List<Coding> getOccurenceSpanCode() { 6593 if (this.occurenceSpanCode == null) 6594 this.occurenceSpanCode = new ArrayList<Coding>(); 6595 return this.occurenceSpanCode; 6596 } 6597 6598 public boolean hasOccurenceSpanCode() { 6599 if (this.occurenceSpanCode == null) 6600 return false; 6601 for (Coding item : this.occurenceSpanCode) 6602 if (!item.isEmpty()) 6603 return true; 6604 return false; 6605 } 6606 6607 /** 6608 * @return {@link #occurenceSpanCode} (**Insert definition of Occurrence Span codes.) 6609 */ 6610 // syntactic sugar 6611 public Coding addOccurenceSpanCode() { //3 6612 Coding t = new Coding(); 6613 if (this.occurenceSpanCode == null) 6614 this.occurenceSpanCode = new ArrayList<Coding>(); 6615 this.occurenceSpanCode.add(t); 6616 return t; 6617 } 6618 6619 // syntactic sugar 6620 public Claim addOccurenceSpanCode(Coding t) { //3 6621 if (t == null) 6622 return this; 6623 if (this.occurenceSpanCode == null) 6624 this.occurenceSpanCode = new ArrayList<Coding>(); 6625 this.occurenceSpanCode.add(t); 6626 return this; 6627 } 6628 6629 /** 6630 * @return {@link #valueCode} (**Insert definition of Value codes.) 6631 */ 6632 public List<Coding> getValueCode() { 6633 if (this.valueCode == null) 6634 this.valueCode = new ArrayList<Coding>(); 6635 return this.valueCode; 6636 } 6637 6638 public boolean hasValueCode() { 6639 if (this.valueCode == null) 6640 return false; 6641 for (Coding item : this.valueCode) 6642 if (!item.isEmpty()) 6643 return true; 6644 return false; 6645 } 6646 6647 /** 6648 * @return {@link #valueCode} (**Insert definition of Value codes.) 6649 */ 6650 // syntactic sugar 6651 public Coding addValueCode() { //3 6652 Coding t = new Coding(); 6653 if (this.valueCode == null) 6654 this.valueCode = new ArrayList<Coding>(); 6655 this.valueCode.add(t); 6656 return t; 6657 } 6658 6659 // syntactic sugar 6660 public Claim addValueCode(Coding t) { //3 6661 if (t == null) 6662 return this; 6663 if (this.valueCode == null) 6664 this.valueCode = new ArrayList<Coding>(); 6665 this.valueCode.add(t); 6666 return this; 6667 } 6668 6669 /** 6670 * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) 6671 */ 6672 public List<DiagnosisComponent> getDiagnosis() { 6673 if (this.diagnosis == null) 6674 this.diagnosis = new ArrayList<DiagnosisComponent>(); 6675 return this.diagnosis; 6676 } 6677 6678 public boolean hasDiagnosis() { 6679 if (this.diagnosis == null) 6680 return false; 6681 for (DiagnosisComponent item : this.diagnosis) 6682 if (!item.isEmpty()) 6683 return true; 6684 return false; 6685 } 6686 6687 /** 6688 * @return {@link #diagnosis} (Ordered list of patient diagnosis for which care is sought.) 6689 */ 6690 // syntactic sugar 6691 public DiagnosisComponent addDiagnosis() { //3 6692 DiagnosisComponent t = new DiagnosisComponent(); 6693 if (this.diagnosis == null) 6694 this.diagnosis = new ArrayList<DiagnosisComponent>(); 6695 this.diagnosis.add(t); 6696 return t; 6697 } 6698 6699 // syntactic sugar 6700 public Claim addDiagnosis(DiagnosisComponent t) { //3 6701 if (t == null) 6702 return this; 6703 if (this.diagnosis == null) 6704 this.diagnosis = new ArrayList<DiagnosisComponent>(); 6705 this.diagnosis.add(t); 6706 return this; 6707 } 6708 6709 /** 6710 * @return {@link #procedure} (Ordered list of patient procedures performed to support the adjudication.) 6711 */ 6712 public List<ProcedureComponent> getProcedure() { 6713 if (this.procedure == null) 6714 this.procedure = new ArrayList<ProcedureComponent>(); 6715 return this.procedure; 6716 } 6717 6718 public boolean hasProcedure() { 6719 if (this.procedure == null) 6720 return false; 6721 for (ProcedureComponent item : this.procedure) 6722 if (!item.isEmpty()) 6723 return true; 6724 return false; 6725 } 6726 6727 /** 6728 * @return {@link #procedure} (Ordered list of patient procedures performed to support the adjudication.) 6729 */ 6730 // syntactic sugar 6731 public ProcedureComponent addProcedure() { //3 6732 ProcedureComponent t = new ProcedureComponent(); 6733 if (this.procedure == null) 6734 this.procedure = new ArrayList<ProcedureComponent>(); 6735 this.procedure.add(t); 6736 return t; 6737 } 6738 6739 // syntactic sugar 6740 public Claim addProcedure(ProcedureComponent t) { //3 6741 if (t == null) 6742 return this; 6743 if (this.procedure == null) 6744 this.procedure = new ArrayList<ProcedureComponent>(); 6745 this.procedure.add(t); 6746 return this; 6747 } 6748 6749 /** 6750 * @return {@link #specialCondition} (List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.) 6751 */ 6752 public List<Coding> getSpecialCondition() { 6753 if (this.specialCondition == null) 6754 this.specialCondition = new ArrayList<Coding>(); 6755 return this.specialCondition; 6756 } 6757 6758 public boolean hasSpecialCondition() { 6759 if (this.specialCondition == null) 6760 return false; 6761 for (Coding item : this.specialCondition) 6762 if (!item.isEmpty()) 6763 return true; 6764 return false; 6765 } 6766 6767 /** 6768 * @return {@link #specialCondition} (List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.) 6769 */ 6770 // syntactic sugar 6771 public Coding addSpecialCondition() { //3 6772 Coding t = new Coding(); 6773 if (this.specialCondition == null) 6774 this.specialCondition = new ArrayList<Coding>(); 6775 this.specialCondition.add(t); 6776 return t; 6777 } 6778 6779 // syntactic sugar 6780 public Claim addSpecialCondition(Coding t) { //3 6781 if (t == null) 6782 return this; 6783 if (this.specialCondition == null) 6784 this.specialCondition = new ArrayList<Coding>(); 6785 this.specialCondition.add(t); 6786 return this; 6787 } 6788 6789 /** 6790 * @return {@link #patient} (Patient Resource.) 6791 */ 6792 public Type getPatient() { 6793 return this.patient; 6794 } 6795 6796 /** 6797 * @return {@link #patient} (Patient Resource.) 6798 */ 6799 public Identifier getPatientIdentifier() throws FHIRException { 6800 if (!(this.patient instanceof Identifier)) 6801 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.patient.getClass().getName()+" was encountered"); 6802 return (Identifier) this.patient; 6803 } 6804 6805 public boolean hasPatientIdentifier() { 6806 return this.patient instanceof Identifier; 6807 } 6808 6809 /** 6810 * @return {@link #patient} (Patient Resource.) 6811 */ 6812 public Reference getPatientReference() throws FHIRException { 6813 if (!(this.patient instanceof Reference)) 6814 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.patient.getClass().getName()+" was encountered"); 6815 return (Reference) this.patient; 6816 } 6817 6818 public boolean hasPatientReference() { 6819 return this.patient instanceof Reference; 6820 } 6821 6822 public boolean hasPatient() { 6823 return this.patient != null && !this.patient.isEmpty(); 6824 } 6825 6826 /** 6827 * @param value {@link #patient} (Patient Resource.) 6828 */ 6829 public Claim setPatient(Type value) { 6830 this.patient = value; 6831 return this; 6832 } 6833 6834 /** 6835 * @return {@link #coverage} (Financial instrument by which payment information for health care.) 6836 */ 6837 public List<CoverageComponent> getCoverage() { 6838 if (this.coverage == null) 6839 this.coverage = new ArrayList<CoverageComponent>(); 6840 return this.coverage; 6841 } 6842 6843 public boolean hasCoverage() { 6844 if (this.coverage == null) 6845 return false; 6846 for (CoverageComponent item : this.coverage) 6847 if (!item.isEmpty()) 6848 return true; 6849 return false; 6850 } 6851 6852 /** 6853 * @return {@link #coverage} (Financial instrument by which payment information for health care.) 6854 */ 6855 // syntactic sugar 6856 public CoverageComponent addCoverage() { //3 6857 CoverageComponent t = new CoverageComponent(); 6858 if (this.coverage == null) 6859 this.coverage = new ArrayList<CoverageComponent>(); 6860 this.coverage.add(t); 6861 return t; 6862 } 6863 6864 // syntactic sugar 6865 public Claim addCoverage(CoverageComponent t) { //3 6866 if (t == null) 6867 return this; 6868 if (this.coverage == null) 6869 this.coverage = new ArrayList<CoverageComponent>(); 6870 this.coverage.add(t); 6871 return this; 6872 } 6873 6874 /** 6875 * @return {@link #accidentDate} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccidentDate" gives direct access to the value 6876 */ 6877 public DateType getAccidentDateElement() { 6878 if (this.accidentDate == null) 6879 if (Configuration.errorOnAutoCreate()) 6880 throw new Error("Attempt to auto-create Claim.accidentDate"); 6881 else if (Configuration.doAutoCreate()) 6882 this.accidentDate = new DateType(); // bb 6883 return this.accidentDate; 6884 } 6885 6886 public boolean hasAccidentDateElement() { 6887 return this.accidentDate != null && !this.accidentDate.isEmpty(); 6888 } 6889 6890 public boolean hasAccidentDate() { 6891 return this.accidentDate != null && !this.accidentDate.isEmpty(); 6892 } 6893 6894 /** 6895 * @param value {@link #accidentDate} (Date of an accident which these services are addressing.). This is the underlying object with id, value and extensions. The accessor "getAccidentDate" gives direct access to the value 6896 */ 6897 public Claim setAccidentDateElement(DateType value) { 6898 this.accidentDate = value; 6899 return this; 6900 } 6901 6902 /** 6903 * @return Date of an accident which these services are addressing. 6904 */ 6905 public Date getAccidentDate() { 6906 return this.accidentDate == null ? null : this.accidentDate.getValue(); 6907 } 6908 6909 /** 6910 * @param value Date of an accident which these services are addressing. 6911 */ 6912 public Claim setAccidentDate(Date value) { 6913 if (value == null) 6914 this.accidentDate = null; 6915 else { 6916 if (this.accidentDate == null) 6917 this.accidentDate = new DateType(); 6918 this.accidentDate.setValue(value); 6919 } 6920 return this; 6921 } 6922 6923 /** 6924 * @return {@link #accidentType} (Type of accident: work, auto, etc.) 6925 */ 6926 public Coding getAccidentType() { 6927 if (this.accidentType == null) 6928 if (Configuration.errorOnAutoCreate()) 6929 throw new Error("Attempt to auto-create Claim.accidentType"); 6930 else if (Configuration.doAutoCreate()) 6931 this.accidentType = new Coding(); // cc 6932 return this.accidentType; 6933 } 6934 6935 public boolean hasAccidentType() { 6936 return this.accidentType != null && !this.accidentType.isEmpty(); 6937 } 6938 6939 /** 6940 * @param value {@link #accidentType} (Type of accident: work, auto, etc.) 6941 */ 6942 public Claim setAccidentType(Coding value) { 6943 this.accidentType = value; 6944 return this; 6945 } 6946 6947 /** 6948 * @return {@link #accidentLocation} (Accident Place.) 6949 */ 6950 public Type getAccidentLocation() { 6951 return this.accidentLocation; 6952 } 6953 6954 /** 6955 * @return {@link #accidentLocation} (Accident Place.) 6956 */ 6957 public Address getAccidentLocationAddress() throws FHIRException { 6958 if (!(this.accidentLocation instanceof Address)) 6959 throw new FHIRException("Type mismatch: the type Address was expected, but "+this.accidentLocation.getClass().getName()+" was encountered"); 6960 return (Address) this.accidentLocation; 6961 } 6962 6963 public boolean hasAccidentLocationAddress() { 6964 return this.accidentLocation instanceof Address; 6965 } 6966 6967 /** 6968 * @return {@link #accidentLocation} (Accident Place.) 6969 */ 6970 public Reference getAccidentLocationReference() throws FHIRException { 6971 if (!(this.accidentLocation instanceof Reference)) 6972 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.accidentLocation.getClass().getName()+" was encountered"); 6973 return (Reference) this.accidentLocation; 6974 } 6975 6976 public boolean hasAccidentLocationReference() { 6977 return this.accidentLocation instanceof Reference; 6978 } 6979 6980 public boolean hasAccidentLocation() { 6981 return this.accidentLocation != null && !this.accidentLocation.isEmpty(); 6982 } 6983 6984 /** 6985 * @param value {@link #accidentLocation} (Accident Place.) 6986 */ 6987 public Claim setAccidentLocation(Type value) { 6988 this.accidentLocation = value; 6989 return this; 6990 } 6991 6992 /** 6993 * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) 6994 */ 6995 public List<Coding> getInterventionException() { 6996 if (this.interventionException == null) 6997 this.interventionException = new ArrayList<Coding>(); 6998 return this.interventionException; 6999 } 7000 7001 public boolean hasInterventionException() { 7002 if (this.interventionException == null) 7003 return false; 7004 for (Coding item : this.interventionException) 7005 if (!item.isEmpty()) 7006 return true; 7007 return false; 7008 } 7009 7010 /** 7011 * @return {@link #interventionException} (A list of intervention and exception codes which may influence the adjudication of the claim.) 7012 */ 7013 // syntactic sugar 7014 public Coding addInterventionException() { //3 7015 Coding t = new Coding(); 7016 if (this.interventionException == null) 7017 this.interventionException = new ArrayList<Coding>(); 7018 this.interventionException.add(t); 7019 return t; 7020 } 7021 7022 // syntactic sugar 7023 public Claim addInterventionException(Coding t) { //3 7024 if (t == null) 7025 return this; 7026 if (this.interventionException == null) 7027 this.interventionException = new ArrayList<Coding>(); 7028 this.interventionException.add(t); 7029 return this; 7030 } 7031 7032 /** 7033 * @return {@link #onset} (Period, start and last dates of aspects of the Condition or related services.) 7034 */ 7035 public List<OnsetComponent> getOnset() { 7036 if (this.onset == null) 7037 this.onset = new ArrayList<OnsetComponent>(); 7038 return this.onset; 7039 } 7040 7041 public boolean hasOnset() { 7042 if (this.onset == null) 7043 return false; 7044 for (OnsetComponent item : this.onset) 7045 if (!item.isEmpty()) 7046 return true; 7047 return false; 7048 } 7049 7050 /** 7051 * @return {@link #onset} (Period, start and last dates of aspects of the Condition or related services.) 7052 */ 7053 // syntactic sugar 7054 public OnsetComponent addOnset() { //3 7055 OnsetComponent t = new OnsetComponent(); 7056 if (this.onset == null) 7057 this.onset = new ArrayList<OnsetComponent>(); 7058 this.onset.add(t); 7059 return t; 7060 } 7061 7062 // syntactic sugar 7063 public Claim addOnset(OnsetComponent t) { //3 7064 if (t == null) 7065 return this; 7066 if (this.onset == null) 7067 this.onset = new ArrayList<OnsetComponent>(); 7068 this.onset.add(t); 7069 return this; 7070 } 7071 7072 /** 7073 * @return {@link #employmentImpacted} (The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).) 7074 */ 7075 public Period getEmploymentImpacted() { 7076 if (this.employmentImpacted == null) 7077 if (Configuration.errorOnAutoCreate()) 7078 throw new Error("Attempt to auto-create Claim.employmentImpacted"); 7079 else if (Configuration.doAutoCreate()) 7080 this.employmentImpacted = new Period(); // cc 7081 return this.employmentImpacted; 7082 } 7083 7084 public boolean hasEmploymentImpacted() { 7085 return this.employmentImpacted != null && !this.employmentImpacted.isEmpty(); 7086 } 7087 7088 /** 7089 * @param value {@link #employmentImpacted} (The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).) 7090 */ 7091 public Claim setEmploymentImpacted(Period value) { 7092 this.employmentImpacted = value; 7093 return this; 7094 } 7095 7096 /** 7097 * @return {@link #hospitalization} (The start and optional end dates of when the patient was confined to a treatment center.) 7098 */ 7099 public Period getHospitalization() { 7100 if (this.hospitalization == null) 7101 if (Configuration.errorOnAutoCreate()) 7102 throw new Error("Attempt to auto-create Claim.hospitalization"); 7103 else if (Configuration.doAutoCreate()) 7104 this.hospitalization = new Period(); // cc 7105 return this.hospitalization; 7106 } 7107 7108 public boolean hasHospitalization() { 7109 return this.hospitalization != null && !this.hospitalization.isEmpty(); 7110 } 7111 7112 /** 7113 * @param value {@link #hospitalization} (The start and optional end dates of when the patient was confined to a treatment center.) 7114 */ 7115 public Claim setHospitalization(Period value) { 7116 this.hospitalization = value; 7117 return this; 7118 } 7119 7120 /** 7121 * @return {@link #item} (First tier of goods and services.) 7122 */ 7123 public List<ItemsComponent> getItem() { 7124 if (this.item == null) 7125 this.item = new ArrayList<ItemsComponent>(); 7126 return this.item; 7127 } 7128 7129 public boolean hasItem() { 7130 if (this.item == null) 7131 return false; 7132 for (ItemsComponent item : this.item) 7133 if (!item.isEmpty()) 7134 return true; 7135 return false; 7136 } 7137 7138 /** 7139 * @return {@link #item} (First tier of goods and services.) 7140 */ 7141 // syntactic sugar 7142 public ItemsComponent addItem() { //3 7143 ItemsComponent t = new ItemsComponent(); 7144 if (this.item == null) 7145 this.item = new ArrayList<ItemsComponent>(); 7146 this.item.add(t); 7147 return t; 7148 } 7149 7150 // syntactic sugar 7151 public Claim addItem(ItemsComponent t) { //3 7152 if (t == null) 7153 return this; 7154 if (this.item == null) 7155 this.item = new ArrayList<ItemsComponent>(); 7156 this.item.add(t); 7157 return this; 7158 } 7159 7160 /** 7161 * @return {@link #total} (The total value of the claim.) 7162 */ 7163 public Money getTotal() { 7164 if (this.total == null) 7165 if (Configuration.errorOnAutoCreate()) 7166 throw new Error("Attempt to auto-create Claim.total"); 7167 else if (Configuration.doAutoCreate()) 7168 this.total = new Money(); // cc 7169 return this.total; 7170 } 7171 7172 public boolean hasTotal() { 7173 return this.total != null && !this.total.isEmpty(); 7174 } 7175 7176 /** 7177 * @param value {@link #total} (The total value of the claim.) 7178 */ 7179 public Claim setTotal(Money value) { 7180 this.total = value; 7181 return this; 7182 } 7183 7184 /** 7185 * @return {@link #additionalMaterial} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) 7186 */ 7187 public List<Coding> getAdditionalMaterial() { 7188 if (this.additionalMaterial == null) 7189 this.additionalMaterial = new ArrayList<Coding>(); 7190 return this.additionalMaterial; 7191 } 7192 7193 public boolean hasAdditionalMaterial() { 7194 if (this.additionalMaterial == null) 7195 return false; 7196 for (Coding item : this.additionalMaterial) 7197 if (!item.isEmpty()) 7198 return true; 7199 return false; 7200 } 7201 7202 /** 7203 * @return {@link #additionalMaterial} (Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.) 7204 */ 7205 // syntactic sugar 7206 public Coding addAdditionalMaterial() { //3 7207 Coding t = new Coding(); 7208 if (this.additionalMaterial == null) 7209 this.additionalMaterial = new ArrayList<Coding>(); 7210 this.additionalMaterial.add(t); 7211 return t; 7212 } 7213 7214 // syntactic sugar 7215 public Claim addAdditionalMaterial(Coding t) { //3 7216 if (t == null) 7217 return this; 7218 if (this.additionalMaterial == null) 7219 this.additionalMaterial = new ArrayList<Coding>(); 7220 this.additionalMaterial.add(t); 7221 return this; 7222 } 7223 7224 /** 7225 * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) 7226 */ 7227 public List<MissingTeethComponent> getMissingTeeth() { 7228 if (this.missingTeeth == null) 7229 this.missingTeeth = new ArrayList<MissingTeethComponent>(); 7230 return this.missingTeeth; 7231 } 7232 7233 public boolean hasMissingTeeth() { 7234 if (this.missingTeeth == null) 7235 return false; 7236 for (MissingTeethComponent item : this.missingTeeth) 7237 if (!item.isEmpty()) 7238 return true; 7239 return false; 7240 } 7241 7242 /** 7243 * @return {@link #missingTeeth} (A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.) 7244 */ 7245 // syntactic sugar 7246 public MissingTeethComponent addMissingTeeth() { //3 7247 MissingTeethComponent t = new MissingTeethComponent(); 7248 if (this.missingTeeth == null) 7249 this.missingTeeth = new ArrayList<MissingTeethComponent>(); 7250 this.missingTeeth.add(t); 7251 return t; 7252 } 7253 7254 // syntactic sugar 7255 public Claim addMissingTeeth(MissingTeethComponent t) { //3 7256 if (t == null) 7257 return this; 7258 if (this.missingTeeth == null) 7259 this.missingTeeth = new ArrayList<MissingTeethComponent>(); 7260 this.missingTeeth.add(t); 7261 return this; 7262 } 7263 7264 protected void listChildren(List<Property> childrenList) { 7265 super.listChildren(childrenList); 7266 childrenList.add(new Property("type", "code", "The category of claim.", 0, java.lang.Integer.MAX_VALUE, type)); 7267 childrenList.add(new Property("subType", "Coding", "A finer grained suite of claim subtype codes which may convey Inpatient vs Outpatient and/or a specialty service. In the US the BillType.", 0, java.lang.Integer.MAX_VALUE, subType)); 7268 childrenList.add(new Property("identifier", "Identifier", "The business identifier for the instance: claim number, pre-determination or pre-authorization number.", 0, java.lang.Integer.MAX_VALUE, identifier)); 7269 childrenList.add(new Property("ruleset", "Coding", "The version of the specification on which this instance relies.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 7270 childrenList.add(new Property("originalRuleset", "Coding", "The version of the specification from which the original instance was created.", 0, java.lang.Integer.MAX_VALUE, originalRuleset)); 7271 childrenList.add(new Property("created", "dateTime", "The date when the enclosed suite of services were performed or completed.", 0, java.lang.Integer.MAX_VALUE, created)); 7272 childrenList.add(new Property("billablePeriod", "Period", "The billable period for which charges are being submitted.", 0, java.lang.Integer.MAX_VALUE, billablePeriod)); 7273 childrenList.add(new Property("target[x]", "Identifier|Reference(Organization)", "Insurer Identifier, typical BIN number (6 digit).", 0, java.lang.Integer.MAX_VALUE, target)); 7274 childrenList.add(new Property("provider[x]", "Identifier|Reference(Practitioner)", "The provider which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, provider)); 7275 childrenList.add(new Property("organization[x]", "Identifier|Reference(Organization)", "The organization which is responsible for the bill, claim pre-determination, pre-authorization.", 0, java.lang.Integer.MAX_VALUE, organization)); 7276 childrenList.add(new Property("use", "code", "Complete (Bill or Claim), Proposed (Pre-Authorization), Exploratory (Pre-determination).", 0, java.lang.Integer.MAX_VALUE, use)); 7277 childrenList.add(new Property("priority", "Coding", "Immediate (STAT), best effort (NORMAL), deferred (DEFER).", 0, java.lang.Integer.MAX_VALUE, priority)); 7278 childrenList.add(new Property("fundsReserve", "Coding", "In the case of a Pre-Determination/Pre-Authorization the provider may request that funds in the amount of the expected Benefit be reserved ('Patient' or 'Provider') to pay for the Benefits determined on the subsequent claim(s). 'None' explicitly indicates no funds reserving is requested.", 0, java.lang.Integer.MAX_VALUE, fundsReserve)); 7279 childrenList.add(new Property("enterer[x]", "Identifier|Reference(Practitioner)", "Person who created the invoice/claim/pre-determination or pre-authorization.", 0, java.lang.Integer.MAX_VALUE, enterer)); 7280 childrenList.add(new Property("facility[x]", "Identifier|Reference(Location)", "Facility where the services were provided.", 0, java.lang.Integer.MAX_VALUE, facility)); 7281 childrenList.add(new Property("related", "", "Other claims which are related to this claim such as prior claim versions or for related services.", 0, java.lang.Integer.MAX_VALUE, related)); 7282 childrenList.add(new Property("prescription[x]", "Identifier|Reference(MedicationOrder|VisionPrescription)", "Prescription to support the dispensing of Pharmacy or Vision products.", 0, java.lang.Integer.MAX_VALUE, prescription)); 7283 childrenList.add(new Property("originalPrescription[x]", "Identifier|Reference(MedicationOrder)", "Original prescription which has been superceded by this prescription to support the dispensing of pharmacy services, medications or products.", 0, java.lang.Integer.MAX_VALUE, originalPrescription)); 7284 childrenList.add(new Property("payee", "", "The party to be reimbursed for the services.", 0, java.lang.Integer.MAX_VALUE, payee)); 7285 childrenList.add(new Property("referral[x]", "Identifier|Reference(ReferralRequest)", "The referral resource which lists the date, practitioner, reason and other supporting information.", 0, java.lang.Integer.MAX_VALUE, referral)); 7286 childrenList.add(new Property("occurrenceCode", "Coding", "**Insert definition of Occurrence codes.", 0, java.lang.Integer.MAX_VALUE, occurrenceCode)); 7287 childrenList.add(new Property("occurenceSpanCode", "Coding", "**Insert definition of Occurrence Span codes.", 0, java.lang.Integer.MAX_VALUE, occurenceSpanCode)); 7288 childrenList.add(new Property("valueCode", "Coding", "**Insert definition of Value codes.", 0, java.lang.Integer.MAX_VALUE, valueCode)); 7289 childrenList.add(new Property("diagnosis", "", "Ordered list of patient diagnosis for which care is sought.", 0, java.lang.Integer.MAX_VALUE, diagnosis)); 7290 childrenList.add(new Property("procedure", "", "Ordered list of patient procedures performed to support the adjudication.", 0, java.lang.Integer.MAX_VALUE, procedure)); 7291 childrenList.add(new Property("specialCondition", "Coding", "List of special conditions relating to the setting, treatment or patient for which care is sought which may influence the adjudication.", 0, java.lang.Integer.MAX_VALUE, specialCondition)); 7292 childrenList.add(new Property("patient[x]", "Identifier|Reference(Patient)", "Patient Resource.", 0, java.lang.Integer.MAX_VALUE, patient)); 7293 childrenList.add(new Property("coverage", "", "Financial instrument by which payment information for health care.", 0, java.lang.Integer.MAX_VALUE, coverage)); 7294 childrenList.add(new Property("accidentDate", "date", "Date of an accident which these services are addressing.", 0, java.lang.Integer.MAX_VALUE, accidentDate)); 7295 childrenList.add(new Property("accidentType", "Coding", "Type of accident: work, auto, etc.", 0, java.lang.Integer.MAX_VALUE, accidentType)); 7296 childrenList.add(new Property("accidentLocation[x]", "Address|Reference(Location)", "Accident Place.", 0, java.lang.Integer.MAX_VALUE, accidentLocation)); 7297 childrenList.add(new Property("interventionException", "Coding", "A list of intervention and exception codes which may influence the adjudication of the claim.", 0, java.lang.Integer.MAX_VALUE, interventionException)); 7298 childrenList.add(new Property("onset", "", "Period, start and last dates of aspects of the Condition or related services.", 0, java.lang.Integer.MAX_VALUE, onset)); 7299 childrenList.add(new Property("employmentImpacted", "Period", "The start and optional end dates of when the patient was precluded from working due to the treatable condition(s).", 0, java.lang.Integer.MAX_VALUE, employmentImpacted)); 7300 childrenList.add(new Property("hospitalization", "Period", "The start and optional end dates of when the patient was confined to a treatment center.", 0, java.lang.Integer.MAX_VALUE, hospitalization)); 7301 childrenList.add(new Property("item", "", "First tier of goods and services.", 0, java.lang.Integer.MAX_VALUE, item)); 7302 childrenList.add(new Property("total", "Money", "The total value of the claim.", 0, java.lang.Integer.MAX_VALUE, total)); 7303 childrenList.add(new Property("additionalMaterial", "Coding", "Code to indicate that Xrays, images, emails, documents, models or attachments are being sent in support of this submission.", 0, java.lang.Integer.MAX_VALUE, additionalMaterial)); 7304 childrenList.add(new Property("missingTeeth", "", "A list of teeth which would be expected but are not found due to having been previously extracted or for other reasons.", 0, java.lang.Integer.MAX_VALUE, missingTeeth)); 7305 } 7306 7307 @Override 7308 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7309 switch (hash) { 7310 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ClaimType> 7311 case -1868521062: /*subType*/ return this.subType == null ? new Base[0] : this.subType.toArray(new Base[this.subType.size()]); // Coding 7312 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 7313 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // Coding 7314 case 1089373397: /*originalRuleset*/ return this.originalRuleset == null ? new Base[0] : new Base[] {this.originalRuleset}; // Coding 7315 case 1028554472: /*created*/ return this.created == null ? new Base[0] : new Base[] {this.created}; // DateTimeType 7316 case -332066046: /*billablePeriod*/ return this.billablePeriod == null ? new Base[0] : new Base[] {this.billablePeriod}; // Period 7317 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // Type 7318 case -987494927: /*provider*/ return this.provider == null ? new Base[0] : new Base[] {this.provider}; // Type 7319 case 1178922291: /*organization*/ return this.organization == null ? new Base[0] : new Base[] {this.organization}; // Type 7320 case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<Use> 7321 case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // Coding 7322 case 1314609806: /*fundsReserve*/ return this.fundsReserve == null ? new Base[0] : new Base[] {this.fundsReserve}; // Coding 7323 case -1591951995: /*enterer*/ return this.enterer == null ? new Base[0] : new Base[] {this.enterer}; // Type 7324 case 501116579: /*facility*/ return this.facility == null ? new Base[0] : new Base[] {this.facility}; // Type 7325 case 1090493483: /*related*/ return this.related == null ? new Base[0] : this.related.toArray(new Base[this.related.size()]); // RelatedClaimsComponent 7326 case 460301338: /*prescription*/ return this.prescription == null ? new Base[0] : new Base[] {this.prescription}; // Type 7327 case -1814015861: /*originalPrescription*/ return this.originalPrescription == null ? new Base[0] : new Base[] {this.originalPrescription}; // Type 7328 case 106443592: /*payee*/ return this.payee == null ? new Base[0] : new Base[] {this.payee}; // PayeeComponent 7329 case -722568291: /*referral*/ return this.referral == null ? new Base[0] : new Base[] {this.referral}; // Type 7330 case 1721744222: /*occurrenceCode*/ return this.occurrenceCode == null ? new Base[0] : this.occurrenceCode.toArray(new Base[this.occurrenceCode.size()]); // Coding 7331 case -556690898: /*occurenceSpanCode*/ return this.occurenceSpanCode == null ? new Base[0] : this.occurenceSpanCode.toArray(new Base[this.occurenceSpanCode.size()]); // Coding 7332 case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // Coding 7333 case 1196993265: /*diagnosis*/ return this.diagnosis == null ? new Base[0] : this.diagnosis.toArray(new Base[this.diagnosis.size()]); // DiagnosisComponent 7334 case -1095204141: /*procedure*/ return this.procedure == null ? new Base[0] : this.procedure.toArray(new Base[this.procedure.size()]); // ProcedureComponent 7335 case -481489822: /*specialCondition*/ return this.specialCondition == null ? new Base[0] : this.specialCondition.toArray(new Base[this.specialCondition.size()]); // Coding 7336 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Type 7337 case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // CoverageComponent 7338 case -63170979: /*accidentDate*/ return this.accidentDate == null ? new Base[0] : new Base[] {this.accidentDate}; // DateType 7339 case -62671383: /*accidentType*/ return this.accidentType == null ? new Base[0] : new Base[] {this.accidentType}; // Coding 7340 case -1074014492: /*accidentLocation*/ return this.accidentLocation == null ? new Base[0] : new Base[] {this.accidentLocation}; // Type 7341 case 1753076536: /*interventionException*/ return this.interventionException == null ? new Base[0] : this.interventionException.toArray(new Base[this.interventionException.size()]); // Coding 7342 case 105901603: /*onset*/ return this.onset == null ? new Base[0] : this.onset.toArray(new Base[this.onset.size()]); // OnsetComponent 7343 case 1051487345: /*employmentImpacted*/ return this.employmentImpacted == null ? new Base[0] : new Base[] {this.employmentImpacted}; // Period 7344 case 1057894634: /*hospitalization*/ return this.hospitalization == null ? new Base[0] : new Base[] {this.hospitalization}; // Period 7345 case 3242771: /*item*/ return this.item == null ? new Base[0] : this.item.toArray(new Base[this.item.size()]); // ItemsComponent 7346 case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // Money 7347 case -1534875026: /*additionalMaterial*/ return this.additionalMaterial == null ? new Base[0] : this.additionalMaterial.toArray(new Base[this.additionalMaterial.size()]); // Coding 7348 case -1157130302: /*missingTeeth*/ return this.missingTeeth == null ? new Base[0] : this.missingTeeth.toArray(new Base[this.missingTeeth.size()]); // MissingTeethComponent 7349 default: return super.getProperty(hash, name, checkValid); 7350 } 7351 7352 } 7353 7354 @Override 7355 public void setProperty(int hash, String name, Base value) throws FHIRException { 7356 switch (hash) { 7357 case 3575610: // type 7358 this.type = new ClaimTypeEnumFactory().fromType(value); // Enumeration<ClaimType> 7359 break; 7360 case -1868521062: // subType 7361 this.getSubType().add(castToCoding(value)); // Coding 7362 break; 7363 case -1618432855: // identifier 7364 this.getIdentifier().add(castToIdentifier(value)); // Identifier 7365 break; 7366 case 1548678118: // ruleset 7367 this.ruleset = castToCoding(value); // Coding 7368 break; 7369 case 1089373397: // originalRuleset 7370 this.originalRuleset = castToCoding(value); // Coding 7371 break; 7372 case 1028554472: // created 7373 this.created = castToDateTime(value); // DateTimeType 7374 break; 7375 case -332066046: // billablePeriod 7376 this.billablePeriod = castToPeriod(value); // Period 7377 break; 7378 case -880905839: // target 7379 this.target = (Type) value; // Type 7380 break; 7381 case -987494927: // provider 7382 this.provider = (Type) value; // Type 7383 break; 7384 case 1178922291: // organization 7385 this.organization = (Type) value; // Type 7386 break; 7387 case 116103: // use 7388 this.use = new UseEnumFactory().fromType(value); // Enumeration<Use> 7389 break; 7390 case -1165461084: // priority 7391 this.priority = castToCoding(value); // Coding 7392 break; 7393 case 1314609806: // fundsReserve 7394 this.fundsReserve = castToCoding(value); // Coding 7395 break; 7396 case -1591951995: // enterer 7397 this.enterer = (Type) value; // Type 7398 break; 7399 case 501116579: // facility 7400 this.facility = (Type) value; // Type 7401 break; 7402 case 1090493483: // related 7403 this.getRelated().add((RelatedClaimsComponent) value); // RelatedClaimsComponent 7404 break; 7405 case 460301338: // prescription 7406 this.prescription = (Type) value; // Type 7407 break; 7408 case -1814015861: // originalPrescription 7409 this.originalPrescription = (Type) value; // Type 7410 break; 7411 case 106443592: // payee 7412 this.payee = (PayeeComponent) value; // PayeeComponent 7413 break; 7414 case -722568291: // referral 7415 this.referral = (Type) value; // Type 7416 break; 7417 case 1721744222: // occurrenceCode 7418 this.getOccurrenceCode().add(castToCoding(value)); // Coding 7419 break; 7420 case -556690898: // occurenceSpanCode 7421 this.getOccurenceSpanCode().add(castToCoding(value)); // Coding 7422 break; 7423 case -766209282: // valueCode 7424 this.getValueCode().add(castToCoding(value)); // Coding 7425 break; 7426 case 1196993265: // diagnosis 7427 this.getDiagnosis().add((DiagnosisComponent) value); // DiagnosisComponent 7428 break; 7429 case -1095204141: // procedure 7430 this.getProcedure().add((ProcedureComponent) value); // ProcedureComponent 7431 break; 7432 case -481489822: // specialCondition 7433 this.getSpecialCondition().add(castToCoding(value)); // Coding 7434 break; 7435 case -791418107: // patient 7436 this.patient = (Type) value; // Type 7437 break; 7438 case -351767064: // coverage 7439 this.getCoverage().add((CoverageComponent) value); // CoverageComponent 7440 break; 7441 case -63170979: // accidentDate 7442 this.accidentDate = castToDate(value); // DateType 7443 break; 7444 case -62671383: // accidentType 7445 this.accidentType = castToCoding(value); // Coding 7446 break; 7447 case -1074014492: // accidentLocation 7448 this.accidentLocation = (Type) value; // Type 7449 break; 7450 case 1753076536: // interventionException 7451 this.getInterventionException().add(castToCoding(value)); // Coding 7452 break; 7453 case 105901603: // onset 7454 this.getOnset().add((OnsetComponent) value); // OnsetComponent 7455 break; 7456 case 1051487345: // employmentImpacted 7457 this.employmentImpacted = castToPeriod(value); // Period 7458 break; 7459 case 1057894634: // hospitalization 7460 this.hospitalization = castToPeriod(value); // Period 7461 break; 7462 case 3242771: // item 7463 this.getItem().add((ItemsComponent) value); // ItemsComponent 7464 break; 7465 case 110549828: // total 7466 this.total = castToMoney(value); // Money 7467 break; 7468 case -1534875026: // additionalMaterial 7469 this.getAdditionalMaterial().add(castToCoding(value)); // Coding 7470 break; 7471 case -1157130302: // missingTeeth 7472 this.getMissingTeeth().add((MissingTeethComponent) value); // MissingTeethComponent 7473 break; 7474 default: super.setProperty(hash, name, value); 7475 } 7476 7477 } 7478 7479 @Override 7480 public void setProperty(String name, Base value) throws FHIRException { 7481 if (name.equals("type")) 7482 this.type = new ClaimTypeEnumFactory().fromType(value); // Enumeration<ClaimType> 7483 else if (name.equals("subType")) 7484 this.getSubType().add(castToCoding(value)); 7485 else if (name.equals("identifier")) 7486 this.getIdentifier().add(castToIdentifier(value)); 7487 else if (name.equals("ruleset")) 7488 this.ruleset = castToCoding(value); // Coding 7489 else if (name.equals("originalRuleset")) 7490 this.originalRuleset = castToCoding(value); // Coding 7491 else if (name.equals("created")) 7492 this.created = castToDateTime(value); // DateTimeType 7493 else if (name.equals("billablePeriod")) 7494 this.billablePeriod = castToPeriod(value); // Period 7495 else if (name.equals("target[x]")) 7496 this.target = (Type) value; // Type 7497 else if (name.equals("provider[x]")) 7498 this.provider = (Type) value; // Type 7499 else if (name.equals("organization[x]")) 7500 this.organization = (Type) value; // Type 7501 else if (name.equals("use")) 7502 this.use = new UseEnumFactory().fromType(value); // Enumeration<Use> 7503 else if (name.equals("priority")) 7504 this.priority = castToCoding(value); // Coding 7505 else if (name.equals("fundsReserve")) 7506 this.fundsReserve = castToCoding(value); // Coding 7507 else if (name.equals("enterer[x]")) 7508 this.enterer = (Type) value; // Type 7509 else if (name.equals("facility[x]")) 7510 this.facility = (Type) value; // Type 7511 else if (name.equals("related")) 7512 this.getRelated().add((RelatedClaimsComponent) value); 7513 else if (name.equals("prescription[x]")) 7514 this.prescription = (Type) value; // Type 7515 else if (name.equals("originalPrescription[x]")) 7516 this.originalPrescription = (Type) value; // Type 7517 else if (name.equals("payee")) 7518 this.payee = (PayeeComponent) value; // PayeeComponent 7519 else if (name.equals("referral[x]")) 7520 this.referral = (Type) value; // Type 7521 else if (name.equals("occurrenceCode")) 7522 this.getOccurrenceCode().add(castToCoding(value)); 7523 else if (name.equals("occurenceSpanCode")) 7524 this.getOccurenceSpanCode().add(castToCoding(value)); 7525 else if (name.equals("valueCode")) 7526 this.getValueCode().add(castToCoding(value)); 7527 else if (name.equals("diagnosis")) 7528 this.getDiagnosis().add((DiagnosisComponent) value); 7529 else if (name.equals("procedure")) 7530 this.getProcedure().add((ProcedureComponent) value); 7531 else if (name.equals("specialCondition")) 7532 this.getSpecialCondition().add(castToCoding(value)); 7533 else if (name.equals("patient[x]")) 7534 this.patient = (Type) value; // Type 7535 else if (name.equals("coverage")) 7536 this.getCoverage().add((CoverageComponent) value); 7537 else if (name.equals("accidentDate")) 7538 this.accidentDate = castToDate(value); // DateType 7539 else if (name.equals("accidentType")) 7540 this.accidentType = castToCoding(value); // Coding 7541 else if (name.equals("accidentLocation[x]")) 7542 this.accidentLocation = (Type) value; // Type 7543 else if (name.equals("interventionException")) 7544 this.getInterventionException().add(castToCoding(value)); 7545 else if (name.equals("onset")) 7546 this.getOnset().add((OnsetComponent) value); 7547 else if (name.equals("employmentImpacted")) 7548 this.employmentImpacted = castToPeriod(value); // Period 7549 else if (name.equals("hospitalization")) 7550 this.hospitalization = castToPeriod(value); // Period 7551 else if (name.equals("item")) 7552 this.getItem().add((ItemsComponent) value); 7553 else if (name.equals("total")) 7554 this.total = castToMoney(value); // Money 7555 else if (name.equals("additionalMaterial")) 7556 this.getAdditionalMaterial().add(castToCoding(value)); 7557 else if (name.equals("missingTeeth")) 7558 this.getMissingTeeth().add((MissingTeethComponent) value); 7559 else 7560 super.setProperty(name, value); 7561 } 7562 7563 @Override 7564 public Base makeProperty(int hash, String name) throws FHIRException { 7565 switch (hash) { 7566 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ClaimType> 7567 case -1868521062: return addSubType(); // Coding 7568 case -1618432855: return addIdentifier(); // Identifier 7569 case 1548678118: return getRuleset(); // Coding 7570 case 1089373397: return getOriginalRuleset(); // Coding 7571 case 1028554472: throw new FHIRException("Cannot make property created as it is not a complex type"); // DateTimeType 7572 case -332066046: return getBillablePeriod(); // Period 7573 case -815579825: return getTarget(); // Type 7574 case 2064698607: return getProvider(); // Type 7575 case 1326483053: return getOrganization(); // Type 7576 case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<Use> 7577 case -1165461084: return getPriority(); // Coding 7578 case 1314609806: return getFundsReserve(); // Coding 7579 case -812909349: return getEnterer(); // Type 7580 case -542224643: return getFacility(); // Type 7581 case 1090493483: return addRelated(); // RelatedClaimsComponent 7582 case -993324506: return getPrescription(); // Type 7583 case -2067905515: return getOriginalPrescription(); // Type 7584 case 106443592: return getPayee(); // PayeeComponent 7585 case 344221635: return getReferral(); // Type 7586 case 1721744222: return addOccurrenceCode(); // Coding 7587 case -556690898: return addOccurenceSpanCode(); // Coding 7588 case -766209282: return addValueCode(); // Coding 7589 case 1196993265: return addDiagnosis(); // DiagnosisComponent 7590 case -1095204141: return addProcedure(); // ProcedureComponent 7591 case -481489822: return addSpecialCondition(); // Coding 7592 case -2061246629: return getPatient(); // Type 7593 case -351767064: return addCoverage(); // CoverageComponent 7594 case -63170979: throw new FHIRException("Cannot make property accidentDate as it is not a complex type"); // DateType 7595 case -62671383: return getAccidentType(); // Coding 7596 case 1540715292: return getAccidentLocation(); // Type 7597 case 1753076536: return addInterventionException(); // Coding 7598 case 105901603: return addOnset(); // OnsetComponent 7599 case 1051487345: return getEmploymentImpacted(); // Period 7600 case 1057894634: return getHospitalization(); // Period 7601 case 3242771: return addItem(); // ItemsComponent 7602 case 110549828: return getTotal(); // Money 7603 case -1534875026: return addAdditionalMaterial(); // Coding 7604 case -1157130302: return addMissingTeeth(); // MissingTeethComponent 7605 default: return super.makeProperty(hash, name); 7606 } 7607 7608 } 7609 7610 @Override 7611 public Base addChild(String name) throws FHIRException { 7612 if (name.equals("type")) { 7613 throw new FHIRException("Cannot call addChild on a primitive type Claim.type"); 7614 } 7615 else if (name.equals("subType")) { 7616 return addSubType(); 7617 } 7618 else if (name.equals("identifier")) { 7619 return addIdentifier(); 7620 } 7621 else if (name.equals("ruleset")) { 7622 this.ruleset = new Coding(); 7623 return this.ruleset; 7624 } 7625 else if (name.equals("originalRuleset")) { 7626 this.originalRuleset = new Coding(); 7627 return this.originalRuleset; 7628 } 7629 else if (name.equals("created")) { 7630 throw new FHIRException("Cannot call addChild on a primitive type Claim.created"); 7631 } 7632 else if (name.equals("billablePeriod")) { 7633 this.billablePeriod = new Period(); 7634 return this.billablePeriod; 7635 } 7636 else if (name.equals("targetIdentifier")) { 7637 this.target = new Identifier(); 7638 return this.target; 7639 } 7640 else if (name.equals("targetReference")) { 7641 this.target = new Reference(); 7642 return this.target; 7643 } 7644 else if (name.equals("providerIdentifier")) { 7645 this.provider = new Identifier(); 7646 return this.provider; 7647 } 7648 else if (name.equals("providerReference")) { 7649 this.provider = new Reference(); 7650 return this.provider; 7651 } 7652 else if (name.equals("organizationIdentifier")) { 7653 this.organization = new Identifier(); 7654 return this.organization; 7655 } 7656 else if (name.equals("organizationReference")) { 7657 this.organization = new Reference(); 7658 return this.organization; 7659 } 7660 else if (name.equals("use")) { 7661 throw new FHIRException("Cannot call addChild on a primitive type Claim.use"); 7662 } 7663 else if (name.equals("priority")) { 7664 this.priority = new Coding(); 7665 return this.priority; 7666 } 7667 else if (name.equals("fundsReserve")) { 7668 this.fundsReserve = new Coding(); 7669 return this.fundsReserve; 7670 } 7671 else if (name.equals("entererIdentifier")) { 7672 this.enterer = new Identifier(); 7673 return this.enterer; 7674 } 7675 else if (name.equals("entererReference")) { 7676 this.enterer = new Reference(); 7677 return this.enterer; 7678 } 7679 else if (name.equals("facilityIdentifier")) { 7680 this.facility = new Identifier(); 7681 return this.facility; 7682 } 7683 else if (name.equals("facilityReference")) { 7684 this.facility = new Reference(); 7685 return this.facility; 7686 } 7687 else if (name.equals("related")) { 7688 return addRelated(); 7689 } 7690 else if (name.equals("prescriptionIdentifier")) { 7691 this.prescription = new Identifier(); 7692 return this.prescription; 7693 } 7694 else if (name.equals("prescriptionReference")) { 7695 this.prescription = new Reference(); 7696 return this.prescription; 7697 } 7698 else if (name.equals("originalPrescriptionIdentifier")) { 7699 this.originalPrescription = new Identifier(); 7700 return this.originalPrescription; 7701 } 7702 else if (name.equals("originalPrescriptionReference")) { 7703 this.originalPrescription = new Reference(); 7704 return this.originalPrescription; 7705 } 7706 else if (name.equals("payee")) { 7707 this.payee = new PayeeComponent(); 7708 return this.payee; 7709 } 7710 else if (name.equals("referralIdentifier")) { 7711 this.referral = new Identifier(); 7712 return this.referral; 7713 } 7714 else if (name.equals("referralReference")) { 7715 this.referral = new Reference(); 7716 return this.referral; 7717 } 7718 else if (name.equals("occurrenceCode")) { 7719 return addOccurrenceCode(); 7720 } 7721 else if (name.equals("occurenceSpanCode")) { 7722 return addOccurenceSpanCode(); 7723 } 7724 else if (name.equals("valueCode")) { 7725 return addValueCode(); 7726 } 7727 else if (name.equals("diagnosis")) { 7728 return addDiagnosis(); 7729 } 7730 else if (name.equals("procedure")) { 7731 return addProcedure(); 7732 } 7733 else if (name.equals("specialCondition")) { 7734 return addSpecialCondition(); 7735 } 7736 else if (name.equals("patientIdentifier")) { 7737 this.patient = new Identifier(); 7738 return this.patient; 7739 } 7740 else if (name.equals("patientReference")) { 7741 this.patient = new Reference(); 7742 return this.patient; 7743 } 7744 else if (name.equals("coverage")) { 7745 return addCoverage(); 7746 } 7747 else if (name.equals("accidentDate")) { 7748 throw new FHIRException("Cannot call addChild on a primitive type Claim.accidentDate"); 7749 } 7750 else if (name.equals("accidentType")) { 7751 this.accidentType = new Coding(); 7752 return this.accidentType; 7753 } 7754 else if (name.equals("accidentLocationAddress")) { 7755 this.accidentLocation = new Address(); 7756 return this.accidentLocation; 7757 } 7758 else if (name.equals("accidentLocationReference")) { 7759 this.accidentLocation = new Reference(); 7760 return this.accidentLocation; 7761 } 7762 else if (name.equals("interventionException")) { 7763 return addInterventionException(); 7764 } 7765 else if (name.equals("onset")) { 7766 return addOnset(); 7767 } 7768 else if (name.equals("employmentImpacted")) { 7769 this.employmentImpacted = new Period(); 7770 return this.employmentImpacted; 7771 } 7772 else if (name.equals("hospitalization")) { 7773 this.hospitalization = new Period(); 7774 return this.hospitalization; 7775 } 7776 else if (name.equals("item")) { 7777 return addItem(); 7778 } 7779 else if (name.equals("total")) { 7780 this.total = new Money(); 7781 return this.total; 7782 } 7783 else if (name.equals("additionalMaterial")) { 7784 return addAdditionalMaterial(); 7785 } 7786 else if (name.equals("missingTeeth")) { 7787 return addMissingTeeth(); 7788 } 7789 else 7790 return super.addChild(name); 7791 } 7792 7793 public String fhirType() { 7794 return "Claim"; 7795 7796 } 7797 7798 public Claim copy() { 7799 Claim dst = new Claim(); 7800 copyValues(dst); 7801 dst.type = type == null ? null : type.copy(); 7802 if (subType != null) { 7803 dst.subType = new ArrayList<Coding>(); 7804 for (Coding i : subType) 7805 dst.subType.add(i.copy()); 7806 }; 7807 if (identifier != null) { 7808 dst.identifier = new ArrayList<Identifier>(); 7809 for (Identifier i : identifier) 7810 dst.identifier.add(i.copy()); 7811 }; 7812 dst.ruleset = ruleset == null ? null : ruleset.copy(); 7813 dst.originalRuleset = originalRuleset == null ? null : originalRuleset.copy(); 7814 dst.created = created == null ? null : created.copy(); 7815 dst.billablePeriod = billablePeriod == null ? null : billablePeriod.copy(); 7816 dst.target = target == null ? null : target.copy(); 7817 dst.provider = provider == null ? null : provider.copy(); 7818 dst.organization = organization == null ? null : organization.copy(); 7819 dst.use = use == null ? null : use.copy(); 7820 dst.priority = priority == null ? null : priority.copy(); 7821 dst.fundsReserve = fundsReserve == null ? null : fundsReserve.copy(); 7822 dst.enterer = enterer == null ? null : enterer.copy(); 7823 dst.facility = facility == null ? null : facility.copy(); 7824 if (related != null) { 7825 dst.related = new ArrayList<RelatedClaimsComponent>(); 7826 for (RelatedClaimsComponent i : related) 7827 dst.related.add(i.copy()); 7828 }; 7829 dst.prescription = prescription == null ? null : prescription.copy(); 7830 dst.originalPrescription = originalPrescription == null ? null : originalPrescription.copy(); 7831 dst.payee = payee == null ? null : payee.copy(); 7832 dst.referral = referral == null ? null : referral.copy(); 7833 if (occurrenceCode != null) { 7834 dst.occurrenceCode = new ArrayList<Coding>(); 7835 for (Coding i : occurrenceCode) 7836 dst.occurrenceCode.add(i.copy()); 7837 }; 7838 if (occurenceSpanCode != null) { 7839 dst.occurenceSpanCode = new ArrayList<Coding>(); 7840 for (Coding i : occurenceSpanCode) 7841 dst.occurenceSpanCode.add(i.copy()); 7842 }; 7843 if (valueCode != null) { 7844 dst.valueCode = new ArrayList<Coding>(); 7845 for (Coding i : valueCode) 7846 dst.valueCode.add(i.copy()); 7847 }; 7848 if (diagnosis != null) { 7849 dst.diagnosis = new ArrayList<DiagnosisComponent>(); 7850 for (DiagnosisComponent i : diagnosis) 7851 dst.diagnosis.add(i.copy()); 7852 }; 7853 if (procedure != null) { 7854 dst.procedure = new ArrayList<ProcedureComponent>(); 7855 for (ProcedureComponent i : procedure) 7856 dst.procedure.add(i.copy()); 7857 }; 7858 if (specialCondition != null) { 7859 dst.specialCondition = new ArrayList<Coding>(); 7860 for (Coding i : specialCondition) 7861 dst.specialCondition.add(i.copy()); 7862 }; 7863 dst.patient = patient == null ? null : patient.copy(); 7864 if (coverage != null) { 7865 dst.coverage = new ArrayList<CoverageComponent>(); 7866 for (CoverageComponent i : coverage) 7867 dst.coverage.add(i.copy()); 7868 }; 7869 dst.accidentDate = accidentDate == null ? null : accidentDate.copy(); 7870 dst.accidentType = accidentType == null ? null : accidentType.copy(); 7871 dst.accidentLocation = accidentLocation == null ? null : accidentLocation.copy(); 7872 if (interventionException != null) { 7873 dst.interventionException = new ArrayList<Coding>(); 7874 for (Coding i : interventionException) 7875 dst.interventionException.add(i.copy()); 7876 }; 7877 if (onset != null) { 7878 dst.onset = new ArrayList<OnsetComponent>(); 7879 for (OnsetComponent i : onset) 7880 dst.onset.add(i.copy()); 7881 }; 7882 dst.employmentImpacted = employmentImpacted == null ? null : employmentImpacted.copy(); 7883 dst.hospitalization = hospitalization == null ? null : hospitalization.copy(); 7884 if (item != null) { 7885 dst.item = new ArrayList<ItemsComponent>(); 7886 for (ItemsComponent i : item) 7887 dst.item.add(i.copy()); 7888 }; 7889 dst.total = total == null ? null : total.copy(); 7890 if (additionalMaterial != null) { 7891 dst.additionalMaterial = new ArrayList<Coding>(); 7892 for (Coding i : additionalMaterial) 7893 dst.additionalMaterial.add(i.copy()); 7894 }; 7895 if (missingTeeth != null) { 7896 dst.missingTeeth = new ArrayList<MissingTeethComponent>(); 7897 for (MissingTeethComponent i : missingTeeth) 7898 dst.missingTeeth.add(i.copy()); 7899 }; 7900 return dst; 7901 } 7902 7903 protected Claim typedCopy() { 7904 return copy(); 7905 } 7906 7907 @Override 7908 public boolean equalsDeep(Base other) { 7909 if (!super.equalsDeep(other)) 7910 return false; 7911 if (!(other instanceof Claim)) 7912 return false; 7913 Claim o = (Claim) other; 7914 return compareDeep(type, o.type, true) && compareDeep(subType, o.subType, true) && compareDeep(identifier, o.identifier, true) 7915 && compareDeep(ruleset, o.ruleset, true) && compareDeep(originalRuleset, o.originalRuleset, true) 7916 && compareDeep(created, o.created, true) && compareDeep(billablePeriod, o.billablePeriod, true) 7917 && compareDeep(target, o.target, true) && compareDeep(provider, o.provider, true) && compareDeep(organization, o.organization, true) 7918 && compareDeep(use, o.use, true) && compareDeep(priority, o.priority, true) && compareDeep(fundsReserve, o.fundsReserve, true) 7919 && compareDeep(enterer, o.enterer, true) && compareDeep(facility, o.facility, true) && compareDeep(related, o.related, true) 7920 && compareDeep(prescription, o.prescription, true) && compareDeep(originalPrescription, o.originalPrescription, true) 7921 && compareDeep(payee, o.payee, true) && compareDeep(referral, o.referral, true) && compareDeep(occurrenceCode, o.occurrenceCode, true) 7922 && compareDeep(occurenceSpanCode, o.occurenceSpanCode, true) && compareDeep(valueCode, o.valueCode, true) 7923 && compareDeep(diagnosis, o.diagnosis, true) && compareDeep(procedure, o.procedure, true) && compareDeep(specialCondition, o.specialCondition, true) 7924 && compareDeep(patient, o.patient, true) && compareDeep(coverage, o.coverage, true) && compareDeep(accidentDate, o.accidentDate, true) 7925 && compareDeep(accidentType, o.accidentType, true) && compareDeep(accidentLocation, o.accidentLocation, true) 7926 && compareDeep(interventionException, o.interventionException, true) && compareDeep(onset, o.onset, true) 7927 && compareDeep(employmentImpacted, o.employmentImpacted, true) && compareDeep(hospitalization, o.hospitalization, true) 7928 && compareDeep(item, o.item, true) && compareDeep(total, o.total, true) && compareDeep(additionalMaterial, o.additionalMaterial, true) 7929 && compareDeep(missingTeeth, o.missingTeeth, true); 7930 } 7931 7932 @Override 7933 public boolean equalsShallow(Base other) { 7934 if (!super.equalsShallow(other)) 7935 return false; 7936 if (!(other instanceof Claim)) 7937 return false; 7938 Claim o = (Claim) other; 7939 return compareValues(type, o.type, true) && compareValues(created, o.created, true) && compareValues(use, o.use, true) 7940 && compareValues(accidentDate, o.accidentDate, true); 7941 } 7942 7943 public boolean isEmpty() { 7944 return super.isEmpty() && (type == null || type.isEmpty()) && (subType == null || subType.isEmpty()) 7945 && (identifier == null || identifier.isEmpty()) && (ruleset == null || ruleset.isEmpty()) 7946 && (originalRuleset == null || originalRuleset.isEmpty()) && (created == null || created.isEmpty()) 7947 && (billablePeriod == null || billablePeriod.isEmpty()) && (target == null || target.isEmpty()) 7948 && (provider == null || provider.isEmpty()) && (organization == null || organization.isEmpty()) 7949 && (use == null || use.isEmpty()) && (priority == null || priority.isEmpty()) && (fundsReserve == null || fundsReserve.isEmpty()) 7950 && (enterer == null || enterer.isEmpty()) && (facility == null || facility.isEmpty()) && (related == null || related.isEmpty()) 7951 && (prescription == null || prescription.isEmpty()) && (originalPrescription == null || originalPrescription.isEmpty()) 7952 && (payee == null || payee.isEmpty()) && (referral == null || referral.isEmpty()) && (occurrenceCode == null || occurrenceCode.isEmpty()) 7953 && (occurenceSpanCode == null || occurenceSpanCode.isEmpty()) && (valueCode == null || valueCode.isEmpty()) 7954 && (diagnosis == null || diagnosis.isEmpty()) && (procedure == null || procedure.isEmpty()) 7955 && (specialCondition == null || specialCondition.isEmpty()) && (patient == null || patient.isEmpty()) 7956 && (coverage == null || coverage.isEmpty()) && (accidentDate == null || accidentDate.isEmpty()) 7957 && (accidentType == null || accidentType.isEmpty()) && (accidentLocation == null || accidentLocation.isEmpty()) 7958 && (interventionException == null || interventionException.isEmpty()) && (onset == null || onset.isEmpty()) 7959 && (employmentImpacted == null || employmentImpacted.isEmpty()) && (hospitalization == null || hospitalization.isEmpty()) 7960 && (item == null || item.isEmpty()) && (total == null || total.isEmpty()) && (additionalMaterial == null || additionalMaterial.isEmpty()) 7961 && (missingTeeth == null || missingTeeth.isEmpty()); 7962 } 7963 7964 @Override 7965 public ResourceType getResourceType() { 7966 return ResourceType.Claim; 7967 } 7968 7969 /** 7970 * Search parameter: <b>patientidentifier</b> 7971 * <p> 7972 * Description: <b>Patient receiving the services</b><br> 7973 * Type: <b>token</b><br> 7974 * Path: <b>Claim.patientIdentifier</b><br> 7975 * </p> 7976 */ 7977 @SearchParamDefinition(name="patientidentifier", path="Claim.patient.as(Identifier)", description="Patient receiving the services", type="token" ) 7978 public static final String SP_PATIENTIDENTIFIER = "patientidentifier"; 7979 /** 7980 * <b>Fluent Client</b> search parameter constant for <b>patientidentifier</b> 7981 * <p> 7982 * Description: <b>Patient receiving the services</b><br> 7983 * Type: <b>token</b><br> 7984 * Path: <b>Claim.patientIdentifier</b><br> 7985 * </p> 7986 */ 7987 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PATIENTIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PATIENTIDENTIFIER); 7988 7989 /** 7990 * Search parameter: <b>targetreference</b> 7991 * <p> 7992 * Description: <b>The target payor/insurer for the Claim</b><br> 7993 * Type: <b>reference</b><br> 7994 * Path: <b>Claim.targetReference</b><br> 7995 * </p> 7996 */ 7997 @SearchParamDefinition(name="targetreference", path="Claim.target.as(Reference)", description="The target payor/insurer for the Claim", type="reference" ) 7998 public static final String SP_TARGETREFERENCE = "targetreference"; 7999 /** 8000 * <b>Fluent Client</b> search parameter constant for <b>targetreference</b> 8001 * <p> 8002 * Description: <b>The target payor/insurer for the Claim</b><br> 8003 * Type: <b>reference</b><br> 8004 * Path: <b>Claim.targetReference</b><br> 8005 * </p> 8006 */ 8007 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGETREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_TARGETREFERENCE); 8008 8009/** 8010 * Constant for fluent queries to be used to add include statements. Specifies 8011 * the path value of "<b>Claim:targetreference</b>". 8012 */ 8013 public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGETREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:targetreference").toLocked(); 8014 8015 /** 8016 * Search parameter: <b>facilityidentifier</b> 8017 * <p> 8018 * Description: <b>Facility responsible for the goods and services</b><br> 8019 * Type: <b>token</b><br> 8020 * Path: <b>Claim.facilityIdentifier</b><br> 8021 * </p> 8022 */ 8023 @SearchParamDefinition(name="facilityidentifier", path="Claim.facility.as(Identifier)", description="Facility responsible for the goods and services", type="token" ) 8024 public static final String SP_FACILITYIDENTIFIER = "facilityidentifier"; 8025 /** 8026 * <b>Fluent Client</b> search parameter constant for <b>facilityidentifier</b> 8027 * <p> 8028 * Description: <b>Facility responsible for the goods and services</b><br> 8029 * Type: <b>token</b><br> 8030 * Path: <b>Claim.facilityIdentifier</b><br> 8031 * </p> 8032 */ 8033 public static final ca.uhn.fhir.rest.gclient.TokenClientParam FACILITYIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_FACILITYIDENTIFIER); 8034 8035 /** 8036 * Search parameter: <b>facilityreference</b> 8037 * <p> 8038 * Description: <b>Facility responsible for the goods and services</b><br> 8039 * Type: <b>reference</b><br> 8040 * Path: <b>Claim.facilityReference</b><br> 8041 * </p> 8042 */ 8043 @SearchParamDefinition(name="facilityreference", path="Claim.facility.as(Reference)", description="Facility responsible for the goods and services", type="reference" ) 8044 public static final String SP_FACILITYREFERENCE = "facilityreference"; 8045 /** 8046 * <b>Fluent Client</b> search parameter constant for <b>facilityreference</b> 8047 * <p> 8048 * Description: <b>Facility responsible for the goods and services</b><br> 8049 * Type: <b>reference</b><br> 8050 * Path: <b>Claim.facilityReference</b><br> 8051 * </p> 8052 */ 8053 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam FACILITYREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_FACILITYREFERENCE); 8054 8055/** 8056 * Constant for fluent queries to be used to add include statements. Specifies 8057 * the path value of "<b>Claim:facilityreference</b>". 8058 */ 8059 public static final ca.uhn.fhir.model.api.Include INCLUDE_FACILITYREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:facilityreference").toLocked(); 8060 8061 /** 8062 * Search parameter: <b>use</b> 8063 * <p> 8064 * Description: <b>The kind of financial resource</b><br> 8065 * Type: <b>token</b><br> 8066 * Path: <b>Claim.use</b><br> 8067 * </p> 8068 */ 8069 @SearchParamDefinition(name="use", path="Claim.use", description="The kind of financial resource", type="token" ) 8070 public static final String SP_USE = "use"; 8071 /** 8072 * <b>Fluent Client</b> search parameter constant for <b>use</b> 8073 * <p> 8074 * Description: <b>The kind of financial resource</b><br> 8075 * Type: <b>token</b><br> 8076 * Path: <b>Claim.use</b><br> 8077 * </p> 8078 */ 8079 public static final ca.uhn.fhir.rest.gclient.TokenClientParam USE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_USE); 8080 8081 /** 8082 * Search parameter: <b>providerreference</b> 8083 * <p> 8084 * Description: <b>Provider responsible for the Claim</b><br> 8085 * Type: <b>reference</b><br> 8086 * Path: <b>Claim.providerReference</b><br> 8087 * </p> 8088 */ 8089 @SearchParamDefinition(name="providerreference", path="Claim.provider.as(Reference)", description="Provider responsible for the Claim", type="reference" ) 8090 public static final String SP_PROVIDERREFERENCE = "providerreference"; 8091 /** 8092 * <b>Fluent Client</b> search parameter constant for <b>providerreference</b> 8093 * <p> 8094 * Description: <b>Provider responsible for the Claim</b><br> 8095 * Type: <b>reference</b><br> 8096 * Path: <b>Claim.providerReference</b><br> 8097 * </p> 8098 */ 8099 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PROVIDERREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PROVIDERREFERENCE); 8100 8101/** 8102 * Constant for fluent queries to be used to add include statements. Specifies 8103 * the path value of "<b>Claim:providerreference</b>". 8104 */ 8105 public static final ca.uhn.fhir.model.api.Include INCLUDE_PROVIDERREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:providerreference").toLocked(); 8106 8107 /** 8108 * Search parameter: <b>organizationidentifier</b> 8109 * <p> 8110 * Description: <b>The reference to the providing organization</b><br> 8111 * Type: <b>token</b><br> 8112 * Path: <b>Claim.organizationIdentifier</b><br> 8113 * </p> 8114 */ 8115 @SearchParamDefinition(name="organizationidentifier", path="Claim.organization.as(Identifier)", description="The reference to the providing organization", type="token" ) 8116 public static final String SP_ORGANIZATIONIDENTIFIER = "organizationidentifier"; 8117 /** 8118 * <b>Fluent Client</b> search parameter constant for <b>organizationidentifier</b> 8119 * <p> 8120 * Description: <b>The reference to the providing organization</b><br> 8121 * Type: <b>token</b><br> 8122 * Path: <b>Claim.organizationIdentifier</b><br> 8123 * </p> 8124 */ 8125 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ORGANIZATIONIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ORGANIZATIONIDENTIFIER); 8126 8127 /** 8128 * Search parameter: <b>patientreference</b> 8129 * <p> 8130 * Description: <b>Patient receiving the services</b><br> 8131 * Type: <b>reference</b><br> 8132 * Path: <b>Claim.patientReference</b><br> 8133 * </p> 8134 */ 8135 @SearchParamDefinition(name="patientreference", path="Claim.patient.as(Reference)", description="Patient receiving the services", type="reference" ) 8136 public static final String SP_PATIENTREFERENCE = "patientreference"; 8137 /** 8138 * <b>Fluent Client</b> search parameter constant for <b>patientreference</b> 8139 * <p> 8140 * Description: <b>Patient receiving the services</b><br> 8141 * Type: <b>reference</b><br> 8142 * Path: <b>Claim.patientReference</b><br> 8143 * </p> 8144 */ 8145 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENTREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENTREFERENCE); 8146 8147/** 8148 * Constant for fluent queries to be used to add include statements. Specifies 8149 * the path value of "<b>Claim:patientreference</b>". 8150 */ 8151 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENTREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:patientreference").toLocked(); 8152 8153 /** 8154 * Search parameter: <b>created</b> 8155 * <p> 8156 * Description: <b>The creation date for the Claim</b><br> 8157 * Type: <b>date</b><br> 8158 * Path: <b>Claim.created</b><br> 8159 * </p> 8160 */ 8161 @SearchParamDefinition(name="created", path="Claim.created", description="The creation date for the Claim", type="date" ) 8162 public static final String SP_CREATED = "created"; 8163 /** 8164 * <b>Fluent Client</b> search parameter constant for <b>created</b> 8165 * <p> 8166 * Description: <b>The creation date for the Claim</b><br> 8167 * Type: <b>date</b><br> 8168 * Path: <b>Claim.created</b><br> 8169 * </p> 8170 */ 8171 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 8172 8173 /** 8174 * Search parameter: <b>priority</b> 8175 * <p> 8176 * Description: <b>Processing priority requested</b><br> 8177 * Type: <b>token</b><br> 8178 * Path: <b>Claim.priority</b><br> 8179 * </p> 8180 */ 8181 @SearchParamDefinition(name="priority", path="Claim.priority", description="Processing priority requested", type="token" ) 8182 public static final String SP_PRIORITY = "priority"; 8183 /** 8184 * <b>Fluent Client</b> search parameter constant for <b>priority</b> 8185 * <p> 8186 * Description: <b>Processing priority requested</b><br> 8187 * Type: <b>token</b><br> 8188 * Path: <b>Claim.priority</b><br> 8189 * </p> 8190 */ 8191 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PRIORITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PRIORITY); 8192 8193 /** 8194 * Search parameter: <b>targetidentifier</b> 8195 * <p> 8196 * Description: <b>The target payor/insurer for the Claim</b><br> 8197 * Type: <b>token</b><br> 8198 * Path: <b>Claim.targetIdentifier</b><br> 8199 * </p> 8200 */ 8201 @SearchParamDefinition(name="targetidentifier", path="Claim.target.as(Identifier)", description="The target payor/insurer for the Claim", type="token" ) 8202 public static final String SP_TARGETIDENTIFIER = "targetidentifier"; 8203 /** 8204 * <b>Fluent Client</b> search parameter constant for <b>targetidentifier</b> 8205 * <p> 8206 * Description: <b>The target payor/insurer for the Claim</b><br> 8207 * Type: <b>token</b><br> 8208 * Path: <b>Claim.targetIdentifier</b><br> 8209 * </p> 8210 */ 8211 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TARGETIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TARGETIDENTIFIER); 8212 8213 /** 8214 * Search parameter: <b>organizationreference</b> 8215 * <p> 8216 * Description: <b>The reference to the providing organization</b><br> 8217 * Type: <b>reference</b><br> 8218 * Path: <b>Claim.organizationReference</b><br> 8219 * </p> 8220 */ 8221 @SearchParamDefinition(name="organizationreference", path="Claim.organization.as(Reference)", description="The reference to the providing organization", type="reference" ) 8222 public static final String SP_ORGANIZATIONREFERENCE = "organizationreference"; 8223 /** 8224 * <b>Fluent Client</b> search parameter constant for <b>organizationreference</b> 8225 * <p> 8226 * Description: <b>The reference to the providing organization</b><br> 8227 * Type: <b>reference</b><br> 8228 * Path: <b>Claim.organizationReference</b><br> 8229 * </p> 8230 */ 8231 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATIONREFERENCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATIONREFERENCE); 8232 8233/** 8234 * Constant for fluent queries to be used to add include statements. Specifies 8235 * the path value of "<b>Claim:organizationreference</b>". 8236 */ 8237 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATIONREFERENCE = new ca.uhn.fhir.model.api.Include("Claim:organizationreference").toLocked(); 8238 8239 /** 8240 * Search parameter: <b>identifier</b> 8241 * <p> 8242 * Description: <b>The primary identifier of the financial resource</b><br> 8243 * Type: <b>token</b><br> 8244 * Path: <b>Claim.identifier</b><br> 8245 * </p> 8246 */ 8247 @SearchParamDefinition(name="identifier", path="Claim.identifier", description="The primary identifier of the financial resource", type="token" ) 8248 public static final String SP_IDENTIFIER = "identifier"; 8249 /** 8250 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 8251 * <p> 8252 * Description: <b>The primary identifier of the financial resource</b><br> 8253 * Type: <b>token</b><br> 8254 * Path: <b>Claim.identifier</b><br> 8255 * </p> 8256 */ 8257 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 8258 8259 /** 8260 * Search parameter: <b>provideridentifier</b> 8261 * <p> 8262 * Description: <b>Provider responsible for the Claim</b><br> 8263 * Type: <b>token</b><br> 8264 * Path: <b>Claim.providerIdentifier</b><br> 8265 * </p> 8266 */ 8267 @SearchParamDefinition(name="provideridentifier", path="Claim.provider.as(Identifier)", description="Provider responsible for the Claim", type="token" ) 8268 public static final String SP_PROVIDERIDENTIFIER = "provideridentifier"; 8269 /** 8270 * <b>Fluent Client</b> search parameter constant for <b>provideridentifier</b> 8271 * <p> 8272 * Description: <b>Provider responsible for the Claim</b><br> 8273 * Type: <b>token</b><br> 8274 * Path: <b>Claim.providerIdentifier</b><br> 8275 * </p> 8276 */ 8277 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PROVIDERIDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PROVIDERIDENTIFIER); 8278 8279 8280}