001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.exceptions.FHIRException; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.Block; 042import ca.uhn.fhir.model.api.annotation.Child; 043import ca.uhn.fhir.model.api.annotation.Description; 044import ca.uhn.fhir.model.api.annotation.ResourceDef; 045import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 046 047/** 048 * Describes validation requirements, source(s), status and dates for one or 049 * more elements. 050 */ 051@ResourceDef(name = "VerificationResult", profile = "http://hl7.org/fhir/StructureDefinition/VerificationResult") 052public class VerificationResult extends DomainResource { 053 054 public enum Status { 055 /** 056 * ***TODO*** 057 */ 058 ATTESTED, 059 /** 060 * ***TODO*** 061 */ 062 VALIDATED, 063 /** 064 * ***TODO*** 065 */ 066 INPROCESS, 067 /** 068 * ***TODO*** 069 */ 070 REQREVALID, 071 /** 072 * ***TODO*** 073 */ 074 VALFAIL, 075 /** 076 * ***TODO*** 077 */ 078 REVALFAIL, 079 /** 080 * added to help the parsers with the generic types 081 */ 082 NULL; 083 084 public static Status fromCode(String codeString) throws FHIRException { 085 if (codeString == null || "".equals(codeString)) 086 return null; 087 if ("attested".equals(codeString)) 088 return ATTESTED; 089 if ("validated".equals(codeString)) 090 return VALIDATED; 091 if ("in-process".equals(codeString)) 092 return INPROCESS; 093 if ("req-revalid".equals(codeString)) 094 return REQREVALID; 095 if ("val-fail".equals(codeString)) 096 return VALFAIL; 097 if ("reval-fail".equals(codeString)) 098 return REVALFAIL; 099 if (Configuration.isAcceptInvalidEnums()) 100 return null; 101 else 102 throw new FHIRException("Unknown Status code '" + codeString + "'"); 103 } 104 105 public String toCode() { 106 switch (this) { 107 case ATTESTED: 108 return "attested"; 109 case VALIDATED: 110 return "validated"; 111 case INPROCESS: 112 return "in-process"; 113 case REQREVALID: 114 return "req-revalid"; 115 case VALFAIL: 116 return "val-fail"; 117 case REVALFAIL: 118 return "reval-fail"; 119 case NULL: 120 return null; 121 default: 122 return "?"; 123 } 124 } 125 126 public String getSystem() { 127 switch (this) { 128 case ATTESTED: 129 return "http://hl7.org/fhir/CodeSystem/status"; 130 case VALIDATED: 131 return "http://hl7.org/fhir/CodeSystem/status"; 132 case INPROCESS: 133 return "http://hl7.org/fhir/CodeSystem/status"; 134 case REQREVALID: 135 return "http://hl7.org/fhir/CodeSystem/status"; 136 case VALFAIL: 137 return "http://hl7.org/fhir/CodeSystem/status"; 138 case REVALFAIL: 139 return "http://hl7.org/fhir/CodeSystem/status"; 140 case NULL: 141 return null; 142 default: 143 return "?"; 144 } 145 } 146 147 public String getDefinition() { 148 switch (this) { 149 case ATTESTED: 150 return "***TODO***"; 151 case VALIDATED: 152 return "***TODO***"; 153 case INPROCESS: 154 return "***TODO***"; 155 case REQREVALID: 156 return "***TODO***"; 157 case VALFAIL: 158 return "***TODO***"; 159 case REVALFAIL: 160 return "***TODO***"; 161 case NULL: 162 return null; 163 default: 164 return "?"; 165 } 166 } 167 168 public String getDisplay() { 169 switch (this) { 170 case ATTESTED: 171 return "Attested"; 172 case VALIDATED: 173 return "Validated"; 174 case INPROCESS: 175 return "In process"; 176 case REQREVALID: 177 return "Requires revalidation"; 178 case VALFAIL: 179 return "Validation failed"; 180 case REVALFAIL: 181 return "Re-Validation failed"; 182 case NULL: 183 return null; 184 default: 185 return "?"; 186 } 187 } 188 } 189 190 public static class StatusEnumFactory implements EnumFactory<Status> { 191 public Status fromCode(String codeString) throws IllegalArgumentException { 192 if (codeString == null || "".equals(codeString)) 193 if (codeString == null || "".equals(codeString)) 194 return null; 195 if ("attested".equals(codeString)) 196 return Status.ATTESTED; 197 if ("validated".equals(codeString)) 198 return Status.VALIDATED; 199 if ("in-process".equals(codeString)) 200 return Status.INPROCESS; 201 if ("req-revalid".equals(codeString)) 202 return Status.REQREVALID; 203 if ("val-fail".equals(codeString)) 204 return Status.VALFAIL; 205 if ("reval-fail".equals(codeString)) 206 return Status.REVALFAIL; 207 throw new IllegalArgumentException("Unknown Status code '" + codeString + "'"); 208 } 209 210 public Enumeration<Status> fromType(PrimitiveType<?> code) throws FHIRException { 211 if (code == null) 212 return null; 213 if (code.isEmpty()) 214 return new Enumeration<Status>(this, Status.NULL, code); 215 String codeString = code.asStringValue(); 216 if (codeString == null || "".equals(codeString)) 217 return new Enumeration<Status>(this, Status.NULL, code); 218 if ("attested".equals(codeString)) 219 return new Enumeration<Status>(this, Status.ATTESTED, code); 220 if ("validated".equals(codeString)) 221 return new Enumeration<Status>(this, Status.VALIDATED, code); 222 if ("in-process".equals(codeString)) 223 return new Enumeration<Status>(this, Status.INPROCESS, code); 224 if ("req-revalid".equals(codeString)) 225 return new Enumeration<Status>(this, Status.REQREVALID, code); 226 if ("val-fail".equals(codeString)) 227 return new Enumeration<Status>(this, Status.VALFAIL, code); 228 if ("reval-fail".equals(codeString)) 229 return new Enumeration<Status>(this, Status.REVALFAIL, code); 230 throw new FHIRException("Unknown Status code '" + codeString + "'"); 231 } 232 233 public String toCode(Status code) { 234 if (code == Status.ATTESTED) 235 return "attested"; 236 if (code == Status.VALIDATED) 237 return "validated"; 238 if (code == Status.INPROCESS) 239 return "in-process"; 240 if (code == Status.REQREVALID) 241 return "req-revalid"; 242 if (code == Status.VALFAIL) 243 return "val-fail"; 244 if (code == Status.REVALFAIL) 245 return "reval-fail"; 246 return "?"; 247 } 248 249 public String toSystem(Status code) { 250 return code.getSystem(); 251 } 252 } 253 254 @Block() 255 public static class VerificationResultPrimarySourceComponent extends BackboneElement implements IBaseBackboneElement { 256 /** 257 * Reference to the primary source. 258 */ 259 @Child(name = "who", type = { Organization.class, Practitioner.class, 260 PractitionerRole.class }, order = 1, min = 0, max = 1, modifier = false, summary = false) 261 @Description(shortDefinition = "Reference to the primary source", formalDefinition = "Reference to the primary source.") 262 protected Reference who; 263 264 /** 265 * The actual object that is the target of the reference (Reference to the 266 * primary source.) 267 */ 268 protected Resource whoTarget; 269 270 /** 271 * Type of primary source (License Board; Primary Education; Continuing 272 * Education; Postal Service; Relationship owner; Registration Authority; legal 273 * source; issuing source; authoritative source). 274 */ 275 @Child(name = "type", type = { 276 CodeableConcept.class }, order = 2, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 277 @Description(shortDefinition = "Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source)", formalDefinition = "Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).") 278 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-primary-source-type") 279 protected List<CodeableConcept> type; 280 281 /** 282 * Method for communicating with the primary source (manual; API; Push). 283 */ 284 @Child(name = "communicationMethod", type = { 285 CodeableConcept.class }, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 286 @Description(shortDefinition = "Method for exchanging information with the primary source", formalDefinition = "Method for communicating with the primary source (manual; API; Push).") 287 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-communication-method") 288 protected List<CodeableConcept> communicationMethod; 289 290 /** 291 * Status of the validation of the target against the primary source 292 * (successful; failed; unknown). 293 */ 294 @Child(name = "validationStatus", type = { 295 CodeableConcept.class }, order = 4, min = 0, max = 1, modifier = false, summary = false) 296 @Description(shortDefinition = "successful | failed | unknown", formalDefinition = "Status of the validation of the target against the primary source (successful; failed; unknown).") 297 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-validation-status") 298 protected CodeableConcept validationStatus; 299 300 /** 301 * When the target was validated against the primary source. 302 */ 303 @Child(name = "validationDate", type = { 304 DateTimeType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false) 305 @Description(shortDefinition = "When the target was validated against the primary source", formalDefinition = "When the target was validated against the primary source.") 306 protected DateTimeType validationDate; 307 308 /** 309 * Ability of the primary source to push updates/alerts (yes; no; undetermined). 310 */ 311 @Child(name = "canPushUpdates", type = { 312 CodeableConcept.class }, order = 6, min = 0, max = 1, modifier = false, summary = true) 313 @Description(shortDefinition = "yes | no | undetermined", formalDefinition = "Ability of the primary source to push updates/alerts (yes; no; undetermined).") 314 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-can-push-updates") 315 protected CodeableConcept canPushUpdates; 316 317 /** 318 * Type of alerts/updates the primary source can send (specific requested 319 * changes; any changes; as defined by source). 320 */ 321 @Child(name = "pushTypeAvailable", type = { 322 CodeableConcept.class }, order = 7, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 323 @Description(shortDefinition = "specific | any | source", formalDefinition = "Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).") 324 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-push-type-available") 325 protected List<CodeableConcept> pushTypeAvailable; 326 327 private static final long serialVersionUID = -928858332L; 328 329 /** 330 * Constructor 331 */ 332 public VerificationResultPrimarySourceComponent() { 333 super(); 334 } 335 336 /** 337 * @return {@link #who} (Reference to the primary source.) 338 */ 339 public Reference getWho() { 340 if (this.who == null) 341 if (Configuration.errorOnAutoCreate()) 342 throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.who"); 343 else if (Configuration.doAutoCreate()) 344 this.who = new Reference(); // cc 345 return this.who; 346 } 347 348 public boolean hasWho() { 349 return this.who != null && !this.who.isEmpty(); 350 } 351 352 /** 353 * @param value {@link #who} (Reference to the primary source.) 354 */ 355 public VerificationResultPrimarySourceComponent setWho(Reference value) { 356 this.who = value; 357 return this; 358 } 359 360 /** 361 * @return {@link #who} The actual object that is the target of the reference. 362 * The reference library doesn't populate this, but you can use it to 363 * hold the resource if you resolve it. (Reference to the primary 364 * source.) 365 */ 366 public Resource getWhoTarget() { 367 return this.whoTarget; 368 } 369 370 /** 371 * @param value {@link #who} The actual object that is the target of the 372 * reference. The reference library doesn't use these, but you can 373 * use it to hold the resource if you resolve it. (Reference to the 374 * primary source.) 375 */ 376 public VerificationResultPrimarySourceComponent setWhoTarget(Resource value) { 377 this.whoTarget = value; 378 return this; 379 } 380 381 /** 382 * @return {@link #type} (Type of primary source (License Board; Primary 383 * Education; Continuing Education; Postal Service; Relationship owner; 384 * Registration Authority; legal source; issuing source; authoritative 385 * source).) 386 */ 387 public List<CodeableConcept> getType() { 388 if (this.type == null) 389 this.type = new ArrayList<CodeableConcept>(); 390 return this.type; 391 } 392 393 /** 394 * @return Returns a reference to <code>this</code> for easy method chaining 395 */ 396 public VerificationResultPrimarySourceComponent setType(List<CodeableConcept> theType) { 397 this.type = theType; 398 return this; 399 } 400 401 public boolean hasType() { 402 if (this.type == null) 403 return false; 404 for (CodeableConcept item : this.type) 405 if (!item.isEmpty()) 406 return true; 407 return false; 408 } 409 410 public CodeableConcept addType() { // 3 411 CodeableConcept t = new CodeableConcept(); 412 if (this.type == null) 413 this.type = new ArrayList<CodeableConcept>(); 414 this.type.add(t); 415 return t; 416 } 417 418 public VerificationResultPrimarySourceComponent addType(CodeableConcept t) { // 3 419 if (t == null) 420 return this; 421 if (this.type == null) 422 this.type = new ArrayList<CodeableConcept>(); 423 this.type.add(t); 424 return this; 425 } 426 427 /** 428 * @return The first repetition of repeating field {@link #type}, creating it if 429 * it does not already exist 430 */ 431 public CodeableConcept getTypeFirstRep() { 432 if (getType().isEmpty()) { 433 addType(); 434 } 435 return getType().get(0); 436 } 437 438 /** 439 * @return {@link #communicationMethod} (Method for communicating with the 440 * primary source (manual; API; Push).) 441 */ 442 public List<CodeableConcept> getCommunicationMethod() { 443 if (this.communicationMethod == null) 444 this.communicationMethod = new ArrayList<CodeableConcept>(); 445 return this.communicationMethod; 446 } 447 448 /** 449 * @return Returns a reference to <code>this</code> for easy method chaining 450 */ 451 public VerificationResultPrimarySourceComponent setCommunicationMethod( 452 List<CodeableConcept> theCommunicationMethod) { 453 this.communicationMethod = theCommunicationMethod; 454 return this; 455 } 456 457 public boolean hasCommunicationMethod() { 458 if (this.communicationMethod == null) 459 return false; 460 for (CodeableConcept item : this.communicationMethod) 461 if (!item.isEmpty()) 462 return true; 463 return false; 464 } 465 466 public CodeableConcept addCommunicationMethod() { // 3 467 CodeableConcept t = new CodeableConcept(); 468 if (this.communicationMethod == null) 469 this.communicationMethod = new ArrayList<CodeableConcept>(); 470 this.communicationMethod.add(t); 471 return t; 472 } 473 474 public VerificationResultPrimarySourceComponent addCommunicationMethod(CodeableConcept t) { // 3 475 if (t == null) 476 return this; 477 if (this.communicationMethod == null) 478 this.communicationMethod = new ArrayList<CodeableConcept>(); 479 this.communicationMethod.add(t); 480 return this; 481 } 482 483 /** 484 * @return The first repetition of repeating field {@link #communicationMethod}, 485 * creating it if it does not already exist 486 */ 487 public CodeableConcept getCommunicationMethodFirstRep() { 488 if (getCommunicationMethod().isEmpty()) { 489 addCommunicationMethod(); 490 } 491 return getCommunicationMethod().get(0); 492 } 493 494 /** 495 * @return {@link #validationStatus} (Status of the validation of the target 496 * against the primary source (successful; failed; unknown).) 497 */ 498 public CodeableConcept getValidationStatus() { 499 if (this.validationStatus == null) 500 if (Configuration.errorOnAutoCreate()) 501 throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.validationStatus"); 502 else if (Configuration.doAutoCreate()) 503 this.validationStatus = new CodeableConcept(); // cc 504 return this.validationStatus; 505 } 506 507 public boolean hasValidationStatus() { 508 return this.validationStatus != null && !this.validationStatus.isEmpty(); 509 } 510 511 /** 512 * @param value {@link #validationStatus} (Status of the validation of the 513 * target against the primary source (successful; failed; 514 * unknown).) 515 */ 516 public VerificationResultPrimarySourceComponent setValidationStatus(CodeableConcept value) { 517 this.validationStatus = value; 518 return this; 519 } 520 521 /** 522 * @return {@link #validationDate} (When the target was validated against the 523 * primary source.). This is the underlying object with id, value and 524 * extensions. The accessor "getValidationDate" gives direct access to 525 * the value 526 */ 527 public DateTimeType getValidationDateElement() { 528 if (this.validationDate == null) 529 if (Configuration.errorOnAutoCreate()) 530 throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.validationDate"); 531 else if (Configuration.doAutoCreate()) 532 this.validationDate = new DateTimeType(); // bb 533 return this.validationDate; 534 } 535 536 public boolean hasValidationDateElement() { 537 return this.validationDate != null && !this.validationDate.isEmpty(); 538 } 539 540 public boolean hasValidationDate() { 541 return this.validationDate != null && !this.validationDate.isEmpty(); 542 } 543 544 /** 545 * @param value {@link #validationDate} (When the target was validated against 546 * the primary source.). This is the underlying object with id, 547 * value and extensions. The accessor "getValidationDate" gives 548 * direct access to the value 549 */ 550 public VerificationResultPrimarySourceComponent setValidationDateElement(DateTimeType value) { 551 this.validationDate = value; 552 return this; 553 } 554 555 /** 556 * @return When the target was validated against the primary source. 557 */ 558 public Date getValidationDate() { 559 return this.validationDate == null ? null : this.validationDate.getValue(); 560 } 561 562 /** 563 * @param value When the target was validated against the primary source. 564 */ 565 public VerificationResultPrimarySourceComponent setValidationDate(Date value) { 566 if (value == null) 567 this.validationDate = null; 568 else { 569 if (this.validationDate == null) 570 this.validationDate = new DateTimeType(); 571 this.validationDate.setValue(value); 572 } 573 return this; 574 } 575 576 /** 577 * @return {@link #canPushUpdates} (Ability of the primary source to push 578 * updates/alerts (yes; no; undetermined).) 579 */ 580 public CodeableConcept getCanPushUpdates() { 581 if (this.canPushUpdates == null) 582 if (Configuration.errorOnAutoCreate()) 583 throw new Error("Attempt to auto-create VerificationResultPrimarySourceComponent.canPushUpdates"); 584 else if (Configuration.doAutoCreate()) 585 this.canPushUpdates = new CodeableConcept(); // cc 586 return this.canPushUpdates; 587 } 588 589 public boolean hasCanPushUpdates() { 590 return this.canPushUpdates != null && !this.canPushUpdates.isEmpty(); 591 } 592 593 /** 594 * @param value {@link #canPushUpdates} (Ability of the primary source to push 595 * updates/alerts (yes; no; undetermined).) 596 */ 597 public VerificationResultPrimarySourceComponent setCanPushUpdates(CodeableConcept value) { 598 this.canPushUpdates = value; 599 return this; 600 } 601 602 /** 603 * @return {@link #pushTypeAvailable} (Type of alerts/updates the primary source 604 * can send (specific requested changes; any changes; as defined by 605 * source).) 606 */ 607 public List<CodeableConcept> getPushTypeAvailable() { 608 if (this.pushTypeAvailable == null) 609 this.pushTypeAvailable = new ArrayList<CodeableConcept>(); 610 return this.pushTypeAvailable; 611 } 612 613 /** 614 * @return Returns a reference to <code>this</code> for easy method chaining 615 */ 616 public VerificationResultPrimarySourceComponent setPushTypeAvailable(List<CodeableConcept> thePushTypeAvailable) { 617 this.pushTypeAvailable = thePushTypeAvailable; 618 return this; 619 } 620 621 public boolean hasPushTypeAvailable() { 622 if (this.pushTypeAvailable == null) 623 return false; 624 for (CodeableConcept item : this.pushTypeAvailable) 625 if (!item.isEmpty()) 626 return true; 627 return false; 628 } 629 630 public CodeableConcept addPushTypeAvailable() { // 3 631 CodeableConcept t = new CodeableConcept(); 632 if (this.pushTypeAvailable == null) 633 this.pushTypeAvailable = new ArrayList<CodeableConcept>(); 634 this.pushTypeAvailable.add(t); 635 return t; 636 } 637 638 public VerificationResultPrimarySourceComponent addPushTypeAvailable(CodeableConcept t) { // 3 639 if (t == null) 640 return this; 641 if (this.pushTypeAvailable == null) 642 this.pushTypeAvailable = new ArrayList<CodeableConcept>(); 643 this.pushTypeAvailable.add(t); 644 return this; 645 } 646 647 /** 648 * @return The first repetition of repeating field {@link #pushTypeAvailable}, 649 * creating it if it does not already exist 650 */ 651 public CodeableConcept getPushTypeAvailableFirstRep() { 652 if (getPushTypeAvailable().isEmpty()) { 653 addPushTypeAvailable(); 654 } 655 return getPushTypeAvailable().get(0); 656 } 657 658 protected void listChildren(List<Property> children) { 659 super.listChildren(children); 660 children.add(new Property("who", "Reference(Organization|Practitioner|PractitionerRole)", 661 "Reference to the primary source.", 0, 1, who)); 662 children.add(new Property("type", "CodeableConcept", 663 "Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).", 664 0, java.lang.Integer.MAX_VALUE, type)); 665 children.add(new Property("communicationMethod", "CodeableConcept", 666 "Method for communicating with the primary source (manual; API; Push).", 0, java.lang.Integer.MAX_VALUE, 667 communicationMethod)); 668 children.add(new Property("validationStatus", "CodeableConcept", 669 "Status of the validation of the target against the primary source (successful; failed; unknown).", 0, 1, 670 validationStatus)); 671 children.add(new Property("validationDate", "dateTime", 672 "When the target was validated against the primary source.", 0, 1, validationDate)); 673 children.add(new Property("canPushUpdates", "CodeableConcept", 674 "Ability of the primary source to push updates/alerts (yes; no; undetermined).", 0, 1, canPushUpdates)); 675 children.add(new Property("pushTypeAvailable", "CodeableConcept", 676 "Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).", 677 0, java.lang.Integer.MAX_VALUE, pushTypeAvailable)); 678 } 679 680 @Override 681 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 682 switch (_hash) { 683 case 117694: 684 /* who */ return new Property("who", "Reference(Organization|Practitioner|PractitionerRole)", 685 "Reference to the primary source.", 0, 1, who); 686 case 3575610: 687 /* type */ return new Property("type", "CodeableConcept", 688 "Type of primary source (License Board; Primary Education; Continuing Education; Postal Service; Relationship owner; Registration Authority; legal source; issuing source; authoritative source).", 689 0, java.lang.Integer.MAX_VALUE, type); 690 case 1314116695: 691 /* communicationMethod */ return new Property("communicationMethod", "CodeableConcept", 692 "Method for communicating with the primary source (manual; API; Push).", 0, java.lang.Integer.MAX_VALUE, 693 communicationMethod); 694 case 1775633867: 695 /* validationStatus */ return new Property("validationStatus", "CodeableConcept", 696 "Status of the validation of the target against the primary source (successful; failed; unknown).", 0, 1, 697 validationStatus); 698 case -280180793: 699 /* validationDate */ return new Property("validationDate", "dateTime", 700 "When the target was validated against the primary source.", 0, 1, validationDate); 701 case 1463787104: 702 /* canPushUpdates */ return new Property("canPushUpdates", "CodeableConcept", 703 "Ability of the primary source to push updates/alerts (yes; no; undetermined).", 0, 1, canPushUpdates); 704 case 945223605: 705 /* pushTypeAvailable */ return new Property("pushTypeAvailable", "CodeableConcept", 706 "Type of alerts/updates the primary source can send (specific requested changes; any changes; as defined by source).", 707 0, java.lang.Integer.MAX_VALUE, pushTypeAvailable); 708 default: 709 return super.getNamedProperty(_hash, _name, _checkValid); 710 } 711 712 } 713 714 @Override 715 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 716 switch (hash) { 717 case 117694: 718 /* who */ return this.who == null ? new Base[0] : new Base[] { this.who }; // Reference 719 case 3575610: 720 /* type */ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 721 case 1314116695: 722 /* communicationMethod */ return this.communicationMethod == null ? new Base[0] 723 : this.communicationMethod.toArray(new Base[this.communicationMethod.size()]); // CodeableConcept 724 case 1775633867: 725 /* validationStatus */ return this.validationStatus == null ? new Base[0] 726 : new Base[] { this.validationStatus }; // CodeableConcept 727 case -280180793: 728 /* validationDate */ return this.validationDate == null ? new Base[0] : new Base[] { this.validationDate }; // DateTimeType 729 case 1463787104: 730 /* canPushUpdates */ return this.canPushUpdates == null ? new Base[0] : new Base[] { this.canPushUpdates }; // CodeableConcept 731 case 945223605: 732 /* pushTypeAvailable */ return this.pushTypeAvailable == null ? new Base[0] 733 : this.pushTypeAvailable.toArray(new Base[this.pushTypeAvailable.size()]); // CodeableConcept 734 default: 735 return super.getProperty(hash, name, checkValid); 736 } 737 738 } 739 740 @Override 741 public Base setProperty(int hash, String name, Base value) throws FHIRException { 742 switch (hash) { 743 case 117694: // who 744 this.who = castToReference(value); // Reference 745 return value; 746 case 3575610: // type 747 this.getType().add(castToCodeableConcept(value)); // CodeableConcept 748 return value; 749 case 1314116695: // communicationMethod 750 this.getCommunicationMethod().add(castToCodeableConcept(value)); // CodeableConcept 751 return value; 752 case 1775633867: // validationStatus 753 this.validationStatus = castToCodeableConcept(value); // CodeableConcept 754 return value; 755 case -280180793: // validationDate 756 this.validationDate = castToDateTime(value); // DateTimeType 757 return value; 758 case 1463787104: // canPushUpdates 759 this.canPushUpdates = castToCodeableConcept(value); // CodeableConcept 760 return value; 761 case 945223605: // pushTypeAvailable 762 this.getPushTypeAvailable().add(castToCodeableConcept(value)); // CodeableConcept 763 return value; 764 default: 765 return super.setProperty(hash, name, value); 766 } 767 768 } 769 770 @Override 771 public Base setProperty(String name, Base value) throws FHIRException { 772 if (name.equals("who")) { 773 this.who = castToReference(value); // Reference 774 } else if (name.equals("type")) { 775 this.getType().add(castToCodeableConcept(value)); 776 } else if (name.equals("communicationMethod")) { 777 this.getCommunicationMethod().add(castToCodeableConcept(value)); 778 } else if (name.equals("validationStatus")) { 779 this.validationStatus = castToCodeableConcept(value); // CodeableConcept 780 } else if (name.equals("validationDate")) { 781 this.validationDate = castToDateTime(value); // DateTimeType 782 } else if (name.equals("canPushUpdates")) { 783 this.canPushUpdates = castToCodeableConcept(value); // CodeableConcept 784 } else if (name.equals("pushTypeAvailable")) { 785 this.getPushTypeAvailable().add(castToCodeableConcept(value)); 786 } else 787 return super.setProperty(name, value); 788 return value; 789 } 790 791 @Override 792 public Base makeProperty(int hash, String name) throws FHIRException { 793 switch (hash) { 794 case 117694: 795 return getWho(); 796 case 3575610: 797 return addType(); 798 case 1314116695: 799 return addCommunicationMethod(); 800 case 1775633867: 801 return getValidationStatus(); 802 case -280180793: 803 return getValidationDateElement(); 804 case 1463787104: 805 return getCanPushUpdates(); 806 case 945223605: 807 return addPushTypeAvailable(); 808 default: 809 return super.makeProperty(hash, name); 810 } 811 812 } 813 814 @Override 815 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 816 switch (hash) { 817 case 117694: 818 /* who */ return new String[] { "Reference" }; 819 case 3575610: 820 /* type */ return new String[] { "CodeableConcept" }; 821 case 1314116695: 822 /* communicationMethod */ return new String[] { "CodeableConcept" }; 823 case 1775633867: 824 /* validationStatus */ return new String[] { "CodeableConcept" }; 825 case -280180793: 826 /* validationDate */ return new String[] { "dateTime" }; 827 case 1463787104: 828 /* canPushUpdates */ return new String[] { "CodeableConcept" }; 829 case 945223605: 830 /* pushTypeAvailable */ return new String[] { "CodeableConcept" }; 831 default: 832 return super.getTypesForProperty(hash, name); 833 } 834 835 } 836 837 @Override 838 public Base addChild(String name) throws FHIRException { 839 if (name.equals("who")) { 840 this.who = new Reference(); 841 return this.who; 842 } else if (name.equals("type")) { 843 return addType(); 844 } else if (name.equals("communicationMethod")) { 845 return addCommunicationMethod(); 846 } else if (name.equals("validationStatus")) { 847 this.validationStatus = new CodeableConcept(); 848 return this.validationStatus; 849 } else if (name.equals("validationDate")) { 850 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.validationDate"); 851 } else if (name.equals("canPushUpdates")) { 852 this.canPushUpdates = new CodeableConcept(); 853 return this.canPushUpdates; 854 } else if (name.equals("pushTypeAvailable")) { 855 return addPushTypeAvailable(); 856 } else 857 return super.addChild(name); 858 } 859 860 public VerificationResultPrimarySourceComponent copy() { 861 VerificationResultPrimarySourceComponent dst = new VerificationResultPrimarySourceComponent(); 862 copyValues(dst); 863 return dst; 864 } 865 866 public void copyValues(VerificationResultPrimarySourceComponent dst) { 867 super.copyValues(dst); 868 dst.who = who == null ? null : who.copy(); 869 if (type != null) { 870 dst.type = new ArrayList<CodeableConcept>(); 871 for (CodeableConcept i : type) 872 dst.type.add(i.copy()); 873 } 874 ; 875 if (communicationMethod != null) { 876 dst.communicationMethod = new ArrayList<CodeableConcept>(); 877 for (CodeableConcept i : communicationMethod) 878 dst.communicationMethod.add(i.copy()); 879 } 880 ; 881 dst.validationStatus = validationStatus == null ? null : validationStatus.copy(); 882 dst.validationDate = validationDate == null ? null : validationDate.copy(); 883 dst.canPushUpdates = canPushUpdates == null ? null : canPushUpdates.copy(); 884 if (pushTypeAvailable != null) { 885 dst.pushTypeAvailable = new ArrayList<CodeableConcept>(); 886 for (CodeableConcept i : pushTypeAvailable) 887 dst.pushTypeAvailable.add(i.copy()); 888 } 889 ; 890 } 891 892 @Override 893 public boolean equalsDeep(Base other_) { 894 if (!super.equalsDeep(other_)) 895 return false; 896 if (!(other_ instanceof VerificationResultPrimarySourceComponent)) 897 return false; 898 VerificationResultPrimarySourceComponent o = (VerificationResultPrimarySourceComponent) other_; 899 return compareDeep(who, o.who, true) && compareDeep(type, o.type, true) 900 && compareDeep(communicationMethod, o.communicationMethod, true) 901 && compareDeep(validationStatus, o.validationStatus, true) 902 && compareDeep(validationDate, o.validationDate, true) && compareDeep(canPushUpdates, o.canPushUpdates, true) 903 && compareDeep(pushTypeAvailable, o.pushTypeAvailable, true); 904 } 905 906 @Override 907 public boolean equalsShallow(Base other_) { 908 if (!super.equalsShallow(other_)) 909 return false; 910 if (!(other_ instanceof VerificationResultPrimarySourceComponent)) 911 return false; 912 VerificationResultPrimarySourceComponent o = (VerificationResultPrimarySourceComponent) other_; 913 return compareValues(validationDate, o.validationDate, true); 914 } 915 916 public boolean isEmpty() { 917 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(who, type, communicationMethod, validationStatus, 918 validationDate, canPushUpdates, pushTypeAvailable); 919 } 920 921 public String fhirType() { 922 return "VerificationResult.primarySource"; 923 924 } 925 926 } 927 928 @Block() 929 public static class VerificationResultAttestationComponent extends BackboneElement implements IBaseBackboneElement { 930 /** 931 * The individual or organization attesting to information. 932 */ 933 @Child(name = "who", type = { Practitioner.class, PractitionerRole.class, 934 Organization.class }, order = 1, min = 0, max = 1, modifier = false, summary = true) 935 @Description(shortDefinition = "The individual or organization attesting to information", formalDefinition = "The individual or organization attesting to information.") 936 protected Reference who; 937 938 /** 939 * The actual object that is the target of the reference (The individual or 940 * organization attesting to information.) 941 */ 942 protected Resource whoTarget; 943 944 /** 945 * When the who is asserting on behalf of another (organization or individual). 946 */ 947 @Child(name = "onBehalfOf", type = { Organization.class, Practitioner.class, 948 PractitionerRole.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 949 @Description(shortDefinition = "When the who is asserting on behalf of another (organization or individual)", formalDefinition = "When the who is asserting on behalf of another (organization or individual).") 950 protected Reference onBehalfOf; 951 952 /** 953 * The actual object that is the target of the reference (When the who is 954 * asserting on behalf of another (organization or individual).) 955 */ 956 protected Resource onBehalfOfTarget; 957 958 /** 959 * The method by which attested information was submitted/retrieved (manual; 960 * API; Push). 961 */ 962 @Child(name = "communicationMethod", type = { 963 CodeableConcept.class }, order = 3, min = 0, max = 1, modifier = false, summary = true) 964 @Description(shortDefinition = "The method by which attested information was submitted/retrieved", formalDefinition = "The method by which attested information was submitted/retrieved (manual; API; Push).") 965 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-communication-method") 966 protected CodeableConcept communicationMethod; 967 968 /** 969 * The date the information was attested to. 970 */ 971 @Child(name = "date", type = { DateType.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 972 @Description(shortDefinition = "The date the information was attested to", formalDefinition = "The date the information was attested to.") 973 protected DateType date; 974 975 /** 976 * A digital identity certificate associated with the attestation source. 977 */ 978 @Child(name = "sourceIdentityCertificate", type = { 979 StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false) 980 @Description(shortDefinition = "A digital identity certificate associated with the attestation source", formalDefinition = "A digital identity certificate associated with the attestation source.") 981 protected StringType sourceIdentityCertificate; 982 983 /** 984 * A digital identity certificate associated with the proxy entity submitting 985 * attested information on behalf of the attestation source. 986 */ 987 @Child(name = "proxyIdentityCertificate", type = { 988 StringType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false) 989 @Description(shortDefinition = "A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source", formalDefinition = "A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.") 990 protected StringType proxyIdentityCertificate; 991 992 /** 993 * Signed assertion by the proxy entity indicating that they have the right to 994 * submit attested information on behalf of the attestation source. 995 */ 996 @Child(name = "proxySignature", type = { 997 Signature.class }, order = 7, min = 0, max = 1, modifier = false, summary = false) 998 @Description(shortDefinition = "Proxy signature", formalDefinition = "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.") 999 protected Signature proxySignature; 1000 1001 /** 1002 * Signed assertion by the attestation source that they have attested to the 1003 * information. 1004 */ 1005 @Child(name = "sourceSignature", type = { 1006 Signature.class }, order = 8, min = 0, max = 1, modifier = false, summary = false) 1007 @Description(shortDefinition = "Attester signature", formalDefinition = "Signed assertion by the attestation source that they have attested to the information.") 1008 protected Signature sourceSignature; 1009 1010 private static final long serialVersionUID = -900018800L; 1011 1012 /** 1013 * Constructor 1014 */ 1015 public VerificationResultAttestationComponent() { 1016 super(); 1017 } 1018 1019 /** 1020 * @return {@link #who} (The individual or organization attesting to 1021 * information.) 1022 */ 1023 public Reference getWho() { 1024 if (this.who == null) 1025 if (Configuration.errorOnAutoCreate()) 1026 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.who"); 1027 else if (Configuration.doAutoCreate()) 1028 this.who = new Reference(); // cc 1029 return this.who; 1030 } 1031 1032 public boolean hasWho() { 1033 return this.who != null && !this.who.isEmpty(); 1034 } 1035 1036 /** 1037 * @param value {@link #who} (The individual or organization attesting to 1038 * information.) 1039 */ 1040 public VerificationResultAttestationComponent setWho(Reference value) { 1041 this.who = value; 1042 return this; 1043 } 1044 1045 /** 1046 * @return {@link #who} The actual object that is the target of the reference. 1047 * The reference library doesn't populate this, but you can use it to 1048 * hold the resource if you resolve it. (The individual or organization 1049 * attesting to information.) 1050 */ 1051 public Resource getWhoTarget() { 1052 return this.whoTarget; 1053 } 1054 1055 /** 1056 * @param value {@link #who} The actual object that is the target of the 1057 * reference. The reference library doesn't use these, but you can 1058 * use it to hold the resource if you resolve it. (The individual 1059 * or organization attesting to information.) 1060 */ 1061 public VerificationResultAttestationComponent setWhoTarget(Resource value) { 1062 this.whoTarget = value; 1063 return this; 1064 } 1065 1066 /** 1067 * @return {@link #onBehalfOf} (When the who is asserting on behalf of another 1068 * (organization or individual).) 1069 */ 1070 public Reference getOnBehalfOf() { 1071 if (this.onBehalfOf == null) 1072 if (Configuration.errorOnAutoCreate()) 1073 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.onBehalfOf"); 1074 else if (Configuration.doAutoCreate()) 1075 this.onBehalfOf = new Reference(); // cc 1076 return this.onBehalfOf; 1077 } 1078 1079 public boolean hasOnBehalfOf() { 1080 return this.onBehalfOf != null && !this.onBehalfOf.isEmpty(); 1081 } 1082 1083 /** 1084 * @param value {@link #onBehalfOf} (When the who is asserting on behalf of 1085 * another (organization or individual).) 1086 */ 1087 public VerificationResultAttestationComponent setOnBehalfOf(Reference value) { 1088 this.onBehalfOf = value; 1089 return this; 1090 } 1091 1092 /** 1093 * @return {@link #onBehalfOf} The actual object that is the target of the 1094 * reference. The reference library doesn't populate this, but you can 1095 * use it to hold the resource if you resolve it. (When the who is 1096 * asserting on behalf of another (organization or individual).) 1097 */ 1098 public Resource getOnBehalfOfTarget() { 1099 return this.onBehalfOfTarget; 1100 } 1101 1102 /** 1103 * @param value {@link #onBehalfOf} The actual object that is the target of the 1104 * reference. The reference library doesn't use these, but you can 1105 * use it to hold the resource if you resolve it. (When the who is 1106 * asserting on behalf of another (organization or individual).) 1107 */ 1108 public VerificationResultAttestationComponent setOnBehalfOfTarget(Resource value) { 1109 this.onBehalfOfTarget = value; 1110 return this; 1111 } 1112 1113 /** 1114 * @return {@link #communicationMethod} (The method by which attested 1115 * information was submitted/retrieved (manual; API; Push).) 1116 */ 1117 public CodeableConcept getCommunicationMethod() { 1118 if (this.communicationMethod == null) 1119 if (Configuration.errorOnAutoCreate()) 1120 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.communicationMethod"); 1121 else if (Configuration.doAutoCreate()) 1122 this.communicationMethod = new CodeableConcept(); // cc 1123 return this.communicationMethod; 1124 } 1125 1126 public boolean hasCommunicationMethod() { 1127 return this.communicationMethod != null && !this.communicationMethod.isEmpty(); 1128 } 1129 1130 /** 1131 * @param value {@link #communicationMethod} (The method by which attested 1132 * information was submitted/retrieved (manual; API; Push).) 1133 */ 1134 public VerificationResultAttestationComponent setCommunicationMethod(CodeableConcept value) { 1135 this.communicationMethod = value; 1136 return this; 1137 } 1138 1139 /** 1140 * @return {@link #date} (The date the information was attested to.). This is 1141 * the underlying object with id, value and extensions. The accessor 1142 * "getDate" gives direct access to the value 1143 */ 1144 public DateType getDateElement() { 1145 if (this.date == null) 1146 if (Configuration.errorOnAutoCreate()) 1147 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.date"); 1148 else if (Configuration.doAutoCreate()) 1149 this.date = new DateType(); // bb 1150 return this.date; 1151 } 1152 1153 public boolean hasDateElement() { 1154 return this.date != null && !this.date.isEmpty(); 1155 } 1156 1157 public boolean hasDate() { 1158 return this.date != null && !this.date.isEmpty(); 1159 } 1160 1161 /** 1162 * @param value {@link #date} (The date the information was attested to.). This 1163 * is the underlying object with id, value and extensions. The 1164 * accessor "getDate" gives direct access to the value 1165 */ 1166 public VerificationResultAttestationComponent setDateElement(DateType value) { 1167 this.date = value; 1168 return this; 1169 } 1170 1171 /** 1172 * @return The date the information was attested to. 1173 */ 1174 public Date getDate() { 1175 return this.date == null ? null : this.date.getValue(); 1176 } 1177 1178 /** 1179 * @param value The date the information was attested to. 1180 */ 1181 public VerificationResultAttestationComponent setDate(Date value) { 1182 if (value == null) 1183 this.date = null; 1184 else { 1185 if (this.date == null) 1186 this.date = new DateType(); 1187 this.date.setValue(value); 1188 } 1189 return this; 1190 } 1191 1192 /** 1193 * @return {@link #sourceIdentityCertificate} (A digital identity certificate 1194 * associated with the attestation source.). This is the underlying 1195 * object with id, value and extensions. The accessor 1196 * "getSourceIdentityCertificate" gives direct access to the value 1197 */ 1198 public StringType getSourceIdentityCertificateElement() { 1199 if (this.sourceIdentityCertificate == null) 1200 if (Configuration.errorOnAutoCreate()) 1201 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.sourceIdentityCertificate"); 1202 else if (Configuration.doAutoCreate()) 1203 this.sourceIdentityCertificate = new StringType(); // bb 1204 return this.sourceIdentityCertificate; 1205 } 1206 1207 public boolean hasSourceIdentityCertificateElement() { 1208 return this.sourceIdentityCertificate != null && !this.sourceIdentityCertificate.isEmpty(); 1209 } 1210 1211 public boolean hasSourceIdentityCertificate() { 1212 return this.sourceIdentityCertificate != null && !this.sourceIdentityCertificate.isEmpty(); 1213 } 1214 1215 /** 1216 * @param value {@link #sourceIdentityCertificate} (A digital identity 1217 * certificate associated with the attestation source.). This is 1218 * the underlying object with id, value and extensions. The 1219 * accessor "getSourceIdentityCertificate" gives direct access to 1220 * the value 1221 */ 1222 public VerificationResultAttestationComponent setSourceIdentityCertificateElement(StringType value) { 1223 this.sourceIdentityCertificate = value; 1224 return this; 1225 } 1226 1227 /** 1228 * @return A digital identity certificate associated with the attestation 1229 * source. 1230 */ 1231 public String getSourceIdentityCertificate() { 1232 return this.sourceIdentityCertificate == null ? null : this.sourceIdentityCertificate.getValue(); 1233 } 1234 1235 /** 1236 * @param value A digital identity certificate associated with the attestation 1237 * source. 1238 */ 1239 public VerificationResultAttestationComponent setSourceIdentityCertificate(String value) { 1240 if (Utilities.noString(value)) 1241 this.sourceIdentityCertificate = null; 1242 else { 1243 if (this.sourceIdentityCertificate == null) 1244 this.sourceIdentityCertificate = new StringType(); 1245 this.sourceIdentityCertificate.setValue(value); 1246 } 1247 return this; 1248 } 1249 1250 /** 1251 * @return {@link #proxyIdentityCertificate} (A digital identity certificate 1252 * associated with the proxy entity submitting attested information on 1253 * behalf of the attestation source.). This is the underlying object 1254 * with id, value and extensions. The accessor 1255 * "getProxyIdentityCertificate" gives direct access to the value 1256 */ 1257 public StringType getProxyIdentityCertificateElement() { 1258 if (this.proxyIdentityCertificate == null) 1259 if (Configuration.errorOnAutoCreate()) 1260 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.proxyIdentityCertificate"); 1261 else if (Configuration.doAutoCreate()) 1262 this.proxyIdentityCertificate = new StringType(); // bb 1263 return this.proxyIdentityCertificate; 1264 } 1265 1266 public boolean hasProxyIdentityCertificateElement() { 1267 return this.proxyIdentityCertificate != null && !this.proxyIdentityCertificate.isEmpty(); 1268 } 1269 1270 public boolean hasProxyIdentityCertificate() { 1271 return this.proxyIdentityCertificate != null && !this.proxyIdentityCertificate.isEmpty(); 1272 } 1273 1274 /** 1275 * @param value {@link #proxyIdentityCertificate} (A digital identity 1276 * certificate associated with the proxy entity submitting attested 1277 * information on behalf of the attestation source.). This is the 1278 * underlying object with id, value and extensions. The accessor 1279 * "getProxyIdentityCertificate" gives direct access to the value 1280 */ 1281 public VerificationResultAttestationComponent setProxyIdentityCertificateElement(StringType value) { 1282 this.proxyIdentityCertificate = value; 1283 return this; 1284 } 1285 1286 /** 1287 * @return A digital identity certificate associated with the proxy entity 1288 * submitting attested information on behalf of the attestation source. 1289 */ 1290 public String getProxyIdentityCertificate() { 1291 return this.proxyIdentityCertificate == null ? null : this.proxyIdentityCertificate.getValue(); 1292 } 1293 1294 /** 1295 * @param value A digital identity certificate associated with the proxy entity 1296 * submitting attested information on behalf of the attestation 1297 * source. 1298 */ 1299 public VerificationResultAttestationComponent setProxyIdentityCertificate(String value) { 1300 if (Utilities.noString(value)) 1301 this.proxyIdentityCertificate = null; 1302 else { 1303 if (this.proxyIdentityCertificate == null) 1304 this.proxyIdentityCertificate = new StringType(); 1305 this.proxyIdentityCertificate.setValue(value); 1306 } 1307 return this; 1308 } 1309 1310 /** 1311 * @return {@link #proxySignature} (Signed assertion by the proxy entity 1312 * indicating that they have the right to submit attested information on 1313 * behalf of the attestation source.) 1314 */ 1315 public Signature getProxySignature() { 1316 if (this.proxySignature == null) 1317 if (Configuration.errorOnAutoCreate()) 1318 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.proxySignature"); 1319 else if (Configuration.doAutoCreate()) 1320 this.proxySignature = new Signature(); // cc 1321 return this.proxySignature; 1322 } 1323 1324 public boolean hasProxySignature() { 1325 return this.proxySignature != null && !this.proxySignature.isEmpty(); 1326 } 1327 1328 /** 1329 * @param value {@link #proxySignature} (Signed assertion by the proxy entity 1330 * indicating that they have the right to submit attested 1331 * information on behalf of the attestation source.) 1332 */ 1333 public VerificationResultAttestationComponent setProxySignature(Signature value) { 1334 this.proxySignature = value; 1335 return this; 1336 } 1337 1338 /** 1339 * @return {@link #sourceSignature} (Signed assertion by the attestation source 1340 * that they have attested to the information.) 1341 */ 1342 public Signature getSourceSignature() { 1343 if (this.sourceSignature == null) 1344 if (Configuration.errorOnAutoCreate()) 1345 throw new Error("Attempt to auto-create VerificationResultAttestationComponent.sourceSignature"); 1346 else if (Configuration.doAutoCreate()) 1347 this.sourceSignature = new Signature(); // cc 1348 return this.sourceSignature; 1349 } 1350 1351 public boolean hasSourceSignature() { 1352 return this.sourceSignature != null && !this.sourceSignature.isEmpty(); 1353 } 1354 1355 /** 1356 * @param value {@link #sourceSignature} (Signed assertion by the attestation 1357 * source that they have attested to the information.) 1358 */ 1359 public VerificationResultAttestationComponent setSourceSignature(Signature value) { 1360 this.sourceSignature = value; 1361 return this; 1362 } 1363 1364 protected void listChildren(List<Property> children) { 1365 super.listChildren(children); 1366 children.add(new Property("who", "Reference(Practitioner|PractitionerRole|Organization)", 1367 "The individual or organization attesting to information.", 0, 1, who)); 1368 children.add(new Property("onBehalfOf", "Reference(Organization|Practitioner|PractitionerRole)", 1369 "When the who is asserting on behalf of another (organization or individual).", 0, 1, onBehalfOf)); 1370 children.add(new Property("communicationMethod", "CodeableConcept", 1371 "The method by which attested information was submitted/retrieved (manual; API; Push).", 0, 1, 1372 communicationMethod)); 1373 children.add(new Property("date", "date", "The date the information was attested to.", 0, 1, date)); 1374 children.add(new Property("sourceIdentityCertificate", "string", 1375 "A digital identity certificate associated with the attestation source.", 0, 1, sourceIdentityCertificate)); 1376 children.add(new Property("proxyIdentityCertificate", "string", 1377 "A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.", 1378 0, 1, proxyIdentityCertificate)); 1379 children.add(new Property("proxySignature", "Signature", 1380 "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 1381 0, 1, proxySignature)); 1382 children.add(new Property("sourceSignature", "Signature", 1383 "Signed assertion by the attestation source that they have attested to the information.", 0, 1, 1384 sourceSignature)); 1385 } 1386 1387 @Override 1388 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1389 switch (_hash) { 1390 case 117694: 1391 /* who */ return new Property("who", "Reference(Practitioner|PractitionerRole|Organization)", 1392 "The individual or organization attesting to information.", 0, 1, who); 1393 case -14402964: 1394 /* onBehalfOf */ return new Property("onBehalfOf", "Reference(Organization|Practitioner|PractitionerRole)", 1395 "When the who is asserting on behalf of another (organization or individual).", 0, 1, onBehalfOf); 1396 case 1314116695: 1397 /* communicationMethod */ return new Property("communicationMethod", "CodeableConcept", 1398 "The method by which attested information was submitted/retrieved (manual; API; Push).", 0, 1, 1399 communicationMethod); 1400 case 3076014: 1401 /* date */ return new Property("date", "date", "The date the information was attested to.", 0, 1, date); 1402 case -799067682: 1403 /* sourceIdentityCertificate */ return new Property("sourceIdentityCertificate", "string", 1404 "A digital identity certificate associated with the attestation source.", 0, 1, sourceIdentityCertificate); 1405 case 431558827: 1406 /* proxyIdentityCertificate */ return new Property("proxyIdentityCertificate", "string", 1407 "A digital identity certificate associated with the proxy entity submitting attested information on behalf of the attestation source.", 1408 0, 1, proxyIdentityCertificate); 1409 case 1455540714: 1410 /* proxySignature */ return new Property("proxySignature", "Signature", 1411 "Signed assertion by the proxy entity indicating that they have the right to submit attested information on behalf of the attestation source.", 1412 0, 1, proxySignature); 1413 case 1754480349: 1414 /* sourceSignature */ return new Property("sourceSignature", "Signature", 1415 "Signed assertion by the attestation source that they have attested to the information.", 0, 1, 1416 sourceSignature); 1417 default: 1418 return super.getNamedProperty(_hash, _name, _checkValid); 1419 } 1420 1421 } 1422 1423 @Override 1424 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1425 switch (hash) { 1426 case 117694: 1427 /* who */ return this.who == null ? new Base[0] : new Base[] { this.who }; // Reference 1428 case -14402964: 1429 /* onBehalfOf */ return this.onBehalfOf == null ? new Base[0] : new Base[] { this.onBehalfOf }; // Reference 1430 case 1314116695: 1431 /* communicationMethod */ return this.communicationMethod == null ? new Base[0] 1432 : new Base[] { this.communicationMethod }; // CodeableConcept 1433 case 3076014: 1434 /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateType 1435 case -799067682: 1436 /* sourceIdentityCertificate */ return this.sourceIdentityCertificate == null ? new Base[0] 1437 : new Base[] { this.sourceIdentityCertificate }; // StringType 1438 case 431558827: 1439 /* proxyIdentityCertificate */ return this.proxyIdentityCertificate == null ? new Base[0] 1440 : new Base[] { this.proxyIdentityCertificate }; // StringType 1441 case 1455540714: 1442 /* proxySignature */ return this.proxySignature == null ? new Base[0] : new Base[] { this.proxySignature }; // Signature 1443 case 1754480349: 1444 /* sourceSignature */ return this.sourceSignature == null ? new Base[0] : new Base[] { this.sourceSignature }; // Signature 1445 default: 1446 return super.getProperty(hash, name, checkValid); 1447 } 1448 1449 } 1450 1451 @Override 1452 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1453 switch (hash) { 1454 case 117694: // who 1455 this.who = castToReference(value); // Reference 1456 return value; 1457 case -14402964: // onBehalfOf 1458 this.onBehalfOf = castToReference(value); // Reference 1459 return value; 1460 case 1314116695: // communicationMethod 1461 this.communicationMethod = castToCodeableConcept(value); // CodeableConcept 1462 return value; 1463 case 3076014: // date 1464 this.date = castToDate(value); // DateType 1465 return value; 1466 case -799067682: // sourceIdentityCertificate 1467 this.sourceIdentityCertificate = castToString(value); // StringType 1468 return value; 1469 case 431558827: // proxyIdentityCertificate 1470 this.proxyIdentityCertificate = castToString(value); // StringType 1471 return value; 1472 case 1455540714: // proxySignature 1473 this.proxySignature = castToSignature(value); // Signature 1474 return value; 1475 case 1754480349: // sourceSignature 1476 this.sourceSignature = castToSignature(value); // Signature 1477 return value; 1478 default: 1479 return super.setProperty(hash, name, value); 1480 } 1481 1482 } 1483 1484 @Override 1485 public Base setProperty(String name, Base value) throws FHIRException { 1486 if (name.equals("who")) { 1487 this.who = castToReference(value); // Reference 1488 } else if (name.equals("onBehalfOf")) { 1489 this.onBehalfOf = castToReference(value); // Reference 1490 } else if (name.equals("communicationMethod")) { 1491 this.communicationMethod = castToCodeableConcept(value); // CodeableConcept 1492 } else if (name.equals("date")) { 1493 this.date = castToDate(value); // DateType 1494 } else if (name.equals("sourceIdentityCertificate")) { 1495 this.sourceIdentityCertificate = castToString(value); // StringType 1496 } else if (name.equals("proxyIdentityCertificate")) { 1497 this.proxyIdentityCertificate = castToString(value); // StringType 1498 } else if (name.equals("proxySignature")) { 1499 this.proxySignature = castToSignature(value); // Signature 1500 } else if (name.equals("sourceSignature")) { 1501 this.sourceSignature = castToSignature(value); // Signature 1502 } else 1503 return super.setProperty(name, value); 1504 return value; 1505 } 1506 1507 @Override 1508 public Base makeProperty(int hash, String name) throws FHIRException { 1509 switch (hash) { 1510 case 117694: 1511 return getWho(); 1512 case -14402964: 1513 return getOnBehalfOf(); 1514 case 1314116695: 1515 return getCommunicationMethod(); 1516 case 3076014: 1517 return getDateElement(); 1518 case -799067682: 1519 return getSourceIdentityCertificateElement(); 1520 case 431558827: 1521 return getProxyIdentityCertificateElement(); 1522 case 1455540714: 1523 return getProxySignature(); 1524 case 1754480349: 1525 return getSourceSignature(); 1526 default: 1527 return super.makeProperty(hash, name); 1528 } 1529 1530 } 1531 1532 @Override 1533 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1534 switch (hash) { 1535 case 117694: 1536 /* who */ return new String[] { "Reference" }; 1537 case -14402964: 1538 /* onBehalfOf */ return new String[] { "Reference" }; 1539 case 1314116695: 1540 /* communicationMethod */ return new String[] { "CodeableConcept" }; 1541 case 3076014: 1542 /* date */ return new String[] { "date" }; 1543 case -799067682: 1544 /* sourceIdentityCertificate */ return new String[] { "string" }; 1545 case 431558827: 1546 /* proxyIdentityCertificate */ return new String[] { "string" }; 1547 case 1455540714: 1548 /* proxySignature */ return new String[] { "Signature" }; 1549 case 1754480349: 1550 /* sourceSignature */ return new String[] { "Signature" }; 1551 default: 1552 return super.getTypesForProperty(hash, name); 1553 } 1554 1555 } 1556 1557 @Override 1558 public Base addChild(String name) throws FHIRException { 1559 if (name.equals("who")) { 1560 this.who = new Reference(); 1561 return this.who; 1562 } else if (name.equals("onBehalfOf")) { 1563 this.onBehalfOf = new Reference(); 1564 return this.onBehalfOf; 1565 } else if (name.equals("communicationMethod")) { 1566 this.communicationMethod = new CodeableConcept(); 1567 return this.communicationMethod; 1568 } else if (name.equals("date")) { 1569 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.date"); 1570 } else if (name.equals("sourceIdentityCertificate")) { 1571 throw new FHIRException( 1572 "Cannot call addChild on a singleton property VerificationResult.sourceIdentityCertificate"); 1573 } else if (name.equals("proxyIdentityCertificate")) { 1574 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.proxyIdentityCertificate"); 1575 } else if (name.equals("proxySignature")) { 1576 this.proxySignature = new Signature(); 1577 return this.proxySignature; 1578 } else if (name.equals("sourceSignature")) { 1579 this.sourceSignature = new Signature(); 1580 return this.sourceSignature; 1581 } else 1582 return super.addChild(name); 1583 } 1584 1585 public VerificationResultAttestationComponent copy() { 1586 VerificationResultAttestationComponent dst = new VerificationResultAttestationComponent(); 1587 copyValues(dst); 1588 return dst; 1589 } 1590 1591 public void copyValues(VerificationResultAttestationComponent dst) { 1592 super.copyValues(dst); 1593 dst.who = who == null ? null : who.copy(); 1594 dst.onBehalfOf = onBehalfOf == null ? null : onBehalfOf.copy(); 1595 dst.communicationMethod = communicationMethod == null ? null : communicationMethod.copy(); 1596 dst.date = date == null ? null : date.copy(); 1597 dst.sourceIdentityCertificate = sourceIdentityCertificate == null ? null : sourceIdentityCertificate.copy(); 1598 dst.proxyIdentityCertificate = proxyIdentityCertificate == null ? null : proxyIdentityCertificate.copy(); 1599 dst.proxySignature = proxySignature == null ? null : proxySignature.copy(); 1600 dst.sourceSignature = sourceSignature == null ? null : sourceSignature.copy(); 1601 } 1602 1603 @Override 1604 public boolean equalsDeep(Base other_) { 1605 if (!super.equalsDeep(other_)) 1606 return false; 1607 if (!(other_ instanceof VerificationResultAttestationComponent)) 1608 return false; 1609 VerificationResultAttestationComponent o = (VerificationResultAttestationComponent) other_; 1610 return compareDeep(who, o.who, true) && compareDeep(onBehalfOf, o.onBehalfOf, true) 1611 && compareDeep(communicationMethod, o.communicationMethod, true) && compareDeep(date, o.date, true) 1612 && compareDeep(sourceIdentityCertificate, o.sourceIdentityCertificate, true) 1613 && compareDeep(proxyIdentityCertificate, o.proxyIdentityCertificate, true) 1614 && compareDeep(proxySignature, o.proxySignature, true) 1615 && compareDeep(sourceSignature, o.sourceSignature, true); 1616 } 1617 1618 @Override 1619 public boolean equalsShallow(Base other_) { 1620 if (!super.equalsShallow(other_)) 1621 return false; 1622 if (!(other_ instanceof VerificationResultAttestationComponent)) 1623 return false; 1624 VerificationResultAttestationComponent o = (VerificationResultAttestationComponent) other_; 1625 return compareValues(date, o.date, true) 1626 && compareValues(sourceIdentityCertificate, o.sourceIdentityCertificate, true) 1627 && compareValues(proxyIdentityCertificate, o.proxyIdentityCertificate, true); 1628 } 1629 1630 public boolean isEmpty() { 1631 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(who, onBehalfOf, communicationMethod, date, 1632 sourceIdentityCertificate, proxyIdentityCertificate, proxySignature, sourceSignature); 1633 } 1634 1635 public String fhirType() { 1636 return "VerificationResult.attestation"; 1637 1638 } 1639 1640 } 1641 1642 @Block() 1643 public static class VerificationResultValidatorComponent extends BackboneElement implements IBaseBackboneElement { 1644 /** 1645 * Reference to the organization validating information. 1646 */ 1647 @Child(name = "organization", type = { 1648 Organization.class }, order = 1, min = 1, max = 1, modifier = false, summary = false) 1649 @Description(shortDefinition = "Reference to the organization validating information", formalDefinition = "Reference to the organization validating information.") 1650 protected Reference organization; 1651 1652 /** 1653 * The actual object that is the target of the reference (Reference to the 1654 * organization validating information.) 1655 */ 1656 protected Organization organizationTarget; 1657 1658 /** 1659 * A digital identity certificate associated with the validator. 1660 */ 1661 @Child(name = "identityCertificate", type = { 1662 StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false) 1663 @Description(shortDefinition = "A digital identity certificate associated with the validator", formalDefinition = "A digital identity certificate associated with the validator.") 1664 protected StringType identityCertificate; 1665 1666 /** 1667 * Signed assertion by the validator that they have validated the information. 1668 */ 1669 @Child(name = "attestationSignature", type = { 1670 Signature.class }, order = 3, min = 0, max = 1, modifier = false, summary = false) 1671 @Description(shortDefinition = "Validator signature", formalDefinition = "Signed assertion by the validator that they have validated the information.") 1672 protected Signature attestationSignature; 1673 1674 private static final long serialVersionUID = 35580619L; 1675 1676 /** 1677 * Constructor 1678 */ 1679 public VerificationResultValidatorComponent() { 1680 super(); 1681 } 1682 1683 /** 1684 * Constructor 1685 */ 1686 public VerificationResultValidatorComponent(Reference organization) { 1687 super(); 1688 this.organization = organization; 1689 } 1690 1691 /** 1692 * @return {@link #organization} (Reference to the organization validating 1693 * information.) 1694 */ 1695 public Reference getOrganization() { 1696 if (this.organization == null) 1697 if (Configuration.errorOnAutoCreate()) 1698 throw new Error("Attempt to auto-create VerificationResultValidatorComponent.organization"); 1699 else if (Configuration.doAutoCreate()) 1700 this.organization = new Reference(); // cc 1701 return this.organization; 1702 } 1703 1704 public boolean hasOrganization() { 1705 return this.organization != null && !this.organization.isEmpty(); 1706 } 1707 1708 /** 1709 * @param value {@link #organization} (Reference to the organization validating 1710 * information.) 1711 */ 1712 public VerificationResultValidatorComponent setOrganization(Reference value) { 1713 this.organization = value; 1714 return this; 1715 } 1716 1717 /** 1718 * @return {@link #organization} The actual object that is the target of the 1719 * reference. The reference library doesn't populate this, but you can 1720 * use it to hold the resource if you resolve it. (Reference to the 1721 * organization validating information.) 1722 */ 1723 public Organization getOrganizationTarget() { 1724 if (this.organizationTarget == null) 1725 if (Configuration.errorOnAutoCreate()) 1726 throw new Error("Attempt to auto-create VerificationResultValidatorComponent.organization"); 1727 else if (Configuration.doAutoCreate()) 1728 this.organizationTarget = new Organization(); // aa 1729 return this.organizationTarget; 1730 } 1731 1732 /** 1733 * @param value {@link #organization} The actual object that is the target of 1734 * the reference. The reference library doesn't use these, but you 1735 * can use it to hold the resource if you resolve it. (Reference to 1736 * the organization validating information.) 1737 */ 1738 public VerificationResultValidatorComponent setOrganizationTarget(Organization value) { 1739 this.organizationTarget = value; 1740 return this; 1741 } 1742 1743 /** 1744 * @return {@link #identityCertificate} (A digital identity certificate 1745 * associated with the validator.). This is the underlying object with 1746 * id, value and extensions. The accessor "getIdentityCertificate" gives 1747 * direct access to the value 1748 */ 1749 public StringType getIdentityCertificateElement() { 1750 if (this.identityCertificate == null) 1751 if (Configuration.errorOnAutoCreate()) 1752 throw new Error("Attempt to auto-create VerificationResultValidatorComponent.identityCertificate"); 1753 else if (Configuration.doAutoCreate()) 1754 this.identityCertificate = new StringType(); // bb 1755 return this.identityCertificate; 1756 } 1757 1758 public boolean hasIdentityCertificateElement() { 1759 return this.identityCertificate != null && !this.identityCertificate.isEmpty(); 1760 } 1761 1762 public boolean hasIdentityCertificate() { 1763 return this.identityCertificate != null && !this.identityCertificate.isEmpty(); 1764 } 1765 1766 /** 1767 * @param value {@link #identityCertificate} (A digital identity certificate 1768 * associated with the validator.). This is the underlying object 1769 * with id, value and extensions. The accessor 1770 * "getIdentityCertificate" gives direct access to the value 1771 */ 1772 public VerificationResultValidatorComponent setIdentityCertificateElement(StringType value) { 1773 this.identityCertificate = value; 1774 return this; 1775 } 1776 1777 /** 1778 * @return A digital identity certificate associated with the validator. 1779 */ 1780 public String getIdentityCertificate() { 1781 return this.identityCertificate == null ? null : this.identityCertificate.getValue(); 1782 } 1783 1784 /** 1785 * @param value A digital identity certificate associated with the validator. 1786 */ 1787 public VerificationResultValidatorComponent setIdentityCertificate(String value) { 1788 if (Utilities.noString(value)) 1789 this.identityCertificate = null; 1790 else { 1791 if (this.identityCertificate == null) 1792 this.identityCertificate = new StringType(); 1793 this.identityCertificate.setValue(value); 1794 } 1795 return this; 1796 } 1797 1798 /** 1799 * @return {@link #attestationSignature} (Signed assertion by the validator that 1800 * they have validated the information.) 1801 */ 1802 public Signature getAttestationSignature() { 1803 if (this.attestationSignature == null) 1804 if (Configuration.errorOnAutoCreate()) 1805 throw new Error("Attempt to auto-create VerificationResultValidatorComponent.attestationSignature"); 1806 else if (Configuration.doAutoCreate()) 1807 this.attestationSignature = new Signature(); // cc 1808 return this.attestationSignature; 1809 } 1810 1811 public boolean hasAttestationSignature() { 1812 return this.attestationSignature != null && !this.attestationSignature.isEmpty(); 1813 } 1814 1815 /** 1816 * @param value {@link #attestationSignature} (Signed assertion by the validator 1817 * that they have validated the information.) 1818 */ 1819 public VerificationResultValidatorComponent setAttestationSignature(Signature value) { 1820 this.attestationSignature = value; 1821 return this; 1822 } 1823 1824 protected void listChildren(List<Property> children) { 1825 super.listChildren(children); 1826 children.add(new Property("organization", "Reference(Organization)", 1827 "Reference to the organization validating information.", 0, 1, organization)); 1828 children.add(new Property("identityCertificate", "string", 1829 "A digital identity certificate associated with the validator.", 0, 1, identityCertificate)); 1830 children.add(new Property("attestationSignature", "Signature", 1831 "Signed assertion by the validator that they have validated the information.", 0, 1, attestationSignature)); 1832 } 1833 1834 @Override 1835 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1836 switch (_hash) { 1837 case 1178922291: 1838 /* organization */ return new Property("organization", "Reference(Organization)", 1839 "Reference to the organization validating information.", 0, 1, organization); 1840 case -854379015: 1841 /* identityCertificate */ return new Property("identityCertificate", "string", 1842 "A digital identity certificate associated with the validator.", 0, 1, identityCertificate); 1843 case -184196152: 1844 /* attestationSignature */ return new Property("attestationSignature", "Signature", 1845 "Signed assertion by the validator that they have validated the information.", 0, 1, attestationSignature); 1846 default: 1847 return super.getNamedProperty(_hash, _name, _checkValid); 1848 } 1849 1850 } 1851 1852 @Override 1853 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1854 switch (hash) { 1855 case 1178922291: 1856 /* organization */ return this.organization == null ? new Base[0] : new Base[] { this.organization }; // Reference 1857 case -854379015: 1858 /* identityCertificate */ return this.identityCertificate == null ? new Base[0] 1859 : new Base[] { this.identityCertificate }; // StringType 1860 case -184196152: 1861 /* attestationSignature */ return this.attestationSignature == null ? new Base[0] 1862 : new Base[] { this.attestationSignature }; // Signature 1863 default: 1864 return super.getProperty(hash, name, checkValid); 1865 } 1866 1867 } 1868 1869 @Override 1870 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1871 switch (hash) { 1872 case 1178922291: // organization 1873 this.organization = castToReference(value); // Reference 1874 return value; 1875 case -854379015: // identityCertificate 1876 this.identityCertificate = castToString(value); // StringType 1877 return value; 1878 case -184196152: // attestationSignature 1879 this.attestationSignature = castToSignature(value); // Signature 1880 return value; 1881 default: 1882 return super.setProperty(hash, name, value); 1883 } 1884 1885 } 1886 1887 @Override 1888 public Base setProperty(String name, Base value) throws FHIRException { 1889 if (name.equals("organization")) { 1890 this.organization = castToReference(value); // Reference 1891 } else if (name.equals("identityCertificate")) { 1892 this.identityCertificate = castToString(value); // StringType 1893 } else if (name.equals("attestationSignature")) { 1894 this.attestationSignature = castToSignature(value); // Signature 1895 } else 1896 return super.setProperty(name, value); 1897 return value; 1898 } 1899 1900 @Override 1901 public Base makeProperty(int hash, String name) throws FHIRException { 1902 switch (hash) { 1903 case 1178922291: 1904 return getOrganization(); 1905 case -854379015: 1906 return getIdentityCertificateElement(); 1907 case -184196152: 1908 return getAttestationSignature(); 1909 default: 1910 return super.makeProperty(hash, name); 1911 } 1912 1913 } 1914 1915 @Override 1916 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1917 switch (hash) { 1918 case 1178922291: 1919 /* organization */ return new String[] { "Reference" }; 1920 case -854379015: 1921 /* identityCertificate */ return new String[] { "string" }; 1922 case -184196152: 1923 /* attestationSignature */ return new String[] { "Signature" }; 1924 default: 1925 return super.getTypesForProperty(hash, name); 1926 } 1927 1928 } 1929 1930 @Override 1931 public Base addChild(String name) throws FHIRException { 1932 if (name.equals("organization")) { 1933 this.organization = new Reference(); 1934 return this.organization; 1935 } else if (name.equals("identityCertificate")) { 1936 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.identityCertificate"); 1937 } else if (name.equals("attestationSignature")) { 1938 this.attestationSignature = new Signature(); 1939 return this.attestationSignature; 1940 } else 1941 return super.addChild(name); 1942 } 1943 1944 public VerificationResultValidatorComponent copy() { 1945 VerificationResultValidatorComponent dst = new VerificationResultValidatorComponent(); 1946 copyValues(dst); 1947 return dst; 1948 } 1949 1950 public void copyValues(VerificationResultValidatorComponent dst) { 1951 super.copyValues(dst); 1952 dst.organization = organization == null ? null : organization.copy(); 1953 dst.identityCertificate = identityCertificate == null ? null : identityCertificate.copy(); 1954 dst.attestationSignature = attestationSignature == null ? null : attestationSignature.copy(); 1955 } 1956 1957 @Override 1958 public boolean equalsDeep(Base other_) { 1959 if (!super.equalsDeep(other_)) 1960 return false; 1961 if (!(other_ instanceof VerificationResultValidatorComponent)) 1962 return false; 1963 VerificationResultValidatorComponent o = (VerificationResultValidatorComponent) other_; 1964 return compareDeep(organization, o.organization, true) 1965 && compareDeep(identityCertificate, o.identityCertificate, true) 1966 && compareDeep(attestationSignature, o.attestationSignature, true); 1967 } 1968 1969 @Override 1970 public boolean equalsShallow(Base other_) { 1971 if (!super.equalsShallow(other_)) 1972 return false; 1973 if (!(other_ instanceof VerificationResultValidatorComponent)) 1974 return false; 1975 VerificationResultValidatorComponent o = (VerificationResultValidatorComponent) other_; 1976 return compareValues(identityCertificate, o.identityCertificate, true); 1977 } 1978 1979 public boolean isEmpty() { 1980 return super.isEmpty() 1981 && ca.uhn.fhir.util.ElementUtil.isEmpty(organization, identityCertificate, attestationSignature); 1982 } 1983 1984 public String fhirType() { 1985 return "VerificationResult.validator"; 1986 1987 } 1988 1989 } 1990 1991 /** 1992 * A resource that was validated. 1993 */ 1994 @Child(name = "target", type = { 1995 Reference.class }, order = 0, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 1996 @Description(shortDefinition = "A resource that was validated", formalDefinition = "A resource that was validated.") 1997 protected List<Reference> target; 1998 /** 1999 * The actual objects that are the target of the reference (A resource that was 2000 * validated.) 2001 */ 2002 protected List<Resource> targetTarget; 2003 2004 /** 2005 * The fhirpath location(s) within the resource that was validated. 2006 */ 2007 @Child(name = "targetLocation", type = { 2008 StringType.class }, order = 1, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2009 @Description(shortDefinition = "The fhirpath location(s) within the resource that was validated", formalDefinition = "The fhirpath location(s) within the resource that was validated.") 2010 protected List<StringType> targetLocation; 2011 2012 /** 2013 * The frequency with which the target must be validated (none; initial; 2014 * periodic). 2015 */ 2016 @Child(name = "need", type = { CodeableConcept.class }, order = 2, min = 0, max = 1, modifier = false, summary = true) 2017 @Description(shortDefinition = "none | initial | periodic", formalDefinition = "The frequency with which the target must be validated (none; initial; periodic).") 2018 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-need") 2019 protected CodeableConcept need; 2020 2021 /** 2022 * The validation status of the target (attested; validated; in process; 2023 * requires revalidation; validation failed; revalidation failed). 2024 */ 2025 @Child(name = "status", type = { CodeType.class }, order = 3, min = 1, max = 1, modifier = false, summary = true) 2026 @Description(shortDefinition = "attested | validated | in-process | req-revalid | val-fail | reval-fail", formalDefinition = "The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).") 2027 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-status") 2028 protected Enumeration<Status> status; 2029 2030 /** 2031 * When the validation status was updated. 2032 */ 2033 @Child(name = "statusDate", type = { 2034 DateTimeType.class }, order = 4, min = 0, max = 1, modifier = false, summary = true) 2035 @Description(shortDefinition = "When the validation status was updated", formalDefinition = "When the validation status was updated.") 2036 protected DateTimeType statusDate; 2037 2038 /** 2039 * What the target is validated against (nothing; primary source; multiple 2040 * sources). 2041 */ 2042 @Child(name = "validationType", type = { 2043 CodeableConcept.class }, order = 5, min = 0, max = 1, modifier = false, summary = true) 2044 @Description(shortDefinition = "nothing | primary | multiple", formalDefinition = "What the target is validated against (nothing; primary source; multiple sources).") 2045 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-validation-type") 2046 protected CodeableConcept validationType; 2047 2048 /** 2049 * The primary process by which the target is validated (edit check; value set; 2050 * primary source; multiple sources; standalone; in context). 2051 */ 2052 @Child(name = "validationProcess", type = { 2053 CodeableConcept.class }, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = true) 2054 @Description(shortDefinition = "The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context)", formalDefinition = "The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).") 2055 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-validation-process") 2056 protected List<CodeableConcept> validationProcess; 2057 2058 /** 2059 * Frequency of revalidation. 2060 */ 2061 @Child(name = "frequency", type = { Timing.class }, order = 7, min = 0, max = 1, modifier = false, summary = false) 2062 @Description(shortDefinition = "Frequency of revalidation", formalDefinition = "Frequency of revalidation.") 2063 protected Timing frequency; 2064 2065 /** 2066 * The date/time validation was last completed (including failed validations). 2067 */ 2068 @Child(name = "lastPerformed", type = { 2069 DateTimeType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false) 2070 @Description(shortDefinition = "The date/time validation was last completed (including failed validations)", formalDefinition = "The date/time validation was last completed (including failed validations).") 2071 protected DateTimeType lastPerformed; 2072 2073 /** 2074 * The date when target is next validated, if appropriate. 2075 */ 2076 @Child(name = "nextScheduled", type = { 2077 DateType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false) 2078 @Description(shortDefinition = "The date when target is next validated, if appropriate", formalDefinition = "The date when target is next validated, if appropriate.") 2079 protected DateType nextScheduled; 2080 2081 /** 2082 * The result if validation fails (fatal; warning; record only; none). 2083 */ 2084 @Child(name = "failureAction", type = { 2085 CodeableConcept.class }, order = 10, min = 0, max = 1, modifier = false, summary = true) 2086 @Description(shortDefinition = "fatal | warn | rec-only | none", formalDefinition = "The result if validation fails (fatal; warning; record only; none).") 2087 @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/verificationresult-failure-action") 2088 protected CodeableConcept failureAction; 2089 2090 /** 2091 * Information about the primary source(s) involved in validation. 2092 */ 2093 @Child(name = "primarySource", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2094 @Description(shortDefinition = "Information about the primary source(s) involved in validation", formalDefinition = "Information about the primary source(s) involved in validation.") 2095 protected List<VerificationResultPrimarySourceComponent> primarySource; 2096 2097 /** 2098 * Information about the entity attesting to information. 2099 */ 2100 @Child(name = "attestation", type = {}, order = 12, min = 0, max = 1, modifier = false, summary = false) 2101 @Description(shortDefinition = "Information about the entity attesting to information", formalDefinition = "Information about the entity attesting to information.") 2102 protected VerificationResultAttestationComponent attestation; 2103 2104 /** 2105 * Information about the entity validating information. 2106 */ 2107 @Child(name = "validator", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false) 2108 @Description(shortDefinition = "Information about the entity validating information", formalDefinition = "Information about the entity validating information.") 2109 protected List<VerificationResultValidatorComponent> validator; 2110 2111 private static final long serialVersionUID = -284059204L; 2112 2113 /** 2114 * Constructor 2115 */ 2116 public VerificationResult() { 2117 super(); 2118 } 2119 2120 /** 2121 * Constructor 2122 */ 2123 public VerificationResult(Enumeration<Status> status) { 2124 super(); 2125 this.status = status; 2126 } 2127 2128 /** 2129 * @return {@link #target} (A resource that was validated.) 2130 */ 2131 public List<Reference> getTarget() { 2132 if (this.target == null) 2133 this.target = new ArrayList<Reference>(); 2134 return this.target; 2135 } 2136 2137 /** 2138 * @return Returns a reference to <code>this</code> for easy method chaining 2139 */ 2140 public VerificationResult setTarget(List<Reference> theTarget) { 2141 this.target = theTarget; 2142 return this; 2143 } 2144 2145 public boolean hasTarget() { 2146 if (this.target == null) 2147 return false; 2148 for (Reference item : this.target) 2149 if (!item.isEmpty()) 2150 return true; 2151 return false; 2152 } 2153 2154 public Reference addTarget() { // 3 2155 Reference t = new Reference(); 2156 if (this.target == null) 2157 this.target = new ArrayList<Reference>(); 2158 this.target.add(t); 2159 return t; 2160 } 2161 2162 public VerificationResult addTarget(Reference t) { // 3 2163 if (t == null) 2164 return this; 2165 if (this.target == null) 2166 this.target = new ArrayList<Reference>(); 2167 this.target.add(t); 2168 return this; 2169 } 2170 2171 /** 2172 * @return The first repetition of repeating field {@link #target}, creating it 2173 * if it does not already exist 2174 */ 2175 public Reference getTargetFirstRep() { 2176 if (getTarget().isEmpty()) { 2177 addTarget(); 2178 } 2179 return getTarget().get(0); 2180 } 2181 2182 /** 2183 * @deprecated Use Reference#setResource(IBaseResource) instead 2184 */ 2185 @Deprecated 2186 public List<Resource> getTargetTarget() { 2187 if (this.targetTarget == null) 2188 this.targetTarget = new ArrayList<Resource>(); 2189 return this.targetTarget; 2190 } 2191 2192 /** 2193 * @return {@link #targetLocation} (The fhirpath location(s) within the resource 2194 * that was validated.) 2195 */ 2196 public List<StringType> getTargetLocation() { 2197 if (this.targetLocation == null) 2198 this.targetLocation = new ArrayList<StringType>(); 2199 return this.targetLocation; 2200 } 2201 2202 /** 2203 * @return Returns a reference to <code>this</code> for easy method chaining 2204 */ 2205 public VerificationResult setTargetLocation(List<StringType> theTargetLocation) { 2206 this.targetLocation = theTargetLocation; 2207 return this; 2208 } 2209 2210 public boolean hasTargetLocation() { 2211 if (this.targetLocation == null) 2212 return false; 2213 for (StringType item : this.targetLocation) 2214 if (!item.isEmpty()) 2215 return true; 2216 return false; 2217 } 2218 2219 /** 2220 * @return {@link #targetLocation} (The fhirpath location(s) within the resource 2221 * that was validated.) 2222 */ 2223 public StringType addTargetLocationElement() {// 2 2224 StringType t = new StringType(); 2225 if (this.targetLocation == null) 2226 this.targetLocation = new ArrayList<StringType>(); 2227 this.targetLocation.add(t); 2228 return t; 2229 } 2230 2231 /** 2232 * @param value {@link #targetLocation} (The fhirpath location(s) within the 2233 * resource that was validated.) 2234 */ 2235 public VerificationResult addTargetLocation(String value) { // 1 2236 StringType t = new StringType(); 2237 t.setValue(value); 2238 if (this.targetLocation == null) 2239 this.targetLocation = new ArrayList<StringType>(); 2240 this.targetLocation.add(t); 2241 return this; 2242 } 2243 2244 /** 2245 * @param value {@link #targetLocation} (The fhirpath location(s) within the 2246 * resource that was validated.) 2247 */ 2248 public boolean hasTargetLocation(String value) { 2249 if (this.targetLocation == null) 2250 return false; 2251 for (StringType v : this.targetLocation) 2252 if (v.getValue().equals(value)) // string 2253 return true; 2254 return false; 2255 } 2256 2257 /** 2258 * @return {@link #need} (The frequency with which the target must be validated 2259 * (none; initial; periodic).) 2260 */ 2261 public CodeableConcept getNeed() { 2262 if (this.need == null) 2263 if (Configuration.errorOnAutoCreate()) 2264 throw new Error("Attempt to auto-create VerificationResult.need"); 2265 else if (Configuration.doAutoCreate()) 2266 this.need = new CodeableConcept(); // cc 2267 return this.need; 2268 } 2269 2270 public boolean hasNeed() { 2271 return this.need != null && !this.need.isEmpty(); 2272 } 2273 2274 /** 2275 * @param value {@link #need} (The frequency with which the target must be 2276 * validated (none; initial; periodic).) 2277 */ 2278 public VerificationResult setNeed(CodeableConcept value) { 2279 this.need = value; 2280 return this; 2281 } 2282 2283 /** 2284 * @return {@link #status} (The validation status of the target (attested; 2285 * validated; in process; requires revalidation; validation failed; 2286 * revalidation failed).). This is the underlying object with id, value 2287 * and extensions. The accessor "getStatus" gives direct access to the 2288 * value 2289 */ 2290 public Enumeration<Status> getStatusElement() { 2291 if (this.status == null) 2292 if (Configuration.errorOnAutoCreate()) 2293 throw new Error("Attempt to auto-create VerificationResult.status"); 2294 else if (Configuration.doAutoCreate()) 2295 this.status = new Enumeration<Status>(new StatusEnumFactory()); // bb 2296 return this.status; 2297 } 2298 2299 public boolean hasStatusElement() { 2300 return this.status != null && !this.status.isEmpty(); 2301 } 2302 2303 public boolean hasStatus() { 2304 return this.status != null && !this.status.isEmpty(); 2305 } 2306 2307 /** 2308 * @param value {@link #status} (The validation status of the target (attested; 2309 * validated; in process; requires revalidation; validation failed; 2310 * revalidation failed).). This is the underlying object with id, 2311 * value and extensions. The accessor "getStatus" gives direct 2312 * access to the value 2313 */ 2314 public VerificationResult setStatusElement(Enumeration<Status> value) { 2315 this.status = value; 2316 return this; 2317 } 2318 2319 /** 2320 * @return The validation status of the target (attested; validated; in process; 2321 * requires revalidation; validation failed; revalidation failed). 2322 */ 2323 public Status getStatus() { 2324 return this.status == null ? null : this.status.getValue(); 2325 } 2326 2327 /** 2328 * @param value The validation status of the target (attested; validated; in 2329 * process; requires revalidation; validation failed; revalidation 2330 * failed). 2331 */ 2332 public VerificationResult setStatus(Status value) { 2333 if (this.status == null) 2334 this.status = new Enumeration<Status>(new StatusEnumFactory()); 2335 this.status.setValue(value); 2336 return this; 2337 } 2338 2339 /** 2340 * @return {@link #statusDate} (When the validation status was updated.). This 2341 * is the underlying object with id, value and extensions. The accessor 2342 * "getStatusDate" gives direct access to the value 2343 */ 2344 public DateTimeType getStatusDateElement() { 2345 if (this.statusDate == null) 2346 if (Configuration.errorOnAutoCreate()) 2347 throw new Error("Attempt to auto-create VerificationResult.statusDate"); 2348 else if (Configuration.doAutoCreate()) 2349 this.statusDate = new DateTimeType(); // bb 2350 return this.statusDate; 2351 } 2352 2353 public boolean hasStatusDateElement() { 2354 return this.statusDate != null && !this.statusDate.isEmpty(); 2355 } 2356 2357 public boolean hasStatusDate() { 2358 return this.statusDate != null && !this.statusDate.isEmpty(); 2359 } 2360 2361 /** 2362 * @param value {@link #statusDate} (When the validation status was updated.). 2363 * This is the underlying object with id, value and extensions. The 2364 * accessor "getStatusDate" gives direct access to the value 2365 */ 2366 public VerificationResult setStatusDateElement(DateTimeType value) { 2367 this.statusDate = value; 2368 return this; 2369 } 2370 2371 /** 2372 * @return When the validation status was updated. 2373 */ 2374 public Date getStatusDate() { 2375 return this.statusDate == null ? null : this.statusDate.getValue(); 2376 } 2377 2378 /** 2379 * @param value When the validation status was updated. 2380 */ 2381 public VerificationResult setStatusDate(Date value) { 2382 if (value == null) 2383 this.statusDate = null; 2384 else { 2385 if (this.statusDate == null) 2386 this.statusDate = new DateTimeType(); 2387 this.statusDate.setValue(value); 2388 } 2389 return this; 2390 } 2391 2392 /** 2393 * @return {@link #validationType} (What the target is validated against 2394 * (nothing; primary source; multiple sources).) 2395 */ 2396 public CodeableConcept getValidationType() { 2397 if (this.validationType == null) 2398 if (Configuration.errorOnAutoCreate()) 2399 throw new Error("Attempt to auto-create VerificationResult.validationType"); 2400 else if (Configuration.doAutoCreate()) 2401 this.validationType = new CodeableConcept(); // cc 2402 return this.validationType; 2403 } 2404 2405 public boolean hasValidationType() { 2406 return this.validationType != null && !this.validationType.isEmpty(); 2407 } 2408 2409 /** 2410 * @param value {@link #validationType} (What the target is validated against 2411 * (nothing; primary source; multiple sources).) 2412 */ 2413 public VerificationResult setValidationType(CodeableConcept value) { 2414 this.validationType = value; 2415 return this; 2416 } 2417 2418 /** 2419 * @return {@link #validationProcess} (The primary process by which the target 2420 * is validated (edit check; value set; primary source; multiple 2421 * sources; standalone; in context).) 2422 */ 2423 public List<CodeableConcept> getValidationProcess() { 2424 if (this.validationProcess == null) 2425 this.validationProcess = new ArrayList<CodeableConcept>(); 2426 return this.validationProcess; 2427 } 2428 2429 /** 2430 * @return Returns a reference to <code>this</code> for easy method chaining 2431 */ 2432 public VerificationResult setValidationProcess(List<CodeableConcept> theValidationProcess) { 2433 this.validationProcess = theValidationProcess; 2434 return this; 2435 } 2436 2437 public boolean hasValidationProcess() { 2438 if (this.validationProcess == null) 2439 return false; 2440 for (CodeableConcept item : this.validationProcess) 2441 if (!item.isEmpty()) 2442 return true; 2443 return false; 2444 } 2445 2446 public CodeableConcept addValidationProcess() { // 3 2447 CodeableConcept t = new CodeableConcept(); 2448 if (this.validationProcess == null) 2449 this.validationProcess = new ArrayList<CodeableConcept>(); 2450 this.validationProcess.add(t); 2451 return t; 2452 } 2453 2454 public VerificationResult addValidationProcess(CodeableConcept t) { // 3 2455 if (t == null) 2456 return this; 2457 if (this.validationProcess == null) 2458 this.validationProcess = new ArrayList<CodeableConcept>(); 2459 this.validationProcess.add(t); 2460 return this; 2461 } 2462 2463 /** 2464 * @return The first repetition of repeating field {@link #validationProcess}, 2465 * creating it if it does not already exist 2466 */ 2467 public CodeableConcept getValidationProcessFirstRep() { 2468 if (getValidationProcess().isEmpty()) { 2469 addValidationProcess(); 2470 } 2471 return getValidationProcess().get(0); 2472 } 2473 2474 /** 2475 * @return {@link #frequency} (Frequency of revalidation.) 2476 */ 2477 public Timing getFrequency() { 2478 if (this.frequency == null) 2479 if (Configuration.errorOnAutoCreate()) 2480 throw new Error("Attempt to auto-create VerificationResult.frequency"); 2481 else if (Configuration.doAutoCreate()) 2482 this.frequency = new Timing(); // cc 2483 return this.frequency; 2484 } 2485 2486 public boolean hasFrequency() { 2487 return this.frequency != null && !this.frequency.isEmpty(); 2488 } 2489 2490 /** 2491 * @param value {@link #frequency} (Frequency of revalidation.) 2492 */ 2493 public VerificationResult setFrequency(Timing value) { 2494 this.frequency = value; 2495 return this; 2496 } 2497 2498 /** 2499 * @return {@link #lastPerformed} (The date/time validation was last completed 2500 * (including failed validations).). This is the underlying object with 2501 * id, value and extensions. The accessor "getLastPerformed" gives 2502 * direct access to the value 2503 */ 2504 public DateTimeType getLastPerformedElement() { 2505 if (this.lastPerformed == null) 2506 if (Configuration.errorOnAutoCreate()) 2507 throw new Error("Attempt to auto-create VerificationResult.lastPerformed"); 2508 else if (Configuration.doAutoCreate()) 2509 this.lastPerformed = new DateTimeType(); // bb 2510 return this.lastPerformed; 2511 } 2512 2513 public boolean hasLastPerformedElement() { 2514 return this.lastPerformed != null && !this.lastPerformed.isEmpty(); 2515 } 2516 2517 public boolean hasLastPerformed() { 2518 return this.lastPerformed != null && !this.lastPerformed.isEmpty(); 2519 } 2520 2521 /** 2522 * @param value {@link #lastPerformed} (The date/time validation was last 2523 * completed (including failed validations).). This is the 2524 * underlying object with id, value and extensions. The accessor 2525 * "getLastPerformed" gives direct access to the value 2526 */ 2527 public VerificationResult setLastPerformedElement(DateTimeType value) { 2528 this.lastPerformed = value; 2529 return this; 2530 } 2531 2532 /** 2533 * @return The date/time validation was last completed (including failed 2534 * validations). 2535 */ 2536 public Date getLastPerformed() { 2537 return this.lastPerformed == null ? null : this.lastPerformed.getValue(); 2538 } 2539 2540 /** 2541 * @param value The date/time validation was last completed (including failed 2542 * validations). 2543 */ 2544 public VerificationResult setLastPerformed(Date value) { 2545 if (value == null) 2546 this.lastPerformed = null; 2547 else { 2548 if (this.lastPerformed == null) 2549 this.lastPerformed = new DateTimeType(); 2550 this.lastPerformed.setValue(value); 2551 } 2552 return this; 2553 } 2554 2555 /** 2556 * @return {@link #nextScheduled} (The date when target is next validated, if 2557 * appropriate.). This is the underlying object with id, value and 2558 * extensions. The accessor "getNextScheduled" gives direct access to 2559 * the value 2560 */ 2561 public DateType getNextScheduledElement() { 2562 if (this.nextScheduled == null) 2563 if (Configuration.errorOnAutoCreate()) 2564 throw new Error("Attempt to auto-create VerificationResult.nextScheduled"); 2565 else if (Configuration.doAutoCreate()) 2566 this.nextScheduled = new DateType(); // bb 2567 return this.nextScheduled; 2568 } 2569 2570 public boolean hasNextScheduledElement() { 2571 return this.nextScheduled != null && !this.nextScheduled.isEmpty(); 2572 } 2573 2574 public boolean hasNextScheduled() { 2575 return this.nextScheduled != null && !this.nextScheduled.isEmpty(); 2576 } 2577 2578 /** 2579 * @param value {@link #nextScheduled} (The date when target is next validated, 2580 * if appropriate.). This is the underlying object with id, value 2581 * and extensions. The accessor "getNextScheduled" gives direct 2582 * access to the value 2583 */ 2584 public VerificationResult setNextScheduledElement(DateType value) { 2585 this.nextScheduled = value; 2586 return this; 2587 } 2588 2589 /** 2590 * @return The date when target is next validated, if appropriate. 2591 */ 2592 public Date getNextScheduled() { 2593 return this.nextScheduled == null ? null : this.nextScheduled.getValue(); 2594 } 2595 2596 /** 2597 * @param value The date when target is next validated, if appropriate. 2598 */ 2599 public VerificationResult setNextScheduled(Date value) { 2600 if (value == null) 2601 this.nextScheduled = null; 2602 else { 2603 if (this.nextScheduled == null) 2604 this.nextScheduled = new DateType(); 2605 this.nextScheduled.setValue(value); 2606 } 2607 return this; 2608 } 2609 2610 /** 2611 * @return {@link #failureAction} (The result if validation fails (fatal; 2612 * warning; record only; none).) 2613 */ 2614 public CodeableConcept getFailureAction() { 2615 if (this.failureAction == null) 2616 if (Configuration.errorOnAutoCreate()) 2617 throw new Error("Attempt to auto-create VerificationResult.failureAction"); 2618 else if (Configuration.doAutoCreate()) 2619 this.failureAction = new CodeableConcept(); // cc 2620 return this.failureAction; 2621 } 2622 2623 public boolean hasFailureAction() { 2624 return this.failureAction != null && !this.failureAction.isEmpty(); 2625 } 2626 2627 /** 2628 * @param value {@link #failureAction} (The result if validation fails (fatal; 2629 * warning; record only; none).) 2630 */ 2631 public VerificationResult setFailureAction(CodeableConcept value) { 2632 this.failureAction = value; 2633 return this; 2634 } 2635 2636 /** 2637 * @return {@link #primarySource} (Information about the primary source(s) 2638 * involved in validation.) 2639 */ 2640 public List<VerificationResultPrimarySourceComponent> getPrimarySource() { 2641 if (this.primarySource == null) 2642 this.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>(); 2643 return this.primarySource; 2644 } 2645 2646 /** 2647 * @return Returns a reference to <code>this</code> for easy method chaining 2648 */ 2649 public VerificationResult setPrimarySource(List<VerificationResultPrimarySourceComponent> thePrimarySource) { 2650 this.primarySource = thePrimarySource; 2651 return this; 2652 } 2653 2654 public boolean hasPrimarySource() { 2655 if (this.primarySource == null) 2656 return false; 2657 for (VerificationResultPrimarySourceComponent item : this.primarySource) 2658 if (!item.isEmpty()) 2659 return true; 2660 return false; 2661 } 2662 2663 public VerificationResultPrimarySourceComponent addPrimarySource() { // 3 2664 VerificationResultPrimarySourceComponent t = new VerificationResultPrimarySourceComponent(); 2665 if (this.primarySource == null) 2666 this.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>(); 2667 this.primarySource.add(t); 2668 return t; 2669 } 2670 2671 public VerificationResult addPrimarySource(VerificationResultPrimarySourceComponent t) { // 3 2672 if (t == null) 2673 return this; 2674 if (this.primarySource == null) 2675 this.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>(); 2676 this.primarySource.add(t); 2677 return this; 2678 } 2679 2680 /** 2681 * @return The first repetition of repeating field {@link #primarySource}, 2682 * creating it if it does not already exist 2683 */ 2684 public VerificationResultPrimarySourceComponent getPrimarySourceFirstRep() { 2685 if (getPrimarySource().isEmpty()) { 2686 addPrimarySource(); 2687 } 2688 return getPrimarySource().get(0); 2689 } 2690 2691 /** 2692 * @return {@link #attestation} (Information about the entity attesting to 2693 * information.) 2694 */ 2695 public VerificationResultAttestationComponent getAttestation() { 2696 if (this.attestation == null) 2697 if (Configuration.errorOnAutoCreate()) 2698 throw new Error("Attempt to auto-create VerificationResult.attestation"); 2699 else if (Configuration.doAutoCreate()) 2700 this.attestation = new VerificationResultAttestationComponent(); // cc 2701 return this.attestation; 2702 } 2703 2704 public boolean hasAttestation() { 2705 return this.attestation != null && !this.attestation.isEmpty(); 2706 } 2707 2708 /** 2709 * @param value {@link #attestation} (Information about the entity attesting to 2710 * information.) 2711 */ 2712 public VerificationResult setAttestation(VerificationResultAttestationComponent value) { 2713 this.attestation = value; 2714 return this; 2715 } 2716 2717 /** 2718 * @return {@link #validator} (Information about the entity validating 2719 * information.) 2720 */ 2721 public List<VerificationResultValidatorComponent> getValidator() { 2722 if (this.validator == null) 2723 this.validator = new ArrayList<VerificationResultValidatorComponent>(); 2724 return this.validator; 2725 } 2726 2727 /** 2728 * @return Returns a reference to <code>this</code> for easy method chaining 2729 */ 2730 public VerificationResult setValidator(List<VerificationResultValidatorComponent> theValidator) { 2731 this.validator = theValidator; 2732 return this; 2733 } 2734 2735 public boolean hasValidator() { 2736 if (this.validator == null) 2737 return false; 2738 for (VerificationResultValidatorComponent item : this.validator) 2739 if (!item.isEmpty()) 2740 return true; 2741 return false; 2742 } 2743 2744 public VerificationResultValidatorComponent addValidator() { // 3 2745 VerificationResultValidatorComponent t = new VerificationResultValidatorComponent(); 2746 if (this.validator == null) 2747 this.validator = new ArrayList<VerificationResultValidatorComponent>(); 2748 this.validator.add(t); 2749 return t; 2750 } 2751 2752 public VerificationResult addValidator(VerificationResultValidatorComponent t) { // 3 2753 if (t == null) 2754 return this; 2755 if (this.validator == null) 2756 this.validator = new ArrayList<VerificationResultValidatorComponent>(); 2757 this.validator.add(t); 2758 return this; 2759 } 2760 2761 /** 2762 * @return The first repetition of repeating field {@link #validator}, creating 2763 * it if it does not already exist 2764 */ 2765 public VerificationResultValidatorComponent getValidatorFirstRep() { 2766 if (getValidator().isEmpty()) { 2767 addValidator(); 2768 } 2769 return getValidator().get(0); 2770 } 2771 2772 protected void listChildren(List<Property> children) { 2773 super.listChildren(children); 2774 children.add(new Property("target", "Reference(Any)", "A resource that was validated.", 0, 2775 java.lang.Integer.MAX_VALUE, target)); 2776 children.add( 2777 new Property("targetLocation", "string", "The fhirpath location(s) within the resource that was validated.", 0, 2778 java.lang.Integer.MAX_VALUE, targetLocation)); 2779 children.add(new Property("need", "CodeableConcept", 2780 "The frequency with which the target must be validated (none; initial; periodic).", 0, 1, need)); 2781 children.add(new Property("status", "code", 2782 "The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).", 2783 0, 1, status)); 2784 children.add(new Property("statusDate", "dateTime", "When the validation status was updated.", 0, 1, statusDate)); 2785 children.add(new Property("validationType", "CodeableConcept", 2786 "What the target is validated against (nothing; primary source; multiple sources).", 0, 1, validationType)); 2787 children.add(new Property("validationProcess", "CodeableConcept", 2788 "The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).", 2789 0, java.lang.Integer.MAX_VALUE, validationProcess)); 2790 children.add(new Property("frequency", "Timing", "Frequency of revalidation.", 0, 1, frequency)); 2791 children.add(new Property("lastPerformed", "dateTime", 2792 "The date/time validation was last completed (including failed validations).", 0, 1, lastPerformed)); 2793 children.add(new Property("nextScheduled", "date", "The date when target is next validated, if appropriate.", 0, 1, 2794 nextScheduled)); 2795 children.add(new Property("failureAction", "CodeableConcept", 2796 "The result if validation fails (fatal; warning; record only; none).", 0, 1, failureAction)); 2797 children.add(new Property("primarySource", "", "Information about the primary source(s) involved in validation.", 0, 2798 java.lang.Integer.MAX_VALUE, primarySource)); 2799 children.add( 2800 new Property("attestation", "", "Information about the entity attesting to information.", 0, 1, attestation)); 2801 children.add(new Property("validator", "", "Information about the entity validating information.", 0, 2802 java.lang.Integer.MAX_VALUE, validator)); 2803 } 2804 2805 @Override 2806 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2807 switch (_hash) { 2808 case -880905839: 2809 /* target */ return new Property("target", "Reference(Any)", "A resource that was validated.", 0, 2810 java.lang.Integer.MAX_VALUE, target); 2811 case 308958310: 2812 /* targetLocation */ return new Property("targetLocation", "string", 2813 "The fhirpath location(s) within the resource that was validated.", 0, java.lang.Integer.MAX_VALUE, 2814 targetLocation); 2815 case 3377302: 2816 /* need */ return new Property("need", "CodeableConcept", 2817 "The frequency with which the target must be validated (none; initial; periodic).", 0, 1, need); 2818 case -892481550: 2819 /* status */ return new Property("status", "code", 2820 "The validation status of the target (attested; validated; in process; requires revalidation; validation failed; revalidation failed).", 2821 0, 1, status); 2822 case 247524032: 2823 /* statusDate */ return new Property("statusDate", "dateTime", "When the validation status was updated.", 0, 1, 2824 statusDate); 2825 case -279681197: 2826 /* validationType */ return new Property("validationType", "CodeableConcept", 2827 "What the target is validated against (nothing; primary source; multiple sources).", 0, 1, validationType); 2828 case 797680566: 2829 /* validationProcess */ return new Property("validationProcess", "CodeableConcept", 2830 "The primary process by which the target is validated (edit check; value set; primary source; multiple sources; standalone; in context).", 2831 0, java.lang.Integer.MAX_VALUE, validationProcess); 2832 case -70023844: 2833 /* frequency */ return new Property("frequency", "Timing", "Frequency of revalidation.", 0, 1, frequency); 2834 case -1313229366: 2835 /* lastPerformed */ return new Property("lastPerformed", "dateTime", 2836 "The date/time validation was last completed (including failed validations).", 0, 1, lastPerformed); 2837 case 1874589434: 2838 /* nextScheduled */ return new Property("nextScheduled", "date", 2839 "The date when target is next validated, if appropriate.", 0, 1, nextScheduled); 2840 case 1816382560: 2841 /* failureAction */ return new Property("failureAction", "CodeableConcept", 2842 "The result if validation fails (fatal; warning; record only; none).", 0, 1, failureAction); 2843 case -528721731: 2844 /* primarySource */ return new Property("primarySource", "", 2845 "Information about the primary source(s) involved in validation.", 0, java.lang.Integer.MAX_VALUE, 2846 primarySource); 2847 case -709624112: 2848 /* attestation */ return new Property("attestation", "", "Information about the entity attesting to information.", 2849 0, 1, attestation); 2850 case -1109783726: 2851 /* validator */ return new Property("validator", "", "Information about the entity validating information.", 0, 2852 java.lang.Integer.MAX_VALUE, validator); 2853 default: 2854 return super.getNamedProperty(_hash, _name, _checkValid); 2855 } 2856 2857 } 2858 2859 @Override 2860 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2861 switch (hash) { 2862 case -880905839: 2863 /* target */ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // Reference 2864 case 308958310: 2865 /* targetLocation */ return this.targetLocation == null ? new Base[0] 2866 : this.targetLocation.toArray(new Base[this.targetLocation.size()]); // StringType 2867 case 3377302: 2868 /* need */ return this.need == null ? new Base[0] : new Base[] { this.need }; // CodeableConcept 2869 case -892481550: 2870 /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<Status> 2871 case 247524032: 2872 /* statusDate */ return this.statusDate == null ? new Base[0] : new Base[] { this.statusDate }; // DateTimeType 2873 case -279681197: 2874 /* validationType */ return this.validationType == null ? new Base[0] : new Base[] { this.validationType }; // CodeableConcept 2875 case 797680566: 2876 /* validationProcess */ return this.validationProcess == null ? new Base[0] 2877 : this.validationProcess.toArray(new Base[this.validationProcess.size()]); // CodeableConcept 2878 case -70023844: 2879 /* frequency */ return this.frequency == null ? new Base[0] : new Base[] { this.frequency }; // Timing 2880 case -1313229366: 2881 /* lastPerformed */ return this.lastPerformed == null ? new Base[0] : new Base[] { this.lastPerformed }; // DateTimeType 2882 case 1874589434: 2883 /* nextScheduled */ return this.nextScheduled == null ? new Base[0] : new Base[] { this.nextScheduled }; // DateType 2884 case 1816382560: 2885 /* failureAction */ return this.failureAction == null ? new Base[0] : new Base[] { this.failureAction }; // CodeableConcept 2886 case -528721731: 2887 /* primarySource */ return this.primarySource == null ? new Base[0] 2888 : this.primarySource.toArray(new Base[this.primarySource.size()]); // VerificationResultPrimarySourceComponent 2889 case -709624112: 2890 /* attestation */ return this.attestation == null ? new Base[0] : new Base[] { this.attestation }; // VerificationResultAttestationComponent 2891 case -1109783726: 2892 /* validator */ return this.validator == null ? new Base[0] 2893 : this.validator.toArray(new Base[this.validator.size()]); // VerificationResultValidatorComponent 2894 default: 2895 return super.getProperty(hash, name, checkValid); 2896 } 2897 2898 } 2899 2900 @Override 2901 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2902 switch (hash) { 2903 case -880905839: // target 2904 this.getTarget().add(castToReference(value)); // Reference 2905 return value; 2906 case 308958310: // targetLocation 2907 this.getTargetLocation().add(castToString(value)); // StringType 2908 return value; 2909 case 3377302: // need 2910 this.need = castToCodeableConcept(value); // CodeableConcept 2911 return value; 2912 case -892481550: // status 2913 value = new StatusEnumFactory().fromType(castToCode(value)); 2914 this.status = (Enumeration) value; // Enumeration<Status> 2915 return value; 2916 case 247524032: // statusDate 2917 this.statusDate = castToDateTime(value); // DateTimeType 2918 return value; 2919 case -279681197: // validationType 2920 this.validationType = castToCodeableConcept(value); // CodeableConcept 2921 return value; 2922 case 797680566: // validationProcess 2923 this.getValidationProcess().add(castToCodeableConcept(value)); // CodeableConcept 2924 return value; 2925 case -70023844: // frequency 2926 this.frequency = castToTiming(value); // Timing 2927 return value; 2928 case -1313229366: // lastPerformed 2929 this.lastPerformed = castToDateTime(value); // DateTimeType 2930 return value; 2931 case 1874589434: // nextScheduled 2932 this.nextScheduled = castToDate(value); // DateType 2933 return value; 2934 case 1816382560: // failureAction 2935 this.failureAction = castToCodeableConcept(value); // CodeableConcept 2936 return value; 2937 case -528721731: // primarySource 2938 this.getPrimarySource().add((VerificationResultPrimarySourceComponent) value); // VerificationResultPrimarySourceComponent 2939 return value; 2940 case -709624112: // attestation 2941 this.attestation = (VerificationResultAttestationComponent) value; // VerificationResultAttestationComponent 2942 return value; 2943 case -1109783726: // validator 2944 this.getValidator().add((VerificationResultValidatorComponent) value); // VerificationResultValidatorComponent 2945 return value; 2946 default: 2947 return super.setProperty(hash, name, value); 2948 } 2949 2950 } 2951 2952 @Override 2953 public Base setProperty(String name, Base value) throws FHIRException { 2954 if (name.equals("target")) { 2955 this.getTarget().add(castToReference(value)); 2956 } else if (name.equals("targetLocation")) { 2957 this.getTargetLocation().add(castToString(value)); 2958 } else if (name.equals("need")) { 2959 this.need = castToCodeableConcept(value); // CodeableConcept 2960 } else if (name.equals("status")) { 2961 value = new StatusEnumFactory().fromType(castToCode(value)); 2962 this.status = (Enumeration) value; // Enumeration<Status> 2963 } else if (name.equals("statusDate")) { 2964 this.statusDate = castToDateTime(value); // DateTimeType 2965 } else if (name.equals("validationType")) { 2966 this.validationType = castToCodeableConcept(value); // CodeableConcept 2967 } else if (name.equals("validationProcess")) { 2968 this.getValidationProcess().add(castToCodeableConcept(value)); 2969 } else if (name.equals("frequency")) { 2970 this.frequency = castToTiming(value); // Timing 2971 } else if (name.equals("lastPerformed")) { 2972 this.lastPerformed = castToDateTime(value); // DateTimeType 2973 } else if (name.equals("nextScheduled")) { 2974 this.nextScheduled = castToDate(value); // DateType 2975 } else if (name.equals("failureAction")) { 2976 this.failureAction = castToCodeableConcept(value); // CodeableConcept 2977 } else if (name.equals("primarySource")) { 2978 this.getPrimarySource().add((VerificationResultPrimarySourceComponent) value); 2979 } else if (name.equals("attestation")) { 2980 this.attestation = (VerificationResultAttestationComponent) value; // VerificationResultAttestationComponent 2981 } else if (name.equals("validator")) { 2982 this.getValidator().add((VerificationResultValidatorComponent) value); 2983 } else 2984 return super.setProperty(name, value); 2985 return value; 2986 } 2987 2988 @Override 2989 public Base makeProperty(int hash, String name) throws FHIRException { 2990 switch (hash) { 2991 case -880905839: 2992 return addTarget(); 2993 case 308958310: 2994 return addTargetLocationElement(); 2995 case 3377302: 2996 return getNeed(); 2997 case -892481550: 2998 return getStatusElement(); 2999 case 247524032: 3000 return getStatusDateElement(); 3001 case -279681197: 3002 return getValidationType(); 3003 case 797680566: 3004 return addValidationProcess(); 3005 case -70023844: 3006 return getFrequency(); 3007 case -1313229366: 3008 return getLastPerformedElement(); 3009 case 1874589434: 3010 return getNextScheduledElement(); 3011 case 1816382560: 3012 return getFailureAction(); 3013 case -528721731: 3014 return addPrimarySource(); 3015 case -709624112: 3016 return getAttestation(); 3017 case -1109783726: 3018 return addValidator(); 3019 default: 3020 return super.makeProperty(hash, name); 3021 } 3022 3023 } 3024 3025 @Override 3026 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3027 switch (hash) { 3028 case -880905839: 3029 /* target */ return new String[] { "Reference" }; 3030 case 308958310: 3031 /* targetLocation */ return new String[] { "string" }; 3032 case 3377302: 3033 /* need */ return new String[] { "CodeableConcept" }; 3034 case -892481550: 3035 /* status */ return new String[] { "code" }; 3036 case 247524032: 3037 /* statusDate */ return new String[] { "dateTime" }; 3038 case -279681197: 3039 /* validationType */ return new String[] { "CodeableConcept" }; 3040 case 797680566: 3041 /* validationProcess */ return new String[] { "CodeableConcept" }; 3042 case -70023844: 3043 /* frequency */ return new String[] { "Timing" }; 3044 case -1313229366: 3045 /* lastPerformed */ return new String[] { "dateTime" }; 3046 case 1874589434: 3047 /* nextScheduled */ return new String[] { "date" }; 3048 case 1816382560: 3049 /* failureAction */ return new String[] { "CodeableConcept" }; 3050 case -528721731: 3051 /* primarySource */ return new String[] {}; 3052 case -709624112: 3053 /* attestation */ return new String[] {}; 3054 case -1109783726: 3055 /* validator */ return new String[] {}; 3056 default: 3057 return super.getTypesForProperty(hash, name); 3058 } 3059 3060 } 3061 3062 @Override 3063 public Base addChild(String name) throws FHIRException { 3064 if (name.equals("target")) { 3065 return addTarget(); 3066 } else if (name.equals("targetLocation")) { 3067 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.targetLocation"); 3068 } else if (name.equals("need")) { 3069 this.need = new CodeableConcept(); 3070 return this.need; 3071 } else if (name.equals("status")) { 3072 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.status"); 3073 } else if (name.equals("statusDate")) { 3074 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.statusDate"); 3075 } else if (name.equals("validationType")) { 3076 this.validationType = new CodeableConcept(); 3077 return this.validationType; 3078 } else if (name.equals("validationProcess")) { 3079 return addValidationProcess(); 3080 } else if (name.equals("frequency")) { 3081 this.frequency = new Timing(); 3082 return this.frequency; 3083 } else if (name.equals("lastPerformed")) { 3084 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.lastPerformed"); 3085 } else if (name.equals("nextScheduled")) { 3086 throw new FHIRException("Cannot call addChild on a singleton property VerificationResult.nextScheduled"); 3087 } else if (name.equals("failureAction")) { 3088 this.failureAction = new CodeableConcept(); 3089 return this.failureAction; 3090 } else if (name.equals("primarySource")) { 3091 return addPrimarySource(); 3092 } else if (name.equals("attestation")) { 3093 this.attestation = new VerificationResultAttestationComponent(); 3094 return this.attestation; 3095 } else if (name.equals("validator")) { 3096 return addValidator(); 3097 } else 3098 return super.addChild(name); 3099 } 3100 3101 public String fhirType() { 3102 return "VerificationResult"; 3103 3104 } 3105 3106 public VerificationResult copy() { 3107 VerificationResult dst = new VerificationResult(); 3108 copyValues(dst); 3109 return dst; 3110 } 3111 3112 public void copyValues(VerificationResult dst) { 3113 super.copyValues(dst); 3114 if (target != null) { 3115 dst.target = new ArrayList<Reference>(); 3116 for (Reference i : target) 3117 dst.target.add(i.copy()); 3118 } 3119 ; 3120 if (targetLocation != null) { 3121 dst.targetLocation = new ArrayList<StringType>(); 3122 for (StringType i : targetLocation) 3123 dst.targetLocation.add(i.copy()); 3124 } 3125 ; 3126 dst.need = need == null ? null : need.copy(); 3127 dst.status = status == null ? null : status.copy(); 3128 dst.statusDate = statusDate == null ? null : statusDate.copy(); 3129 dst.validationType = validationType == null ? null : validationType.copy(); 3130 if (validationProcess != null) { 3131 dst.validationProcess = new ArrayList<CodeableConcept>(); 3132 for (CodeableConcept i : validationProcess) 3133 dst.validationProcess.add(i.copy()); 3134 } 3135 ; 3136 dst.frequency = frequency == null ? null : frequency.copy(); 3137 dst.lastPerformed = lastPerformed == null ? null : lastPerformed.copy(); 3138 dst.nextScheduled = nextScheduled == null ? null : nextScheduled.copy(); 3139 dst.failureAction = failureAction == null ? null : failureAction.copy(); 3140 if (primarySource != null) { 3141 dst.primarySource = new ArrayList<VerificationResultPrimarySourceComponent>(); 3142 for (VerificationResultPrimarySourceComponent i : primarySource) 3143 dst.primarySource.add(i.copy()); 3144 } 3145 ; 3146 dst.attestation = attestation == null ? null : attestation.copy(); 3147 if (validator != null) { 3148 dst.validator = new ArrayList<VerificationResultValidatorComponent>(); 3149 for (VerificationResultValidatorComponent i : validator) 3150 dst.validator.add(i.copy()); 3151 } 3152 ; 3153 } 3154 3155 protected VerificationResult typedCopy() { 3156 return copy(); 3157 } 3158 3159 @Override 3160 public boolean equalsDeep(Base other_) { 3161 if (!super.equalsDeep(other_)) 3162 return false; 3163 if (!(other_ instanceof VerificationResult)) 3164 return false; 3165 VerificationResult o = (VerificationResult) other_; 3166 return compareDeep(target, o.target, true) && compareDeep(targetLocation, o.targetLocation, true) 3167 && compareDeep(need, o.need, true) && compareDeep(status, o.status, true) 3168 && compareDeep(statusDate, o.statusDate, true) && compareDeep(validationType, o.validationType, true) 3169 && compareDeep(validationProcess, o.validationProcess, true) && compareDeep(frequency, o.frequency, true) 3170 && compareDeep(lastPerformed, o.lastPerformed, true) && compareDeep(nextScheduled, o.nextScheduled, true) 3171 && compareDeep(failureAction, o.failureAction, true) && compareDeep(primarySource, o.primarySource, true) 3172 && compareDeep(attestation, o.attestation, true) && compareDeep(validator, o.validator, true); 3173 } 3174 3175 @Override 3176 public boolean equalsShallow(Base other_) { 3177 if (!super.equalsShallow(other_)) 3178 return false; 3179 if (!(other_ instanceof VerificationResult)) 3180 return false; 3181 VerificationResult o = (VerificationResult) other_; 3182 return compareValues(targetLocation, o.targetLocation, true) && compareValues(status, o.status, true) 3183 && compareValues(statusDate, o.statusDate, true) && compareValues(lastPerformed, o.lastPerformed, true) 3184 && compareValues(nextScheduled, o.nextScheduled, true); 3185 } 3186 3187 public boolean isEmpty() { 3188 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(target, targetLocation, need, status, statusDate, 3189 validationType, validationProcess, frequency, lastPerformed, nextScheduled, failureAction, primarySource, 3190 attestation, validator); 3191 } 3192 3193 @Override 3194 public ResourceType getResourceType() { 3195 return ResourceType.VerificationResult; 3196 } 3197 3198 /** 3199 * Search parameter: <b>target</b> 3200 * <p> 3201 * Description: <b>A resource that was validated</b><br> 3202 * Type: <b>reference</b><br> 3203 * Path: <b>VerificationResult.target</b><br> 3204 * </p> 3205 */ 3206 @SearchParamDefinition(name = "target", path = "VerificationResult.target", description = "A resource that was validated", type = "reference") 3207 public static final String SP_TARGET = "target"; 3208 /** 3209 * <b>Fluent Client</b> search parameter constant for <b>target</b> 3210 * <p> 3211 * Description: <b>A resource that was validated</b><br> 3212 * Type: <b>reference</b><br> 3213 * Path: <b>VerificationResult.target</b><br> 3214 * </p> 3215 */ 3216 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam TARGET = new ca.uhn.fhir.rest.gclient.ReferenceClientParam( 3217 SP_TARGET); 3218 3219 /** 3220 * Constant for fluent queries to be used to add include statements. Specifies 3221 * the path value of "<b>VerificationResult:target</b>". 3222 */ 3223 public static final ca.uhn.fhir.model.api.Include INCLUDE_TARGET = new ca.uhn.fhir.model.api.Include( 3224 "VerificationResult:target").toLocked(); 3225 3226}