
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts. 052 */ 053@ResourceDef(name="EvidenceReport", profile="http://hl7.org/fhir/StructureDefinition/EvidenceReport") 054public class EvidenceReport extends MetadataResource { 055 056 public enum ReportRelationshipType { 057 /** 058 * This document replaces or supersedes the target document. 059 */ 060 REPLACES, 061 /** 062 * This document notes corrections or changes to replace or supersede parts of the target document. 063 */ 064 AMENDS, 065 /** 066 * This document adds additional information to the target document. 067 */ 068 APPENDS, 069 /** 070 * This document was generated by transforming the target document (eg format or language conversion). 071 */ 072 TRANSFORMS, 073 /** 074 * This document was. 075 */ 076 REPLACEDWITH, 077 /** 078 * This document was. 079 */ 080 AMENDEDWITH, 081 /** 082 * This document was. 083 */ 084 APPENDEDWITH, 085 /** 086 * This document was. 087 */ 088 TRANSFORMEDWITH, 089 /** 090 * added to help the parsers with the generic types 091 */ 092 NULL; 093 public static ReportRelationshipType fromCode(String codeString) throws FHIRException { 094 if (codeString == null || "".equals(codeString)) 095 return null; 096 if ("replaces".equals(codeString)) 097 return REPLACES; 098 if ("amends".equals(codeString)) 099 return AMENDS; 100 if ("appends".equals(codeString)) 101 return APPENDS; 102 if ("transforms".equals(codeString)) 103 return TRANSFORMS; 104 if ("replacedWith".equals(codeString)) 105 return REPLACEDWITH; 106 if ("amendedWith".equals(codeString)) 107 return AMENDEDWITH; 108 if ("appendedWith".equals(codeString)) 109 return APPENDEDWITH; 110 if ("transformedWith".equals(codeString)) 111 return TRANSFORMEDWITH; 112 if (Configuration.isAcceptInvalidEnums()) 113 return null; 114 else 115 throw new FHIRException("Unknown ReportRelationshipType code '"+codeString+"'"); 116 } 117 public String toCode() { 118 switch (this) { 119 case REPLACES: return "replaces"; 120 case AMENDS: return "amends"; 121 case APPENDS: return "appends"; 122 case TRANSFORMS: return "transforms"; 123 case REPLACEDWITH: return "replacedWith"; 124 case AMENDEDWITH: return "amendedWith"; 125 case APPENDEDWITH: return "appendedWith"; 126 case TRANSFORMEDWITH: return "transformedWith"; 127 default: return "?"; 128 } 129 } 130 public String getSystem() { 131 switch (this) { 132 case REPLACES: return "http://hl7.org/fhir/report-relation-type"; 133 case AMENDS: return "http://hl7.org/fhir/report-relation-type"; 134 case APPENDS: return "http://hl7.org/fhir/report-relation-type"; 135 case TRANSFORMS: return "http://hl7.org/fhir/report-relation-type"; 136 case REPLACEDWITH: return "http://hl7.org/fhir/report-relation-type"; 137 case AMENDEDWITH: return "http://hl7.org/fhir/report-relation-type"; 138 case APPENDEDWITH: return "http://hl7.org/fhir/report-relation-type"; 139 case TRANSFORMEDWITH: return "http://hl7.org/fhir/report-relation-type"; 140 default: return "?"; 141 } 142 } 143 public String getDefinition() { 144 switch (this) { 145 case REPLACES: return "This document replaces or supersedes the target document."; 146 case AMENDS: return "This document notes corrections or changes to replace or supersede parts of the target document."; 147 case APPENDS: return "This document adds additional information to the target document."; 148 case TRANSFORMS: return "This document was generated by transforming the target document (eg format or language conversion)."; 149 case REPLACEDWITH: return "This document was."; 150 case AMENDEDWITH: return "This document was."; 151 case APPENDEDWITH: return "This document was."; 152 case TRANSFORMEDWITH: return "This document was."; 153 default: return "?"; 154 } 155 } 156 public String getDisplay() { 157 switch (this) { 158 case REPLACES: return "Replaces"; 159 case AMENDS: return "Amends"; 160 case APPENDS: return "Appends"; 161 case TRANSFORMS: return "Transforms"; 162 case REPLACEDWITH: return "Replaced With"; 163 case AMENDEDWITH: return "Amended With"; 164 case APPENDEDWITH: return "Appended With"; 165 case TRANSFORMEDWITH: return "Transformed With"; 166 default: return "?"; 167 } 168 } 169 } 170 171 public static class ReportRelationshipTypeEnumFactory implements EnumFactory<ReportRelationshipType> { 172 public ReportRelationshipType fromCode(String codeString) throws IllegalArgumentException { 173 if (codeString == null || "".equals(codeString)) 174 if (codeString == null || "".equals(codeString)) 175 return null; 176 if ("replaces".equals(codeString)) 177 return ReportRelationshipType.REPLACES; 178 if ("amends".equals(codeString)) 179 return ReportRelationshipType.AMENDS; 180 if ("appends".equals(codeString)) 181 return ReportRelationshipType.APPENDS; 182 if ("transforms".equals(codeString)) 183 return ReportRelationshipType.TRANSFORMS; 184 if ("replacedWith".equals(codeString)) 185 return ReportRelationshipType.REPLACEDWITH; 186 if ("amendedWith".equals(codeString)) 187 return ReportRelationshipType.AMENDEDWITH; 188 if ("appendedWith".equals(codeString)) 189 return ReportRelationshipType.APPENDEDWITH; 190 if ("transformedWith".equals(codeString)) 191 return ReportRelationshipType.TRANSFORMEDWITH; 192 throw new IllegalArgumentException("Unknown ReportRelationshipType code '"+codeString+"'"); 193 } 194 public Enumeration<ReportRelationshipType> fromType(Base code) throws FHIRException { 195 if (code == null) 196 return null; 197 if (code.isEmpty()) 198 return new Enumeration<ReportRelationshipType>(this); 199 String codeString = ((PrimitiveType) code).asStringValue(); 200 if (codeString == null || "".equals(codeString)) 201 return null; 202 if ("replaces".equals(codeString)) 203 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.REPLACES); 204 if ("amends".equals(codeString)) 205 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.AMENDS); 206 if ("appends".equals(codeString)) 207 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.APPENDS); 208 if ("transforms".equals(codeString)) 209 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.TRANSFORMS); 210 if ("replacedWith".equals(codeString)) 211 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.REPLACEDWITH); 212 if ("amendedWith".equals(codeString)) 213 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.AMENDEDWITH); 214 if ("appendedWith".equals(codeString)) 215 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.APPENDEDWITH); 216 if ("transformedWith".equals(codeString)) 217 return new Enumeration<ReportRelationshipType>(this, ReportRelationshipType.TRANSFORMEDWITH); 218 throw new FHIRException("Unknown ReportRelationshipType code '"+codeString+"'"); 219 } 220 public String toCode(ReportRelationshipType code) { 221 if (code == ReportRelationshipType.REPLACES) 222 return "replaces"; 223 if (code == ReportRelationshipType.AMENDS) 224 return "amends"; 225 if (code == ReportRelationshipType.APPENDS) 226 return "appends"; 227 if (code == ReportRelationshipType.TRANSFORMS) 228 return "transforms"; 229 if (code == ReportRelationshipType.REPLACEDWITH) 230 return "replacedWith"; 231 if (code == ReportRelationshipType.AMENDEDWITH) 232 return "amendedWith"; 233 if (code == ReportRelationshipType.APPENDEDWITH) 234 return "appendedWith"; 235 if (code == ReportRelationshipType.TRANSFORMEDWITH) 236 return "transformedWith"; 237 return "?"; 238 } 239 public String toSystem(ReportRelationshipType code) { 240 return code.getSystem(); 241 } 242 } 243 244 @Block() 245 public static class EvidenceReportSubjectComponent extends BackboneElement implements IBaseBackboneElement { 246 /** 247 * Characteristic. 248 */ 249 @Child(name = "characteristic", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 250 @Description(shortDefinition="Characteristic", formalDefinition="Characteristic." ) 251 protected List<EvidenceReportSubjectCharacteristicComponent> characteristic; 252 253 /** 254 * Used for general notes and annotations not coded elsewhere. 255 */ 256 @Child(name = "note", type = {Annotation.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 257 @Description(shortDefinition="Footnotes and/or explanatory notes", formalDefinition="Used for general notes and annotations not coded elsewhere." ) 258 protected List<Annotation> note; 259 260 private static final long serialVersionUID = -734040873L; 261 262 /** 263 * Constructor 264 */ 265 public EvidenceReportSubjectComponent() { 266 super(); 267 } 268 269 /** 270 * @return {@link #characteristic} (Characteristic.) 271 */ 272 public List<EvidenceReportSubjectCharacteristicComponent> getCharacteristic() { 273 if (this.characteristic == null) 274 this.characteristic = new ArrayList<EvidenceReportSubjectCharacteristicComponent>(); 275 return this.characteristic; 276 } 277 278 /** 279 * @return Returns a reference to <code>this</code> for easy method chaining 280 */ 281 public EvidenceReportSubjectComponent setCharacteristic(List<EvidenceReportSubjectCharacteristicComponent> theCharacteristic) { 282 this.characteristic = theCharacteristic; 283 return this; 284 } 285 286 public boolean hasCharacteristic() { 287 if (this.characteristic == null) 288 return false; 289 for (EvidenceReportSubjectCharacteristicComponent item : this.characteristic) 290 if (!item.isEmpty()) 291 return true; 292 return false; 293 } 294 295 public EvidenceReportSubjectCharacteristicComponent addCharacteristic() { //3 296 EvidenceReportSubjectCharacteristicComponent t = new EvidenceReportSubjectCharacteristicComponent(); 297 if (this.characteristic == null) 298 this.characteristic = new ArrayList<EvidenceReportSubjectCharacteristicComponent>(); 299 this.characteristic.add(t); 300 return t; 301 } 302 303 public EvidenceReportSubjectComponent addCharacteristic(EvidenceReportSubjectCharacteristicComponent t) { //3 304 if (t == null) 305 return this; 306 if (this.characteristic == null) 307 this.characteristic = new ArrayList<EvidenceReportSubjectCharacteristicComponent>(); 308 this.characteristic.add(t); 309 return this; 310 } 311 312 /** 313 * @return The first repetition of repeating field {@link #characteristic}, creating it if it does not already exist {3} 314 */ 315 public EvidenceReportSubjectCharacteristicComponent getCharacteristicFirstRep() { 316 if (getCharacteristic().isEmpty()) { 317 addCharacteristic(); 318 } 319 return getCharacteristic().get(0); 320 } 321 322 /** 323 * @return {@link #note} (Used for general notes and annotations not coded elsewhere.) 324 */ 325 public List<Annotation> getNote() { 326 if (this.note == null) 327 this.note = new ArrayList<Annotation>(); 328 return this.note; 329 } 330 331 /** 332 * @return Returns a reference to <code>this</code> for easy method chaining 333 */ 334 public EvidenceReportSubjectComponent setNote(List<Annotation> theNote) { 335 this.note = theNote; 336 return this; 337 } 338 339 public boolean hasNote() { 340 if (this.note == null) 341 return false; 342 for (Annotation item : this.note) 343 if (!item.isEmpty()) 344 return true; 345 return false; 346 } 347 348 public Annotation addNote() { //3 349 Annotation t = new Annotation(); 350 if (this.note == null) 351 this.note = new ArrayList<Annotation>(); 352 this.note.add(t); 353 return t; 354 } 355 356 public EvidenceReportSubjectComponent addNote(Annotation t) { //3 357 if (t == null) 358 return this; 359 if (this.note == null) 360 this.note = new ArrayList<Annotation>(); 361 this.note.add(t); 362 return this; 363 } 364 365 /** 366 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 367 */ 368 public Annotation getNoteFirstRep() { 369 if (getNote().isEmpty()) { 370 addNote(); 371 } 372 return getNote().get(0); 373 } 374 375 protected void listChildren(List<Property> children) { 376 super.listChildren(children); 377 children.add(new Property("characteristic", "", "Characteristic.", 0, java.lang.Integer.MAX_VALUE, characteristic)); 378 children.add(new Property("note", "Annotation", "Used for general notes and annotations not coded elsewhere.", 0, java.lang.Integer.MAX_VALUE, note)); 379 } 380 381 @Override 382 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 383 switch (_hash) { 384 case 366313883: /*characteristic*/ return new Property("characteristic", "", "Characteristic.", 0, java.lang.Integer.MAX_VALUE, characteristic); 385 case 3387378: /*note*/ return new Property("note", "Annotation", "Used for general notes and annotations not coded elsewhere.", 0, java.lang.Integer.MAX_VALUE, note); 386 default: return super.getNamedProperty(_hash, _name, _checkValid); 387 } 388 389 } 390 391 @Override 392 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 393 switch (hash) { 394 case 366313883: /*characteristic*/ return this.characteristic == null ? new Base[0] : this.characteristic.toArray(new Base[this.characteristic.size()]); // EvidenceReportSubjectCharacteristicComponent 395 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 396 default: return super.getProperty(hash, name, checkValid); 397 } 398 399 } 400 401 @Override 402 public Base setProperty(int hash, String name, Base value) throws FHIRException { 403 switch (hash) { 404 case 366313883: // characteristic 405 this.getCharacteristic().add((EvidenceReportSubjectCharacteristicComponent) value); // EvidenceReportSubjectCharacteristicComponent 406 return value; 407 case 3387378: // note 408 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 409 return value; 410 default: return super.setProperty(hash, name, value); 411 } 412 413 } 414 415 @Override 416 public Base setProperty(String name, Base value) throws FHIRException { 417 if (name.equals("characteristic")) { 418 this.getCharacteristic().add((EvidenceReportSubjectCharacteristicComponent) value); 419 } else if (name.equals("note")) { 420 this.getNote().add(TypeConvertor.castToAnnotation(value)); 421 } else 422 return super.setProperty(name, value); 423 return value; 424 } 425 426 @Override 427 public Base makeProperty(int hash, String name) throws FHIRException { 428 switch (hash) { 429 case 366313883: return addCharacteristic(); 430 case 3387378: return addNote(); 431 default: return super.makeProperty(hash, name); 432 } 433 434 } 435 436 @Override 437 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 438 switch (hash) { 439 case 366313883: /*characteristic*/ return new String[] {}; 440 case 3387378: /*note*/ return new String[] {"Annotation"}; 441 default: return super.getTypesForProperty(hash, name); 442 } 443 444 } 445 446 @Override 447 public Base addChild(String name) throws FHIRException { 448 if (name.equals("characteristic")) { 449 return addCharacteristic(); 450 } 451 else if (name.equals("note")) { 452 return addNote(); 453 } 454 else 455 return super.addChild(name); 456 } 457 458 public EvidenceReportSubjectComponent copy() { 459 EvidenceReportSubjectComponent dst = new EvidenceReportSubjectComponent(); 460 copyValues(dst); 461 return dst; 462 } 463 464 public void copyValues(EvidenceReportSubjectComponent dst) { 465 super.copyValues(dst); 466 if (characteristic != null) { 467 dst.characteristic = new ArrayList<EvidenceReportSubjectCharacteristicComponent>(); 468 for (EvidenceReportSubjectCharacteristicComponent i : characteristic) 469 dst.characteristic.add(i.copy()); 470 }; 471 if (note != null) { 472 dst.note = new ArrayList<Annotation>(); 473 for (Annotation i : note) 474 dst.note.add(i.copy()); 475 }; 476 } 477 478 @Override 479 public boolean equalsDeep(Base other_) { 480 if (!super.equalsDeep(other_)) 481 return false; 482 if (!(other_ instanceof EvidenceReportSubjectComponent)) 483 return false; 484 EvidenceReportSubjectComponent o = (EvidenceReportSubjectComponent) other_; 485 return compareDeep(characteristic, o.characteristic, true) && compareDeep(note, o.note, true); 486 } 487 488 @Override 489 public boolean equalsShallow(Base other_) { 490 if (!super.equalsShallow(other_)) 491 return false; 492 if (!(other_ instanceof EvidenceReportSubjectComponent)) 493 return false; 494 EvidenceReportSubjectComponent o = (EvidenceReportSubjectComponent) other_; 495 return true; 496 } 497 498 public boolean isEmpty() { 499 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(characteristic, note); 500 } 501 502 public String fhirType() { 503 return "EvidenceReport.subject"; 504 505 } 506 507 } 508 509 @Block() 510 public static class EvidenceReportSubjectCharacteristicComponent extends BackboneElement implements IBaseBackboneElement { 511 /** 512 * Characteristic code. 513 */ 514 @Child(name = "code", type = {CodeableConcept.class}, order=1, min=1, max=1, modifier=false, summary=false) 515 @Description(shortDefinition="Characteristic code", formalDefinition="Characteristic code." ) 516 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/focus-characteristic-code") 517 protected CodeableConcept code; 518 519 /** 520 * Characteristic value. 521 */ 522 @Child(name = "value", type = {Reference.class, CodeableConcept.class, BooleanType.class, Quantity.class, Range.class}, order=2, min=1, max=1, modifier=false, summary=false) 523 @Description(shortDefinition="Characteristic value", formalDefinition="Characteristic value." ) 524 protected DataType value; 525 526 /** 527 * Is used to express not the characteristic. 528 */ 529 @Child(name = "exclude", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false) 530 @Description(shortDefinition="Is used to express not the characteristic", formalDefinition="Is used to express not the characteristic." ) 531 protected BooleanType exclude; 532 533 /** 534 * Timeframe for the characteristic. 535 */ 536 @Child(name = "period", type = {Period.class}, order=4, min=0, max=1, modifier=false, summary=false) 537 @Description(shortDefinition="Timeframe for the characteristic", formalDefinition="Timeframe for the characteristic." ) 538 protected Period period; 539 540 private static final long serialVersionUID = 279867823L; 541 542 /** 543 * Constructor 544 */ 545 public EvidenceReportSubjectCharacteristicComponent() { 546 super(); 547 } 548 549 /** 550 * Constructor 551 */ 552 public EvidenceReportSubjectCharacteristicComponent(CodeableConcept code, DataType value) { 553 super(); 554 this.setCode(code); 555 this.setValue(value); 556 } 557 558 /** 559 * @return {@link #code} (Characteristic code.) 560 */ 561 public CodeableConcept getCode() { 562 if (this.code == null) 563 if (Configuration.errorOnAutoCreate()) 564 throw new Error("Attempt to auto-create EvidenceReportSubjectCharacteristicComponent.code"); 565 else if (Configuration.doAutoCreate()) 566 this.code = new CodeableConcept(); // cc 567 return this.code; 568 } 569 570 public boolean hasCode() { 571 return this.code != null && !this.code.isEmpty(); 572 } 573 574 /** 575 * @param value {@link #code} (Characteristic code.) 576 */ 577 public EvidenceReportSubjectCharacteristicComponent setCode(CodeableConcept value) { 578 this.code = value; 579 return this; 580 } 581 582 /** 583 * @return {@link #value} (Characteristic value.) 584 */ 585 public DataType getValue() { 586 return this.value; 587 } 588 589 /** 590 * @return {@link #value} (Characteristic value.) 591 */ 592 public Reference getValueReference() throws FHIRException { 593 if (this.value == null) 594 this.value = new Reference(); 595 if (!(this.value instanceof Reference)) 596 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 597 return (Reference) this.value; 598 } 599 600 public boolean hasValueReference() { 601 return this != null && this.value instanceof Reference; 602 } 603 604 /** 605 * @return {@link #value} (Characteristic value.) 606 */ 607 public CodeableConcept getValueCodeableConcept() throws FHIRException { 608 if (this.value == null) 609 this.value = new CodeableConcept(); 610 if (!(this.value instanceof CodeableConcept)) 611 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 612 return (CodeableConcept) this.value; 613 } 614 615 public boolean hasValueCodeableConcept() { 616 return this != null && this.value instanceof CodeableConcept; 617 } 618 619 /** 620 * @return {@link #value} (Characteristic value.) 621 */ 622 public BooleanType getValueBooleanType() throws FHIRException { 623 if (this.value == null) 624 this.value = new BooleanType(); 625 if (!(this.value instanceof BooleanType)) 626 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 627 return (BooleanType) this.value; 628 } 629 630 public boolean hasValueBooleanType() { 631 return this != null && this.value instanceof BooleanType; 632 } 633 634 /** 635 * @return {@link #value} (Characteristic value.) 636 */ 637 public Quantity getValueQuantity() throws FHIRException { 638 if (this.value == null) 639 this.value = new Quantity(); 640 if (!(this.value instanceof Quantity)) 641 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 642 return (Quantity) this.value; 643 } 644 645 public boolean hasValueQuantity() { 646 return this != null && this.value instanceof Quantity; 647 } 648 649 /** 650 * @return {@link #value} (Characteristic value.) 651 */ 652 public Range getValueRange() throws FHIRException { 653 if (this.value == null) 654 this.value = new Range(); 655 if (!(this.value instanceof Range)) 656 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 657 return (Range) this.value; 658 } 659 660 public boolean hasValueRange() { 661 return this != null && this.value instanceof Range; 662 } 663 664 public boolean hasValue() { 665 return this.value != null && !this.value.isEmpty(); 666 } 667 668 /** 669 * @param value {@link #value} (Characteristic value.) 670 */ 671 public EvidenceReportSubjectCharacteristicComponent setValue(DataType value) { 672 if (value != null && !(value instanceof Reference || value instanceof CodeableConcept || value instanceof BooleanType || value instanceof Quantity || value instanceof Range)) 673 throw new Error("Not the right type for EvidenceReport.subject.characteristic.value[x]: "+value.fhirType()); 674 this.value = value; 675 return this; 676 } 677 678 /** 679 * @return {@link #exclude} (Is used to express not the characteristic.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value 680 */ 681 public BooleanType getExcludeElement() { 682 if (this.exclude == null) 683 if (Configuration.errorOnAutoCreate()) 684 throw new Error("Attempt to auto-create EvidenceReportSubjectCharacteristicComponent.exclude"); 685 else if (Configuration.doAutoCreate()) 686 this.exclude = new BooleanType(); // bb 687 return this.exclude; 688 } 689 690 public boolean hasExcludeElement() { 691 return this.exclude != null && !this.exclude.isEmpty(); 692 } 693 694 public boolean hasExclude() { 695 return this.exclude != null && !this.exclude.isEmpty(); 696 } 697 698 /** 699 * @param value {@link #exclude} (Is used to express not the characteristic.). This is the underlying object with id, value and extensions. The accessor "getExclude" gives direct access to the value 700 */ 701 public EvidenceReportSubjectCharacteristicComponent setExcludeElement(BooleanType value) { 702 this.exclude = value; 703 return this; 704 } 705 706 /** 707 * @return Is used to express not the characteristic. 708 */ 709 public boolean getExclude() { 710 return this.exclude == null || this.exclude.isEmpty() ? false : this.exclude.getValue(); 711 } 712 713 /** 714 * @param value Is used to express not the characteristic. 715 */ 716 public EvidenceReportSubjectCharacteristicComponent setExclude(boolean value) { 717 if (this.exclude == null) 718 this.exclude = new BooleanType(); 719 this.exclude.setValue(value); 720 return this; 721 } 722 723 /** 724 * @return {@link #period} (Timeframe for the characteristic.) 725 */ 726 public Period getPeriod() { 727 if (this.period == null) 728 if (Configuration.errorOnAutoCreate()) 729 throw new Error("Attempt to auto-create EvidenceReportSubjectCharacteristicComponent.period"); 730 else if (Configuration.doAutoCreate()) 731 this.period = new Period(); // cc 732 return this.period; 733 } 734 735 public boolean hasPeriod() { 736 return this.period != null && !this.period.isEmpty(); 737 } 738 739 /** 740 * @param value {@link #period} (Timeframe for the characteristic.) 741 */ 742 public EvidenceReportSubjectCharacteristicComponent setPeriod(Period value) { 743 this.period = value; 744 return this; 745 } 746 747 protected void listChildren(List<Property> children) { 748 super.listChildren(children); 749 children.add(new Property("code", "CodeableConcept", "Characteristic code.", 0, 1, code)); 750 children.add(new Property("value[x]", "Reference(Any)|CodeableConcept|boolean|Quantity|Range", "Characteristic value.", 0, 1, value)); 751 children.add(new Property("exclude", "boolean", "Is used to express not the characteristic.", 0, 1, exclude)); 752 children.add(new Property("period", "Period", "Timeframe for the characteristic.", 0, 1, period)); 753 } 754 755 @Override 756 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 757 switch (_hash) { 758 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "Characteristic code.", 0, 1, code); 759 case -1410166417: /*value[x]*/ return new Property("value[x]", "Reference(Any)|CodeableConcept|boolean|Quantity|Range", "Characteristic value.", 0, 1, value); 760 case 111972721: /*value*/ return new Property("value[x]", "Reference(Any)|CodeableConcept|boolean|Quantity|Range", "Characteristic value.", 0, 1, value); 761 case 1755241690: /*valueReference*/ return new Property("value[x]", "Reference(Any)", "Characteristic value.", 0, 1, value); 762 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "Characteristic value.", 0, 1, value); 763 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "Characteristic value.", 0, 1, value); 764 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "Characteristic value.", 0, 1, value); 765 case 2030761548: /*valueRange*/ return new Property("value[x]", "Range", "Characteristic value.", 0, 1, value); 766 case -1321148966: /*exclude*/ return new Property("exclude", "boolean", "Is used to express not the characteristic.", 0, 1, exclude); 767 case -991726143: /*period*/ return new Property("period", "Period", "Timeframe for the characteristic.", 0, 1, period); 768 default: return super.getNamedProperty(_hash, _name, _checkValid); 769 } 770 771 } 772 773 @Override 774 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 775 switch (hash) { 776 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 777 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 778 case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : new Base[] {this.exclude}; // BooleanType 779 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 780 default: return super.getProperty(hash, name, checkValid); 781 } 782 783 } 784 785 @Override 786 public Base setProperty(int hash, String name, Base value) throws FHIRException { 787 switch (hash) { 788 case 3059181: // code 789 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 790 return value; 791 case 111972721: // value 792 this.value = TypeConvertor.castToType(value); // DataType 793 return value; 794 case -1321148966: // exclude 795 this.exclude = TypeConvertor.castToBoolean(value); // BooleanType 796 return value; 797 case -991726143: // period 798 this.period = TypeConvertor.castToPeriod(value); // Period 799 return value; 800 default: return super.setProperty(hash, name, value); 801 } 802 803 } 804 805 @Override 806 public Base setProperty(String name, Base value) throws FHIRException { 807 if (name.equals("code")) { 808 this.code = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 809 } else if (name.equals("value[x]")) { 810 this.value = TypeConvertor.castToType(value); // DataType 811 } else if (name.equals("exclude")) { 812 this.exclude = TypeConvertor.castToBoolean(value); // BooleanType 813 } else if (name.equals("period")) { 814 this.period = TypeConvertor.castToPeriod(value); // Period 815 } else 816 return super.setProperty(name, value); 817 return value; 818 } 819 820 @Override 821 public Base makeProperty(int hash, String name) throws FHIRException { 822 switch (hash) { 823 case 3059181: return getCode(); 824 case -1410166417: return getValue(); 825 case 111972721: return getValue(); 826 case -1321148966: return getExcludeElement(); 827 case -991726143: return getPeriod(); 828 default: return super.makeProperty(hash, name); 829 } 830 831 } 832 833 @Override 834 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 835 switch (hash) { 836 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 837 case 111972721: /*value*/ return new String[] {"Reference", "CodeableConcept", "boolean", "Quantity", "Range"}; 838 case -1321148966: /*exclude*/ return new String[] {"boolean"}; 839 case -991726143: /*period*/ return new String[] {"Period"}; 840 default: return super.getTypesForProperty(hash, name); 841 } 842 843 } 844 845 @Override 846 public Base addChild(String name) throws FHIRException { 847 if (name.equals("code")) { 848 this.code = new CodeableConcept(); 849 return this.code; 850 } 851 else if (name.equals("valueReference")) { 852 this.value = new Reference(); 853 return this.value; 854 } 855 else if (name.equals("valueCodeableConcept")) { 856 this.value = new CodeableConcept(); 857 return this.value; 858 } 859 else if (name.equals("valueBoolean")) { 860 this.value = new BooleanType(); 861 return this.value; 862 } 863 else if (name.equals("valueQuantity")) { 864 this.value = new Quantity(); 865 return this.value; 866 } 867 else if (name.equals("valueRange")) { 868 this.value = new Range(); 869 return this.value; 870 } 871 else if (name.equals("exclude")) { 872 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.subject.characteristic.exclude"); 873 } 874 else if (name.equals("period")) { 875 this.period = new Period(); 876 return this.period; 877 } 878 else 879 return super.addChild(name); 880 } 881 882 public EvidenceReportSubjectCharacteristicComponent copy() { 883 EvidenceReportSubjectCharacteristicComponent dst = new EvidenceReportSubjectCharacteristicComponent(); 884 copyValues(dst); 885 return dst; 886 } 887 888 public void copyValues(EvidenceReportSubjectCharacteristicComponent dst) { 889 super.copyValues(dst); 890 dst.code = code == null ? null : code.copy(); 891 dst.value = value == null ? null : value.copy(); 892 dst.exclude = exclude == null ? null : exclude.copy(); 893 dst.period = period == null ? null : period.copy(); 894 } 895 896 @Override 897 public boolean equalsDeep(Base other_) { 898 if (!super.equalsDeep(other_)) 899 return false; 900 if (!(other_ instanceof EvidenceReportSubjectCharacteristicComponent)) 901 return false; 902 EvidenceReportSubjectCharacteristicComponent o = (EvidenceReportSubjectCharacteristicComponent) other_; 903 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true) && compareDeep(exclude, o.exclude, true) 904 && compareDeep(period, o.period, true); 905 } 906 907 @Override 908 public boolean equalsShallow(Base other_) { 909 if (!super.equalsShallow(other_)) 910 return false; 911 if (!(other_ instanceof EvidenceReportSubjectCharacteristicComponent)) 912 return false; 913 EvidenceReportSubjectCharacteristicComponent o = (EvidenceReportSubjectCharacteristicComponent) other_; 914 return compareValues(exclude, o.exclude, true); 915 } 916 917 public boolean isEmpty() { 918 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value, exclude, period 919 ); 920 } 921 922 public String fhirType() { 923 return "EvidenceReport.subject.characteristic"; 924 925 } 926 927 } 928 929 @Block() 930 public static class EvidenceReportRelatesToComponent extends BackboneElement implements IBaseBackboneElement { 931 /** 932 * The type of relationship that this composition has with anther composition or document. 933 */ 934 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 935 @Description(shortDefinition="replaces | amends | appends | transforms | replacedWith | amendedWith | appendedWith | transformedWith", formalDefinition="The type of relationship that this composition has with anther composition or document." ) 936 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/report-relation-type") 937 protected Enumeration<ReportRelationshipType> code; 938 939 /** 940 * The target composition/document of this relationship. 941 */ 942 @Child(name = "target", type = {}, order=2, min=1, max=1, modifier=false, summary=false) 943 @Description(shortDefinition="Target of the relationship", formalDefinition="The target composition/document of this relationship." ) 944 protected EvidenceReportRelatesToTargetComponent target; 945 946 private static final long serialVersionUID = -1716908969L; 947 948 /** 949 * Constructor 950 */ 951 public EvidenceReportRelatesToComponent() { 952 super(); 953 } 954 955 /** 956 * Constructor 957 */ 958 public EvidenceReportRelatesToComponent(ReportRelationshipType code, EvidenceReportRelatesToTargetComponent target) { 959 super(); 960 this.setCode(code); 961 this.setTarget(target); 962 } 963 964 /** 965 * @return {@link #code} (The type of relationship that this composition has with anther composition or document.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 966 */ 967 public Enumeration<ReportRelationshipType> getCodeElement() { 968 if (this.code == null) 969 if (Configuration.errorOnAutoCreate()) 970 throw new Error("Attempt to auto-create EvidenceReportRelatesToComponent.code"); 971 else if (Configuration.doAutoCreate()) 972 this.code = new Enumeration<ReportRelationshipType>(new ReportRelationshipTypeEnumFactory()); // bb 973 return this.code; 974 } 975 976 public boolean hasCodeElement() { 977 return this.code != null && !this.code.isEmpty(); 978 } 979 980 public boolean hasCode() { 981 return this.code != null && !this.code.isEmpty(); 982 } 983 984 /** 985 * @param value {@link #code} (The type of relationship that this composition has with anther composition or document.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 986 */ 987 public EvidenceReportRelatesToComponent setCodeElement(Enumeration<ReportRelationshipType> value) { 988 this.code = value; 989 return this; 990 } 991 992 /** 993 * @return The type of relationship that this composition has with anther composition or document. 994 */ 995 public ReportRelationshipType getCode() { 996 return this.code == null ? null : this.code.getValue(); 997 } 998 999 /** 1000 * @param value The type of relationship that this composition has with anther composition or document. 1001 */ 1002 public EvidenceReportRelatesToComponent setCode(ReportRelationshipType value) { 1003 if (this.code == null) 1004 this.code = new Enumeration<ReportRelationshipType>(new ReportRelationshipTypeEnumFactory()); 1005 this.code.setValue(value); 1006 return this; 1007 } 1008 1009 /** 1010 * @return {@link #target} (The target composition/document of this relationship.) 1011 */ 1012 public EvidenceReportRelatesToTargetComponent getTarget() { 1013 if (this.target == null) 1014 if (Configuration.errorOnAutoCreate()) 1015 throw new Error("Attempt to auto-create EvidenceReportRelatesToComponent.target"); 1016 else if (Configuration.doAutoCreate()) 1017 this.target = new EvidenceReportRelatesToTargetComponent(); // cc 1018 return this.target; 1019 } 1020 1021 public boolean hasTarget() { 1022 return this.target != null && !this.target.isEmpty(); 1023 } 1024 1025 /** 1026 * @param value {@link #target} (The target composition/document of this relationship.) 1027 */ 1028 public EvidenceReportRelatesToComponent setTarget(EvidenceReportRelatesToTargetComponent value) { 1029 this.target = value; 1030 return this; 1031 } 1032 1033 protected void listChildren(List<Property> children) { 1034 super.listChildren(children); 1035 children.add(new Property("code", "code", "The type of relationship that this composition has with anther composition or document.", 0, 1, code)); 1036 children.add(new Property("target", "", "The target composition/document of this relationship.", 0, 1, target)); 1037 } 1038 1039 @Override 1040 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1041 switch (_hash) { 1042 case 3059181: /*code*/ return new Property("code", "code", "The type of relationship that this composition has with anther composition or document.", 0, 1, code); 1043 case -880905839: /*target*/ return new Property("target", "", "The target composition/document of this relationship.", 0, 1, target); 1044 default: return super.getNamedProperty(_hash, _name, _checkValid); 1045 } 1046 1047 } 1048 1049 @Override 1050 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1051 switch (hash) { 1052 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<ReportRelationshipType> 1053 case -880905839: /*target*/ return this.target == null ? new Base[0] : new Base[] {this.target}; // EvidenceReportRelatesToTargetComponent 1054 default: return super.getProperty(hash, name, checkValid); 1055 } 1056 1057 } 1058 1059 @Override 1060 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1061 switch (hash) { 1062 case 3059181: // code 1063 value = new ReportRelationshipTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1064 this.code = (Enumeration) value; // Enumeration<ReportRelationshipType> 1065 return value; 1066 case -880905839: // target 1067 this.target = (EvidenceReportRelatesToTargetComponent) value; // EvidenceReportRelatesToTargetComponent 1068 return value; 1069 default: return super.setProperty(hash, name, value); 1070 } 1071 1072 } 1073 1074 @Override 1075 public Base setProperty(String name, Base value) throws FHIRException { 1076 if (name.equals("code")) { 1077 value = new ReportRelationshipTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 1078 this.code = (Enumeration) value; // Enumeration<ReportRelationshipType> 1079 } else if (name.equals("target")) { 1080 this.target = (EvidenceReportRelatesToTargetComponent) value; // EvidenceReportRelatesToTargetComponent 1081 } else 1082 return super.setProperty(name, value); 1083 return value; 1084 } 1085 1086 @Override 1087 public Base makeProperty(int hash, String name) throws FHIRException { 1088 switch (hash) { 1089 case 3059181: return getCodeElement(); 1090 case -880905839: return getTarget(); 1091 default: return super.makeProperty(hash, name); 1092 } 1093 1094 } 1095 1096 @Override 1097 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1098 switch (hash) { 1099 case 3059181: /*code*/ return new String[] {"code"}; 1100 case -880905839: /*target*/ return new String[] {}; 1101 default: return super.getTypesForProperty(hash, name); 1102 } 1103 1104 } 1105 1106 @Override 1107 public Base addChild(String name) throws FHIRException { 1108 if (name.equals("code")) { 1109 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.relatesTo.code"); 1110 } 1111 else if (name.equals("target")) { 1112 this.target = new EvidenceReportRelatesToTargetComponent(); 1113 return this.target; 1114 } 1115 else 1116 return super.addChild(name); 1117 } 1118 1119 public EvidenceReportRelatesToComponent copy() { 1120 EvidenceReportRelatesToComponent dst = new EvidenceReportRelatesToComponent(); 1121 copyValues(dst); 1122 return dst; 1123 } 1124 1125 public void copyValues(EvidenceReportRelatesToComponent dst) { 1126 super.copyValues(dst); 1127 dst.code = code == null ? null : code.copy(); 1128 dst.target = target == null ? null : target.copy(); 1129 } 1130 1131 @Override 1132 public boolean equalsDeep(Base other_) { 1133 if (!super.equalsDeep(other_)) 1134 return false; 1135 if (!(other_ instanceof EvidenceReportRelatesToComponent)) 1136 return false; 1137 EvidenceReportRelatesToComponent o = (EvidenceReportRelatesToComponent) other_; 1138 return compareDeep(code, o.code, true) && compareDeep(target, o.target, true); 1139 } 1140 1141 @Override 1142 public boolean equalsShallow(Base other_) { 1143 if (!super.equalsShallow(other_)) 1144 return false; 1145 if (!(other_ instanceof EvidenceReportRelatesToComponent)) 1146 return false; 1147 EvidenceReportRelatesToComponent o = (EvidenceReportRelatesToComponent) other_; 1148 return compareValues(code, o.code, true); 1149 } 1150 1151 public boolean isEmpty() { 1152 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, target); 1153 } 1154 1155 public String fhirType() { 1156 return "EvidenceReport.relatesTo"; 1157 1158 } 1159 1160 } 1161 1162 @Block() 1163 public static class EvidenceReportRelatesToTargetComponent extends BackboneElement implements IBaseBackboneElement { 1164 /** 1165 * Target of the relationship URL. 1166 */ 1167 @Child(name = "url", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1168 @Description(shortDefinition="Target of the relationship URL", formalDefinition="Target of the relationship URL." ) 1169 protected UriType url; 1170 1171 /** 1172 * Target of the relationship Identifier. 1173 */ 1174 @Child(name = "identifier", type = {Identifier.class}, order=2, min=0, max=1, modifier=false, summary=false) 1175 @Description(shortDefinition="Target of the relationship Identifier", formalDefinition="Target of the relationship Identifier." ) 1176 protected Identifier identifier; 1177 1178 /** 1179 * Target of the relationship Display. 1180 */ 1181 @Child(name = "display", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1182 @Description(shortDefinition="Target of the relationship Display", formalDefinition="Target of the relationship Display." ) 1183 protected MarkdownType display; 1184 1185 /** 1186 * Target of the relationship Resource reference. 1187 */ 1188 @Child(name = "resource", type = {Reference.class}, order=4, min=0, max=1, modifier=false, summary=false) 1189 @Description(shortDefinition="Target of the relationship Resource reference", formalDefinition="Target of the relationship Resource reference." ) 1190 protected Reference resource; 1191 1192 private static final long serialVersionUID = -804526425L; 1193 1194 /** 1195 * Constructor 1196 */ 1197 public EvidenceReportRelatesToTargetComponent() { 1198 super(); 1199 } 1200 1201 /** 1202 * @return {@link #url} (Target of the relationship URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1203 */ 1204 public UriType getUrlElement() { 1205 if (this.url == null) 1206 if (Configuration.errorOnAutoCreate()) 1207 throw new Error("Attempt to auto-create EvidenceReportRelatesToTargetComponent.url"); 1208 else if (Configuration.doAutoCreate()) 1209 this.url = new UriType(); // bb 1210 return this.url; 1211 } 1212 1213 public boolean hasUrlElement() { 1214 return this.url != null && !this.url.isEmpty(); 1215 } 1216 1217 public boolean hasUrl() { 1218 return this.url != null && !this.url.isEmpty(); 1219 } 1220 1221 /** 1222 * @param value {@link #url} (Target of the relationship URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1223 */ 1224 public EvidenceReportRelatesToTargetComponent setUrlElement(UriType value) { 1225 this.url = value; 1226 return this; 1227 } 1228 1229 /** 1230 * @return Target of the relationship URL. 1231 */ 1232 public String getUrl() { 1233 return this.url == null ? null : this.url.getValue(); 1234 } 1235 1236 /** 1237 * @param value Target of the relationship URL. 1238 */ 1239 public EvidenceReportRelatesToTargetComponent setUrl(String value) { 1240 if (Utilities.noString(value)) 1241 this.url = null; 1242 else { 1243 if (this.url == null) 1244 this.url = new UriType(); 1245 this.url.setValue(value); 1246 } 1247 return this; 1248 } 1249 1250 /** 1251 * @return {@link #identifier} (Target of the relationship Identifier.) 1252 */ 1253 public Identifier getIdentifier() { 1254 if (this.identifier == null) 1255 if (Configuration.errorOnAutoCreate()) 1256 throw new Error("Attempt to auto-create EvidenceReportRelatesToTargetComponent.identifier"); 1257 else if (Configuration.doAutoCreate()) 1258 this.identifier = new Identifier(); // cc 1259 return this.identifier; 1260 } 1261 1262 public boolean hasIdentifier() { 1263 return this.identifier != null && !this.identifier.isEmpty(); 1264 } 1265 1266 /** 1267 * @param value {@link #identifier} (Target of the relationship Identifier.) 1268 */ 1269 public EvidenceReportRelatesToTargetComponent setIdentifier(Identifier value) { 1270 this.identifier = value; 1271 return this; 1272 } 1273 1274 /** 1275 * @return {@link #display} (Target of the relationship Display.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 1276 */ 1277 public MarkdownType getDisplayElement() { 1278 if (this.display == null) 1279 if (Configuration.errorOnAutoCreate()) 1280 throw new Error("Attempt to auto-create EvidenceReportRelatesToTargetComponent.display"); 1281 else if (Configuration.doAutoCreate()) 1282 this.display = new MarkdownType(); // bb 1283 return this.display; 1284 } 1285 1286 public boolean hasDisplayElement() { 1287 return this.display != null && !this.display.isEmpty(); 1288 } 1289 1290 public boolean hasDisplay() { 1291 return this.display != null && !this.display.isEmpty(); 1292 } 1293 1294 /** 1295 * @param value {@link #display} (Target of the relationship Display.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value 1296 */ 1297 public EvidenceReportRelatesToTargetComponent setDisplayElement(MarkdownType value) { 1298 this.display = value; 1299 return this; 1300 } 1301 1302 /** 1303 * @return Target of the relationship Display. 1304 */ 1305 public String getDisplay() { 1306 return this.display == null ? null : this.display.getValue(); 1307 } 1308 1309 /** 1310 * @param value Target of the relationship Display. 1311 */ 1312 public EvidenceReportRelatesToTargetComponent setDisplay(String value) { 1313 if (value == null) 1314 this.display = null; 1315 else { 1316 if (this.display == null) 1317 this.display = new MarkdownType(); 1318 this.display.setValue(value); 1319 } 1320 return this; 1321 } 1322 1323 /** 1324 * @return {@link #resource} (Target of the relationship Resource reference.) 1325 */ 1326 public Reference getResource() { 1327 if (this.resource == null) 1328 if (Configuration.errorOnAutoCreate()) 1329 throw new Error("Attempt to auto-create EvidenceReportRelatesToTargetComponent.resource"); 1330 else if (Configuration.doAutoCreate()) 1331 this.resource = new Reference(); // cc 1332 return this.resource; 1333 } 1334 1335 public boolean hasResource() { 1336 return this.resource != null && !this.resource.isEmpty(); 1337 } 1338 1339 /** 1340 * @param value {@link #resource} (Target of the relationship Resource reference.) 1341 */ 1342 public EvidenceReportRelatesToTargetComponent setResource(Reference value) { 1343 this.resource = value; 1344 return this; 1345 } 1346 1347 protected void listChildren(List<Property> children) { 1348 super.listChildren(children); 1349 children.add(new Property("url", "uri", "Target of the relationship URL.", 0, 1, url)); 1350 children.add(new Property("identifier", "Identifier", "Target of the relationship Identifier.", 0, 1, identifier)); 1351 children.add(new Property("display", "markdown", "Target of the relationship Display.", 0, 1, display)); 1352 children.add(new Property("resource", "Reference(Any)", "Target of the relationship Resource reference.", 0, 1, resource)); 1353 } 1354 1355 @Override 1356 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1357 switch (_hash) { 1358 case 116079: /*url*/ return new Property("url", "uri", "Target of the relationship URL.", 0, 1, url); 1359 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Target of the relationship Identifier.", 0, 1, identifier); 1360 case 1671764162: /*display*/ return new Property("display", "markdown", "Target of the relationship Display.", 0, 1, display); 1361 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "Target of the relationship Resource reference.", 0, 1, resource); 1362 default: return super.getNamedProperty(_hash, _name, _checkValid); 1363 } 1364 1365 } 1366 1367 @Override 1368 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1369 switch (hash) { 1370 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1371 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1372 case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // MarkdownType 1373 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 1374 default: return super.getProperty(hash, name, checkValid); 1375 } 1376 1377 } 1378 1379 @Override 1380 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1381 switch (hash) { 1382 case 116079: // url 1383 this.url = TypeConvertor.castToUri(value); // UriType 1384 return value; 1385 case -1618432855: // identifier 1386 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 1387 return value; 1388 case 1671764162: // display 1389 this.display = TypeConvertor.castToMarkdown(value); // MarkdownType 1390 return value; 1391 case -341064690: // resource 1392 this.resource = TypeConvertor.castToReference(value); // Reference 1393 return value; 1394 default: return super.setProperty(hash, name, value); 1395 } 1396 1397 } 1398 1399 @Override 1400 public Base setProperty(String name, Base value) throws FHIRException { 1401 if (name.equals("url")) { 1402 this.url = TypeConvertor.castToUri(value); // UriType 1403 } else if (name.equals("identifier")) { 1404 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 1405 } else if (name.equals("display")) { 1406 this.display = TypeConvertor.castToMarkdown(value); // MarkdownType 1407 } else if (name.equals("resource")) { 1408 this.resource = TypeConvertor.castToReference(value); // Reference 1409 } else 1410 return super.setProperty(name, value); 1411 return value; 1412 } 1413 1414 @Override 1415 public Base makeProperty(int hash, String name) throws FHIRException { 1416 switch (hash) { 1417 case 116079: return getUrlElement(); 1418 case -1618432855: return getIdentifier(); 1419 case 1671764162: return getDisplayElement(); 1420 case -341064690: return getResource(); 1421 default: return super.makeProperty(hash, name); 1422 } 1423 1424 } 1425 1426 @Override 1427 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1428 switch (hash) { 1429 case 116079: /*url*/ return new String[] {"uri"}; 1430 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1431 case 1671764162: /*display*/ return new String[] {"markdown"}; 1432 case -341064690: /*resource*/ return new String[] {"Reference"}; 1433 default: return super.getTypesForProperty(hash, name); 1434 } 1435 1436 } 1437 1438 @Override 1439 public Base addChild(String name) throws FHIRException { 1440 if (name.equals("url")) { 1441 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.relatesTo.target.url"); 1442 } 1443 else if (name.equals("identifier")) { 1444 this.identifier = new Identifier(); 1445 return this.identifier; 1446 } 1447 else if (name.equals("display")) { 1448 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.relatesTo.target.display"); 1449 } 1450 else if (name.equals("resource")) { 1451 this.resource = new Reference(); 1452 return this.resource; 1453 } 1454 else 1455 return super.addChild(name); 1456 } 1457 1458 public EvidenceReportRelatesToTargetComponent copy() { 1459 EvidenceReportRelatesToTargetComponent dst = new EvidenceReportRelatesToTargetComponent(); 1460 copyValues(dst); 1461 return dst; 1462 } 1463 1464 public void copyValues(EvidenceReportRelatesToTargetComponent dst) { 1465 super.copyValues(dst); 1466 dst.url = url == null ? null : url.copy(); 1467 dst.identifier = identifier == null ? null : identifier.copy(); 1468 dst.display = display == null ? null : display.copy(); 1469 dst.resource = resource == null ? null : resource.copy(); 1470 } 1471 1472 @Override 1473 public boolean equalsDeep(Base other_) { 1474 if (!super.equalsDeep(other_)) 1475 return false; 1476 if (!(other_ instanceof EvidenceReportRelatesToTargetComponent)) 1477 return false; 1478 EvidenceReportRelatesToTargetComponent o = (EvidenceReportRelatesToTargetComponent) other_; 1479 return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(display, o.display, true) 1480 && compareDeep(resource, o.resource, true); 1481 } 1482 1483 @Override 1484 public boolean equalsShallow(Base other_) { 1485 if (!super.equalsShallow(other_)) 1486 return false; 1487 if (!(other_ instanceof EvidenceReportRelatesToTargetComponent)) 1488 return false; 1489 EvidenceReportRelatesToTargetComponent o = (EvidenceReportRelatesToTargetComponent) other_; 1490 return compareValues(url, o.url, true) && compareValues(display, o.display, true); 1491 } 1492 1493 public boolean isEmpty() { 1494 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, display 1495 , resource); 1496 } 1497 1498 public String fhirType() { 1499 return "EvidenceReport.relatesTo.target"; 1500 1501 } 1502 1503 } 1504 1505 @Block() 1506 public static class SectionComponent extends BackboneElement implements IBaseBackboneElement { 1507 /** 1508 * The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. 1509 */ 1510 @Child(name = "title", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1511 @Description(shortDefinition="Label for section (e.g. for ToC)", formalDefinition="The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents." ) 1512 protected StringType title; 1513 1514 /** 1515 * A code identifying the kind of content contained within the section. This should be consistent with the section title. 1516 */ 1517 @Child(name = "focus", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false) 1518 @Description(shortDefinition="Classification of section (recommended)", formalDefinition="A code identifying the kind of content contained within the section. This should be consistent with the section title." ) 1519 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/evidence-report-section") 1520 protected CodeableConcept focus; 1521 1522 /** 1523 * A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title. 1524 */ 1525 @Child(name = "focusReference", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false) 1526 @Description(shortDefinition="Classification of section by Resource", formalDefinition="A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title." ) 1527 protected Reference focusReference; 1528 1529 /** 1530 * Identifies who is responsible for the information in this section, not necessarily who typed it in. 1531 */ 1532 @Child(name = "author", type = {Person.class, Device.class, Group.class, Organization.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1533 @Description(shortDefinition="Who and/or what authored the section", formalDefinition="Identifies who is responsible for the information in this section, not necessarily who typed it in." ) 1534 protected List<Reference> author; 1535 1536 /** 1537 * A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative. 1538 */ 1539 @Child(name = "text", type = {Narrative.class}, order=5, min=0, max=1, modifier=false, summary=false) 1540 @Description(shortDefinition="Text summary of the section, for human interpretation", formalDefinition="A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative." ) 1541 protected Narrative text; 1542 1543 /** 1544 * How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. 1545 */ 1546 @Child(name = "mode", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 1547 @Description(shortDefinition="working | snapshot | changes", formalDefinition="How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted." ) 1548 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-mode") 1549 protected Enumeration<ListMode> mode; 1550 1551 /** 1552 * Specifies the order applied to the items in the section entries. 1553 */ 1554 @Child(name = "orderedBy", type = {CodeableConcept.class}, order=7, min=0, max=1, modifier=false, summary=false) 1555 @Description(shortDefinition="Order of section entries", formalDefinition="Specifies the order applied to the items in the section entries." ) 1556 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-order") 1557 protected CodeableConcept orderedBy; 1558 1559 /** 1560 * Specifies any type of classification of the evidence report. 1561 */ 1562 @Child(name = "entryClassifier", type = {CodeableConcept.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1563 @Description(shortDefinition="Extensible classifiers as content", formalDefinition="Specifies any type of classification of the evidence report." ) 1564 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/evidence-classifier-code") 1565 protected List<CodeableConcept> entryClassifier; 1566 1567 /** 1568 * A reference to the actual resource from which the narrative in the section is derived. 1569 */ 1570 @Child(name = "entryReference", type = {Reference.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1571 @Description(shortDefinition="Reference to resources as content", formalDefinition="A reference to the actual resource from which the narrative in the section is derived." ) 1572 protected List<Reference> entryReference; 1573 1574 /** 1575 * Quantity as content. 1576 */ 1577 @Child(name = "entryQuantity", type = {Quantity.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1578 @Description(shortDefinition="Quantity as content", formalDefinition="Quantity as content." ) 1579 protected List<Quantity> entryQuantity; 1580 1581 /** 1582 * If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason. 1583 */ 1584 @Child(name = "emptyReason", type = {CodeableConcept.class}, order=11, min=0, max=1, modifier=false, summary=false) 1585 @Description(shortDefinition="Why the section is empty", formalDefinition="If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason." ) 1586 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/list-empty-reason") 1587 protected CodeableConcept emptyReason; 1588 1589 /** 1590 * A nested sub-section within this section. 1591 */ 1592 @Child(name = "section", type = {SectionComponent.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1593 @Description(shortDefinition="Nested Section", formalDefinition="A nested sub-section within this section." ) 1594 protected List<SectionComponent> section; 1595 1596 private static final long serialVersionUID = -324854168L; 1597 1598 /** 1599 * Constructor 1600 */ 1601 public SectionComponent() { 1602 super(); 1603 } 1604 1605 /** 1606 * @return {@link #title} (The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1607 */ 1608 public StringType getTitleElement() { 1609 if (this.title == null) 1610 if (Configuration.errorOnAutoCreate()) 1611 throw new Error("Attempt to auto-create SectionComponent.title"); 1612 else if (Configuration.doAutoCreate()) 1613 this.title = new StringType(); // bb 1614 return this.title; 1615 } 1616 1617 public boolean hasTitleElement() { 1618 return this.title != null && !this.title.isEmpty(); 1619 } 1620 1621 public boolean hasTitle() { 1622 return this.title != null && !this.title.isEmpty(); 1623 } 1624 1625 /** 1626 * @param value {@link #title} (The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1627 */ 1628 public SectionComponent setTitleElement(StringType value) { 1629 this.title = value; 1630 return this; 1631 } 1632 1633 /** 1634 * @return The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. 1635 */ 1636 public String getTitle() { 1637 return this.title == null ? null : this.title.getValue(); 1638 } 1639 1640 /** 1641 * @param value The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents. 1642 */ 1643 public SectionComponent setTitle(String value) { 1644 if (Utilities.noString(value)) 1645 this.title = null; 1646 else { 1647 if (this.title == null) 1648 this.title = new StringType(); 1649 this.title.setValue(value); 1650 } 1651 return this; 1652 } 1653 1654 /** 1655 * @return {@link #focus} (A code identifying the kind of content contained within the section. This should be consistent with the section title.) 1656 */ 1657 public CodeableConcept getFocus() { 1658 if (this.focus == null) 1659 if (Configuration.errorOnAutoCreate()) 1660 throw new Error("Attempt to auto-create SectionComponent.focus"); 1661 else if (Configuration.doAutoCreate()) 1662 this.focus = new CodeableConcept(); // cc 1663 return this.focus; 1664 } 1665 1666 public boolean hasFocus() { 1667 return this.focus != null && !this.focus.isEmpty(); 1668 } 1669 1670 /** 1671 * @param value {@link #focus} (A code identifying the kind of content contained within the section. This should be consistent with the section title.) 1672 */ 1673 public SectionComponent setFocus(CodeableConcept value) { 1674 this.focus = value; 1675 return this; 1676 } 1677 1678 /** 1679 * @return {@link #focusReference} (A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title.) 1680 */ 1681 public Reference getFocusReference() { 1682 if (this.focusReference == null) 1683 if (Configuration.errorOnAutoCreate()) 1684 throw new Error("Attempt to auto-create SectionComponent.focusReference"); 1685 else if (Configuration.doAutoCreate()) 1686 this.focusReference = new Reference(); // cc 1687 return this.focusReference; 1688 } 1689 1690 public boolean hasFocusReference() { 1691 return this.focusReference != null && !this.focusReference.isEmpty(); 1692 } 1693 1694 /** 1695 * @param value {@link #focusReference} (A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title.) 1696 */ 1697 public SectionComponent setFocusReference(Reference value) { 1698 this.focusReference = value; 1699 return this; 1700 } 1701 1702 /** 1703 * @return {@link #author} (Identifies who is responsible for the information in this section, not necessarily who typed it in.) 1704 */ 1705 public List<Reference> getAuthor() { 1706 if (this.author == null) 1707 this.author = new ArrayList<Reference>(); 1708 return this.author; 1709 } 1710 1711 /** 1712 * @return Returns a reference to <code>this</code> for easy method chaining 1713 */ 1714 public SectionComponent setAuthor(List<Reference> theAuthor) { 1715 this.author = theAuthor; 1716 return this; 1717 } 1718 1719 public boolean hasAuthor() { 1720 if (this.author == null) 1721 return false; 1722 for (Reference item : this.author) 1723 if (!item.isEmpty()) 1724 return true; 1725 return false; 1726 } 1727 1728 public Reference addAuthor() { //3 1729 Reference t = new Reference(); 1730 if (this.author == null) 1731 this.author = new ArrayList<Reference>(); 1732 this.author.add(t); 1733 return t; 1734 } 1735 1736 public SectionComponent addAuthor(Reference t) { //3 1737 if (t == null) 1738 return this; 1739 if (this.author == null) 1740 this.author = new ArrayList<Reference>(); 1741 this.author.add(t); 1742 return this; 1743 } 1744 1745 /** 1746 * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3} 1747 */ 1748 public Reference getAuthorFirstRep() { 1749 if (getAuthor().isEmpty()) { 1750 addAuthor(); 1751 } 1752 return getAuthor().get(0); 1753 } 1754 1755 /** 1756 * @return {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative.) 1757 */ 1758 public Narrative getText() { 1759 if (this.text == null) 1760 if (Configuration.errorOnAutoCreate()) 1761 throw new Error("Attempt to auto-create SectionComponent.text"); 1762 else if (Configuration.doAutoCreate()) 1763 this.text = new Narrative(); // cc 1764 return this.text; 1765 } 1766 1767 public boolean hasText() { 1768 return this.text != null && !this.text.isEmpty(); 1769 } 1770 1771 /** 1772 * @param value {@link #text} (A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative.) 1773 */ 1774 public SectionComponent setText(Narrative value) { 1775 this.text = value; 1776 return this; 1777 } 1778 1779 /** 1780 * @return {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 1781 */ 1782 public Enumeration<ListMode> getModeElement() { 1783 if (this.mode == null) 1784 if (Configuration.errorOnAutoCreate()) 1785 throw new Error("Attempt to auto-create SectionComponent.mode"); 1786 else if (Configuration.doAutoCreate()) 1787 this.mode = new Enumeration<ListMode>(new ListModeEnumFactory()); // bb 1788 return this.mode; 1789 } 1790 1791 public boolean hasModeElement() { 1792 return this.mode != null && !this.mode.isEmpty(); 1793 } 1794 1795 public boolean hasMode() { 1796 return this.mode != null && !this.mode.isEmpty(); 1797 } 1798 1799 /** 1800 * @param value {@link #mode} (How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 1801 */ 1802 public SectionComponent setModeElement(Enumeration<ListMode> value) { 1803 this.mode = value; 1804 return this; 1805 } 1806 1807 /** 1808 * @return How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. 1809 */ 1810 public ListMode getMode() { 1811 return this.mode == null ? null : this.mode.getValue(); 1812 } 1813 1814 /** 1815 * @param value How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted. 1816 */ 1817 public SectionComponent setMode(ListMode value) { 1818 if (value == null) 1819 this.mode = null; 1820 else { 1821 if (this.mode == null) 1822 this.mode = new Enumeration<ListMode>(new ListModeEnumFactory()); 1823 this.mode.setValue(value); 1824 } 1825 return this; 1826 } 1827 1828 /** 1829 * @return {@link #orderedBy} (Specifies the order applied to the items in the section entries.) 1830 */ 1831 public CodeableConcept getOrderedBy() { 1832 if (this.orderedBy == null) 1833 if (Configuration.errorOnAutoCreate()) 1834 throw new Error("Attempt to auto-create SectionComponent.orderedBy"); 1835 else if (Configuration.doAutoCreate()) 1836 this.orderedBy = new CodeableConcept(); // cc 1837 return this.orderedBy; 1838 } 1839 1840 public boolean hasOrderedBy() { 1841 return this.orderedBy != null && !this.orderedBy.isEmpty(); 1842 } 1843 1844 /** 1845 * @param value {@link #orderedBy} (Specifies the order applied to the items in the section entries.) 1846 */ 1847 public SectionComponent setOrderedBy(CodeableConcept value) { 1848 this.orderedBy = value; 1849 return this; 1850 } 1851 1852 /** 1853 * @return {@link #entryClassifier} (Specifies any type of classification of the evidence report.) 1854 */ 1855 public List<CodeableConcept> getEntryClassifier() { 1856 if (this.entryClassifier == null) 1857 this.entryClassifier = new ArrayList<CodeableConcept>(); 1858 return this.entryClassifier; 1859 } 1860 1861 /** 1862 * @return Returns a reference to <code>this</code> for easy method chaining 1863 */ 1864 public SectionComponent setEntryClassifier(List<CodeableConcept> theEntryClassifier) { 1865 this.entryClassifier = theEntryClassifier; 1866 return this; 1867 } 1868 1869 public boolean hasEntryClassifier() { 1870 if (this.entryClassifier == null) 1871 return false; 1872 for (CodeableConcept item : this.entryClassifier) 1873 if (!item.isEmpty()) 1874 return true; 1875 return false; 1876 } 1877 1878 public CodeableConcept addEntryClassifier() { //3 1879 CodeableConcept t = new CodeableConcept(); 1880 if (this.entryClassifier == null) 1881 this.entryClassifier = new ArrayList<CodeableConcept>(); 1882 this.entryClassifier.add(t); 1883 return t; 1884 } 1885 1886 public SectionComponent addEntryClassifier(CodeableConcept t) { //3 1887 if (t == null) 1888 return this; 1889 if (this.entryClassifier == null) 1890 this.entryClassifier = new ArrayList<CodeableConcept>(); 1891 this.entryClassifier.add(t); 1892 return this; 1893 } 1894 1895 /** 1896 * @return The first repetition of repeating field {@link #entryClassifier}, creating it if it does not already exist {3} 1897 */ 1898 public CodeableConcept getEntryClassifierFirstRep() { 1899 if (getEntryClassifier().isEmpty()) { 1900 addEntryClassifier(); 1901 } 1902 return getEntryClassifier().get(0); 1903 } 1904 1905 /** 1906 * @return {@link #entryReference} (A reference to the actual resource from which the narrative in the section is derived.) 1907 */ 1908 public List<Reference> getEntryReference() { 1909 if (this.entryReference == null) 1910 this.entryReference = new ArrayList<Reference>(); 1911 return this.entryReference; 1912 } 1913 1914 /** 1915 * @return Returns a reference to <code>this</code> for easy method chaining 1916 */ 1917 public SectionComponent setEntryReference(List<Reference> theEntryReference) { 1918 this.entryReference = theEntryReference; 1919 return this; 1920 } 1921 1922 public boolean hasEntryReference() { 1923 if (this.entryReference == null) 1924 return false; 1925 for (Reference item : this.entryReference) 1926 if (!item.isEmpty()) 1927 return true; 1928 return false; 1929 } 1930 1931 public Reference addEntryReference() { //3 1932 Reference t = new Reference(); 1933 if (this.entryReference == null) 1934 this.entryReference = new ArrayList<Reference>(); 1935 this.entryReference.add(t); 1936 return t; 1937 } 1938 1939 public SectionComponent addEntryReference(Reference t) { //3 1940 if (t == null) 1941 return this; 1942 if (this.entryReference == null) 1943 this.entryReference = new ArrayList<Reference>(); 1944 this.entryReference.add(t); 1945 return this; 1946 } 1947 1948 /** 1949 * @return The first repetition of repeating field {@link #entryReference}, creating it if it does not already exist {3} 1950 */ 1951 public Reference getEntryReferenceFirstRep() { 1952 if (getEntryReference().isEmpty()) { 1953 addEntryReference(); 1954 } 1955 return getEntryReference().get(0); 1956 } 1957 1958 /** 1959 * @return {@link #entryQuantity} (Quantity as content.) 1960 */ 1961 public List<Quantity> getEntryQuantity() { 1962 if (this.entryQuantity == null) 1963 this.entryQuantity = new ArrayList<Quantity>(); 1964 return this.entryQuantity; 1965 } 1966 1967 /** 1968 * @return Returns a reference to <code>this</code> for easy method chaining 1969 */ 1970 public SectionComponent setEntryQuantity(List<Quantity> theEntryQuantity) { 1971 this.entryQuantity = theEntryQuantity; 1972 return this; 1973 } 1974 1975 public boolean hasEntryQuantity() { 1976 if (this.entryQuantity == null) 1977 return false; 1978 for (Quantity item : this.entryQuantity) 1979 if (!item.isEmpty()) 1980 return true; 1981 return false; 1982 } 1983 1984 public Quantity addEntryQuantity() { //3 1985 Quantity t = new Quantity(); 1986 if (this.entryQuantity == null) 1987 this.entryQuantity = new ArrayList<Quantity>(); 1988 this.entryQuantity.add(t); 1989 return t; 1990 } 1991 1992 public SectionComponent addEntryQuantity(Quantity t) { //3 1993 if (t == null) 1994 return this; 1995 if (this.entryQuantity == null) 1996 this.entryQuantity = new ArrayList<Quantity>(); 1997 this.entryQuantity.add(t); 1998 return this; 1999 } 2000 2001 /** 2002 * @return The first repetition of repeating field {@link #entryQuantity}, creating it if it does not already exist {3} 2003 */ 2004 public Quantity getEntryQuantityFirstRep() { 2005 if (getEntryQuantity().isEmpty()) { 2006 addEntryQuantity(); 2007 } 2008 return getEntryQuantity().get(0); 2009 } 2010 2011 /** 2012 * @return {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.) 2013 */ 2014 public CodeableConcept getEmptyReason() { 2015 if (this.emptyReason == null) 2016 if (Configuration.errorOnAutoCreate()) 2017 throw new Error("Attempt to auto-create SectionComponent.emptyReason"); 2018 else if (Configuration.doAutoCreate()) 2019 this.emptyReason = new CodeableConcept(); // cc 2020 return this.emptyReason; 2021 } 2022 2023 public boolean hasEmptyReason() { 2024 return this.emptyReason != null && !this.emptyReason.isEmpty(); 2025 } 2026 2027 /** 2028 * @param value {@link #emptyReason} (If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.) 2029 */ 2030 public SectionComponent setEmptyReason(CodeableConcept value) { 2031 this.emptyReason = value; 2032 return this; 2033 } 2034 2035 /** 2036 * @return {@link #section} (A nested sub-section within this section.) 2037 */ 2038 public List<SectionComponent> getSection() { 2039 if (this.section == null) 2040 this.section = new ArrayList<SectionComponent>(); 2041 return this.section; 2042 } 2043 2044 /** 2045 * @return Returns a reference to <code>this</code> for easy method chaining 2046 */ 2047 public SectionComponent setSection(List<SectionComponent> theSection) { 2048 this.section = theSection; 2049 return this; 2050 } 2051 2052 public boolean hasSection() { 2053 if (this.section == null) 2054 return false; 2055 for (SectionComponent item : this.section) 2056 if (!item.isEmpty()) 2057 return true; 2058 return false; 2059 } 2060 2061 public SectionComponent addSection() { //3 2062 SectionComponent t = new SectionComponent(); 2063 if (this.section == null) 2064 this.section = new ArrayList<SectionComponent>(); 2065 this.section.add(t); 2066 return t; 2067 } 2068 2069 public SectionComponent addSection(SectionComponent t) { //3 2070 if (t == null) 2071 return this; 2072 if (this.section == null) 2073 this.section = new ArrayList<SectionComponent>(); 2074 this.section.add(t); 2075 return this; 2076 } 2077 2078 /** 2079 * @return The first repetition of repeating field {@link #section}, creating it if it does not already exist {3} 2080 */ 2081 public SectionComponent getSectionFirstRep() { 2082 if (getSection().isEmpty()) { 2083 addSection(); 2084 } 2085 return getSection().get(0); 2086 } 2087 2088 protected void listChildren(List<Property> children) { 2089 super.listChildren(children); 2090 children.add(new Property("title", "string", "The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, 1, title)); 2091 children.add(new Property("focus", "CodeableConcept", "A code identifying the kind of content contained within the section. This should be consistent with the section title.", 0, 1, focus)); 2092 children.add(new Property("focusReference", "Reference(Any)", "A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title.", 0, 1, focusReference)); 2093 children.add(new Property("author", "Reference(Person|Device|Group|Organization)", "Identifies who is responsible for the information in this section, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author)); 2094 children.add(new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative.", 0, 1, text)); 2095 children.add(new Property("mode", "code", "How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, 1, mode)); 2096 children.add(new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, 1, orderedBy)); 2097 children.add(new Property("entryClassifier", "CodeableConcept", "Specifies any type of classification of the evidence report.", 0, java.lang.Integer.MAX_VALUE, entryClassifier)); 2098 children.add(new Property("entryReference", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entryReference)); 2099 children.add(new Property("entryQuantity", "Quantity", "Quantity as content.", 0, java.lang.Integer.MAX_VALUE, entryQuantity)); 2100 children.add(new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, 1, emptyReason)); 2101 children.add(new Property("section", "@EvidenceReport.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section)); 2102 } 2103 2104 @Override 2105 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2106 switch (_hash) { 2107 case 110371416: /*title*/ return new Property("title", "string", "The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.", 0, 1, title); 2108 case 97604824: /*focus*/ return new Property("focus", "CodeableConcept", "A code identifying the kind of content contained within the section. This should be consistent with the section title.", 0, 1, focus); 2109 case 1823604051: /*focusReference*/ return new Property("focusReference", "Reference(Any)", "A definitional Resource identifying the kind of content contained within the section. This should be consistent with the section title.", 0, 1, focusReference); 2110 case -1406328437: /*author*/ return new Property("author", "Reference(Person|Device|Group|Organization)", "Identifies who is responsible for the information in this section, not necessarily who typed it in.", 0, java.lang.Integer.MAX_VALUE, author); 2111 case 3556653: /*text*/ return new Property("text", "Narrative", "A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is peferred to contain sufficient detail to make it acceptable for a human to just read the narrative.", 0, 1, text); 2112 case 3357091: /*mode*/ return new Property("mode", "code", "How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.", 0, 1, mode); 2113 case -391079516: /*orderedBy*/ return new Property("orderedBy", "CodeableConcept", "Specifies the order applied to the items in the section entries.", 0, 1, orderedBy); 2114 case -948201421: /*entryClassifier*/ return new Property("entryClassifier", "CodeableConcept", "Specifies any type of classification of the evidence report.", 0, java.lang.Integer.MAX_VALUE, entryClassifier); 2115 case 438810361: /*entryReference*/ return new Property("entryReference", "Reference(Any)", "A reference to the actual resource from which the narrative in the section is derived.", 0, java.lang.Integer.MAX_VALUE, entryReference); 2116 case 1945583389: /*entryQuantity*/ return new Property("entryQuantity", "Quantity", "Quantity as content.", 0, java.lang.Integer.MAX_VALUE, entryQuantity); 2117 case 1140135409: /*emptyReason*/ return new Property("emptyReason", "CodeableConcept", "If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.", 0, 1, emptyReason); 2118 case 1970241253: /*section*/ return new Property("section", "@EvidenceReport.section", "A nested sub-section within this section.", 0, java.lang.Integer.MAX_VALUE, section); 2119 default: return super.getNamedProperty(_hash, _name, _checkValid); 2120 } 2121 2122 } 2123 2124 @Override 2125 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2126 switch (hash) { 2127 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2128 case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // CodeableConcept 2129 case 1823604051: /*focusReference*/ return this.focusReference == null ? new Base[0] : new Base[] {this.focusReference}; // Reference 2130 case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // Reference 2131 case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // Narrative 2132 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<ListMode> 2133 case -391079516: /*orderedBy*/ return this.orderedBy == null ? new Base[0] : new Base[] {this.orderedBy}; // CodeableConcept 2134 case -948201421: /*entryClassifier*/ return this.entryClassifier == null ? new Base[0] : this.entryClassifier.toArray(new Base[this.entryClassifier.size()]); // CodeableConcept 2135 case 438810361: /*entryReference*/ return this.entryReference == null ? new Base[0] : this.entryReference.toArray(new Base[this.entryReference.size()]); // Reference 2136 case 1945583389: /*entryQuantity*/ return this.entryQuantity == null ? new Base[0] : this.entryQuantity.toArray(new Base[this.entryQuantity.size()]); // Quantity 2137 case 1140135409: /*emptyReason*/ return this.emptyReason == null ? new Base[0] : new Base[] {this.emptyReason}; // CodeableConcept 2138 case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent 2139 default: return super.getProperty(hash, name, checkValid); 2140 } 2141 2142 } 2143 2144 @Override 2145 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2146 switch (hash) { 2147 case 110371416: // title 2148 this.title = TypeConvertor.castToString(value); // StringType 2149 return value; 2150 case 97604824: // focus 2151 this.focus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2152 return value; 2153 case 1823604051: // focusReference 2154 this.focusReference = TypeConvertor.castToReference(value); // Reference 2155 return value; 2156 case -1406328437: // author 2157 this.getAuthor().add(TypeConvertor.castToReference(value)); // Reference 2158 return value; 2159 case 3556653: // text 2160 this.text = TypeConvertor.castToNarrative(value); // Narrative 2161 return value; 2162 case 3357091: // mode 2163 value = new ListModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 2164 this.mode = (Enumeration) value; // Enumeration<ListMode> 2165 return value; 2166 case -391079516: // orderedBy 2167 this.orderedBy = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2168 return value; 2169 case -948201421: // entryClassifier 2170 this.getEntryClassifier().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 2171 return value; 2172 case 438810361: // entryReference 2173 this.getEntryReference().add(TypeConvertor.castToReference(value)); // Reference 2174 return value; 2175 case 1945583389: // entryQuantity 2176 this.getEntryQuantity().add(TypeConvertor.castToQuantity(value)); // Quantity 2177 return value; 2178 case 1140135409: // emptyReason 2179 this.emptyReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2180 return value; 2181 case 1970241253: // section 2182 this.getSection().add((SectionComponent) value); // SectionComponent 2183 return value; 2184 default: return super.setProperty(hash, name, value); 2185 } 2186 2187 } 2188 2189 @Override 2190 public Base setProperty(String name, Base value) throws FHIRException { 2191 if (name.equals("title")) { 2192 this.title = TypeConvertor.castToString(value); // StringType 2193 } else if (name.equals("focus")) { 2194 this.focus = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2195 } else if (name.equals("focusReference")) { 2196 this.focusReference = TypeConvertor.castToReference(value); // Reference 2197 } else if (name.equals("author")) { 2198 this.getAuthor().add(TypeConvertor.castToReference(value)); 2199 } else if (name.equals("text")) { 2200 this.text = TypeConvertor.castToNarrative(value); // Narrative 2201 } else if (name.equals("mode")) { 2202 value = new ListModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 2203 this.mode = (Enumeration) value; // Enumeration<ListMode> 2204 } else if (name.equals("orderedBy")) { 2205 this.orderedBy = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2206 } else if (name.equals("entryClassifier")) { 2207 this.getEntryClassifier().add(TypeConvertor.castToCodeableConcept(value)); 2208 } else if (name.equals("entryReference")) { 2209 this.getEntryReference().add(TypeConvertor.castToReference(value)); 2210 } else if (name.equals("entryQuantity")) { 2211 this.getEntryQuantity().add(TypeConvertor.castToQuantity(value)); 2212 } else if (name.equals("emptyReason")) { 2213 this.emptyReason = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 2214 } else if (name.equals("section")) { 2215 this.getSection().add((SectionComponent) value); 2216 } else 2217 return super.setProperty(name, value); 2218 return value; 2219 } 2220 2221 @Override 2222 public Base makeProperty(int hash, String name) throws FHIRException { 2223 switch (hash) { 2224 case 110371416: return getTitleElement(); 2225 case 97604824: return getFocus(); 2226 case 1823604051: return getFocusReference(); 2227 case -1406328437: return addAuthor(); 2228 case 3556653: return getText(); 2229 case 3357091: return getModeElement(); 2230 case -391079516: return getOrderedBy(); 2231 case -948201421: return addEntryClassifier(); 2232 case 438810361: return addEntryReference(); 2233 case 1945583389: return addEntryQuantity(); 2234 case 1140135409: return getEmptyReason(); 2235 case 1970241253: return addSection(); 2236 default: return super.makeProperty(hash, name); 2237 } 2238 2239 } 2240 2241 @Override 2242 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2243 switch (hash) { 2244 case 110371416: /*title*/ return new String[] {"string"}; 2245 case 97604824: /*focus*/ return new String[] {"CodeableConcept"}; 2246 case 1823604051: /*focusReference*/ return new String[] {"Reference"}; 2247 case -1406328437: /*author*/ return new String[] {"Reference"}; 2248 case 3556653: /*text*/ return new String[] {"Narrative"}; 2249 case 3357091: /*mode*/ return new String[] {"code"}; 2250 case -391079516: /*orderedBy*/ return new String[] {"CodeableConcept"}; 2251 case -948201421: /*entryClassifier*/ return new String[] {"CodeableConcept"}; 2252 case 438810361: /*entryReference*/ return new String[] {"Reference"}; 2253 case 1945583389: /*entryQuantity*/ return new String[] {"Quantity"}; 2254 case 1140135409: /*emptyReason*/ return new String[] {"CodeableConcept"}; 2255 case 1970241253: /*section*/ return new String[] {"@EvidenceReport.section"}; 2256 default: return super.getTypesForProperty(hash, name); 2257 } 2258 2259 } 2260 2261 @Override 2262 public Base addChild(String name) throws FHIRException { 2263 if (name.equals("title")) { 2264 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.section.title"); 2265 } 2266 else if (name.equals("focus")) { 2267 this.focus = new CodeableConcept(); 2268 return this.focus; 2269 } 2270 else if (name.equals("focusReference")) { 2271 this.focusReference = new Reference(); 2272 return this.focusReference; 2273 } 2274 else if (name.equals("author")) { 2275 return addAuthor(); 2276 } 2277 else if (name.equals("text")) { 2278 this.text = new Narrative(); 2279 return this.text; 2280 } 2281 else if (name.equals("mode")) { 2282 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.section.mode"); 2283 } 2284 else if (name.equals("orderedBy")) { 2285 this.orderedBy = new CodeableConcept(); 2286 return this.orderedBy; 2287 } 2288 else if (name.equals("entryClassifier")) { 2289 return addEntryClassifier(); 2290 } 2291 else if (name.equals("entryReference")) { 2292 return addEntryReference(); 2293 } 2294 else if (name.equals("entryQuantity")) { 2295 return addEntryQuantity(); 2296 } 2297 else if (name.equals("emptyReason")) { 2298 this.emptyReason = new CodeableConcept(); 2299 return this.emptyReason; 2300 } 2301 else if (name.equals("section")) { 2302 return addSection(); 2303 } 2304 else 2305 return super.addChild(name); 2306 } 2307 2308 public SectionComponent copy() { 2309 SectionComponent dst = new SectionComponent(); 2310 copyValues(dst); 2311 return dst; 2312 } 2313 2314 public void copyValues(SectionComponent dst) { 2315 super.copyValues(dst); 2316 dst.title = title == null ? null : title.copy(); 2317 dst.focus = focus == null ? null : focus.copy(); 2318 dst.focusReference = focusReference == null ? null : focusReference.copy(); 2319 if (author != null) { 2320 dst.author = new ArrayList<Reference>(); 2321 for (Reference i : author) 2322 dst.author.add(i.copy()); 2323 }; 2324 dst.text = text == null ? null : text.copy(); 2325 dst.mode = mode == null ? null : mode.copy(); 2326 dst.orderedBy = orderedBy == null ? null : orderedBy.copy(); 2327 if (entryClassifier != null) { 2328 dst.entryClassifier = new ArrayList<CodeableConcept>(); 2329 for (CodeableConcept i : entryClassifier) 2330 dst.entryClassifier.add(i.copy()); 2331 }; 2332 if (entryReference != null) { 2333 dst.entryReference = new ArrayList<Reference>(); 2334 for (Reference i : entryReference) 2335 dst.entryReference.add(i.copy()); 2336 }; 2337 if (entryQuantity != null) { 2338 dst.entryQuantity = new ArrayList<Quantity>(); 2339 for (Quantity i : entryQuantity) 2340 dst.entryQuantity.add(i.copy()); 2341 }; 2342 dst.emptyReason = emptyReason == null ? null : emptyReason.copy(); 2343 if (section != null) { 2344 dst.section = new ArrayList<SectionComponent>(); 2345 for (SectionComponent i : section) 2346 dst.section.add(i.copy()); 2347 }; 2348 } 2349 2350 @Override 2351 public boolean equalsDeep(Base other_) { 2352 if (!super.equalsDeep(other_)) 2353 return false; 2354 if (!(other_ instanceof SectionComponent)) 2355 return false; 2356 SectionComponent o = (SectionComponent) other_; 2357 return compareDeep(title, o.title, true) && compareDeep(focus, o.focus, true) && compareDeep(focusReference, o.focusReference, true) 2358 && compareDeep(author, o.author, true) && compareDeep(text, o.text, true) && compareDeep(mode, o.mode, true) 2359 && compareDeep(orderedBy, o.orderedBy, true) && compareDeep(entryClassifier, o.entryClassifier, true) 2360 && compareDeep(entryReference, o.entryReference, true) && compareDeep(entryQuantity, o.entryQuantity, true) 2361 && compareDeep(emptyReason, o.emptyReason, true) && compareDeep(section, o.section, true); 2362 } 2363 2364 @Override 2365 public boolean equalsShallow(Base other_) { 2366 if (!super.equalsShallow(other_)) 2367 return false; 2368 if (!(other_ instanceof SectionComponent)) 2369 return false; 2370 SectionComponent o = (SectionComponent) other_; 2371 return compareValues(title, o.title, true) && compareValues(mode, o.mode, true); 2372 } 2373 2374 public boolean isEmpty() { 2375 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, focus, focusReference 2376 , author, text, mode, orderedBy, entryClassifier, entryReference, entryQuantity 2377 , emptyReason, section); 2378 } 2379 2380 public String fhirType() { 2381 return "EvidenceReport.section"; 2382 2383 } 2384 2385 } 2386 2387 /** 2388 * An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers. 2389 */ 2390 @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true) 2391 @Description(shortDefinition="Canonical identifier for this EvidenceReport, represented as a globally unique URI", formalDefinition="An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers." ) 2392 protected UriType url; 2393 2394 /** 2395 * The status of this summary. Enables tracking the life-cycle of the content. 2396 */ 2397 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 2398 @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this summary. Enables tracking the life-cycle of the content." ) 2399 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status") 2400 protected Enumeration<PublicationStatus> status; 2401 2402 /** 2403 * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence report instances. 2404 */ 2405 @Child(name = "useContext", type = {UsageContext.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2406 @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence report instances." ) 2407 protected List<UsageContext> useContext; 2408 2409 /** 2410 * A formal identifier that is used to identify this EvidenceReport when it is represented in other formats, or referenced in a specification, model, design or an instance. 2411 */ 2412 @Child(name = "identifier", type = {Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2413 @Description(shortDefinition="Unique identifier for the evidence report", formalDefinition="A formal identifier that is used to identify this EvidenceReport when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 2414 protected List<Identifier> identifier; 2415 2416 /** 2417 * A formal identifier that is used to identify things closely related to this EvidenceReport. 2418 */ 2419 @Child(name = "relatedIdentifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2420 @Description(shortDefinition="Identifiers for articles that may relate to more than one evidence report", formalDefinition="A formal identifier that is used to identify things closely related to this EvidenceReport." ) 2421 protected List<Identifier> relatedIdentifier; 2422 2423 /** 2424 * Citation Resource or display of suggested citation for this report. 2425 */ 2426 @Child(name = "citeAs", type = {Citation.class, MarkdownType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2427 @Description(shortDefinition="Citation for this report", formalDefinition="Citation Resource or display of suggested citation for this report." ) 2428 protected DataType citeAs; 2429 2430 /** 2431 * Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression. 2432 */ 2433 @Child(name = "type", type = {CodeableConcept.class}, order=6, min=0, max=1, modifier=false, summary=false) 2434 @Description(shortDefinition="Kind of report", formalDefinition="Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression." ) 2435 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/evidence-report-type") 2436 protected CodeableConcept type; 2437 2438 /** 2439 * Used for footnotes and annotations. 2440 */ 2441 @Child(name = "note", type = {Annotation.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2442 @Description(shortDefinition="Used for footnotes and annotations", formalDefinition="Used for footnotes and annotations." ) 2443 protected List<Annotation> note; 2444 2445 /** 2446 * Link, description or reference to artifact associated with the report. 2447 */ 2448 @Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2449 @Description(shortDefinition="Link, description or reference to artifact associated with the report", formalDefinition="Link, description or reference to artifact associated with the report." ) 2450 protected List<RelatedArtifact> relatedArtifact; 2451 2452 /** 2453 * Specifies the subject or focus of the report. Answers "What is this report about?". 2454 */ 2455 @Child(name = "subject", type = {}, order=9, min=1, max=1, modifier=false, summary=true) 2456 @Description(shortDefinition="Focus of the report", formalDefinition="Specifies the subject or focus of the report. Answers \"What is this report about?\"." ) 2457 protected EvidenceReportSubjectComponent subject; 2458 2459 /** 2460 * The name of the organization or individual that published the evidence report. 2461 */ 2462 @Child(name = "publisher", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=true) 2463 @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the evidence report." ) 2464 protected StringType publisher; 2465 2466 /** 2467 * Contact details to assist a user in finding and communicating with the publisher. 2468 */ 2469 @Child(name = "contact", type = {ContactDetail.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2470 @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." ) 2471 protected List<ContactDetail> contact; 2472 2473 /** 2474 * An individiual, organization, or device primarily involved in the creation and maintenance of the content. 2475 */ 2476 @Child(name = "author", type = {ContactDetail.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2477 @Description(shortDefinition="Who authored the content", formalDefinition="An individiual, organization, or device primarily involved in the creation and maintenance of the content." ) 2478 protected List<ContactDetail> author; 2479 2480 /** 2481 * An individiual, organization, or device primarily responsible for internal coherence of the content. 2482 */ 2483 @Child(name = "editor", type = {ContactDetail.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2484 @Description(shortDefinition="Who edited the content", formalDefinition="An individiual, organization, or device primarily responsible for internal coherence of the content." ) 2485 protected List<ContactDetail> editor; 2486 2487 /** 2488 * An individiual, organization, or device primarily responsible for review of some aspect of the content. 2489 */ 2490 @Child(name = "reviewer", type = {ContactDetail.class}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2491 @Description(shortDefinition="Who reviewed the content", formalDefinition="An individiual, organization, or device primarily responsible for review of some aspect of the content." ) 2492 protected List<ContactDetail> reviewer; 2493 2494 /** 2495 * An individiual, organization, or device responsible for officially endorsing the content for use in some setting. 2496 */ 2497 @Child(name = "endorser", type = {ContactDetail.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2498 @Description(shortDefinition="Who endorsed the content", formalDefinition="An individiual, organization, or device responsible for officially endorsing the content for use in some setting." ) 2499 protected List<ContactDetail> endorser; 2500 2501 /** 2502 * Relationships that this composition has with other compositions or documents that already exist. 2503 */ 2504 @Child(name = "relatesTo", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2505 @Description(shortDefinition="Relationships to other compositions/documents", formalDefinition="Relationships that this composition has with other compositions or documents that already exist." ) 2506 protected List<EvidenceReportRelatesToComponent> relatesTo; 2507 2508 /** 2509 * The root of the sections that make up the composition. 2510 */ 2511 @Child(name = "section", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2512 @Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." ) 2513 protected List<SectionComponent> section; 2514 2515 private static final long serialVersionUID = -1087028792L; 2516 2517 /** 2518 * Constructor 2519 */ 2520 public EvidenceReport() { 2521 super(); 2522 } 2523 2524 /** 2525 * Constructor 2526 */ 2527 public EvidenceReport(PublicationStatus status, EvidenceReportSubjectComponent subject) { 2528 super(); 2529 this.setStatus(status); 2530 this.setSubject(subject); 2531 } 2532 2533 /** 2534 * @return {@link #url} (An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2535 */ 2536 public UriType getUrlElement() { 2537 if (this.url == null) 2538 if (Configuration.errorOnAutoCreate()) 2539 throw new Error("Attempt to auto-create EvidenceReport.url"); 2540 else if (Configuration.doAutoCreate()) 2541 this.url = new UriType(); // bb 2542 return this.url; 2543 } 2544 2545 public boolean hasUrlElement() { 2546 return this.url != null && !this.url.isEmpty(); 2547 } 2548 2549 public boolean hasUrl() { 2550 return this.url != null && !this.url.isEmpty(); 2551 } 2552 2553 /** 2554 * @param value {@link #url} (An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2555 */ 2556 public EvidenceReport setUrlElement(UriType value) { 2557 this.url = value; 2558 return this; 2559 } 2560 2561 /** 2562 * @return An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers. 2563 */ 2564 public String getUrl() { 2565 return this.url == null ? null : this.url.getValue(); 2566 } 2567 2568 /** 2569 * @param value An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers. 2570 */ 2571 public EvidenceReport setUrl(String value) { 2572 if (Utilities.noString(value)) 2573 this.url = null; 2574 else { 2575 if (this.url == null) 2576 this.url = new UriType(); 2577 this.url.setValue(value); 2578 } 2579 return this; 2580 } 2581 2582 /** 2583 * @return {@link #status} (The status of this summary. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2584 */ 2585 public Enumeration<PublicationStatus> getStatusElement() { 2586 if (this.status == null) 2587 if (Configuration.errorOnAutoCreate()) 2588 throw new Error("Attempt to auto-create EvidenceReport.status"); 2589 else if (Configuration.doAutoCreate()) 2590 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 2591 return this.status; 2592 } 2593 2594 public boolean hasStatusElement() { 2595 return this.status != null && !this.status.isEmpty(); 2596 } 2597 2598 public boolean hasStatus() { 2599 return this.status != null && !this.status.isEmpty(); 2600 } 2601 2602 /** 2603 * @param value {@link #status} (The status of this summary. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2604 */ 2605 public EvidenceReport setStatusElement(Enumeration<PublicationStatus> value) { 2606 this.status = value; 2607 return this; 2608 } 2609 2610 /** 2611 * @return The status of this summary. Enables tracking the life-cycle of the content. 2612 */ 2613 public PublicationStatus getStatus() { 2614 return this.status == null ? null : this.status.getValue(); 2615 } 2616 2617 /** 2618 * @param value The status of this summary. Enables tracking the life-cycle of the content. 2619 */ 2620 public EvidenceReport setStatus(PublicationStatus value) { 2621 if (this.status == null) 2622 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 2623 this.status.setValue(value); 2624 return this; 2625 } 2626 2627 /** 2628 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence report instances.) 2629 */ 2630 public List<UsageContext> getUseContext() { 2631 if (this.useContext == null) 2632 this.useContext = new ArrayList<UsageContext>(); 2633 return this.useContext; 2634 } 2635 2636 /** 2637 * @return Returns a reference to <code>this</code> for easy method chaining 2638 */ 2639 public EvidenceReport setUseContext(List<UsageContext> theUseContext) { 2640 this.useContext = theUseContext; 2641 return this; 2642 } 2643 2644 public boolean hasUseContext() { 2645 if (this.useContext == null) 2646 return false; 2647 for (UsageContext item : this.useContext) 2648 if (!item.isEmpty()) 2649 return true; 2650 return false; 2651 } 2652 2653 public UsageContext addUseContext() { //3 2654 UsageContext t = new UsageContext(); 2655 if (this.useContext == null) 2656 this.useContext = new ArrayList<UsageContext>(); 2657 this.useContext.add(t); 2658 return t; 2659 } 2660 2661 public EvidenceReport addUseContext(UsageContext t) { //3 2662 if (t == null) 2663 return this; 2664 if (this.useContext == null) 2665 this.useContext = new ArrayList<UsageContext>(); 2666 this.useContext.add(t); 2667 return this; 2668 } 2669 2670 /** 2671 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3} 2672 */ 2673 public UsageContext getUseContextFirstRep() { 2674 if (getUseContext().isEmpty()) { 2675 addUseContext(); 2676 } 2677 return getUseContext().get(0); 2678 } 2679 2680 /** 2681 * @return {@link #identifier} (A formal identifier that is used to identify this EvidenceReport when it is represented in other formats, or referenced in a specification, model, design or an instance.) 2682 */ 2683 public List<Identifier> getIdentifier() { 2684 if (this.identifier == null) 2685 this.identifier = new ArrayList<Identifier>(); 2686 return this.identifier; 2687 } 2688 2689 /** 2690 * @return Returns a reference to <code>this</code> for easy method chaining 2691 */ 2692 public EvidenceReport setIdentifier(List<Identifier> theIdentifier) { 2693 this.identifier = theIdentifier; 2694 return this; 2695 } 2696 2697 public boolean hasIdentifier() { 2698 if (this.identifier == null) 2699 return false; 2700 for (Identifier item : this.identifier) 2701 if (!item.isEmpty()) 2702 return true; 2703 return false; 2704 } 2705 2706 public Identifier addIdentifier() { //3 2707 Identifier t = new Identifier(); 2708 if (this.identifier == null) 2709 this.identifier = new ArrayList<Identifier>(); 2710 this.identifier.add(t); 2711 return t; 2712 } 2713 2714 public EvidenceReport addIdentifier(Identifier t) { //3 2715 if (t == null) 2716 return this; 2717 if (this.identifier == null) 2718 this.identifier = new ArrayList<Identifier>(); 2719 this.identifier.add(t); 2720 return this; 2721 } 2722 2723 /** 2724 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 2725 */ 2726 public Identifier getIdentifierFirstRep() { 2727 if (getIdentifier().isEmpty()) { 2728 addIdentifier(); 2729 } 2730 return getIdentifier().get(0); 2731 } 2732 2733 /** 2734 * @return {@link #relatedIdentifier} (A formal identifier that is used to identify things closely related to this EvidenceReport.) 2735 */ 2736 public List<Identifier> getRelatedIdentifier() { 2737 if (this.relatedIdentifier == null) 2738 this.relatedIdentifier = new ArrayList<Identifier>(); 2739 return this.relatedIdentifier; 2740 } 2741 2742 /** 2743 * @return Returns a reference to <code>this</code> for easy method chaining 2744 */ 2745 public EvidenceReport setRelatedIdentifier(List<Identifier> theRelatedIdentifier) { 2746 this.relatedIdentifier = theRelatedIdentifier; 2747 return this; 2748 } 2749 2750 public boolean hasRelatedIdentifier() { 2751 if (this.relatedIdentifier == null) 2752 return false; 2753 for (Identifier item : this.relatedIdentifier) 2754 if (!item.isEmpty()) 2755 return true; 2756 return false; 2757 } 2758 2759 public Identifier addRelatedIdentifier() { //3 2760 Identifier t = new Identifier(); 2761 if (this.relatedIdentifier == null) 2762 this.relatedIdentifier = new ArrayList<Identifier>(); 2763 this.relatedIdentifier.add(t); 2764 return t; 2765 } 2766 2767 public EvidenceReport addRelatedIdentifier(Identifier t) { //3 2768 if (t == null) 2769 return this; 2770 if (this.relatedIdentifier == null) 2771 this.relatedIdentifier = new ArrayList<Identifier>(); 2772 this.relatedIdentifier.add(t); 2773 return this; 2774 } 2775 2776 /** 2777 * @return The first repetition of repeating field {@link #relatedIdentifier}, creating it if it does not already exist {3} 2778 */ 2779 public Identifier getRelatedIdentifierFirstRep() { 2780 if (getRelatedIdentifier().isEmpty()) { 2781 addRelatedIdentifier(); 2782 } 2783 return getRelatedIdentifier().get(0); 2784 } 2785 2786 /** 2787 * @return {@link #citeAs} (Citation Resource or display of suggested citation for this report.) 2788 */ 2789 public DataType getCiteAs() { 2790 return this.citeAs; 2791 } 2792 2793 /** 2794 * @return {@link #citeAs} (Citation Resource or display of suggested citation for this report.) 2795 */ 2796 public Reference getCiteAsReference() throws FHIRException { 2797 if (this.citeAs == null) 2798 this.citeAs = new Reference(); 2799 if (!(this.citeAs instanceof Reference)) 2800 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.citeAs.getClass().getName()+" was encountered"); 2801 return (Reference) this.citeAs; 2802 } 2803 2804 public boolean hasCiteAsReference() { 2805 return this != null && this.citeAs instanceof Reference; 2806 } 2807 2808 /** 2809 * @return {@link #citeAs} (Citation Resource or display of suggested citation for this report.) 2810 */ 2811 public MarkdownType getCiteAsMarkdownType() throws FHIRException { 2812 if (this.citeAs == null) 2813 this.citeAs = new MarkdownType(); 2814 if (!(this.citeAs instanceof MarkdownType)) 2815 throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.citeAs.getClass().getName()+" was encountered"); 2816 return (MarkdownType) this.citeAs; 2817 } 2818 2819 public boolean hasCiteAsMarkdownType() { 2820 return this != null && this.citeAs instanceof MarkdownType; 2821 } 2822 2823 public boolean hasCiteAs() { 2824 return this.citeAs != null && !this.citeAs.isEmpty(); 2825 } 2826 2827 /** 2828 * @param value {@link #citeAs} (Citation Resource or display of suggested citation for this report.) 2829 */ 2830 public EvidenceReport setCiteAs(DataType value) { 2831 if (value != null && !(value instanceof Reference || value instanceof MarkdownType)) 2832 throw new Error("Not the right type for EvidenceReport.citeAs[x]: "+value.fhirType()); 2833 this.citeAs = value; 2834 return this; 2835 } 2836 2837 /** 2838 * @return {@link #type} (Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression.) 2839 */ 2840 public CodeableConcept getType() { 2841 if (this.type == null) 2842 if (Configuration.errorOnAutoCreate()) 2843 throw new Error("Attempt to auto-create EvidenceReport.type"); 2844 else if (Configuration.doAutoCreate()) 2845 this.type = new CodeableConcept(); // cc 2846 return this.type; 2847 } 2848 2849 public boolean hasType() { 2850 return this.type != null && !this.type.isEmpty(); 2851 } 2852 2853 /** 2854 * @param value {@link #type} (Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression.) 2855 */ 2856 public EvidenceReport setType(CodeableConcept value) { 2857 this.type = value; 2858 return this; 2859 } 2860 2861 /** 2862 * @return {@link #note} (Used for footnotes and annotations.) 2863 */ 2864 public List<Annotation> getNote() { 2865 if (this.note == null) 2866 this.note = new ArrayList<Annotation>(); 2867 return this.note; 2868 } 2869 2870 /** 2871 * @return Returns a reference to <code>this</code> for easy method chaining 2872 */ 2873 public EvidenceReport setNote(List<Annotation> theNote) { 2874 this.note = theNote; 2875 return this; 2876 } 2877 2878 public boolean hasNote() { 2879 if (this.note == null) 2880 return false; 2881 for (Annotation item : this.note) 2882 if (!item.isEmpty()) 2883 return true; 2884 return false; 2885 } 2886 2887 public Annotation addNote() { //3 2888 Annotation t = new Annotation(); 2889 if (this.note == null) 2890 this.note = new ArrayList<Annotation>(); 2891 this.note.add(t); 2892 return t; 2893 } 2894 2895 public EvidenceReport addNote(Annotation t) { //3 2896 if (t == null) 2897 return this; 2898 if (this.note == null) 2899 this.note = new ArrayList<Annotation>(); 2900 this.note.add(t); 2901 return this; 2902 } 2903 2904 /** 2905 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist {3} 2906 */ 2907 public Annotation getNoteFirstRep() { 2908 if (getNote().isEmpty()) { 2909 addNote(); 2910 } 2911 return getNote().get(0); 2912 } 2913 2914 /** 2915 * @return {@link #relatedArtifact} (Link, description or reference to artifact associated with the report.) 2916 */ 2917 public List<RelatedArtifact> getRelatedArtifact() { 2918 if (this.relatedArtifact == null) 2919 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 2920 return this.relatedArtifact; 2921 } 2922 2923 /** 2924 * @return Returns a reference to <code>this</code> for easy method chaining 2925 */ 2926 public EvidenceReport setRelatedArtifact(List<RelatedArtifact> theRelatedArtifact) { 2927 this.relatedArtifact = theRelatedArtifact; 2928 return this; 2929 } 2930 2931 public boolean hasRelatedArtifact() { 2932 if (this.relatedArtifact == null) 2933 return false; 2934 for (RelatedArtifact item : this.relatedArtifact) 2935 if (!item.isEmpty()) 2936 return true; 2937 return false; 2938 } 2939 2940 public RelatedArtifact addRelatedArtifact() { //3 2941 RelatedArtifact t = new RelatedArtifact(); 2942 if (this.relatedArtifact == null) 2943 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 2944 this.relatedArtifact.add(t); 2945 return t; 2946 } 2947 2948 public EvidenceReport addRelatedArtifact(RelatedArtifact t) { //3 2949 if (t == null) 2950 return this; 2951 if (this.relatedArtifact == null) 2952 this.relatedArtifact = new ArrayList<RelatedArtifact>(); 2953 this.relatedArtifact.add(t); 2954 return this; 2955 } 2956 2957 /** 2958 * @return The first repetition of repeating field {@link #relatedArtifact}, creating it if it does not already exist {3} 2959 */ 2960 public RelatedArtifact getRelatedArtifactFirstRep() { 2961 if (getRelatedArtifact().isEmpty()) { 2962 addRelatedArtifact(); 2963 } 2964 return getRelatedArtifact().get(0); 2965 } 2966 2967 /** 2968 * @return {@link #subject} (Specifies the subject or focus of the report. Answers "What is this report about?".) 2969 */ 2970 public EvidenceReportSubjectComponent getSubject() { 2971 if (this.subject == null) 2972 if (Configuration.errorOnAutoCreate()) 2973 throw new Error("Attempt to auto-create EvidenceReport.subject"); 2974 else if (Configuration.doAutoCreate()) 2975 this.subject = new EvidenceReportSubjectComponent(); // cc 2976 return this.subject; 2977 } 2978 2979 public boolean hasSubject() { 2980 return this.subject != null && !this.subject.isEmpty(); 2981 } 2982 2983 /** 2984 * @param value {@link #subject} (Specifies the subject or focus of the report. Answers "What is this report about?".) 2985 */ 2986 public EvidenceReport setSubject(EvidenceReportSubjectComponent value) { 2987 this.subject = value; 2988 return this; 2989 } 2990 2991 /** 2992 * @return {@link #publisher} (The name of the organization or individual that published the evidence report.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2993 */ 2994 public StringType getPublisherElement() { 2995 if (this.publisher == null) 2996 if (Configuration.errorOnAutoCreate()) 2997 throw new Error("Attempt to auto-create EvidenceReport.publisher"); 2998 else if (Configuration.doAutoCreate()) 2999 this.publisher = new StringType(); // bb 3000 return this.publisher; 3001 } 3002 3003 public boolean hasPublisherElement() { 3004 return this.publisher != null && !this.publisher.isEmpty(); 3005 } 3006 3007 public boolean hasPublisher() { 3008 return this.publisher != null && !this.publisher.isEmpty(); 3009 } 3010 3011 /** 3012 * @param value {@link #publisher} (The name of the organization or individual that published the evidence report.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 3013 */ 3014 public EvidenceReport setPublisherElement(StringType value) { 3015 this.publisher = value; 3016 return this; 3017 } 3018 3019 /** 3020 * @return The name of the organization or individual that published the evidence report. 3021 */ 3022 public String getPublisher() { 3023 return this.publisher == null ? null : this.publisher.getValue(); 3024 } 3025 3026 /** 3027 * @param value The name of the organization or individual that published the evidence report. 3028 */ 3029 public EvidenceReport setPublisher(String value) { 3030 if (Utilities.noString(value)) 3031 this.publisher = null; 3032 else { 3033 if (this.publisher == null) 3034 this.publisher = new StringType(); 3035 this.publisher.setValue(value); 3036 } 3037 return this; 3038 } 3039 3040 /** 3041 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 3042 */ 3043 public List<ContactDetail> getContact() { 3044 if (this.contact == null) 3045 this.contact = new ArrayList<ContactDetail>(); 3046 return this.contact; 3047 } 3048 3049 /** 3050 * @return Returns a reference to <code>this</code> for easy method chaining 3051 */ 3052 public EvidenceReport setContact(List<ContactDetail> theContact) { 3053 this.contact = theContact; 3054 return this; 3055 } 3056 3057 public boolean hasContact() { 3058 if (this.contact == null) 3059 return false; 3060 for (ContactDetail item : this.contact) 3061 if (!item.isEmpty()) 3062 return true; 3063 return false; 3064 } 3065 3066 public ContactDetail addContact() { //3 3067 ContactDetail t = new ContactDetail(); 3068 if (this.contact == null) 3069 this.contact = new ArrayList<ContactDetail>(); 3070 this.contact.add(t); 3071 return t; 3072 } 3073 3074 public EvidenceReport addContact(ContactDetail t) { //3 3075 if (t == null) 3076 return this; 3077 if (this.contact == null) 3078 this.contact = new ArrayList<ContactDetail>(); 3079 this.contact.add(t); 3080 return this; 3081 } 3082 3083 /** 3084 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3} 3085 */ 3086 public ContactDetail getContactFirstRep() { 3087 if (getContact().isEmpty()) { 3088 addContact(); 3089 } 3090 return getContact().get(0); 3091 } 3092 3093 /** 3094 * @return {@link #author} (An individiual, organization, or device primarily involved in the creation and maintenance of the content.) 3095 */ 3096 public List<ContactDetail> getAuthor() { 3097 if (this.author == null) 3098 this.author = new ArrayList<ContactDetail>(); 3099 return this.author; 3100 } 3101 3102 /** 3103 * @return Returns a reference to <code>this</code> for easy method chaining 3104 */ 3105 public EvidenceReport setAuthor(List<ContactDetail> theAuthor) { 3106 this.author = theAuthor; 3107 return this; 3108 } 3109 3110 public boolean hasAuthor() { 3111 if (this.author == null) 3112 return false; 3113 for (ContactDetail item : this.author) 3114 if (!item.isEmpty()) 3115 return true; 3116 return false; 3117 } 3118 3119 public ContactDetail addAuthor() { //3 3120 ContactDetail t = new ContactDetail(); 3121 if (this.author == null) 3122 this.author = new ArrayList<ContactDetail>(); 3123 this.author.add(t); 3124 return t; 3125 } 3126 3127 public EvidenceReport addAuthor(ContactDetail t) { //3 3128 if (t == null) 3129 return this; 3130 if (this.author == null) 3131 this.author = new ArrayList<ContactDetail>(); 3132 this.author.add(t); 3133 return this; 3134 } 3135 3136 /** 3137 * @return The first repetition of repeating field {@link #author}, creating it if it does not already exist {3} 3138 */ 3139 public ContactDetail getAuthorFirstRep() { 3140 if (getAuthor().isEmpty()) { 3141 addAuthor(); 3142 } 3143 return getAuthor().get(0); 3144 } 3145 3146 /** 3147 * @return {@link #editor} (An individiual, organization, or device primarily responsible for internal coherence of the content.) 3148 */ 3149 public List<ContactDetail> getEditor() { 3150 if (this.editor == null) 3151 this.editor = new ArrayList<ContactDetail>(); 3152 return this.editor; 3153 } 3154 3155 /** 3156 * @return Returns a reference to <code>this</code> for easy method chaining 3157 */ 3158 public EvidenceReport setEditor(List<ContactDetail> theEditor) { 3159 this.editor = theEditor; 3160 return this; 3161 } 3162 3163 public boolean hasEditor() { 3164 if (this.editor == null) 3165 return false; 3166 for (ContactDetail item : this.editor) 3167 if (!item.isEmpty()) 3168 return true; 3169 return false; 3170 } 3171 3172 public ContactDetail addEditor() { //3 3173 ContactDetail t = new ContactDetail(); 3174 if (this.editor == null) 3175 this.editor = new ArrayList<ContactDetail>(); 3176 this.editor.add(t); 3177 return t; 3178 } 3179 3180 public EvidenceReport addEditor(ContactDetail t) { //3 3181 if (t == null) 3182 return this; 3183 if (this.editor == null) 3184 this.editor = new ArrayList<ContactDetail>(); 3185 this.editor.add(t); 3186 return this; 3187 } 3188 3189 /** 3190 * @return The first repetition of repeating field {@link #editor}, creating it if it does not already exist {3} 3191 */ 3192 public ContactDetail getEditorFirstRep() { 3193 if (getEditor().isEmpty()) { 3194 addEditor(); 3195 } 3196 return getEditor().get(0); 3197 } 3198 3199 /** 3200 * @return {@link #reviewer} (An individiual, organization, or device primarily responsible for review of some aspect of the content.) 3201 */ 3202 public List<ContactDetail> getReviewer() { 3203 if (this.reviewer == null) 3204 this.reviewer = new ArrayList<ContactDetail>(); 3205 return this.reviewer; 3206 } 3207 3208 /** 3209 * @return Returns a reference to <code>this</code> for easy method chaining 3210 */ 3211 public EvidenceReport setReviewer(List<ContactDetail> theReviewer) { 3212 this.reviewer = theReviewer; 3213 return this; 3214 } 3215 3216 public boolean hasReviewer() { 3217 if (this.reviewer == null) 3218 return false; 3219 for (ContactDetail item : this.reviewer) 3220 if (!item.isEmpty()) 3221 return true; 3222 return false; 3223 } 3224 3225 public ContactDetail addReviewer() { //3 3226 ContactDetail t = new ContactDetail(); 3227 if (this.reviewer == null) 3228 this.reviewer = new ArrayList<ContactDetail>(); 3229 this.reviewer.add(t); 3230 return t; 3231 } 3232 3233 public EvidenceReport addReviewer(ContactDetail t) { //3 3234 if (t == null) 3235 return this; 3236 if (this.reviewer == null) 3237 this.reviewer = new ArrayList<ContactDetail>(); 3238 this.reviewer.add(t); 3239 return this; 3240 } 3241 3242 /** 3243 * @return The first repetition of repeating field {@link #reviewer}, creating it if it does not already exist {3} 3244 */ 3245 public ContactDetail getReviewerFirstRep() { 3246 if (getReviewer().isEmpty()) { 3247 addReviewer(); 3248 } 3249 return getReviewer().get(0); 3250 } 3251 3252 /** 3253 * @return {@link #endorser} (An individiual, organization, or device responsible for officially endorsing the content for use in some setting.) 3254 */ 3255 public List<ContactDetail> getEndorser() { 3256 if (this.endorser == null) 3257 this.endorser = new ArrayList<ContactDetail>(); 3258 return this.endorser; 3259 } 3260 3261 /** 3262 * @return Returns a reference to <code>this</code> for easy method chaining 3263 */ 3264 public EvidenceReport setEndorser(List<ContactDetail> theEndorser) { 3265 this.endorser = theEndorser; 3266 return this; 3267 } 3268 3269 public boolean hasEndorser() { 3270 if (this.endorser == null) 3271 return false; 3272 for (ContactDetail item : this.endorser) 3273 if (!item.isEmpty()) 3274 return true; 3275 return false; 3276 } 3277 3278 public ContactDetail addEndorser() { //3 3279 ContactDetail t = new ContactDetail(); 3280 if (this.endorser == null) 3281 this.endorser = new ArrayList<ContactDetail>(); 3282 this.endorser.add(t); 3283 return t; 3284 } 3285 3286 public EvidenceReport addEndorser(ContactDetail t) { //3 3287 if (t == null) 3288 return this; 3289 if (this.endorser == null) 3290 this.endorser = new ArrayList<ContactDetail>(); 3291 this.endorser.add(t); 3292 return this; 3293 } 3294 3295 /** 3296 * @return The first repetition of repeating field {@link #endorser}, creating it if it does not already exist {3} 3297 */ 3298 public ContactDetail getEndorserFirstRep() { 3299 if (getEndorser().isEmpty()) { 3300 addEndorser(); 3301 } 3302 return getEndorser().get(0); 3303 } 3304 3305 /** 3306 * @return {@link #relatesTo} (Relationships that this composition has with other compositions or documents that already exist.) 3307 */ 3308 public List<EvidenceReportRelatesToComponent> getRelatesTo() { 3309 if (this.relatesTo == null) 3310 this.relatesTo = new ArrayList<EvidenceReportRelatesToComponent>(); 3311 return this.relatesTo; 3312 } 3313 3314 /** 3315 * @return Returns a reference to <code>this</code> for easy method chaining 3316 */ 3317 public EvidenceReport setRelatesTo(List<EvidenceReportRelatesToComponent> theRelatesTo) { 3318 this.relatesTo = theRelatesTo; 3319 return this; 3320 } 3321 3322 public boolean hasRelatesTo() { 3323 if (this.relatesTo == null) 3324 return false; 3325 for (EvidenceReportRelatesToComponent item : this.relatesTo) 3326 if (!item.isEmpty()) 3327 return true; 3328 return false; 3329 } 3330 3331 public EvidenceReportRelatesToComponent addRelatesTo() { //3 3332 EvidenceReportRelatesToComponent t = new EvidenceReportRelatesToComponent(); 3333 if (this.relatesTo == null) 3334 this.relatesTo = new ArrayList<EvidenceReportRelatesToComponent>(); 3335 this.relatesTo.add(t); 3336 return t; 3337 } 3338 3339 public EvidenceReport addRelatesTo(EvidenceReportRelatesToComponent t) { //3 3340 if (t == null) 3341 return this; 3342 if (this.relatesTo == null) 3343 this.relatesTo = new ArrayList<EvidenceReportRelatesToComponent>(); 3344 this.relatesTo.add(t); 3345 return this; 3346 } 3347 3348 /** 3349 * @return The first repetition of repeating field {@link #relatesTo}, creating it if it does not already exist {3} 3350 */ 3351 public EvidenceReportRelatesToComponent getRelatesToFirstRep() { 3352 if (getRelatesTo().isEmpty()) { 3353 addRelatesTo(); 3354 } 3355 return getRelatesTo().get(0); 3356 } 3357 3358 /** 3359 * @return {@link #section} (The root of the sections that make up the composition.) 3360 */ 3361 public List<SectionComponent> getSection() { 3362 if (this.section == null) 3363 this.section = new ArrayList<SectionComponent>(); 3364 return this.section; 3365 } 3366 3367 /** 3368 * @return Returns a reference to <code>this</code> for easy method chaining 3369 */ 3370 public EvidenceReport setSection(List<SectionComponent> theSection) { 3371 this.section = theSection; 3372 return this; 3373 } 3374 3375 public boolean hasSection() { 3376 if (this.section == null) 3377 return false; 3378 for (SectionComponent item : this.section) 3379 if (!item.isEmpty()) 3380 return true; 3381 return false; 3382 } 3383 3384 public SectionComponent addSection() { //3 3385 SectionComponent t = new SectionComponent(); 3386 if (this.section == null) 3387 this.section = new ArrayList<SectionComponent>(); 3388 this.section.add(t); 3389 return t; 3390 } 3391 3392 public EvidenceReport addSection(SectionComponent t) { //3 3393 if (t == null) 3394 return this; 3395 if (this.section == null) 3396 this.section = new ArrayList<SectionComponent>(); 3397 this.section.add(t); 3398 return this; 3399 } 3400 3401 /** 3402 * @return The first repetition of repeating field {@link #section}, creating it if it does not already exist {3} 3403 */ 3404 public SectionComponent getSectionFirstRep() { 3405 if (getSection().isEmpty()) { 3406 addSection(); 3407 } 3408 return getSection().get(0); 3409 } 3410 3411 /** 3412 * not supported on this implementation 3413 */ 3414 @Override 3415 public int getVersionMax() { 3416 return 0; 3417 } 3418 /** 3419 * @return {@link #version} (The identifier that is used to identify this version of the evidence report when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence report author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 3420 */ 3421 public StringType getVersionElement() { 3422 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"version\""); 3423 } 3424 3425 public boolean hasVersionElement() { 3426 return false; 3427 } 3428 public boolean hasVersion() { 3429 return false; 3430 } 3431 3432 /** 3433 * @param value {@link #version} (The identifier that is used to identify this version of the evidence report when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence report author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 3434 */ 3435 public EvidenceReport setVersionElement(StringType value) { 3436 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"version\""); 3437 } 3438 public String getVersion() { 3439 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"version\""); 3440 } 3441 /** 3442 * @param value The identifier that is used to identify this version of the evidence report when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the evidence report author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 3443 */ 3444 public EvidenceReport setVersion(String value) { 3445 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"version\""); 3446 } 3447 /** 3448 * not supported on this implementation 3449 */ 3450 @Override 3451 public int getNameMax() { 3452 return 0; 3453 } 3454 /** 3455 * @return {@link #name} (A natural language name identifying the evidence report. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3456 */ 3457 public StringType getNameElement() { 3458 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"name\""); 3459 } 3460 3461 public boolean hasNameElement() { 3462 return false; 3463 } 3464 public boolean hasName() { 3465 return false; 3466 } 3467 3468 /** 3469 * @param value {@link #name} (A natural language name identifying the evidence report. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3470 */ 3471 public EvidenceReport setNameElement(StringType value) { 3472 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"name\""); 3473 } 3474 public String getName() { 3475 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"name\""); 3476 } 3477 /** 3478 * @param value A natural language name identifying the evidence report. This name should be usable as an identifier for the module by machine processing applications such as code generation. 3479 */ 3480 public EvidenceReport setName(String value) { 3481 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"name\""); 3482 } 3483 /** 3484 * not supported on this implementation 3485 */ 3486 @Override 3487 public int getTitleMax() { 3488 return 0; 3489 } 3490 /** 3491 * @return {@link #title} (A short, descriptive, user-friendly title for the evidence report.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 3492 */ 3493 public StringType getTitleElement() { 3494 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"title\""); 3495 } 3496 3497 public boolean hasTitleElement() { 3498 return false; 3499 } 3500 public boolean hasTitle() { 3501 return false; 3502 } 3503 3504 /** 3505 * @param value {@link #title} (A short, descriptive, user-friendly title for the evidence report.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 3506 */ 3507 public EvidenceReport setTitleElement(StringType value) { 3508 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"title\""); 3509 } 3510 public String getTitle() { 3511 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"title\""); 3512 } 3513 /** 3514 * @param value A short, descriptive, user-friendly title for the evidence report. 3515 */ 3516 public EvidenceReport setTitle(String value) { 3517 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"title\""); 3518 } 3519 /** 3520 * not supported on this implementation 3521 */ 3522 @Override 3523 public int getExperimentalMax() { 3524 return 0; 3525 } 3526 /** 3527 * @return {@link #experimental} (A Boolean value to indicate that this evidence report is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 3528 */ 3529 public BooleanType getExperimentalElement() { 3530 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"experimental\""); 3531 } 3532 3533 public boolean hasExperimentalElement() { 3534 return false; 3535 } 3536 public boolean hasExperimental() { 3537 return false; 3538 } 3539 3540 /** 3541 * @param value {@link #experimental} (A Boolean value to indicate that this evidence report is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 3542 */ 3543 public EvidenceReport setExperimentalElement(BooleanType value) { 3544 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"experimental\""); 3545 } 3546 public boolean getExperimental() { 3547 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"experimental\""); 3548 } 3549 /** 3550 * @param value A Boolean value to indicate that this evidence report is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 3551 */ 3552 public EvidenceReport setExperimental(boolean value) { 3553 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"experimental\""); 3554 } 3555 /** 3556 * not supported on this implementation 3557 */ 3558 @Override 3559 public int getDateMax() { 3560 return 0; 3561 } 3562 /** 3563 * @return {@link #date} (The date (and optionally time) when the evidence report was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence report changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3564 */ 3565 public DateTimeType getDateElement() { 3566 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"date\""); 3567 } 3568 3569 public boolean hasDateElement() { 3570 return false; 3571 } 3572 public boolean hasDate() { 3573 return false; 3574 } 3575 3576 /** 3577 * @param value {@link #date} (The date (and optionally time) when the evidence report was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence report changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 3578 */ 3579 public EvidenceReport setDateElement(DateTimeType value) { 3580 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"date\""); 3581 } 3582 public Date getDate() { 3583 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"date\""); 3584 } 3585 /** 3586 * @param value The date (and optionally time) when the evidence report was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the evidence report changes. 3587 */ 3588 public EvidenceReport setDate(Date value) { 3589 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"date\""); 3590 } 3591 /** 3592 * not supported on this implementation 3593 */ 3594 @Override 3595 public int getDescriptionMax() { 3596 return 0; 3597 } 3598 /** 3599 * @return {@link #description} (A free text natural language description of the evidence report from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3600 */ 3601 public MarkdownType getDescriptionElement() { 3602 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"description\""); 3603 } 3604 3605 public boolean hasDescriptionElement() { 3606 return false; 3607 } 3608 public boolean hasDescription() { 3609 return false; 3610 } 3611 3612 /** 3613 * @param value {@link #description} (A free text natural language description of the evidence report from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 3614 */ 3615 public EvidenceReport setDescriptionElement(MarkdownType value) { 3616 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"description\""); 3617 } 3618 public String getDescription() { 3619 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"description\""); 3620 } 3621 /** 3622 * @param value A free text natural language description of the evidence report from a consumer's perspective. 3623 */ 3624 public EvidenceReport setDescription(String value) { 3625 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"description\""); 3626 } 3627 /** 3628 * not supported on this implementation 3629 */ 3630 @Override 3631 public int getJurisdictionMax() { 3632 return 0; 3633 } 3634 /** 3635 * @return {@link #jurisdiction} (A legal or geographic region in which the evidence report is intended to be used.) 3636 */ 3637 public List<CodeableConcept> getJurisdiction() { 3638 return new ArrayList<>(); 3639 } 3640 /** 3641 * @return Returns a reference to <code>this</code> for easy method chaining 3642 */ 3643 public EvidenceReport setJurisdiction(List<CodeableConcept> theJurisdiction) { 3644 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"jurisdiction\""); 3645 } 3646 public boolean hasJurisdiction() { 3647 return false; 3648 } 3649 3650 public CodeableConcept addJurisdiction() { //3 3651 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"jurisdiction\""); 3652 } 3653 public EvidenceReport addJurisdiction(CodeableConcept t) { //3 3654 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"jurisdiction\""); 3655 } 3656 /** 3657 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {2} 3658 */ 3659 public CodeableConcept getJurisdictionFirstRep() { 3660 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"jurisdiction\""); 3661 } 3662 /** 3663 * not supported on this implementation 3664 */ 3665 @Override 3666 public int getPurposeMax() { 3667 return 0; 3668 } 3669 /** 3670 * @return {@link #purpose} (Explanation of why this evidence report is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 3671 */ 3672 public MarkdownType getPurposeElement() { 3673 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"purpose\""); 3674 } 3675 3676 public boolean hasPurposeElement() { 3677 return false; 3678 } 3679 public boolean hasPurpose() { 3680 return false; 3681 } 3682 3683 /** 3684 * @param value {@link #purpose} (Explanation of why this evidence report is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 3685 */ 3686 public EvidenceReport setPurposeElement(MarkdownType value) { 3687 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"purpose\""); 3688 } 3689 public String getPurpose() { 3690 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"purpose\""); 3691 } 3692 /** 3693 * @param value Explanation of why this evidence report is needed and why it has been designed as it has. 3694 */ 3695 public EvidenceReport setPurpose(String value) { 3696 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"purpose\""); 3697 } 3698 /** 3699 * not supported on this implementation 3700 */ 3701 @Override 3702 public int getCopyrightMax() { 3703 return 0; 3704 } 3705 /** 3706 * @return {@link #copyright} (A copyright statement relating to the evidence report and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence report.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3707 */ 3708 public MarkdownType getCopyrightElement() { 3709 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"copyright\""); 3710 } 3711 3712 public boolean hasCopyrightElement() { 3713 return false; 3714 } 3715 public boolean hasCopyright() { 3716 return false; 3717 } 3718 3719 /** 3720 * @param value {@link #copyright} (A copyright statement relating to the evidence report and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence report.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3721 */ 3722 public EvidenceReport setCopyrightElement(MarkdownType value) { 3723 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"copyright\""); 3724 } 3725 public String getCopyright() { 3726 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"copyright\""); 3727 } 3728 /** 3729 * @param value A copyright statement relating to the evidence report and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the evidence report. 3730 */ 3731 public EvidenceReport setCopyright(String value) { 3732 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"copyright\""); 3733 } 3734 /** 3735 * not supported on this implementation 3736 */ 3737 @Override 3738 public int getApprovalDateMax() { 3739 return 0; 3740 } 3741 /** 3742 * @return {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 3743 */ 3744 public DateType getApprovalDateElement() { 3745 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"approvalDate\""); 3746 } 3747 3748 public boolean hasApprovalDateElement() { 3749 return false; 3750 } 3751 public boolean hasApprovalDate() { 3752 return false; 3753 } 3754 3755 /** 3756 * @param value {@link #approvalDate} (The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value 3757 */ 3758 public EvidenceReport setApprovalDateElement(DateType value) { 3759 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"approvalDate\""); 3760 } 3761 public Date getApprovalDate() { 3762 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"approvalDate\""); 3763 } 3764 /** 3765 * @param value The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage. 3766 */ 3767 public EvidenceReport setApprovalDate(Date value) { 3768 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"approvalDate\""); 3769 } 3770 /** 3771 * not supported on this implementation 3772 */ 3773 @Override 3774 public int getLastReviewDateMax() { 3775 return 0; 3776 } 3777 /** 3778 * @return {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 3779 */ 3780 public DateType getLastReviewDateElement() { 3781 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"lastReviewDate\""); 3782 } 3783 3784 public boolean hasLastReviewDateElement() { 3785 return false; 3786 } 3787 public boolean hasLastReviewDate() { 3788 return false; 3789 } 3790 3791 /** 3792 * @param value {@link #lastReviewDate} (The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value 3793 */ 3794 public EvidenceReport setLastReviewDateElement(DateType value) { 3795 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"lastReviewDate\""); 3796 } 3797 public Date getLastReviewDate() { 3798 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"lastReviewDate\""); 3799 } 3800 /** 3801 * @param value The date on which the resource content was last reviewed. Review happens periodically after approval but does not change the original approval date. 3802 */ 3803 public EvidenceReport setLastReviewDate(Date value) { 3804 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"lastReviewDate\""); 3805 } 3806 /** 3807 * not supported on this implementation 3808 */ 3809 @Override 3810 public int getEffectivePeriodMax() { 3811 return 0; 3812 } 3813 /** 3814 * @return {@link #effectivePeriod} (The period during which the evidence report content was or is planned to be in active use.) 3815 */ 3816 public Period getEffectivePeriod() { 3817 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"effectivePeriod\""); 3818 } 3819 public boolean hasEffectivePeriod() { 3820 return false; 3821 } 3822 /** 3823 * @param value {@link #effectivePeriod} (The period during which the evidence report content was or is planned to be in active use.) 3824 */ 3825 public EvidenceReport setEffectivePeriod(Period value) { 3826 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"effectivePeriod\""); 3827 } 3828 3829 /** 3830 * not supported on this implementation 3831 */ 3832 @Override 3833 public int getTopicMax() { 3834 return 0; 3835 } 3836 /** 3837 * @return {@link #topic} (Descriptive topics related to the content of the library. Topics provide a high-level categorization of the library that can be useful for filtering and searching.) 3838 */ 3839 public List<CodeableConcept> getTopic() { 3840 return new ArrayList<>(); 3841 } 3842 /** 3843 * @return Returns a reference to <code>this</code> for easy method chaining 3844 */ 3845 public EvidenceReport setTopic(List<CodeableConcept> theTopic) { 3846 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"topic\""); 3847 } 3848 public boolean hasTopic() { 3849 return false; 3850 } 3851 3852 public CodeableConcept addTopic() { //3 3853 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"topic\""); 3854 } 3855 public EvidenceReport addTopic(CodeableConcept t) { //3 3856 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"topic\""); 3857 } 3858 /** 3859 * @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist {2} 3860 */ 3861 public CodeableConcept getTopicFirstRep() { 3862 throw new Error("The resource type \"EvidenceReport\" does not implement the property \"topic\""); 3863 } 3864 protected void listChildren(List<Property> children) { 3865 super.listChildren(children); 3866 children.add(new Property("url", "uri", "An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.", 0, 1, url)); 3867 children.add(new Property("status", "code", "The status of this summary. Enables tracking the life-cycle of the content.", 0, 1, status)); 3868 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence report instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 3869 children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this EvidenceReport when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 3870 children.add(new Property("relatedIdentifier", "Identifier", "A formal identifier that is used to identify things closely related to this EvidenceReport.", 0, java.lang.Integer.MAX_VALUE, relatedIdentifier)); 3871 children.add(new Property("citeAs[x]", "Reference(Citation)|markdown", "Citation Resource or display of suggested citation for this report.", 0, 1, citeAs)); 3872 children.add(new Property("type", "CodeableConcept", "Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression.", 0, 1, type)); 3873 children.add(new Property("note", "Annotation", "Used for footnotes and annotations.", 0, java.lang.Integer.MAX_VALUE, note)); 3874 children.add(new Property("relatedArtifact", "RelatedArtifact", "Link, description or reference to artifact associated with the report.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact)); 3875 children.add(new Property("subject", "", "Specifies the subject or focus of the report. Answers \"What is this report about?\".", 0, 1, subject)); 3876 children.add(new Property("publisher", "string", "The name of the organization or individual that published the evidence report.", 0, 1, publisher)); 3877 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 3878 children.add(new Property("author", "ContactDetail", "An individiual, organization, or device primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author)); 3879 children.add(new Property("editor", "ContactDetail", "An individiual, organization, or device primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor)); 3880 children.add(new Property("reviewer", "ContactDetail", "An individiual, organization, or device primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer)); 3881 children.add(new Property("endorser", "ContactDetail", "An individiual, organization, or device responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser)); 3882 children.add(new Property("relatesTo", "", "Relationships that this composition has with other compositions or documents that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo)); 3883 children.add(new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section)); 3884 } 3885 3886 @Override 3887 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3888 switch (_hash) { 3889 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this EvidenceReport when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this summary is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the summary is stored on different servers.", 0, 1, url); 3890 case -892481550: /*status*/ return new Property("status", "code", "The status of this summary. Enables tracking the life-cycle of the content.", 0, 1, status); 3891 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate evidence report instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 3892 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A formal identifier that is used to identify this EvidenceReport when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier); 3893 case -1007604940: /*relatedIdentifier*/ return new Property("relatedIdentifier", "Identifier", "A formal identifier that is used to identify things closely related to this EvidenceReport.", 0, java.lang.Integer.MAX_VALUE, relatedIdentifier); 3894 case -1706539017: /*citeAs[x]*/ return new Property("citeAs[x]", "Reference(Citation)|markdown", "Citation Resource or display of suggested citation for this report.", 0, 1, citeAs); 3895 case -1360156695: /*citeAs*/ return new Property("citeAs[x]", "Reference(Citation)|markdown", "Citation Resource or display of suggested citation for this report.", 0, 1, citeAs); 3896 case 1269009762: /*citeAsReference*/ return new Property("citeAs[x]", "Reference(Citation)", "Citation Resource or display of suggested citation for this report.", 0, 1, citeAs); 3897 case 456265720: /*citeAsMarkdown*/ return new Property("citeAs[x]", "markdown", "Citation Resource or display of suggested citation for this report.", 0, 1, citeAs); 3898 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "Specifies the kind of report, such as grouping of classifiers, search results, or human-compiled expression.", 0, 1, type); 3899 case 3387378: /*note*/ return new Property("note", "Annotation", "Used for footnotes and annotations.", 0, java.lang.Integer.MAX_VALUE, note); 3900 case 666807069: /*relatedArtifact*/ return new Property("relatedArtifact", "RelatedArtifact", "Link, description or reference to artifact associated with the report.", 0, java.lang.Integer.MAX_VALUE, relatedArtifact); 3901 case -1867885268: /*subject*/ return new Property("subject", "", "Specifies the subject or focus of the report. Answers \"What is this report about?\".", 0, 1, subject); 3902 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the evidence report.", 0, 1, publisher); 3903 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 3904 case -1406328437: /*author*/ return new Property("author", "ContactDetail", "An individiual, organization, or device primarily involved in the creation and maintenance of the content.", 0, java.lang.Integer.MAX_VALUE, author); 3905 case -1307827859: /*editor*/ return new Property("editor", "ContactDetail", "An individiual, organization, or device primarily responsible for internal coherence of the content.", 0, java.lang.Integer.MAX_VALUE, editor); 3906 case -261190139: /*reviewer*/ return new Property("reviewer", "ContactDetail", "An individiual, organization, or device primarily responsible for review of some aspect of the content.", 0, java.lang.Integer.MAX_VALUE, reviewer); 3907 case 1740277666: /*endorser*/ return new Property("endorser", "ContactDetail", "An individiual, organization, or device responsible for officially endorsing the content for use in some setting.", 0, java.lang.Integer.MAX_VALUE, endorser); 3908 case -7765931: /*relatesTo*/ return new Property("relatesTo", "", "Relationships that this composition has with other compositions or documents that already exist.", 0, java.lang.Integer.MAX_VALUE, relatesTo); 3909 case 1970241253: /*section*/ return new Property("section", "", "The root of the sections that make up the composition.", 0, java.lang.Integer.MAX_VALUE, section); 3910 default: return super.getNamedProperty(_hash, _name, _checkValid); 3911 } 3912 3913 } 3914 3915 @Override 3916 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3917 switch (hash) { 3918 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3919 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 3920 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 3921 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 3922 case -1007604940: /*relatedIdentifier*/ return this.relatedIdentifier == null ? new Base[0] : this.relatedIdentifier.toArray(new Base[this.relatedIdentifier.size()]); // Identifier 3923 case -1360156695: /*citeAs*/ return this.citeAs == null ? new Base[0] : new Base[] {this.citeAs}; // DataType 3924 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept 3925 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 3926 case 666807069: /*relatedArtifact*/ return this.relatedArtifact == null ? new Base[0] : this.relatedArtifact.toArray(new Base[this.relatedArtifact.size()]); // RelatedArtifact 3927 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // EvidenceReportSubjectComponent 3928 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 3929 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 3930 case -1406328437: /*author*/ return this.author == null ? new Base[0] : this.author.toArray(new Base[this.author.size()]); // ContactDetail 3931 case -1307827859: /*editor*/ return this.editor == null ? new Base[0] : this.editor.toArray(new Base[this.editor.size()]); // ContactDetail 3932 case -261190139: /*reviewer*/ return this.reviewer == null ? new Base[0] : this.reviewer.toArray(new Base[this.reviewer.size()]); // ContactDetail 3933 case 1740277666: /*endorser*/ return this.endorser == null ? new Base[0] : this.endorser.toArray(new Base[this.endorser.size()]); // ContactDetail 3934 case -7765931: /*relatesTo*/ return this.relatesTo == null ? new Base[0] : this.relatesTo.toArray(new Base[this.relatesTo.size()]); // EvidenceReportRelatesToComponent 3935 case 1970241253: /*section*/ return this.section == null ? new Base[0] : this.section.toArray(new Base[this.section.size()]); // SectionComponent 3936 default: return super.getProperty(hash, name, checkValid); 3937 } 3938 3939 } 3940 3941 @Override 3942 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3943 switch (hash) { 3944 case 116079: // url 3945 this.url = TypeConvertor.castToUri(value); // UriType 3946 return value; 3947 case -892481550: // status 3948 value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 3949 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 3950 return value; 3951 case -669707736: // useContext 3952 this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext 3953 return value; 3954 case -1618432855: // identifier 3955 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 3956 return value; 3957 case -1007604940: // relatedIdentifier 3958 this.getRelatedIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 3959 return value; 3960 case -1360156695: // citeAs 3961 this.citeAs = TypeConvertor.castToType(value); // DataType 3962 return value; 3963 case 3575610: // type 3964 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 3965 return value; 3966 case 3387378: // note 3967 this.getNote().add(TypeConvertor.castToAnnotation(value)); // Annotation 3968 return value; 3969 case 666807069: // relatedArtifact 3970 this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); // RelatedArtifact 3971 return value; 3972 case -1867885268: // subject 3973 this.subject = (EvidenceReportSubjectComponent) value; // EvidenceReportSubjectComponent 3974 return value; 3975 case 1447404028: // publisher 3976 this.publisher = TypeConvertor.castToString(value); // StringType 3977 return value; 3978 case 951526432: // contact 3979 this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail 3980 return value; 3981 case -1406328437: // author 3982 this.getAuthor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail 3983 return value; 3984 case -1307827859: // editor 3985 this.getEditor().add(TypeConvertor.castToContactDetail(value)); // ContactDetail 3986 return value; 3987 case -261190139: // reviewer 3988 this.getReviewer().add(TypeConvertor.castToContactDetail(value)); // ContactDetail 3989 return value; 3990 case 1740277666: // endorser 3991 this.getEndorser().add(TypeConvertor.castToContactDetail(value)); // ContactDetail 3992 return value; 3993 case -7765931: // relatesTo 3994 this.getRelatesTo().add((EvidenceReportRelatesToComponent) value); // EvidenceReportRelatesToComponent 3995 return value; 3996 case 1970241253: // section 3997 this.getSection().add((SectionComponent) value); // SectionComponent 3998 return value; 3999 default: return super.setProperty(hash, name, value); 4000 } 4001 4002 } 4003 4004 @Override 4005 public Base setProperty(String name, Base value) throws FHIRException { 4006 if (name.equals("url")) { 4007 this.url = TypeConvertor.castToUri(value); // UriType 4008 } else if (name.equals("status")) { 4009 value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 4010 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 4011 } else if (name.equals("useContext")) { 4012 this.getUseContext().add(TypeConvertor.castToUsageContext(value)); 4013 } else if (name.equals("identifier")) { 4014 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 4015 } else if (name.equals("relatedIdentifier")) { 4016 this.getRelatedIdentifier().add(TypeConvertor.castToIdentifier(value)); 4017 } else if (name.equals("citeAs[x]")) { 4018 this.citeAs = TypeConvertor.castToType(value); // DataType 4019 } else if (name.equals("type")) { 4020 this.type = TypeConvertor.castToCodeableConcept(value); // CodeableConcept 4021 } else if (name.equals("note")) { 4022 this.getNote().add(TypeConvertor.castToAnnotation(value)); 4023 } else if (name.equals("relatedArtifact")) { 4024 this.getRelatedArtifact().add(TypeConvertor.castToRelatedArtifact(value)); 4025 } else if (name.equals("subject")) { 4026 this.subject = (EvidenceReportSubjectComponent) value; // EvidenceReportSubjectComponent 4027 } else if (name.equals("publisher")) { 4028 this.publisher = TypeConvertor.castToString(value); // StringType 4029 } else if (name.equals("contact")) { 4030 this.getContact().add(TypeConvertor.castToContactDetail(value)); 4031 } else if (name.equals("author")) { 4032 this.getAuthor().add(TypeConvertor.castToContactDetail(value)); 4033 } else if (name.equals("editor")) { 4034 this.getEditor().add(TypeConvertor.castToContactDetail(value)); 4035 } else if (name.equals("reviewer")) { 4036 this.getReviewer().add(TypeConvertor.castToContactDetail(value)); 4037 } else if (name.equals("endorser")) { 4038 this.getEndorser().add(TypeConvertor.castToContactDetail(value)); 4039 } else if (name.equals("relatesTo")) { 4040 this.getRelatesTo().add((EvidenceReportRelatesToComponent) value); 4041 } else if (name.equals("section")) { 4042 this.getSection().add((SectionComponent) value); 4043 } else 4044 return super.setProperty(name, value); 4045 return value; 4046 } 4047 4048 @Override 4049 public Base makeProperty(int hash, String name) throws FHIRException { 4050 switch (hash) { 4051 case 116079: return getUrlElement(); 4052 case -892481550: return getStatusElement(); 4053 case -669707736: return addUseContext(); 4054 case -1618432855: return addIdentifier(); 4055 case -1007604940: return addRelatedIdentifier(); 4056 case -1706539017: return getCiteAs(); 4057 case -1360156695: return getCiteAs(); 4058 case 3575610: return getType(); 4059 case 3387378: return addNote(); 4060 case 666807069: return addRelatedArtifact(); 4061 case -1867885268: return getSubject(); 4062 case 1447404028: return getPublisherElement(); 4063 case 951526432: return addContact(); 4064 case -1406328437: return addAuthor(); 4065 case -1307827859: return addEditor(); 4066 case -261190139: return addReviewer(); 4067 case 1740277666: return addEndorser(); 4068 case -7765931: return addRelatesTo(); 4069 case 1970241253: return addSection(); 4070 default: return super.makeProperty(hash, name); 4071 } 4072 4073 } 4074 4075 @Override 4076 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4077 switch (hash) { 4078 case 116079: /*url*/ return new String[] {"uri"}; 4079 case -892481550: /*status*/ return new String[] {"code"}; 4080 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 4081 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 4082 case -1007604940: /*relatedIdentifier*/ return new String[] {"Identifier"}; 4083 case -1360156695: /*citeAs*/ return new String[] {"Reference", "markdown"}; 4084 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 4085 case 3387378: /*note*/ return new String[] {"Annotation"}; 4086 case 666807069: /*relatedArtifact*/ return new String[] {"RelatedArtifact"}; 4087 case -1867885268: /*subject*/ return new String[] {}; 4088 case 1447404028: /*publisher*/ return new String[] {"string"}; 4089 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 4090 case -1406328437: /*author*/ return new String[] {"ContactDetail"}; 4091 case -1307827859: /*editor*/ return new String[] {"ContactDetail"}; 4092 case -261190139: /*reviewer*/ return new String[] {"ContactDetail"}; 4093 case 1740277666: /*endorser*/ return new String[] {"ContactDetail"}; 4094 case -7765931: /*relatesTo*/ return new String[] {}; 4095 case 1970241253: /*section*/ return new String[] {}; 4096 default: return super.getTypesForProperty(hash, name); 4097 } 4098 4099 } 4100 4101 @Override 4102 public Base addChild(String name) throws FHIRException { 4103 if (name.equals("url")) { 4104 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.url"); 4105 } 4106 else if (name.equals("status")) { 4107 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.status"); 4108 } 4109 else if (name.equals("useContext")) { 4110 return addUseContext(); 4111 } 4112 else if (name.equals("identifier")) { 4113 return addIdentifier(); 4114 } 4115 else if (name.equals("relatedIdentifier")) { 4116 return addRelatedIdentifier(); 4117 } 4118 else if (name.equals("citeAsReference")) { 4119 this.citeAs = new Reference(); 4120 return this.citeAs; 4121 } 4122 else if (name.equals("citeAsMarkdown")) { 4123 this.citeAs = new MarkdownType(); 4124 return this.citeAs; 4125 } 4126 else if (name.equals("type")) { 4127 this.type = new CodeableConcept(); 4128 return this.type; 4129 } 4130 else if (name.equals("note")) { 4131 return addNote(); 4132 } 4133 else if (name.equals("relatedArtifact")) { 4134 return addRelatedArtifact(); 4135 } 4136 else if (name.equals("subject")) { 4137 this.subject = new EvidenceReportSubjectComponent(); 4138 return this.subject; 4139 } 4140 else if (name.equals("publisher")) { 4141 throw new FHIRException("Cannot call addChild on a primitive type EvidenceReport.publisher"); 4142 } 4143 else if (name.equals("contact")) { 4144 return addContact(); 4145 } 4146 else if (name.equals("author")) { 4147 return addAuthor(); 4148 } 4149 else if (name.equals("editor")) { 4150 return addEditor(); 4151 } 4152 else if (name.equals("reviewer")) { 4153 return addReviewer(); 4154 } 4155 else if (name.equals("endorser")) { 4156 return addEndorser(); 4157 } 4158 else if (name.equals("relatesTo")) { 4159 return addRelatesTo(); 4160 } 4161 else if (name.equals("section")) { 4162 return addSection(); 4163 } 4164 else 4165 return super.addChild(name); 4166 } 4167 4168 public String fhirType() { 4169 return "EvidenceReport"; 4170 4171 } 4172 4173 public EvidenceReport copy() { 4174 EvidenceReport dst = new EvidenceReport(); 4175 copyValues(dst); 4176 return dst; 4177 } 4178 4179 public void copyValues(EvidenceReport dst) { 4180 super.copyValues(dst); 4181 dst.url = url == null ? null : url.copy(); 4182 dst.status = status == null ? null : status.copy(); 4183 if (useContext != null) { 4184 dst.useContext = new ArrayList<UsageContext>(); 4185 for (UsageContext i : useContext) 4186 dst.useContext.add(i.copy()); 4187 }; 4188 if (identifier != null) { 4189 dst.identifier = new ArrayList<Identifier>(); 4190 for (Identifier i : identifier) 4191 dst.identifier.add(i.copy()); 4192 }; 4193 if (relatedIdentifier != null) { 4194 dst.relatedIdentifier = new ArrayList<Identifier>(); 4195 for (Identifier i : relatedIdentifier) 4196 dst.relatedIdentifier.add(i.copy()); 4197 }; 4198 dst.citeAs = citeAs == null ? null : citeAs.copy(); 4199 dst.type = type == null ? null : type.copy(); 4200 if (note != null) { 4201 dst.note = new ArrayList<Annotation>(); 4202 for (Annotation i : note) 4203 dst.note.add(i.copy()); 4204 }; 4205 if (relatedArtifact != null) { 4206 dst.relatedArtifact = new ArrayList<RelatedArtifact>(); 4207 for (RelatedArtifact i : relatedArtifact) 4208 dst.relatedArtifact.add(i.copy()); 4209 }; 4210 dst.subject = subject == null ? null : subject.copy(); 4211 dst.publisher = publisher == null ? null : publisher.copy(); 4212 if (contact != null) { 4213 dst.contact = new ArrayList<ContactDetail>(); 4214 for (ContactDetail i : contact) 4215 dst.contact.add(i.copy()); 4216 }; 4217 if (author != null) { 4218 dst.author = new ArrayList<ContactDetail>(); 4219 for (ContactDetail i : author) 4220 dst.author.add(i.copy()); 4221 }; 4222 if (editor != null) { 4223 dst.editor = new ArrayList<ContactDetail>(); 4224 for (ContactDetail i : editor) 4225 dst.editor.add(i.copy()); 4226 }; 4227 if (reviewer != null) { 4228 dst.reviewer = new ArrayList<ContactDetail>(); 4229 for (ContactDetail i : reviewer) 4230 dst.reviewer.add(i.copy()); 4231 }; 4232 if (endorser != null) { 4233 dst.endorser = new ArrayList<ContactDetail>(); 4234 for (ContactDetail i : endorser) 4235 dst.endorser.add(i.copy()); 4236 }; 4237 if (relatesTo != null) { 4238 dst.relatesTo = new ArrayList<EvidenceReportRelatesToComponent>(); 4239 for (EvidenceReportRelatesToComponent i : relatesTo) 4240 dst.relatesTo.add(i.copy()); 4241 }; 4242 if (section != null) { 4243 dst.section = new ArrayList<SectionComponent>(); 4244 for (SectionComponent i : section) 4245 dst.section.add(i.copy()); 4246 }; 4247 } 4248 4249 protected EvidenceReport typedCopy() { 4250 return copy(); 4251 } 4252 4253 @Override 4254 public boolean equalsDeep(Base other_) { 4255 if (!super.equalsDeep(other_)) 4256 return false; 4257 if (!(other_ instanceof EvidenceReport)) 4258 return false; 4259 EvidenceReport o = (EvidenceReport) other_; 4260 return compareDeep(url, o.url, true) && compareDeep(status, o.status, true) && compareDeep(useContext, o.useContext, true) 4261 && compareDeep(identifier, o.identifier, true) && compareDeep(relatedIdentifier, o.relatedIdentifier, true) 4262 && compareDeep(citeAs, o.citeAs, true) && compareDeep(type, o.type, true) && compareDeep(note, o.note, true) 4263 && compareDeep(relatedArtifact, o.relatedArtifact, true) && compareDeep(subject, o.subject, true) 4264 && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(author, o.author, true) 4265 && compareDeep(editor, o.editor, true) && compareDeep(reviewer, o.reviewer, true) && compareDeep(endorser, o.endorser, true) 4266 && compareDeep(relatesTo, o.relatesTo, true) && compareDeep(section, o.section, true); 4267 } 4268 4269 @Override 4270 public boolean equalsShallow(Base other_) { 4271 if (!super.equalsShallow(other_)) 4272 return false; 4273 if (!(other_ instanceof EvidenceReport)) 4274 return false; 4275 EvidenceReport o = (EvidenceReport) other_; 4276 return compareValues(url, o.url, true) && compareValues(status, o.status, true) && compareValues(publisher, o.publisher, true) 4277 ; 4278 } 4279 4280 public boolean isEmpty() { 4281 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, status, useContext 4282 , identifier, relatedIdentifier, citeAs, type, note, relatedArtifact, subject 4283 , publisher, contact, author, editor, reviewer, endorser, relatesTo, section 4284 ); 4285 } 4286 4287 @Override 4288 public ResourceType getResourceType() { 4289 return ResourceType.EvidenceReport; 4290 } 4291 4292 /** 4293 * Search parameter: <b>context-quantity</b> 4294 * <p> 4295 * Description: <b>A quantity- or range-valued use context assigned to the evidence report</b><br> 4296 * Type: <b>quantity</b><br> 4297 * Path: <b>(EvidenceReport.useContext.value as Quantity) | (EvidenceReport.useContext.value as Range)</b><br> 4298 * </p> 4299 */ 4300 @SearchParamDefinition(name="context-quantity", path="(EvidenceReport.useContext.value as Quantity) | (EvidenceReport.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the evidence report", type="quantity" ) 4301 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 4302 /** 4303 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 4304 * <p> 4305 * Description: <b>A quantity- or range-valued use context assigned to the evidence report</b><br> 4306 * Type: <b>quantity</b><br> 4307 * Path: <b>(EvidenceReport.useContext.value as Quantity) | (EvidenceReport.useContext.value as Range)</b><br> 4308 * </p> 4309 */ 4310 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY); 4311 4312 /** 4313 * Search parameter: <b>context-type-quantity</b> 4314 * <p> 4315 * Description: <b>A use context type and quantity- or range-based value assigned to the evidence report</b><br> 4316 * Type: <b>composite</b><br> 4317 * Path: <b>EvidenceReport.useContext</b><br> 4318 * </p> 4319 */ 4320 @SearchParamDefinition(name="context-type-quantity", path="EvidenceReport.useContext", description="A use context type and quantity- or range-based value assigned to the evidence report", type="composite", compositeOf={"context-type", "context-quantity"} ) 4321 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 4322 /** 4323 * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b> 4324 * <p> 4325 * Description: <b>A use context type and quantity- or range-based value assigned to the evidence report</b><br> 4326 * Type: <b>composite</b><br> 4327 * Path: <b>EvidenceReport.useContext</b><br> 4328 * </p> 4329 */ 4330 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY); 4331 4332 /** 4333 * Search parameter: <b>context-type-value</b> 4334 * <p> 4335 * Description: <b>A use context type and value assigned to the evidence report</b><br> 4336 * Type: <b>composite</b><br> 4337 * Path: <b>EvidenceReport.useContext</b><br> 4338 * </p> 4339 */ 4340 @SearchParamDefinition(name="context-type-value", path="EvidenceReport.useContext", description="A use context type and value assigned to the evidence report", type="composite", compositeOf={"context-type", "context"} ) 4341 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 4342 /** 4343 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 4344 * <p> 4345 * Description: <b>A use context type and value assigned to the evidence report</b><br> 4346 * Type: <b>composite</b><br> 4347 * Path: <b>EvidenceReport.useContext</b><br> 4348 * </p> 4349 */ 4350 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE); 4351 4352 /** 4353 * Search parameter: <b>context-type</b> 4354 * <p> 4355 * Description: <b>A type of use context assigned to the evidence report</b><br> 4356 * Type: <b>token</b><br> 4357 * Path: <b>EvidenceReport.useContext.code</b><br> 4358 * </p> 4359 */ 4360 @SearchParamDefinition(name="context-type", path="EvidenceReport.useContext.code", description="A type of use context assigned to the evidence report", type="token" ) 4361 public static final String SP_CONTEXT_TYPE = "context-type"; 4362 /** 4363 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 4364 * <p> 4365 * Description: <b>A type of use context assigned to the evidence report</b><br> 4366 * Type: <b>token</b><br> 4367 * Path: <b>EvidenceReport.useContext.code</b><br> 4368 * </p> 4369 */ 4370 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 4371 4372 /** 4373 * Search parameter: <b>context</b> 4374 * <p> 4375 * Description: <b>A use context assigned to the evidence report</b><br> 4376 * Type: <b>token</b><br> 4377 * Path: <b>(EvidenceReport.useContext.value as CodeableConcept)</b><br> 4378 * </p> 4379 */ 4380 @SearchParamDefinition(name="context", path="(EvidenceReport.useContext.value as CodeableConcept)", description="A use context assigned to the evidence report", type="token" ) 4381 public static final String SP_CONTEXT = "context"; 4382 /** 4383 * <b>Fluent Client</b> search parameter constant for <b>context</b> 4384 * <p> 4385 * Description: <b>A use context assigned to the evidence report</b><br> 4386 * Type: <b>token</b><br> 4387 * Path: <b>(EvidenceReport.useContext.value as CodeableConcept)</b><br> 4388 * </p> 4389 */ 4390 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 4391 4392 /** 4393 * Search parameter: <b>identifier</b> 4394 * <p> 4395 * Description: <b>External identifier for the evidence report</b><br> 4396 * Type: <b>token</b><br> 4397 * Path: <b>EvidenceReport.identifier</b><br> 4398 * </p> 4399 */ 4400 @SearchParamDefinition(name="identifier", path="EvidenceReport.identifier", description="External identifier for the evidence report", type="token" ) 4401 public static final String SP_IDENTIFIER = "identifier"; 4402 /** 4403 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 4404 * <p> 4405 * Description: <b>External identifier for the evidence report</b><br> 4406 * Type: <b>token</b><br> 4407 * Path: <b>EvidenceReport.identifier</b><br> 4408 * </p> 4409 */ 4410 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 4411 4412 /** 4413 * Search parameter: <b>publisher</b> 4414 * <p> 4415 * Description: <b>Name of the publisher of the evidence report</b><br> 4416 * Type: <b>string</b><br> 4417 * Path: <b>EvidenceReport.publisher</b><br> 4418 * </p> 4419 */ 4420 @SearchParamDefinition(name="publisher", path="EvidenceReport.publisher", description="Name of the publisher of the evidence report", type="string" ) 4421 public static final String SP_PUBLISHER = "publisher"; 4422 /** 4423 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 4424 * <p> 4425 * Description: <b>Name of the publisher of the evidence report</b><br> 4426 * Type: <b>string</b><br> 4427 * Path: <b>EvidenceReport.publisher</b><br> 4428 * </p> 4429 */ 4430 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 4431 4432 /** 4433 * Search parameter: <b>status</b> 4434 * <p> 4435 * Description: <b>The current status of the evidence report</b><br> 4436 * Type: <b>token</b><br> 4437 * Path: <b>EvidenceReport.status</b><br> 4438 * </p> 4439 */ 4440 @SearchParamDefinition(name="status", path="EvidenceReport.status", description="The current status of the evidence report", type="token" ) 4441 public static final String SP_STATUS = "status"; 4442 /** 4443 * <b>Fluent Client</b> search parameter constant for <b>status</b> 4444 * <p> 4445 * Description: <b>The current status of the evidence report</b><br> 4446 * Type: <b>token</b><br> 4447 * Path: <b>EvidenceReport.status</b><br> 4448 * </p> 4449 */ 4450 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 4451 4452 /** 4453 * Search parameter: <b>url</b> 4454 * <p> 4455 * Description: <b>The uri that identifies the evidence report</b><br> 4456 * Type: <b>uri</b><br> 4457 * Path: <b>EvidenceReport.url</b><br> 4458 * </p> 4459 */ 4460 @SearchParamDefinition(name="url", path="EvidenceReport.url", description="The uri that identifies the evidence report", type="uri" ) 4461 public static final String SP_URL = "url"; 4462 /** 4463 * <b>Fluent Client</b> search parameter constant for <b>url</b> 4464 * <p> 4465 * Description: <b>The uri that identifies the evidence report</b><br> 4466 * Type: <b>uri</b><br> 4467 * Path: <b>EvidenceReport.url</b><br> 4468 * </p> 4469 */ 4470 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 4471 4472 4473} 4474