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