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