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