001package org.hl7.fhir.dstu2.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import ca.uhn.fhir.model.api.annotation.Block; 041import ca.uhn.fhir.model.api.annotation.Child; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.ResourceDef; 044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 045import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 046import org.hl7.fhir.exceptions.FHIRException; 047import org.hl7.fhir.utilities.Utilities; 048/** 049 * Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. 050 */ 051@ResourceDef(name="ImagingStudy", profile="http://hl7.org/fhir/Profile/ImagingStudy") 052public class ImagingStudy extends DomainResource { 053 054 public enum InstanceAvailability { 055 /** 056 * null 057 */ 058 ONLINE, 059 /** 060 * null 061 */ 062 OFFLINE, 063 /** 064 * null 065 */ 066 NEARLINE, 067 /** 068 * null 069 */ 070 UNAVAILABLE, 071 /** 072 * added to help the parsers 073 */ 074 NULL; 075 public static InstanceAvailability fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("ONLINE".equals(codeString)) 079 return ONLINE; 080 if ("OFFLINE".equals(codeString)) 081 return OFFLINE; 082 if ("NEARLINE".equals(codeString)) 083 return NEARLINE; 084 if ("UNAVAILABLE".equals(codeString)) 085 return UNAVAILABLE; 086 throw new FHIRException("Unknown InstanceAvailability code '"+codeString+"'"); 087 } 088 public String toCode() { 089 switch (this) { 090 case ONLINE: return "ONLINE"; 091 case OFFLINE: return "OFFLINE"; 092 case NEARLINE: return "NEARLINE"; 093 case UNAVAILABLE: return "UNAVAILABLE"; 094 default: return "?"; 095 } 096 } 097 public String getSystem() { 098 switch (this) { 099 case ONLINE: return "http://nema.org/dicom/dicm"; 100 case OFFLINE: return "http://nema.org/dicom/dicm"; 101 case NEARLINE: return "http://nema.org/dicom/dicm"; 102 case UNAVAILABLE: return "http://nema.org/dicom/dicm"; 103 default: return "?"; 104 } 105 } 106 public String getDefinition() { 107 switch (this) { 108 case ONLINE: return ""; 109 case OFFLINE: return ""; 110 case NEARLINE: return ""; 111 case UNAVAILABLE: return ""; 112 default: return "?"; 113 } 114 } 115 public String getDisplay() { 116 switch (this) { 117 case ONLINE: return "ONLINE"; 118 case OFFLINE: return "OFFLINE"; 119 case NEARLINE: return "NEARLINE"; 120 case UNAVAILABLE: return "UNAVAILABLE"; 121 default: return "?"; 122 } 123 } 124 } 125 126 public static class InstanceAvailabilityEnumFactory implements EnumFactory<InstanceAvailability> { 127 public InstanceAvailability fromCode(String codeString) throws IllegalArgumentException { 128 if (codeString == null || "".equals(codeString)) 129 if (codeString == null || "".equals(codeString)) 130 return null; 131 if ("ONLINE".equals(codeString)) 132 return InstanceAvailability.ONLINE; 133 if ("OFFLINE".equals(codeString)) 134 return InstanceAvailability.OFFLINE; 135 if ("NEARLINE".equals(codeString)) 136 return InstanceAvailability.NEARLINE; 137 if ("UNAVAILABLE".equals(codeString)) 138 return InstanceAvailability.UNAVAILABLE; 139 throw new IllegalArgumentException("Unknown InstanceAvailability code '"+codeString+"'"); 140 } 141 public Enumeration<InstanceAvailability> fromType(Base code) throws FHIRException { 142 if (code == null || code.isEmpty()) 143 return null; 144 String codeString = ((PrimitiveType) code).asStringValue(); 145 if (codeString == null || "".equals(codeString)) 146 return null; 147 if ("ONLINE".equals(codeString)) 148 return new Enumeration<InstanceAvailability>(this, InstanceAvailability.ONLINE); 149 if ("OFFLINE".equals(codeString)) 150 return new Enumeration<InstanceAvailability>(this, InstanceAvailability.OFFLINE); 151 if ("NEARLINE".equals(codeString)) 152 return new Enumeration<InstanceAvailability>(this, InstanceAvailability.NEARLINE); 153 if ("UNAVAILABLE".equals(codeString)) 154 return new Enumeration<InstanceAvailability>(this, InstanceAvailability.UNAVAILABLE); 155 throw new FHIRException("Unknown InstanceAvailability code '"+codeString+"'"); 156 } 157 public String toCode(InstanceAvailability code) { 158 if (code == InstanceAvailability.ONLINE) 159 return "ONLINE"; 160 if (code == InstanceAvailability.OFFLINE) 161 return "OFFLINE"; 162 if (code == InstanceAvailability.NEARLINE) 163 return "NEARLINE"; 164 if (code == InstanceAvailability.UNAVAILABLE) 165 return "UNAVAILABLE"; 166 return "?"; 167 } 168 } 169 170 @Block() 171 public static class ImagingStudySeriesComponent extends BackboneElement implements IBaseBackboneElement { 172 /** 173 * The Numeric identifier of this series in the study. 174 */ 175 @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) 176 @Description(shortDefinition="Numeric identifier of this series", formalDefinition="The Numeric identifier of this series in the study." ) 177 protected UnsignedIntType number; 178 179 /** 180 * The modality of this series sequence. 181 */ 182 @Child(name = "modality", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=true) 183 @Description(shortDefinition="The modality of the instances in the series", formalDefinition="The modality of this series sequence." ) 184 protected Coding modality; 185 186 /** 187 * Formal identifier for this series. 188 */ 189 @Child(name = "uid", type = {OidType.class}, order=3, min=1, max=1, modifier=false, summary=true) 190 @Description(shortDefinition="Formal identifier for this series", formalDefinition="Formal identifier for this series." ) 191 protected OidType uid; 192 193 /** 194 * A description of the series. 195 */ 196 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 197 @Description(shortDefinition="A description of the series", formalDefinition="A description of the series." ) 198 protected StringType description; 199 200 /** 201 * Number of SOP Instances in Series. 202 */ 203 @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=5, min=1, max=1, modifier=false, summary=true) 204 @Description(shortDefinition="Number of Series Related Instances", formalDefinition="Number of SOP Instances in Series." ) 205 protected UnsignedIntType numberOfInstances; 206 207 /** 208 * Availability of series (online, offline or nearline). 209 */ 210 @Child(name = "availability", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=true) 211 @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE", formalDefinition="Availability of series (online, offline or nearline)." ) 212 protected Enumeration<InstanceAvailability> availability; 213 214 /** 215 * URI/URL specifying the location of the referenced series using WADO-RS. 216 */ 217 @Child(name = "url", type = {UriType.class}, order=7, min=0, max=1, modifier=false, summary=true) 218 @Description(shortDefinition="Location of the referenced instance(s)", formalDefinition="URI/URL specifying the location of the referenced series using WADO-RS." ) 219 protected UriType url; 220 221 /** 222 * Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT. 223 */ 224 @Child(name = "bodySite", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) 225 @Description(shortDefinition="Body part examined", formalDefinition="Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT." ) 226 protected Coding bodySite; 227 228 /** 229 * Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code. 230 */ 231 @Child(name = "laterality", type = {Coding.class}, order=9, min=0, max=1, modifier=false, summary=true) 232 @Description(shortDefinition="Body part laterality", formalDefinition="Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code." ) 233 protected Coding laterality; 234 235 /** 236 * The date and time the series was started. 237 */ 238 @Child(name = "started", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) 239 @Description(shortDefinition="When the series started", formalDefinition="The date and time the series was started." ) 240 protected DateTimeType started; 241 242 /** 243 * A single SOP Instance within the series, e.g. an image, or presentation state. 244 */ 245 @Child(name = "instance", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 246 @Description(shortDefinition="A single SOP instance from the series", formalDefinition="A single SOP Instance within the series, e.g. an image, or presentation state." ) 247 protected List<ImagingStudySeriesInstanceComponent> instance; 248 249 private static final long serialVersionUID = -1798366943L; 250 251 /* 252 * Constructor 253 */ 254 public ImagingStudySeriesComponent() { 255 super(); 256 } 257 258 /* 259 * Constructor 260 */ 261 public ImagingStudySeriesComponent(Coding modality, OidType uid, UnsignedIntType numberOfInstances) { 262 super(); 263 this.modality = modality; 264 this.uid = uid; 265 this.numberOfInstances = numberOfInstances; 266 } 267 268 /** 269 * @return {@link #number} (The Numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 270 */ 271 public UnsignedIntType getNumberElement() { 272 if (this.number == null) 273 if (Configuration.errorOnAutoCreate()) 274 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.number"); 275 else if (Configuration.doAutoCreate()) 276 this.number = new UnsignedIntType(); // bb 277 return this.number; 278 } 279 280 public boolean hasNumberElement() { 281 return this.number != null && !this.number.isEmpty(); 282 } 283 284 public boolean hasNumber() { 285 return this.number != null && !this.number.isEmpty(); 286 } 287 288 /** 289 * @param value {@link #number} (The Numeric identifier of this series in the study.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 290 */ 291 public ImagingStudySeriesComponent setNumberElement(UnsignedIntType value) { 292 this.number = value; 293 return this; 294 } 295 296 /** 297 * @return The Numeric identifier of this series in the study. 298 */ 299 public int getNumber() { 300 return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); 301 } 302 303 /** 304 * @param value The Numeric identifier of this series in the study. 305 */ 306 public ImagingStudySeriesComponent setNumber(int value) { 307 if (this.number == null) 308 this.number = new UnsignedIntType(); 309 this.number.setValue(value); 310 return this; 311 } 312 313 /** 314 * @return {@link #modality} (The modality of this series sequence.) 315 */ 316 public Coding getModality() { 317 if (this.modality == null) 318 if (Configuration.errorOnAutoCreate()) 319 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.modality"); 320 else if (Configuration.doAutoCreate()) 321 this.modality = new Coding(); // cc 322 return this.modality; 323 } 324 325 public boolean hasModality() { 326 return this.modality != null && !this.modality.isEmpty(); 327 } 328 329 /** 330 * @param value {@link #modality} (The modality of this series sequence.) 331 */ 332 public ImagingStudySeriesComponent setModality(Coding value) { 333 this.modality = value; 334 return this; 335 } 336 337 /** 338 * @return {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 339 */ 340 public OidType getUidElement() { 341 if (this.uid == null) 342 if (Configuration.errorOnAutoCreate()) 343 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.uid"); 344 else if (Configuration.doAutoCreate()) 345 this.uid = new OidType(); // bb 346 return this.uid; 347 } 348 349 public boolean hasUidElement() { 350 return this.uid != null && !this.uid.isEmpty(); 351 } 352 353 public boolean hasUid() { 354 return this.uid != null && !this.uid.isEmpty(); 355 } 356 357 /** 358 * @param value {@link #uid} (Formal identifier for this series.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 359 */ 360 public ImagingStudySeriesComponent setUidElement(OidType value) { 361 this.uid = value; 362 return this; 363 } 364 365 /** 366 * @return Formal identifier for this series. 367 */ 368 public String getUid() { 369 return this.uid == null ? null : this.uid.getValue(); 370 } 371 372 /** 373 * @param value Formal identifier for this series. 374 */ 375 public ImagingStudySeriesComponent setUid(String value) { 376 if (this.uid == null) 377 this.uid = new OidType(); 378 this.uid.setValue(value); 379 return this; 380 } 381 382 /** 383 * @return {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 384 */ 385 public StringType getDescriptionElement() { 386 if (this.description == null) 387 if (Configuration.errorOnAutoCreate()) 388 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.description"); 389 else if (Configuration.doAutoCreate()) 390 this.description = new StringType(); // bb 391 return this.description; 392 } 393 394 public boolean hasDescriptionElement() { 395 return this.description != null && !this.description.isEmpty(); 396 } 397 398 public boolean hasDescription() { 399 return this.description != null && !this.description.isEmpty(); 400 } 401 402 /** 403 * @param value {@link #description} (A description of the series.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 404 */ 405 public ImagingStudySeriesComponent setDescriptionElement(StringType value) { 406 this.description = value; 407 return this; 408 } 409 410 /** 411 * @return A description of the series. 412 */ 413 public String getDescription() { 414 return this.description == null ? null : this.description.getValue(); 415 } 416 417 /** 418 * @param value A description of the series. 419 */ 420 public ImagingStudySeriesComponent setDescription(String value) { 421 if (Utilities.noString(value)) 422 this.description = null; 423 else { 424 if (this.description == null) 425 this.description = new StringType(); 426 this.description.setValue(value); 427 } 428 return this; 429 } 430 431 /** 432 * @return {@link #numberOfInstances} (Number of SOP Instances in Series.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 433 */ 434 public UnsignedIntType getNumberOfInstancesElement() { 435 if (this.numberOfInstances == null) 436 if (Configuration.errorOnAutoCreate()) 437 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.numberOfInstances"); 438 else if (Configuration.doAutoCreate()) 439 this.numberOfInstances = new UnsignedIntType(); // bb 440 return this.numberOfInstances; 441 } 442 443 public boolean hasNumberOfInstancesElement() { 444 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 445 } 446 447 public boolean hasNumberOfInstances() { 448 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 449 } 450 451 /** 452 * @param value {@link #numberOfInstances} (Number of SOP Instances in Series.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 453 */ 454 public ImagingStudySeriesComponent setNumberOfInstancesElement(UnsignedIntType value) { 455 this.numberOfInstances = value; 456 return this; 457 } 458 459 /** 460 * @return Number of SOP Instances in Series. 461 */ 462 public int getNumberOfInstances() { 463 return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue(); 464 } 465 466 /** 467 * @param value Number of SOP Instances in Series. 468 */ 469 public ImagingStudySeriesComponent setNumberOfInstances(int value) { 470 if (this.numberOfInstances == null) 471 this.numberOfInstances = new UnsignedIntType(); 472 this.numberOfInstances.setValue(value); 473 return this; 474 } 475 476 /** 477 * @return {@link #availability} (Availability of series (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value 478 */ 479 public Enumeration<InstanceAvailability> getAvailabilityElement() { 480 if (this.availability == null) 481 if (Configuration.errorOnAutoCreate()) 482 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.availability"); 483 else if (Configuration.doAutoCreate()) 484 this.availability = new Enumeration<InstanceAvailability>(new InstanceAvailabilityEnumFactory()); // bb 485 return this.availability; 486 } 487 488 public boolean hasAvailabilityElement() { 489 return this.availability != null && !this.availability.isEmpty(); 490 } 491 492 public boolean hasAvailability() { 493 return this.availability != null && !this.availability.isEmpty(); 494 } 495 496 /** 497 * @param value {@link #availability} (Availability of series (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value 498 */ 499 public ImagingStudySeriesComponent setAvailabilityElement(Enumeration<InstanceAvailability> value) { 500 this.availability = value; 501 return this; 502 } 503 504 /** 505 * @return Availability of series (online, offline or nearline). 506 */ 507 public InstanceAvailability getAvailability() { 508 return this.availability == null ? null : this.availability.getValue(); 509 } 510 511 /** 512 * @param value Availability of series (online, offline or nearline). 513 */ 514 public ImagingStudySeriesComponent setAvailability(InstanceAvailability value) { 515 if (value == null) 516 this.availability = null; 517 else { 518 if (this.availability == null) 519 this.availability = new Enumeration<InstanceAvailability>(new InstanceAvailabilityEnumFactory()); 520 this.availability.setValue(value); 521 } 522 return this; 523 } 524 525 /** 526 * @return {@link #url} (URI/URL specifying the location of the referenced series using WADO-RS.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 527 */ 528 public UriType getUrlElement() { 529 if (this.url == null) 530 if (Configuration.errorOnAutoCreate()) 531 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.url"); 532 else if (Configuration.doAutoCreate()) 533 this.url = new UriType(); // bb 534 return this.url; 535 } 536 537 public boolean hasUrlElement() { 538 return this.url != null && !this.url.isEmpty(); 539 } 540 541 public boolean hasUrl() { 542 return this.url != null && !this.url.isEmpty(); 543 } 544 545 /** 546 * @param value {@link #url} (URI/URL specifying the location of the referenced series using WADO-RS.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 547 */ 548 public ImagingStudySeriesComponent setUrlElement(UriType value) { 549 this.url = value; 550 return this; 551 } 552 553 /** 554 * @return URI/URL specifying the location of the referenced series using WADO-RS. 555 */ 556 public String getUrl() { 557 return this.url == null ? null : this.url.getValue(); 558 } 559 560 /** 561 * @param value URI/URL specifying the location of the referenced series using WADO-RS. 562 */ 563 public ImagingStudySeriesComponent setUrl(String value) { 564 if (Utilities.noString(value)) 565 this.url = null; 566 else { 567 if (this.url == null) 568 this.url = new UriType(); 569 this.url.setValue(value); 570 } 571 return this; 572 } 573 574 /** 575 * @return {@link #bodySite} (Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.) 576 */ 577 public Coding getBodySite() { 578 if (this.bodySite == null) 579 if (Configuration.errorOnAutoCreate()) 580 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.bodySite"); 581 else if (Configuration.doAutoCreate()) 582 this.bodySite = new Coding(); // cc 583 return this.bodySite; 584 } 585 586 public boolean hasBodySite() { 587 return this.bodySite != null && !this.bodySite.isEmpty(); 588 } 589 590 /** 591 * @param value {@link #bodySite} (Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.) 592 */ 593 public ImagingStudySeriesComponent setBodySite(Coding value) { 594 this.bodySite = value; 595 return this; 596 } 597 598 /** 599 * @return {@link #laterality} (Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.) 600 */ 601 public Coding getLaterality() { 602 if (this.laterality == null) 603 if (Configuration.errorOnAutoCreate()) 604 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.laterality"); 605 else if (Configuration.doAutoCreate()) 606 this.laterality = new Coding(); // cc 607 return this.laterality; 608 } 609 610 public boolean hasLaterality() { 611 return this.laterality != null && !this.laterality.isEmpty(); 612 } 613 614 /** 615 * @param value {@link #laterality} (Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.) 616 */ 617 public ImagingStudySeriesComponent setLaterality(Coding value) { 618 this.laterality = value; 619 return this; 620 } 621 622 /** 623 * @return {@link #started} (The date and time the series was started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value 624 */ 625 public DateTimeType getStartedElement() { 626 if (this.started == null) 627 if (Configuration.errorOnAutoCreate()) 628 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.started"); 629 else if (Configuration.doAutoCreate()) 630 this.started = new DateTimeType(); // bb 631 return this.started; 632 } 633 634 public boolean hasStartedElement() { 635 return this.started != null && !this.started.isEmpty(); 636 } 637 638 public boolean hasStarted() { 639 return this.started != null && !this.started.isEmpty(); 640 } 641 642 /** 643 * @param value {@link #started} (The date and time the series was started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value 644 */ 645 public ImagingStudySeriesComponent setStartedElement(DateTimeType value) { 646 this.started = value; 647 return this; 648 } 649 650 /** 651 * @return The date and time the series was started. 652 */ 653 public Date getStarted() { 654 return this.started == null ? null : this.started.getValue(); 655 } 656 657 /** 658 * @param value The date and time the series was started. 659 */ 660 public ImagingStudySeriesComponent setStarted(Date value) { 661 if (value == null) 662 this.started = null; 663 else { 664 if (this.started == null) 665 this.started = new DateTimeType(); 666 this.started.setValue(value); 667 } 668 return this; 669 } 670 671 /** 672 * @return {@link #instance} (A single SOP Instance within the series, e.g. an image, or presentation state.) 673 */ 674 public List<ImagingStudySeriesInstanceComponent> getInstance() { 675 if (this.instance == null) 676 this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 677 return this.instance; 678 } 679 680 public boolean hasInstance() { 681 if (this.instance == null) 682 return false; 683 for (ImagingStudySeriesInstanceComponent item : this.instance) 684 if (!item.isEmpty()) 685 return true; 686 return false; 687 } 688 689 /** 690 * @return {@link #instance} (A single SOP Instance within the series, e.g. an image, or presentation state.) 691 */ 692 // syntactic sugar 693 public ImagingStudySeriesInstanceComponent addInstance() { //3 694 ImagingStudySeriesInstanceComponent t = new ImagingStudySeriesInstanceComponent(); 695 if (this.instance == null) 696 this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 697 this.instance.add(t); 698 return t; 699 } 700 701 // syntactic sugar 702 public ImagingStudySeriesComponent addInstance(ImagingStudySeriesInstanceComponent t) { //3 703 if (t == null) 704 return this; 705 if (this.instance == null) 706 this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 707 this.instance.add(t); 708 return this; 709 } 710 711 protected void listChildren(List<Property> childrenList) { 712 super.listChildren(childrenList); 713 childrenList.add(new Property("number", "unsignedInt", "The Numeric identifier of this series in the study.", 0, java.lang.Integer.MAX_VALUE, number)); 714 childrenList.add(new Property("modality", "Coding", "The modality of this series sequence.", 0, java.lang.Integer.MAX_VALUE, modality)); 715 childrenList.add(new Property("uid", "oid", "Formal identifier for this series.", 0, java.lang.Integer.MAX_VALUE, uid)); 716 childrenList.add(new Property("description", "string", "A description of the series.", 0, java.lang.Integer.MAX_VALUE, description)); 717 childrenList.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Series.", 0, java.lang.Integer.MAX_VALUE, numberOfInstances)); 718 childrenList.add(new Property("availability", "code", "Availability of series (online, offline or nearline).", 0, java.lang.Integer.MAX_VALUE, availability)); 719 childrenList.add(new Property("url", "uri", "URI/URL specifying the location of the referenced series using WADO-RS.", 0, java.lang.Integer.MAX_VALUE, url)); 720 childrenList.add(new Property("bodySite", "Coding", "Body part examined. See DICOM Part 16 Annex L for the mapping from DICOM to Snomed CT.", 0, java.lang.Integer.MAX_VALUE, bodySite)); 721 childrenList.add(new Property("laterality", "Coding", "Laterality if body site is paired anatomic structure and laterality is not pre-coordinated in body site code.", 0, java.lang.Integer.MAX_VALUE, laterality)); 722 childrenList.add(new Property("started", "dateTime", "The date and time the series was started.", 0, java.lang.Integer.MAX_VALUE, started)); 723 childrenList.add(new Property("instance", "", "A single SOP Instance within the series, e.g. an image, or presentation state.", 0, java.lang.Integer.MAX_VALUE, instance)); 724 } 725 726 @Override 727 public void setProperty(String name, Base value) throws FHIRException { 728 if (name.equals("number")) 729 this.number = castToUnsignedInt(value); // UnsignedIntType 730 else if (name.equals("modality")) 731 this.modality = castToCoding(value); // Coding 732 else if (name.equals("uid")) 733 this.uid = castToOid(value); // OidType 734 else if (name.equals("description")) 735 this.description = castToString(value); // StringType 736 else if (name.equals("numberOfInstances")) 737 this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType 738 else if (name.equals("availability")) 739 this.availability = new InstanceAvailabilityEnumFactory().fromType(value); // Enumeration<InstanceAvailability> 740 else if (name.equals("url")) 741 this.url = castToUri(value); // UriType 742 else if (name.equals("bodySite")) 743 this.bodySite = castToCoding(value); // Coding 744 else if (name.equals("laterality")) 745 this.laterality = castToCoding(value); // Coding 746 else if (name.equals("started")) 747 this.started = castToDateTime(value); // DateTimeType 748 else if (name.equals("instance")) 749 this.getInstance().add((ImagingStudySeriesInstanceComponent) value); 750 else 751 super.setProperty(name, value); 752 } 753 754 @Override 755 public Base addChild(String name) throws FHIRException { 756 if (name.equals("number")) { 757 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); 758 } 759 else if (name.equals("modality")) { 760 this.modality = new Coding(); 761 return this.modality; 762 } 763 else if (name.equals("uid")) { 764 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); 765 } 766 else if (name.equals("description")) { 767 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); 768 } 769 else if (name.equals("numberOfInstances")) { 770 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfInstances"); 771 } 772 else if (name.equals("availability")) { 773 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.availability"); 774 } 775 else if (name.equals("url")) { 776 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.url"); 777 } 778 else if (name.equals("bodySite")) { 779 this.bodySite = new Coding(); 780 return this.bodySite; 781 } 782 else if (name.equals("laterality")) { 783 this.laterality = new Coding(); 784 return this.laterality; 785 } 786 else if (name.equals("started")) { 787 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); 788 } 789 else if (name.equals("instance")) { 790 return addInstance(); 791 } 792 else 793 return super.addChild(name); 794 } 795 796 public ImagingStudySeriesComponent copy() { 797 ImagingStudySeriesComponent dst = new ImagingStudySeriesComponent(); 798 copyValues(dst); 799 dst.number = number == null ? null : number.copy(); 800 dst.modality = modality == null ? null : modality.copy(); 801 dst.uid = uid == null ? null : uid.copy(); 802 dst.description = description == null ? null : description.copy(); 803 dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); 804 dst.availability = availability == null ? null : availability.copy(); 805 dst.url = url == null ? null : url.copy(); 806 dst.bodySite = bodySite == null ? null : bodySite.copy(); 807 dst.laterality = laterality == null ? null : laterality.copy(); 808 dst.started = started == null ? null : started.copy(); 809 if (instance != null) { 810 dst.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 811 for (ImagingStudySeriesInstanceComponent i : instance) 812 dst.instance.add(i.copy()); 813 }; 814 return dst; 815 } 816 817 @Override 818 public boolean equalsDeep(Base other) { 819 if (!super.equalsDeep(other)) 820 return false; 821 if (!(other instanceof ImagingStudySeriesComponent)) 822 return false; 823 ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other; 824 return compareDeep(number, o.number, true) && compareDeep(modality, o.modality, true) && compareDeep(uid, o.uid, true) 825 && compareDeep(description, o.description, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) 826 && compareDeep(availability, o.availability, true) && compareDeep(url, o.url, true) && compareDeep(bodySite, o.bodySite, true) 827 && compareDeep(laterality, o.laterality, true) && compareDeep(started, o.started, true) && compareDeep(instance, o.instance, true) 828 ; 829 } 830 831 @Override 832 public boolean equalsShallow(Base other) { 833 if (!super.equalsShallow(other)) 834 return false; 835 if (!(other instanceof ImagingStudySeriesComponent)) 836 return false; 837 ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other; 838 return compareValues(number, o.number, true) && compareValues(uid, o.uid, true) && compareValues(description, o.description, true) 839 && compareValues(numberOfInstances, o.numberOfInstances, true) && compareValues(availability, o.availability, true) 840 && compareValues(url, o.url, true) && compareValues(started, o.started, true); 841 } 842 843 public boolean isEmpty() { 844 return super.isEmpty() && (number == null || number.isEmpty()) && (modality == null || modality.isEmpty()) 845 && (uid == null || uid.isEmpty()) && (description == null || description.isEmpty()) && (numberOfInstances == null || numberOfInstances.isEmpty()) 846 && (availability == null || availability.isEmpty()) && (url == null || url.isEmpty()) && (bodySite == null || bodySite.isEmpty()) 847 && (laterality == null || laterality.isEmpty()) && (started == null || started.isEmpty()) 848 && (instance == null || instance.isEmpty()); 849 } 850 851 public String fhirType() { 852 return "ImagingStudy.series"; 853 854 } 855 856 } 857 858 @Block() 859 public static class ImagingStudySeriesInstanceComponent extends BackboneElement implements IBaseBackboneElement { 860 /** 861 * The number of instance in the series. 862 */ 863 @Child(name = "number", type = {UnsignedIntType.class}, order=1, min=0, max=1, modifier=false, summary=true) 864 @Description(shortDefinition="The number of this instance in the series", formalDefinition="The number of instance in the series." ) 865 protected UnsignedIntType number; 866 867 /** 868 * Formal identifier for this image or other content. 869 */ 870 @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) 871 @Description(shortDefinition="Formal identifier for this instance", formalDefinition="Formal identifier for this image or other content." ) 872 protected OidType uid; 873 874 /** 875 * DICOM instance type. 876 */ 877 @Child(name = "sopClass", type = {OidType.class}, order=3, min=1, max=1, modifier=false, summary=true) 878 @Description(shortDefinition="DICOM class type", formalDefinition="DICOM instance type." ) 879 protected OidType sopClass; 880 881 /** 882 * A human-friendly SOP Class name. 883 */ 884 @Child(name = "type", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 885 @Description(shortDefinition="Type of instance (image etc.)", formalDefinition="A human-friendly SOP Class name." ) 886 protected StringType type; 887 888 /** 889 * The description of the instance. 890 */ 891 @Child(name = "title", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 892 @Description(shortDefinition="Description of instance", formalDefinition="The description of the instance." ) 893 protected StringType title; 894 895 /** 896 * Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance. 897 */ 898 @Child(name = "content", type = {Attachment.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 899 @Description(shortDefinition="Content of the instance", formalDefinition="Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance." ) 900 protected List<Attachment> content; 901 902 private static final long serialVersionUID = -1450403705L; 903 904 /* 905 * Constructor 906 */ 907 public ImagingStudySeriesInstanceComponent() { 908 super(); 909 } 910 911 /* 912 * Constructor 913 */ 914 public ImagingStudySeriesInstanceComponent(OidType uid, OidType sopClass) { 915 super(); 916 this.uid = uid; 917 this.sopClass = sopClass; 918 } 919 920 /** 921 * @return {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 922 */ 923 public UnsignedIntType getNumberElement() { 924 if (this.number == null) 925 if (Configuration.errorOnAutoCreate()) 926 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.number"); 927 else if (Configuration.doAutoCreate()) 928 this.number = new UnsignedIntType(); // bb 929 return this.number; 930 } 931 932 public boolean hasNumberElement() { 933 return this.number != null && !this.number.isEmpty(); 934 } 935 936 public boolean hasNumber() { 937 return this.number != null && !this.number.isEmpty(); 938 } 939 940 /** 941 * @param value {@link #number} (The number of instance in the series.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value 942 */ 943 public ImagingStudySeriesInstanceComponent setNumberElement(UnsignedIntType value) { 944 this.number = value; 945 return this; 946 } 947 948 /** 949 * @return The number of instance in the series. 950 */ 951 public int getNumber() { 952 return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); 953 } 954 955 /** 956 * @param value The number of instance in the series. 957 */ 958 public ImagingStudySeriesInstanceComponent setNumber(int value) { 959 if (this.number == null) 960 this.number = new UnsignedIntType(); 961 this.number.setValue(value); 962 return this; 963 } 964 965 /** 966 * @return {@link #uid} (Formal identifier for this image or other content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 967 */ 968 public OidType getUidElement() { 969 if (this.uid == null) 970 if (Configuration.errorOnAutoCreate()) 971 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.uid"); 972 else if (Configuration.doAutoCreate()) 973 this.uid = new OidType(); // bb 974 return this.uid; 975 } 976 977 public boolean hasUidElement() { 978 return this.uid != null && !this.uid.isEmpty(); 979 } 980 981 public boolean hasUid() { 982 return this.uid != null && !this.uid.isEmpty(); 983 } 984 985 /** 986 * @param value {@link #uid} (Formal identifier for this image or other content.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 987 */ 988 public ImagingStudySeriesInstanceComponent setUidElement(OidType value) { 989 this.uid = value; 990 return this; 991 } 992 993 /** 994 * @return Formal identifier for this image or other content. 995 */ 996 public String getUid() { 997 return this.uid == null ? null : this.uid.getValue(); 998 } 999 1000 /** 1001 * @param value Formal identifier for this image or other content. 1002 */ 1003 public ImagingStudySeriesInstanceComponent setUid(String value) { 1004 if (this.uid == null) 1005 this.uid = new OidType(); 1006 this.uid.setValue(value); 1007 return this; 1008 } 1009 1010 /** 1011 * @return {@link #sopClass} (DICOM instance type.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value 1012 */ 1013 public OidType getSopClassElement() { 1014 if (this.sopClass == null) 1015 if (Configuration.errorOnAutoCreate()) 1016 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.sopClass"); 1017 else if (Configuration.doAutoCreate()) 1018 this.sopClass = new OidType(); // bb 1019 return this.sopClass; 1020 } 1021 1022 public boolean hasSopClassElement() { 1023 return this.sopClass != null && !this.sopClass.isEmpty(); 1024 } 1025 1026 public boolean hasSopClass() { 1027 return this.sopClass != null && !this.sopClass.isEmpty(); 1028 } 1029 1030 /** 1031 * @param value {@link #sopClass} (DICOM instance type.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value 1032 */ 1033 public ImagingStudySeriesInstanceComponent setSopClassElement(OidType value) { 1034 this.sopClass = value; 1035 return this; 1036 } 1037 1038 /** 1039 * @return DICOM instance type. 1040 */ 1041 public String getSopClass() { 1042 return this.sopClass == null ? null : this.sopClass.getValue(); 1043 } 1044 1045 /** 1046 * @param value DICOM instance type. 1047 */ 1048 public ImagingStudySeriesInstanceComponent setSopClass(String value) { 1049 if (this.sopClass == null) 1050 this.sopClass = new OidType(); 1051 this.sopClass.setValue(value); 1052 return this; 1053 } 1054 1055 /** 1056 * @return {@link #type} (A human-friendly SOP Class name.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1057 */ 1058 public StringType getTypeElement() { 1059 if (this.type == null) 1060 if (Configuration.errorOnAutoCreate()) 1061 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.type"); 1062 else if (Configuration.doAutoCreate()) 1063 this.type = new StringType(); // bb 1064 return this.type; 1065 } 1066 1067 public boolean hasTypeElement() { 1068 return this.type != null && !this.type.isEmpty(); 1069 } 1070 1071 public boolean hasType() { 1072 return this.type != null && !this.type.isEmpty(); 1073 } 1074 1075 /** 1076 * @param value {@link #type} (A human-friendly SOP Class name.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1077 */ 1078 public ImagingStudySeriesInstanceComponent setTypeElement(StringType value) { 1079 this.type = value; 1080 return this; 1081 } 1082 1083 /** 1084 * @return A human-friendly SOP Class name. 1085 */ 1086 public String getType() { 1087 return this.type == null ? null : this.type.getValue(); 1088 } 1089 1090 /** 1091 * @param value A human-friendly SOP Class name. 1092 */ 1093 public ImagingStudySeriesInstanceComponent setType(String value) { 1094 if (Utilities.noString(value)) 1095 this.type = null; 1096 else { 1097 if (this.type == null) 1098 this.type = new StringType(); 1099 this.type.setValue(value); 1100 } 1101 return this; 1102 } 1103 1104 /** 1105 * @return {@link #title} (The description of the instance.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1106 */ 1107 public StringType getTitleElement() { 1108 if (this.title == null) 1109 if (Configuration.errorOnAutoCreate()) 1110 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.title"); 1111 else if (Configuration.doAutoCreate()) 1112 this.title = new StringType(); // bb 1113 return this.title; 1114 } 1115 1116 public boolean hasTitleElement() { 1117 return this.title != null && !this.title.isEmpty(); 1118 } 1119 1120 public boolean hasTitle() { 1121 return this.title != null && !this.title.isEmpty(); 1122 } 1123 1124 /** 1125 * @param value {@link #title} (The description of the instance.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1126 */ 1127 public ImagingStudySeriesInstanceComponent setTitleElement(StringType value) { 1128 this.title = value; 1129 return this; 1130 } 1131 1132 /** 1133 * @return The description of the instance. 1134 */ 1135 public String getTitle() { 1136 return this.title == null ? null : this.title.getValue(); 1137 } 1138 1139 /** 1140 * @param value The description of the instance. 1141 */ 1142 public ImagingStudySeriesInstanceComponent setTitle(String value) { 1143 if (Utilities.noString(value)) 1144 this.title = null; 1145 else { 1146 if (this.title == null) 1147 this.title = new StringType(); 1148 this.title.setValue(value); 1149 } 1150 return this; 1151 } 1152 1153 /** 1154 * @return {@link #content} (Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.) 1155 */ 1156 public List<Attachment> getContent() { 1157 if (this.content == null) 1158 this.content = new ArrayList<Attachment>(); 1159 return this.content; 1160 } 1161 1162 public boolean hasContent() { 1163 if (this.content == null) 1164 return false; 1165 for (Attachment item : this.content) 1166 if (!item.isEmpty()) 1167 return true; 1168 return false; 1169 } 1170 1171 /** 1172 * @return {@link #content} (Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.) 1173 */ 1174 // syntactic sugar 1175 public Attachment addContent() { //3 1176 Attachment t = new Attachment(); 1177 if (this.content == null) 1178 this.content = new ArrayList<Attachment>(); 1179 this.content.add(t); 1180 return t; 1181 } 1182 1183 // syntactic sugar 1184 public ImagingStudySeriesInstanceComponent addContent(Attachment t) { //3 1185 if (t == null) 1186 return this; 1187 if (this.content == null) 1188 this.content = new ArrayList<Attachment>(); 1189 this.content.add(t); 1190 return this; 1191 } 1192 1193 protected void listChildren(List<Property> childrenList) { 1194 super.listChildren(childrenList); 1195 childrenList.add(new Property("number", "unsignedInt", "The number of instance in the series.", 0, java.lang.Integer.MAX_VALUE, number)); 1196 childrenList.add(new Property("uid", "oid", "Formal identifier for this image or other content.", 0, java.lang.Integer.MAX_VALUE, uid)); 1197 childrenList.add(new Property("sopClass", "oid", "DICOM instance type.", 0, java.lang.Integer.MAX_VALUE, sopClass)); 1198 childrenList.add(new Property("type", "string", "A human-friendly SOP Class name.", 0, java.lang.Integer.MAX_VALUE, type)); 1199 childrenList.add(new Property("title", "string", "The description of the instance.", 0, java.lang.Integer.MAX_VALUE, title)); 1200 childrenList.add(new Property("content", "Attachment", "Content of the instance or a rendering thereof (e.g. a JPEG of an image, or an XML of a structured report). May be represented for example by inline encoding; by a URL reference to a WADO-RS service that makes the instance available; or to a FHIR Resource (e.g. Media, Document, etc.). Multiple content attachments may be used for alternate representations of the instance.", 0, java.lang.Integer.MAX_VALUE, content)); 1201 } 1202 1203 @Override 1204 public void setProperty(String name, Base value) throws FHIRException { 1205 if (name.equals("number")) 1206 this.number = castToUnsignedInt(value); // UnsignedIntType 1207 else if (name.equals("uid")) 1208 this.uid = castToOid(value); // OidType 1209 else if (name.equals("sopClass")) 1210 this.sopClass = castToOid(value); // OidType 1211 else if (name.equals("type")) 1212 this.type = castToString(value); // StringType 1213 else if (name.equals("title")) 1214 this.title = castToString(value); // StringType 1215 else if (name.equals("content")) 1216 this.getContent().add(castToAttachment(value)); 1217 else 1218 super.setProperty(name, value); 1219 } 1220 1221 @Override 1222 public Base addChild(String name) throws FHIRException { 1223 if (name.equals("number")) { 1224 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); 1225 } 1226 else if (name.equals("uid")) { 1227 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); 1228 } 1229 else if (name.equals("sopClass")) { 1230 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.sopClass"); 1231 } 1232 else if (name.equals("type")) { 1233 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.type"); 1234 } 1235 else if (name.equals("title")) { 1236 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.title"); 1237 } 1238 else if (name.equals("content")) { 1239 return addContent(); 1240 } 1241 else 1242 return super.addChild(name); 1243 } 1244 1245 public ImagingStudySeriesInstanceComponent copy() { 1246 ImagingStudySeriesInstanceComponent dst = new ImagingStudySeriesInstanceComponent(); 1247 copyValues(dst); 1248 dst.number = number == null ? null : number.copy(); 1249 dst.uid = uid == null ? null : uid.copy(); 1250 dst.sopClass = sopClass == null ? null : sopClass.copy(); 1251 dst.type = type == null ? null : type.copy(); 1252 dst.title = title == null ? null : title.copy(); 1253 if (content != null) { 1254 dst.content = new ArrayList<Attachment>(); 1255 for (Attachment i : content) 1256 dst.content.add(i.copy()); 1257 }; 1258 return dst; 1259 } 1260 1261 @Override 1262 public boolean equalsDeep(Base other) { 1263 if (!super.equalsDeep(other)) 1264 return false; 1265 if (!(other instanceof ImagingStudySeriesInstanceComponent)) 1266 return false; 1267 ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other; 1268 return compareDeep(number, o.number, true) && compareDeep(uid, o.uid, true) && compareDeep(sopClass, o.sopClass, true) 1269 && compareDeep(type, o.type, true) && compareDeep(title, o.title, true) && compareDeep(content, o.content, true) 1270 ; 1271 } 1272 1273 @Override 1274 public boolean equalsShallow(Base other) { 1275 if (!super.equalsShallow(other)) 1276 return false; 1277 if (!(other instanceof ImagingStudySeriesInstanceComponent)) 1278 return false; 1279 ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other; 1280 return compareValues(number, o.number, true) && compareValues(uid, o.uid, true) && compareValues(sopClass, o.sopClass, true) 1281 && compareValues(type, o.type, true) && compareValues(title, o.title, true); 1282 } 1283 1284 public boolean isEmpty() { 1285 return super.isEmpty() && (number == null || number.isEmpty()) && (uid == null || uid.isEmpty()) 1286 && (sopClass == null || sopClass.isEmpty()) && (type == null || type.isEmpty()) && (title == null || title.isEmpty()) 1287 && (content == null || content.isEmpty()); 1288 } 1289 1290 public String fhirType() { 1291 return "ImagingStudy.series.instance"; 1292 1293 } 1294 1295 } 1296 1297 /** 1298 * Date and Time the study started. 1299 */ 1300 @Child(name = "started", type = {DateTimeType.class}, order=0, min=0, max=1, modifier=false, summary=true) 1301 @Description(shortDefinition="When the study was started", formalDefinition="Date and Time the study started." ) 1302 protected DateTimeType started; 1303 1304 /** 1305 * The patient imaged in the study. 1306 */ 1307 @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) 1308 @Description(shortDefinition="Who the images are of", formalDefinition="The patient imaged in the study." ) 1309 protected Reference patient; 1310 1311 /** 1312 * The actual object that is the target of the reference (The patient imaged in the study.) 1313 */ 1314 protected Patient patientTarget; 1315 1316 /** 1317 * Formal identifier for the study. 1318 */ 1319 @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1320 @Description(shortDefinition="Formal identifier for the study", formalDefinition="Formal identifier for the study." ) 1321 protected OidType uid; 1322 1323 /** 1324 * Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf). 1325 */ 1326 @Child(name = "accession", type = {Identifier.class}, order=3, min=0, max=1, modifier=false, summary=true) 1327 @Description(shortDefinition="Related workflow identifier (\"Accession Number\")", formalDefinition="Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf)." ) 1328 protected Identifier accession; 1329 1330 /** 1331 * Other identifiers for the study. 1332 */ 1333 @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1334 @Description(shortDefinition="Other identifiers for the study", formalDefinition="Other identifiers for the study." ) 1335 protected List<Identifier> identifier; 1336 1337 /** 1338 * A list of the diagnostic orders that resulted in this imaging study being performed. 1339 */ 1340 @Child(name = "order", type = {DiagnosticOrder.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1341 @Description(shortDefinition="Order(s) that caused this study to be performed", formalDefinition="A list of the diagnostic orders that resulted in this imaging study being performed." ) 1342 protected List<Reference> order; 1343 /** 1344 * The actual objects that are the target of the reference (A list of the diagnostic orders that resulted in this imaging study being performed.) 1345 */ 1346 protected List<DiagnosticOrder> orderTarget; 1347 1348 1349 /** 1350 * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19). 1351 */ 1352 @Child(name = "modalityList", type = {Coding.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1353 @Description(shortDefinition="All series modality if actual acquisition modalities", formalDefinition="A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)." ) 1354 protected List<Coding> modalityList; 1355 1356 /** 1357 * The requesting/referring physician. 1358 */ 1359 @Child(name = "referrer", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=true) 1360 @Description(shortDefinition="Referring physician (0008,0090)", formalDefinition="The requesting/referring physician." ) 1361 protected Reference referrer; 1362 1363 /** 1364 * The actual object that is the target of the reference (The requesting/referring physician.) 1365 */ 1366 protected Practitioner referrerTarget; 1367 1368 /** 1369 * Availability of study (online, offline or nearline). 1370 */ 1371 @Child(name = "availability", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 1372 @Description(shortDefinition="ONLINE | OFFLINE | NEARLINE | UNAVAILABLE (0008,0056)", formalDefinition="Availability of study (online, offline or nearline)." ) 1373 protected Enumeration<InstanceAvailability> availability; 1374 1375 /** 1376 * WADO-RS resource where Study is available. 1377 */ 1378 @Child(name = "url", type = {UriType.class}, order=9, min=0, max=1, modifier=false, summary=true) 1379 @Description(shortDefinition="Retrieve URI", formalDefinition="WADO-RS resource where Study is available." ) 1380 protected UriType url; 1381 1382 /** 1383 * Number of Series in Study. 1384 */ 1385 @Child(name = "numberOfSeries", type = {UnsignedIntType.class}, order=10, min=1, max=1, modifier=false, summary=true) 1386 @Description(shortDefinition="Number of Study Related Series", formalDefinition="Number of Series in Study." ) 1387 protected UnsignedIntType numberOfSeries; 1388 1389 /** 1390 * Number of SOP Instances in Study. 1391 */ 1392 @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=11, min=1, max=1, modifier=false, summary=true) 1393 @Description(shortDefinition="Number of Study Related Instances", formalDefinition="Number of SOP Instances in Study." ) 1394 protected UnsignedIntType numberOfInstances; 1395 1396 /** 1397 * Type of procedure performed. 1398 */ 1399 @Child(name = "procedure", type = {Procedure.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1400 @Description(shortDefinition="Type of procedure performed", formalDefinition="Type of procedure performed." ) 1401 protected List<Reference> procedure; 1402 /** 1403 * The actual objects that are the target of the reference (Type of procedure performed.) 1404 */ 1405 protected List<Procedure> procedureTarget; 1406 1407 1408 /** 1409 * Who read the study and interpreted the images or other content. 1410 */ 1411 @Child(name = "interpreter", type = {Practitioner.class}, order=13, min=0, max=1, modifier=false, summary=true) 1412 @Description(shortDefinition="Who interpreted images", formalDefinition="Who read the study and interpreted the images or other content." ) 1413 protected Reference interpreter; 1414 1415 /** 1416 * The actual object that is the target of the reference (Who read the study and interpreted the images or other content.) 1417 */ 1418 protected Practitioner interpreterTarget; 1419 1420 /** 1421 * Institution-generated description or classification of the Study performed. 1422 */ 1423 @Child(name = "description", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=true) 1424 @Description(shortDefinition="Institution-generated description", formalDefinition="Institution-generated description or classification of the Study performed." ) 1425 protected StringType description; 1426 1427 /** 1428 * Each study has one or more series of images or other content. 1429 */ 1430 @Child(name = "series", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1431 @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of images or other content." ) 1432 protected List<ImagingStudySeriesComponent> series; 1433 1434 private static final long serialVersionUID = 1895046380L; 1435 1436 /* 1437 * Constructor 1438 */ 1439 public ImagingStudy() { 1440 super(); 1441 } 1442 1443 /* 1444 * Constructor 1445 */ 1446 public ImagingStudy(Reference patient, OidType uid, UnsignedIntType numberOfSeries, UnsignedIntType numberOfInstances) { 1447 super(); 1448 this.patient = patient; 1449 this.uid = uid; 1450 this.numberOfSeries = numberOfSeries; 1451 this.numberOfInstances = numberOfInstances; 1452 } 1453 1454 /** 1455 * @return {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value 1456 */ 1457 public DateTimeType getStartedElement() { 1458 if (this.started == null) 1459 if (Configuration.errorOnAutoCreate()) 1460 throw new Error("Attempt to auto-create ImagingStudy.started"); 1461 else if (Configuration.doAutoCreate()) 1462 this.started = new DateTimeType(); // bb 1463 return this.started; 1464 } 1465 1466 public boolean hasStartedElement() { 1467 return this.started != null && !this.started.isEmpty(); 1468 } 1469 1470 public boolean hasStarted() { 1471 return this.started != null && !this.started.isEmpty(); 1472 } 1473 1474 /** 1475 * @param value {@link #started} (Date and Time the study started.). This is the underlying object with id, value and extensions. The accessor "getStarted" gives direct access to the value 1476 */ 1477 public ImagingStudy setStartedElement(DateTimeType value) { 1478 this.started = value; 1479 return this; 1480 } 1481 1482 /** 1483 * @return Date and Time the study started. 1484 */ 1485 public Date getStarted() { 1486 return this.started == null ? null : this.started.getValue(); 1487 } 1488 1489 /** 1490 * @param value Date and Time the study started. 1491 */ 1492 public ImagingStudy setStarted(Date value) { 1493 if (value == null) 1494 this.started = null; 1495 else { 1496 if (this.started == null) 1497 this.started = new DateTimeType(); 1498 this.started.setValue(value); 1499 } 1500 return this; 1501 } 1502 1503 /** 1504 * @return {@link #patient} (The patient imaged in the study.) 1505 */ 1506 public Reference getPatient() { 1507 if (this.patient == null) 1508 if (Configuration.errorOnAutoCreate()) 1509 throw new Error("Attempt to auto-create ImagingStudy.patient"); 1510 else if (Configuration.doAutoCreate()) 1511 this.patient = new Reference(); // cc 1512 return this.patient; 1513 } 1514 1515 public boolean hasPatient() { 1516 return this.patient != null && !this.patient.isEmpty(); 1517 } 1518 1519 /** 1520 * @param value {@link #patient} (The patient imaged in the study.) 1521 */ 1522 public ImagingStudy setPatient(Reference value) { 1523 this.patient = value; 1524 return this; 1525 } 1526 1527 /** 1528 * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) 1529 */ 1530 public Patient getPatientTarget() { 1531 if (this.patientTarget == null) 1532 if (Configuration.errorOnAutoCreate()) 1533 throw new Error("Attempt to auto-create ImagingStudy.patient"); 1534 else if (Configuration.doAutoCreate()) 1535 this.patientTarget = new Patient(); // aa 1536 return this.patientTarget; 1537 } 1538 1539 /** 1540 * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The patient imaged in the study.) 1541 */ 1542 public ImagingStudy setPatientTarget(Patient value) { 1543 this.patientTarget = value; 1544 return this; 1545 } 1546 1547 /** 1548 * @return {@link #uid} (Formal identifier for the study.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 1549 */ 1550 public OidType getUidElement() { 1551 if (this.uid == null) 1552 if (Configuration.errorOnAutoCreate()) 1553 throw new Error("Attempt to auto-create ImagingStudy.uid"); 1554 else if (Configuration.doAutoCreate()) 1555 this.uid = new OidType(); // bb 1556 return this.uid; 1557 } 1558 1559 public boolean hasUidElement() { 1560 return this.uid != null && !this.uid.isEmpty(); 1561 } 1562 1563 public boolean hasUid() { 1564 return this.uid != null && !this.uid.isEmpty(); 1565 } 1566 1567 /** 1568 * @param value {@link #uid} (Formal identifier for the study.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 1569 */ 1570 public ImagingStudy setUidElement(OidType value) { 1571 this.uid = value; 1572 return this; 1573 } 1574 1575 /** 1576 * @return Formal identifier for the study. 1577 */ 1578 public String getUid() { 1579 return this.uid == null ? null : this.uid.getValue(); 1580 } 1581 1582 /** 1583 * @param value Formal identifier for the study. 1584 */ 1585 public ImagingStudy setUid(String value) { 1586 if (this.uid == null) 1587 this.uid = new OidType(); 1588 this.uid.setValue(value); 1589 return this; 1590 } 1591 1592 /** 1593 * @return {@link #accession} (Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).) 1594 */ 1595 public Identifier getAccession() { 1596 if (this.accession == null) 1597 if (Configuration.errorOnAutoCreate()) 1598 throw new Error("Attempt to auto-create ImagingStudy.accession"); 1599 else if (Configuration.doAutoCreate()) 1600 this.accession = new Identifier(); // cc 1601 return this.accession; 1602 } 1603 1604 public boolean hasAccession() { 1605 return this.accession != null && !this.accession.isEmpty(); 1606 } 1607 1608 /** 1609 * @param value {@link #accession} (Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).) 1610 */ 1611 public ImagingStudy setAccession(Identifier value) { 1612 this.accession = value; 1613 return this; 1614 } 1615 1616 /** 1617 * @return {@link #identifier} (Other identifiers for the study.) 1618 */ 1619 public List<Identifier> getIdentifier() { 1620 if (this.identifier == null) 1621 this.identifier = new ArrayList<Identifier>(); 1622 return this.identifier; 1623 } 1624 1625 public boolean hasIdentifier() { 1626 if (this.identifier == null) 1627 return false; 1628 for (Identifier item : this.identifier) 1629 if (!item.isEmpty()) 1630 return true; 1631 return false; 1632 } 1633 1634 /** 1635 * @return {@link #identifier} (Other identifiers for the study.) 1636 */ 1637 // syntactic sugar 1638 public Identifier addIdentifier() { //3 1639 Identifier t = new Identifier(); 1640 if (this.identifier == null) 1641 this.identifier = new ArrayList<Identifier>(); 1642 this.identifier.add(t); 1643 return t; 1644 } 1645 1646 // syntactic sugar 1647 public ImagingStudy addIdentifier(Identifier t) { //3 1648 if (t == null) 1649 return this; 1650 if (this.identifier == null) 1651 this.identifier = new ArrayList<Identifier>(); 1652 this.identifier.add(t); 1653 return this; 1654 } 1655 1656 /** 1657 * @return {@link #order} (A list of the diagnostic orders that resulted in this imaging study being performed.) 1658 */ 1659 public List<Reference> getOrder() { 1660 if (this.order == null) 1661 this.order = new ArrayList<Reference>(); 1662 return this.order; 1663 } 1664 1665 public boolean hasOrder() { 1666 if (this.order == null) 1667 return false; 1668 for (Reference item : this.order) 1669 if (!item.isEmpty()) 1670 return true; 1671 return false; 1672 } 1673 1674 /** 1675 * @return {@link #order} (A list of the diagnostic orders that resulted in this imaging study being performed.) 1676 */ 1677 // syntactic sugar 1678 public Reference addOrder() { //3 1679 Reference t = new Reference(); 1680 if (this.order == null) 1681 this.order = new ArrayList<Reference>(); 1682 this.order.add(t); 1683 return t; 1684 } 1685 1686 // syntactic sugar 1687 public ImagingStudy addOrder(Reference t) { //3 1688 if (t == null) 1689 return this; 1690 if (this.order == null) 1691 this.order = new ArrayList<Reference>(); 1692 this.order.add(t); 1693 return this; 1694 } 1695 1696 /** 1697 * @return {@link #order} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. A list of the diagnostic orders that resulted in this imaging study being performed.) 1698 */ 1699 public List<DiagnosticOrder> getOrderTarget() { 1700 if (this.orderTarget == null) 1701 this.orderTarget = new ArrayList<DiagnosticOrder>(); 1702 return this.orderTarget; 1703 } 1704 1705 // syntactic sugar 1706 /** 1707 * @return {@link #order} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. A list of the diagnostic orders that resulted in this imaging study being performed.) 1708 */ 1709 public DiagnosticOrder addOrderTarget() { 1710 DiagnosticOrder r = new DiagnosticOrder(); 1711 if (this.orderTarget == null) 1712 this.orderTarget = new ArrayList<DiagnosticOrder>(); 1713 this.orderTarget.add(r); 1714 return r; 1715 } 1716 1717 /** 1718 * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) 1719 */ 1720 public List<Coding> getModalityList() { 1721 if (this.modalityList == null) 1722 this.modalityList = new ArrayList<Coding>(); 1723 return this.modalityList; 1724 } 1725 1726 public boolean hasModalityList() { 1727 if (this.modalityList == null) 1728 return false; 1729 for (Coding item : this.modalityList) 1730 if (!item.isEmpty()) 1731 return true; 1732 return false; 1733 } 1734 1735 /** 1736 * @return {@link #modalityList} (A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).) 1737 */ 1738 // syntactic sugar 1739 public Coding addModalityList() { //3 1740 Coding t = new Coding(); 1741 if (this.modalityList == null) 1742 this.modalityList = new ArrayList<Coding>(); 1743 this.modalityList.add(t); 1744 return t; 1745 } 1746 1747 // syntactic sugar 1748 public ImagingStudy addModalityList(Coding t) { //3 1749 if (t == null) 1750 return this; 1751 if (this.modalityList == null) 1752 this.modalityList = new ArrayList<Coding>(); 1753 this.modalityList.add(t); 1754 return this; 1755 } 1756 1757 /** 1758 * @return {@link #referrer} (The requesting/referring physician.) 1759 */ 1760 public Reference getReferrer() { 1761 if (this.referrer == null) 1762 if (Configuration.errorOnAutoCreate()) 1763 throw new Error("Attempt to auto-create ImagingStudy.referrer"); 1764 else if (Configuration.doAutoCreate()) 1765 this.referrer = new Reference(); // cc 1766 return this.referrer; 1767 } 1768 1769 public boolean hasReferrer() { 1770 return this.referrer != null && !this.referrer.isEmpty(); 1771 } 1772 1773 /** 1774 * @param value {@link #referrer} (The requesting/referring physician.) 1775 */ 1776 public ImagingStudy setReferrer(Reference value) { 1777 this.referrer = value; 1778 return this; 1779 } 1780 1781 /** 1782 * @return {@link #referrer} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The requesting/referring physician.) 1783 */ 1784 public Practitioner getReferrerTarget() { 1785 if (this.referrerTarget == null) 1786 if (Configuration.errorOnAutoCreate()) 1787 throw new Error("Attempt to auto-create ImagingStudy.referrer"); 1788 else if (Configuration.doAutoCreate()) 1789 this.referrerTarget = new Practitioner(); // aa 1790 return this.referrerTarget; 1791 } 1792 1793 /** 1794 * @param value {@link #referrer} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The requesting/referring physician.) 1795 */ 1796 public ImagingStudy setReferrerTarget(Practitioner value) { 1797 this.referrerTarget = value; 1798 return this; 1799 } 1800 1801 /** 1802 * @return {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value 1803 */ 1804 public Enumeration<InstanceAvailability> getAvailabilityElement() { 1805 if (this.availability == null) 1806 if (Configuration.errorOnAutoCreate()) 1807 throw new Error("Attempt to auto-create ImagingStudy.availability"); 1808 else if (Configuration.doAutoCreate()) 1809 this.availability = new Enumeration<InstanceAvailability>(new InstanceAvailabilityEnumFactory()); // bb 1810 return this.availability; 1811 } 1812 1813 public boolean hasAvailabilityElement() { 1814 return this.availability != null && !this.availability.isEmpty(); 1815 } 1816 1817 public boolean hasAvailability() { 1818 return this.availability != null && !this.availability.isEmpty(); 1819 } 1820 1821 /** 1822 * @param value {@link #availability} (Availability of study (online, offline or nearline).). This is the underlying object with id, value and extensions. The accessor "getAvailability" gives direct access to the value 1823 */ 1824 public ImagingStudy setAvailabilityElement(Enumeration<InstanceAvailability> value) { 1825 this.availability = value; 1826 return this; 1827 } 1828 1829 /** 1830 * @return Availability of study (online, offline or nearline). 1831 */ 1832 public InstanceAvailability getAvailability() { 1833 return this.availability == null ? null : this.availability.getValue(); 1834 } 1835 1836 /** 1837 * @param value Availability of study (online, offline or nearline). 1838 */ 1839 public ImagingStudy setAvailability(InstanceAvailability value) { 1840 if (value == null) 1841 this.availability = null; 1842 else { 1843 if (this.availability == null) 1844 this.availability = new Enumeration<InstanceAvailability>(new InstanceAvailabilityEnumFactory()); 1845 this.availability.setValue(value); 1846 } 1847 return this; 1848 } 1849 1850 /** 1851 * @return {@link #url} (WADO-RS resource where Study is available.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1852 */ 1853 public UriType getUrlElement() { 1854 if (this.url == null) 1855 if (Configuration.errorOnAutoCreate()) 1856 throw new Error("Attempt to auto-create ImagingStudy.url"); 1857 else if (Configuration.doAutoCreate()) 1858 this.url = new UriType(); // bb 1859 return this.url; 1860 } 1861 1862 public boolean hasUrlElement() { 1863 return this.url != null && !this.url.isEmpty(); 1864 } 1865 1866 public boolean hasUrl() { 1867 return this.url != null && !this.url.isEmpty(); 1868 } 1869 1870 /** 1871 * @param value {@link #url} (WADO-RS resource where Study is available.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1872 */ 1873 public ImagingStudy setUrlElement(UriType value) { 1874 this.url = value; 1875 return this; 1876 } 1877 1878 /** 1879 * @return WADO-RS resource where Study is available. 1880 */ 1881 public String getUrl() { 1882 return this.url == null ? null : this.url.getValue(); 1883 } 1884 1885 /** 1886 * @param value WADO-RS resource where Study is available. 1887 */ 1888 public ImagingStudy setUrl(String value) { 1889 if (Utilities.noString(value)) 1890 this.url = null; 1891 else { 1892 if (this.url == null) 1893 this.url = new UriType(); 1894 this.url.setValue(value); 1895 } 1896 return this; 1897 } 1898 1899 /** 1900 * @return {@link #numberOfSeries} (Number of Series in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value 1901 */ 1902 public UnsignedIntType getNumberOfSeriesElement() { 1903 if (this.numberOfSeries == null) 1904 if (Configuration.errorOnAutoCreate()) 1905 throw new Error("Attempt to auto-create ImagingStudy.numberOfSeries"); 1906 else if (Configuration.doAutoCreate()) 1907 this.numberOfSeries = new UnsignedIntType(); // bb 1908 return this.numberOfSeries; 1909 } 1910 1911 public boolean hasNumberOfSeriesElement() { 1912 return this.numberOfSeries != null && !this.numberOfSeries.isEmpty(); 1913 } 1914 1915 public boolean hasNumberOfSeries() { 1916 return this.numberOfSeries != null && !this.numberOfSeries.isEmpty(); 1917 } 1918 1919 /** 1920 * @param value {@link #numberOfSeries} (Number of Series in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value 1921 */ 1922 public ImagingStudy setNumberOfSeriesElement(UnsignedIntType value) { 1923 this.numberOfSeries = value; 1924 return this; 1925 } 1926 1927 /** 1928 * @return Number of Series in Study. 1929 */ 1930 public int getNumberOfSeries() { 1931 return this.numberOfSeries == null || this.numberOfSeries.isEmpty() ? 0 : this.numberOfSeries.getValue(); 1932 } 1933 1934 /** 1935 * @param value Number of Series in Study. 1936 */ 1937 public ImagingStudy setNumberOfSeries(int value) { 1938 if (this.numberOfSeries == null) 1939 this.numberOfSeries = new UnsignedIntType(); 1940 this.numberOfSeries.setValue(value); 1941 return this; 1942 } 1943 1944 /** 1945 * @return {@link #numberOfInstances} (Number of SOP Instances in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 1946 */ 1947 public UnsignedIntType getNumberOfInstancesElement() { 1948 if (this.numberOfInstances == null) 1949 if (Configuration.errorOnAutoCreate()) 1950 throw new Error("Attempt to auto-create ImagingStudy.numberOfInstances"); 1951 else if (Configuration.doAutoCreate()) 1952 this.numberOfInstances = new UnsignedIntType(); // bb 1953 return this.numberOfInstances; 1954 } 1955 1956 public boolean hasNumberOfInstancesElement() { 1957 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 1958 } 1959 1960 public boolean hasNumberOfInstances() { 1961 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 1962 } 1963 1964 /** 1965 * @param value {@link #numberOfInstances} (Number of SOP Instances in Study.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 1966 */ 1967 public ImagingStudy setNumberOfInstancesElement(UnsignedIntType value) { 1968 this.numberOfInstances = value; 1969 return this; 1970 } 1971 1972 /** 1973 * @return Number of SOP Instances in Study. 1974 */ 1975 public int getNumberOfInstances() { 1976 return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue(); 1977 } 1978 1979 /** 1980 * @param value Number of SOP Instances in Study. 1981 */ 1982 public ImagingStudy setNumberOfInstances(int value) { 1983 if (this.numberOfInstances == null) 1984 this.numberOfInstances = new UnsignedIntType(); 1985 this.numberOfInstances.setValue(value); 1986 return this; 1987 } 1988 1989 /** 1990 * @return {@link #procedure} (Type of procedure performed.) 1991 */ 1992 public List<Reference> getProcedure() { 1993 if (this.procedure == null) 1994 this.procedure = new ArrayList<Reference>(); 1995 return this.procedure; 1996 } 1997 1998 public boolean hasProcedure() { 1999 if (this.procedure == null) 2000 return false; 2001 for (Reference item : this.procedure) 2002 if (!item.isEmpty()) 2003 return true; 2004 return false; 2005 } 2006 2007 /** 2008 * @return {@link #procedure} (Type of procedure performed.) 2009 */ 2010 // syntactic sugar 2011 public Reference addProcedure() { //3 2012 Reference t = new Reference(); 2013 if (this.procedure == null) 2014 this.procedure = new ArrayList<Reference>(); 2015 this.procedure.add(t); 2016 return t; 2017 } 2018 2019 // syntactic sugar 2020 public ImagingStudy addProcedure(Reference t) { //3 2021 if (t == null) 2022 return this; 2023 if (this.procedure == null) 2024 this.procedure = new ArrayList<Reference>(); 2025 this.procedure.add(t); 2026 return this; 2027 } 2028 2029 /** 2030 * @return {@link #procedure} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Type of procedure performed.) 2031 */ 2032 public List<Procedure> getProcedureTarget() { 2033 if (this.procedureTarget == null) 2034 this.procedureTarget = new ArrayList<Procedure>(); 2035 return this.procedureTarget; 2036 } 2037 2038 // syntactic sugar 2039 /** 2040 * @return {@link #procedure} (Add an actual object that is the target of the reference. The reference library doesn't use these, but you can use this to hold the resources if you resolvethemt. Type of procedure performed.) 2041 */ 2042 public Procedure addProcedureTarget() { 2043 Procedure r = new Procedure(); 2044 if (this.procedureTarget == null) 2045 this.procedureTarget = new ArrayList<Procedure>(); 2046 this.procedureTarget.add(r); 2047 return r; 2048 } 2049 2050 /** 2051 * @return {@link #interpreter} (Who read the study and interpreted the images or other content.) 2052 */ 2053 public Reference getInterpreter() { 2054 if (this.interpreter == null) 2055 if (Configuration.errorOnAutoCreate()) 2056 throw new Error("Attempt to auto-create ImagingStudy.interpreter"); 2057 else if (Configuration.doAutoCreate()) 2058 this.interpreter = new Reference(); // cc 2059 return this.interpreter; 2060 } 2061 2062 public boolean hasInterpreter() { 2063 return this.interpreter != null && !this.interpreter.isEmpty(); 2064 } 2065 2066 /** 2067 * @param value {@link #interpreter} (Who read the study and interpreted the images or other content.) 2068 */ 2069 public ImagingStudy setInterpreter(Reference value) { 2070 this.interpreter = value; 2071 return this; 2072 } 2073 2074 /** 2075 * @return {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) 2076 */ 2077 public Practitioner getInterpreterTarget() { 2078 if (this.interpreterTarget == null) 2079 if (Configuration.errorOnAutoCreate()) 2080 throw new Error("Attempt to auto-create ImagingStudy.interpreter"); 2081 else if (Configuration.doAutoCreate()) 2082 this.interpreterTarget = new Practitioner(); // aa 2083 return this.interpreterTarget; 2084 } 2085 2086 /** 2087 * @param value {@link #interpreter} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who read the study and interpreted the images or other content.) 2088 */ 2089 public ImagingStudy setInterpreterTarget(Practitioner value) { 2090 this.interpreterTarget = value; 2091 return this; 2092 } 2093 2094 /** 2095 * @return {@link #description} (Institution-generated description or classification of the Study performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2096 */ 2097 public StringType getDescriptionElement() { 2098 if (this.description == null) 2099 if (Configuration.errorOnAutoCreate()) 2100 throw new Error("Attempt to auto-create ImagingStudy.description"); 2101 else if (Configuration.doAutoCreate()) 2102 this.description = new StringType(); // bb 2103 return this.description; 2104 } 2105 2106 public boolean hasDescriptionElement() { 2107 return this.description != null && !this.description.isEmpty(); 2108 } 2109 2110 public boolean hasDescription() { 2111 return this.description != null && !this.description.isEmpty(); 2112 } 2113 2114 /** 2115 * @param value {@link #description} (Institution-generated description or classification of the Study performed.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2116 */ 2117 public ImagingStudy setDescriptionElement(StringType value) { 2118 this.description = value; 2119 return this; 2120 } 2121 2122 /** 2123 * @return Institution-generated description or classification of the Study performed. 2124 */ 2125 public String getDescription() { 2126 return this.description == null ? null : this.description.getValue(); 2127 } 2128 2129 /** 2130 * @param value Institution-generated description or classification of the Study performed. 2131 */ 2132 public ImagingStudy setDescription(String value) { 2133 if (Utilities.noString(value)) 2134 this.description = null; 2135 else { 2136 if (this.description == null) 2137 this.description = new StringType(); 2138 this.description.setValue(value); 2139 } 2140 return this; 2141 } 2142 2143 /** 2144 * @return {@link #series} (Each study has one or more series of images or other content.) 2145 */ 2146 public List<ImagingStudySeriesComponent> getSeries() { 2147 if (this.series == null) 2148 this.series = new ArrayList<ImagingStudySeriesComponent>(); 2149 return this.series; 2150 } 2151 2152 public boolean hasSeries() { 2153 if (this.series == null) 2154 return false; 2155 for (ImagingStudySeriesComponent item : this.series) 2156 if (!item.isEmpty()) 2157 return true; 2158 return false; 2159 } 2160 2161 /** 2162 * @return {@link #series} (Each study has one or more series of images or other content.) 2163 */ 2164 // syntactic sugar 2165 public ImagingStudySeriesComponent addSeries() { //3 2166 ImagingStudySeriesComponent t = new ImagingStudySeriesComponent(); 2167 if (this.series == null) 2168 this.series = new ArrayList<ImagingStudySeriesComponent>(); 2169 this.series.add(t); 2170 return t; 2171 } 2172 2173 // syntactic sugar 2174 public ImagingStudy addSeries(ImagingStudySeriesComponent t) { //3 2175 if (t == null) 2176 return this; 2177 if (this.series == null) 2178 this.series = new ArrayList<ImagingStudySeriesComponent>(); 2179 this.series.add(t); 2180 return this; 2181 } 2182 2183 protected void listChildren(List<Property> childrenList) { 2184 super.listChildren(childrenList); 2185 childrenList.add(new Property("started", "dateTime", "Date and Time the study started.", 0, java.lang.Integer.MAX_VALUE, started)); 2186 childrenList.add(new Property("patient", "Reference(Patient)", "The patient imaged in the study.", 0, java.lang.Integer.MAX_VALUE, patient)); 2187 childrenList.add(new Property("uid", "oid", "Formal identifier for the study.", 0, java.lang.Integer.MAX_VALUE, uid)); 2188 childrenList.add(new Property("accession", "Identifier", "Accession Number is an identifier related to some aspect of imaging workflow and data management. Usage may vary across different institutions. See for instance [IHE Radiology Technical Framework Volume 1 Appendix A](http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_TF_Rev13.0_Vol1_FT_2014-07-30.pdf).", 0, java.lang.Integer.MAX_VALUE, accession)); 2189 childrenList.add(new Property("identifier", "Identifier", "Other identifiers for the study.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2190 childrenList.add(new Property("order", "Reference(DiagnosticOrder)", "A list of the diagnostic orders that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, order)); 2191 childrenList.add(new Property("modalityList", "Coding", "A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19).", 0, java.lang.Integer.MAX_VALUE, modalityList)); 2192 childrenList.add(new Property("referrer", "Reference(Practitioner)", "The requesting/referring physician.", 0, java.lang.Integer.MAX_VALUE, referrer)); 2193 childrenList.add(new Property("availability", "code", "Availability of study (online, offline or nearline).", 0, java.lang.Integer.MAX_VALUE, availability)); 2194 childrenList.add(new Property("url", "uri", "WADO-RS resource where Study is available.", 0, java.lang.Integer.MAX_VALUE, url)); 2195 childrenList.add(new Property("numberOfSeries", "unsignedInt", "Number of Series in Study.", 0, java.lang.Integer.MAX_VALUE, numberOfSeries)); 2196 childrenList.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study.", 0, java.lang.Integer.MAX_VALUE, numberOfInstances)); 2197 childrenList.add(new Property("procedure", "Reference(Procedure)", "Type of procedure performed.", 0, java.lang.Integer.MAX_VALUE, procedure)); 2198 childrenList.add(new Property("interpreter", "Reference(Practitioner)", "Who read the study and interpreted the images or other content.", 0, java.lang.Integer.MAX_VALUE, interpreter)); 2199 childrenList.add(new Property("description", "string", "Institution-generated description or classification of the Study performed.", 0, java.lang.Integer.MAX_VALUE, description)); 2200 childrenList.add(new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series)); 2201 } 2202 2203 @Override 2204 public void setProperty(String name, Base value) throws FHIRException { 2205 if (name.equals("started")) 2206 this.started = castToDateTime(value); // DateTimeType 2207 else if (name.equals("patient")) 2208 this.patient = castToReference(value); // Reference 2209 else if (name.equals("uid")) 2210 this.uid = castToOid(value); // OidType 2211 else if (name.equals("accession")) 2212 this.accession = castToIdentifier(value); // Identifier 2213 else if (name.equals("identifier")) 2214 this.getIdentifier().add(castToIdentifier(value)); 2215 else if (name.equals("order")) 2216 this.getOrder().add(castToReference(value)); 2217 else if (name.equals("modalityList")) 2218 this.getModalityList().add(castToCoding(value)); 2219 else if (name.equals("referrer")) 2220 this.referrer = castToReference(value); // Reference 2221 else if (name.equals("availability")) 2222 this.availability = new InstanceAvailabilityEnumFactory().fromType(value); // Enumeration<InstanceAvailability> 2223 else if (name.equals("url")) 2224 this.url = castToUri(value); // UriType 2225 else if (name.equals("numberOfSeries")) 2226 this.numberOfSeries = castToUnsignedInt(value); // UnsignedIntType 2227 else if (name.equals("numberOfInstances")) 2228 this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType 2229 else if (name.equals("procedure")) 2230 this.getProcedure().add(castToReference(value)); 2231 else if (name.equals("interpreter")) 2232 this.interpreter = castToReference(value); // Reference 2233 else if (name.equals("description")) 2234 this.description = castToString(value); // StringType 2235 else if (name.equals("series")) 2236 this.getSeries().add((ImagingStudySeriesComponent) value); 2237 else 2238 super.setProperty(name, value); 2239 } 2240 2241 @Override 2242 public Base addChild(String name) throws FHIRException { 2243 if (name.equals("started")) { 2244 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); 2245 } 2246 else if (name.equals("patient")) { 2247 this.patient = new Reference(); 2248 return this.patient; 2249 } 2250 else if (name.equals("uid")) { 2251 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.uid"); 2252 } 2253 else if (name.equals("accession")) { 2254 this.accession = new Identifier(); 2255 return this.accession; 2256 } 2257 else if (name.equals("identifier")) { 2258 return addIdentifier(); 2259 } 2260 else if (name.equals("order")) { 2261 return addOrder(); 2262 } 2263 else if (name.equals("modalityList")) { 2264 return addModalityList(); 2265 } 2266 else if (name.equals("referrer")) { 2267 this.referrer = new Reference(); 2268 return this.referrer; 2269 } 2270 else if (name.equals("availability")) { 2271 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.availability"); 2272 } 2273 else if (name.equals("url")) { 2274 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.url"); 2275 } 2276 else if (name.equals("numberOfSeries")) { 2277 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfSeries"); 2278 } 2279 else if (name.equals("numberOfInstances")) { 2280 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfInstances"); 2281 } 2282 else if (name.equals("procedure")) { 2283 return addProcedure(); 2284 } 2285 else if (name.equals("interpreter")) { 2286 this.interpreter = new Reference(); 2287 return this.interpreter; 2288 } 2289 else if (name.equals("description")) { 2290 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); 2291 } 2292 else if (name.equals("series")) { 2293 return addSeries(); 2294 } 2295 else 2296 return super.addChild(name); 2297 } 2298 2299 public String fhirType() { 2300 return "ImagingStudy"; 2301 2302 } 2303 2304 public ImagingStudy copy() { 2305 ImagingStudy dst = new ImagingStudy(); 2306 copyValues(dst); 2307 dst.started = started == null ? null : started.copy(); 2308 dst.patient = patient == null ? null : patient.copy(); 2309 dst.uid = uid == null ? null : uid.copy(); 2310 dst.accession = accession == null ? null : accession.copy(); 2311 if (identifier != null) { 2312 dst.identifier = new ArrayList<Identifier>(); 2313 for (Identifier i : identifier) 2314 dst.identifier.add(i.copy()); 2315 }; 2316 if (order != null) { 2317 dst.order = new ArrayList<Reference>(); 2318 for (Reference i : order) 2319 dst.order.add(i.copy()); 2320 }; 2321 if (modalityList != null) { 2322 dst.modalityList = new ArrayList<Coding>(); 2323 for (Coding i : modalityList) 2324 dst.modalityList.add(i.copy()); 2325 }; 2326 dst.referrer = referrer == null ? null : referrer.copy(); 2327 dst.availability = availability == null ? null : availability.copy(); 2328 dst.url = url == null ? null : url.copy(); 2329 dst.numberOfSeries = numberOfSeries == null ? null : numberOfSeries.copy(); 2330 dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); 2331 if (procedure != null) { 2332 dst.procedure = new ArrayList<Reference>(); 2333 for (Reference i : procedure) 2334 dst.procedure.add(i.copy()); 2335 }; 2336 dst.interpreter = interpreter == null ? null : interpreter.copy(); 2337 dst.description = description == null ? null : description.copy(); 2338 if (series != null) { 2339 dst.series = new ArrayList<ImagingStudySeriesComponent>(); 2340 for (ImagingStudySeriesComponent i : series) 2341 dst.series.add(i.copy()); 2342 }; 2343 return dst; 2344 } 2345 2346 protected ImagingStudy typedCopy() { 2347 return copy(); 2348 } 2349 2350 @Override 2351 public boolean equalsDeep(Base other) { 2352 if (!super.equalsDeep(other)) 2353 return false; 2354 if (!(other instanceof ImagingStudy)) 2355 return false; 2356 ImagingStudy o = (ImagingStudy) other; 2357 return compareDeep(started, o.started, true) && compareDeep(patient, o.patient, true) && compareDeep(uid, o.uid, true) 2358 && compareDeep(accession, o.accession, true) && compareDeep(identifier, o.identifier, true) && compareDeep(order, o.order, true) 2359 && compareDeep(modalityList, o.modalityList, true) && compareDeep(referrer, o.referrer, true) && compareDeep(availability, o.availability, true) 2360 && compareDeep(url, o.url, true) && compareDeep(numberOfSeries, o.numberOfSeries, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) 2361 && compareDeep(procedure, o.procedure, true) && compareDeep(interpreter, o.interpreter, true) && compareDeep(description, o.description, true) 2362 && compareDeep(series, o.series, true); 2363 } 2364 2365 @Override 2366 public boolean equalsShallow(Base other) { 2367 if (!super.equalsShallow(other)) 2368 return false; 2369 if (!(other instanceof ImagingStudy)) 2370 return false; 2371 ImagingStudy o = (ImagingStudy) other; 2372 return compareValues(started, o.started, true) && compareValues(uid, o.uid, true) && compareValues(availability, o.availability, true) 2373 && compareValues(url, o.url, true) && compareValues(numberOfSeries, o.numberOfSeries, true) && compareValues(numberOfInstances, o.numberOfInstances, true) 2374 && compareValues(description, o.description, true); 2375 } 2376 2377 public boolean isEmpty() { 2378 return super.isEmpty() && (started == null || started.isEmpty()) && (patient == null || patient.isEmpty()) 2379 && (uid == null || uid.isEmpty()) && (accession == null || accession.isEmpty()) && (identifier == null || identifier.isEmpty()) 2380 && (order == null || order.isEmpty()) && (modalityList == null || modalityList.isEmpty()) 2381 && (referrer == null || referrer.isEmpty()) && (availability == null || availability.isEmpty()) 2382 && (url == null || url.isEmpty()) && (numberOfSeries == null || numberOfSeries.isEmpty()) 2383 && (numberOfInstances == null || numberOfInstances.isEmpty()) && (procedure == null || procedure.isEmpty()) 2384 && (interpreter == null || interpreter.isEmpty()) && (description == null || description.isEmpty()) 2385 && (series == null || series.isEmpty()); 2386 } 2387 2388 @Override 2389 public ResourceType getResourceType() { 2390 return ResourceType.ImagingStudy; 2391 } 2392 2393 @SearchParamDefinition(name="uid", path="ImagingStudy.series.instance.uid", description="The instance unique identifier", type="uri" ) 2394 public static final String SP_UID = "uid"; 2395 @SearchParamDefinition(name="study", path="ImagingStudy.uid", description="The study identifier for the image", type="uri" ) 2396 public static final String SP_STUDY = "study"; 2397 @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopClass", description="The type of the instance", type="uri" ) 2398 public static final String SP_DICOMCLASS = "dicom-class"; 2399 @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the series", type="token" ) 2400 public static final String SP_MODALITY = "modality"; 2401 @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="The body site studied", type="token" ) 2402 public static final String SP_BODYSITE = "bodysite"; 2403 @SearchParamDefinition(name="patient", path="ImagingStudy.patient", description="Who the study is about", type="reference" ) 2404 public static final String SP_PATIENT = "patient"; 2405 @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The identifier of the series of images", type="uri" ) 2406 public static final String SP_SERIES = "series"; 2407 @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" ) 2408 public static final String SP_STARTED = "started"; 2409 @SearchParamDefinition(name="accession", path="ImagingStudy.accession", description="The accession identifier for the study", type="token" ) 2410 public static final String SP_ACCESSION = "accession"; 2411 @SearchParamDefinition(name="order", path="ImagingStudy.order", description="The order for the image", type="reference" ) 2412 public static final String SP_ORDER = "order"; 2413 2414}