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