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