001package org.hl7.fhir.dstu3.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045import org.hl7.fhir.exceptions.FHIRFormatError; 046/** 047 * The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. 048 */ 049@ResourceDef(name="DiagnosticReport", profile="http://hl7.org/fhir/StructureDefinition/DiagnosticReport") 050public class DiagnosticReport extends DomainResource { 051 052 public enum DiagnosticReportStatus { 053 /** 054 * The existence of the report is registered, but there is nothing yet available. 055 */ 056 REGISTERED, 057 /** 058 * This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified. 059 */ 060 PARTIAL, 061 /** 062 * Verified early results are available, but not all results are final. 063 */ 064 PRELIMINARY, 065 /** 066 * The report is complete and verified by an authorized person. 067 */ 068 FINAL, 069 /** 070 * Subsequent to being final, the report has been modified. This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued. 071 */ 072 AMENDED, 073 /** 074 * Subsequent to being final, the report has been modified to correct an error in the report or referenced results. 075 */ 076 CORRECTED, 077 /** 078 * Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged. 079 */ 080 APPENDED, 081 /** 082 * The report is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). 083 */ 084 CANCELLED, 085 /** 086 * The report has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) 087 */ 088 ENTEREDINERROR, 089 /** 090 * The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. 091 */ 092 UNKNOWN, 093 /** 094 * added to help the parsers with the generic types 095 */ 096 NULL; 097 public static DiagnosticReportStatus fromCode(String codeString) throws FHIRException { 098 if (codeString == null || "".equals(codeString)) 099 return null; 100 if ("registered".equals(codeString)) 101 return REGISTERED; 102 if ("partial".equals(codeString)) 103 return PARTIAL; 104 if ("preliminary".equals(codeString)) 105 return PRELIMINARY; 106 if ("final".equals(codeString)) 107 return FINAL; 108 if ("amended".equals(codeString)) 109 return AMENDED; 110 if ("corrected".equals(codeString)) 111 return CORRECTED; 112 if ("appended".equals(codeString)) 113 return APPENDED; 114 if ("cancelled".equals(codeString)) 115 return CANCELLED; 116 if ("entered-in-error".equals(codeString)) 117 return ENTEREDINERROR; 118 if ("unknown".equals(codeString)) 119 return UNKNOWN; 120 if (Configuration.isAcceptInvalidEnums()) 121 return null; 122 else 123 throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); 124 } 125 public String toCode() { 126 switch (this) { 127 case REGISTERED: return "registered"; 128 case PARTIAL: return "partial"; 129 case PRELIMINARY: return "preliminary"; 130 case FINAL: return "final"; 131 case AMENDED: return "amended"; 132 case CORRECTED: return "corrected"; 133 case APPENDED: return "appended"; 134 case CANCELLED: return "cancelled"; 135 case ENTEREDINERROR: return "entered-in-error"; 136 case UNKNOWN: return "unknown"; 137 default: return "?"; 138 } 139 } 140 public String getSystem() { 141 switch (this) { 142 case REGISTERED: return "http://hl7.org/fhir/diagnostic-report-status"; 143 case PARTIAL: return "http://hl7.org/fhir/diagnostic-report-status"; 144 case PRELIMINARY: return "http://hl7.org/fhir/diagnostic-report-status"; 145 case FINAL: return "http://hl7.org/fhir/diagnostic-report-status"; 146 case AMENDED: return "http://hl7.org/fhir/diagnostic-report-status"; 147 case CORRECTED: return "http://hl7.org/fhir/diagnostic-report-status"; 148 case APPENDED: return "http://hl7.org/fhir/diagnostic-report-status"; 149 case CANCELLED: return "http://hl7.org/fhir/diagnostic-report-status"; 150 case ENTEREDINERROR: return "http://hl7.org/fhir/diagnostic-report-status"; 151 case UNKNOWN: return "http://hl7.org/fhir/diagnostic-report-status"; 152 default: return "?"; 153 } 154 } 155 public String getDefinition() { 156 switch (this) { 157 case REGISTERED: return "The existence of the report is registered, but there is nothing yet available."; 158 case PARTIAL: return "This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified."; 159 case PRELIMINARY: return "Verified early results are available, but not all results are final."; 160 case FINAL: return "The report is complete and verified by an authorized person."; 161 case AMENDED: return "Subsequent to being final, the report has been modified. This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued."; 162 case CORRECTED: return "Subsequent to being final, the report has been modified to correct an error in the report or referenced results."; 163 case APPENDED: return "Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged."; 164 case CANCELLED: return "The report is unavailable because the measurement was not started or not completed (also sometimes called \"aborted\")."; 165 case ENTEREDINERROR: return "The report has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; 166 case UNKNOWN: return "The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; 167 default: return "?"; 168 } 169 } 170 public String getDisplay() { 171 switch (this) { 172 case REGISTERED: return "Registered"; 173 case PARTIAL: return "Partial"; 174 case PRELIMINARY: return "Preliminary"; 175 case FINAL: return "Final"; 176 case AMENDED: return "Amended"; 177 case CORRECTED: return "Corrected"; 178 case APPENDED: return "Appended"; 179 case CANCELLED: return "Cancelled"; 180 case ENTEREDINERROR: return "Entered in Error"; 181 case UNKNOWN: return "Unknown"; 182 default: return "?"; 183 } 184 } 185 } 186 187 public static class DiagnosticReportStatusEnumFactory implements EnumFactory<DiagnosticReportStatus> { 188 public DiagnosticReportStatus fromCode(String codeString) throws IllegalArgumentException { 189 if (codeString == null || "".equals(codeString)) 190 if (codeString == null || "".equals(codeString)) 191 return null; 192 if ("registered".equals(codeString)) 193 return DiagnosticReportStatus.REGISTERED; 194 if ("partial".equals(codeString)) 195 return DiagnosticReportStatus.PARTIAL; 196 if ("preliminary".equals(codeString)) 197 return DiagnosticReportStatus.PRELIMINARY; 198 if ("final".equals(codeString)) 199 return DiagnosticReportStatus.FINAL; 200 if ("amended".equals(codeString)) 201 return DiagnosticReportStatus.AMENDED; 202 if ("corrected".equals(codeString)) 203 return DiagnosticReportStatus.CORRECTED; 204 if ("appended".equals(codeString)) 205 return DiagnosticReportStatus.APPENDED; 206 if ("cancelled".equals(codeString)) 207 return DiagnosticReportStatus.CANCELLED; 208 if ("entered-in-error".equals(codeString)) 209 return DiagnosticReportStatus.ENTEREDINERROR; 210 if ("unknown".equals(codeString)) 211 return DiagnosticReportStatus.UNKNOWN; 212 throw new IllegalArgumentException("Unknown DiagnosticReportStatus code '"+codeString+"'"); 213 } 214 public Enumeration<DiagnosticReportStatus> fromType(Base code) throws FHIRException { 215 if (code == null) 216 return null; 217 if (code.isEmpty()) 218 return new Enumeration<DiagnosticReportStatus>(this); 219 String codeString = ((PrimitiveType) code).asStringValue(); 220 if (codeString == null || "".equals(codeString)) 221 return null; 222 if ("registered".equals(codeString)) 223 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.REGISTERED); 224 if ("partial".equals(codeString)) 225 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.PARTIAL); 226 if ("preliminary".equals(codeString)) 227 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.PRELIMINARY); 228 if ("final".equals(codeString)) 229 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.FINAL); 230 if ("amended".equals(codeString)) 231 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.AMENDED); 232 if ("corrected".equals(codeString)) 233 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.CORRECTED); 234 if ("appended".equals(codeString)) 235 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.APPENDED); 236 if ("cancelled".equals(codeString)) 237 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.CANCELLED); 238 if ("entered-in-error".equals(codeString)) 239 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.ENTEREDINERROR); 240 if ("unknown".equals(codeString)) 241 return new Enumeration<DiagnosticReportStatus>(this, DiagnosticReportStatus.UNKNOWN); 242 throw new FHIRException("Unknown DiagnosticReportStatus code '"+codeString+"'"); 243 } 244 public String toCode(DiagnosticReportStatus code) { 245 if (code == DiagnosticReportStatus.REGISTERED) 246 return "registered"; 247 if (code == DiagnosticReportStatus.PARTIAL) 248 return "partial"; 249 if (code == DiagnosticReportStatus.PRELIMINARY) 250 return "preliminary"; 251 if (code == DiagnosticReportStatus.FINAL) 252 return "final"; 253 if (code == DiagnosticReportStatus.AMENDED) 254 return "amended"; 255 if (code == DiagnosticReportStatus.CORRECTED) 256 return "corrected"; 257 if (code == DiagnosticReportStatus.APPENDED) 258 return "appended"; 259 if (code == DiagnosticReportStatus.CANCELLED) 260 return "cancelled"; 261 if (code == DiagnosticReportStatus.ENTEREDINERROR) 262 return "entered-in-error"; 263 if (code == DiagnosticReportStatus.UNKNOWN) 264 return "unknown"; 265 return "?"; 266 } 267 public String toSystem(DiagnosticReportStatus code) { 268 return code.getSystem(); 269 } 270 } 271 272 @Block() 273 public static class DiagnosticReportPerformerComponent extends BackboneElement implements IBaseBackboneElement { 274 /** 275 * Describes the type of participation (e.g. a responsible party, author, or verifier). 276 */ 277 @Child(name = "role", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 278 @Description(shortDefinition="Type of performer", formalDefinition="Describes the type of participation (e.g. a responsible party, author, or verifier)." ) 279 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/performer-role") 280 protected CodeableConcept role; 281 282 /** 283 * The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report. 284 */ 285 @Child(name = "actor", type = {Practitioner.class, Organization.class}, order=2, min=1, max=1, modifier=false, summary=true) 286 @Description(shortDefinition="Practitioner or Organization participant", formalDefinition="The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report." ) 287 protected Reference actor; 288 289 /** 290 * The actual object that is the target of the reference (The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.) 291 */ 292 protected Resource actorTarget; 293 294 private static final long serialVersionUID = 805521719L; 295 296 /** 297 * Constructor 298 */ 299 public DiagnosticReportPerformerComponent() { 300 super(); 301 } 302 303 /** 304 * Constructor 305 */ 306 public DiagnosticReportPerformerComponent(Reference actor) { 307 super(); 308 this.actor = actor; 309 } 310 311 /** 312 * @return {@link #role} (Describes the type of participation (e.g. a responsible party, author, or verifier).) 313 */ 314 public CodeableConcept getRole() { 315 if (this.role == null) 316 if (Configuration.errorOnAutoCreate()) 317 throw new Error("Attempt to auto-create DiagnosticReportPerformerComponent.role"); 318 else if (Configuration.doAutoCreate()) 319 this.role = new CodeableConcept(); // cc 320 return this.role; 321 } 322 323 public boolean hasRole() { 324 return this.role != null && !this.role.isEmpty(); 325 } 326 327 /** 328 * @param value {@link #role} (Describes the type of participation (e.g. a responsible party, author, or verifier).) 329 */ 330 public DiagnosticReportPerformerComponent setRole(CodeableConcept value) { 331 this.role = value; 332 return this; 333 } 334 335 /** 336 * @return {@link #actor} (The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.) 337 */ 338 public Reference getActor() { 339 if (this.actor == null) 340 if (Configuration.errorOnAutoCreate()) 341 throw new Error("Attempt to auto-create DiagnosticReportPerformerComponent.actor"); 342 else if (Configuration.doAutoCreate()) 343 this.actor = new Reference(); // cc 344 return this.actor; 345 } 346 347 public boolean hasActor() { 348 return this.actor != null && !this.actor.isEmpty(); 349 } 350 351 /** 352 * @param value {@link #actor} (The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.) 353 */ 354 public DiagnosticReportPerformerComponent setActor(Reference value) { 355 this.actor = value; 356 return this; 357 } 358 359 /** 360 * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.) 361 */ 362 public Resource getActorTarget() { 363 return this.actorTarget; 364 } 365 366 /** 367 * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.) 368 */ 369 public DiagnosticReportPerformerComponent setActorTarget(Resource value) { 370 this.actorTarget = value; 371 return this; 372 } 373 374 protected void listChildren(List<Property> children) { 375 super.listChildren(children); 376 children.add(new Property("role", "CodeableConcept", "Describes the type of participation (e.g. a responsible party, author, or verifier).", 0, 1, role)); 377 children.add(new Property("actor", "Reference(Practitioner|Organization)", "The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.", 0, 1, actor)); 378 } 379 380 @Override 381 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 382 switch (_hash) { 383 case 3506294: /*role*/ return new Property("role", "CodeableConcept", "Describes the type of participation (e.g. a responsible party, author, or verifier).", 0, 1, role); 384 case 92645877: /*actor*/ return new Property("actor", "Reference(Practitioner|Organization)", "The reference to the practitioner or organization involved in producing the report. For example, the diagnostic service that is responsible for issuing the report.", 0, 1, actor); 385 default: return super.getNamedProperty(_hash, _name, _checkValid); 386 } 387 388 } 389 390 @Override 391 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 392 switch (hash) { 393 case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept 394 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 395 default: return super.getProperty(hash, name, checkValid); 396 } 397 398 } 399 400 @Override 401 public Base setProperty(int hash, String name, Base value) throws FHIRException { 402 switch (hash) { 403 case 3506294: // role 404 this.role = castToCodeableConcept(value); // CodeableConcept 405 return value; 406 case 92645877: // actor 407 this.actor = castToReference(value); // Reference 408 return value; 409 default: return super.setProperty(hash, name, value); 410 } 411 412 } 413 414 @Override 415 public Base setProperty(String name, Base value) throws FHIRException { 416 if (name.equals("role")) { 417 this.role = castToCodeableConcept(value); // CodeableConcept 418 } else if (name.equals("actor")) { 419 this.actor = castToReference(value); // Reference 420 } else 421 return super.setProperty(name, value); 422 return value; 423 } 424 425 @Override 426 public Base makeProperty(int hash, String name) throws FHIRException { 427 switch (hash) { 428 case 3506294: return getRole(); 429 case 92645877: return getActor(); 430 default: return super.makeProperty(hash, name); 431 } 432 433 } 434 435 @Override 436 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 437 switch (hash) { 438 case 3506294: /*role*/ return new String[] {"CodeableConcept"}; 439 case 92645877: /*actor*/ return new String[] {"Reference"}; 440 default: return super.getTypesForProperty(hash, name); 441 } 442 443 } 444 445 @Override 446 public Base addChild(String name) throws FHIRException { 447 if (name.equals("role")) { 448 this.role = new CodeableConcept(); 449 return this.role; 450 } 451 else if (name.equals("actor")) { 452 this.actor = new Reference(); 453 return this.actor; 454 } 455 else 456 return super.addChild(name); 457 } 458 459 public DiagnosticReportPerformerComponent copy() { 460 DiagnosticReportPerformerComponent dst = new DiagnosticReportPerformerComponent(); 461 copyValues(dst); 462 dst.role = role == null ? null : role.copy(); 463 dst.actor = actor == null ? null : actor.copy(); 464 return dst; 465 } 466 467 @Override 468 public boolean equalsDeep(Base other_) { 469 if (!super.equalsDeep(other_)) 470 return false; 471 if (!(other_ instanceof DiagnosticReportPerformerComponent)) 472 return false; 473 DiagnosticReportPerformerComponent o = (DiagnosticReportPerformerComponent) other_; 474 return compareDeep(role, o.role, true) && compareDeep(actor, o.actor, true); 475 } 476 477 @Override 478 public boolean equalsShallow(Base other_) { 479 if (!super.equalsShallow(other_)) 480 return false; 481 if (!(other_ instanceof DiagnosticReportPerformerComponent)) 482 return false; 483 DiagnosticReportPerformerComponent o = (DiagnosticReportPerformerComponent) other_; 484 return true; 485 } 486 487 public boolean isEmpty() { 488 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(role, actor); 489 } 490 491 public String fhirType() { 492 return "DiagnosticReport.performer"; 493 494 } 495 496 } 497 498 @Block() 499 public static class DiagnosticReportImageComponent extends BackboneElement implements IBaseBackboneElement { 500 /** 501 * A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features. 502 */ 503 @Child(name = "comment", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 504 @Description(shortDefinition="Comment about the image (e.g. explanation)", formalDefinition="A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features." ) 505 protected StringType comment; 506 507 /** 508 * Reference to the image source. 509 */ 510 @Child(name = "link", type = {Media.class}, order=2, min=1, max=1, modifier=false, summary=true) 511 @Description(shortDefinition="Reference to the image source", formalDefinition="Reference to the image source." ) 512 protected Reference link; 513 514 /** 515 * The actual object that is the target of the reference (Reference to the image source.) 516 */ 517 protected Media linkTarget; 518 519 private static final long serialVersionUID = 935791940L; 520 521 /** 522 * Constructor 523 */ 524 public DiagnosticReportImageComponent() { 525 super(); 526 } 527 528 /** 529 * Constructor 530 */ 531 public DiagnosticReportImageComponent(Reference link) { 532 super(); 533 this.link = link; 534 } 535 536 /** 537 * @return {@link #comment} (A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 538 */ 539 public StringType getCommentElement() { 540 if (this.comment == null) 541 if (Configuration.errorOnAutoCreate()) 542 throw new Error("Attempt to auto-create DiagnosticReportImageComponent.comment"); 543 else if (Configuration.doAutoCreate()) 544 this.comment = new StringType(); // bb 545 return this.comment; 546 } 547 548 public boolean hasCommentElement() { 549 return this.comment != null && !this.comment.isEmpty(); 550 } 551 552 public boolean hasComment() { 553 return this.comment != null && !this.comment.isEmpty(); 554 } 555 556 /** 557 * @param value {@link #comment} (A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value 558 */ 559 public DiagnosticReportImageComponent setCommentElement(StringType value) { 560 this.comment = value; 561 return this; 562 } 563 564 /** 565 * @return A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features. 566 */ 567 public String getComment() { 568 return this.comment == null ? null : this.comment.getValue(); 569 } 570 571 /** 572 * @param value A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features. 573 */ 574 public DiagnosticReportImageComponent setComment(String value) { 575 if (Utilities.noString(value)) 576 this.comment = null; 577 else { 578 if (this.comment == null) 579 this.comment = new StringType(); 580 this.comment.setValue(value); 581 } 582 return this; 583 } 584 585 /** 586 * @return {@link #link} (Reference to the image source.) 587 */ 588 public Reference getLink() { 589 if (this.link == null) 590 if (Configuration.errorOnAutoCreate()) 591 throw new Error("Attempt to auto-create DiagnosticReportImageComponent.link"); 592 else if (Configuration.doAutoCreate()) 593 this.link = new Reference(); // cc 594 return this.link; 595 } 596 597 public boolean hasLink() { 598 return this.link != null && !this.link.isEmpty(); 599 } 600 601 /** 602 * @param value {@link #link} (Reference to the image source.) 603 */ 604 public DiagnosticReportImageComponent setLink(Reference value) { 605 this.link = value; 606 return this; 607 } 608 609 /** 610 * @return {@link #link} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the image source.) 611 */ 612 public Media getLinkTarget() { 613 if (this.linkTarget == null) 614 if (Configuration.errorOnAutoCreate()) 615 throw new Error("Attempt to auto-create DiagnosticReportImageComponent.link"); 616 else if (Configuration.doAutoCreate()) 617 this.linkTarget = new Media(); // aa 618 return this.linkTarget; 619 } 620 621 /** 622 * @param value {@link #link} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the image source.) 623 */ 624 public DiagnosticReportImageComponent setLinkTarget(Media value) { 625 this.linkTarget = value; 626 return this; 627 } 628 629 protected void listChildren(List<Property> children) { 630 super.listChildren(children); 631 children.add(new Property("comment", "string", "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", 0, 1, comment)); 632 children.add(new Property("link", "Reference(Media)", "Reference to the image source.", 0, 1, link)); 633 } 634 635 @Override 636 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 637 switch (_hash) { 638 case 950398559: /*comment*/ return new Property("comment", "string", "A comment about the image. Typically, this is used to provide an explanation for why the image is included, or to draw the viewer's attention to important features.", 0, 1, comment); 639 case 3321850: /*link*/ return new Property("link", "Reference(Media)", "Reference to the image source.", 0, 1, link); 640 default: return super.getNamedProperty(_hash, _name, _checkValid); 641 } 642 643 } 644 645 @Override 646 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 647 switch (hash) { 648 case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType 649 case 3321850: /*link*/ return this.link == null ? new Base[0] : new Base[] {this.link}; // Reference 650 default: return super.getProperty(hash, name, checkValid); 651 } 652 653 } 654 655 @Override 656 public Base setProperty(int hash, String name, Base value) throws FHIRException { 657 switch (hash) { 658 case 950398559: // comment 659 this.comment = castToString(value); // StringType 660 return value; 661 case 3321850: // link 662 this.link = castToReference(value); // Reference 663 return value; 664 default: return super.setProperty(hash, name, value); 665 } 666 667 } 668 669 @Override 670 public Base setProperty(String name, Base value) throws FHIRException { 671 if (name.equals("comment")) { 672 this.comment = castToString(value); // StringType 673 } else if (name.equals("link")) { 674 this.link = castToReference(value); // Reference 675 } else 676 return super.setProperty(name, value); 677 return value; 678 } 679 680 @Override 681 public Base makeProperty(int hash, String name) throws FHIRException { 682 switch (hash) { 683 case 950398559: return getCommentElement(); 684 case 3321850: return getLink(); 685 default: return super.makeProperty(hash, name); 686 } 687 688 } 689 690 @Override 691 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 692 switch (hash) { 693 case 950398559: /*comment*/ return new String[] {"string"}; 694 case 3321850: /*link*/ return new String[] {"Reference"}; 695 default: return super.getTypesForProperty(hash, name); 696 } 697 698 } 699 700 @Override 701 public Base addChild(String name) throws FHIRException { 702 if (name.equals("comment")) { 703 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.comment"); 704 } 705 else if (name.equals("link")) { 706 this.link = new Reference(); 707 return this.link; 708 } 709 else 710 return super.addChild(name); 711 } 712 713 public DiagnosticReportImageComponent copy() { 714 DiagnosticReportImageComponent dst = new DiagnosticReportImageComponent(); 715 copyValues(dst); 716 dst.comment = comment == null ? null : comment.copy(); 717 dst.link = link == null ? null : link.copy(); 718 return dst; 719 } 720 721 @Override 722 public boolean equalsDeep(Base other_) { 723 if (!super.equalsDeep(other_)) 724 return false; 725 if (!(other_ instanceof DiagnosticReportImageComponent)) 726 return false; 727 DiagnosticReportImageComponent o = (DiagnosticReportImageComponent) other_; 728 return compareDeep(comment, o.comment, true) && compareDeep(link, o.link, true); 729 } 730 731 @Override 732 public boolean equalsShallow(Base other_) { 733 if (!super.equalsShallow(other_)) 734 return false; 735 if (!(other_ instanceof DiagnosticReportImageComponent)) 736 return false; 737 DiagnosticReportImageComponent o = (DiagnosticReportImageComponent) other_; 738 return compareValues(comment, o.comment, true); 739 } 740 741 public boolean isEmpty() { 742 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(comment, link); 743 } 744 745 public String fhirType() { 746 return "DiagnosticReport.image"; 747 748 } 749 750 } 751 752 /** 753 * Identifiers assigned to this report by the performer or other systems. 754 */ 755 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 756 @Description(shortDefinition="Business identifier for report", formalDefinition="Identifiers assigned to this report by the performer or other systems." ) 757 protected List<Identifier> identifier; 758 759 /** 760 * Details concerning a test or procedure requested. 761 */ 762 @Child(name = "basedOn", type = {CarePlan.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ProcedureRequest.class, ReferralRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 763 @Description(shortDefinition="What was requested", formalDefinition="Details concerning a test or procedure requested." ) 764 protected List<Reference> basedOn; 765 /** 766 * The actual objects that are the target of the reference (Details concerning a test or procedure requested.) 767 */ 768 protected List<Resource> basedOnTarget; 769 770 771 /** 772 * The status of the diagnostic report as a whole. 773 */ 774 @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true) 775 @Description(shortDefinition="registered | partial | preliminary | final +", formalDefinition="The status of the diagnostic report as a whole." ) 776 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diagnostic-report-status") 777 protected Enumeration<DiagnosticReportStatus> status; 778 779 /** 780 * A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes. 781 */ 782 @Child(name = "category", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 783 @Description(shortDefinition="Service category", formalDefinition="A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes." ) 784 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/diagnostic-service-sections") 785 protected CodeableConcept category; 786 787 /** 788 * A code or name that describes this diagnostic report. 789 */ 790 @Child(name = "code", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) 791 @Description(shortDefinition="Name/Code for this diagnostic report", formalDefinition="A code or name that describes this diagnostic report." ) 792 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/report-codes") 793 protected CodeableConcept code; 794 795 /** 796 * The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources. 797 */ 798 @Child(name = "subject", type = {Patient.class, Group.class, Device.class, Location.class}, order=5, min=0, max=1, modifier=false, summary=true) 799 @Description(shortDefinition="The subject of the report - usually, but not always, the patient", formalDefinition="The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources." ) 800 protected Reference subject; 801 802 /** 803 * The actual object that is the target of the reference (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) 804 */ 805 protected Resource subjectTarget; 806 807 /** 808 * The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about. 809 */ 810 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=6, min=0, max=1, modifier=false, summary=true) 811 @Description(shortDefinition="Health care event when test ordered", formalDefinition="The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about." ) 812 protected Reference context; 813 814 /** 815 * The actual object that is the target of the reference (The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.) 816 */ 817 protected Resource contextTarget; 818 819 /** 820 * The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself. 821 */ 822 @Child(name = "effective", type = {DateTimeType.class, Period.class}, order=7, min=0, max=1, modifier=false, summary=true) 823 @Description(shortDefinition="Clinically relevant time/time-period for report", formalDefinition="The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself." ) 824 protected Type effective; 825 826 /** 827 * The date and time that this version of the report was released from the source diagnostic service. 828 */ 829 @Child(name = "issued", type = {InstantType.class}, order=8, min=0, max=1, modifier=false, summary=true) 830 @Description(shortDefinition="DateTime this version was released", formalDefinition="The date and time that this version of the report was released from the source diagnostic service." ) 831 protected InstantType issued; 832 833 /** 834 * Indicates who or what participated in producing the report. 835 */ 836 @Child(name = "performer", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 837 @Description(shortDefinition="Participants in producing the report", formalDefinition="Indicates who or what participated in producing the report." ) 838 protected List<DiagnosticReportPerformerComponent> performer; 839 840 /** 841 * Details about the specimens on which this diagnostic report is based. 842 */ 843 @Child(name = "specimen", type = {Specimen.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 844 @Description(shortDefinition="Specimens this report is based on", formalDefinition="Details about the specimens on which this diagnostic report is based." ) 845 protected List<Reference> specimen; 846 /** 847 * The actual objects that are the target of the reference (Details about the specimens on which this diagnostic report is based.) 848 */ 849 protected List<Specimen> specimenTarget; 850 851 852 /** 853 * Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels"). 854 */ 855 @Child(name = "result", type = {Observation.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 856 @Description(shortDefinition="Observations - simple, or complex nested groups", formalDefinition="Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\")." ) 857 protected List<Reference> result; 858 /** 859 * The actual objects that are the target of the reference (Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) 860 */ 861 protected List<Observation> resultTarget; 862 863 864 /** 865 * One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images. 866 */ 867 @Child(name = "imagingStudy", type = {ImagingStudy.class, ImagingManifest.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 868 @Description(shortDefinition="Reference to full details of imaging associated with the diagnostic report", formalDefinition="One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images." ) 869 protected List<Reference> imagingStudy; 870 /** 871 * The actual objects that are the target of the reference (One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.) 872 */ 873 protected List<Resource> imagingStudyTarget; 874 875 876 /** 877 * A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest). 878 */ 879 @Child(name = "image", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 880 @Description(shortDefinition="Key images associated with this report", formalDefinition="A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)." ) 881 protected List<DiagnosticReportImageComponent> image; 882 883 /** 884 * Concise and clinically contextualized impression / summary of the diagnostic report. 885 */ 886 @Child(name = "conclusion", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) 887 @Description(shortDefinition="Clinical Interpretation of test results", formalDefinition="Concise and clinically contextualized impression / summary of the diagnostic report." ) 888 protected StringType conclusion; 889 890 /** 891 * Codes for the conclusion. 892 */ 893 @Child(name = "codedDiagnosis", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 894 @Description(shortDefinition="Codes for the conclusion", formalDefinition="Codes for the conclusion." ) 895 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings") 896 protected List<CodeableConcept> codedDiagnosis; 897 898 /** 899 * Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent. 900 */ 901 @Child(name = "presentedForm", type = {Attachment.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 902 @Description(shortDefinition="Entire report as issued", formalDefinition="Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent." ) 903 protected List<Attachment> presentedForm; 904 905 private static final long serialVersionUID = 989012294L; 906 907 /** 908 * Constructor 909 */ 910 public DiagnosticReport() { 911 super(); 912 } 913 914 /** 915 * Constructor 916 */ 917 public DiagnosticReport(Enumeration<DiagnosticReportStatus> status, CodeableConcept code) { 918 super(); 919 this.status = status; 920 this.code = code; 921 } 922 923 /** 924 * @return {@link #identifier} (Identifiers assigned to this report by the performer or other systems.) 925 */ 926 public List<Identifier> getIdentifier() { 927 if (this.identifier == null) 928 this.identifier = new ArrayList<Identifier>(); 929 return this.identifier; 930 } 931 932 /** 933 * @return Returns a reference to <code>this</code> for easy method chaining 934 */ 935 public DiagnosticReport setIdentifier(List<Identifier> theIdentifier) { 936 this.identifier = theIdentifier; 937 return this; 938 } 939 940 public boolean hasIdentifier() { 941 if (this.identifier == null) 942 return false; 943 for (Identifier item : this.identifier) 944 if (!item.isEmpty()) 945 return true; 946 return false; 947 } 948 949 public Identifier addIdentifier() { //3 950 Identifier t = new Identifier(); 951 if (this.identifier == null) 952 this.identifier = new ArrayList<Identifier>(); 953 this.identifier.add(t); 954 return t; 955 } 956 957 public DiagnosticReport addIdentifier(Identifier t) { //3 958 if (t == null) 959 return this; 960 if (this.identifier == null) 961 this.identifier = new ArrayList<Identifier>(); 962 this.identifier.add(t); 963 return this; 964 } 965 966 /** 967 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 968 */ 969 public Identifier getIdentifierFirstRep() { 970 if (getIdentifier().isEmpty()) { 971 addIdentifier(); 972 } 973 return getIdentifier().get(0); 974 } 975 976 /** 977 * @return {@link #basedOn} (Details concerning a test or procedure requested.) 978 */ 979 public List<Reference> getBasedOn() { 980 if (this.basedOn == null) 981 this.basedOn = new ArrayList<Reference>(); 982 return this.basedOn; 983 } 984 985 /** 986 * @return Returns a reference to <code>this</code> for easy method chaining 987 */ 988 public DiagnosticReport setBasedOn(List<Reference> theBasedOn) { 989 this.basedOn = theBasedOn; 990 return this; 991 } 992 993 public boolean hasBasedOn() { 994 if (this.basedOn == null) 995 return false; 996 for (Reference item : this.basedOn) 997 if (!item.isEmpty()) 998 return true; 999 return false; 1000 } 1001 1002 public Reference addBasedOn() { //3 1003 Reference t = new Reference(); 1004 if (this.basedOn == null) 1005 this.basedOn = new ArrayList<Reference>(); 1006 this.basedOn.add(t); 1007 return t; 1008 } 1009 1010 public DiagnosticReport addBasedOn(Reference t) { //3 1011 if (t == null) 1012 return this; 1013 if (this.basedOn == null) 1014 this.basedOn = new ArrayList<Reference>(); 1015 this.basedOn.add(t); 1016 return this; 1017 } 1018 1019 /** 1020 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 1021 */ 1022 public Reference getBasedOnFirstRep() { 1023 if (getBasedOn().isEmpty()) { 1024 addBasedOn(); 1025 } 1026 return getBasedOn().get(0); 1027 } 1028 1029 /** 1030 * @deprecated Use Reference#setResource(IBaseResource) instead 1031 */ 1032 @Deprecated 1033 public List<Resource> getBasedOnTarget() { 1034 if (this.basedOnTarget == null) 1035 this.basedOnTarget = new ArrayList<Resource>(); 1036 return this.basedOnTarget; 1037 } 1038 1039 /** 1040 * @return {@link #status} (The status of the diagnostic report as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1041 */ 1042 public Enumeration<DiagnosticReportStatus> getStatusElement() { 1043 if (this.status == null) 1044 if (Configuration.errorOnAutoCreate()) 1045 throw new Error("Attempt to auto-create DiagnosticReport.status"); 1046 else if (Configuration.doAutoCreate()) 1047 this.status = new Enumeration<DiagnosticReportStatus>(new DiagnosticReportStatusEnumFactory()); // bb 1048 return this.status; 1049 } 1050 1051 public boolean hasStatusElement() { 1052 return this.status != null && !this.status.isEmpty(); 1053 } 1054 1055 public boolean hasStatus() { 1056 return this.status != null && !this.status.isEmpty(); 1057 } 1058 1059 /** 1060 * @param value {@link #status} (The status of the diagnostic report as a whole.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1061 */ 1062 public DiagnosticReport setStatusElement(Enumeration<DiagnosticReportStatus> value) { 1063 this.status = value; 1064 return this; 1065 } 1066 1067 /** 1068 * @return The status of the diagnostic report as a whole. 1069 */ 1070 public DiagnosticReportStatus getStatus() { 1071 return this.status == null ? null : this.status.getValue(); 1072 } 1073 1074 /** 1075 * @param value The status of the diagnostic report as a whole. 1076 */ 1077 public DiagnosticReport setStatus(DiagnosticReportStatus value) { 1078 if (this.status == null) 1079 this.status = new Enumeration<DiagnosticReportStatus>(new DiagnosticReportStatusEnumFactory()); 1080 this.status.setValue(value); 1081 return this; 1082 } 1083 1084 /** 1085 * @return {@link #category} (A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.) 1086 */ 1087 public CodeableConcept getCategory() { 1088 if (this.category == null) 1089 if (Configuration.errorOnAutoCreate()) 1090 throw new Error("Attempt to auto-create DiagnosticReport.category"); 1091 else if (Configuration.doAutoCreate()) 1092 this.category = new CodeableConcept(); // cc 1093 return this.category; 1094 } 1095 1096 public boolean hasCategory() { 1097 return this.category != null && !this.category.isEmpty(); 1098 } 1099 1100 /** 1101 * @param value {@link #category} (A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.) 1102 */ 1103 public DiagnosticReport setCategory(CodeableConcept value) { 1104 this.category = value; 1105 return this; 1106 } 1107 1108 /** 1109 * @return {@link #code} (A code or name that describes this diagnostic report.) 1110 */ 1111 public CodeableConcept getCode() { 1112 if (this.code == null) 1113 if (Configuration.errorOnAutoCreate()) 1114 throw new Error("Attempt to auto-create DiagnosticReport.code"); 1115 else if (Configuration.doAutoCreate()) 1116 this.code = new CodeableConcept(); // cc 1117 return this.code; 1118 } 1119 1120 public boolean hasCode() { 1121 return this.code != null && !this.code.isEmpty(); 1122 } 1123 1124 /** 1125 * @param value {@link #code} (A code or name that describes this diagnostic report.) 1126 */ 1127 public DiagnosticReport setCode(CodeableConcept value) { 1128 this.code = value; 1129 return this; 1130 } 1131 1132 /** 1133 * @return {@link #subject} (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) 1134 */ 1135 public Reference getSubject() { 1136 if (this.subject == null) 1137 if (Configuration.errorOnAutoCreate()) 1138 throw new Error("Attempt to auto-create DiagnosticReport.subject"); 1139 else if (Configuration.doAutoCreate()) 1140 this.subject = new Reference(); // cc 1141 return this.subject; 1142 } 1143 1144 public boolean hasSubject() { 1145 return this.subject != null && !this.subject.isEmpty(); 1146 } 1147 1148 /** 1149 * @param value {@link #subject} (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) 1150 */ 1151 public DiagnosticReport setSubject(Reference value) { 1152 this.subject = value; 1153 return this; 1154 } 1155 1156 /** 1157 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) 1158 */ 1159 public Resource getSubjectTarget() { 1160 return this.subjectTarget; 1161 } 1162 1163 /** 1164 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.) 1165 */ 1166 public DiagnosticReport setSubjectTarget(Resource value) { 1167 this.subjectTarget = value; 1168 return this; 1169 } 1170 1171 /** 1172 * @return {@link #context} (The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.) 1173 */ 1174 public Reference getContext() { 1175 if (this.context == null) 1176 if (Configuration.errorOnAutoCreate()) 1177 throw new Error("Attempt to auto-create DiagnosticReport.context"); 1178 else if (Configuration.doAutoCreate()) 1179 this.context = new Reference(); // cc 1180 return this.context; 1181 } 1182 1183 public boolean hasContext() { 1184 return this.context != null && !this.context.isEmpty(); 1185 } 1186 1187 /** 1188 * @param value {@link #context} (The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.) 1189 */ 1190 public DiagnosticReport setContext(Reference value) { 1191 this.context = value; 1192 return this; 1193 } 1194 1195 /** 1196 * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.) 1197 */ 1198 public Resource getContextTarget() { 1199 return this.contextTarget; 1200 } 1201 1202 /** 1203 * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.) 1204 */ 1205 public DiagnosticReport setContextTarget(Resource value) { 1206 this.contextTarget = value; 1207 return this; 1208 } 1209 1210 /** 1211 * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) 1212 */ 1213 public Type getEffective() { 1214 return this.effective; 1215 } 1216 1217 /** 1218 * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) 1219 */ 1220 public DateTimeType getEffectiveDateTimeType() throws FHIRException { 1221 if (this.effective == null) 1222 return null; 1223 if (!(this.effective instanceof DateTimeType)) 1224 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.effective.getClass().getName()+" was encountered"); 1225 return (DateTimeType) this.effective; 1226 } 1227 1228 public boolean hasEffectiveDateTimeType() { 1229 return this != null && this.effective instanceof DateTimeType; 1230 } 1231 1232 /** 1233 * @return {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) 1234 */ 1235 public Period getEffectivePeriod() throws FHIRException { 1236 if (this.effective == null) 1237 return null; 1238 if (!(this.effective instanceof Period)) 1239 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.effective.getClass().getName()+" was encountered"); 1240 return (Period) this.effective; 1241 } 1242 1243 public boolean hasEffectivePeriod() { 1244 return this != null && this.effective instanceof Period; 1245 } 1246 1247 public boolean hasEffective() { 1248 return this.effective != null && !this.effective.isEmpty(); 1249 } 1250 1251 /** 1252 * @param value {@link #effective} (The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.) 1253 */ 1254 public DiagnosticReport setEffective(Type value) throws FHIRFormatError { 1255 if (value != null && !(value instanceof DateTimeType || value instanceof Period)) 1256 throw new FHIRFormatError("Not the right type for DiagnosticReport.effective[x]: "+value.fhirType()); 1257 this.effective = value; 1258 return this; 1259 } 1260 1261 /** 1262 * @return {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 1263 */ 1264 public InstantType getIssuedElement() { 1265 if (this.issued == null) 1266 if (Configuration.errorOnAutoCreate()) 1267 throw new Error("Attempt to auto-create DiagnosticReport.issued"); 1268 else if (Configuration.doAutoCreate()) 1269 this.issued = new InstantType(); // bb 1270 return this.issued; 1271 } 1272 1273 public boolean hasIssuedElement() { 1274 return this.issued != null && !this.issued.isEmpty(); 1275 } 1276 1277 public boolean hasIssued() { 1278 return this.issued != null && !this.issued.isEmpty(); 1279 } 1280 1281 /** 1282 * @param value {@link #issued} (The date and time that this version of the report was released from the source diagnostic service.). This is the underlying object with id, value and extensions. The accessor "getIssued" gives direct access to the value 1283 */ 1284 public DiagnosticReport setIssuedElement(InstantType value) { 1285 this.issued = value; 1286 return this; 1287 } 1288 1289 /** 1290 * @return The date and time that this version of the report was released from the source diagnostic service. 1291 */ 1292 public Date getIssued() { 1293 return this.issued == null ? null : this.issued.getValue(); 1294 } 1295 1296 /** 1297 * @param value The date and time that this version of the report was released from the source diagnostic service. 1298 */ 1299 public DiagnosticReport setIssued(Date value) { 1300 if (value == null) 1301 this.issued = null; 1302 else { 1303 if (this.issued == null) 1304 this.issued = new InstantType(); 1305 this.issued.setValue(value); 1306 } 1307 return this; 1308 } 1309 1310 /** 1311 * @return {@link #performer} (Indicates who or what participated in producing the report.) 1312 */ 1313 public List<DiagnosticReportPerformerComponent> getPerformer() { 1314 if (this.performer == null) 1315 this.performer = new ArrayList<DiagnosticReportPerformerComponent>(); 1316 return this.performer; 1317 } 1318 1319 /** 1320 * @return Returns a reference to <code>this</code> for easy method chaining 1321 */ 1322 public DiagnosticReport setPerformer(List<DiagnosticReportPerformerComponent> thePerformer) { 1323 this.performer = thePerformer; 1324 return this; 1325 } 1326 1327 public boolean hasPerformer() { 1328 if (this.performer == null) 1329 return false; 1330 for (DiagnosticReportPerformerComponent item : this.performer) 1331 if (!item.isEmpty()) 1332 return true; 1333 return false; 1334 } 1335 1336 public DiagnosticReportPerformerComponent addPerformer() { //3 1337 DiagnosticReportPerformerComponent t = new DiagnosticReportPerformerComponent(); 1338 if (this.performer == null) 1339 this.performer = new ArrayList<DiagnosticReportPerformerComponent>(); 1340 this.performer.add(t); 1341 return t; 1342 } 1343 1344 public DiagnosticReport addPerformer(DiagnosticReportPerformerComponent t) { //3 1345 if (t == null) 1346 return this; 1347 if (this.performer == null) 1348 this.performer = new ArrayList<DiagnosticReportPerformerComponent>(); 1349 this.performer.add(t); 1350 return this; 1351 } 1352 1353 /** 1354 * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist 1355 */ 1356 public DiagnosticReportPerformerComponent getPerformerFirstRep() { 1357 if (getPerformer().isEmpty()) { 1358 addPerformer(); 1359 } 1360 return getPerformer().get(0); 1361 } 1362 1363 /** 1364 * @return {@link #specimen} (Details about the specimens on which this diagnostic report is based.) 1365 */ 1366 public List<Reference> getSpecimen() { 1367 if (this.specimen == null) 1368 this.specimen = new ArrayList<Reference>(); 1369 return this.specimen; 1370 } 1371 1372 /** 1373 * @return Returns a reference to <code>this</code> for easy method chaining 1374 */ 1375 public DiagnosticReport setSpecimen(List<Reference> theSpecimen) { 1376 this.specimen = theSpecimen; 1377 return this; 1378 } 1379 1380 public boolean hasSpecimen() { 1381 if (this.specimen == null) 1382 return false; 1383 for (Reference item : this.specimen) 1384 if (!item.isEmpty()) 1385 return true; 1386 return false; 1387 } 1388 1389 public Reference addSpecimen() { //3 1390 Reference t = new Reference(); 1391 if (this.specimen == null) 1392 this.specimen = new ArrayList<Reference>(); 1393 this.specimen.add(t); 1394 return t; 1395 } 1396 1397 public DiagnosticReport addSpecimen(Reference t) { //3 1398 if (t == null) 1399 return this; 1400 if (this.specimen == null) 1401 this.specimen = new ArrayList<Reference>(); 1402 this.specimen.add(t); 1403 return this; 1404 } 1405 1406 /** 1407 * @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist 1408 */ 1409 public Reference getSpecimenFirstRep() { 1410 if (getSpecimen().isEmpty()) { 1411 addSpecimen(); 1412 } 1413 return getSpecimen().get(0); 1414 } 1415 1416 /** 1417 * @deprecated Use Reference#setResource(IBaseResource) instead 1418 */ 1419 @Deprecated 1420 public List<Specimen> getSpecimenTarget() { 1421 if (this.specimenTarget == null) 1422 this.specimenTarget = new ArrayList<Specimen>(); 1423 return this.specimenTarget; 1424 } 1425 1426 /** 1427 * @deprecated Use Reference#setResource(IBaseResource) instead 1428 */ 1429 @Deprecated 1430 public Specimen addSpecimenTarget() { 1431 Specimen r = new Specimen(); 1432 if (this.specimenTarget == null) 1433 this.specimenTarget = new ArrayList<Specimen>(); 1434 this.specimenTarget.add(r); 1435 return r; 1436 } 1437 1438 /** 1439 * @return {@link #result} (Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. "atomic" results), or they can be grouping observations that include references to other members of the group (e.g. "panels").) 1440 */ 1441 public List<Reference> getResult() { 1442 if (this.result == null) 1443 this.result = new ArrayList<Reference>(); 1444 return this.result; 1445 } 1446 1447 /** 1448 * @return Returns a reference to <code>this</code> for easy method chaining 1449 */ 1450 public DiagnosticReport setResult(List<Reference> theResult) { 1451 this.result = theResult; 1452 return this; 1453 } 1454 1455 public boolean hasResult() { 1456 if (this.result == null) 1457 return false; 1458 for (Reference item : this.result) 1459 if (!item.isEmpty()) 1460 return true; 1461 return false; 1462 } 1463 1464 public Reference addResult() { //3 1465 Reference t = new Reference(); 1466 if (this.result == null) 1467 this.result = new ArrayList<Reference>(); 1468 this.result.add(t); 1469 return t; 1470 } 1471 1472 public DiagnosticReport addResult(Reference t) { //3 1473 if (t == null) 1474 return this; 1475 if (this.result == null) 1476 this.result = new ArrayList<Reference>(); 1477 this.result.add(t); 1478 return this; 1479 } 1480 1481 /** 1482 * @return The first repetition of repeating field {@link #result}, creating it if it does not already exist 1483 */ 1484 public Reference getResultFirstRep() { 1485 if (getResult().isEmpty()) { 1486 addResult(); 1487 } 1488 return getResult().get(0); 1489 } 1490 1491 /** 1492 * @deprecated Use Reference#setResource(IBaseResource) instead 1493 */ 1494 @Deprecated 1495 public List<Observation> getResultTarget() { 1496 if (this.resultTarget == null) 1497 this.resultTarget = new ArrayList<Observation>(); 1498 return this.resultTarget; 1499 } 1500 1501 /** 1502 * @deprecated Use Reference#setResource(IBaseResource) instead 1503 */ 1504 @Deprecated 1505 public Observation addResultTarget() { 1506 Observation r = new Observation(); 1507 if (this.resultTarget == null) 1508 this.resultTarget = new ArrayList<Observation>(); 1509 this.resultTarget.add(r); 1510 return r; 1511 } 1512 1513 /** 1514 * @return {@link #imagingStudy} (One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.) 1515 */ 1516 public List<Reference> getImagingStudy() { 1517 if (this.imagingStudy == null) 1518 this.imagingStudy = new ArrayList<Reference>(); 1519 return this.imagingStudy; 1520 } 1521 1522 /** 1523 * @return Returns a reference to <code>this</code> for easy method chaining 1524 */ 1525 public DiagnosticReport setImagingStudy(List<Reference> theImagingStudy) { 1526 this.imagingStudy = theImagingStudy; 1527 return this; 1528 } 1529 1530 public boolean hasImagingStudy() { 1531 if (this.imagingStudy == null) 1532 return false; 1533 for (Reference item : this.imagingStudy) 1534 if (!item.isEmpty()) 1535 return true; 1536 return false; 1537 } 1538 1539 public Reference addImagingStudy() { //3 1540 Reference t = new Reference(); 1541 if (this.imagingStudy == null) 1542 this.imagingStudy = new ArrayList<Reference>(); 1543 this.imagingStudy.add(t); 1544 return t; 1545 } 1546 1547 public DiagnosticReport addImagingStudy(Reference t) { //3 1548 if (t == null) 1549 return this; 1550 if (this.imagingStudy == null) 1551 this.imagingStudy = new ArrayList<Reference>(); 1552 this.imagingStudy.add(t); 1553 return this; 1554 } 1555 1556 /** 1557 * @return The first repetition of repeating field {@link #imagingStudy}, creating it if it does not already exist 1558 */ 1559 public Reference getImagingStudyFirstRep() { 1560 if (getImagingStudy().isEmpty()) { 1561 addImagingStudy(); 1562 } 1563 return getImagingStudy().get(0); 1564 } 1565 1566 /** 1567 * @deprecated Use Reference#setResource(IBaseResource) instead 1568 */ 1569 @Deprecated 1570 public List<Resource> getImagingStudyTarget() { 1571 if (this.imagingStudyTarget == null) 1572 this.imagingStudyTarget = new ArrayList<Resource>(); 1573 return this.imagingStudyTarget; 1574 } 1575 1576 /** 1577 * @return {@link #image} (A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).) 1578 */ 1579 public List<DiagnosticReportImageComponent> getImage() { 1580 if (this.image == null) 1581 this.image = new ArrayList<DiagnosticReportImageComponent>(); 1582 return this.image; 1583 } 1584 1585 /** 1586 * @return Returns a reference to <code>this</code> for easy method chaining 1587 */ 1588 public DiagnosticReport setImage(List<DiagnosticReportImageComponent> theImage) { 1589 this.image = theImage; 1590 return this; 1591 } 1592 1593 public boolean hasImage() { 1594 if (this.image == null) 1595 return false; 1596 for (DiagnosticReportImageComponent item : this.image) 1597 if (!item.isEmpty()) 1598 return true; 1599 return false; 1600 } 1601 1602 public DiagnosticReportImageComponent addImage() { //3 1603 DiagnosticReportImageComponent t = new DiagnosticReportImageComponent(); 1604 if (this.image == null) 1605 this.image = new ArrayList<DiagnosticReportImageComponent>(); 1606 this.image.add(t); 1607 return t; 1608 } 1609 1610 public DiagnosticReport addImage(DiagnosticReportImageComponent t) { //3 1611 if (t == null) 1612 return this; 1613 if (this.image == null) 1614 this.image = new ArrayList<DiagnosticReportImageComponent>(); 1615 this.image.add(t); 1616 return this; 1617 } 1618 1619 /** 1620 * @return The first repetition of repeating field {@link #image}, creating it if it does not already exist 1621 */ 1622 public DiagnosticReportImageComponent getImageFirstRep() { 1623 if (getImage().isEmpty()) { 1624 addImage(); 1625 } 1626 return getImage().get(0); 1627 } 1628 1629 /** 1630 * @return {@link #conclusion} (Concise and clinically contextualized impression / summary of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getConclusion" gives direct access to the value 1631 */ 1632 public StringType getConclusionElement() { 1633 if (this.conclusion == null) 1634 if (Configuration.errorOnAutoCreate()) 1635 throw new Error("Attempt to auto-create DiagnosticReport.conclusion"); 1636 else if (Configuration.doAutoCreate()) 1637 this.conclusion = new StringType(); // bb 1638 return this.conclusion; 1639 } 1640 1641 public boolean hasConclusionElement() { 1642 return this.conclusion != null && !this.conclusion.isEmpty(); 1643 } 1644 1645 public boolean hasConclusion() { 1646 return this.conclusion != null && !this.conclusion.isEmpty(); 1647 } 1648 1649 /** 1650 * @param value {@link #conclusion} (Concise and clinically contextualized impression / summary of the diagnostic report.). This is the underlying object with id, value and extensions. The accessor "getConclusion" gives direct access to the value 1651 */ 1652 public DiagnosticReport setConclusionElement(StringType value) { 1653 this.conclusion = value; 1654 return this; 1655 } 1656 1657 /** 1658 * @return Concise and clinically contextualized impression / summary of the diagnostic report. 1659 */ 1660 public String getConclusion() { 1661 return this.conclusion == null ? null : this.conclusion.getValue(); 1662 } 1663 1664 /** 1665 * @param value Concise and clinically contextualized impression / summary of the diagnostic report. 1666 */ 1667 public DiagnosticReport setConclusion(String value) { 1668 if (Utilities.noString(value)) 1669 this.conclusion = null; 1670 else { 1671 if (this.conclusion == null) 1672 this.conclusion = new StringType(); 1673 this.conclusion.setValue(value); 1674 } 1675 return this; 1676 } 1677 1678 /** 1679 * @return {@link #codedDiagnosis} (Codes for the conclusion.) 1680 */ 1681 public List<CodeableConcept> getCodedDiagnosis() { 1682 if (this.codedDiagnosis == null) 1683 this.codedDiagnosis = new ArrayList<CodeableConcept>(); 1684 return this.codedDiagnosis; 1685 } 1686 1687 /** 1688 * @return Returns a reference to <code>this</code> for easy method chaining 1689 */ 1690 public DiagnosticReport setCodedDiagnosis(List<CodeableConcept> theCodedDiagnosis) { 1691 this.codedDiagnosis = theCodedDiagnosis; 1692 return this; 1693 } 1694 1695 public boolean hasCodedDiagnosis() { 1696 if (this.codedDiagnosis == null) 1697 return false; 1698 for (CodeableConcept item : this.codedDiagnosis) 1699 if (!item.isEmpty()) 1700 return true; 1701 return false; 1702 } 1703 1704 public CodeableConcept addCodedDiagnosis() { //3 1705 CodeableConcept t = new CodeableConcept(); 1706 if (this.codedDiagnosis == null) 1707 this.codedDiagnosis = new ArrayList<CodeableConcept>(); 1708 this.codedDiagnosis.add(t); 1709 return t; 1710 } 1711 1712 public DiagnosticReport addCodedDiagnosis(CodeableConcept t) { //3 1713 if (t == null) 1714 return this; 1715 if (this.codedDiagnosis == null) 1716 this.codedDiagnosis = new ArrayList<CodeableConcept>(); 1717 this.codedDiagnosis.add(t); 1718 return this; 1719 } 1720 1721 /** 1722 * @return The first repetition of repeating field {@link #codedDiagnosis}, creating it if it does not already exist 1723 */ 1724 public CodeableConcept getCodedDiagnosisFirstRep() { 1725 if (getCodedDiagnosis().isEmpty()) { 1726 addCodedDiagnosis(); 1727 } 1728 return getCodedDiagnosis().get(0); 1729 } 1730 1731 /** 1732 * @return {@link #presentedForm} (Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.) 1733 */ 1734 public List<Attachment> getPresentedForm() { 1735 if (this.presentedForm == null) 1736 this.presentedForm = new ArrayList<Attachment>(); 1737 return this.presentedForm; 1738 } 1739 1740 /** 1741 * @return Returns a reference to <code>this</code> for easy method chaining 1742 */ 1743 public DiagnosticReport setPresentedForm(List<Attachment> thePresentedForm) { 1744 this.presentedForm = thePresentedForm; 1745 return this; 1746 } 1747 1748 public boolean hasPresentedForm() { 1749 if (this.presentedForm == null) 1750 return false; 1751 for (Attachment item : this.presentedForm) 1752 if (!item.isEmpty()) 1753 return true; 1754 return false; 1755 } 1756 1757 public Attachment addPresentedForm() { //3 1758 Attachment t = new Attachment(); 1759 if (this.presentedForm == null) 1760 this.presentedForm = new ArrayList<Attachment>(); 1761 this.presentedForm.add(t); 1762 return t; 1763 } 1764 1765 public DiagnosticReport addPresentedForm(Attachment t) { //3 1766 if (t == null) 1767 return this; 1768 if (this.presentedForm == null) 1769 this.presentedForm = new ArrayList<Attachment>(); 1770 this.presentedForm.add(t); 1771 return this; 1772 } 1773 1774 /** 1775 * @return The first repetition of repeating field {@link #presentedForm}, creating it if it does not already exist 1776 */ 1777 public Attachment getPresentedFormFirstRep() { 1778 if (getPresentedForm().isEmpty()) { 1779 addPresentedForm(); 1780 } 1781 return getPresentedForm().get(0); 1782 } 1783 1784 protected void listChildren(List<Property> children) { 1785 super.listChildren(children); 1786 children.add(new Property("identifier", "Identifier", "Identifiers assigned to this report by the performer or other systems.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1787 children.add(new Property("basedOn", "Reference(CarePlan|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ProcedureRequest|ReferralRequest)", "Details concerning a test or procedure requested.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 1788 children.add(new Property("status", "code", "The status of the diagnostic report as a whole.", 0, 1, status)); 1789 children.add(new Property("category", "CodeableConcept", "A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", 0, 1, category)); 1790 children.add(new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, 1, code)); 1791 children.add(new Property("subject", "Reference(Patient|Group|Device|Location)", "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, 1, subject)); 1792 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.", 0, 1, context)); 1793 children.add(new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective)); 1794 children.add(new Property("issued", "instant", "The date and time that this version of the report was released from the source diagnostic service.", 0, 1, issued)); 1795 children.add(new Property("performer", "", "Indicates who or what participated in producing the report.", 0, java.lang.Integer.MAX_VALUE, performer)); 1796 children.add(new Property("specimen", "Reference(Specimen)", "Details about the specimens on which this diagnostic report is based.", 0, java.lang.Integer.MAX_VALUE, specimen)); 1797 children.add(new Property("result", "Reference(Observation)", "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\").", 0, java.lang.Integer.MAX_VALUE, result)); 1798 children.add(new Property("imagingStudy", "Reference(ImagingStudy|ImagingManifest)", "One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.", 0, java.lang.Integer.MAX_VALUE, imagingStudy)); 1799 children.add(new Property("image", "", "A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).", 0, java.lang.Integer.MAX_VALUE, image)); 1800 children.add(new Property("conclusion", "string", "Concise and clinically contextualized impression / summary of the diagnostic report.", 0, 1, conclusion)); 1801 children.add(new Property("codedDiagnosis", "CodeableConcept", "Codes for the conclusion.", 0, java.lang.Integer.MAX_VALUE, codedDiagnosis)); 1802 children.add(new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm)); 1803 } 1804 1805 @Override 1806 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1807 switch (_hash) { 1808 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifiers assigned to this report by the performer or other systems.", 0, java.lang.Integer.MAX_VALUE, identifier); 1809 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|ImmunizationRecommendation|MedicationRequest|NutritionOrder|ProcedureRequest|ReferralRequest)", "Details concerning a test or procedure requested.", 0, java.lang.Integer.MAX_VALUE, basedOn); 1810 case -892481550: /*status*/ return new Property("status", "code", "The status of the diagnostic report as a whole.", 0, 1, status); 1811 case 50511102: /*category*/ return new Property("category", "CodeableConcept", "A code that classifies the clinical discipline, department or diagnostic service that created the report (e.g. cardiology, biochemistry, hematology, MRI). This is used for searching, sorting and display purposes.", 0, 1, category); 1812 case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code or name that describes this diagnostic report.", 0, 1, code); 1813 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Group|Device|Location)", "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.", 0, 1, subject); 1814 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The healthcare event (e.g. a patient and healthcare provider interaction) which this DiagnosticReport per is about.", 0, 1, context); 1815 case 247104889: /*effective[x]*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 1816 case -1468651097: /*effective*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 1817 case -275306910: /*effectiveDateTime*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 1818 case -403934648: /*effectivePeriod*/ return new Property("effective[x]", "dateTime|Period", "The time or time-period the observed values are related to. When the subject of the report is a patient, this is usually either the time of the procedure or of specimen collection(s), but very often the source of the date/time is not known, only the date/time itself.", 0, 1, effective); 1819 case -1179159893: /*issued*/ return new Property("issued", "instant", "The date and time that this version of the report was released from the source diagnostic service.", 0, 1, issued); 1820 case 481140686: /*performer*/ return new Property("performer", "", "Indicates who or what participated in producing the report.", 0, java.lang.Integer.MAX_VALUE, performer); 1821 case -2132868344: /*specimen*/ return new Property("specimen", "Reference(Specimen)", "Details about the specimens on which this diagnostic report is based.", 0, java.lang.Integer.MAX_VALUE, specimen); 1822 case -934426595: /*result*/ return new Property("result", "Reference(Observation)", "Observations that are part of this diagnostic report. Observations can be simple name/value pairs (e.g. \"atomic\" results), or they can be grouping observations that include references to other members of the group (e.g. \"panels\").", 0, java.lang.Integer.MAX_VALUE, result); 1823 case -814900911: /*imagingStudy*/ return new Property("imagingStudy", "Reference(ImagingStudy|ImagingManifest)", "One or more links to full details of any imaging performed during the diagnostic investigation. Typically, this is imaging performed by DICOM enabled modalities, but this is not required. A fully enabled PACS viewer can use this information to provide views of the source images.", 0, java.lang.Integer.MAX_VALUE, imagingStudy); 1824 case 100313435: /*image*/ return new Property("image", "", "A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest).", 0, java.lang.Integer.MAX_VALUE, image); 1825 case -1731259873: /*conclusion*/ return new Property("conclusion", "string", "Concise and clinically contextualized impression / summary of the diagnostic report.", 0, 1, conclusion); 1826 case -1364269926: /*codedDiagnosis*/ return new Property("codedDiagnosis", "CodeableConcept", "Codes for the conclusion.", 0, java.lang.Integer.MAX_VALUE, codedDiagnosis); 1827 case 230090366: /*presentedForm*/ return new Property("presentedForm", "Attachment", "Rich text representation of the entire result as issued by the diagnostic service. Multiple formats are allowed but they SHALL be semantically equivalent.", 0, java.lang.Integer.MAX_VALUE, presentedForm); 1828 default: return super.getNamedProperty(_hash, _name, _checkValid); 1829 } 1830 1831 } 1832 1833 @Override 1834 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1835 switch (hash) { 1836 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1837 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 1838 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<DiagnosticReportStatus> 1839 case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept 1840 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept 1841 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1842 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 1843 case -1468651097: /*effective*/ return this.effective == null ? new Base[0] : new Base[] {this.effective}; // Type 1844 case -1179159893: /*issued*/ return this.issued == null ? new Base[0] : new Base[] {this.issued}; // InstantType 1845 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // DiagnosticReportPerformerComponent 1846 case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference 1847 case -934426595: /*result*/ return this.result == null ? new Base[0] : this.result.toArray(new Base[this.result.size()]); // Reference 1848 case -814900911: /*imagingStudy*/ return this.imagingStudy == null ? new Base[0] : this.imagingStudy.toArray(new Base[this.imagingStudy.size()]); // Reference 1849 case 100313435: /*image*/ return this.image == null ? new Base[0] : this.image.toArray(new Base[this.image.size()]); // DiagnosticReportImageComponent 1850 case -1731259873: /*conclusion*/ return this.conclusion == null ? new Base[0] : new Base[] {this.conclusion}; // StringType 1851 case -1364269926: /*codedDiagnosis*/ return this.codedDiagnosis == null ? new Base[0] : this.codedDiagnosis.toArray(new Base[this.codedDiagnosis.size()]); // CodeableConcept 1852 case 230090366: /*presentedForm*/ return this.presentedForm == null ? new Base[0] : this.presentedForm.toArray(new Base[this.presentedForm.size()]); // Attachment 1853 default: return super.getProperty(hash, name, checkValid); 1854 } 1855 1856 } 1857 1858 @Override 1859 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1860 switch (hash) { 1861 case -1618432855: // identifier 1862 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1863 return value; 1864 case -332612366: // basedOn 1865 this.getBasedOn().add(castToReference(value)); // Reference 1866 return value; 1867 case -892481550: // status 1868 value = new DiagnosticReportStatusEnumFactory().fromType(castToCode(value)); 1869 this.status = (Enumeration) value; // Enumeration<DiagnosticReportStatus> 1870 return value; 1871 case 50511102: // category 1872 this.category = castToCodeableConcept(value); // CodeableConcept 1873 return value; 1874 case 3059181: // code 1875 this.code = castToCodeableConcept(value); // CodeableConcept 1876 return value; 1877 case -1867885268: // subject 1878 this.subject = castToReference(value); // Reference 1879 return value; 1880 case 951530927: // context 1881 this.context = castToReference(value); // Reference 1882 return value; 1883 case -1468651097: // effective 1884 this.effective = castToType(value); // Type 1885 return value; 1886 case -1179159893: // issued 1887 this.issued = castToInstant(value); // InstantType 1888 return value; 1889 case 481140686: // performer 1890 this.getPerformer().add((DiagnosticReportPerformerComponent) value); // DiagnosticReportPerformerComponent 1891 return value; 1892 case -2132868344: // specimen 1893 this.getSpecimen().add(castToReference(value)); // Reference 1894 return value; 1895 case -934426595: // result 1896 this.getResult().add(castToReference(value)); // Reference 1897 return value; 1898 case -814900911: // imagingStudy 1899 this.getImagingStudy().add(castToReference(value)); // Reference 1900 return value; 1901 case 100313435: // image 1902 this.getImage().add((DiagnosticReportImageComponent) value); // DiagnosticReportImageComponent 1903 return value; 1904 case -1731259873: // conclusion 1905 this.conclusion = castToString(value); // StringType 1906 return value; 1907 case -1364269926: // codedDiagnosis 1908 this.getCodedDiagnosis().add(castToCodeableConcept(value)); // CodeableConcept 1909 return value; 1910 case 230090366: // presentedForm 1911 this.getPresentedForm().add(castToAttachment(value)); // Attachment 1912 return value; 1913 default: return super.setProperty(hash, name, value); 1914 } 1915 1916 } 1917 1918 @Override 1919 public Base setProperty(String name, Base value) throws FHIRException { 1920 if (name.equals("identifier")) { 1921 this.getIdentifier().add(castToIdentifier(value)); 1922 } else if (name.equals("basedOn")) { 1923 this.getBasedOn().add(castToReference(value)); 1924 } else if (name.equals("status")) { 1925 value = new DiagnosticReportStatusEnumFactory().fromType(castToCode(value)); 1926 this.status = (Enumeration) value; // Enumeration<DiagnosticReportStatus> 1927 } else if (name.equals("category")) { 1928 this.category = castToCodeableConcept(value); // CodeableConcept 1929 } else if (name.equals("code")) { 1930 this.code = castToCodeableConcept(value); // CodeableConcept 1931 } else if (name.equals("subject")) { 1932 this.subject = castToReference(value); // Reference 1933 } else if (name.equals("context")) { 1934 this.context = castToReference(value); // Reference 1935 } else if (name.equals("effective[x]")) { 1936 this.effective = castToType(value); // Type 1937 } else if (name.equals("issued")) { 1938 this.issued = castToInstant(value); // InstantType 1939 } else if (name.equals("performer")) { 1940 this.getPerformer().add((DiagnosticReportPerformerComponent) value); 1941 } else if (name.equals("specimen")) { 1942 this.getSpecimen().add(castToReference(value)); 1943 } else if (name.equals("result")) { 1944 this.getResult().add(castToReference(value)); 1945 } else if (name.equals("imagingStudy")) { 1946 this.getImagingStudy().add(castToReference(value)); 1947 } else if (name.equals("image")) { 1948 this.getImage().add((DiagnosticReportImageComponent) value); 1949 } else if (name.equals("conclusion")) { 1950 this.conclusion = castToString(value); // StringType 1951 } else if (name.equals("codedDiagnosis")) { 1952 this.getCodedDiagnosis().add(castToCodeableConcept(value)); 1953 } else if (name.equals("presentedForm")) { 1954 this.getPresentedForm().add(castToAttachment(value)); 1955 } else 1956 return super.setProperty(name, value); 1957 return value; 1958 } 1959 1960 @Override 1961 public Base makeProperty(int hash, String name) throws FHIRException { 1962 switch (hash) { 1963 case -1618432855: return addIdentifier(); 1964 case -332612366: return addBasedOn(); 1965 case -892481550: return getStatusElement(); 1966 case 50511102: return getCategory(); 1967 case 3059181: return getCode(); 1968 case -1867885268: return getSubject(); 1969 case 951530927: return getContext(); 1970 case 247104889: return getEffective(); 1971 case -1468651097: return getEffective(); 1972 case -1179159893: return getIssuedElement(); 1973 case 481140686: return addPerformer(); 1974 case -2132868344: return addSpecimen(); 1975 case -934426595: return addResult(); 1976 case -814900911: return addImagingStudy(); 1977 case 100313435: return addImage(); 1978 case -1731259873: return getConclusionElement(); 1979 case -1364269926: return addCodedDiagnosis(); 1980 case 230090366: return addPresentedForm(); 1981 default: return super.makeProperty(hash, name); 1982 } 1983 1984 } 1985 1986 @Override 1987 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1988 switch (hash) { 1989 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1990 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1991 case -892481550: /*status*/ return new String[] {"code"}; 1992 case 50511102: /*category*/ return new String[] {"CodeableConcept"}; 1993 case 3059181: /*code*/ return new String[] {"CodeableConcept"}; 1994 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1995 case 951530927: /*context*/ return new String[] {"Reference"}; 1996 case -1468651097: /*effective*/ return new String[] {"dateTime", "Period"}; 1997 case -1179159893: /*issued*/ return new String[] {"instant"}; 1998 case 481140686: /*performer*/ return new String[] {}; 1999 case -2132868344: /*specimen*/ return new String[] {"Reference"}; 2000 case -934426595: /*result*/ return new String[] {"Reference"}; 2001 case -814900911: /*imagingStudy*/ return new String[] {"Reference"}; 2002 case 100313435: /*image*/ return new String[] {}; 2003 case -1731259873: /*conclusion*/ return new String[] {"string"}; 2004 case -1364269926: /*codedDiagnosis*/ return new String[] {"CodeableConcept"}; 2005 case 230090366: /*presentedForm*/ return new String[] {"Attachment"}; 2006 default: return super.getTypesForProperty(hash, name); 2007 } 2008 2009 } 2010 2011 @Override 2012 public Base addChild(String name) throws FHIRException { 2013 if (name.equals("identifier")) { 2014 return addIdentifier(); 2015 } 2016 else if (name.equals("basedOn")) { 2017 return addBasedOn(); 2018 } 2019 else if (name.equals("status")) { 2020 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.status"); 2021 } 2022 else if (name.equals("category")) { 2023 this.category = new CodeableConcept(); 2024 return this.category; 2025 } 2026 else if (name.equals("code")) { 2027 this.code = new CodeableConcept(); 2028 return this.code; 2029 } 2030 else if (name.equals("subject")) { 2031 this.subject = new Reference(); 2032 return this.subject; 2033 } 2034 else if (name.equals("context")) { 2035 this.context = new Reference(); 2036 return this.context; 2037 } 2038 else if (name.equals("effectiveDateTime")) { 2039 this.effective = new DateTimeType(); 2040 return this.effective; 2041 } 2042 else if (name.equals("effectivePeriod")) { 2043 this.effective = new Period(); 2044 return this.effective; 2045 } 2046 else if (name.equals("issued")) { 2047 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.issued"); 2048 } 2049 else if (name.equals("performer")) { 2050 return addPerformer(); 2051 } 2052 else if (name.equals("specimen")) { 2053 return addSpecimen(); 2054 } 2055 else if (name.equals("result")) { 2056 return addResult(); 2057 } 2058 else if (name.equals("imagingStudy")) { 2059 return addImagingStudy(); 2060 } 2061 else if (name.equals("image")) { 2062 return addImage(); 2063 } 2064 else if (name.equals("conclusion")) { 2065 throw new FHIRException("Cannot call addChild on a primitive type DiagnosticReport.conclusion"); 2066 } 2067 else if (name.equals("codedDiagnosis")) { 2068 return addCodedDiagnosis(); 2069 } 2070 else if (name.equals("presentedForm")) { 2071 return addPresentedForm(); 2072 } 2073 else 2074 return super.addChild(name); 2075 } 2076 2077 public String fhirType() { 2078 return "DiagnosticReport"; 2079 2080 } 2081 2082 public DiagnosticReport copy() { 2083 DiagnosticReport dst = new DiagnosticReport(); 2084 copyValues(dst); 2085 if (identifier != null) { 2086 dst.identifier = new ArrayList<Identifier>(); 2087 for (Identifier i : identifier) 2088 dst.identifier.add(i.copy()); 2089 }; 2090 if (basedOn != null) { 2091 dst.basedOn = new ArrayList<Reference>(); 2092 for (Reference i : basedOn) 2093 dst.basedOn.add(i.copy()); 2094 }; 2095 dst.status = status == null ? null : status.copy(); 2096 dst.category = category == null ? null : category.copy(); 2097 dst.code = code == null ? null : code.copy(); 2098 dst.subject = subject == null ? null : subject.copy(); 2099 dst.context = context == null ? null : context.copy(); 2100 dst.effective = effective == null ? null : effective.copy(); 2101 dst.issued = issued == null ? null : issued.copy(); 2102 if (performer != null) { 2103 dst.performer = new ArrayList<DiagnosticReportPerformerComponent>(); 2104 for (DiagnosticReportPerformerComponent i : performer) 2105 dst.performer.add(i.copy()); 2106 }; 2107 if (specimen != null) { 2108 dst.specimen = new ArrayList<Reference>(); 2109 for (Reference i : specimen) 2110 dst.specimen.add(i.copy()); 2111 }; 2112 if (result != null) { 2113 dst.result = new ArrayList<Reference>(); 2114 for (Reference i : result) 2115 dst.result.add(i.copy()); 2116 }; 2117 if (imagingStudy != null) { 2118 dst.imagingStudy = new ArrayList<Reference>(); 2119 for (Reference i : imagingStudy) 2120 dst.imagingStudy.add(i.copy()); 2121 }; 2122 if (image != null) { 2123 dst.image = new ArrayList<DiagnosticReportImageComponent>(); 2124 for (DiagnosticReportImageComponent i : image) 2125 dst.image.add(i.copy()); 2126 }; 2127 dst.conclusion = conclusion == null ? null : conclusion.copy(); 2128 if (codedDiagnosis != null) { 2129 dst.codedDiagnosis = new ArrayList<CodeableConcept>(); 2130 for (CodeableConcept i : codedDiagnosis) 2131 dst.codedDiagnosis.add(i.copy()); 2132 }; 2133 if (presentedForm != null) { 2134 dst.presentedForm = new ArrayList<Attachment>(); 2135 for (Attachment i : presentedForm) 2136 dst.presentedForm.add(i.copy()); 2137 }; 2138 return dst; 2139 } 2140 2141 protected DiagnosticReport typedCopy() { 2142 return copy(); 2143 } 2144 2145 @Override 2146 public boolean equalsDeep(Base other_) { 2147 if (!super.equalsDeep(other_)) 2148 return false; 2149 if (!(other_ instanceof DiagnosticReport)) 2150 return false; 2151 DiagnosticReport o = (DiagnosticReport) other_; 2152 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(status, o.status, true) 2153 && compareDeep(category, o.category, true) && compareDeep(code, o.code, true) && compareDeep(subject, o.subject, true) 2154 && compareDeep(context, o.context, true) && compareDeep(effective, o.effective, true) && compareDeep(issued, o.issued, true) 2155 && compareDeep(performer, o.performer, true) && compareDeep(specimen, o.specimen, true) && compareDeep(result, o.result, true) 2156 && compareDeep(imagingStudy, o.imagingStudy, true) && compareDeep(image, o.image, true) && compareDeep(conclusion, o.conclusion, true) 2157 && compareDeep(codedDiagnosis, o.codedDiagnosis, true) && compareDeep(presentedForm, o.presentedForm, true) 2158 ; 2159 } 2160 2161 @Override 2162 public boolean equalsShallow(Base other_) { 2163 if (!super.equalsShallow(other_)) 2164 return false; 2165 if (!(other_ instanceof DiagnosticReport)) 2166 return false; 2167 DiagnosticReport o = (DiagnosticReport) other_; 2168 return compareValues(status, o.status, true) && compareValues(issued, o.issued, true) && compareValues(conclusion, o.conclusion, true) 2169 ; 2170 } 2171 2172 public boolean isEmpty() { 2173 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, status 2174 , category, code, subject, context, effective, issued, performer, specimen, result 2175 , imagingStudy, image, conclusion, codedDiagnosis, presentedForm); 2176 } 2177 2178 @Override 2179 public ResourceType getResourceType() { 2180 return ResourceType.DiagnosticReport; 2181 } 2182 2183 /** 2184 * Search parameter: <b>date</b> 2185 * <p> 2186 * Description: <b>The clinically relevant time of the report</b><br> 2187 * Type: <b>date</b><br> 2188 * Path: <b>DiagnosticReport.effective[x]</b><br> 2189 * </p> 2190 */ 2191 @SearchParamDefinition(name="date", path="DiagnosticReport.effective", description="The clinically relevant time of the report", type="date" ) 2192 public static final String SP_DATE = "date"; 2193 /** 2194 * <b>Fluent Client</b> search parameter constant for <b>date</b> 2195 * <p> 2196 * Description: <b>The clinically relevant time of the report</b><br> 2197 * Type: <b>date</b><br> 2198 * Path: <b>DiagnosticReport.effective[x]</b><br> 2199 * </p> 2200 */ 2201 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 2202 2203 /** 2204 * Search parameter: <b>identifier</b> 2205 * <p> 2206 * Description: <b>An identifier for the report</b><br> 2207 * Type: <b>token</b><br> 2208 * Path: <b>DiagnosticReport.identifier</b><br> 2209 * </p> 2210 */ 2211 @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report", type="token" ) 2212 public static final String SP_IDENTIFIER = "identifier"; 2213 /** 2214 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 2215 * <p> 2216 * Description: <b>An identifier for the report</b><br> 2217 * Type: <b>token</b><br> 2218 * Path: <b>DiagnosticReport.identifier</b><br> 2219 * </p> 2220 */ 2221 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 2222 2223 /** 2224 * Search parameter: <b>image</b> 2225 * <p> 2226 * Description: <b>A reference to the image source.</b><br> 2227 * Type: <b>reference</b><br> 2228 * Path: <b>DiagnosticReport.image.link</b><br> 2229 * </p> 2230 */ 2231 @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="A reference to the image source.", type="reference", target={Media.class } ) 2232 public static final String SP_IMAGE = "image"; 2233 /** 2234 * <b>Fluent Client</b> search parameter constant for <b>image</b> 2235 * <p> 2236 * Description: <b>A reference to the image source.</b><br> 2237 * Type: <b>reference</b><br> 2238 * Path: <b>DiagnosticReport.image.link</b><br> 2239 * </p> 2240 */ 2241 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam IMAGE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_IMAGE); 2242 2243/** 2244 * Constant for fluent queries to be used to add include statements. Specifies 2245 * the path value of "<b>DiagnosticReport:image</b>". 2246 */ 2247 public static final ca.uhn.fhir.model.api.Include INCLUDE_IMAGE = new ca.uhn.fhir.model.api.Include("DiagnosticReport:image").toLocked(); 2248 2249 /** 2250 * Search parameter: <b>performer</b> 2251 * <p> 2252 * Description: <b>Who was the source of the report (organization)</b><br> 2253 * Type: <b>reference</b><br> 2254 * Path: <b>DiagnosticReport.performer.actor</b><br> 2255 * </p> 2256 */ 2257 @SearchParamDefinition(name="performer", path="DiagnosticReport.performer.actor", description="Who was the source of the report (organization)", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Organization.class, Practitioner.class } ) 2258 public static final String SP_PERFORMER = "performer"; 2259 /** 2260 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 2261 * <p> 2262 * Description: <b>Who was the source of the report (organization)</b><br> 2263 * Type: <b>reference</b><br> 2264 * Path: <b>DiagnosticReport.performer.actor</b><br> 2265 * </p> 2266 */ 2267 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 2268 2269/** 2270 * Constant for fluent queries to be used to add include statements. Specifies 2271 * the path value of "<b>DiagnosticReport:performer</b>". 2272 */ 2273 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("DiagnosticReport:performer").toLocked(); 2274 2275 /** 2276 * Search parameter: <b>code</b> 2277 * <p> 2278 * Description: <b>The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result</b><br> 2279 * Type: <b>token</b><br> 2280 * Path: <b>DiagnosticReport.code</b><br> 2281 * </p> 2282 */ 2283 @SearchParamDefinition(name="code", path="DiagnosticReport.code", description="The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result", type="token" ) 2284 public static final String SP_CODE = "code"; 2285 /** 2286 * <b>Fluent Client</b> search parameter constant for <b>code</b> 2287 * <p> 2288 * Description: <b>The code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result</b><br> 2289 * Type: <b>token</b><br> 2290 * Path: <b>DiagnosticReport.code</b><br> 2291 * </p> 2292 */ 2293 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE); 2294 2295 /** 2296 * Search parameter: <b>subject</b> 2297 * <p> 2298 * Description: <b>The subject of the report</b><br> 2299 * Type: <b>reference</b><br> 2300 * Path: <b>DiagnosticReport.subject</b><br> 2301 * </p> 2302 */ 2303 @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Device.class, Group.class, Location.class, Patient.class } ) 2304 public static final String SP_SUBJECT = "subject"; 2305 /** 2306 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 2307 * <p> 2308 * Description: <b>The subject of the report</b><br> 2309 * Type: <b>reference</b><br> 2310 * Path: <b>DiagnosticReport.subject</b><br> 2311 * </p> 2312 */ 2313 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 2314 2315/** 2316 * Constant for fluent queries to be used to add include statements. Specifies 2317 * the path value of "<b>DiagnosticReport:subject</b>". 2318 */ 2319 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:subject").toLocked(); 2320 2321 /** 2322 * Search parameter: <b>diagnosis</b> 2323 * <p> 2324 * Description: <b>A coded diagnosis on the report</b><br> 2325 * Type: <b>token</b><br> 2326 * Path: <b>DiagnosticReport.codedDiagnosis</b><br> 2327 * </p> 2328 */ 2329 @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report", type="token" ) 2330 public static final String SP_DIAGNOSIS = "diagnosis"; 2331 /** 2332 * <b>Fluent Client</b> search parameter constant for <b>diagnosis</b> 2333 * <p> 2334 * Description: <b>A coded diagnosis on the report</b><br> 2335 * Type: <b>token</b><br> 2336 * Path: <b>DiagnosticReport.codedDiagnosis</b><br> 2337 * </p> 2338 */ 2339 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DIAGNOSIS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DIAGNOSIS); 2340 2341 /** 2342 * Search parameter: <b>encounter</b> 2343 * <p> 2344 * Description: <b>The Encounter when the order was made</b><br> 2345 * Type: <b>reference</b><br> 2346 * Path: <b>DiagnosticReport.context</b><br> 2347 * </p> 2348 */ 2349 @SearchParamDefinition(name="encounter", path="DiagnosticReport.context", description="The Encounter when the order was made", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Encounter") }, target={Encounter.class } ) 2350 public static final String SP_ENCOUNTER = "encounter"; 2351 /** 2352 * <b>Fluent Client</b> search parameter constant for <b>encounter</b> 2353 * <p> 2354 * Description: <b>The Encounter when the order was made</b><br> 2355 * Type: <b>reference</b><br> 2356 * Path: <b>DiagnosticReport.context</b><br> 2357 * </p> 2358 */ 2359 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENCOUNTER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENCOUNTER); 2360 2361/** 2362 * Constant for fluent queries to be used to add include statements. Specifies 2363 * the path value of "<b>DiagnosticReport:encounter</b>". 2364 */ 2365 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER = new ca.uhn.fhir.model.api.Include("DiagnosticReport:encounter").toLocked(); 2366 2367 /** 2368 * Search parameter: <b>result</b> 2369 * <p> 2370 * Description: <b>Link to an atomic result (observation resource)</b><br> 2371 * Type: <b>reference</b><br> 2372 * Path: <b>DiagnosticReport.result</b><br> 2373 * </p> 2374 */ 2375 @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)", type="reference", target={Observation.class } ) 2376 public static final String SP_RESULT = "result"; 2377 /** 2378 * <b>Fluent Client</b> search parameter constant for <b>result</b> 2379 * <p> 2380 * Description: <b>Link to an atomic result (observation resource)</b><br> 2381 * Type: <b>reference</b><br> 2382 * Path: <b>DiagnosticReport.result</b><br> 2383 * </p> 2384 */ 2385 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESULT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESULT); 2386 2387/** 2388 * Constant for fluent queries to be used to add include statements. Specifies 2389 * the path value of "<b>DiagnosticReport:result</b>". 2390 */ 2391 public static final ca.uhn.fhir.model.api.Include INCLUDE_RESULT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:result").toLocked(); 2392 2393 /** 2394 * Search parameter: <b>based-on</b> 2395 * <p> 2396 * Description: <b>Reference to the procedure request.</b><br> 2397 * Type: <b>reference</b><br> 2398 * Path: <b>DiagnosticReport.basedOn</b><br> 2399 * </p> 2400 */ 2401 @SearchParamDefinition(name="based-on", path="DiagnosticReport.basedOn", description="Reference to the procedure request.", type="reference", target={CarePlan.class, ImmunizationRecommendation.class, MedicationRequest.class, NutritionOrder.class, ProcedureRequest.class, ReferralRequest.class } ) 2402 public static final String SP_BASED_ON = "based-on"; 2403 /** 2404 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 2405 * <p> 2406 * Description: <b>Reference to the procedure request.</b><br> 2407 * Type: <b>reference</b><br> 2408 * Path: <b>DiagnosticReport.basedOn</b><br> 2409 * </p> 2410 */ 2411 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 2412 2413/** 2414 * Constant for fluent queries to be used to add include statements. Specifies 2415 * the path value of "<b>DiagnosticReport:based-on</b>". 2416 */ 2417 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("DiagnosticReport:based-on").toLocked(); 2418 2419 /** 2420 * Search parameter: <b>patient</b> 2421 * <p> 2422 * Description: <b>The subject of the report if a patient</b><br> 2423 * Type: <b>reference</b><br> 2424 * Path: <b>DiagnosticReport.subject</b><br> 2425 * </p> 2426 */ 2427 @SearchParamDefinition(name="patient", path="DiagnosticReport.subject", description="The subject of the report if a patient", type="reference", target={Patient.class } ) 2428 public static final String SP_PATIENT = "patient"; 2429 /** 2430 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 2431 * <p> 2432 * Description: <b>The subject of the report if a patient</b><br> 2433 * Type: <b>reference</b><br> 2434 * Path: <b>DiagnosticReport.subject</b><br> 2435 * </p> 2436 */ 2437 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 2438 2439/** 2440 * Constant for fluent queries to be used to add include statements. Specifies 2441 * the path value of "<b>DiagnosticReport:patient</b>". 2442 */ 2443 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:patient").toLocked(); 2444 2445 /** 2446 * Search parameter: <b>specimen</b> 2447 * <p> 2448 * Description: <b>The specimen details</b><br> 2449 * Type: <b>reference</b><br> 2450 * Path: <b>DiagnosticReport.specimen</b><br> 2451 * </p> 2452 */ 2453 @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details", type="reference", target={Specimen.class } ) 2454 public static final String SP_SPECIMEN = "specimen"; 2455 /** 2456 * <b>Fluent Client</b> search parameter constant for <b>specimen</b> 2457 * <p> 2458 * Description: <b>The specimen details</b><br> 2459 * Type: <b>reference</b><br> 2460 * Path: <b>DiagnosticReport.specimen</b><br> 2461 * </p> 2462 */ 2463 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SPECIMEN = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SPECIMEN); 2464 2465/** 2466 * Constant for fluent queries to be used to add include statements. Specifies 2467 * the path value of "<b>DiagnosticReport:specimen</b>". 2468 */ 2469 public static final ca.uhn.fhir.model.api.Include INCLUDE_SPECIMEN = new ca.uhn.fhir.model.api.Include("DiagnosticReport:specimen").toLocked(); 2470 2471 /** 2472 * Search parameter: <b>context</b> 2473 * <p> 2474 * Description: <b>Healthcare event (Episode of Care or Encounter) related to the report</b><br> 2475 * Type: <b>reference</b><br> 2476 * Path: <b>DiagnosticReport.context</b><br> 2477 * </p> 2478 */ 2479 @SearchParamDefinition(name="context", path="DiagnosticReport.context", description="Healthcare event (Episode of Care or Encounter) related to the report", type="reference", target={Encounter.class, EpisodeOfCare.class } ) 2480 public static final String SP_CONTEXT = "context"; 2481 /** 2482 * <b>Fluent Client</b> search parameter constant for <b>context</b> 2483 * <p> 2484 * Description: <b>Healthcare event (Episode of Care or Encounter) related to the report</b><br> 2485 * Type: <b>reference</b><br> 2486 * Path: <b>DiagnosticReport.context</b><br> 2487 * </p> 2488 */ 2489 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 2490 2491/** 2492 * Constant for fluent queries to be used to add include statements. Specifies 2493 * the path value of "<b>DiagnosticReport:context</b>". 2494 */ 2495 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("DiagnosticReport:context").toLocked(); 2496 2497 /** 2498 * Search parameter: <b>issued</b> 2499 * <p> 2500 * Description: <b>When the report was issued</b><br> 2501 * Type: <b>date</b><br> 2502 * Path: <b>DiagnosticReport.issued</b><br> 2503 * </p> 2504 */ 2505 @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued", type="date" ) 2506 public static final String SP_ISSUED = "issued"; 2507 /** 2508 * <b>Fluent Client</b> search parameter constant for <b>issued</b> 2509 * <p> 2510 * Description: <b>When the report was issued</b><br> 2511 * Type: <b>date</b><br> 2512 * Path: <b>DiagnosticReport.issued</b><br> 2513 * </p> 2514 */ 2515 public static final ca.uhn.fhir.rest.gclient.DateClientParam ISSUED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_ISSUED); 2516 2517 /** 2518 * Search parameter: <b>category</b> 2519 * <p> 2520 * Description: <b>Which diagnostic discipline/department created the report</b><br> 2521 * Type: <b>token</b><br> 2522 * Path: <b>DiagnosticReport.category</b><br> 2523 * </p> 2524 */ 2525 @SearchParamDefinition(name="category", path="DiagnosticReport.category", description="Which diagnostic discipline/department created the report", type="token" ) 2526 public static final String SP_CATEGORY = "category"; 2527 /** 2528 * <b>Fluent Client</b> search parameter constant for <b>category</b> 2529 * <p> 2530 * Description: <b>Which diagnostic discipline/department created the report</b><br> 2531 * Type: <b>token</b><br> 2532 * Path: <b>DiagnosticReport.category</b><br> 2533 * </p> 2534 */ 2535 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CATEGORY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CATEGORY); 2536 2537 /** 2538 * Search parameter: <b>status</b> 2539 * <p> 2540 * Description: <b>The status of the report</b><br> 2541 * Type: <b>token</b><br> 2542 * Path: <b>DiagnosticReport.status</b><br> 2543 * </p> 2544 */ 2545 @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report", type="token" ) 2546 public static final String SP_STATUS = "status"; 2547 /** 2548 * <b>Fluent Client</b> search parameter constant for <b>status</b> 2549 * <p> 2550 * Description: <b>The status of the report</b><br> 2551 * Type: <b>token</b><br> 2552 * Path: <b>DiagnosticReport.status</b><br> 2553 * </p> 2554 */ 2555 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 2556 2557 2558} 2559