001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * 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. 047 */ 048@ResourceDef(name="ImagingStudy", profile="http://hl7.org/fhir/Profile/ImagingStudy") 049public class ImagingStudy extends DomainResource { 050 051 public enum ImagingStudyStatus { 052 /** 053 * The existence of the imaging study is registered, but there is nothing yet available. 054 */ 055 REGISTERED, 056 /** 057 * At least one instance has been associated with this imaging study. 058 */ 059 AVAILABLE, 060 /** 061 * The imaging study is unavailable because the imaging study was not started or not completed (also sometimes called "aborted"). 062 */ 063 CANCELLED, 064 /** 065 * The imaging study has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".) 066 */ 067 ENTEREDINERROR, 068 /** 069 * The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. 070 */ 071 UNKNOWN, 072 /** 073 * added to help the parsers with the generic types 074 */ 075 NULL; 076 public static ImagingStudyStatus fromCode(String codeString) throws FHIRException { 077 if (codeString == null || "".equals(codeString)) 078 return null; 079 if ("registered".equals(codeString)) 080 return REGISTERED; 081 if ("available".equals(codeString)) 082 return AVAILABLE; 083 if ("cancelled".equals(codeString)) 084 return CANCELLED; 085 if ("entered-in-error".equals(codeString)) 086 return ENTEREDINERROR; 087 if ("unknown".equals(codeString)) 088 return UNKNOWN; 089 if (Configuration.isAcceptInvalidEnums()) 090 return null; 091 else 092 throw new FHIRException("Unknown ImagingStudyStatus code '"+codeString+"'"); 093 } 094 public String toCode() { 095 switch (this) { 096 case REGISTERED: return "registered"; 097 case AVAILABLE: return "available"; 098 case CANCELLED: return "cancelled"; 099 case ENTEREDINERROR: return "entered-in-error"; 100 case UNKNOWN: return "unknown"; 101 default: return "?"; 102 } 103 } 104 public String getSystem() { 105 switch (this) { 106 case REGISTERED: return "http://hl7.org/fhir/imagingstudy-status"; 107 case AVAILABLE: return "http://hl7.org/fhir/imagingstudy-status"; 108 case CANCELLED: return "http://hl7.org/fhir/imagingstudy-status"; 109 case ENTEREDINERROR: return "http://hl7.org/fhir/imagingstudy-status"; 110 case UNKNOWN: return "http://hl7.org/fhir/imagingstudy-status"; 111 default: return "?"; 112 } 113 } 114 public String getDefinition() { 115 switch (this) { 116 case REGISTERED: return "The existence of the imaging study is registered, but there is nothing yet available."; 117 case AVAILABLE: return "At least one instance has been associated with this imaging study."; 118 case CANCELLED: return "The imaging study is unavailable because the imaging study was not started or not completed (also sometimes called \"aborted\")."; 119 case ENTEREDINERROR: return "The imaging study has been withdrawn following a previous final release. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be \"cancelled\" rather than \"entered-in-error\".)"; 120 case UNKNOWN: return "The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for \"other\" - one of the listed statuses is presumed to apply, it's just not known which one."; 121 default: return "?"; 122 } 123 } 124 public String getDisplay() { 125 switch (this) { 126 case REGISTERED: return "Registered"; 127 case AVAILABLE: return "Available"; 128 case CANCELLED: return "Cancelled"; 129 case ENTEREDINERROR: return "Entered in Error"; 130 case UNKNOWN: return "Unknown"; 131 default: return "?"; 132 } 133 } 134 } 135 136 public static class ImagingStudyStatusEnumFactory implements EnumFactory<ImagingStudyStatus> { 137 public ImagingStudyStatus fromCode(String codeString) throws IllegalArgumentException { 138 if (codeString == null || "".equals(codeString)) 139 if (codeString == null || "".equals(codeString)) 140 return null; 141 if ("registered".equals(codeString)) 142 return ImagingStudyStatus.REGISTERED; 143 if ("available".equals(codeString)) 144 return ImagingStudyStatus.AVAILABLE; 145 if ("cancelled".equals(codeString)) 146 return ImagingStudyStatus.CANCELLED; 147 if ("entered-in-error".equals(codeString)) 148 return ImagingStudyStatus.ENTEREDINERROR; 149 if ("unknown".equals(codeString)) 150 return ImagingStudyStatus.UNKNOWN; 151 throw new IllegalArgumentException("Unknown ImagingStudyStatus code '"+codeString+"'"); 152 } 153 public Enumeration<ImagingStudyStatus> fromType(Base code) throws FHIRException { 154 if (code == null) 155 return null; 156 if (code.isEmpty()) 157 return new Enumeration<ImagingStudyStatus>(this); 158 String codeString = ((PrimitiveType) code).asStringValue(); 159 if (codeString == null || "".equals(codeString)) 160 return null; 161 if ("registered".equals(codeString)) 162 return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.REGISTERED); 163 if ("available".equals(codeString)) 164 return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.AVAILABLE); 165 if ("cancelled".equals(codeString)) 166 return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.CANCELLED); 167 if ("entered-in-error".equals(codeString)) 168 return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.ENTEREDINERROR); 169 if ("unknown".equals(codeString)) 170 return new Enumeration<ImagingStudyStatus>(this, ImagingStudyStatus.UNKNOWN); 171 throw new FHIRException("Unknown ImagingStudyStatus code '"+codeString+"'"); 172 } 173 public String toCode(ImagingStudyStatus code) { 174 if (code == ImagingStudyStatus.REGISTERED) 175 return "registered"; 176 if (code == ImagingStudyStatus.AVAILABLE) 177 return "available"; 178 if (code == ImagingStudyStatus.CANCELLED) 179 return "cancelled"; 180 if (code == ImagingStudyStatus.ENTEREDINERROR) 181 return "entered-in-error"; 182 if (code == ImagingStudyStatus.UNKNOWN) 183 return "unknown"; 184 return "?"; 185 } 186 public String toSystem(ImagingStudyStatus code) { 187 return code.getSystem(); 188 } 189 } 190 191 @Block() 192 public static class ImagingStudySeriesComponent extends BackboneElement implements IBaseBackboneElement { 193 /** 194 * Formal identifier for this series. 195 */ 196 @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=true) 197 @Description(shortDefinition="Formal DICOM identifier for this series", formalDefinition="Formal identifier for this series." ) 198 protected Identifier identifier; 199 200 /** 201 * The numeric identifier of this series in the study. 202 */ 203 @Child(name = "number", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=true) 204 @Description(shortDefinition="Numeric identifier of this series", formalDefinition="The numeric identifier of this series in the study." ) 205 protected UnsignedIntType number; 206 207 /** 208 * The modality of this series sequence. 209 */ 210 @Child(name = "modality", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=true) 211 @Description(shortDefinition="The modality of the instances in the series", formalDefinition="The modality of this series sequence." ) 212 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_29.html") 213 protected Coding modality; 214 215 /** 216 * A description of the series. 217 */ 218 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 219 @Description(shortDefinition="A short human readable summary of the series", formalDefinition="A description of the series." ) 220 protected StringType description; 221 222 /** 223 * Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present. 224 */ 225 @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=5, min=0, max=1, modifier=false, summary=true) 226 @Description(shortDefinition="Number of Series Related Instances", formalDefinition="Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present." ) 227 protected UnsignedIntType numberOfInstances; 228 229 /** 230 * The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType. 231 */ 232 @Child(name = "endpoint", type = {Endpoint.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 233 @Description(shortDefinition="Series access endpoint", formalDefinition="The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType." ) 234 protected List<Reference> endpoint; 235 /** 236 * The actual objects that are the target of the reference (The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.) 237 */ 238 protected List<Endpoint> endpointTarget; 239 240 241 /** 242 * The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality. 243 */ 244 @Child(name = "bodySite", type = {Coding.class}, order=7, min=0, max=1, modifier=false, summary=true) 245 @Description(shortDefinition="Body part examined", formalDefinition="The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality." ) 246 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site") 247 protected Coding bodySite; 248 249 /** 250 * The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite. 251 */ 252 @Child(name = "laterality", type = {Coding.class}, order=8, min=0, max=1, modifier=false, summary=true) 253 @Description(shortDefinition="Body part laterality", formalDefinition="The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite." ) 254 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bodysite-laterality") 255 protected Coding laterality; 256 257 /** 258 * The specimen imaged, e.g., for whole slide imaging of a biopsy. 259 */ 260 @Child(name = "specimen", type = {Specimen.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 261 @Description(shortDefinition="Specimen imaged", formalDefinition="The specimen imaged, e.g., for whole slide imaging of a biopsy." ) 262 protected List<Reference> specimen; 263 /** 264 * The actual objects that are the target of the reference (The specimen imaged, e.g., for whole slide imaging of a biopsy.) 265 */ 266 protected List<Specimen> specimenTarget; 267 268 269 /** 270 * The date and time the series was started. 271 */ 272 @Child(name = "started", type = {DateTimeType.class}, order=10, min=0, max=1, modifier=false, summary=true) 273 @Description(shortDefinition="When the series started", formalDefinition="The date and time the series was started." ) 274 protected DateTimeType started; 275 276 /** 277 * Indicates who or what performed the series and how they were involved. 278 */ 279 @Child(name = "performer", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 280 @Description(shortDefinition="Who performed the series", formalDefinition="Indicates who or what performed the series and how they were involved." ) 281 protected List<ImagingStudySeriesPerformerComponent> performer; 282 283 /** 284 * A single SOP instance within the series, e.g. an image, or presentation state. 285 */ 286 @Child(name = "instance", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 287 @Description(shortDefinition="A single SOP instance from the series", formalDefinition="A single SOP instance within the series, e.g. an image, or presentation state." ) 288 protected List<ImagingStudySeriesInstanceComponent> instance; 289 290 private static final long serialVersionUID = 1215869106L; 291 292 /** 293 * Constructor 294 */ 295 public ImagingStudySeriesComponent() { 296 super(); 297 } 298 299 /** 300 * Constructor 301 */ 302 public ImagingStudySeriesComponent(Identifier identifier, Coding modality) { 303 super(); 304 this.identifier = identifier; 305 this.modality = modality; 306 } 307 308 /** 309 * @return {@link #identifier} (Formal identifier for this series.) 310 */ 311 public Identifier getIdentifier() { 312 if (this.identifier == null) 313 if (Configuration.errorOnAutoCreate()) 314 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.identifier"); 315 else if (Configuration.doAutoCreate()) 316 this.identifier = new Identifier(); // cc 317 return this.identifier; 318 } 319 320 public boolean hasIdentifier() { 321 return this.identifier != null && !this.identifier.isEmpty(); 322 } 323 324 /** 325 * @param value {@link #identifier} (Formal identifier for this series.) 326 */ 327 public ImagingStudySeriesComponent setIdentifier(Identifier value) { 328 this.identifier = value; 329 return this; 330 } 331 332 /** 333 * @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 334 */ 335 public UnsignedIntType getNumberElement() { 336 if (this.number == null) 337 if (Configuration.errorOnAutoCreate()) 338 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.number"); 339 else if (Configuration.doAutoCreate()) 340 this.number = new UnsignedIntType(); // bb 341 return this.number; 342 } 343 344 public boolean hasNumberElement() { 345 return this.number != null && !this.number.isEmpty(); 346 } 347 348 public boolean hasNumber() { 349 return this.number != null && !this.number.isEmpty(); 350 } 351 352 /** 353 * @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 354 */ 355 public ImagingStudySeriesComponent setNumberElement(UnsignedIntType value) { 356 this.number = value; 357 return this; 358 } 359 360 /** 361 * @return The numeric identifier of this series in the study. 362 */ 363 public int getNumber() { 364 return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); 365 } 366 367 /** 368 * @param value The numeric identifier of this series in the study. 369 */ 370 public ImagingStudySeriesComponent setNumber(int value) { 371 if (this.number == null) 372 this.number = new UnsignedIntType(); 373 this.number.setValue(value); 374 return this; 375 } 376 377 /** 378 * @return {@link #modality} (The modality of this series sequence.) 379 */ 380 public Coding getModality() { 381 if (this.modality == null) 382 if (Configuration.errorOnAutoCreate()) 383 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.modality"); 384 else if (Configuration.doAutoCreate()) 385 this.modality = new Coding(); // cc 386 return this.modality; 387 } 388 389 public boolean hasModality() { 390 return this.modality != null && !this.modality.isEmpty(); 391 } 392 393 /** 394 * @param value {@link #modality} (The modality of this series sequence.) 395 */ 396 public ImagingStudySeriesComponent setModality(Coding value) { 397 this.modality = value; 398 return this; 399 } 400 401 /** 402 * @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 403 */ 404 public StringType getDescriptionElement() { 405 if (this.description == null) 406 if (Configuration.errorOnAutoCreate()) 407 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.description"); 408 else if (Configuration.doAutoCreate()) 409 this.description = new StringType(); // bb 410 return this.description; 411 } 412 413 public boolean hasDescriptionElement() { 414 return this.description != null && !this.description.isEmpty(); 415 } 416 417 public boolean hasDescription() { 418 return this.description != null && !this.description.isEmpty(); 419 } 420 421 /** 422 * @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 423 */ 424 public ImagingStudySeriesComponent setDescriptionElement(StringType value) { 425 this.description = value; 426 return this; 427 } 428 429 /** 430 * @return A description of the series. 431 */ 432 public String getDescription() { 433 return this.description == null ? null : this.description.getValue(); 434 } 435 436 /** 437 * @param value A description of the series. 438 */ 439 public ImagingStudySeriesComponent setDescription(String value) { 440 if (Utilities.noString(value)) 441 this.description = null; 442 else { 443 if (this.description == null) 444 this.description = new StringType(); 445 this.description.setValue(value); 446 } 447 return this; 448 } 449 450 /** 451 * @return {@link #numberOfInstances} (Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 452 */ 453 public UnsignedIntType getNumberOfInstancesElement() { 454 if (this.numberOfInstances == null) 455 if (Configuration.errorOnAutoCreate()) 456 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.numberOfInstances"); 457 else if (Configuration.doAutoCreate()) 458 this.numberOfInstances = new UnsignedIntType(); // bb 459 return this.numberOfInstances; 460 } 461 462 public boolean hasNumberOfInstancesElement() { 463 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 464 } 465 466 public boolean hasNumberOfInstances() { 467 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 468 } 469 470 /** 471 * @param value {@link #numberOfInstances} (Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 472 */ 473 public ImagingStudySeriesComponent setNumberOfInstancesElement(UnsignedIntType value) { 474 this.numberOfInstances = value; 475 return this; 476 } 477 478 /** 479 * @return Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present. 480 */ 481 public int getNumberOfInstances() { 482 return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue(); 483 } 484 485 /** 486 * @param value Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present. 487 */ 488 public ImagingStudySeriesComponent setNumberOfInstances(int value) { 489 if (this.numberOfInstances == null) 490 this.numberOfInstances = new UnsignedIntType(); 491 this.numberOfInstances.setValue(value); 492 return this; 493 } 494 495 /** 496 * @return {@link #endpoint} (The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.) 497 */ 498 public List<Reference> getEndpoint() { 499 if (this.endpoint == null) 500 this.endpoint = new ArrayList<Reference>(); 501 return this.endpoint; 502 } 503 504 /** 505 * @return Returns a reference to <code>this</code> for easy method chaining 506 */ 507 public ImagingStudySeriesComponent setEndpoint(List<Reference> theEndpoint) { 508 this.endpoint = theEndpoint; 509 return this; 510 } 511 512 public boolean hasEndpoint() { 513 if (this.endpoint == null) 514 return false; 515 for (Reference item : this.endpoint) 516 if (!item.isEmpty()) 517 return true; 518 return false; 519 } 520 521 public Reference addEndpoint() { //3 522 Reference t = new Reference(); 523 if (this.endpoint == null) 524 this.endpoint = new ArrayList<Reference>(); 525 this.endpoint.add(t); 526 return t; 527 } 528 529 public ImagingStudySeriesComponent addEndpoint(Reference t) { //3 530 if (t == null) 531 return this; 532 if (this.endpoint == null) 533 this.endpoint = new ArrayList<Reference>(); 534 this.endpoint.add(t); 535 return this; 536 } 537 538 /** 539 * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist 540 */ 541 public Reference getEndpointFirstRep() { 542 if (getEndpoint().isEmpty()) { 543 addEndpoint(); 544 } 545 return getEndpoint().get(0); 546 } 547 548 /** 549 * @deprecated Use Reference#setResource(IBaseResource) instead 550 */ 551 @Deprecated 552 public List<Endpoint> getEndpointTarget() { 553 if (this.endpointTarget == null) 554 this.endpointTarget = new ArrayList<Endpoint>(); 555 return this.endpointTarget; 556 } 557 558 /** 559 * @deprecated Use Reference#setResource(IBaseResource) instead 560 */ 561 @Deprecated 562 public Endpoint addEndpointTarget() { 563 Endpoint r = new Endpoint(); 564 if (this.endpointTarget == null) 565 this.endpointTarget = new ArrayList<Endpoint>(); 566 this.endpointTarget.add(r); 567 return r; 568 } 569 570 /** 571 * @return {@link #bodySite} (The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.) 572 */ 573 public Coding getBodySite() { 574 if (this.bodySite == null) 575 if (Configuration.errorOnAutoCreate()) 576 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.bodySite"); 577 else if (Configuration.doAutoCreate()) 578 this.bodySite = new Coding(); // cc 579 return this.bodySite; 580 } 581 582 public boolean hasBodySite() { 583 return this.bodySite != null && !this.bodySite.isEmpty(); 584 } 585 586 /** 587 * @param value {@link #bodySite} (The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.) 588 */ 589 public ImagingStudySeriesComponent setBodySite(Coding value) { 590 this.bodySite = value; 591 return this; 592 } 593 594 /** 595 * @return {@link #laterality} (The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.) 596 */ 597 public Coding getLaterality() { 598 if (this.laterality == null) 599 if (Configuration.errorOnAutoCreate()) 600 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.laterality"); 601 else if (Configuration.doAutoCreate()) 602 this.laterality = new Coding(); // cc 603 return this.laterality; 604 } 605 606 public boolean hasLaterality() { 607 return this.laterality != null && !this.laterality.isEmpty(); 608 } 609 610 /** 611 * @param value {@link #laterality} (The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.) 612 */ 613 public ImagingStudySeriesComponent setLaterality(Coding value) { 614 this.laterality = value; 615 return this; 616 } 617 618 /** 619 * @return {@link #specimen} (The specimen imaged, e.g., for whole slide imaging of a biopsy.) 620 */ 621 public List<Reference> getSpecimen() { 622 if (this.specimen == null) 623 this.specimen = new ArrayList<Reference>(); 624 return this.specimen; 625 } 626 627 /** 628 * @return Returns a reference to <code>this</code> for easy method chaining 629 */ 630 public ImagingStudySeriesComponent setSpecimen(List<Reference> theSpecimen) { 631 this.specimen = theSpecimen; 632 return this; 633 } 634 635 public boolean hasSpecimen() { 636 if (this.specimen == null) 637 return false; 638 for (Reference item : this.specimen) 639 if (!item.isEmpty()) 640 return true; 641 return false; 642 } 643 644 public Reference addSpecimen() { //3 645 Reference t = new Reference(); 646 if (this.specimen == null) 647 this.specimen = new ArrayList<Reference>(); 648 this.specimen.add(t); 649 return t; 650 } 651 652 public ImagingStudySeriesComponent addSpecimen(Reference t) { //3 653 if (t == null) 654 return this; 655 if (this.specimen == null) 656 this.specimen = new ArrayList<Reference>(); 657 this.specimen.add(t); 658 return this; 659 } 660 661 /** 662 * @return The first repetition of repeating field {@link #specimen}, creating it if it does not already exist 663 */ 664 public Reference getSpecimenFirstRep() { 665 if (getSpecimen().isEmpty()) { 666 addSpecimen(); 667 } 668 return getSpecimen().get(0); 669 } 670 671 /** 672 * @deprecated Use Reference#setResource(IBaseResource) instead 673 */ 674 @Deprecated 675 public List<Specimen> getSpecimenTarget() { 676 if (this.specimenTarget == null) 677 this.specimenTarget = new ArrayList<Specimen>(); 678 return this.specimenTarget; 679 } 680 681 /** 682 * @deprecated Use Reference#setResource(IBaseResource) instead 683 */ 684 @Deprecated 685 public Specimen addSpecimenTarget() { 686 Specimen r = new Specimen(); 687 if (this.specimenTarget == null) 688 this.specimenTarget = new ArrayList<Specimen>(); 689 this.specimenTarget.add(r); 690 return r; 691 } 692 693 /** 694 * @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 695 */ 696 public DateTimeType getStartedElement() { 697 if (this.started == null) 698 if (Configuration.errorOnAutoCreate()) 699 throw new Error("Attempt to auto-create ImagingStudySeriesComponent.started"); 700 else if (Configuration.doAutoCreate()) 701 this.started = new DateTimeType(); // bb 702 return this.started; 703 } 704 705 public boolean hasStartedElement() { 706 return this.started != null && !this.started.isEmpty(); 707 } 708 709 public boolean hasStarted() { 710 return this.started != null && !this.started.isEmpty(); 711 } 712 713 /** 714 * @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 715 */ 716 public ImagingStudySeriesComponent setStartedElement(DateTimeType value) { 717 this.started = value; 718 return this; 719 } 720 721 /** 722 * @return The date and time the series was started. 723 */ 724 public Date getStarted() { 725 return this.started == null ? null : this.started.getValue(); 726 } 727 728 /** 729 * @param value The date and time the series was started. 730 */ 731 public ImagingStudySeriesComponent setStarted(Date value) { 732 if (value == null) 733 this.started = null; 734 else { 735 if (this.started == null) 736 this.started = new DateTimeType(); 737 this.started.setValue(value); 738 } 739 return this; 740 } 741 742 /** 743 * @return {@link #performer} (Indicates who or what performed the series and how they were involved.) 744 */ 745 public List<ImagingStudySeriesPerformerComponent> getPerformer() { 746 if (this.performer == null) 747 this.performer = new ArrayList<ImagingStudySeriesPerformerComponent>(); 748 return this.performer; 749 } 750 751 /** 752 * @return Returns a reference to <code>this</code> for easy method chaining 753 */ 754 public ImagingStudySeriesComponent setPerformer(List<ImagingStudySeriesPerformerComponent> thePerformer) { 755 this.performer = thePerformer; 756 return this; 757 } 758 759 public boolean hasPerformer() { 760 if (this.performer == null) 761 return false; 762 for (ImagingStudySeriesPerformerComponent item : this.performer) 763 if (!item.isEmpty()) 764 return true; 765 return false; 766 } 767 768 public ImagingStudySeriesPerformerComponent addPerformer() { //3 769 ImagingStudySeriesPerformerComponent t = new ImagingStudySeriesPerformerComponent(); 770 if (this.performer == null) 771 this.performer = new ArrayList<ImagingStudySeriesPerformerComponent>(); 772 this.performer.add(t); 773 return t; 774 } 775 776 public ImagingStudySeriesComponent addPerformer(ImagingStudySeriesPerformerComponent t) { //3 777 if (t == null) 778 return this; 779 if (this.performer == null) 780 this.performer = new ArrayList<ImagingStudySeriesPerformerComponent>(); 781 this.performer.add(t); 782 return this; 783 } 784 785 /** 786 * @return The first repetition of repeating field {@link #performer}, creating it if it does not already exist 787 */ 788 public ImagingStudySeriesPerformerComponent getPerformerFirstRep() { 789 if (getPerformer().isEmpty()) { 790 addPerformer(); 791 } 792 return getPerformer().get(0); 793 } 794 795 /** 796 * @return {@link #instance} (A single SOP instance within the series, e.g. an image, or presentation state.) 797 */ 798 public List<ImagingStudySeriesInstanceComponent> getInstance() { 799 if (this.instance == null) 800 this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 801 return this.instance; 802 } 803 804 /** 805 * @return Returns a reference to <code>this</code> for easy method chaining 806 */ 807 public ImagingStudySeriesComponent setInstance(List<ImagingStudySeriesInstanceComponent> theInstance) { 808 this.instance = theInstance; 809 return this; 810 } 811 812 public boolean hasInstance() { 813 if (this.instance == null) 814 return false; 815 for (ImagingStudySeriesInstanceComponent item : this.instance) 816 if (!item.isEmpty()) 817 return true; 818 return false; 819 } 820 821 public ImagingStudySeriesInstanceComponent addInstance() { //3 822 ImagingStudySeriesInstanceComponent t = new ImagingStudySeriesInstanceComponent(); 823 if (this.instance == null) 824 this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 825 this.instance.add(t); 826 return t; 827 } 828 829 public ImagingStudySeriesComponent addInstance(ImagingStudySeriesInstanceComponent t) { //3 830 if (t == null) 831 return this; 832 if (this.instance == null) 833 this.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 834 this.instance.add(t); 835 return this; 836 } 837 838 /** 839 * @return The first repetition of repeating field {@link #instance}, creating it if it does not already exist 840 */ 841 public ImagingStudySeriesInstanceComponent getInstanceFirstRep() { 842 if (getInstance().isEmpty()) { 843 addInstance(); 844 } 845 return getInstance().get(0); 846 } 847 848 protected void listChildren(List<Property> children) { 849 super.listChildren(children); 850 children.add(new Property("identifier", "Identifier", "Formal identifier for this series.", 0, 1, identifier)); 851 children.add(new Property("number", "unsignedInt", "The numeric identifier of this series in the study.", 0, 1, number)); 852 children.add(new Property("modality", "Coding", "The modality of this series sequence.", 0, 1, modality)); 853 children.add(new Property("description", "string", "A description of the series.", 0, 1, description)); 854 children.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances)); 855 children.add(new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 856 children.add(new Property("bodySite", "Coding", "The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.", 0, 1, bodySite)); 857 children.add(new Property("laterality", "Coding", "The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.", 0, 1, laterality)); 858 children.add(new Property("specimen", "Reference(Specimen)", "The specimen imaged, e.g., for whole slide imaging of a biopsy.", 0, java.lang.Integer.MAX_VALUE, specimen)); 859 children.add(new Property("started", "dateTime", "The date and time the series was started.", 0, 1, started)); 860 children.add(new Property("performer", "", "Indicates who or what performed the series and how they were involved.", 0, java.lang.Integer.MAX_VALUE, performer)); 861 children.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)); 862 } 863 864 @Override 865 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 866 switch (_hash) { 867 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Formal identifier for this series.", 0, 1, identifier); 868 case -1034364087: /*number*/ return new Property("number", "unsignedInt", "The numeric identifier of this series in the study.", 0, 1, number); 869 case -622722335: /*modality*/ return new Property("modality", "Coding", "The modality of this series sequence.", 0, 1, modality); 870 case -1724546052: /*description*/ return new Property("description", "string", "A description of the series.", 0, 1, description); 871 case -1043544226: /*numberOfInstances*/ return new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in the Study. The value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances); 872 case 1741102485: /*endpoint*/ return new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for this series. See implementation notes for information about using DICOM endpoints. A series-level endpoint, if present, has precedence over a study-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint); 873 case 1702620169: /*bodySite*/ return new Property("bodySite", "Coding", "The anatomic structures examined. See DICOM Part 16 Annex L (http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_L.html) for DICOM to SNOMED-CT mappings. The bodySite may indicate the laterality of body part imaged; if so, it shall be consistent with any content of ImagingStudy.series.laterality.", 0, 1, bodySite); 874 case -170291817: /*laterality*/ return new Property("laterality", "Coding", "The laterality of the (possibly paired) anatomic structures examined. E.g., the left knee, both lungs, or unpaired abdomen. If present, shall be consistent with any laterality information indicated in ImagingStudy.series.bodySite.", 0, 1, laterality); 875 case -2132868344: /*specimen*/ return new Property("specimen", "Reference(Specimen)", "The specimen imaged, e.g., for whole slide imaging of a biopsy.", 0, java.lang.Integer.MAX_VALUE, specimen); 876 case -1897185151: /*started*/ return new Property("started", "dateTime", "The date and time the series was started.", 0, 1, started); 877 case 481140686: /*performer*/ return new Property("performer", "", "Indicates who or what performed the series and how they were involved.", 0, java.lang.Integer.MAX_VALUE, performer); 878 case 555127957: /*instance*/ return new Property("instance", "", "A single SOP instance within the series, e.g. an image, or presentation state.", 0, java.lang.Integer.MAX_VALUE, instance); 879 default: return super.getNamedProperty(_hash, _name, _checkValid); 880 } 881 882 } 883 884 @Override 885 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 886 switch (hash) { 887 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 888 case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // UnsignedIntType 889 case -622722335: /*modality*/ return this.modality == null ? new Base[0] : new Base[] {this.modality}; // Coding 890 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 891 case -1043544226: /*numberOfInstances*/ return this.numberOfInstances == null ? new Base[0] : new Base[] {this.numberOfInstances}; // UnsignedIntType 892 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference 893 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // Coding 894 case -170291817: /*laterality*/ return this.laterality == null ? new Base[0] : new Base[] {this.laterality}; // Coding 895 case -2132868344: /*specimen*/ return this.specimen == null ? new Base[0] : this.specimen.toArray(new Base[this.specimen.size()]); // Reference 896 case -1897185151: /*started*/ return this.started == null ? new Base[0] : new Base[] {this.started}; // DateTimeType 897 case 481140686: /*performer*/ return this.performer == null ? new Base[0] : this.performer.toArray(new Base[this.performer.size()]); // ImagingStudySeriesPerformerComponent 898 case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // ImagingStudySeriesInstanceComponent 899 default: return super.getProperty(hash, name, checkValid); 900 } 901 902 } 903 904 @Override 905 public Base setProperty(int hash, String name, Base value) throws FHIRException { 906 switch (hash) { 907 case -1618432855: // identifier 908 this.identifier = castToIdentifier(value); // Identifier 909 return value; 910 case -1034364087: // number 911 this.number = castToUnsignedInt(value); // UnsignedIntType 912 return value; 913 case -622722335: // modality 914 this.modality = castToCoding(value); // Coding 915 return value; 916 case -1724546052: // description 917 this.description = castToString(value); // StringType 918 return value; 919 case -1043544226: // numberOfInstances 920 this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType 921 return value; 922 case 1741102485: // endpoint 923 this.getEndpoint().add(castToReference(value)); // Reference 924 return value; 925 case 1702620169: // bodySite 926 this.bodySite = castToCoding(value); // Coding 927 return value; 928 case -170291817: // laterality 929 this.laterality = castToCoding(value); // Coding 930 return value; 931 case -2132868344: // specimen 932 this.getSpecimen().add(castToReference(value)); // Reference 933 return value; 934 case -1897185151: // started 935 this.started = castToDateTime(value); // DateTimeType 936 return value; 937 case 481140686: // performer 938 this.getPerformer().add((ImagingStudySeriesPerformerComponent) value); // ImagingStudySeriesPerformerComponent 939 return value; 940 case 555127957: // instance 941 this.getInstance().add((ImagingStudySeriesInstanceComponent) value); // ImagingStudySeriesInstanceComponent 942 return value; 943 default: return super.setProperty(hash, name, value); 944 } 945 946 } 947 948 @Override 949 public Base setProperty(String name, Base value) throws FHIRException { 950 if (name.equals("identifier")) { 951 this.identifier = castToIdentifier(value); // Identifier 952 } else if (name.equals("number")) { 953 this.number = castToUnsignedInt(value); // UnsignedIntType 954 } else if (name.equals("modality")) { 955 this.modality = castToCoding(value); // Coding 956 } else if (name.equals("description")) { 957 this.description = castToString(value); // StringType 958 } else if (name.equals("numberOfInstances")) { 959 this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType 960 } else if (name.equals("endpoint")) { 961 this.getEndpoint().add(castToReference(value)); 962 } else if (name.equals("bodySite")) { 963 this.bodySite = castToCoding(value); // Coding 964 } else if (name.equals("laterality")) { 965 this.laterality = castToCoding(value); // Coding 966 } else if (name.equals("specimen")) { 967 this.getSpecimen().add(castToReference(value)); 968 } else if (name.equals("started")) { 969 this.started = castToDateTime(value); // DateTimeType 970 } else if (name.equals("performer")) { 971 this.getPerformer().add((ImagingStudySeriesPerformerComponent) value); 972 } else if (name.equals("instance")) { 973 this.getInstance().add((ImagingStudySeriesInstanceComponent) value); 974 } else 975 return super.setProperty(name, value); 976 return value; 977 } 978 979 @Override 980 public Base makeProperty(int hash, String name) throws FHIRException { 981 switch (hash) { 982 case -1618432855: return getIdentifier(); 983 case -1034364087: return getNumberElement(); 984 case -622722335: return getModality(); 985 case -1724546052: return getDescriptionElement(); 986 case -1043544226: return getNumberOfInstancesElement(); 987 case 1741102485: return addEndpoint(); 988 case 1702620169: return getBodySite(); 989 case -170291817: return getLaterality(); 990 case -2132868344: return addSpecimen(); 991 case -1897185151: return getStartedElement(); 992 case 481140686: return addPerformer(); 993 case 555127957: return addInstance(); 994 default: return super.makeProperty(hash, name); 995 } 996 997 } 998 999 @Override 1000 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1001 switch (hash) { 1002 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1003 case -1034364087: /*number*/ return new String[] {"unsignedInt"}; 1004 case -622722335: /*modality*/ return new String[] {"Coding"}; 1005 case -1724546052: /*description*/ return new String[] {"string"}; 1006 case -1043544226: /*numberOfInstances*/ return new String[] {"unsignedInt"}; 1007 case 1741102485: /*endpoint*/ return new String[] {"Reference"}; 1008 case 1702620169: /*bodySite*/ return new String[] {"Coding"}; 1009 case -170291817: /*laterality*/ return new String[] {"Coding"}; 1010 case -2132868344: /*specimen*/ return new String[] {"Reference"}; 1011 case -1897185151: /*started*/ return new String[] {"dateTime"}; 1012 case 481140686: /*performer*/ return new String[] {}; 1013 case 555127957: /*instance*/ return new String[] {}; 1014 default: return super.getTypesForProperty(hash, name); 1015 } 1016 1017 } 1018 1019 @Override 1020 public Base addChild(String name) throws FHIRException { 1021 if (name.equals("identifier")) { 1022 this.identifier = new Identifier(); 1023 return this.identifier; 1024 } 1025 else if (name.equals("number")) { 1026 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); 1027 } 1028 else if (name.equals("modality")) { 1029 this.modality = new Coding(); 1030 return this.modality; 1031 } 1032 else if (name.equals("description")) { 1033 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.description"); 1034 } 1035 else if (name.equals("numberOfInstances")) { 1036 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfInstances"); 1037 } 1038 else if (name.equals("endpoint")) { 1039 return addEndpoint(); 1040 } 1041 else if (name.equals("bodySite")) { 1042 this.bodySite = new Coding(); 1043 return this.bodySite; 1044 } 1045 else if (name.equals("laterality")) { 1046 this.laterality = new Coding(); 1047 return this.laterality; 1048 } 1049 else if (name.equals("specimen")) { 1050 return addSpecimen(); 1051 } 1052 else if (name.equals("started")) { 1053 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); 1054 } 1055 else if (name.equals("performer")) { 1056 return addPerformer(); 1057 } 1058 else if (name.equals("instance")) { 1059 return addInstance(); 1060 } 1061 else 1062 return super.addChild(name); 1063 } 1064 1065 public ImagingStudySeriesComponent copy() { 1066 ImagingStudySeriesComponent dst = new ImagingStudySeriesComponent(); 1067 copyValues(dst); 1068 dst.identifier = identifier == null ? null : identifier.copy(); 1069 dst.number = number == null ? null : number.copy(); 1070 dst.modality = modality == null ? null : modality.copy(); 1071 dst.description = description == null ? null : description.copy(); 1072 dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); 1073 if (endpoint != null) { 1074 dst.endpoint = new ArrayList<Reference>(); 1075 for (Reference i : endpoint) 1076 dst.endpoint.add(i.copy()); 1077 }; 1078 dst.bodySite = bodySite == null ? null : bodySite.copy(); 1079 dst.laterality = laterality == null ? null : laterality.copy(); 1080 if (specimen != null) { 1081 dst.specimen = new ArrayList<Reference>(); 1082 for (Reference i : specimen) 1083 dst.specimen.add(i.copy()); 1084 }; 1085 dst.started = started == null ? null : started.copy(); 1086 if (performer != null) { 1087 dst.performer = new ArrayList<ImagingStudySeriesPerformerComponent>(); 1088 for (ImagingStudySeriesPerformerComponent i : performer) 1089 dst.performer.add(i.copy()); 1090 }; 1091 if (instance != null) { 1092 dst.instance = new ArrayList<ImagingStudySeriesInstanceComponent>(); 1093 for (ImagingStudySeriesInstanceComponent i : instance) 1094 dst.instance.add(i.copy()); 1095 }; 1096 return dst; 1097 } 1098 1099 @Override 1100 public boolean equalsDeep(Base other_) { 1101 if (!super.equalsDeep(other_)) 1102 return false; 1103 if (!(other_ instanceof ImagingStudySeriesComponent)) 1104 return false; 1105 ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other_; 1106 return compareDeep(identifier, o.identifier, true) && compareDeep(number, o.number, true) && compareDeep(modality, o.modality, true) 1107 && compareDeep(description, o.description, true) && compareDeep(numberOfInstances, o.numberOfInstances, true) 1108 && compareDeep(endpoint, o.endpoint, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(laterality, o.laterality, true) 1109 && compareDeep(specimen, o.specimen, true) && compareDeep(started, o.started, true) && compareDeep(performer, o.performer, true) 1110 && compareDeep(instance, o.instance, true); 1111 } 1112 1113 @Override 1114 public boolean equalsShallow(Base other_) { 1115 if (!super.equalsShallow(other_)) 1116 return false; 1117 if (!(other_ instanceof ImagingStudySeriesComponent)) 1118 return false; 1119 ImagingStudySeriesComponent o = (ImagingStudySeriesComponent) other_; 1120 return compareValues(number, o.number, true) && compareValues(description, o.description, true) && compareValues(numberOfInstances, o.numberOfInstances, true) 1121 && compareValues(started, o.started, true); 1122 } 1123 1124 public boolean isEmpty() { 1125 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, number, modality 1126 , description, numberOfInstances, endpoint, bodySite, laterality, specimen, started 1127 , performer, instance); 1128 } 1129 1130 public String fhirType() { 1131 return "ImagingStudy.series"; 1132 1133 } 1134 1135 } 1136 1137 @Block() 1138 public static class ImagingStudySeriesPerformerComponent extends BackboneElement implements IBaseBackboneElement { 1139 /** 1140 * Distinguishes the type of involvement of the performer in the series. 1141 */ 1142 @Child(name = "function", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true) 1143 @Description(shortDefinition="Type of performance", formalDefinition="Distinguishes the type of involvement of the performer in the series." ) 1144 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/series-performer-function") 1145 protected CodeableConcept function; 1146 1147 /** 1148 * Indicates who or what performed the series. 1149 */ 1150 @Child(name = "actor", type = {Practitioner.class, PractitionerRole.class, Organization.class, CareTeam.class, Patient.class, Device.class, RelatedPerson.class}, order=2, min=1, max=1, modifier=false, summary=true) 1151 @Description(shortDefinition="Who performed the series", formalDefinition="Indicates who or what performed the series." ) 1152 protected Reference actor; 1153 1154 /** 1155 * The actual object that is the target of the reference (Indicates who or what performed the series.) 1156 */ 1157 protected Resource actorTarget; 1158 1159 private static final long serialVersionUID = 1424001049L; 1160 1161 /** 1162 * Constructor 1163 */ 1164 public ImagingStudySeriesPerformerComponent() { 1165 super(); 1166 } 1167 1168 /** 1169 * Constructor 1170 */ 1171 public ImagingStudySeriesPerformerComponent(Reference actor) { 1172 super(); 1173 this.actor = actor; 1174 } 1175 1176 /** 1177 * @return {@link #function} (Distinguishes the type of involvement of the performer in the series.) 1178 */ 1179 public CodeableConcept getFunction() { 1180 if (this.function == null) 1181 if (Configuration.errorOnAutoCreate()) 1182 throw new Error("Attempt to auto-create ImagingStudySeriesPerformerComponent.function"); 1183 else if (Configuration.doAutoCreate()) 1184 this.function = new CodeableConcept(); // cc 1185 return this.function; 1186 } 1187 1188 public boolean hasFunction() { 1189 return this.function != null && !this.function.isEmpty(); 1190 } 1191 1192 /** 1193 * @param value {@link #function} (Distinguishes the type of involvement of the performer in the series.) 1194 */ 1195 public ImagingStudySeriesPerformerComponent setFunction(CodeableConcept value) { 1196 this.function = value; 1197 return this; 1198 } 1199 1200 /** 1201 * @return {@link #actor} (Indicates who or what performed the series.) 1202 */ 1203 public Reference getActor() { 1204 if (this.actor == null) 1205 if (Configuration.errorOnAutoCreate()) 1206 throw new Error("Attempt to auto-create ImagingStudySeriesPerformerComponent.actor"); 1207 else if (Configuration.doAutoCreate()) 1208 this.actor = new Reference(); // cc 1209 return this.actor; 1210 } 1211 1212 public boolean hasActor() { 1213 return this.actor != null && !this.actor.isEmpty(); 1214 } 1215 1216 /** 1217 * @param value {@link #actor} (Indicates who or what performed the series.) 1218 */ 1219 public ImagingStudySeriesPerformerComponent setActor(Reference value) { 1220 this.actor = value; 1221 return this; 1222 } 1223 1224 /** 1225 * @return {@link #actor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates who or what performed the series.) 1226 */ 1227 public Resource getActorTarget() { 1228 return this.actorTarget; 1229 } 1230 1231 /** 1232 * @param value {@link #actor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates who or what performed the series.) 1233 */ 1234 public ImagingStudySeriesPerformerComponent setActorTarget(Resource value) { 1235 this.actorTarget = value; 1236 return this; 1237 } 1238 1239 protected void listChildren(List<Property> children) { 1240 super.listChildren(children); 1241 children.add(new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the series.", 0, 1, function)); 1242 children.add(new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson)", "Indicates who or what performed the series.", 0, 1, actor)); 1243 } 1244 1245 @Override 1246 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1247 switch (_hash) { 1248 case 1380938712: /*function*/ return new Property("function", "CodeableConcept", "Distinguishes the type of involvement of the performer in the series.", 0, 1, function); 1249 case 92645877: /*actor*/ return new Property("actor", "Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson)", "Indicates who or what performed the series.", 0, 1, actor); 1250 default: return super.getNamedProperty(_hash, _name, _checkValid); 1251 } 1252 1253 } 1254 1255 @Override 1256 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1257 switch (hash) { 1258 case 1380938712: /*function*/ return this.function == null ? new Base[0] : new Base[] {this.function}; // CodeableConcept 1259 case 92645877: /*actor*/ return this.actor == null ? new Base[0] : new Base[] {this.actor}; // Reference 1260 default: return super.getProperty(hash, name, checkValid); 1261 } 1262 1263 } 1264 1265 @Override 1266 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1267 switch (hash) { 1268 case 1380938712: // function 1269 this.function = castToCodeableConcept(value); // CodeableConcept 1270 return value; 1271 case 92645877: // actor 1272 this.actor = castToReference(value); // Reference 1273 return value; 1274 default: return super.setProperty(hash, name, value); 1275 } 1276 1277 } 1278 1279 @Override 1280 public Base setProperty(String name, Base value) throws FHIRException { 1281 if (name.equals("function")) { 1282 this.function = castToCodeableConcept(value); // CodeableConcept 1283 } else if (name.equals("actor")) { 1284 this.actor = castToReference(value); // Reference 1285 } else 1286 return super.setProperty(name, value); 1287 return value; 1288 } 1289 1290 @Override 1291 public Base makeProperty(int hash, String name) throws FHIRException { 1292 switch (hash) { 1293 case 1380938712: return getFunction(); 1294 case 92645877: return getActor(); 1295 default: return super.makeProperty(hash, name); 1296 } 1297 1298 } 1299 1300 @Override 1301 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1302 switch (hash) { 1303 case 1380938712: /*function*/ return new String[] {"CodeableConcept"}; 1304 case 92645877: /*actor*/ return new String[] {"Reference"}; 1305 default: return super.getTypesForProperty(hash, name); 1306 } 1307 1308 } 1309 1310 @Override 1311 public Base addChild(String name) throws FHIRException { 1312 if (name.equals("function")) { 1313 this.function = new CodeableConcept(); 1314 return this.function; 1315 } 1316 else if (name.equals("actor")) { 1317 this.actor = new Reference(); 1318 return this.actor; 1319 } 1320 else 1321 return super.addChild(name); 1322 } 1323 1324 public ImagingStudySeriesPerformerComponent copy() { 1325 ImagingStudySeriesPerformerComponent dst = new ImagingStudySeriesPerformerComponent(); 1326 copyValues(dst); 1327 dst.function = function == null ? null : function.copy(); 1328 dst.actor = actor == null ? null : actor.copy(); 1329 return dst; 1330 } 1331 1332 @Override 1333 public boolean equalsDeep(Base other_) { 1334 if (!super.equalsDeep(other_)) 1335 return false; 1336 if (!(other_ instanceof ImagingStudySeriesPerformerComponent)) 1337 return false; 1338 ImagingStudySeriesPerformerComponent o = (ImagingStudySeriesPerformerComponent) other_; 1339 return compareDeep(function, o.function, true) && compareDeep(actor, o.actor, true); 1340 } 1341 1342 @Override 1343 public boolean equalsShallow(Base other_) { 1344 if (!super.equalsShallow(other_)) 1345 return false; 1346 if (!(other_ instanceof ImagingStudySeriesPerformerComponent)) 1347 return false; 1348 ImagingStudySeriesPerformerComponent o = (ImagingStudySeriesPerformerComponent) other_; 1349 return true; 1350 } 1351 1352 public boolean isEmpty() { 1353 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(function, actor); 1354 } 1355 1356 public String fhirType() { 1357 return "ImagingStudy.series.performer"; 1358 1359 } 1360 1361 } 1362 1363 @Block() 1364 public static class ImagingStudySeriesInstanceComponent extends BackboneElement implements IBaseBackboneElement { 1365 /** 1366 * Formal identifier for this image or other content. 1367 */ 1368 @Child(name = "identifier", type = {Identifier.class}, order=1, min=1, max=1, modifier=false, summary=false) 1369 @Description(shortDefinition="Formal DICOM identifier for this instance", formalDefinition="Formal identifier for this image or other content." ) 1370 protected Identifier identifier; 1371 1372 /** 1373 * The number of instance in the series. 1374 */ 1375 @Child(name = "number", type = {UnsignedIntType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1376 @Description(shortDefinition="The number of this instance in the series", formalDefinition="The number of instance in the series." ) 1377 protected UnsignedIntType number; 1378 1379 /** 1380 * DICOM instance type. 1381 */ 1382 @Child(name = "sopClass", type = {Coding.class}, order=3, min=1, max=1, modifier=false, summary=false) 1383 @Description(shortDefinition="DICOM class type", formalDefinition="DICOM instance type." ) 1384 protected Coding sopClass; 1385 1386 /** 1387 * The description of the instance. 1388 */ 1389 @Child(name = "title", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1390 @Description(shortDefinition="Description of instance", formalDefinition="The description of the instance." ) 1391 protected StringType title; 1392 1393 private static final long serialVersionUID = -2106153652L; 1394 1395 /** 1396 * Constructor 1397 */ 1398 public ImagingStudySeriesInstanceComponent() { 1399 super(); 1400 } 1401 1402 /** 1403 * Constructor 1404 */ 1405 public ImagingStudySeriesInstanceComponent(Identifier identifier, Coding sopClass) { 1406 super(); 1407 this.identifier = identifier; 1408 this.sopClass = sopClass; 1409 } 1410 1411 /** 1412 * @return {@link #identifier} (Formal identifier for this image or other content.) 1413 */ 1414 public Identifier getIdentifier() { 1415 if (this.identifier == null) 1416 if (Configuration.errorOnAutoCreate()) 1417 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.identifier"); 1418 else if (Configuration.doAutoCreate()) 1419 this.identifier = new Identifier(); // cc 1420 return this.identifier; 1421 } 1422 1423 public boolean hasIdentifier() { 1424 return this.identifier != null && !this.identifier.isEmpty(); 1425 } 1426 1427 /** 1428 * @param value {@link #identifier} (Formal identifier for this image or other content.) 1429 */ 1430 public ImagingStudySeriesInstanceComponent setIdentifier(Identifier value) { 1431 this.identifier = value; 1432 return this; 1433 } 1434 1435 /** 1436 * @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 1437 */ 1438 public UnsignedIntType getNumberElement() { 1439 if (this.number == null) 1440 if (Configuration.errorOnAutoCreate()) 1441 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.number"); 1442 else if (Configuration.doAutoCreate()) 1443 this.number = new UnsignedIntType(); // bb 1444 return this.number; 1445 } 1446 1447 public boolean hasNumberElement() { 1448 return this.number != null && !this.number.isEmpty(); 1449 } 1450 1451 public boolean hasNumber() { 1452 return this.number != null && !this.number.isEmpty(); 1453 } 1454 1455 /** 1456 * @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 1457 */ 1458 public ImagingStudySeriesInstanceComponent setNumberElement(UnsignedIntType value) { 1459 this.number = value; 1460 return this; 1461 } 1462 1463 /** 1464 * @return The number of instance in the series. 1465 */ 1466 public int getNumber() { 1467 return this.number == null || this.number.isEmpty() ? 0 : this.number.getValue(); 1468 } 1469 1470 /** 1471 * @param value The number of instance in the series. 1472 */ 1473 public ImagingStudySeriesInstanceComponent setNumber(int value) { 1474 if (this.number == null) 1475 this.number = new UnsignedIntType(); 1476 this.number.setValue(value); 1477 return this; 1478 } 1479 1480 /** 1481 * @return {@link #sopClass} (DICOM instance type.) 1482 */ 1483 public Coding getSopClass() { 1484 if (this.sopClass == null) 1485 if (Configuration.errorOnAutoCreate()) 1486 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.sopClass"); 1487 else if (Configuration.doAutoCreate()) 1488 this.sopClass = new Coding(); // cc 1489 return this.sopClass; 1490 } 1491 1492 public boolean hasSopClass() { 1493 return this.sopClass != null && !this.sopClass.isEmpty(); 1494 } 1495 1496 /** 1497 * @param value {@link #sopClass} (DICOM instance type.) 1498 */ 1499 public ImagingStudySeriesInstanceComponent setSopClass(Coding value) { 1500 this.sopClass = value; 1501 return this; 1502 } 1503 1504 /** 1505 * @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 1506 */ 1507 public StringType getTitleElement() { 1508 if (this.title == null) 1509 if (Configuration.errorOnAutoCreate()) 1510 throw new Error("Attempt to auto-create ImagingStudySeriesInstanceComponent.title"); 1511 else if (Configuration.doAutoCreate()) 1512 this.title = new StringType(); // bb 1513 return this.title; 1514 } 1515 1516 public boolean hasTitleElement() { 1517 return this.title != null && !this.title.isEmpty(); 1518 } 1519 1520 public boolean hasTitle() { 1521 return this.title != null && !this.title.isEmpty(); 1522 } 1523 1524 /** 1525 * @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 1526 */ 1527 public ImagingStudySeriesInstanceComponent setTitleElement(StringType value) { 1528 this.title = value; 1529 return this; 1530 } 1531 1532 /** 1533 * @return The description of the instance. 1534 */ 1535 public String getTitle() { 1536 return this.title == null ? null : this.title.getValue(); 1537 } 1538 1539 /** 1540 * @param value The description of the instance. 1541 */ 1542 public ImagingStudySeriesInstanceComponent setTitle(String value) { 1543 if (Utilities.noString(value)) 1544 this.title = null; 1545 else { 1546 if (this.title == null) 1547 this.title = new StringType(); 1548 this.title.setValue(value); 1549 } 1550 return this; 1551 } 1552 1553 protected void listChildren(List<Property> children) { 1554 super.listChildren(children); 1555 children.add(new Property("identifier", "Identifier", "Formal identifier for this image or other content.", 0, 1, identifier)); 1556 children.add(new Property("number", "unsignedInt", "The number of instance in the series.", 0, 1, number)); 1557 children.add(new Property("sopClass", "Coding", "DICOM instance type.", 0, 1, sopClass)); 1558 children.add(new Property("title", "string", "The description of the instance.", 0, 1, title)); 1559 } 1560 1561 @Override 1562 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1563 switch (_hash) { 1564 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Formal identifier for this image or other content.", 0, 1, identifier); 1565 case -1034364087: /*number*/ return new Property("number", "unsignedInt", "The number of instance in the series.", 0, 1, number); 1566 case 1560041540: /*sopClass*/ return new Property("sopClass", "Coding", "DICOM instance type.", 0, 1, sopClass); 1567 case 110371416: /*title*/ return new Property("title", "string", "The description of the instance.", 0, 1, title); 1568 default: return super.getNamedProperty(_hash, _name, _checkValid); 1569 } 1570 1571 } 1572 1573 @Override 1574 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1575 switch (hash) { 1576 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 1577 case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // UnsignedIntType 1578 case 1560041540: /*sopClass*/ return this.sopClass == null ? new Base[0] : new Base[] {this.sopClass}; // Coding 1579 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 1580 default: return super.getProperty(hash, name, checkValid); 1581 } 1582 1583 } 1584 1585 @Override 1586 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1587 switch (hash) { 1588 case -1618432855: // identifier 1589 this.identifier = castToIdentifier(value); // Identifier 1590 return value; 1591 case -1034364087: // number 1592 this.number = castToUnsignedInt(value); // UnsignedIntType 1593 return value; 1594 case 1560041540: // sopClass 1595 this.sopClass = castToCoding(value); // Coding 1596 return value; 1597 case 110371416: // title 1598 this.title = castToString(value); // StringType 1599 return value; 1600 default: return super.setProperty(hash, name, value); 1601 } 1602 1603 } 1604 1605 @Override 1606 public Base setProperty(String name, Base value) throws FHIRException { 1607 if (name.equals("identifier")) { 1608 this.identifier = castToIdentifier(value); // Identifier 1609 } else if (name.equals("number")) { 1610 this.number = castToUnsignedInt(value); // UnsignedIntType 1611 } else if (name.equals("sopClass")) { 1612 this.sopClass = castToCoding(value); // Coding 1613 } else if (name.equals("title")) { 1614 this.title = castToString(value); // StringType 1615 } else 1616 return super.setProperty(name, value); 1617 return value; 1618 } 1619 1620 @Override 1621 public Base makeProperty(int hash, String name) throws FHIRException { 1622 switch (hash) { 1623 case -1618432855: return getIdentifier(); 1624 case -1034364087: return getNumberElement(); 1625 case 1560041540: return getSopClass(); 1626 case 110371416: return getTitleElement(); 1627 default: return super.makeProperty(hash, name); 1628 } 1629 1630 } 1631 1632 @Override 1633 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1634 switch (hash) { 1635 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1636 case -1034364087: /*number*/ return new String[] {"unsignedInt"}; 1637 case 1560041540: /*sopClass*/ return new String[] {"Coding"}; 1638 case 110371416: /*title*/ return new String[] {"string"}; 1639 default: return super.getTypesForProperty(hash, name); 1640 } 1641 1642 } 1643 1644 @Override 1645 public Base addChild(String name) throws FHIRException { 1646 if (name.equals("identifier")) { 1647 this.identifier = new Identifier(); 1648 return this.identifier; 1649 } 1650 else if (name.equals("number")) { 1651 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.number"); 1652 } 1653 else if (name.equals("sopClass")) { 1654 this.sopClass = new Coding(); 1655 return this.sopClass; 1656 } 1657 else if (name.equals("title")) { 1658 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.title"); 1659 } 1660 else 1661 return super.addChild(name); 1662 } 1663 1664 public ImagingStudySeriesInstanceComponent copy() { 1665 ImagingStudySeriesInstanceComponent dst = new ImagingStudySeriesInstanceComponent(); 1666 copyValues(dst); 1667 dst.identifier = identifier == null ? null : identifier.copy(); 1668 dst.number = number == null ? null : number.copy(); 1669 dst.sopClass = sopClass == null ? null : sopClass.copy(); 1670 dst.title = title == null ? null : title.copy(); 1671 return dst; 1672 } 1673 1674 @Override 1675 public boolean equalsDeep(Base other_) { 1676 if (!super.equalsDeep(other_)) 1677 return false; 1678 if (!(other_ instanceof ImagingStudySeriesInstanceComponent)) 1679 return false; 1680 ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other_; 1681 return compareDeep(identifier, o.identifier, true) && compareDeep(number, o.number, true) && compareDeep(sopClass, o.sopClass, true) 1682 && compareDeep(title, o.title, true); 1683 } 1684 1685 @Override 1686 public boolean equalsShallow(Base other_) { 1687 if (!super.equalsShallow(other_)) 1688 return false; 1689 if (!(other_ instanceof ImagingStudySeriesInstanceComponent)) 1690 return false; 1691 ImagingStudySeriesInstanceComponent o = (ImagingStudySeriesInstanceComponent) other_; 1692 return compareValues(number, o.number, true) && compareValues(title, o.title, true); 1693 } 1694 1695 public boolean isEmpty() { 1696 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, number, sopClass 1697 , title); 1698 } 1699 1700 public String fhirType() { 1701 return "ImagingStudy.series.instance"; 1702 1703 } 1704 1705 } 1706 1707 /** 1708 * DICOM Study Instance UID, and Accession Number. 1709 */ 1710 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1711 @Description(shortDefinition="Identifiers for the whole study", formalDefinition="DICOM Study Instance UID, and Accession Number." ) 1712 protected List<Identifier> identifier; 1713 1714 /** 1715 * The current state of the ImagingStudy. 1716 */ 1717 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 1718 @Description(shortDefinition="registered | available | cancelled | entered-in-error | unknown", formalDefinition="The current state of the ImagingStudy." ) 1719 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/imagingstudy-status") 1720 protected Enumeration<ImagingStudyStatus> status; 1721 1722 /** 1723 * A list of all the series.modality 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). 1724 */ 1725 @Child(name = "modality", type = {Coding.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1726 @Description(shortDefinition="All series modality if actual acquisition modalities", formalDefinition="A list of all the series.modality 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)." ) 1727 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_29.html") 1728 protected List<Coding> modality; 1729 1730 /** 1731 * The subject, typically a patient, of the imaging study. 1732 */ 1733 @Child(name = "subject", type = {Patient.class, Device.class, Group.class}, order=3, min=1, max=1, modifier=false, summary=true) 1734 @Description(shortDefinition="Who or what is the subject of the study", formalDefinition="The subject, typically a patient, of the imaging study." ) 1735 protected Reference subject; 1736 1737 /** 1738 * The actual object that is the target of the reference (The subject, typically a patient, of the imaging study.) 1739 */ 1740 protected Resource subjectTarget; 1741 1742 /** 1743 * The encounter or episode at which the request is initiated. 1744 */ 1745 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=4, min=0, max=1, modifier=false, summary=true) 1746 @Description(shortDefinition="Originating context", formalDefinition="The encounter or episode at which the request is initiated." ) 1747 protected Reference context; 1748 1749 /** 1750 * The actual object that is the target of the reference (The encounter or episode at which the request is initiated.) 1751 */ 1752 protected Resource contextTarget; 1753 1754 /** 1755 * Date and time the study started. 1756 */ 1757 @Child(name = "started", type = {DateTimeType.class}, order=5, min=0, max=1, modifier=false, summary=true) 1758 @Description(shortDefinition="When the study was started", formalDefinition="Date and time the study started." ) 1759 protected DateTimeType started; 1760 1761 /** 1762 * A list of the diagnostic requests that resulted in this imaging study being performed. 1763 */ 1764 @Child(name = "basedOn", type = {CarePlan.class, ServiceRequest.class, Appointment.class, AppointmentResponse.class, Task.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1765 @Description(shortDefinition="Request fulfilled", formalDefinition="A list of the diagnostic requests that resulted in this imaging study being performed." ) 1766 protected List<Reference> basedOn; 1767 /** 1768 * The actual objects that are the target of the reference (A list of the diagnostic requests that resulted in this imaging study being performed.) 1769 */ 1770 protected List<Resource> basedOnTarget; 1771 1772 1773 /** 1774 * The requesting/referring physician. 1775 */ 1776 @Child(name = "referrer", type = {Practitioner.class}, order=7, min=0, max=1, modifier=false, summary=true) 1777 @Description(shortDefinition="Referring physician", formalDefinition="The requesting/referring physician." ) 1778 protected Reference referrer; 1779 1780 /** 1781 * The actual object that is the target of the reference (The requesting/referring physician.) 1782 */ 1783 protected Practitioner referrerTarget; 1784 1785 /** 1786 * Who read the study and interpreted the images or other content. 1787 */ 1788 @Child(name = "interpreter", type = {Practitioner.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1789 @Description(shortDefinition="Who interpreted images", formalDefinition="Who read the study and interpreted the images or other content." ) 1790 protected List<Reference> interpreter; 1791 /** 1792 * The actual objects that are the target of the reference (Who read the study and interpreted the images or other content.) 1793 */ 1794 protected List<Practitioner> interpreterTarget; 1795 1796 1797 /** 1798 * The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType. 1799 */ 1800 @Child(name = "endpoint", type = {Endpoint.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1801 @Description(shortDefinition="Study access endpoint", formalDefinition="The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType." ) 1802 protected List<Reference> endpoint; 1803 /** 1804 * The actual objects that are the target of the reference (The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.) 1805 */ 1806 protected List<Endpoint> endpointTarget; 1807 1808 1809 /** 1810 * Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present. 1811 */ 1812 @Child(name = "numberOfSeries", type = {UnsignedIntType.class}, order=10, min=0, max=1, modifier=false, summary=true) 1813 @Description(shortDefinition="Number of Study Related Series", formalDefinition="Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present." ) 1814 protected UnsignedIntType numberOfSeries; 1815 1816 /** 1817 * Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present. 1818 */ 1819 @Child(name = "numberOfInstances", type = {UnsignedIntType.class}, order=11, min=0, max=1, modifier=false, summary=true) 1820 @Description(shortDefinition="Number of Study Related Instances", formalDefinition="Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present." ) 1821 protected UnsignedIntType numberOfInstances; 1822 1823 /** 1824 * A reference to the performed Procedure. 1825 */ 1826 @Child(name = "procedureReference", type = {Procedure.class}, order=12, min=0, max=1, modifier=false, summary=true) 1827 @Description(shortDefinition="The performed Procedure reference", formalDefinition="A reference to the performed Procedure." ) 1828 protected Reference procedureReference; 1829 1830 /** 1831 * The actual object that is the target of the reference (A reference to the performed Procedure.) 1832 */ 1833 protected Procedure procedureReferenceTarget; 1834 1835 /** 1836 * The code for the performed procedure type. 1837 */ 1838 @Child(name = "procedureCode", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1839 @Description(shortDefinition="The performed procedure code", formalDefinition="The code for the performed procedure type." ) 1840 protected List<CodeableConcept> procedureCode; 1841 1842 /** 1843 * The principal physical location where the ImagingStudy was performed. 1844 */ 1845 @Child(name = "location", type = {Location.class}, order=14, min=0, max=1, modifier=false, summary=true) 1846 @Description(shortDefinition="Where ImagingStudy occurred", formalDefinition="The principal physical location where the ImagingStudy was performed." ) 1847 protected Reference location; 1848 1849 /** 1850 * The actual object that is the target of the reference (The principal physical location where the ImagingStudy was performed.) 1851 */ 1852 protected Location locationTarget; 1853 1854 /** 1855 * Description of clinical condition indicating why the ImagingStudy was requested. 1856 */ 1857 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1858 @Description(shortDefinition="Why the study was requested", formalDefinition="Description of clinical condition indicating why the ImagingStudy was requested." ) 1859 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-reason") 1860 protected List<CodeableConcept> reasonCode; 1861 1862 /** 1863 * Indicates another resource whose existence justifies this Study. 1864 */ 1865 @Child(name = "reasonReference", type = {Condition.class, Observation.class, Media.class, DiagnosticReport.class, DocumentReference.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1866 @Description(shortDefinition="Why was study performed", formalDefinition="Indicates another resource whose existence justifies this Study." ) 1867 protected List<Reference> reasonReference; 1868 /** 1869 * The actual objects that are the target of the reference (Indicates another resource whose existence justifies this Study.) 1870 */ 1871 protected List<Resource> reasonReferenceTarget; 1872 1873 1874 /** 1875 * Institution-generated description or classification of the Study performed. 1876 */ 1877 @Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1878 @Description(shortDefinition="Institution-generated description", formalDefinition="Institution-generated description or classification of the Study performed." ) 1879 protected List<Annotation> note; 1880 1881 /** 1882 * Each study has one or more series of images or other content. 1883 */ 1884 @Child(name = "series", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1885 @Description(shortDefinition="Each study has one or more series of instances", formalDefinition="Each study has one or more series of images or other content." ) 1886 protected List<ImagingStudySeriesComponent> series; 1887 1888 private static final long serialVersionUID = 1771818489L; 1889 1890 /** 1891 * Constructor 1892 */ 1893 public ImagingStudy() { 1894 super(); 1895 } 1896 1897 /** 1898 * Constructor 1899 */ 1900 public ImagingStudy(Enumeration<ImagingStudyStatus> status, Reference subject) { 1901 super(); 1902 this.status = status; 1903 this.subject = subject; 1904 } 1905 1906 /** 1907 * @return {@link #identifier} (DICOM Study Instance UID, and Accession Number.) 1908 */ 1909 public List<Identifier> getIdentifier() { 1910 if (this.identifier == null) 1911 this.identifier = new ArrayList<Identifier>(); 1912 return this.identifier; 1913 } 1914 1915 /** 1916 * @return Returns a reference to <code>this</code> for easy method chaining 1917 */ 1918 public ImagingStudy setIdentifier(List<Identifier> theIdentifier) { 1919 this.identifier = theIdentifier; 1920 return this; 1921 } 1922 1923 public boolean hasIdentifier() { 1924 if (this.identifier == null) 1925 return false; 1926 for (Identifier item : this.identifier) 1927 if (!item.isEmpty()) 1928 return true; 1929 return false; 1930 } 1931 1932 public Identifier addIdentifier() { //3 1933 Identifier t = new Identifier(); 1934 if (this.identifier == null) 1935 this.identifier = new ArrayList<Identifier>(); 1936 this.identifier.add(t); 1937 return t; 1938 } 1939 1940 public ImagingStudy addIdentifier(Identifier t) { //3 1941 if (t == null) 1942 return this; 1943 if (this.identifier == null) 1944 this.identifier = new ArrayList<Identifier>(); 1945 this.identifier.add(t); 1946 return this; 1947 } 1948 1949 /** 1950 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 1951 */ 1952 public Identifier getIdentifierFirstRep() { 1953 if (getIdentifier().isEmpty()) { 1954 addIdentifier(); 1955 } 1956 return getIdentifier().get(0); 1957 } 1958 1959 /** 1960 * @return {@link #status} (The current state of the ImagingStudy.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1961 */ 1962 public Enumeration<ImagingStudyStatus> getStatusElement() { 1963 if (this.status == null) 1964 if (Configuration.errorOnAutoCreate()) 1965 throw new Error("Attempt to auto-create ImagingStudy.status"); 1966 else if (Configuration.doAutoCreate()) 1967 this.status = new Enumeration<ImagingStudyStatus>(new ImagingStudyStatusEnumFactory()); // bb 1968 return this.status; 1969 } 1970 1971 public boolean hasStatusElement() { 1972 return this.status != null && !this.status.isEmpty(); 1973 } 1974 1975 public boolean hasStatus() { 1976 return this.status != null && !this.status.isEmpty(); 1977 } 1978 1979 /** 1980 * @param value {@link #status} (The current state of the ImagingStudy.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1981 */ 1982 public ImagingStudy setStatusElement(Enumeration<ImagingStudyStatus> value) { 1983 this.status = value; 1984 return this; 1985 } 1986 1987 /** 1988 * @return The current state of the ImagingStudy. 1989 */ 1990 public ImagingStudyStatus getStatus() { 1991 return this.status == null ? null : this.status.getValue(); 1992 } 1993 1994 /** 1995 * @param value The current state of the ImagingStudy. 1996 */ 1997 public ImagingStudy setStatus(ImagingStudyStatus value) { 1998 if (this.status == null) 1999 this.status = new Enumeration<ImagingStudyStatus>(new ImagingStudyStatusEnumFactory()); 2000 this.status.setValue(value); 2001 return this; 2002 } 2003 2004 /** 2005 * @return {@link #modality} (A list of all the series.modality 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).) 2006 */ 2007 public List<Coding> getModality() { 2008 if (this.modality == null) 2009 this.modality = new ArrayList<Coding>(); 2010 return this.modality; 2011 } 2012 2013 /** 2014 * @return Returns a reference to <code>this</code> for easy method chaining 2015 */ 2016 public ImagingStudy setModality(List<Coding> theModality) { 2017 this.modality = theModality; 2018 return this; 2019 } 2020 2021 public boolean hasModality() { 2022 if (this.modality == null) 2023 return false; 2024 for (Coding item : this.modality) 2025 if (!item.isEmpty()) 2026 return true; 2027 return false; 2028 } 2029 2030 public Coding addModality() { //3 2031 Coding t = new Coding(); 2032 if (this.modality == null) 2033 this.modality = new ArrayList<Coding>(); 2034 this.modality.add(t); 2035 return t; 2036 } 2037 2038 public ImagingStudy addModality(Coding t) { //3 2039 if (t == null) 2040 return this; 2041 if (this.modality == null) 2042 this.modality = new ArrayList<Coding>(); 2043 this.modality.add(t); 2044 return this; 2045 } 2046 2047 /** 2048 * @return The first repetition of repeating field {@link #modality}, creating it if it does not already exist 2049 */ 2050 public Coding getModalityFirstRep() { 2051 if (getModality().isEmpty()) { 2052 addModality(); 2053 } 2054 return getModality().get(0); 2055 } 2056 2057 /** 2058 * @return {@link #subject} (The subject, typically a patient, of the imaging study.) 2059 */ 2060 public Reference getSubject() { 2061 if (this.subject == null) 2062 if (Configuration.errorOnAutoCreate()) 2063 throw new Error("Attempt to auto-create ImagingStudy.subject"); 2064 else if (Configuration.doAutoCreate()) 2065 this.subject = new Reference(); // cc 2066 return this.subject; 2067 } 2068 2069 public boolean hasSubject() { 2070 return this.subject != null && !this.subject.isEmpty(); 2071 } 2072 2073 /** 2074 * @param value {@link #subject} (The subject, typically a patient, of the imaging study.) 2075 */ 2076 public ImagingStudy setSubject(Reference value) { 2077 this.subject = value; 2078 return this; 2079 } 2080 2081 /** 2082 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The subject, typically a patient, of the imaging study.) 2083 */ 2084 public Resource getSubjectTarget() { 2085 return this.subjectTarget; 2086 } 2087 2088 /** 2089 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The subject, typically a patient, of the imaging study.) 2090 */ 2091 public ImagingStudy setSubjectTarget(Resource value) { 2092 this.subjectTarget = value; 2093 return this; 2094 } 2095 2096 /** 2097 * @return {@link #context} (The encounter or episode at which the request is initiated.) 2098 */ 2099 public Reference getContext() { 2100 if (this.context == null) 2101 if (Configuration.errorOnAutoCreate()) 2102 throw new Error("Attempt to auto-create ImagingStudy.context"); 2103 else if (Configuration.doAutoCreate()) 2104 this.context = new Reference(); // cc 2105 return this.context; 2106 } 2107 2108 public boolean hasContext() { 2109 return this.context != null && !this.context.isEmpty(); 2110 } 2111 2112 /** 2113 * @param value {@link #context} (The encounter or episode at which the request is initiated.) 2114 */ 2115 public ImagingStudy setContext(Reference value) { 2116 this.context = value; 2117 return this; 2118 } 2119 2120 /** 2121 * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter or episode at which the request is initiated.) 2122 */ 2123 public Resource getContextTarget() { 2124 return this.contextTarget; 2125 } 2126 2127 /** 2128 * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter or episode at which the request is initiated.) 2129 */ 2130 public ImagingStudy setContextTarget(Resource value) { 2131 this.contextTarget = value; 2132 return this; 2133 } 2134 2135 /** 2136 * @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 2137 */ 2138 public DateTimeType getStartedElement() { 2139 if (this.started == null) 2140 if (Configuration.errorOnAutoCreate()) 2141 throw new Error("Attempt to auto-create ImagingStudy.started"); 2142 else if (Configuration.doAutoCreate()) 2143 this.started = new DateTimeType(); // bb 2144 return this.started; 2145 } 2146 2147 public boolean hasStartedElement() { 2148 return this.started != null && !this.started.isEmpty(); 2149 } 2150 2151 public boolean hasStarted() { 2152 return this.started != null && !this.started.isEmpty(); 2153 } 2154 2155 /** 2156 * @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 2157 */ 2158 public ImagingStudy setStartedElement(DateTimeType value) { 2159 this.started = value; 2160 return this; 2161 } 2162 2163 /** 2164 * @return Date and time the study started. 2165 */ 2166 public Date getStarted() { 2167 return this.started == null ? null : this.started.getValue(); 2168 } 2169 2170 /** 2171 * @param value Date and time the study started. 2172 */ 2173 public ImagingStudy setStarted(Date value) { 2174 if (value == null) 2175 this.started = null; 2176 else { 2177 if (this.started == null) 2178 this.started = new DateTimeType(); 2179 this.started.setValue(value); 2180 } 2181 return this; 2182 } 2183 2184 /** 2185 * @return {@link #basedOn} (A list of the diagnostic requests that resulted in this imaging study being performed.) 2186 */ 2187 public List<Reference> getBasedOn() { 2188 if (this.basedOn == null) 2189 this.basedOn = new ArrayList<Reference>(); 2190 return this.basedOn; 2191 } 2192 2193 /** 2194 * @return Returns a reference to <code>this</code> for easy method chaining 2195 */ 2196 public ImagingStudy setBasedOn(List<Reference> theBasedOn) { 2197 this.basedOn = theBasedOn; 2198 return this; 2199 } 2200 2201 public boolean hasBasedOn() { 2202 if (this.basedOn == null) 2203 return false; 2204 for (Reference item : this.basedOn) 2205 if (!item.isEmpty()) 2206 return true; 2207 return false; 2208 } 2209 2210 public Reference addBasedOn() { //3 2211 Reference t = new Reference(); 2212 if (this.basedOn == null) 2213 this.basedOn = new ArrayList<Reference>(); 2214 this.basedOn.add(t); 2215 return t; 2216 } 2217 2218 public ImagingStudy addBasedOn(Reference t) { //3 2219 if (t == null) 2220 return this; 2221 if (this.basedOn == null) 2222 this.basedOn = new ArrayList<Reference>(); 2223 this.basedOn.add(t); 2224 return this; 2225 } 2226 2227 /** 2228 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 2229 */ 2230 public Reference getBasedOnFirstRep() { 2231 if (getBasedOn().isEmpty()) { 2232 addBasedOn(); 2233 } 2234 return getBasedOn().get(0); 2235 } 2236 2237 /** 2238 * @deprecated Use Reference#setResource(IBaseResource) instead 2239 */ 2240 @Deprecated 2241 public List<Resource> getBasedOnTarget() { 2242 if (this.basedOnTarget == null) 2243 this.basedOnTarget = new ArrayList<Resource>(); 2244 return this.basedOnTarget; 2245 } 2246 2247 /** 2248 * @return {@link #referrer} (The requesting/referring physician.) 2249 */ 2250 public Reference getReferrer() { 2251 if (this.referrer == null) 2252 if (Configuration.errorOnAutoCreate()) 2253 throw new Error("Attempt to auto-create ImagingStudy.referrer"); 2254 else if (Configuration.doAutoCreate()) 2255 this.referrer = new Reference(); // cc 2256 return this.referrer; 2257 } 2258 2259 public boolean hasReferrer() { 2260 return this.referrer != null && !this.referrer.isEmpty(); 2261 } 2262 2263 /** 2264 * @param value {@link #referrer} (The requesting/referring physician.) 2265 */ 2266 public ImagingStudy setReferrer(Reference value) { 2267 this.referrer = value; 2268 return this; 2269 } 2270 2271 /** 2272 * @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.) 2273 */ 2274 public Practitioner getReferrerTarget() { 2275 if (this.referrerTarget == null) 2276 if (Configuration.errorOnAutoCreate()) 2277 throw new Error("Attempt to auto-create ImagingStudy.referrer"); 2278 else if (Configuration.doAutoCreate()) 2279 this.referrerTarget = new Practitioner(); // aa 2280 return this.referrerTarget; 2281 } 2282 2283 /** 2284 * @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.) 2285 */ 2286 public ImagingStudy setReferrerTarget(Practitioner value) { 2287 this.referrerTarget = value; 2288 return this; 2289 } 2290 2291 /** 2292 * @return {@link #interpreter} (Who read the study and interpreted the images or other content.) 2293 */ 2294 public List<Reference> getInterpreter() { 2295 if (this.interpreter == null) 2296 this.interpreter = new ArrayList<Reference>(); 2297 return this.interpreter; 2298 } 2299 2300 /** 2301 * @return Returns a reference to <code>this</code> for easy method chaining 2302 */ 2303 public ImagingStudy setInterpreter(List<Reference> theInterpreter) { 2304 this.interpreter = theInterpreter; 2305 return this; 2306 } 2307 2308 public boolean hasInterpreter() { 2309 if (this.interpreter == null) 2310 return false; 2311 for (Reference item : this.interpreter) 2312 if (!item.isEmpty()) 2313 return true; 2314 return false; 2315 } 2316 2317 public Reference addInterpreter() { //3 2318 Reference t = new Reference(); 2319 if (this.interpreter == null) 2320 this.interpreter = new ArrayList<Reference>(); 2321 this.interpreter.add(t); 2322 return t; 2323 } 2324 2325 public ImagingStudy addInterpreter(Reference t) { //3 2326 if (t == null) 2327 return this; 2328 if (this.interpreter == null) 2329 this.interpreter = new ArrayList<Reference>(); 2330 this.interpreter.add(t); 2331 return this; 2332 } 2333 2334 /** 2335 * @return The first repetition of repeating field {@link #interpreter}, creating it if it does not already exist 2336 */ 2337 public Reference getInterpreterFirstRep() { 2338 if (getInterpreter().isEmpty()) { 2339 addInterpreter(); 2340 } 2341 return getInterpreter().get(0); 2342 } 2343 2344 /** 2345 * @deprecated Use Reference#setResource(IBaseResource) instead 2346 */ 2347 @Deprecated 2348 public List<Practitioner> getInterpreterTarget() { 2349 if (this.interpreterTarget == null) 2350 this.interpreterTarget = new ArrayList<Practitioner>(); 2351 return this.interpreterTarget; 2352 } 2353 2354 /** 2355 * @deprecated Use Reference#setResource(IBaseResource) instead 2356 */ 2357 @Deprecated 2358 public Practitioner addInterpreterTarget() { 2359 Practitioner r = new Practitioner(); 2360 if (this.interpreterTarget == null) 2361 this.interpreterTarget = new ArrayList<Practitioner>(); 2362 this.interpreterTarget.add(r); 2363 return r; 2364 } 2365 2366 /** 2367 * @return {@link #endpoint} (The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.) 2368 */ 2369 public List<Reference> getEndpoint() { 2370 if (this.endpoint == null) 2371 this.endpoint = new ArrayList<Reference>(); 2372 return this.endpoint; 2373 } 2374 2375 /** 2376 * @return Returns a reference to <code>this</code> for easy method chaining 2377 */ 2378 public ImagingStudy setEndpoint(List<Reference> theEndpoint) { 2379 this.endpoint = theEndpoint; 2380 return this; 2381 } 2382 2383 public boolean hasEndpoint() { 2384 if (this.endpoint == null) 2385 return false; 2386 for (Reference item : this.endpoint) 2387 if (!item.isEmpty()) 2388 return true; 2389 return false; 2390 } 2391 2392 public Reference addEndpoint() { //3 2393 Reference t = new Reference(); 2394 if (this.endpoint == null) 2395 this.endpoint = new ArrayList<Reference>(); 2396 this.endpoint.add(t); 2397 return t; 2398 } 2399 2400 public ImagingStudy addEndpoint(Reference t) { //3 2401 if (t == null) 2402 return this; 2403 if (this.endpoint == null) 2404 this.endpoint = new ArrayList<Reference>(); 2405 this.endpoint.add(t); 2406 return this; 2407 } 2408 2409 /** 2410 * @return The first repetition of repeating field {@link #endpoint}, creating it if it does not already exist 2411 */ 2412 public Reference getEndpointFirstRep() { 2413 if (getEndpoint().isEmpty()) { 2414 addEndpoint(); 2415 } 2416 return getEndpoint().get(0); 2417 } 2418 2419 /** 2420 * @deprecated Use Reference#setResource(IBaseResource) instead 2421 */ 2422 @Deprecated 2423 public List<Endpoint> getEndpointTarget() { 2424 if (this.endpointTarget == null) 2425 this.endpointTarget = new ArrayList<Endpoint>(); 2426 return this.endpointTarget; 2427 } 2428 2429 /** 2430 * @deprecated Use Reference#setResource(IBaseResource) instead 2431 */ 2432 @Deprecated 2433 public Endpoint addEndpointTarget() { 2434 Endpoint r = new Endpoint(); 2435 if (this.endpointTarget == null) 2436 this.endpointTarget = new ArrayList<Endpoint>(); 2437 this.endpointTarget.add(r); 2438 return r; 2439 } 2440 2441 /** 2442 * @return {@link #numberOfSeries} (Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value 2443 */ 2444 public UnsignedIntType getNumberOfSeriesElement() { 2445 if (this.numberOfSeries == null) 2446 if (Configuration.errorOnAutoCreate()) 2447 throw new Error("Attempt to auto-create ImagingStudy.numberOfSeries"); 2448 else if (Configuration.doAutoCreate()) 2449 this.numberOfSeries = new UnsignedIntType(); // bb 2450 return this.numberOfSeries; 2451 } 2452 2453 public boolean hasNumberOfSeriesElement() { 2454 return this.numberOfSeries != null && !this.numberOfSeries.isEmpty(); 2455 } 2456 2457 public boolean hasNumberOfSeries() { 2458 return this.numberOfSeries != null && !this.numberOfSeries.isEmpty(); 2459 } 2460 2461 /** 2462 * @param value {@link #numberOfSeries} (Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfSeries" gives direct access to the value 2463 */ 2464 public ImagingStudy setNumberOfSeriesElement(UnsignedIntType value) { 2465 this.numberOfSeries = value; 2466 return this; 2467 } 2468 2469 /** 2470 * @return Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present. 2471 */ 2472 public int getNumberOfSeries() { 2473 return this.numberOfSeries == null || this.numberOfSeries.isEmpty() ? 0 : this.numberOfSeries.getValue(); 2474 } 2475 2476 /** 2477 * @param value Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present. 2478 */ 2479 public ImagingStudy setNumberOfSeries(int value) { 2480 if (this.numberOfSeries == null) 2481 this.numberOfSeries = new UnsignedIntType(); 2482 this.numberOfSeries.setValue(value); 2483 return this; 2484 } 2485 2486 /** 2487 * @return {@link #numberOfInstances} (Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 2488 */ 2489 public UnsignedIntType getNumberOfInstancesElement() { 2490 if (this.numberOfInstances == null) 2491 if (Configuration.errorOnAutoCreate()) 2492 throw new Error("Attempt to auto-create ImagingStudy.numberOfInstances"); 2493 else if (Configuration.doAutoCreate()) 2494 this.numberOfInstances = new UnsignedIntType(); // bb 2495 return this.numberOfInstances; 2496 } 2497 2498 public boolean hasNumberOfInstancesElement() { 2499 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 2500 } 2501 2502 public boolean hasNumberOfInstances() { 2503 return this.numberOfInstances != null && !this.numberOfInstances.isEmpty(); 2504 } 2505 2506 /** 2507 * @param value {@link #numberOfInstances} (Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.). This is the underlying object with id, value and extensions. The accessor "getNumberOfInstances" gives direct access to the value 2508 */ 2509 public ImagingStudy setNumberOfInstancesElement(UnsignedIntType value) { 2510 this.numberOfInstances = value; 2511 return this; 2512 } 2513 2514 /** 2515 * @return Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present. 2516 */ 2517 public int getNumberOfInstances() { 2518 return this.numberOfInstances == null || this.numberOfInstances.isEmpty() ? 0 : this.numberOfInstances.getValue(); 2519 } 2520 2521 /** 2522 * @param value Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present. 2523 */ 2524 public ImagingStudy setNumberOfInstances(int value) { 2525 if (this.numberOfInstances == null) 2526 this.numberOfInstances = new UnsignedIntType(); 2527 this.numberOfInstances.setValue(value); 2528 return this; 2529 } 2530 2531 /** 2532 * @return {@link #procedureReference} (A reference to the performed Procedure.) 2533 */ 2534 public Reference getProcedureReference() { 2535 if (this.procedureReference == null) 2536 if (Configuration.errorOnAutoCreate()) 2537 throw new Error("Attempt to auto-create ImagingStudy.procedureReference"); 2538 else if (Configuration.doAutoCreate()) 2539 this.procedureReference = new Reference(); // cc 2540 return this.procedureReference; 2541 } 2542 2543 public boolean hasProcedureReference() { 2544 return this.procedureReference != null && !this.procedureReference.isEmpty(); 2545 } 2546 2547 /** 2548 * @param value {@link #procedureReference} (A reference to the performed Procedure.) 2549 */ 2550 public ImagingStudy setProcedureReference(Reference value) { 2551 this.procedureReference = value; 2552 return this; 2553 } 2554 2555 /** 2556 * @return {@link #procedureReference} 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. (A reference to the performed Procedure.) 2557 */ 2558 public Procedure getProcedureReferenceTarget() { 2559 if (this.procedureReferenceTarget == null) 2560 if (Configuration.errorOnAutoCreate()) 2561 throw new Error("Attempt to auto-create ImagingStudy.procedureReference"); 2562 else if (Configuration.doAutoCreate()) 2563 this.procedureReferenceTarget = new Procedure(); // aa 2564 return this.procedureReferenceTarget; 2565 } 2566 2567 /** 2568 * @param value {@link #procedureReference} 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. (A reference to the performed Procedure.) 2569 */ 2570 public ImagingStudy setProcedureReferenceTarget(Procedure value) { 2571 this.procedureReferenceTarget = value; 2572 return this; 2573 } 2574 2575 /** 2576 * @return {@link #procedureCode} (The code for the performed procedure type.) 2577 */ 2578 public List<CodeableConcept> getProcedureCode() { 2579 if (this.procedureCode == null) 2580 this.procedureCode = new ArrayList<CodeableConcept>(); 2581 return this.procedureCode; 2582 } 2583 2584 /** 2585 * @return Returns a reference to <code>this</code> for easy method chaining 2586 */ 2587 public ImagingStudy setProcedureCode(List<CodeableConcept> theProcedureCode) { 2588 this.procedureCode = theProcedureCode; 2589 return this; 2590 } 2591 2592 public boolean hasProcedureCode() { 2593 if (this.procedureCode == null) 2594 return false; 2595 for (CodeableConcept item : this.procedureCode) 2596 if (!item.isEmpty()) 2597 return true; 2598 return false; 2599 } 2600 2601 public CodeableConcept addProcedureCode() { //3 2602 CodeableConcept t = new CodeableConcept(); 2603 if (this.procedureCode == null) 2604 this.procedureCode = new ArrayList<CodeableConcept>(); 2605 this.procedureCode.add(t); 2606 return t; 2607 } 2608 2609 public ImagingStudy addProcedureCode(CodeableConcept t) { //3 2610 if (t == null) 2611 return this; 2612 if (this.procedureCode == null) 2613 this.procedureCode = new ArrayList<CodeableConcept>(); 2614 this.procedureCode.add(t); 2615 return this; 2616 } 2617 2618 /** 2619 * @return The first repetition of repeating field {@link #procedureCode}, creating it if it does not already exist 2620 */ 2621 public CodeableConcept getProcedureCodeFirstRep() { 2622 if (getProcedureCode().isEmpty()) { 2623 addProcedureCode(); 2624 } 2625 return getProcedureCode().get(0); 2626 } 2627 2628 /** 2629 * @return {@link #location} (The principal physical location where the ImagingStudy was performed.) 2630 */ 2631 public Reference getLocation() { 2632 if (this.location == null) 2633 if (Configuration.errorOnAutoCreate()) 2634 throw new Error("Attempt to auto-create ImagingStudy.location"); 2635 else if (Configuration.doAutoCreate()) 2636 this.location = new Reference(); // cc 2637 return this.location; 2638 } 2639 2640 public boolean hasLocation() { 2641 return this.location != null && !this.location.isEmpty(); 2642 } 2643 2644 /** 2645 * @param value {@link #location} (The principal physical location where the ImagingStudy was performed.) 2646 */ 2647 public ImagingStudy setLocation(Reference value) { 2648 this.location = value; 2649 return this; 2650 } 2651 2652 /** 2653 * @return {@link #location} 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 principal physical location where the ImagingStudy was performed.) 2654 */ 2655 public Location getLocationTarget() { 2656 if (this.locationTarget == null) 2657 if (Configuration.errorOnAutoCreate()) 2658 throw new Error("Attempt to auto-create ImagingStudy.location"); 2659 else if (Configuration.doAutoCreate()) 2660 this.locationTarget = new Location(); // aa 2661 return this.locationTarget; 2662 } 2663 2664 /** 2665 * @param value {@link #location} 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 principal physical location where the ImagingStudy was performed.) 2666 */ 2667 public ImagingStudy setLocationTarget(Location value) { 2668 this.locationTarget = value; 2669 return this; 2670 } 2671 2672 /** 2673 * @return {@link #reasonCode} (Description of clinical condition indicating why the ImagingStudy was requested.) 2674 */ 2675 public List<CodeableConcept> getReasonCode() { 2676 if (this.reasonCode == null) 2677 this.reasonCode = new ArrayList<CodeableConcept>(); 2678 return this.reasonCode; 2679 } 2680 2681 /** 2682 * @return Returns a reference to <code>this</code> for easy method chaining 2683 */ 2684 public ImagingStudy setReasonCode(List<CodeableConcept> theReasonCode) { 2685 this.reasonCode = theReasonCode; 2686 return this; 2687 } 2688 2689 public boolean hasReasonCode() { 2690 if (this.reasonCode == null) 2691 return false; 2692 for (CodeableConcept item : this.reasonCode) 2693 if (!item.isEmpty()) 2694 return true; 2695 return false; 2696 } 2697 2698 public CodeableConcept addReasonCode() { //3 2699 CodeableConcept t = new CodeableConcept(); 2700 if (this.reasonCode == null) 2701 this.reasonCode = new ArrayList<CodeableConcept>(); 2702 this.reasonCode.add(t); 2703 return t; 2704 } 2705 2706 public ImagingStudy addReasonCode(CodeableConcept t) { //3 2707 if (t == null) 2708 return this; 2709 if (this.reasonCode == null) 2710 this.reasonCode = new ArrayList<CodeableConcept>(); 2711 this.reasonCode.add(t); 2712 return this; 2713 } 2714 2715 /** 2716 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 2717 */ 2718 public CodeableConcept getReasonCodeFirstRep() { 2719 if (getReasonCode().isEmpty()) { 2720 addReasonCode(); 2721 } 2722 return getReasonCode().get(0); 2723 } 2724 2725 /** 2726 * @return {@link #reasonReference} (Indicates another resource whose existence justifies this Study.) 2727 */ 2728 public List<Reference> getReasonReference() { 2729 if (this.reasonReference == null) 2730 this.reasonReference = new ArrayList<Reference>(); 2731 return this.reasonReference; 2732 } 2733 2734 /** 2735 * @return Returns a reference to <code>this</code> for easy method chaining 2736 */ 2737 public ImagingStudy setReasonReference(List<Reference> theReasonReference) { 2738 this.reasonReference = theReasonReference; 2739 return this; 2740 } 2741 2742 public boolean hasReasonReference() { 2743 if (this.reasonReference == null) 2744 return false; 2745 for (Reference item : this.reasonReference) 2746 if (!item.isEmpty()) 2747 return true; 2748 return false; 2749 } 2750 2751 public Reference addReasonReference() { //3 2752 Reference t = new Reference(); 2753 if (this.reasonReference == null) 2754 this.reasonReference = new ArrayList<Reference>(); 2755 this.reasonReference.add(t); 2756 return t; 2757 } 2758 2759 public ImagingStudy addReasonReference(Reference t) { //3 2760 if (t == null) 2761 return this; 2762 if (this.reasonReference == null) 2763 this.reasonReference = new ArrayList<Reference>(); 2764 this.reasonReference.add(t); 2765 return this; 2766 } 2767 2768 /** 2769 * @return The first repetition of repeating field {@link #reasonReference}, creating it if it does not already exist 2770 */ 2771 public Reference getReasonReferenceFirstRep() { 2772 if (getReasonReference().isEmpty()) { 2773 addReasonReference(); 2774 } 2775 return getReasonReference().get(0); 2776 } 2777 2778 /** 2779 * @deprecated Use Reference#setResource(IBaseResource) instead 2780 */ 2781 @Deprecated 2782 public List<Resource> getReasonReferenceTarget() { 2783 if (this.reasonReferenceTarget == null) 2784 this.reasonReferenceTarget = new ArrayList<Resource>(); 2785 return this.reasonReferenceTarget; 2786 } 2787 2788 /** 2789 * @return {@link #note} (Institution-generated description or classification of the Study performed.) 2790 */ 2791 public List<Annotation> getNote() { 2792 if (this.note == null) 2793 this.note = new ArrayList<Annotation>(); 2794 return this.note; 2795 } 2796 2797 /** 2798 * @return Returns a reference to <code>this</code> for easy method chaining 2799 */ 2800 public ImagingStudy setNote(List<Annotation> theNote) { 2801 this.note = theNote; 2802 return this; 2803 } 2804 2805 public boolean hasNote() { 2806 if (this.note == null) 2807 return false; 2808 for (Annotation item : this.note) 2809 if (!item.isEmpty()) 2810 return true; 2811 return false; 2812 } 2813 2814 public Annotation addNote() { //3 2815 Annotation t = new Annotation(); 2816 if (this.note == null) 2817 this.note = new ArrayList<Annotation>(); 2818 this.note.add(t); 2819 return t; 2820 } 2821 2822 public ImagingStudy addNote(Annotation t) { //3 2823 if (t == null) 2824 return this; 2825 if (this.note == null) 2826 this.note = new ArrayList<Annotation>(); 2827 this.note.add(t); 2828 return this; 2829 } 2830 2831 /** 2832 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 2833 */ 2834 public Annotation getNoteFirstRep() { 2835 if (getNote().isEmpty()) { 2836 addNote(); 2837 } 2838 return getNote().get(0); 2839 } 2840 2841 /** 2842 * @return {@link #series} (Each study has one or more series of images or other content.) 2843 */ 2844 public List<ImagingStudySeriesComponent> getSeries() { 2845 if (this.series == null) 2846 this.series = new ArrayList<ImagingStudySeriesComponent>(); 2847 return this.series; 2848 } 2849 2850 /** 2851 * @return Returns a reference to <code>this</code> for easy method chaining 2852 */ 2853 public ImagingStudy setSeries(List<ImagingStudySeriesComponent> theSeries) { 2854 this.series = theSeries; 2855 return this; 2856 } 2857 2858 public boolean hasSeries() { 2859 if (this.series == null) 2860 return false; 2861 for (ImagingStudySeriesComponent item : this.series) 2862 if (!item.isEmpty()) 2863 return true; 2864 return false; 2865 } 2866 2867 public ImagingStudySeriesComponent addSeries() { //3 2868 ImagingStudySeriesComponent t = new ImagingStudySeriesComponent(); 2869 if (this.series == null) 2870 this.series = new ArrayList<ImagingStudySeriesComponent>(); 2871 this.series.add(t); 2872 return t; 2873 } 2874 2875 public ImagingStudy addSeries(ImagingStudySeriesComponent t) { //3 2876 if (t == null) 2877 return this; 2878 if (this.series == null) 2879 this.series = new ArrayList<ImagingStudySeriesComponent>(); 2880 this.series.add(t); 2881 return this; 2882 } 2883 2884 /** 2885 * @return The first repetition of repeating field {@link #series}, creating it if it does not already exist 2886 */ 2887 public ImagingStudySeriesComponent getSeriesFirstRep() { 2888 if (getSeries().isEmpty()) { 2889 addSeries(); 2890 } 2891 return getSeries().get(0); 2892 } 2893 2894 protected void listChildren(List<Property> children) { 2895 super.listChildren(children); 2896 children.add(new Property("identifier", "Identifier", "DICOM Study Instance UID, and Accession Number.", 0, java.lang.Integer.MAX_VALUE, identifier)); 2897 children.add(new Property("status", "code", "The current state of the ImagingStudy.", 0, 1, status)); 2898 children.add(new Property("modality", "Coding", "A list of all the series.modality 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, modality)); 2899 children.add(new Property("subject", "Reference(Patient|Device|Group)", "The subject, typically a patient, of the imaging study.", 0, 1, subject)); 2900 children.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode at which the request is initiated.", 0, 1, context)); 2901 children.add(new Property("started", "dateTime", "Date and time the study started.", 0, 1, started)); 2902 children.add(new Property("basedOn", "Reference(CarePlan|ServiceRequest|Appointment|AppointmentResponse|Task)", "A list of the diagnostic requests that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 2903 children.add(new Property("referrer", "Reference(Practitioner)", "The requesting/referring physician.", 0, 1, referrer)); 2904 children.add(new Property("interpreter", "Reference(Practitioner)", "Who read the study and interpreted the images or other content.", 0, java.lang.Integer.MAX_VALUE, interpreter)); 2905 children.add(new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint)); 2906 children.add(new Property("numberOfSeries", "unsignedInt", "Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.", 0, 1, numberOfSeries)); 2907 children.add(new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances)); 2908 children.add(new Property("procedureReference", "Reference(Procedure)", "A reference to the performed Procedure.", 0, 1, procedureReference)); 2909 children.add(new Property("procedureCode", "CodeableConcept", "The code for the performed procedure type.", 0, java.lang.Integer.MAX_VALUE, procedureCode)); 2910 children.add(new Property("location", "Reference(Location)", "The principal physical location where the ImagingStudy was performed.", 0, 1, location)); 2911 children.add(new Property("reasonCode", "CodeableConcept", "Description of clinical condition indicating why the ImagingStudy was requested.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 2912 children.add(new Property("reasonReference", "Reference(Condition|Observation|Media|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this Study.", 0, java.lang.Integer.MAX_VALUE, reasonReference)); 2913 children.add(new Property("note", "Annotation", "Institution-generated description or classification of the Study performed.", 0, java.lang.Integer.MAX_VALUE, note)); 2914 children.add(new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series)); 2915 } 2916 2917 @Override 2918 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2919 switch (_hash) { 2920 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "DICOM Study Instance UID, and Accession Number.", 0, java.lang.Integer.MAX_VALUE, identifier); 2921 case -892481550: /*status*/ return new Property("status", "code", "The current state of the ImagingStudy.", 0, 1, status); 2922 case -622722335: /*modality*/ return new Property("modality", "Coding", "A list of all the series.modality 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, modality); 2923 case -1867885268: /*subject*/ return new Property("subject", "Reference(Patient|Device|Group)", "The subject, typically a patient, of the imaging study.", 0, 1, subject); 2924 case 951530927: /*context*/ return new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode at which the request is initiated.", 0, 1, context); 2925 case -1897185151: /*started*/ return new Property("started", "dateTime", "Date and time the study started.", 0, 1, started); 2926 case -332612366: /*basedOn*/ return new Property("basedOn", "Reference(CarePlan|ServiceRequest|Appointment|AppointmentResponse|Task)", "A list of the diagnostic requests that resulted in this imaging study being performed.", 0, java.lang.Integer.MAX_VALUE, basedOn); 2927 case -722568161: /*referrer*/ return new Property("referrer", "Reference(Practitioner)", "The requesting/referring physician.", 0, 1, referrer); 2928 case -2008009094: /*interpreter*/ return new Property("interpreter", "Reference(Practitioner)", "Who read the study and interpreted the images or other content.", 0, java.lang.Integer.MAX_VALUE, interpreter); 2929 case 1741102485: /*endpoint*/ return new Property("endpoint", "Reference(Endpoint)", "The network service providing access (e.g., query, view, or retrieval) for the study. See implementation notes for information about using DICOM endpoints. A study-level endpoint applies to each series in the study, unless overridden by a series-level endpoint with the same Endpoint.connectionType.", 0, java.lang.Integer.MAX_VALUE, endpoint); 2930 case 1920000407: /*numberOfSeries*/ return new Property("numberOfSeries", "unsignedInt", "Number of Series in the Study. This value given may be larger than the number of series elements this Resource contains due to resource availability, security, or other factors. This element should be present if any series elements are present.", 0, 1, numberOfSeries); 2931 case -1043544226: /*numberOfInstances*/ return new Property("numberOfInstances", "unsignedInt", "Number of SOP Instances in Study. This value given may be larger than the number of instance elements this resource contains due to resource availability, security, or other factors. This element should be present if any instance elements are present.", 0, 1, numberOfInstances); 2932 case 881809848: /*procedureReference*/ return new Property("procedureReference", "Reference(Procedure)", "A reference to the performed Procedure.", 0, 1, procedureReference); 2933 case -698023072: /*procedureCode*/ return new Property("procedureCode", "CodeableConcept", "The code for the performed procedure type.", 0, java.lang.Integer.MAX_VALUE, procedureCode); 2934 case 1901043637: /*location*/ return new Property("location", "Reference(Location)", "The principal physical location where the ImagingStudy was performed.", 0, 1, location); 2935 case 722137681: /*reasonCode*/ return new Property("reasonCode", "CodeableConcept", "Description of clinical condition indicating why the ImagingStudy was requested.", 0, java.lang.Integer.MAX_VALUE, reasonCode); 2936 case -1146218137: /*reasonReference*/ return new Property("reasonReference", "Reference(Condition|Observation|Media|DiagnosticReport|DocumentReference)", "Indicates another resource whose existence justifies this Study.", 0, java.lang.Integer.MAX_VALUE, reasonReference); 2937 case 3387378: /*note*/ return new Property("note", "Annotation", "Institution-generated description or classification of the Study performed.", 0, java.lang.Integer.MAX_VALUE, note); 2938 case -905838985: /*series*/ return new Property("series", "", "Each study has one or more series of images or other content.", 0, java.lang.Integer.MAX_VALUE, series); 2939 default: return super.getNamedProperty(_hash, _name, _checkValid); 2940 } 2941 2942 } 2943 2944 @Override 2945 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2946 switch (hash) { 2947 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 2948 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ImagingStudyStatus> 2949 case -622722335: /*modality*/ return this.modality == null ? new Base[0] : this.modality.toArray(new Base[this.modality.size()]); // Coding 2950 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 2951 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 2952 case -1897185151: /*started*/ return this.started == null ? new Base[0] : new Base[] {this.started}; // DateTimeType 2953 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 2954 case -722568161: /*referrer*/ return this.referrer == null ? new Base[0] : new Base[] {this.referrer}; // Reference 2955 case -2008009094: /*interpreter*/ return this.interpreter == null ? new Base[0] : this.interpreter.toArray(new Base[this.interpreter.size()]); // Reference 2956 case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : this.endpoint.toArray(new Base[this.endpoint.size()]); // Reference 2957 case 1920000407: /*numberOfSeries*/ return this.numberOfSeries == null ? new Base[0] : new Base[] {this.numberOfSeries}; // UnsignedIntType 2958 case -1043544226: /*numberOfInstances*/ return this.numberOfInstances == null ? new Base[0] : new Base[] {this.numberOfInstances}; // UnsignedIntType 2959 case 881809848: /*procedureReference*/ return this.procedureReference == null ? new Base[0] : new Base[] {this.procedureReference}; // Reference 2960 case -698023072: /*procedureCode*/ return this.procedureCode == null ? new Base[0] : this.procedureCode.toArray(new Base[this.procedureCode.size()]); // CodeableConcept 2961 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // Reference 2962 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 2963 case -1146218137: /*reasonReference*/ return this.reasonReference == null ? new Base[0] : this.reasonReference.toArray(new Base[this.reasonReference.size()]); // Reference 2964 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 2965 case -905838985: /*series*/ return this.series == null ? new Base[0] : this.series.toArray(new Base[this.series.size()]); // ImagingStudySeriesComponent 2966 default: return super.getProperty(hash, name, checkValid); 2967 } 2968 2969 } 2970 2971 @Override 2972 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2973 switch (hash) { 2974 case -1618432855: // identifier 2975 this.getIdentifier().add(castToIdentifier(value)); // Identifier 2976 return value; 2977 case -892481550: // status 2978 value = new ImagingStudyStatusEnumFactory().fromType(castToCode(value)); 2979 this.status = (Enumeration) value; // Enumeration<ImagingStudyStatus> 2980 return value; 2981 case -622722335: // modality 2982 this.getModality().add(castToCoding(value)); // Coding 2983 return value; 2984 case -1867885268: // subject 2985 this.subject = castToReference(value); // Reference 2986 return value; 2987 case 951530927: // context 2988 this.context = castToReference(value); // Reference 2989 return value; 2990 case -1897185151: // started 2991 this.started = castToDateTime(value); // DateTimeType 2992 return value; 2993 case -332612366: // basedOn 2994 this.getBasedOn().add(castToReference(value)); // Reference 2995 return value; 2996 case -722568161: // referrer 2997 this.referrer = castToReference(value); // Reference 2998 return value; 2999 case -2008009094: // interpreter 3000 this.getInterpreter().add(castToReference(value)); // Reference 3001 return value; 3002 case 1741102485: // endpoint 3003 this.getEndpoint().add(castToReference(value)); // Reference 3004 return value; 3005 case 1920000407: // numberOfSeries 3006 this.numberOfSeries = castToUnsignedInt(value); // UnsignedIntType 3007 return value; 3008 case -1043544226: // numberOfInstances 3009 this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType 3010 return value; 3011 case 881809848: // procedureReference 3012 this.procedureReference = castToReference(value); // Reference 3013 return value; 3014 case -698023072: // procedureCode 3015 this.getProcedureCode().add(castToCodeableConcept(value)); // CodeableConcept 3016 return value; 3017 case 1901043637: // location 3018 this.location = castToReference(value); // Reference 3019 return value; 3020 case 722137681: // reasonCode 3021 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 3022 return value; 3023 case -1146218137: // reasonReference 3024 this.getReasonReference().add(castToReference(value)); // Reference 3025 return value; 3026 case 3387378: // note 3027 this.getNote().add(castToAnnotation(value)); // Annotation 3028 return value; 3029 case -905838985: // series 3030 this.getSeries().add((ImagingStudySeriesComponent) value); // ImagingStudySeriesComponent 3031 return value; 3032 default: return super.setProperty(hash, name, value); 3033 } 3034 3035 } 3036 3037 @Override 3038 public Base setProperty(String name, Base value) throws FHIRException { 3039 if (name.equals("identifier")) { 3040 this.getIdentifier().add(castToIdentifier(value)); 3041 } else if (name.equals("status")) { 3042 value = new ImagingStudyStatusEnumFactory().fromType(castToCode(value)); 3043 this.status = (Enumeration) value; // Enumeration<ImagingStudyStatus> 3044 } else if (name.equals("modality")) { 3045 this.getModality().add(castToCoding(value)); 3046 } else if (name.equals("subject")) { 3047 this.subject = castToReference(value); // Reference 3048 } else if (name.equals("context")) { 3049 this.context = castToReference(value); // Reference 3050 } else if (name.equals("started")) { 3051 this.started = castToDateTime(value); // DateTimeType 3052 } else if (name.equals("basedOn")) { 3053 this.getBasedOn().add(castToReference(value)); 3054 } else if (name.equals("referrer")) { 3055 this.referrer = castToReference(value); // Reference 3056 } else if (name.equals("interpreter")) { 3057 this.getInterpreter().add(castToReference(value)); 3058 } else if (name.equals("endpoint")) { 3059 this.getEndpoint().add(castToReference(value)); 3060 } else if (name.equals("numberOfSeries")) { 3061 this.numberOfSeries = castToUnsignedInt(value); // UnsignedIntType 3062 } else if (name.equals("numberOfInstances")) { 3063 this.numberOfInstances = castToUnsignedInt(value); // UnsignedIntType 3064 } else if (name.equals("procedureReference")) { 3065 this.procedureReference = castToReference(value); // Reference 3066 } else if (name.equals("procedureCode")) { 3067 this.getProcedureCode().add(castToCodeableConcept(value)); 3068 } else if (name.equals("location")) { 3069 this.location = castToReference(value); // Reference 3070 } else if (name.equals("reasonCode")) { 3071 this.getReasonCode().add(castToCodeableConcept(value)); 3072 } else if (name.equals("reasonReference")) { 3073 this.getReasonReference().add(castToReference(value)); 3074 } else if (name.equals("note")) { 3075 this.getNote().add(castToAnnotation(value)); 3076 } else if (name.equals("series")) { 3077 this.getSeries().add((ImagingStudySeriesComponent) value); 3078 } else 3079 return super.setProperty(name, value); 3080 return value; 3081 } 3082 3083 @Override 3084 public Base makeProperty(int hash, String name) throws FHIRException { 3085 switch (hash) { 3086 case -1618432855: return addIdentifier(); 3087 case -892481550: return getStatusElement(); 3088 case -622722335: return addModality(); 3089 case -1867885268: return getSubject(); 3090 case 951530927: return getContext(); 3091 case -1897185151: return getStartedElement(); 3092 case -332612366: return addBasedOn(); 3093 case -722568161: return getReferrer(); 3094 case -2008009094: return addInterpreter(); 3095 case 1741102485: return addEndpoint(); 3096 case 1920000407: return getNumberOfSeriesElement(); 3097 case -1043544226: return getNumberOfInstancesElement(); 3098 case 881809848: return getProcedureReference(); 3099 case -698023072: return addProcedureCode(); 3100 case 1901043637: return getLocation(); 3101 case 722137681: return addReasonCode(); 3102 case -1146218137: return addReasonReference(); 3103 case 3387378: return addNote(); 3104 case -905838985: return addSeries(); 3105 default: return super.makeProperty(hash, name); 3106 } 3107 3108 } 3109 3110 @Override 3111 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3112 switch (hash) { 3113 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 3114 case -892481550: /*status*/ return new String[] {"code"}; 3115 case -622722335: /*modality*/ return new String[] {"Coding"}; 3116 case -1867885268: /*subject*/ return new String[] {"Reference"}; 3117 case 951530927: /*context*/ return new String[] {"Reference"}; 3118 case -1897185151: /*started*/ return new String[] {"dateTime"}; 3119 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 3120 case -722568161: /*referrer*/ return new String[] {"Reference"}; 3121 case -2008009094: /*interpreter*/ return new String[] {"Reference"}; 3122 case 1741102485: /*endpoint*/ return new String[] {"Reference"}; 3123 case 1920000407: /*numberOfSeries*/ return new String[] {"unsignedInt"}; 3124 case -1043544226: /*numberOfInstances*/ return new String[] {"unsignedInt"}; 3125 case 881809848: /*procedureReference*/ return new String[] {"Reference"}; 3126 case -698023072: /*procedureCode*/ return new String[] {"CodeableConcept"}; 3127 case 1901043637: /*location*/ return new String[] {"Reference"}; 3128 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 3129 case -1146218137: /*reasonReference*/ return new String[] {"Reference"}; 3130 case 3387378: /*note*/ return new String[] {"Annotation"}; 3131 case -905838985: /*series*/ return new String[] {}; 3132 default: return super.getTypesForProperty(hash, name); 3133 } 3134 3135 } 3136 3137 @Override 3138 public Base addChild(String name) throws FHIRException { 3139 if (name.equals("identifier")) { 3140 return addIdentifier(); 3141 } 3142 else if (name.equals("status")) { 3143 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.status"); 3144 } 3145 else if (name.equals("modality")) { 3146 return addModality(); 3147 } 3148 else if (name.equals("subject")) { 3149 this.subject = new Reference(); 3150 return this.subject; 3151 } 3152 else if (name.equals("context")) { 3153 this.context = new Reference(); 3154 return this.context; 3155 } 3156 else if (name.equals("started")) { 3157 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.started"); 3158 } 3159 else if (name.equals("basedOn")) { 3160 return addBasedOn(); 3161 } 3162 else if (name.equals("referrer")) { 3163 this.referrer = new Reference(); 3164 return this.referrer; 3165 } 3166 else if (name.equals("interpreter")) { 3167 return addInterpreter(); 3168 } 3169 else if (name.equals("endpoint")) { 3170 return addEndpoint(); 3171 } 3172 else if (name.equals("numberOfSeries")) { 3173 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfSeries"); 3174 } 3175 else if (name.equals("numberOfInstances")) { 3176 throw new FHIRException("Cannot call addChild on a primitive type ImagingStudy.numberOfInstances"); 3177 } 3178 else if (name.equals("procedureReference")) { 3179 this.procedureReference = new Reference(); 3180 return this.procedureReference; 3181 } 3182 else if (name.equals("procedureCode")) { 3183 return addProcedureCode(); 3184 } 3185 else if (name.equals("location")) { 3186 this.location = new Reference(); 3187 return this.location; 3188 } 3189 else if (name.equals("reasonCode")) { 3190 return addReasonCode(); 3191 } 3192 else if (name.equals("reasonReference")) { 3193 return addReasonReference(); 3194 } 3195 else if (name.equals("note")) { 3196 return addNote(); 3197 } 3198 else if (name.equals("series")) { 3199 return addSeries(); 3200 } 3201 else 3202 return super.addChild(name); 3203 } 3204 3205 public String fhirType() { 3206 return "ImagingStudy"; 3207 3208 } 3209 3210 public ImagingStudy copy() { 3211 ImagingStudy dst = new ImagingStudy(); 3212 copyValues(dst); 3213 if (identifier != null) { 3214 dst.identifier = new ArrayList<Identifier>(); 3215 for (Identifier i : identifier) 3216 dst.identifier.add(i.copy()); 3217 }; 3218 dst.status = status == null ? null : status.copy(); 3219 if (modality != null) { 3220 dst.modality = new ArrayList<Coding>(); 3221 for (Coding i : modality) 3222 dst.modality.add(i.copy()); 3223 }; 3224 dst.subject = subject == null ? null : subject.copy(); 3225 dst.context = context == null ? null : context.copy(); 3226 dst.started = started == null ? null : started.copy(); 3227 if (basedOn != null) { 3228 dst.basedOn = new ArrayList<Reference>(); 3229 for (Reference i : basedOn) 3230 dst.basedOn.add(i.copy()); 3231 }; 3232 dst.referrer = referrer == null ? null : referrer.copy(); 3233 if (interpreter != null) { 3234 dst.interpreter = new ArrayList<Reference>(); 3235 for (Reference i : interpreter) 3236 dst.interpreter.add(i.copy()); 3237 }; 3238 if (endpoint != null) { 3239 dst.endpoint = new ArrayList<Reference>(); 3240 for (Reference i : endpoint) 3241 dst.endpoint.add(i.copy()); 3242 }; 3243 dst.numberOfSeries = numberOfSeries == null ? null : numberOfSeries.copy(); 3244 dst.numberOfInstances = numberOfInstances == null ? null : numberOfInstances.copy(); 3245 dst.procedureReference = procedureReference == null ? null : procedureReference.copy(); 3246 if (procedureCode != null) { 3247 dst.procedureCode = new ArrayList<CodeableConcept>(); 3248 for (CodeableConcept i : procedureCode) 3249 dst.procedureCode.add(i.copy()); 3250 }; 3251 dst.location = location == null ? null : location.copy(); 3252 if (reasonCode != null) { 3253 dst.reasonCode = new ArrayList<CodeableConcept>(); 3254 for (CodeableConcept i : reasonCode) 3255 dst.reasonCode.add(i.copy()); 3256 }; 3257 if (reasonReference != null) { 3258 dst.reasonReference = new ArrayList<Reference>(); 3259 for (Reference i : reasonReference) 3260 dst.reasonReference.add(i.copy()); 3261 }; 3262 if (note != null) { 3263 dst.note = new ArrayList<Annotation>(); 3264 for (Annotation i : note) 3265 dst.note.add(i.copy()); 3266 }; 3267 if (series != null) { 3268 dst.series = new ArrayList<ImagingStudySeriesComponent>(); 3269 for (ImagingStudySeriesComponent i : series) 3270 dst.series.add(i.copy()); 3271 }; 3272 return dst; 3273 } 3274 3275 protected ImagingStudy typedCopy() { 3276 return copy(); 3277 } 3278 3279 @Override 3280 public boolean equalsDeep(Base other_) { 3281 if (!super.equalsDeep(other_)) 3282 return false; 3283 if (!(other_ instanceof ImagingStudy)) 3284 return false; 3285 ImagingStudy o = (ImagingStudy) other_; 3286 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(modality, o.modality, true) 3287 && compareDeep(subject, o.subject, true) && compareDeep(context, o.context, true) && compareDeep(started, o.started, true) 3288 && compareDeep(basedOn, o.basedOn, true) && compareDeep(referrer, o.referrer, true) && compareDeep(interpreter, o.interpreter, true) 3289 && compareDeep(endpoint, o.endpoint, true) && compareDeep(numberOfSeries, o.numberOfSeries, true) 3290 && compareDeep(numberOfInstances, o.numberOfInstances, true) && compareDeep(procedureReference, o.procedureReference, true) 3291 && compareDeep(procedureCode, o.procedureCode, true) && compareDeep(location, o.location, true) 3292 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(reasonReference, o.reasonReference, true) 3293 && compareDeep(note, o.note, true) && compareDeep(series, o.series, true); 3294 } 3295 3296 @Override 3297 public boolean equalsShallow(Base other_) { 3298 if (!super.equalsShallow(other_)) 3299 return false; 3300 if (!(other_ instanceof ImagingStudy)) 3301 return false; 3302 ImagingStudy o = (ImagingStudy) other_; 3303 return compareValues(status, o.status, true) && compareValues(started, o.started, true) && compareValues(numberOfSeries, o.numberOfSeries, true) 3304 && compareValues(numberOfInstances, o.numberOfInstances, true); 3305 } 3306 3307 public boolean isEmpty() { 3308 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, modality 3309 , subject, context, started, basedOn, referrer, interpreter, endpoint, numberOfSeries 3310 , numberOfInstances, procedureReference, procedureCode, location, reasonCode, reasonReference 3311 , note, series); 3312 } 3313 3314 @Override 3315 public ResourceType getResourceType() { 3316 return ResourceType.ImagingStudy; 3317 } 3318 3319 /** 3320 * Search parameter: <b>identifier</b> 3321 * <p> 3322 * Description: <b>Other identifiers for the Study</b><br> 3323 * Type: <b>token</b><br> 3324 * Path: <b>ImagingStudy.identifier</b><br> 3325 * </p> 3326 */ 3327 @SearchParamDefinition(name="identifier", path="ImagingStudy.identifier", description="Other identifiers for the Study", type="token" ) 3328 public static final String SP_IDENTIFIER = "identifier"; 3329 /** 3330 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3331 * <p> 3332 * Description: <b>Other identifiers for the Study</b><br> 3333 * Type: <b>token</b><br> 3334 * Path: <b>ImagingStudy.identifier</b><br> 3335 * </p> 3336 */ 3337 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 3338 3339 /** 3340 * Search parameter: <b>reason</b> 3341 * <p> 3342 * Description: <b>The reason for the study</b><br> 3343 * Type: <b>token</b><br> 3344 * Path: <b>ImagingStudy.reasonCode</b><br> 3345 * </p> 3346 */ 3347 @SearchParamDefinition(name="reason", path="ImagingStudy.reasonCode", description="The reason for the study", type="token" ) 3348 public static final String SP_REASON = "reason"; 3349 /** 3350 * <b>Fluent Client</b> search parameter constant for <b>reason</b> 3351 * <p> 3352 * Description: <b>The reason for the study</b><br> 3353 * Type: <b>token</b><br> 3354 * Path: <b>ImagingStudy.reasonCode</b><br> 3355 * </p> 3356 */ 3357 public static final ca.uhn.fhir.rest.gclient.TokenClientParam REASON = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_REASON); 3358 3359 /** 3360 * Search parameter: <b>study</b> 3361 * <p> 3362 * Description: <b>The study identifier for the image</b><br> 3363 * Type: <b>token</b><br> 3364 * Path: <b>ImagingStudy.identifier</b><br> 3365 * </p> 3366 */ 3367 @SearchParamDefinition(name="study", path="ImagingStudy.identifier", description="The study identifier for the image", type="token" ) 3368 public static final String SP_STUDY = "study"; 3369 /** 3370 * <b>Fluent Client</b> search parameter constant for <b>study</b> 3371 * <p> 3372 * Description: <b>The study identifier for the image</b><br> 3373 * Type: <b>token</b><br> 3374 * Path: <b>ImagingStudy.identifier</b><br> 3375 * </p> 3376 */ 3377 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STUDY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STUDY); 3378 3379 /** 3380 * Search parameter: <b>dicom-class</b> 3381 * <p> 3382 * Description: <b>The type of the instance</b><br> 3383 * Type: <b>token</b><br> 3384 * Path: <b>ImagingStudy.series.instance.sopClass</b><br> 3385 * </p> 3386 */ 3387 @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopClass", description="The type of the instance", type="token" ) 3388 public static final String SP_DICOM_CLASS = "dicom-class"; 3389 /** 3390 * <b>Fluent Client</b> search parameter constant for <b>dicom-class</b> 3391 * <p> 3392 * Description: <b>The type of the instance</b><br> 3393 * Type: <b>token</b><br> 3394 * Path: <b>ImagingStudy.series.instance.sopClass</b><br> 3395 * </p> 3396 */ 3397 public static final ca.uhn.fhir.rest.gclient.TokenClientParam DICOM_CLASS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_DICOM_CLASS); 3398 3399 /** 3400 * Search parameter: <b>modality</b> 3401 * <p> 3402 * Description: <b>The modality of the series</b><br> 3403 * Type: <b>token</b><br> 3404 * Path: <b>ImagingStudy.series.modality</b><br> 3405 * </p> 3406 */ 3407 @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the series", type="token" ) 3408 public static final String SP_MODALITY = "modality"; 3409 /** 3410 * <b>Fluent Client</b> search parameter constant for <b>modality</b> 3411 * <p> 3412 * Description: <b>The modality of the series</b><br> 3413 * Type: <b>token</b><br> 3414 * Path: <b>ImagingStudy.series.modality</b><br> 3415 * </p> 3416 */ 3417 public static final ca.uhn.fhir.rest.gclient.TokenClientParam MODALITY = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_MODALITY); 3418 3419 /** 3420 * Search parameter: <b>bodysite</b> 3421 * <p> 3422 * Description: <b>The body site studied</b><br> 3423 * Type: <b>token</b><br> 3424 * Path: <b>ImagingStudy.series.bodySite</b><br> 3425 * </p> 3426 */ 3427 @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="The body site studied", type="token" ) 3428 public static final String SP_BODYSITE = "bodysite"; 3429 /** 3430 * <b>Fluent Client</b> search parameter constant for <b>bodysite</b> 3431 * <p> 3432 * Description: <b>The body site studied</b><br> 3433 * Type: <b>token</b><br> 3434 * Path: <b>ImagingStudy.series.bodySite</b><br> 3435 * </p> 3436 */ 3437 public static final ca.uhn.fhir.rest.gclient.TokenClientParam BODYSITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_BODYSITE); 3438 3439 /** 3440 * Search parameter: <b>performer</b> 3441 * <p> 3442 * Description: <b>The person who performed the study</b><br> 3443 * Type: <b>reference</b><br> 3444 * Path: <b>ImagingStudy.series.performer.actor</b><br> 3445 * </p> 3446 */ 3447 @SearchParamDefinition(name="performer", path="ImagingStudy.series.performer.actor", description="The person who performed the study", type="reference", target={CareTeam.class, Device.class, Organization.class, Patient.class, Practitioner.class, PractitionerRole.class, RelatedPerson.class } ) 3448 public static final String SP_PERFORMER = "performer"; 3449 /** 3450 * <b>Fluent Client</b> search parameter constant for <b>performer</b> 3451 * <p> 3452 * Description: <b>The person who performed the study</b><br> 3453 * Type: <b>reference</b><br> 3454 * Path: <b>ImagingStudy.series.performer.actor</b><br> 3455 * </p> 3456 */ 3457 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PERFORMER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PERFORMER); 3458 3459/** 3460 * Constant for fluent queries to be used to add include statements. Specifies 3461 * the path value of "<b>ImagingStudy:performer</b>". 3462 */ 3463 public static final ca.uhn.fhir.model.api.Include INCLUDE_PERFORMER = new ca.uhn.fhir.model.api.Include("ImagingStudy:performer").toLocked(); 3464 3465 /** 3466 * Search parameter: <b>subject</b> 3467 * <p> 3468 * Description: <b>Who the study is about</b><br> 3469 * Type: <b>reference</b><br> 3470 * Path: <b>ImagingStudy.subject</b><br> 3471 * </p> 3472 */ 3473 @SearchParamDefinition(name="subject", path="ImagingStudy.subject", description="Who the study is about", type="reference", target={Device.class, Group.class, Patient.class } ) 3474 public static final String SP_SUBJECT = "subject"; 3475 /** 3476 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 3477 * <p> 3478 * Description: <b>Who the study is about</b><br> 3479 * Type: <b>reference</b><br> 3480 * Path: <b>ImagingStudy.subject</b><br> 3481 * </p> 3482 */ 3483 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 3484 3485/** 3486 * Constant for fluent queries to be used to add include statements. Specifies 3487 * the path value of "<b>ImagingStudy:subject</b>". 3488 */ 3489 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("ImagingStudy:subject").toLocked(); 3490 3491 /** 3492 * Search parameter: <b>started</b> 3493 * <p> 3494 * Description: <b>When the study was started</b><br> 3495 * Type: <b>date</b><br> 3496 * Path: <b>ImagingStudy.started</b><br> 3497 * </p> 3498 */ 3499 @SearchParamDefinition(name="started", path="ImagingStudy.started", description="When the study was started", type="date" ) 3500 public static final String SP_STARTED = "started"; 3501 /** 3502 * <b>Fluent Client</b> search parameter constant for <b>started</b> 3503 * <p> 3504 * Description: <b>When the study was started</b><br> 3505 * Type: <b>date</b><br> 3506 * Path: <b>ImagingStudy.started</b><br> 3507 * </p> 3508 */ 3509 public static final ca.uhn.fhir.rest.gclient.DateClientParam STARTED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_STARTED); 3510 3511 /** 3512 * Search parameter: <b>accession</b> 3513 * <p> 3514 * Description: <b>The accession identifier for the study</b><br> 3515 * Type: <b>token</b><br> 3516 * Path: <b>ImagingStudy.identifier</b><br> 3517 * </p> 3518 */ 3519 @SearchParamDefinition(name="accession", path="ImagingStudy.identifier", description="The accession identifier for the study", type="token" ) 3520 public static final String SP_ACCESSION = "accession"; 3521 /** 3522 * <b>Fluent Client</b> search parameter constant for <b>accession</b> 3523 * <p> 3524 * Description: <b>The accession identifier for the study</b><br> 3525 * Type: <b>token</b><br> 3526 * Path: <b>ImagingStudy.identifier</b><br> 3527 * </p> 3528 */ 3529 public static final ca.uhn.fhir.rest.gclient.TokenClientParam ACCESSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_ACCESSION); 3530 3531 /** 3532 * Search parameter: <b>inst-id</b> 3533 * <p> 3534 * Description: <b>The instance unique identifier</b><br> 3535 * Type: <b>token</b><br> 3536 * Path: <b>ImagingStudy.series.instance.identifier</b><br> 3537 * </p> 3538 */ 3539 @SearchParamDefinition(name="inst-id", path="ImagingStudy.series.instance.identifier", description="The instance unique identifier", type="token" ) 3540 public static final String SP_INST_ID = "inst-id"; 3541 /** 3542 * <b>Fluent Client</b> search parameter constant for <b>inst-id</b> 3543 * <p> 3544 * Description: <b>The instance unique identifier</b><br> 3545 * Type: <b>token</b><br> 3546 * Path: <b>ImagingStudy.series.instance.identifier</b><br> 3547 * </p> 3548 */ 3549 public static final ca.uhn.fhir.rest.gclient.TokenClientParam INST_ID = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INST_ID); 3550 3551 /** 3552 * Search parameter: <b>endpoint</b> 3553 * <p> 3554 * Description: <b>The endpoint for the study or series</b><br> 3555 * Type: <b>reference</b><br> 3556 * Path: <b>ImagingStudy.endpoint, ImagingStudy.series.endpoint</b><br> 3557 * </p> 3558 */ 3559 @SearchParamDefinition(name="endpoint", path="ImagingStudy.endpoint | ImagingStudy.series.endpoint", description="The endpoint for the study or series", type="reference", target={Endpoint.class } ) 3560 public static final String SP_ENDPOINT = "endpoint"; 3561 /** 3562 * <b>Fluent Client</b> search parameter constant for <b>endpoint</b> 3563 * <p> 3564 * Description: <b>The endpoint for the study or series</b><br> 3565 * Type: <b>reference</b><br> 3566 * Path: <b>ImagingStudy.endpoint, ImagingStudy.series.endpoint</b><br> 3567 * </p> 3568 */ 3569 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ENDPOINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ENDPOINT); 3570 3571/** 3572 * Constant for fluent queries to be used to add include statements. Specifies 3573 * the path value of "<b>ImagingStudy:endpoint</b>". 3574 */ 3575 public static final ca.uhn.fhir.model.api.Include INCLUDE_ENDPOINT = new ca.uhn.fhir.model.api.Include("ImagingStudy:endpoint").toLocked(); 3576 3577 /** 3578 * Search parameter: <b>patient</b> 3579 * <p> 3580 * Description: <b>Who the study is about</b><br> 3581 * Type: <b>reference</b><br> 3582 * Path: <b>ImagingStudy.subject</b><br> 3583 * </p> 3584 */ 3585 @SearchParamDefinition(name="patient", path="ImagingStudy.subject", description="Who the study is about", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient") }, target={Patient.class } ) 3586 public static final String SP_PATIENT = "patient"; 3587 /** 3588 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 3589 * <p> 3590 * Description: <b>Who the study is about</b><br> 3591 * Type: <b>reference</b><br> 3592 * Path: <b>ImagingStudy.subject</b><br> 3593 * </p> 3594 */ 3595 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 3596 3597/** 3598 * Constant for fluent queries to be used to add include statements. Specifies 3599 * the path value of "<b>ImagingStudy:patient</b>". 3600 */ 3601 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImagingStudy:patient").toLocked(); 3602 3603 /** 3604 * Search parameter: <b>series</b> 3605 * <p> 3606 * Description: <b>The identifier of the series of images</b><br> 3607 * Type: <b>token</b><br> 3608 * Path: <b>ImagingStudy.series.identifier</b><br> 3609 * </p> 3610 */ 3611 @SearchParamDefinition(name="series", path="ImagingStudy.series.identifier", description="The identifier of the series of images", type="token" ) 3612 public static final String SP_SERIES = "series"; 3613 /** 3614 * <b>Fluent Client</b> search parameter constant for <b>series</b> 3615 * <p> 3616 * Description: <b>The identifier of the series of images</b><br> 3617 * Type: <b>token</b><br> 3618 * Path: <b>ImagingStudy.series.identifier</b><br> 3619 * </p> 3620 */ 3621 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SERIES = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SERIES); 3622 3623 /** 3624 * Search parameter: <b>context</b> 3625 * <p> 3626 * Description: <b>The context of the study</b><br> 3627 * Type: <b>reference</b><br> 3628 * Path: <b>ImagingStudy.context</b><br> 3629 * </p> 3630 */ 3631 @SearchParamDefinition(name="context", path="ImagingStudy.context", description="The context of the study", type="reference", target={Encounter.class, EpisodeOfCare.class } ) 3632 public static final String SP_CONTEXT = "context"; 3633 /** 3634 * <b>Fluent Client</b> search parameter constant for <b>context</b> 3635 * <p> 3636 * Description: <b>The context of the study</b><br> 3637 * Type: <b>reference</b><br> 3638 * Path: <b>ImagingStudy.context</b><br> 3639 * </p> 3640 */ 3641 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 3642 3643/** 3644 * Constant for fluent queries to be used to add include statements. Specifies 3645 * the path value of "<b>ImagingStudy:context</b>". 3646 */ 3647 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("ImagingStudy:context").toLocked(); 3648 3649 /** 3650 * Search parameter: <b>basedon</b> 3651 * <p> 3652 * Description: <b>The order for the image</b><br> 3653 * Type: <b>reference</b><br> 3654 * Path: <b>ImagingStudy.basedOn</b><br> 3655 * </p> 3656 */ 3657 @SearchParamDefinition(name="basedon", path="ImagingStudy.basedOn", description="The order for the image", type="reference", target={Appointment.class, AppointmentResponse.class, CarePlan.class, ServiceRequest.class, Task.class } ) 3658 public static final String SP_BASEDON = "basedon"; 3659 /** 3660 * <b>Fluent Client</b> search parameter constant for <b>basedon</b> 3661 * <p> 3662 * Description: <b>The order for the image</b><br> 3663 * Type: <b>reference</b><br> 3664 * Path: <b>ImagingStudy.basedOn</b><br> 3665 * </p> 3666 */ 3667 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASEDON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASEDON); 3668 3669/** 3670 * Constant for fluent queries to be used to add include statements. Specifies 3671 * the path value of "<b>ImagingStudy:basedon</b>". 3672 */ 3673 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASEDON = new ca.uhn.fhir.model.api.Include("ImagingStudy:basedon").toLocked(); 3674 3675 /** 3676 * Search parameter: <b>status</b> 3677 * <p> 3678 * Description: <b>The status of the study</b><br> 3679 * Type: <b>token</b><br> 3680 * Path: <b>ImagingStudy.status</b><br> 3681 * </p> 3682 */ 3683 @SearchParamDefinition(name="status", path="ImagingStudy.status", description="The status of the study", type="token" ) 3684 public static final String SP_STATUS = "status"; 3685 /** 3686 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3687 * <p> 3688 * Description: <b>The status of the study</b><br> 3689 * Type: <b>token</b><br> 3690 * Path: <b>ImagingStudy.status</b><br> 3691 * </p> 3692 */ 3693 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3694 3695 3696} 3697