001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 042import org.hl7.fhir.utilities.Utilities; 043 044import ca.uhn.fhir.model.api.annotation.Block; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.Description; 047import ca.uhn.fhir.model.api.annotation.ResourceDef; 048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 049/** 050 * A manifest of a set of DICOM Service-Object Pair Instances (SOP Instances). The referenced SOP Instances (images or other content) are for a single patient, and may be from one or more studies. The referenced SOP Instances have been selected for a purpose, such as quality assurance, conference, or consult. Reflecting that range of purposes, typical ImagingExcerpt resources may include all SOP Instances in a study (perhaps for sharing through a Health Information Exchange); key images from multiple studies (for reference by a referring or treating physician); a multi-frame ultrasound instance ("cine" video clip) and a set of measurements taken from that instance (for inclusion in a teaching file); and so on. 051 */ 052@ResourceDef(name="ImagingExcerpt", profile="http://hl7.org/fhir/Profile/ImagingExcerpt") 053public class ImagingExcerpt extends DomainResource { 054 055 public enum DWebType { 056 /** 057 * Web Access to DICOM Persistent Objects - RESTful Services 058 */ 059 WADORS, 060 /** 061 * Web Access to DICOM Persistent Objects - URI 062 */ 063 WADOURI, 064 /** 065 * IHE - Invoke Image Display Profile 066 */ 067 IID, 068 /** 069 * Web Access to DICOM Persistent Objects - Web Services 070 */ 071 WADOWS, 072 /** 073 * added to help the parsers 074 */ 075 NULL; 076 public static DWebType fromCode(String codeString) throws FHIRException { 077 if (codeString == null || "".equals(codeString)) 078 return null; 079 if ("WADO-RS".equals(codeString)) 080 return WADORS; 081 if ("WADO-URI".equals(codeString)) 082 return WADOURI; 083 if ("IID".equals(codeString)) 084 return IID; 085 if ("WADO-WS".equals(codeString)) 086 return WADOWS; 087 throw new FHIRException("Unknown DWebType code '"+codeString+"'"); 088 } 089 public String toCode() { 090 switch (this) { 091 case WADORS: return "WADO-RS"; 092 case WADOURI: return "WADO-URI"; 093 case IID: return "IID"; 094 case WADOWS: return "WADO-WS"; 095 case NULL: return null; 096 default: return "?"; 097 } 098 } 099 public String getSystem() { 100 switch (this) { 101 case WADORS: return "http://hl7.org/fhir/dWebType"; 102 case WADOURI: return "http://hl7.org/fhir/dWebType"; 103 case IID: return "http://hl7.org/fhir/dWebType"; 104 case WADOWS: return "http://hl7.org/fhir/dWebType"; 105 case NULL: return null; 106 default: return "?"; 107 } 108 } 109 public String getDefinition() { 110 switch (this) { 111 case WADORS: return "Web Access to DICOM Persistent Objects - RESTful Services"; 112 case WADOURI: return "Web Access to DICOM Persistent Objects - URI"; 113 case IID: return "IHE - Invoke Image Display Profile"; 114 case WADOWS: return "Web Access to DICOM Persistent Objects - Web Services"; 115 case NULL: return null; 116 default: return "?"; 117 } 118 } 119 public String getDisplay() { 120 switch (this) { 121 case WADORS: return "WADO-RS"; 122 case WADOURI: return "WADO-URI"; 123 case IID: return "IID"; 124 case WADOWS: return "WADO-WS"; 125 case NULL: return null; 126 default: return "?"; 127 } 128 } 129 } 130 131 public static class DWebTypeEnumFactory implements EnumFactory<DWebType> { 132 public DWebType fromCode(String codeString) throws IllegalArgumentException { 133 if (codeString == null || "".equals(codeString)) 134 if (codeString == null || "".equals(codeString)) 135 return null; 136 if ("WADO-RS".equals(codeString)) 137 return DWebType.WADORS; 138 if ("WADO-URI".equals(codeString)) 139 return DWebType.WADOURI; 140 if ("IID".equals(codeString)) 141 return DWebType.IID; 142 if ("WADO-WS".equals(codeString)) 143 return DWebType.WADOWS; 144 throw new IllegalArgumentException("Unknown DWebType code '"+codeString+"'"); 145 } 146 public Enumeration<DWebType> fromType(Base code) throws FHIRException { 147 if (code == null || code.isEmpty()) 148 return null; 149 String codeString = ((PrimitiveType) code).asStringValue(); 150 if (codeString == null || "".equals(codeString)) 151 return null; 152 if ("WADO-RS".equals(codeString)) 153 return new Enumeration<DWebType>(this, DWebType.WADORS); 154 if ("WADO-URI".equals(codeString)) 155 return new Enumeration<DWebType>(this, DWebType.WADOURI); 156 if ("IID".equals(codeString)) 157 return new Enumeration<DWebType>(this, DWebType.IID); 158 if ("WADO-WS".equals(codeString)) 159 return new Enumeration<DWebType>(this, DWebType.WADOWS); 160 throw new FHIRException("Unknown DWebType code '"+codeString+"'"); 161 } 162 public String toCode(DWebType code) { 163 if (code == DWebType.WADORS) 164 return "WADO-RS"; 165 if (code == DWebType.WADOURI) 166 return "WADO-URI"; 167 if (code == DWebType.IID) 168 return "IID"; 169 if (code == DWebType.WADOWS) 170 return "WADO-WS"; 171 return "?"; 172 } 173 public String toSystem(DWebType code) { 174 return code.getSystem(); 175 } 176 } 177 178 @Block() 179 public static class StudyComponent extends BackboneElement implements IBaseBackboneElement { 180 /** 181 * Study instance UID of the SOP instances in the selection. 182 */ 183 @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) 184 @Description(shortDefinition="Study instance UID", formalDefinition="Study instance UID of the SOP instances in the selection." ) 185 protected OidType uid; 186 187 /** 188 * Reference to the Imaging Study in FHIR form. 189 */ 190 @Child(name = "imagingStudy", type = {ImagingStudy.class}, order=2, min=0, max=1, modifier=false, summary=true) 191 @Description(shortDefinition="Reference to ImagingStudy", formalDefinition="Reference to the Imaging Study in FHIR form." ) 192 protected Reference imagingStudy; 193 194 /** 195 * The actual object that is the target of the reference (Reference to the Imaging Study in FHIR form.) 196 */ 197 protected ImagingStudy imagingStudyTarget; 198 199 /** 200 * Methods of accessing using DICOM web technologies. 201 */ 202 @Child(name = "dicom", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 203 @Description(shortDefinition="Dicom web access", formalDefinition="Methods of accessing using DICOM web technologies." ) 204 protected List<StudyDicomComponent> dicom; 205 206 /** 207 * A set of viewable reference images of various types. 208 */ 209 @Child(name = "viewable", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 210 @Description(shortDefinition="Viewable format", formalDefinition="A set of viewable reference images of various types." ) 211 protected List<StudyViewableComponent> viewable; 212 213 /** 214 * Series identity and locating information of the DICOM SOP instances in the selection. 215 */ 216 @Child(name = "series", type = {}, order=5, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 217 @Description(shortDefinition="Series identity of the selected instances", formalDefinition="Series identity and locating information of the DICOM SOP instances in the selection." ) 218 protected List<SeriesComponent> series; 219 220 private static final long serialVersionUID = 1674060080L; 221 222 /** 223 * Constructor 224 */ 225 public StudyComponent() { 226 super(); 227 } 228 229 /** 230 * Constructor 231 */ 232 public StudyComponent(OidType uid) { 233 super(); 234 this.uid = uid; 235 } 236 237 /** 238 * @return {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 239 */ 240 public OidType getUidElement() { 241 if (this.uid == null) 242 if (Configuration.errorOnAutoCreate()) 243 throw new Error("Attempt to auto-create StudyComponent.uid"); 244 else if (Configuration.doAutoCreate()) 245 this.uid = new OidType(); // bb 246 return this.uid; 247 } 248 249 public boolean hasUidElement() { 250 return this.uid != null && !this.uid.isEmpty(); 251 } 252 253 public boolean hasUid() { 254 return this.uid != null && !this.uid.isEmpty(); 255 } 256 257 /** 258 * @param value {@link #uid} (Study instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 259 */ 260 public StudyComponent setUidElement(OidType value) { 261 this.uid = value; 262 return this; 263 } 264 265 /** 266 * @return Study instance UID of the SOP instances in the selection. 267 */ 268 public String getUid() { 269 return this.uid == null ? null : this.uid.getValue(); 270 } 271 272 /** 273 * @param value Study instance UID of the SOP instances in the selection. 274 */ 275 public StudyComponent setUid(String value) { 276 if (this.uid == null) 277 this.uid = new OidType(); 278 this.uid.setValue(value); 279 return this; 280 } 281 282 /** 283 * @return {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.) 284 */ 285 public Reference getImagingStudy() { 286 if (this.imagingStudy == null) 287 if (Configuration.errorOnAutoCreate()) 288 throw new Error("Attempt to auto-create StudyComponent.imagingStudy"); 289 else if (Configuration.doAutoCreate()) 290 this.imagingStudy = new Reference(); // cc 291 return this.imagingStudy; 292 } 293 294 public boolean hasImagingStudy() { 295 return this.imagingStudy != null && !this.imagingStudy.isEmpty(); 296 } 297 298 /** 299 * @param value {@link #imagingStudy} (Reference to the Imaging Study in FHIR form.) 300 */ 301 public StudyComponent setImagingStudy(Reference value) { 302 this.imagingStudy = value; 303 return this; 304 } 305 306 /** 307 * @return {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.) 308 */ 309 public ImagingStudy getImagingStudyTarget() { 310 if (this.imagingStudyTarget == null) 311 if (Configuration.errorOnAutoCreate()) 312 throw new Error("Attempt to auto-create StudyComponent.imagingStudy"); 313 else if (Configuration.doAutoCreate()) 314 this.imagingStudyTarget = new ImagingStudy(); // aa 315 return this.imagingStudyTarget; 316 } 317 318 /** 319 * @param value {@link #imagingStudy} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the Imaging Study in FHIR form.) 320 */ 321 public StudyComponent setImagingStudyTarget(ImagingStudy value) { 322 this.imagingStudyTarget = value; 323 return this; 324 } 325 326 /** 327 * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) 328 */ 329 public List<StudyDicomComponent> getDicom() { 330 if (this.dicom == null) 331 this.dicom = new ArrayList<StudyDicomComponent>(); 332 return this.dicom; 333 } 334 335 public boolean hasDicom() { 336 if (this.dicom == null) 337 return false; 338 for (StudyDicomComponent item : this.dicom) 339 if (!item.isEmpty()) 340 return true; 341 return false; 342 } 343 344 /** 345 * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) 346 */ 347 // syntactic sugar 348 public StudyDicomComponent addDicom() { //3 349 StudyDicomComponent t = new StudyDicomComponent(); 350 if (this.dicom == null) 351 this.dicom = new ArrayList<StudyDicomComponent>(); 352 this.dicom.add(t); 353 return t; 354 } 355 356 // syntactic sugar 357 public StudyComponent addDicom(StudyDicomComponent t) { //3 358 if (t == null) 359 return this; 360 if (this.dicom == null) 361 this.dicom = new ArrayList<StudyDicomComponent>(); 362 this.dicom.add(t); 363 return this; 364 } 365 366 /** 367 * @return {@link #viewable} (A set of viewable reference images of various types.) 368 */ 369 public List<StudyViewableComponent> getViewable() { 370 if (this.viewable == null) 371 this.viewable = new ArrayList<StudyViewableComponent>(); 372 return this.viewable; 373 } 374 375 public boolean hasViewable() { 376 if (this.viewable == null) 377 return false; 378 for (StudyViewableComponent item : this.viewable) 379 if (!item.isEmpty()) 380 return true; 381 return false; 382 } 383 384 /** 385 * @return {@link #viewable} (A set of viewable reference images of various types.) 386 */ 387 // syntactic sugar 388 public StudyViewableComponent addViewable() { //3 389 StudyViewableComponent t = new StudyViewableComponent(); 390 if (this.viewable == null) 391 this.viewable = new ArrayList<StudyViewableComponent>(); 392 this.viewable.add(t); 393 return t; 394 } 395 396 // syntactic sugar 397 public StudyComponent addViewable(StudyViewableComponent t) { //3 398 if (t == null) 399 return this; 400 if (this.viewable == null) 401 this.viewable = new ArrayList<StudyViewableComponent>(); 402 this.viewable.add(t); 403 return this; 404 } 405 406 /** 407 * @return {@link #series} (Series identity and locating information of the DICOM SOP instances in the selection.) 408 */ 409 public List<SeriesComponent> getSeries() { 410 if (this.series == null) 411 this.series = new ArrayList<SeriesComponent>(); 412 return this.series; 413 } 414 415 public boolean hasSeries() { 416 if (this.series == null) 417 return false; 418 for (SeriesComponent item : this.series) 419 if (!item.isEmpty()) 420 return true; 421 return false; 422 } 423 424 /** 425 * @return {@link #series} (Series identity and locating information of the DICOM SOP instances in the selection.) 426 */ 427 // syntactic sugar 428 public SeriesComponent addSeries() { //3 429 SeriesComponent t = new SeriesComponent(); 430 if (this.series == null) 431 this.series = new ArrayList<SeriesComponent>(); 432 this.series.add(t); 433 return t; 434 } 435 436 // syntactic sugar 437 public StudyComponent addSeries(SeriesComponent t) { //3 438 if (t == null) 439 return this; 440 if (this.series == null) 441 this.series = new ArrayList<SeriesComponent>(); 442 this.series.add(t); 443 return this; 444 } 445 446 protected void listChildren(List<Property> childrenList) { 447 super.listChildren(childrenList); 448 childrenList.add(new Property("uid", "oid", "Study instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid)); 449 childrenList.add(new Property("imagingStudy", "Reference(ImagingStudy)", "Reference to the Imaging Study in FHIR form.", 0, java.lang.Integer.MAX_VALUE, imagingStudy)); 450 childrenList.add(new Property("dicom", "", "Methods of accessing using DICOM web technologies.", 0, java.lang.Integer.MAX_VALUE, dicom)); 451 childrenList.add(new Property("viewable", "", "A set of viewable reference images of various types.", 0, java.lang.Integer.MAX_VALUE, viewable)); 452 childrenList.add(new Property("series", "", "Series identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, series)); 453 } 454 455 @Override 456 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 457 switch (hash) { 458 case 115792: /*uid*/ return this.uid == null ? new Base[0] : new Base[] {this.uid}; // OidType 459 case -814900911: /*imagingStudy*/ return this.imagingStudy == null ? new Base[0] : new Base[] {this.imagingStudy}; // Reference 460 case 95578844: /*dicom*/ return this.dicom == null ? new Base[0] : this.dicom.toArray(new Base[this.dicom.size()]); // StudyDicomComponent 461 case 1196225919: /*viewable*/ return this.viewable == null ? new Base[0] : this.viewable.toArray(new Base[this.viewable.size()]); // StudyViewableComponent 462 case -905838985: /*series*/ return this.series == null ? new Base[0] : this.series.toArray(new Base[this.series.size()]); // SeriesComponent 463 default: return super.getProperty(hash, name, checkValid); 464 } 465 466 } 467 468 @Override 469 public void setProperty(int hash, String name, Base value) throws FHIRException { 470 switch (hash) { 471 case 115792: // uid 472 this.uid = castToOid(value); // OidType 473 break; 474 case -814900911: // imagingStudy 475 this.imagingStudy = castToReference(value); // Reference 476 break; 477 case 95578844: // dicom 478 this.getDicom().add((StudyDicomComponent) value); // StudyDicomComponent 479 break; 480 case 1196225919: // viewable 481 this.getViewable().add((StudyViewableComponent) value); // StudyViewableComponent 482 break; 483 case -905838985: // series 484 this.getSeries().add((SeriesComponent) value); // SeriesComponent 485 break; 486 default: super.setProperty(hash, name, value); 487 } 488 489 } 490 491 @Override 492 public void setProperty(String name, Base value) throws FHIRException { 493 if (name.equals("uid")) 494 this.uid = castToOid(value); // OidType 495 else if (name.equals("imagingStudy")) 496 this.imagingStudy = castToReference(value); // Reference 497 else if (name.equals("dicom")) 498 this.getDicom().add((StudyDicomComponent) value); 499 else if (name.equals("viewable")) 500 this.getViewable().add((StudyViewableComponent) value); 501 else if (name.equals("series")) 502 this.getSeries().add((SeriesComponent) value); 503 else 504 super.setProperty(name, value); 505 } 506 507 @Override 508 public Base makeProperty(int hash, String name) throws FHIRException { 509 switch (hash) { 510 case 115792: throw new FHIRException("Cannot make property uid as it is not a complex type"); // OidType 511 case -814900911: return getImagingStudy(); // Reference 512 case 95578844: return addDicom(); // StudyDicomComponent 513 case 1196225919: return addViewable(); // StudyViewableComponent 514 case -905838985: return addSeries(); // SeriesComponent 515 default: return super.makeProperty(hash, name); 516 } 517 518 } 519 520 @Override 521 public Base addChild(String name) throws FHIRException { 522 if (name.equals("uid")) { 523 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); 524 } 525 else if (name.equals("imagingStudy")) { 526 this.imagingStudy = new Reference(); 527 return this.imagingStudy; 528 } 529 else if (name.equals("dicom")) { 530 return addDicom(); 531 } 532 else if (name.equals("viewable")) { 533 return addViewable(); 534 } 535 else if (name.equals("series")) { 536 return addSeries(); 537 } 538 else 539 return super.addChild(name); 540 } 541 542 public StudyComponent copy() { 543 StudyComponent dst = new StudyComponent(); 544 copyValues(dst); 545 dst.uid = uid == null ? null : uid.copy(); 546 dst.imagingStudy = imagingStudy == null ? null : imagingStudy.copy(); 547 if (dicom != null) { 548 dst.dicom = new ArrayList<StudyDicomComponent>(); 549 for (StudyDicomComponent i : dicom) 550 dst.dicom.add(i.copy()); 551 }; 552 if (viewable != null) { 553 dst.viewable = new ArrayList<StudyViewableComponent>(); 554 for (StudyViewableComponent i : viewable) 555 dst.viewable.add(i.copy()); 556 }; 557 if (series != null) { 558 dst.series = new ArrayList<SeriesComponent>(); 559 for (SeriesComponent i : series) 560 dst.series.add(i.copy()); 561 }; 562 return dst; 563 } 564 565 @Override 566 public boolean equalsDeep(Base other) { 567 if (!super.equalsDeep(other)) 568 return false; 569 if (!(other instanceof StudyComponent)) 570 return false; 571 StudyComponent o = (StudyComponent) other; 572 return compareDeep(uid, o.uid, true) && compareDeep(imagingStudy, o.imagingStudy, true) && compareDeep(dicom, o.dicom, true) 573 && compareDeep(viewable, o.viewable, true) && compareDeep(series, o.series, true); 574 } 575 576 @Override 577 public boolean equalsShallow(Base other) { 578 if (!super.equalsShallow(other)) 579 return false; 580 if (!(other instanceof StudyComponent)) 581 return false; 582 StudyComponent o = (StudyComponent) other; 583 return compareValues(uid, o.uid, true); 584 } 585 586 public boolean isEmpty() { 587 return super.isEmpty() && (uid == null || uid.isEmpty()) && (imagingStudy == null || imagingStudy.isEmpty()) 588 && (dicom == null || dicom.isEmpty()) && (viewable == null || viewable.isEmpty()) && (series == null || series.isEmpty()) 589 ; 590 } 591 592 public String fhirType() { 593 return "ImagingExcerpt.study"; 594 595 } 596 597 } 598 599 @Block() 600 public static class StudyDicomComponent extends BackboneElement implements IBaseBackboneElement { 601 /** 602 * Access type for DICOM web. 603 */ 604 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 605 @Description(shortDefinition="WADO-RS | WADO-URI | IID | WADO-WS", formalDefinition="Access type for DICOM web." ) 606 protected Enumeration<DWebType> type; 607 608 /** 609 * The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 610 */ 611 @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 612 @Description(shortDefinition="Retrieve study URL", formalDefinition="The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol." ) 613 protected UriType url; 614 615 private static final long serialVersionUID = 1661664416L; 616 617 /** 618 * Constructor 619 */ 620 public StudyDicomComponent() { 621 super(); 622 } 623 624 /** 625 * Constructor 626 */ 627 public StudyDicomComponent(Enumeration<DWebType> type, UriType url) { 628 super(); 629 this.type = type; 630 this.url = url; 631 } 632 633 /** 634 * @return {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 635 */ 636 public Enumeration<DWebType> getTypeElement() { 637 if (this.type == null) 638 if (Configuration.errorOnAutoCreate()) 639 throw new Error("Attempt to auto-create StudyDicomComponent.type"); 640 else if (Configuration.doAutoCreate()) 641 this.type = new Enumeration<DWebType>(new DWebTypeEnumFactory()); // bb 642 return this.type; 643 } 644 645 public boolean hasTypeElement() { 646 return this.type != null && !this.type.isEmpty(); 647 } 648 649 public boolean hasType() { 650 return this.type != null && !this.type.isEmpty(); 651 } 652 653 /** 654 * @param value {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 655 */ 656 public StudyDicomComponent setTypeElement(Enumeration<DWebType> value) { 657 this.type = value; 658 return this; 659 } 660 661 /** 662 * @return Access type for DICOM web. 663 */ 664 public DWebType getType() { 665 return this.type == null ? null : this.type.getValue(); 666 } 667 668 /** 669 * @param value Access type for DICOM web. 670 */ 671 public StudyDicomComponent setType(DWebType value) { 672 if (this.type == null) 673 this.type = new Enumeration<DWebType>(new DWebTypeEnumFactory()); 674 this.type.setValue(value); 675 return this; 676 } 677 678 /** 679 * @return {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 680 */ 681 public UriType getUrlElement() { 682 if (this.url == null) 683 if (Configuration.errorOnAutoCreate()) 684 throw new Error("Attempt to auto-create StudyDicomComponent.url"); 685 else if (Configuration.doAutoCreate()) 686 this.url = new UriType(); // bb 687 return this.url; 688 } 689 690 public boolean hasUrlElement() { 691 return this.url != null && !this.url.isEmpty(); 692 } 693 694 public boolean hasUrl() { 695 return this.url != null && !this.url.isEmpty(); 696 } 697 698 /** 699 * @param value {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 700 */ 701 public StudyDicomComponent setUrlElement(UriType value) { 702 this.url = value; 703 return this; 704 } 705 706 /** 707 * @return The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 708 */ 709 public String getUrl() { 710 return this.url == null ? null : this.url.getValue(); 711 } 712 713 /** 714 * @param value The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 715 */ 716 public StudyDicomComponent setUrl(String value) { 717 if (this.url == null) 718 this.url = new UriType(); 719 this.url.setValue(value); 720 return this; 721 } 722 723 protected void listChildren(List<Property> childrenList) { 724 super.listChildren(childrenList); 725 childrenList.add(new Property("type", "code", "Access type for DICOM web.", 0, java.lang.Integer.MAX_VALUE, type)); 726 childrenList.add(new Property("url", "uri", "The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.", 0, java.lang.Integer.MAX_VALUE, url)); 727 } 728 729 @Override 730 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 731 switch (hash) { 732 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DWebType> 733 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 734 default: return super.getProperty(hash, name, checkValid); 735 } 736 737 } 738 739 @Override 740 public void setProperty(int hash, String name, Base value) throws FHIRException { 741 switch (hash) { 742 case 3575610: // type 743 this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration<DWebType> 744 break; 745 case 116079: // url 746 this.url = castToUri(value); // UriType 747 break; 748 default: super.setProperty(hash, name, value); 749 } 750 751 } 752 753 @Override 754 public void setProperty(String name, Base value) throws FHIRException { 755 if (name.equals("type")) 756 this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration<DWebType> 757 else if (name.equals("url")) 758 this.url = castToUri(value); // UriType 759 else 760 super.setProperty(name, value); 761 } 762 763 @Override 764 public Base makeProperty(int hash, String name) throws FHIRException { 765 switch (hash) { 766 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<DWebType> 767 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 768 default: return super.makeProperty(hash, name); 769 } 770 771 } 772 773 @Override 774 public Base addChild(String name) throws FHIRException { 775 if (name.equals("type")) { 776 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.type"); 777 } 778 else if (name.equals("url")) { 779 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); 780 } 781 else 782 return super.addChild(name); 783 } 784 785 public StudyDicomComponent copy() { 786 StudyDicomComponent dst = new StudyDicomComponent(); 787 copyValues(dst); 788 dst.type = type == null ? null : type.copy(); 789 dst.url = url == null ? null : url.copy(); 790 return dst; 791 } 792 793 @Override 794 public boolean equalsDeep(Base other) { 795 if (!super.equalsDeep(other)) 796 return false; 797 if (!(other instanceof StudyDicomComponent)) 798 return false; 799 StudyDicomComponent o = (StudyDicomComponent) other; 800 return compareDeep(type, o.type, true) && compareDeep(url, o.url, true); 801 } 802 803 @Override 804 public boolean equalsShallow(Base other) { 805 if (!super.equalsShallow(other)) 806 return false; 807 if (!(other instanceof StudyDicomComponent)) 808 return false; 809 StudyDicomComponent o = (StudyDicomComponent) other; 810 return compareValues(type, o.type, true) && compareValues(url, o.url, true); 811 } 812 813 public boolean isEmpty() { 814 return super.isEmpty() && (type == null || type.isEmpty()) && (url == null || url.isEmpty()) 815 ; 816 } 817 818 public String fhirType() { 819 return "ImagingExcerpt.study.dicom"; 820 821 } 822 823 } 824 825 @Block() 826 public static class StudyViewableComponent extends BackboneElement implements IBaseBackboneElement { 827 /** 828 * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. 829 */ 830 @Child(name = "contentType", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 831 @Description(shortDefinition="Mime type of the content, with charset etc.", formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." ) 832 protected CodeType contentType; 833 834 /** 835 * Height of the image in pixels (photo/video). 836 */ 837 @Child(name = "height", type = {PositiveIntType.class}, order=2, min=0, max=1, modifier=false, summary=false) 838 @Description(shortDefinition="Height of the image in pixels (photo/video)", formalDefinition="Height of the image in pixels (photo/video)." ) 839 protected PositiveIntType height; 840 841 /** 842 * Width of the image in pixels (photo/video). 843 */ 844 @Child(name = "width", type = {PositiveIntType.class}, order=3, min=0, max=1, modifier=false, summary=false) 845 @Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." ) 846 protected PositiveIntType width; 847 848 /** 849 * The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. 850 */ 851 @Child(name = "frames", type = {PositiveIntType.class}, order=4, min=0, max=1, modifier=false, summary=false) 852 @Description(shortDefinition="Number of frames if > 1 (photo)", formalDefinition="The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif." ) 853 protected PositiveIntType frames; 854 855 /** 856 * The duration of the recording in seconds - for audio and video. 857 */ 858 @Child(name = "duration", type = {UnsignedIntType.class}, order=5, min=0, max=1, modifier=false, summary=false) 859 @Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." ) 860 protected UnsignedIntType duration; 861 862 /** 863 * The number of bytes of data that make up this attachment. 864 */ 865 @Child(name = "size", type = {UnsignedIntType.class}, order=6, min=0, max=1, modifier=false, summary=false) 866 @Description(shortDefinition="Number of bytes of content (if url provided)", formalDefinition="The number of bytes of data that make up this attachment." ) 867 protected UnsignedIntType size; 868 869 /** 870 * A label or set of text to display in place of the data. 871 */ 872 @Child(name = "title", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 873 @Description(shortDefinition="Label to display in place of the data", formalDefinition="A label or set of text to display in place of the data." ) 874 protected StringType title; 875 876 /** 877 * A location where the data can be accessed. 878 */ 879 @Child(name = "url", type = {UriType.class}, order=8, min=1, max=1, modifier=false, summary=false) 880 @Description(shortDefinition="Uri where the data can be found", formalDefinition="A location where the data can be accessed." ) 881 protected UriType url; 882 883 private static final long serialVersionUID = -2135689428L; 884 885 /** 886 * Constructor 887 */ 888 public StudyViewableComponent() { 889 super(); 890 } 891 892 /** 893 * Constructor 894 */ 895 public StudyViewableComponent(CodeType contentType, UriType url) { 896 super(); 897 this.contentType = contentType; 898 this.url = url; 899 } 900 901 /** 902 * @return {@link #contentType} (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 903 */ 904 public CodeType getContentTypeElement() { 905 if (this.contentType == null) 906 if (Configuration.errorOnAutoCreate()) 907 throw new Error("Attempt to auto-create StudyViewableComponent.contentType"); 908 else if (Configuration.doAutoCreate()) 909 this.contentType = new CodeType(); // bb 910 return this.contentType; 911 } 912 913 public boolean hasContentTypeElement() { 914 return this.contentType != null && !this.contentType.isEmpty(); 915 } 916 917 public boolean hasContentType() { 918 return this.contentType != null && !this.contentType.isEmpty(); 919 } 920 921 /** 922 * @param value {@link #contentType} (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 923 */ 924 public StudyViewableComponent setContentTypeElement(CodeType value) { 925 this.contentType = value; 926 return this; 927 } 928 929 /** 930 * @return Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. 931 */ 932 public String getContentType() { 933 return this.contentType == null ? null : this.contentType.getValue(); 934 } 935 936 /** 937 * @param value Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate. 938 */ 939 public StudyViewableComponent setContentType(String value) { 940 if (this.contentType == null) 941 this.contentType = new CodeType(); 942 this.contentType.setValue(value); 943 return this; 944 } 945 946 /** 947 * @return {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value 948 */ 949 public PositiveIntType getHeightElement() { 950 if (this.height == null) 951 if (Configuration.errorOnAutoCreate()) 952 throw new Error("Attempt to auto-create StudyViewableComponent.height"); 953 else if (Configuration.doAutoCreate()) 954 this.height = new PositiveIntType(); // bb 955 return this.height; 956 } 957 958 public boolean hasHeightElement() { 959 return this.height != null && !this.height.isEmpty(); 960 } 961 962 public boolean hasHeight() { 963 return this.height != null && !this.height.isEmpty(); 964 } 965 966 /** 967 * @param value {@link #height} (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value 968 */ 969 public StudyViewableComponent setHeightElement(PositiveIntType value) { 970 this.height = value; 971 return this; 972 } 973 974 /** 975 * @return Height of the image in pixels (photo/video). 976 */ 977 public int getHeight() { 978 return this.height == null || this.height.isEmpty() ? 0 : this.height.getValue(); 979 } 980 981 /** 982 * @param value Height of the image in pixels (photo/video). 983 */ 984 public StudyViewableComponent setHeight(int value) { 985 if (this.height == null) 986 this.height = new PositiveIntType(); 987 this.height.setValue(value); 988 return this; 989 } 990 991 /** 992 * @return {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value 993 */ 994 public PositiveIntType getWidthElement() { 995 if (this.width == null) 996 if (Configuration.errorOnAutoCreate()) 997 throw new Error("Attempt to auto-create StudyViewableComponent.width"); 998 else if (Configuration.doAutoCreate()) 999 this.width = new PositiveIntType(); // bb 1000 return this.width; 1001 } 1002 1003 public boolean hasWidthElement() { 1004 return this.width != null && !this.width.isEmpty(); 1005 } 1006 1007 public boolean hasWidth() { 1008 return this.width != null && !this.width.isEmpty(); 1009 } 1010 1011 /** 1012 * @param value {@link #width} (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value 1013 */ 1014 public StudyViewableComponent setWidthElement(PositiveIntType value) { 1015 this.width = value; 1016 return this; 1017 } 1018 1019 /** 1020 * @return Width of the image in pixels (photo/video). 1021 */ 1022 public int getWidth() { 1023 return this.width == null || this.width.isEmpty() ? 0 : this.width.getValue(); 1024 } 1025 1026 /** 1027 * @param value Width of the image in pixels (photo/video). 1028 */ 1029 public StudyViewableComponent setWidth(int value) { 1030 if (this.width == null) 1031 this.width = new PositiveIntType(); 1032 this.width.setValue(value); 1033 return this; 1034 } 1035 1036 /** 1037 * @return {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value 1038 */ 1039 public PositiveIntType getFramesElement() { 1040 if (this.frames == null) 1041 if (Configuration.errorOnAutoCreate()) 1042 throw new Error("Attempt to auto-create StudyViewableComponent.frames"); 1043 else if (Configuration.doAutoCreate()) 1044 this.frames = new PositiveIntType(); // bb 1045 return this.frames; 1046 } 1047 1048 public boolean hasFramesElement() { 1049 return this.frames != null && !this.frames.isEmpty(); 1050 } 1051 1052 public boolean hasFrames() { 1053 return this.frames != null && !this.frames.isEmpty(); 1054 } 1055 1056 /** 1057 * @param value {@link #frames} (The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value 1058 */ 1059 public StudyViewableComponent setFramesElement(PositiveIntType value) { 1060 this.frames = value; 1061 return this; 1062 } 1063 1064 /** 1065 * @return The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. 1066 */ 1067 public int getFrames() { 1068 return this.frames == null || this.frames.isEmpty() ? 0 : this.frames.getValue(); 1069 } 1070 1071 /** 1072 * @param value The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. 1073 */ 1074 public StudyViewableComponent setFrames(int value) { 1075 if (this.frames == null) 1076 this.frames = new PositiveIntType(); 1077 this.frames.setValue(value); 1078 return this; 1079 } 1080 1081 /** 1082 * @return {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value 1083 */ 1084 public UnsignedIntType getDurationElement() { 1085 if (this.duration == null) 1086 if (Configuration.errorOnAutoCreate()) 1087 throw new Error("Attempt to auto-create StudyViewableComponent.duration"); 1088 else if (Configuration.doAutoCreate()) 1089 this.duration = new UnsignedIntType(); // bb 1090 return this.duration; 1091 } 1092 1093 public boolean hasDurationElement() { 1094 return this.duration != null && !this.duration.isEmpty(); 1095 } 1096 1097 public boolean hasDuration() { 1098 return this.duration != null && !this.duration.isEmpty(); 1099 } 1100 1101 /** 1102 * @param value {@link #duration} (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value 1103 */ 1104 public StudyViewableComponent setDurationElement(UnsignedIntType value) { 1105 this.duration = value; 1106 return this; 1107 } 1108 1109 /** 1110 * @return The duration of the recording in seconds - for audio and video. 1111 */ 1112 public int getDuration() { 1113 return this.duration == null || this.duration.isEmpty() ? 0 : this.duration.getValue(); 1114 } 1115 1116 /** 1117 * @param value The duration of the recording in seconds - for audio and video. 1118 */ 1119 public StudyViewableComponent setDuration(int value) { 1120 if (this.duration == null) 1121 this.duration = new UnsignedIntType(); 1122 this.duration.setValue(value); 1123 return this; 1124 } 1125 1126 /** 1127 * @return {@link #size} (The number of bytes of data that make up this attachment.). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value 1128 */ 1129 public UnsignedIntType getSizeElement() { 1130 if (this.size == null) 1131 if (Configuration.errorOnAutoCreate()) 1132 throw new Error("Attempt to auto-create StudyViewableComponent.size"); 1133 else if (Configuration.doAutoCreate()) 1134 this.size = new UnsignedIntType(); // bb 1135 return this.size; 1136 } 1137 1138 public boolean hasSizeElement() { 1139 return this.size != null && !this.size.isEmpty(); 1140 } 1141 1142 public boolean hasSize() { 1143 return this.size != null && !this.size.isEmpty(); 1144 } 1145 1146 /** 1147 * @param value {@link #size} (The number of bytes of data that make up this attachment.). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value 1148 */ 1149 public StudyViewableComponent setSizeElement(UnsignedIntType value) { 1150 this.size = value; 1151 return this; 1152 } 1153 1154 /** 1155 * @return The number of bytes of data that make up this attachment. 1156 */ 1157 public int getSize() { 1158 return this.size == null || this.size.isEmpty() ? 0 : this.size.getValue(); 1159 } 1160 1161 /** 1162 * @param value The number of bytes of data that make up this attachment. 1163 */ 1164 public StudyViewableComponent setSize(int value) { 1165 if (this.size == null) 1166 this.size = new UnsignedIntType(); 1167 this.size.setValue(value); 1168 return this; 1169 } 1170 1171 /** 1172 * @return {@link #title} (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1173 */ 1174 public StringType getTitleElement() { 1175 if (this.title == null) 1176 if (Configuration.errorOnAutoCreate()) 1177 throw new Error("Attempt to auto-create StudyViewableComponent.title"); 1178 else if (Configuration.doAutoCreate()) 1179 this.title = new StringType(); // bb 1180 return this.title; 1181 } 1182 1183 public boolean hasTitleElement() { 1184 return this.title != null && !this.title.isEmpty(); 1185 } 1186 1187 public boolean hasTitle() { 1188 return this.title != null && !this.title.isEmpty(); 1189 } 1190 1191 /** 1192 * @param value {@link #title} (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 1193 */ 1194 public StudyViewableComponent setTitleElement(StringType value) { 1195 this.title = value; 1196 return this; 1197 } 1198 1199 /** 1200 * @return A label or set of text to display in place of the data. 1201 */ 1202 public String getTitle() { 1203 return this.title == null ? null : this.title.getValue(); 1204 } 1205 1206 /** 1207 * @param value A label or set of text to display in place of the data. 1208 */ 1209 public StudyViewableComponent setTitle(String value) { 1210 if (Utilities.noString(value)) 1211 this.title = null; 1212 else { 1213 if (this.title == null) 1214 this.title = new StringType(); 1215 this.title.setValue(value); 1216 } 1217 return this; 1218 } 1219 1220 /** 1221 * @return {@link #url} (A location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1222 */ 1223 public UriType getUrlElement() { 1224 if (this.url == null) 1225 if (Configuration.errorOnAutoCreate()) 1226 throw new Error("Attempt to auto-create StudyViewableComponent.url"); 1227 else if (Configuration.doAutoCreate()) 1228 this.url = new UriType(); // bb 1229 return this.url; 1230 } 1231 1232 public boolean hasUrlElement() { 1233 return this.url != null && !this.url.isEmpty(); 1234 } 1235 1236 public boolean hasUrl() { 1237 return this.url != null && !this.url.isEmpty(); 1238 } 1239 1240 /** 1241 * @param value {@link #url} (A location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1242 */ 1243 public StudyViewableComponent setUrlElement(UriType value) { 1244 this.url = value; 1245 return this; 1246 } 1247 1248 /** 1249 * @return A location where the data can be accessed. 1250 */ 1251 public String getUrl() { 1252 return this.url == null ? null : this.url.getValue(); 1253 } 1254 1255 /** 1256 * @param value A location where the data can be accessed. 1257 */ 1258 public StudyViewableComponent setUrl(String value) { 1259 if (this.url == null) 1260 this.url = new UriType(); 1261 this.url.setValue(value); 1262 return this; 1263 } 1264 1265 protected void listChildren(List<Property> childrenList) { 1266 super.listChildren(childrenList); 1267 childrenList.add(new Property("contentType", "code", "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.", 0, java.lang.Integer.MAX_VALUE, contentType)); 1268 childrenList.add(new Property("height", "positiveInt", "Height of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, height)); 1269 childrenList.add(new Property("width", "positiveInt", "Width of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, width)); 1270 childrenList.add(new Property("frames", "positiveInt", "The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif.", 0, java.lang.Integer.MAX_VALUE, frames)); 1271 childrenList.add(new Property("duration", "unsignedInt", "The duration of the recording in seconds - for audio and video.", 0, java.lang.Integer.MAX_VALUE, duration)); 1272 childrenList.add(new Property("size", "unsignedInt", "The number of bytes of data that make up this attachment.", 0, java.lang.Integer.MAX_VALUE, size)); 1273 childrenList.add(new Property("title", "string", "A label or set of text to display in place of the data.", 0, java.lang.Integer.MAX_VALUE, title)); 1274 childrenList.add(new Property("url", "uri", "A location where the data can be accessed.", 0, java.lang.Integer.MAX_VALUE, url)); 1275 } 1276 1277 @Override 1278 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1279 switch (hash) { 1280 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType 1281 case -1221029593: /*height*/ return this.height == null ? new Base[0] : new Base[] {this.height}; // PositiveIntType 1282 case 113126854: /*width*/ return this.width == null ? new Base[0] : new Base[] {this.width}; // PositiveIntType 1283 case -1266514778: /*frames*/ return this.frames == null ? new Base[0] : new Base[] {this.frames}; // PositiveIntType 1284 case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // UnsignedIntType 1285 case 3530753: /*size*/ return this.size == null ? new Base[0] : new Base[] {this.size}; // UnsignedIntType 1286 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 1287 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1288 default: return super.getProperty(hash, name, checkValid); 1289 } 1290 1291 } 1292 1293 @Override 1294 public void setProperty(int hash, String name, Base value) throws FHIRException { 1295 switch (hash) { 1296 case -389131437: // contentType 1297 this.contentType = castToCode(value); // CodeType 1298 break; 1299 case -1221029593: // height 1300 this.height = castToPositiveInt(value); // PositiveIntType 1301 break; 1302 case 113126854: // width 1303 this.width = castToPositiveInt(value); // PositiveIntType 1304 break; 1305 case -1266514778: // frames 1306 this.frames = castToPositiveInt(value); // PositiveIntType 1307 break; 1308 case -1992012396: // duration 1309 this.duration = castToUnsignedInt(value); // UnsignedIntType 1310 break; 1311 case 3530753: // size 1312 this.size = castToUnsignedInt(value); // UnsignedIntType 1313 break; 1314 case 110371416: // title 1315 this.title = castToString(value); // StringType 1316 break; 1317 case 116079: // url 1318 this.url = castToUri(value); // UriType 1319 break; 1320 default: super.setProperty(hash, name, value); 1321 } 1322 1323 } 1324 1325 @Override 1326 public void setProperty(String name, Base value) throws FHIRException { 1327 if (name.equals("contentType")) 1328 this.contentType = castToCode(value); // CodeType 1329 else if (name.equals("height")) 1330 this.height = castToPositiveInt(value); // PositiveIntType 1331 else if (name.equals("width")) 1332 this.width = castToPositiveInt(value); // PositiveIntType 1333 else if (name.equals("frames")) 1334 this.frames = castToPositiveInt(value); // PositiveIntType 1335 else if (name.equals("duration")) 1336 this.duration = castToUnsignedInt(value); // UnsignedIntType 1337 else if (name.equals("size")) 1338 this.size = castToUnsignedInt(value); // UnsignedIntType 1339 else if (name.equals("title")) 1340 this.title = castToString(value); // StringType 1341 else if (name.equals("url")) 1342 this.url = castToUri(value); // UriType 1343 else 1344 super.setProperty(name, value); 1345 } 1346 1347 @Override 1348 public Base makeProperty(int hash, String name) throws FHIRException { 1349 switch (hash) { 1350 case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // CodeType 1351 case -1221029593: throw new FHIRException("Cannot make property height as it is not a complex type"); // PositiveIntType 1352 case 113126854: throw new FHIRException("Cannot make property width as it is not a complex type"); // PositiveIntType 1353 case -1266514778: throw new FHIRException("Cannot make property frames as it is not a complex type"); // PositiveIntType 1354 case -1992012396: throw new FHIRException("Cannot make property duration as it is not a complex type"); // UnsignedIntType 1355 case 3530753: throw new FHIRException("Cannot make property size as it is not a complex type"); // UnsignedIntType 1356 case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType 1357 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 1358 default: return super.makeProperty(hash, name); 1359 } 1360 1361 } 1362 1363 @Override 1364 public Base addChild(String name) throws FHIRException { 1365 if (name.equals("contentType")) { 1366 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.contentType"); 1367 } 1368 else if (name.equals("height")) { 1369 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.height"); 1370 } 1371 else if (name.equals("width")) { 1372 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.width"); 1373 } 1374 else if (name.equals("frames")) { 1375 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.frames"); 1376 } 1377 else if (name.equals("duration")) { 1378 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.duration"); 1379 } 1380 else if (name.equals("size")) { 1381 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.size"); 1382 } 1383 else if (name.equals("title")) { 1384 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.title"); 1385 } 1386 else if (name.equals("url")) { 1387 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); 1388 } 1389 else 1390 return super.addChild(name); 1391 } 1392 1393 public StudyViewableComponent copy() { 1394 StudyViewableComponent dst = new StudyViewableComponent(); 1395 copyValues(dst); 1396 dst.contentType = contentType == null ? null : contentType.copy(); 1397 dst.height = height == null ? null : height.copy(); 1398 dst.width = width == null ? null : width.copy(); 1399 dst.frames = frames == null ? null : frames.copy(); 1400 dst.duration = duration == null ? null : duration.copy(); 1401 dst.size = size == null ? null : size.copy(); 1402 dst.title = title == null ? null : title.copy(); 1403 dst.url = url == null ? null : url.copy(); 1404 return dst; 1405 } 1406 1407 @Override 1408 public boolean equalsDeep(Base other) { 1409 if (!super.equalsDeep(other)) 1410 return false; 1411 if (!(other instanceof StudyViewableComponent)) 1412 return false; 1413 StudyViewableComponent o = (StudyViewableComponent) other; 1414 return compareDeep(contentType, o.contentType, true) && compareDeep(height, o.height, true) && compareDeep(width, o.width, true) 1415 && compareDeep(frames, o.frames, true) && compareDeep(duration, o.duration, true) && compareDeep(size, o.size, true) 1416 && compareDeep(title, o.title, true) && compareDeep(url, o.url, true); 1417 } 1418 1419 @Override 1420 public boolean equalsShallow(Base other) { 1421 if (!super.equalsShallow(other)) 1422 return false; 1423 if (!(other instanceof StudyViewableComponent)) 1424 return false; 1425 StudyViewableComponent o = (StudyViewableComponent) other; 1426 return compareValues(contentType, o.contentType, true) && compareValues(height, o.height, true) && compareValues(width, o.width, true) 1427 && compareValues(frames, o.frames, true) && compareValues(duration, o.duration, true) && compareValues(size, o.size, true) 1428 && compareValues(title, o.title, true) && compareValues(url, o.url, true); 1429 } 1430 1431 public boolean isEmpty() { 1432 return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (height == null || height.isEmpty()) 1433 && (width == null || width.isEmpty()) && (frames == null || frames.isEmpty()) && (duration == null || duration.isEmpty()) 1434 && (size == null || size.isEmpty()) && (title == null || title.isEmpty()) && (url == null || url.isEmpty()) 1435 ; 1436 } 1437 1438 public String fhirType() { 1439 return "ImagingExcerpt.study.viewable"; 1440 1441 } 1442 1443 } 1444 1445 @Block() 1446 public static class SeriesComponent extends BackboneElement implements IBaseBackboneElement { 1447 /** 1448 * Series instance UID of the SOP instances in the selection. 1449 */ 1450 @Child(name = "uid", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1451 @Description(shortDefinition="Series instance UID", formalDefinition="Series instance UID of the SOP instances in the selection." ) 1452 protected OidType uid; 1453 1454 /** 1455 * Methods of accessing using DICOM web technologies. 1456 */ 1457 @Child(name = "dicom", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1458 @Description(shortDefinition="Dicom web access", formalDefinition="Methods of accessing using DICOM web technologies." ) 1459 protected List<SeriesDicomComponent> dicom; 1460 1461 /** 1462 * Identity and locating information of the selected DICOM SOP instances. 1463 */ 1464 @Child(name = "instance", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1465 @Description(shortDefinition="The selected instance", formalDefinition="Identity and locating information of the selected DICOM SOP instances." ) 1466 protected List<InstanceComponent> instance; 1467 1468 private static final long serialVersionUID = 1845643577L; 1469 1470 /** 1471 * Constructor 1472 */ 1473 public SeriesComponent() { 1474 super(); 1475 } 1476 1477 /** 1478 * Constructor 1479 */ 1480 public SeriesComponent(OidType uid) { 1481 super(); 1482 this.uid = uid; 1483 } 1484 1485 /** 1486 * @return {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 1487 */ 1488 public OidType getUidElement() { 1489 if (this.uid == null) 1490 if (Configuration.errorOnAutoCreate()) 1491 throw new Error("Attempt to auto-create SeriesComponent.uid"); 1492 else if (Configuration.doAutoCreate()) 1493 this.uid = new OidType(); // bb 1494 return this.uid; 1495 } 1496 1497 public boolean hasUidElement() { 1498 return this.uid != null && !this.uid.isEmpty(); 1499 } 1500 1501 public boolean hasUid() { 1502 return this.uid != null && !this.uid.isEmpty(); 1503 } 1504 1505 /** 1506 * @param value {@link #uid} (Series instance UID of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 1507 */ 1508 public SeriesComponent setUidElement(OidType value) { 1509 this.uid = value; 1510 return this; 1511 } 1512 1513 /** 1514 * @return Series instance UID of the SOP instances in the selection. 1515 */ 1516 public String getUid() { 1517 return this.uid == null ? null : this.uid.getValue(); 1518 } 1519 1520 /** 1521 * @param value Series instance UID of the SOP instances in the selection. 1522 */ 1523 public SeriesComponent setUid(String value) { 1524 if (this.uid == null) 1525 this.uid = new OidType(); 1526 this.uid.setValue(value); 1527 return this; 1528 } 1529 1530 /** 1531 * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) 1532 */ 1533 public List<SeriesDicomComponent> getDicom() { 1534 if (this.dicom == null) 1535 this.dicom = new ArrayList<SeriesDicomComponent>(); 1536 return this.dicom; 1537 } 1538 1539 public boolean hasDicom() { 1540 if (this.dicom == null) 1541 return false; 1542 for (SeriesDicomComponent item : this.dicom) 1543 if (!item.isEmpty()) 1544 return true; 1545 return false; 1546 } 1547 1548 /** 1549 * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) 1550 */ 1551 // syntactic sugar 1552 public SeriesDicomComponent addDicom() { //3 1553 SeriesDicomComponent t = new SeriesDicomComponent(); 1554 if (this.dicom == null) 1555 this.dicom = new ArrayList<SeriesDicomComponent>(); 1556 this.dicom.add(t); 1557 return t; 1558 } 1559 1560 // syntactic sugar 1561 public SeriesComponent addDicom(SeriesDicomComponent t) { //3 1562 if (t == null) 1563 return this; 1564 if (this.dicom == null) 1565 this.dicom = new ArrayList<SeriesDicomComponent>(); 1566 this.dicom.add(t); 1567 return this; 1568 } 1569 1570 /** 1571 * @return {@link #instance} (Identity and locating information of the selected DICOM SOP instances.) 1572 */ 1573 public List<InstanceComponent> getInstance() { 1574 if (this.instance == null) 1575 this.instance = new ArrayList<InstanceComponent>(); 1576 return this.instance; 1577 } 1578 1579 public boolean hasInstance() { 1580 if (this.instance == null) 1581 return false; 1582 for (InstanceComponent item : this.instance) 1583 if (!item.isEmpty()) 1584 return true; 1585 return false; 1586 } 1587 1588 /** 1589 * @return {@link #instance} (Identity and locating information of the selected DICOM SOP instances.) 1590 */ 1591 // syntactic sugar 1592 public InstanceComponent addInstance() { //3 1593 InstanceComponent t = new InstanceComponent(); 1594 if (this.instance == null) 1595 this.instance = new ArrayList<InstanceComponent>(); 1596 this.instance.add(t); 1597 return t; 1598 } 1599 1600 // syntactic sugar 1601 public SeriesComponent addInstance(InstanceComponent t) { //3 1602 if (t == null) 1603 return this; 1604 if (this.instance == null) 1605 this.instance = new ArrayList<InstanceComponent>(); 1606 this.instance.add(t); 1607 return this; 1608 } 1609 1610 protected void listChildren(List<Property> childrenList) { 1611 super.listChildren(childrenList); 1612 childrenList.add(new Property("uid", "oid", "Series instance UID of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, uid)); 1613 childrenList.add(new Property("dicom", "", "Methods of accessing using DICOM web technologies.", 0, java.lang.Integer.MAX_VALUE, dicom)); 1614 childrenList.add(new Property("instance", "", "Identity and locating information of the selected DICOM SOP instances.", 0, java.lang.Integer.MAX_VALUE, instance)); 1615 } 1616 1617 @Override 1618 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1619 switch (hash) { 1620 case 115792: /*uid*/ return this.uid == null ? new Base[0] : new Base[] {this.uid}; // OidType 1621 case 95578844: /*dicom*/ return this.dicom == null ? new Base[0] : this.dicom.toArray(new Base[this.dicom.size()]); // SeriesDicomComponent 1622 case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // InstanceComponent 1623 default: return super.getProperty(hash, name, checkValid); 1624 } 1625 1626 } 1627 1628 @Override 1629 public void setProperty(int hash, String name, Base value) throws FHIRException { 1630 switch (hash) { 1631 case 115792: // uid 1632 this.uid = castToOid(value); // OidType 1633 break; 1634 case 95578844: // dicom 1635 this.getDicom().add((SeriesDicomComponent) value); // SeriesDicomComponent 1636 break; 1637 case 555127957: // instance 1638 this.getInstance().add((InstanceComponent) value); // InstanceComponent 1639 break; 1640 default: super.setProperty(hash, name, value); 1641 } 1642 1643 } 1644 1645 @Override 1646 public void setProperty(String name, Base value) throws FHIRException { 1647 if (name.equals("uid")) 1648 this.uid = castToOid(value); // OidType 1649 else if (name.equals("dicom")) 1650 this.getDicom().add((SeriesDicomComponent) value); 1651 else if (name.equals("instance")) 1652 this.getInstance().add((InstanceComponent) value); 1653 else 1654 super.setProperty(name, value); 1655 } 1656 1657 @Override 1658 public Base makeProperty(int hash, String name) throws FHIRException { 1659 switch (hash) { 1660 case 115792: throw new FHIRException("Cannot make property uid as it is not a complex type"); // OidType 1661 case 95578844: return addDicom(); // SeriesDicomComponent 1662 case 555127957: return addInstance(); // InstanceComponent 1663 default: return super.makeProperty(hash, name); 1664 } 1665 1666 } 1667 1668 @Override 1669 public Base addChild(String name) throws FHIRException { 1670 if (name.equals("uid")) { 1671 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); 1672 } 1673 else if (name.equals("dicom")) { 1674 return addDicom(); 1675 } 1676 else if (name.equals("instance")) { 1677 return addInstance(); 1678 } 1679 else 1680 return super.addChild(name); 1681 } 1682 1683 public SeriesComponent copy() { 1684 SeriesComponent dst = new SeriesComponent(); 1685 copyValues(dst); 1686 dst.uid = uid == null ? null : uid.copy(); 1687 if (dicom != null) { 1688 dst.dicom = new ArrayList<SeriesDicomComponent>(); 1689 for (SeriesDicomComponent i : dicom) 1690 dst.dicom.add(i.copy()); 1691 }; 1692 if (instance != null) { 1693 dst.instance = new ArrayList<InstanceComponent>(); 1694 for (InstanceComponent i : instance) 1695 dst.instance.add(i.copy()); 1696 }; 1697 return dst; 1698 } 1699 1700 @Override 1701 public boolean equalsDeep(Base other) { 1702 if (!super.equalsDeep(other)) 1703 return false; 1704 if (!(other instanceof SeriesComponent)) 1705 return false; 1706 SeriesComponent o = (SeriesComponent) other; 1707 return compareDeep(uid, o.uid, true) && compareDeep(dicom, o.dicom, true) && compareDeep(instance, o.instance, true) 1708 ; 1709 } 1710 1711 @Override 1712 public boolean equalsShallow(Base other) { 1713 if (!super.equalsShallow(other)) 1714 return false; 1715 if (!(other instanceof SeriesComponent)) 1716 return false; 1717 SeriesComponent o = (SeriesComponent) other; 1718 return compareValues(uid, o.uid, true); 1719 } 1720 1721 public boolean isEmpty() { 1722 return super.isEmpty() && (uid == null || uid.isEmpty()) && (dicom == null || dicom.isEmpty()) 1723 && (instance == null || instance.isEmpty()); 1724 } 1725 1726 public String fhirType() { 1727 return "ImagingExcerpt.study.series"; 1728 1729 } 1730 1731 } 1732 1733 @Block() 1734 public static class SeriesDicomComponent extends BackboneElement implements IBaseBackboneElement { 1735 /** 1736 * Access type for DICOM web. 1737 */ 1738 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1739 @Description(shortDefinition="WADO-RS | WADO-URI | IID | WADO-WS", formalDefinition="Access type for DICOM web." ) 1740 protected Enumeration<DWebType> type; 1741 1742 /** 1743 * The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 1744 */ 1745 @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 1746 @Description(shortDefinition="Retrieve study URL", formalDefinition="The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol." ) 1747 protected UriType url; 1748 1749 private static final long serialVersionUID = 1661664416L; 1750 1751 /** 1752 * Constructor 1753 */ 1754 public SeriesDicomComponent() { 1755 super(); 1756 } 1757 1758 /** 1759 * Constructor 1760 */ 1761 public SeriesDicomComponent(Enumeration<DWebType> type, UriType url) { 1762 super(); 1763 this.type = type; 1764 this.url = url; 1765 } 1766 1767 /** 1768 * @return {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1769 */ 1770 public Enumeration<DWebType> getTypeElement() { 1771 if (this.type == null) 1772 if (Configuration.errorOnAutoCreate()) 1773 throw new Error("Attempt to auto-create SeriesDicomComponent.type"); 1774 else if (Configuration.doAutoCreate()) 1775 this.type = new Enumeration<DWebType>(new DWebTypeEnumFactory()); // bb 1776 return this.type; 1777 } 1778 1779 public boolean hasTypeElement() { 1780 return this.type != null && !this.type.isEmpty(); 1781 } 1782 1783 public boolean hasType() { 1784 return this.type != null && !this.type.isEmpty(); 1785 } 1786 1787 /** 1788 * @param value {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1789 */ 1790 public SeriesDicomComponent setTypeElement(Enumeration<DWebType> value) { 1791 this.type = value; 1792 return this; 1793 } 1794 1795 /** 1796 * @return Access type for DICOM web. 1797 */ 1798 public DWebType getType() { 1799 return this.type == null ? null : this.type.getValue(); 1800 } 1801 1802 /** 1803 * @param value Access type for DICOM web. 1804 */ 1805 public SeriesDicomComponent setType(DWebType value) { 1806 if (this.type == null) 1807 this.type = new Enumeration<DWebType>(new DWebTypeEnumFactory()); 1808 this.type.setValue(value); 1809 return this; 1810 } 1811 1812 /** 1813 * @return {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1814 */ 1815 public UriType getUrlElement() { 1816 if (this.url == null) 1817 if (Configuration.errorOnAutoCreate()) 1818 throw new Error("Attempt to auto-create SeriesDicomComponent.url"); 1819 else if (Configuration.doAutoCreate()) 1820 this.url = new UriType(); // bb 1821 return this.url; 1822 } 1823 1824 public boolean hasUrlElement() { 1825 return this.url != null && !this.url.isEmpty(); 1826 } 1827 1828 public boolean hasUrl() { 1829 return this.url != null && !this.url.isEmpty(); 1830 } 1831 1832 /** 1833 * @param value {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1834 */ 1835 public SeriesDicomComponent setUrlElement(UriType value) { 1836 this.url = value; 1837 return this; 1838 } 1839 1840 /** 1841 * @return The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 1842 */ 1843 public String getUrl() { 1844 return this.url == null ? null : this.url.getValue(); 1845 } 1846 1847 /** 1848 * @param value The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 1849 */ 1850 public SeriesDicomComponent setUrl(String value) { 1851 if (this.url == null) 1852 this.url = new UriType(); 1853 this.url.setValue(value); 1854 return this; 1855 } 1856 1857 protected void listChildren(List<Property> childrenList) { 1858 super.listChildren(childrenList); 1859 childrenList.add(new Property("type", "code", "Access type for DICOM web.", 0, java.lang.Integer.MAX_VALUE, type)); 1860 childrenList.add(new Property("url", "uri", "The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.", 0, java.lang.Integer.MAX_VALUE, url)); 1861 } 1862 1863 @Override 1864 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1865 switch (hash) { 1866 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DWebType> 1867 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1868 default: return super.getProperty(hash, name, checkValid); 1869 } 1870 1871 } 1872 1873 @Override 1874 public void setProperty(int hash, String name, Base value) throws FHIRException { 1875 switch (hash) { 1876 case 3575610: // type 1877 this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration<DWebType> 1878 break; 1879 case 116079: // url 1880 this.url = castToUri(value); // UriType 1881 break; 1882 default: super.setProperty(hash, name, value); 1883 } 1884 1885 } 1886 1887 @Override 1888 public void setProperty(String name, Base value) throws FHIRException { 1889 if (name.equals("type")) 1890 this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration<DWebType> 1891 else if (name.equals("url")) 1892 this.url = castToUri(value); // UriType 1893 else 1894 super.setProperty(name, value); 1895 } 1896 1897 @Override 1898 public Base makeProperty(int hash, String name) throws FHIRException { 1899 switch (hash) { 1900 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<DWebType> 1901 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 1902 default: return super.makeProperty(hash, name); 1903 } 1904 1905 } 1906 1907 @Override 1908 public Base addChild(String name) throws FHIRException { 1909 if (name.equals("type")) { 1910 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.type"); 1911 } 1912 else if (name.equals("url")) { 1913 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); 1914 } 1915 else 1916 return super.addChild(name); 1917 } 1918 1919 public SeriesDicomComponent copy() { 1920 SeriesDicomComponent dst = new SeriesDicomComponent(); 1921 copyValues(dst); 1922 dst.type = type == null ? null : type.copy(); 1923 dst.url = url == null ? null : url.copy(); 1924 return dst; 1925 } 1926 1927 @Override 1928 public boolean equalsDeep(Base other) { 1929 if (!super.equalsDeep(other)) 1930 return false; 1931 if (!(other instanceof SeriesDicomComponent)) 1932 return false; 1933 SeriesDicomComponent o = (SeriesDicomComponent) other; 1934 return compareDeep(type, o.type, true) && compareDeep(url, o.url, true); 1935 } 1936 1937 @Override 1938 public boolean equalsShallow(Base other) { 1939 if (!super.equalsShallow(other)) 1940 return false; 1941 if (!(other instanceof SeriesDicomComponent)) 1942 return false; 1943 SeriesDicomComponent o = (SeriesDicomComponent) other; 1944 return compareValues(type, o.type, true) && compareValues(url, o.url, true); 1945 } 1946 1947 public boolean isEmpty() { 1948 return super.isEmpty() && (type == null || type.isEmpty()) && (url == null || url.isEmpty()) 1949 ; 1950 } 1951 1952 public String fhirType() { 1953 return "ImagingExcerpt.study.series.dicom"; 1954 1955 } 1956 1957 } 1958 1959 @Block() 1960 public static class InstanceComponent extends BackboneElement implements IBaseBackboneElement { 1961 /** 1962 * SOP class UID of the selected instance. 1963 */ 1964 @Child(name = "sopClass", type = {OidType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1965 @Description(shortDefinition="SOP class UID of instance", formalDefinition="SOP class UID of the selected instance." ) 1966 protected OidType sopClass; 1967 1968 /** 1969 * SOP Instance UID of the selected instance. 1970 */ 1971 @Child(name = "uid", type = {OidType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1972 @Description(shortDefinition="Selected instance UID", formalDefinition="SOP Instance UID of the selected instance." ) 1973 protected OidType uid; 1974 1975 /** 1976 * Methods of accessing using DICOM web technologies. 1977 */ 1978 @Child(name = "dicom", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1979 @Description(shortDefinition="Dicom web access", formalDefinition="Methods of accessing using DICOM web technologies." ) 1980 protected List<InstanceDicomComponent> dicom; 1981 1982 /** 1983 * The specific frame reference within a multi-frame object. 1984 */ 1985 @Child(name = "frameNumbers", type = {UnsignedIntType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1986 @Description(shortDefinition="Frame reference number", formalDefinition="The specific frame reference within a multi-frame object." ) 1987 protected List<UnsignedIntType> frameNumbers; 1988 1989 private static final long serialVersionUID = 1372440557L; 1990 1991 /** 1992 * Constructor 1993 */ 1994 public InstanceComponent() { 1995 super(); 1996 } 1997 1998 /** 1999 * Constructor 2000 */ 2001 public InstanceComponent(OidType sopClass, OidType uid) { 2002 super(); 2003 this.sopClass = sopClass; 2004 this.uid = uid; 2005 } 2006 2007 /** 2008 * @return {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value 2009 */ 2010 public OidType getSopClassElement() { 2011 if (this.sopClass == null) 2012 if (Configuration.errorOnAutoCreate()) 2013 throw new Error("Attempt to auto-create InstanceComponent.sopClass"); 2014 else if (Configuration.doAutoCreate()) 2015 this.sopClass = new OidType(); // bb 2016 return this.sopClass; 2017 } 2018 2019 public boolean hasSopClassElement() { 2020 return this.sopClass != null && !this.sopClass.isEmpty(); 2021 } 2022 2023 public boolean hasSopClass() { 2024 return this.sopClass != null && !this.sopClass.isEmpty(); 2025 } 2026 2027 /** 2028 * @param value {@link #sopClass} (SOP class UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getSopClass" gives direct access to the value 2029 */ 2030 public InstanceComponent setSopClassElement(OidType value) { 2031 this.sopClass = value; 2032 return this; 2033 } 2034 2035 /** 2036 * @return SOP class UID of the selected instance. 2037 */ 2038 public String getSopClass() { 2039 return this.sopClass == null ? null : this.sopClass.getValue(); 2040 } 2041 2042 /** 2043 * @param value SOP class UID of the selected instance. 2044 */ 2045 public InstanceComponent setSopClass(String value) { 2046 if (this.sopClass == null) 2047 this.sopClass = new OidType(); 2048 this.sopClass.setValue(value); 2049 return this; 2050 } 2051 2052 /** 2053 * @return {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 2054 */ 2055 public OidType getUidElement() { 2056 if (this.uid == null) 2057 if (Configuration.errorOnAutoCreate()) 2058 throw new Error("Attempt to auto-create InstanceComponent.uid"); 2059 else if (Configuration.doAutoCreate()) 2060 this.uid = new OidType(); // bb 2061 return this.uid; 2062 } 2063 2064 public boolean hasUidElement() { 2065 return this.uid != null && !this.uid.isEmpty(); 2066 } 2067 2068 public boolean hasUid() { 2069 return this.uid != null && !this.uid.isEmpty(); 2070 } 2071 2072 /** 2073 * @param value {@link #uid} (SOP Instance UID of the selected instance.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 2074 */ 2075 public InstanceComponent setUidElement(OidType value) { 2076 this.uid = value; 2077 return this; 2078 } 2079 2080 /** 2081 * @return SOP Instance UID of the selected instance. 2082 */ 2083 public String getUid() { 2084 return this.uid == null ? null : this.uid.getValue(); 2085 } 2086 2087 /** 2088 * @param value SOP Instance UID of the selected instance. 2089 */ 2090 public InstanceComponent setUid(String value) { 2091 if (this.uid == null) 2092 this.uid = new OidType(); 2093 this.uid.setValue(value); 2094 return this; 2095 } 2096 2097 /** 2098 * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) 2099 */ 2100 public List<InstanceDicomComponent> getDicom() { 2101 if (this.dicom == null) 2102 this.dicom = new ArrayList<InstanceDicomComponent>(); 2103 return this.dicom; 2104 } 2105 2106 public boolean hasDicom() { 2107 if (this.dicom == null) 2108 return false; 2109 for (InstanceDicomComponent item : this.dicom) 2110 if (!item.isEmpty()) 2111 return true; 2112 return false; 2113 } 2114 2115 /** 2116 * @return {@link #dicom} (Methods of accessing using DICOM web technologies.) 2117 */ 2118 // syntactic sugar 2119 public InstanceDicomComponent addDicom() { //3 2120 InstanceDicomComponent t = new InstanceDicomComponent(); 2121 if (this.dicom == null) 2122 this.dicom = new ArrayList<InstanceDicomComponent>(); 2123 this.dicom.add(t); 2124 return t; 2125 } 2126 2127 // syntactic sugar 2128 public InstanceComponent addDicom(InstanceDicomComponent t) { //3 2129 if (t == null) 2130 return this; 2131 if (this.dicom == null) 2132 this.dicom = new ArrayList<InstanceDicomComponent>(); 2133 this.dicom.add(t); 2134 return this; 2135 } 2136 2137 /** 2138 * @return {@link #frameNumbers} (The specific frame reference within a multi-frame object.) 2139 */ 2140 public List<UnsignedIntType> getFrameNumbers() { 2141 if (this.frameNumbers == null) 2142 this.frameNumbers = new ArrayList<UnsignedIntType>(); 2143 return this.frameNumbers; 2144 } 2145 2146 public boolean hasFrameNumbers() { 2147 if (this.frameNumbers == null) 2148 return false; 2149 for (UnsignedIntType item : this.frameNumbers) 2150 if (!item.isEmpty()) 2151 return true; 2152 return false; 2153 } 2154 2155 /** 2156 * @return {@link #frameNumbers} (The specific frame reference within a multi-frame object.) 2157 */ 2158 // syntactic sugar 2159 public UnsignedIntType addFrameNumbersElement() {//2 2160 UnsignedIntType t = new UnsignedIntType(); 2161 if (this.frameNumbers == null) 2162 this.frameNumbers = new ArrayList<UnsignedIntType>(); 2163 this.frameNumbers.add(t); 2164 return t; 2165 } 2166 2167 /** 2168 * @param value {@link #frameNumbers} (The specific frame reference within a multi-frame object.) 2169 */ 2170 public InstanceComponent addFrameNumbers(int value) { //1 2171 UnsignedIntType t = new UnsignedIntType(); 2172 t.setValue(value); 2173 if (this.frameNumbers == null) 2174 this.frameNumbers = new ArrayList<UnsignedIntType>(); 2175 this.frameNumbers.add(t); 2176 return this; 2177 } 2178 2179 /** 2180 * @param value {@link #frameNumbers} (The specific frame reference within a multi-frame object.) 2181 */ 2182 public boolean hasFrameNumbers(int value) { 2183 if (this.frameNumbers == null) 2184 return false; 2185 for (UnsignedIntType v : this.frameNumbers) 2186 if (v.equals(value)) // unsignedInt 2187 return true; 2188 return false; 2189 } 2190 2191 protected void listChildren(List<Property> childrenList) { 2192 super.listChildren(childrenList); 2193 childrenList.add(new Property("sopClass", "oid", "SOP class UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, sopClass)); 2194 childrenList.add(new Property("uid", "oid", "SOP Instance UID of the selected instance.", 0, java.lang.Integer.MAX_VALUE, uid)); 2195 childrenList.add(new Property("dicom", "", "Methods of accessing using DICOM web technologies.", 0, java.lang.Integer.MAX_VALUE, dicom)); 2196 childrenList.add(new Property("frameNumbers", "unsignedInt", "The specific frame reference within a multi-frame object.", 0, java.lang.Integer.MAX_VALUE, frameNumbers)); 2197 } 2198 2199 @Override 2200 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2201 switch (hash) { 2202 case 1560041540: /*sopClass*/ return this.sopClass == null ? new Base[0] : new Base[] {this.sopClass}; // OidType 2203 case 115792: /*uid*/ return this.uid == null ? new Base[0] : new Base[] {this.uid}; // OidType 2204 case 95578844: /*dicom*/ return this.dicom == null ? new Base[0] : this.dicom.toArray(new Base[this.dicom.size()]); // InstanceDicomComponent 2205 case -144148451: /*frameNumbers*/ return this.frameNumbers == null ? new Base[0] : this.frameNumbers.toArray(new Base[this.frameNumbers.size()]); // UnsignedIntType 2206 default: return super.getProperty(hash, name, checkValid); 2207 } 2208 2209 } 2210 2211 @Override 2212 public void setProperty(int hash, String name, Base value) throws FHIRException { 2213 switch (hash) { 2214 case 1560041540: // sopClass 2215 this.sopClass = castToOid(value); // OidType 2216 break; 2217 case 115792: // uid 2218 this.uid = castToOid(value); // OidType 2219 break; 2220 case 95578844: // dicom 2221 this.getDicom().add((InstanceDicomComponent) value); // InstanceDicomComponent 2222 break; 2223 case -144148451: // frameNumbers 2224 this.getFrameNumbers().add(castToUnsignedInt(value)); // UnsignedIntType 2225 break; 2226 default: super.setProperty(hash, name, value); 2227 } 2228 2229 } 2230 2231 @Override 2232 public void setProperty(String name, Base value) throws FHIRException { 2233 if (name.equals("sopClass")) 2234 this.sopClass = castToOid(value); // OidType 2235 else if (name.equals("uid")) 2236 this.uid = castToOid(value); // OidType 2237 else if (name.equals("dicom")) 2238 this.getDicom().add((InstanceDicomComponent) value); 2239 else if (name.equals("frameNumbers")) 2240 this.getFrameNumbers().add(castToUnsignedInt(value)); 2241 else 2242 super.setProperty(name, value); 2243 } 2244 2245 @Override 2246 public Base makeProperty(int hash, String name) throws FHIRException { 2247 switch (hash) { 2248 case 1560041540: throw new FHIRException("Cannot make property sopClass as it is not a complex type"); // OidType 2249 case 115792: throw new FHIRException("Cannot make property uid as it is not a complex type"); // OidType 2250 case 95578844: return addDicom(); // InstanceDicomComponent 2251 case -144148451: throw new FHIRException("Cannot make property frameNumbers as it is not a complex type"); // UnsignedIntType 2252 default: return super.makeProperty(hash, name); 2253 } 2254 2255 } 2256 2257 @Override 2258 public Base addChild(String name) throws FHIRException { 2259 if (name.equals("sopClass")) { 2260 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.sopClass"); 2261 } 2262 else if (name.equals("uid")) { 2263 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); 2264 } 2265 else if (name.equals("dicom")) { 2266 return addDicom(); 2267 } 2268 else if (name.equals("frameNumbers")) { 2269 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.frameNumbers"); 2270 } 2271 else 2272 return super.addChild(name); 2273 } 2274 2275 public InstanceComponent copy() { 2276 InstanceComponent dst = new InstanceComponent(); 2277 copyValues(dst); 2278 dst.sopClass = sopClass == null ? null : sopClass.copy(); 2279 dst.uid = uid == null ? null : uid.copy(); 2280 if (dicom != null) { 2281 dst.dicom = new ArrayList<InstanceDicomComponent>(); 2282 for (InstanceDicomComponent i : dicom) 2283 dst.dicom.add(i.copy()); 2284 }; 2285 if (frameNumbers != null) { 2286 dst.frameNumbers = new ArrayList<UnsignedIntType>(); 2287 for (UnsignedIntType i : frameNumbers) 2288 dst.frameNumbers.add(i.copy()); 2289 }; 2290 return dst; 2291 } 2292 2293 @Override 2294 public boolean equalsDeep(Base other) { 2295 if (!super.equalsDeep(other)) 2296 return false; 2297 if (!(other instanceof InstanceComponent)) 2298 return false; 2299 InstanceComponent o = (InstanceComponent) other; 2300 return compareDeep(sopClass, o.sopClass, true) && compareDeep(uid, o.uid, true) && compareDeep(dicom, o.dicom, true) 2301 && compareDeep(frameNumbers, o.frameNumbers, true); 2302 } 2303 2304 @Override 2305 public boolean equalsShallow(Base other) { 2306 if (!super.equalsShallow(other)) 2307 return false; 2308 if (!(other instanceof InstanceComponent)) 2309 return false; 2310 InstanceComponent o = (InstanceComponent) other; 2311 return compareValues(sopClass, o.sopClass, true) && compareValues(uid, o.uid, true) && compareValues(frameNumbers, o.frameNumbers, true) 2312 ; 2313 } 2314 2315 public boolean isEmpty() { 2316 return super.isEmpty() && (sopClass == null || sopClass.isEmpty()) && (uid == null || uid.isEmpty()) 2317 && (dicom == null || dicom.isEmpty()) && (frameNumbers == null || frameNumbers.isEmpty()) 2318 ; 2319 } 2320 2321 public String fhirType() { 2322 return "ImagingExcerpt.study.series.instance"; 2323 2324 } 2325 2326 } 2327 2328 @Block() 2329 public static class InstanceDicomComponent extends BackboneElement implements IBaseBackboneElement { 2330 /** 2331 * Access type for DICOM web. 2332 */ 2333 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2334 @Description(shortDefinition="WADO-RS | WADO-URI | IID | WADO-WS", formalDefinition="Access type for DICOM web." ) 2335 protected Enumeration<DWebType> type; 2336 2337 /** 2338 * The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 2339 */ 2340 @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2341 @Description(shortDefinition="Retrieve study URL", formalDefinition="The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol." ) 2342 protected UriType url; 2343 2344 private static final long serialVersionUID = 1661664416L; 2345 2346 /** 2347 * Constructor 2348 */ 2349 public InstanceDicomComponent() { 2350 super(); 2351 } 2352 2353 /** 2354 * Constructor 2355 */ 2356 public InstanceDicomComponent(Enumeration<DWebType> type, UriType url) { 2357 super(); 2358 this.type = type; 2359 this.url = url; 2360 } 2361 2362 /** 2363 * @return {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2364 */ 2365 public Enumeration<DWebType> getTypeElement() { 2366 if (this.type == null) 2367 if (Configuration.errorOnAutoCreate()) 2368 throw new Error("Attempt to auto-create InstanceDicomComponent.type"); 2369 else if (Configuration.doAutoCreate()) 2370 this.type = new Enumeration<DWebType>(new DWebTypeEnumFactory()); // bb 2371 return this.type; 2372 } 2373 2374 public boolean hasTypeElement() { 2375 return this.type != null && !this.type.isEmpty(); 2376 } 2377 2378 public boolean hasType() { 2379 return this.type != null && !this.type.isEmpty(); 2380 } 2381 2382 /** 2383 * @param value {@link #type} (Access type for DICOM web.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 2384 */ 2385 public InstanceDicomComponent setTypeElement(Enumeration<DWebType> value) { 2386 this.type = value; 2387 return this; 2388 } 2389 2390 /** 2391 * @return Access type for DICOM web. 2392 */ 2393 public DWebType getType() { 2394 return this.type == null ? null : this.type.getValue(); 2395 } 2396 2397 /** 2398 * @param value Access type for DICOM web. 2399 */ 2400 public InstanceDicomComponent setType(DWebType value) { 2401 if (this.type == null) 2402 this.type = new Enumeration<DWebType>(new DWebTypeEnumFactory()); 2403 this.type.setValue(value); 2404 return this; 2405 } 2406 2407 /** 2408 * @return {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2409 */ 2410 public UriType getUrlElement() { 2411 if (this.url == null) 2412 if (Configuration.errorOnAutoCreate()) 2413 throw new Error("Attempt to auto-create InstanceDicomComponent.url"); 2414 else if (Configuration.doAutoCreate()) 2415 this.url = new UriType(); // bb 2416 return this.url; 2417 } 2418 2419 public boolean hasUrlElement() { 2420 return this.url != null && !this.url.isEmpty(); 2421 } 2422 2423 public boolean hasUrl() { 2424 return this.url != null && !this.url.isEmpty(); 2425 } 2426 2427 /** 2428 * @param value {@link #url} (The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2429 */ 2430 public InstanceDicomComponent setUrlElement(UriType value) { 2431 this.url = value; 2432 return this; 2433 } 2434 2435 /** 2436 * @return The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 2437 */ 2438 public String getUrl() { 2439 return this.url == null ? null : this.url.getValue(); 2440 } 2441 2442 /** 2443 * @param value The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol. 2444 */ 2445 public InstanceDicomComponent setUrl(String value) { 2446 if (this.url == null) 2447 this.url = new UriType(); 2448 this.url.setValue(value); 2449 return this; 2450 } 2451 2452 protected void listChildren(List<Property> childrenList) { 2453 super.listChildren(childrenList); 2454 childrenList.add(new Property("type", "code", "Access type for DICOM web.", 0, java.lang.Integer.MAX_VALUE, type)); 2455 childrenList.add(new Property("url", "uri", "The source system root URL / base URL, from which all content can be retrieved using the specified DICOM protocol.", 0, java.lang.Integer.MAX_VALUE, url)); 2456 } 2457 2458 @Override 2459 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2460 switch (hash) { 2461 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DWebType> 2462 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 2463 default: return super.getProperty(hash, name, checkValid); 2464 } 2465 2466 } 2467 2468 @Override 2469 public void setProperty(int hash, String name, Base value) throws FHIRException { 2470 switch (hash) { 2471 case 3575610: // type 2472 this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration<DWebType> 2473 break; 2474 case 116079: // url 2475 this.url = castToUri(value); // UriType 2476 break; 2477 default: super.setProperty(hash, name, value); 2478 } 2479 2480 } 2481 2482 @Override 2483 public void setProperty(String name, Base value) throws FHIRException { 2484 if (name.equals("type")) 2485 this.type = new DWebTypeEnumFactory().fromType(value); // Enumeration<DWebType> 2486 else if (name.equals("url")) 2487 this.url = castToUri(value); // UriType 2488 else 2489 super.setProperty(name, value); 2490 } 2491 2492 @Override 2493 public Base makeProperty(int hash, String name) throws FHIRException { 2494 switch (hash) { 2495 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<DWebType> 2496 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 2497 default: return super.makeProperty(hash, name); 2498 } 2499 2500 } 2501 2502 @Override 2503 public Base addChild(String name) throws FHIRException { 2504 if (name.equals("type")) { 2505 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.type"); 2506 } 2507 else if (name.equals("url")) { 2508 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.url"); 2509 } 2510 else 2511 return super.addChild(name); 2512 } 2513 2514 public InstanceDicomComponent copy() { 2515 InstanceDicomComponent dst = new InstanceDicomComponent(); 2516 copyValues(dst); 2517 dst.type = type == null ? null : type.copy(); 2518 dst.url = url == null ? null : url.copy(); 2519 return dst; 2520 } 2521 2522 @Override 2523 public boolean equalsDeep(Base other) { 2524 if (!super.equalsDeep(other)) 2525 return false; 2526 if (!(other instanceof InstanceDicomComponent)) 2527 return false; 2528 InstanceDicomComponent o = (InstanceDicomComponent) other; 2529 return compareDeep(type, o.type, true) && compareDeep(url, o.url, true); 2530 } 2531 2532 @Override 2533 public boolean equalsShallow(Base other) { 2534 if (!super.equalsShallow(other)) 2535 return false; 2536 if (!(other instanceof InstanceDicomComponent)) 2537 return false; 2538 InstanceDicomComponent o = (InstanceDicomComponent) other; 2539 return compareValues(type, o.type, true) && compareValues(url, o.url, true); 2540 } 2541 2542 public boolean isEmpty() { 2543 return super.isEmpty() && (type == null || type.isEmpty()) && (url == null || url.isEmpty()) 2544 ; 2545 } 2546 2547 public String fhirType() { 2548 return "ImagingExcerpt.study.series.instance.dicom"; 2549 2550 } 2551 2552 } 2553 2554 /** 2555 * Unique identifier of the DICOM Key Object Selection (KOS) representation. 2556 */ 2557 @Child(name = "uid", type = {OidType.class}, order=0, min=1, max=1, modifier=false, summary=true) 2558 @Description(shortDefinition="Instance UID", formalDefinition="Unique identifier of the DICOM Key Object Selection (KOS) representation." ) 2559 protected OidType uid; 2560 2561 /** 2562 * A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt. 2563 */ 2564 @Child(name = "patient", type = {Patient.class}, order=1, min=1, max=1, modifier=false, summary=true) 2565 @Description(shortDefinition="Patient of the selected objects", formalDefinition="A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt." ) 2566 protected Reference patient; 2567 2568 /** 2569 * The actual object that is the target of the reference (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) 2570 */ 2571 protected Patient patientTarget; 2572 2573 /** 2574 * Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). 2575 */ 2576 @Child(name = "authoringTime", type = {DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2577 @Description(shortDefinition="Time when the imaging object selection was created", formalDefinition="Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image)." ) 2578 protected DateTimeType authoringTime; 2579 2580 /** 2581 * Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion. 2582 */ 2583 @Child(name = "author", type = {Practitioner.class, Device.class, Organization.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1, modifier=false, summary=true) 2584 @Description(shortDefinition="Author (human or machine)", formalDefinition="Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion." ) 2585 protected Reference author; 2586 2587 /** 2588 * The actual object that is the target of the reference (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) 2589 */ 2590 protected Resource authorTarget; 2591 2592 /** 2593 * The reason for, or significance of, the selection of objects referenced in the resource. 2594 */ 2595 @Child(name = "title", type = {CodeableConcept.class}, order=4, min=1, max=1, modifier=false, summary=true) 2596 @Description(shortDefinition="Reason for selection", formalDefinition="The reason for, or significance of, the selection of objects referenced in the resource." ) 2597 protected CodeableConcept title; 2598 2599 /** 2600 * Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. 2601 */ 2602 @Child(name = "description", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 2603 @Description(shortDefinition="Description text", formalDefinition="Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection." ) 2604 protected StringType description; 2605 2606 /** 2607 * Study identity and locating information of the DICOM SOP instances in the selection. 2608 */ 2609 @Child(name = "study", type = {}, order=6, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2610 @Description(shortDefinition="Study identity of the selected instances", formalDefinition="Study identity and locating information of the DICOM SOP instances in the selection." ) 2611 protected List<StudyComponent> study; 2612 2613 private static final long serialVersionUID = 1428713335L; 2614 2615 /** 2616 * Constructor 2617 */ 2618 public ImagingExcerpt() { 2619 super(); 2620 } 2621 2622 /** 2623 * Constructor 2624 */ 2625 public ImagingExcerpt(OidType uid, Reference patient, CodeableConcept title) { 2626 super(); 2627 this.uid = uid; 2628 this.patient = patient; 2629 this.title = title; 2630 } 2631 2632 /** 2633 * @return {@link #uid} (Unique identifier of the DICOM Key Object Selection (KOS) representation.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 2634 */ 2635 public OidType getUidElement() { 2636 if (this.uid == null) 2637 if (Configuration.errorOnAutoCreate()) 2638 throw new Error("Attempt to auto-create ImagingExcerpt.uid"); 2639 else if (Configuration.doAutoCreate()) 2640 this.uid = new OidType(); // bb 2641 return this.uid; 2642 } 2643 2644 public boolean hasUidElement() { 2645 return this.uid != null && !this.uid.isEmpty(); 2646 } 2647 2648 public boolean hasUid() { 2649 return this.uid != null && !this.uid.isEmpty(); 2650 } 2651 2652 /** 2653 * @param value {@link #uid} (Unique identifier of the DICOM Key Object Selection (KOS) representation.). This is the underlying object with id, value and extensions. The accessor "getUid" gives direct access to the value 2654 */ 2655 public ImagingExcerpt setUidElement(OidType value) { 2656 this.uid = value; 2657 return this; 2658 } 2659 2660 /** 2661 * @return Unique identifier of the DICOM Key Object Selection (KOS) representation. 2662 */ 2663 public String getUid() { 2664 return this.uid == null ? null : this.uid.getValue(); 2665 } 2666 2667 /** 2668 * @param value Unique identifier of the DICOM Key Object Selection (KOS) representation. 2669 */ 2670 public ImagingExcerpt setUid(String value) { 2671 if (this.uid == null) 2672 this.uid = new OidType(); 2673 this.uid.setValue(value); 2674 return this; 2675 } 2676 2677 /** 2678 * @return {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) 2679 */ 2680 public Reference getPatient() { 2681 if (this.patient == null) 2682 if (Configuration.errorOnAutoCreate()) 2683 throw new Error("Attempt to auto-create ImagingExcerpt.patient"); 2684 else if (Configuration.doAutoCreate()) 2685 this.patient = new Reference(); // cc 2686 return this.patient; 2687 } 2688 2689 public boolean hasPatient() { 2690 return this.patient != null && !this.patient.isEmpty(); 2691 } 2692 2693 /** 2694 * @param value {@link #patient} (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) 2695 */ 2696 public ImagingExcerpt setPatient(Reference value) { 2697 this.patient = value; 2698 return this; 2699 } 2700 2701 /** 2702 * @return {@link #patient} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) 2703 */ 2704 public Patient getPatientTarget() { 2705 if (this.patientTarget == null) 2706 if (Configuration.errorOnAutoCreate()) 2707 throw new Error("Attempt to auto-create ImagingExcerpt.patient"); 2708 else if (Configuration.doAutoCreate()) 2709 this.patientTarget = new Patient(); // aa 2710 return this.patientTarget; 2711 } 2712 2713 /** 2714 * @param value {@link #patient} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.) 2715 */ 2716 public ImagingExcerpt setPatientTarget(Patient value) { 2717 this.patientTarget = value; 2718 return this; 2719 } 2720 2721 /** 2722 * @return {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value 2723 */ 2724 public DateTimeType getAuthoringTimeElement() { 2725 if (this.authoringTime == null) 2726 if (Configuration.errorOnAutoCreate()) 2727 throw new Error("Attempt to auto-create ImagingExcerpt.authoringTime"); 2728 else if (Configuration.doAutoCreate()) 2729 this.authoringTime = new DateTimeType(); // bb 2730 return this.authoringTime; 2731 } 2732 2733 public boolean hasAuthoringTimeElement() { 2734 return this.authoringTime != null && !this.authoringTime.isEmpty(); 2735 } 2736 2737 public boolean hasAuthoringTime() { 2738 return this.authoringTime != null && !this.authoringTime.isEmpty(); 2739 } 2740 2741 /** 2742 * @param value {@link #authoringTime} (Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).). This is the underlying object with id, value and extensions. The accessor "getAuthoringTime" gives direct access to the value 2743 */ 2744 public ImagingExcerpt setAuthoringTimeElement(DateTimeType value) { 2745 this.authoringTime = value; 2746 return this; 2747 } 2748 2749 /** 2750 * @return Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). 2751 */ 2752 public Date getAuthoringTime() { 2753 return this.authoringTime == null ? null : this.authoringTime.getValue(); 2754 } 2755 2756 /** 2757 * @param value Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image). 2758 */ 2759 public ImagingExcerpt setAuthoringTime(Date value) { 2760 if (value == null) 2761 this.authoringTime = null; 2762 else { 2763 if (this.authoringTime == null) 2764 this.authoringTime = new DateTimeType(); 2765 this.authoringTime.setValue(value); 2766 } 2767 return this; 2768 } 2769 2770 /** 2771 * @return {@link #author} (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) 2772 */ 2773 public Reference getAuthor() { 2774 if (this.author == null) 2775 if (Configuration.errorOnAutoCreate()) 2776 throw new Error("Attempt to auto-create ImagingExcerpt.author"); 2777 else if (Configuration.doAutoCreate()) 2778 this.author = new Reference(); // cc 2779 return this.author; 2780 } 2781 2782 public boolean hasAuthor() { 2783 return this.author != null && !this.author.isEmpty(); 2784 } 2785 2786 /** 2787 * @param value {@link #author} (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) 2788 */ 2789 public ImagingExcerpt setAuthor(Reference value) { 2790 this.author = value; 2791 return this; 2792 } 2793 2794 /** 2795 * @return {@link #author} 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. (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) 2796 */ 2797 public Resource getAuthorTarget() { 2798 return this.authorTarget; 2799 } 2800 2801 /** 2802 * @param value {@link #author} 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. (Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.) 2803 */ 2804 public ImagingExcerpt setAuthorTarget(Resource value) { 2805 this.authorTarget = value; 2806 return this; 2807 } 2808 2809 /** 2810 * @return {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) 2811 */ 2812 public CodeableConcept getTitle() { 2813 if (this.title == null) 2814 if (Configuration.errorOnAutoCreate()) 2815 throw new Error("Attempt to auto-create ImagingExcerpt.title"); 2816 else if (Configuration.doAutoCreate()) 2817 this.title = new CodeableConcept(); // cc 2818 return this.title; 2819 } 2820 2821 public boolean hasTitle() { 2822 return this.title != null && !this.title.isEmpty(); 2823 } 2824 2825 /** 2826 * @param value {@link #title} (The reason for, or significance of, the selection of objects referenced in the resource.) 2827 */ 2828 public ImagingExcerpt setTitle(CodeableConcept value) { 2829 this.title = value; 2830 return this; 2831 } 2832 2833 /** 2834 * @return {@link #description} (Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2835 */ 2836 public StringType getDescriptionElement() { 2837 if (this.description == null) 2838 if (Configuration.errorOnAutoCreate()) 2839 throw new Error("Attempt to auto-create ImagingExcerpt.description"); 2840 else if (Configuration.doAutoCreate()) 2841 this.description = new StringType(); // bb 2842 return this.description; 2843 } 2844 2845 public boolean hasDescriptionElement() { 2846 return this.description != null && !this.description.isEmpty(); 2847 } 2848 2849 public boolean hasDescription() { 2850 return this.description != null && !this.description.isEmpty(); 2851 } 2852 2853 /** 2854 * @param value {@link #description} (Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2855 */ 2856 public ImagingExcerpt setDescriptionElement(StringType value) { 2857 this.description = value; 2858 return this; 2859 } 2860 2861 /** 2862 * @return Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. 2863 */ 2864 public String getDescription() { 2865 return this.description == null ? null : this.description.getValue(); 2866 } 2867 2868 /** 2869 * @param value Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection. 2870 */ 2871 public ImagingExcerpt setDescription(String value) { 2872 if (Utilities.noString(value)) 2873 this.description = null; 2874 else { 2875 if (this.description == null) 2876 this.description = new StringType(); 2877 this.description.setValue(value); 2878 } 2879 return this; 2880 } 2881 2882 /** 2883 * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) 2884 */ 2885 public List<StudyComponent> getStudy() { 2886 if (this.study == null) 2887 this.study = new ArrayList<StudyComponent>(); 2888 return this.study; 2889 } 2890 2891 public boolean hasStudy() { 2892 if (this.study == null) 2893 return false; 2894 for (StudyComponent item : this.study) 2895 if (!item.isEmpty()) 2896 return true; 2897 return false; 2898 } 2899 2900 /** 2901 * @return {@link #study} (Study identity and locating information of the DICOM SOP instances in the selection.) 2902 */ 2903 // syntactic sugar 2904 public StudyComponent addStudy() { //3 2905 StudyComponent t = new StudyComponent(); 2906 if (this.study == null) 2907 this.study = new ArrayList<StudyComponent>(); 2908 this.study.add(t); 2909 return t; 2910 } 2911 2912 // syntactic sugar 2913 public ImagingExcerpt addStudy(StudyComponent t) { //3 2914 if (t == null) 2915 return this; 2916 if (this.study == null) 2917 this.study = new ArrayList<StudyComponent>(); 2918 this.study.add(t); 2919 return this; 2920 } 2921 2922 protected void listChildren(List<Property> childrenList) { 2923 super.listChildren(childrenList); 2924 childrenList.add(new Property("uid", "oid", "Unique identifier of the DICOM Key Object Selection (KOS) representation.", 0, java.lang.Integer.MAX_VALUE, uid)); 2925 childrenList.add(new Property("patient", "Reference(Patient)", "A patient resource reference which is the patient subject of all DICOM SOP Instances in this ImagingExcerpt.", 0, java.lang.Integer.MAX_VALUE, patient)); 2926 childrenList.add(new Property("authoringTime", "dateTime", "Date and time when the selection of the referenced instances were made. It is (typically) different from the creation date of the selection resource, and from dates associated with the referenced instances (e.g. capture time of the referenced image).", 0, java.lang.Integer.MAX_VALUE, authoringTime)); 2927 childrenList.add(new Property("author", "Reference(Practitioner|Device|Organization|Patient|RelatedPerson)", "Author of ImagingExcerpt. It can be a human author or a device which made the decision of the SOP instances selected. For example, a radiologist selected a set of imaging SOP instances to attach in a diagnostic report, and a CAD application may author a selection to describe SOP instances it used to generate a detection conclusion.", 0, java.lang.Integer.MAX_VALUE, author)); 2928 childrenList.add(new Property("title", "CodeableConcept", "The reason for, or significance of, the selection of objects referenced in the resource.", 0, java.lang.Integer.MAX_VALUE, title)); 2929 childrenList.add(new Property("description", "string", "Text description of the DICOM SOP instances selected in the ImagingExcerpt. This should be aligned with the content of the title element, and can provide further explanation of the SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, description)); 2930 childrenList.add(new Property("study", "", "Study identity and locating information of the DICOM SOP instances in the selection.", 0, java.lang.Integer.MAX_VALUE, study)); 2931 } 2932 2933 @Override 2934 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2935 switch (hash) { 2936 case 115792: /*uid*/ return this.uid == null ? new Base[0] : new Base[] {this.uid}; // OidType 2937 case -791418107: /*patient*/ return this.patient == null ? new Base[0] : new Base[] {this.patient}; // Reference 2938 case -1724532252: /*authoringTime*/ return this.authoringTime == null ? new Base[0] : new Base[] {this.authoringTime}; // DateTimeType 2939 case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Reference 2940 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // CodeableConcept 2941 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2942 case 109776329: /*study*/ return this.study == null ? new Base[0] : this.study.toArray(new Base[this.study.size()]); // StudyComponent 2943 default: return super.getProperty(hash, name, checkValid); 2944 } 2945 2946 } 2947 2948 @Override 2949 public void setProperty(int hash, String name, Base value) throws FHIRException { 2950 switch (hash) { 2951 case 115792: // uid 2952 this.uid = castToOid(value); // OidType 2953 break; 2954 case -791418107: // patient 2955 this.patient = castToReference(value); // Reference 2956 break; 2957 case -1724532252: // authoringTime 2958 this.authoringTime = castToDateTime(value); // DateTimeType 2959 break; 2960 case -1406328437: // author 2961 this.author = castToReference(value); // Reference 2962 break; 2963 case 110371416: // title 2964 this.title = castToCodeableConcept(value); // CodeableConcept 2965 break; 2966 case -1724546052: // description 2967 this.description = castToString(value); // StringType 2968 break; 2969 case 109776329: // study 2970 this.getStudy().add((StudyComponent) value); // StudyComponent 2971 break; 2972 default: super.setProperty(hash, name, value); 2973 } 2974 2975 } 2976 2977 @Override 2978 public void setProperty(String name, Base value) throws FHIRException { 2979 if (name.equals("uid")) 2980 this.uid = castToOid(value); // OidType 2981 else if (name.equals("patient")) 2982 this.patient = castToReference(value); // Reference 2983 else if (name.equals("authoringTime")) 2984 this.authoringTime = castToDateTime(value); // DateTimeType 2985 else if (name.equals("author")) 2986 this.author = castToReference(value); // Reference 2987 else if (name.equals("title")) 2988 this.title = castToCodeableConcept(value); // CodeableConcept 2989 else if (name.equals("description")) 2990 this.description = castToString(value); // StringType 2991 else if (name.equals("study")) 2992 this.getStudy().add((StudyComponent) value); 2993 else 2994 super.setProperty(name, value); 2995 } 2996 2997 @Override 2998 public Base makeProperty(int hash, String name) throws FHIRException { 2999 switch (hash) { 3000 case 115792: throw new FHIRException("Cannot make property uid as it is not a complex type"); // OidType 3001 case -791418107: return getPatient(); // Reference 3002 case -1724532252: throw new FHIRException("Cannot make property authoringTime as it is not a complex type"); // DateTimeType 3003 case -1406328437: return getAuthor(); // Reference 3004 case 110371416: return getTitle(); // CodeableConcept 3005 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 3006 case 109776329: return addStudy(); // StudyComponent 3007 default: return super.makeProperty(hash, name); 3008 } 3009 3010 } 3011 3012 @Override 3013 public Base addChild(String name) throws FHIRException { 3014 if (name.equals("uid")) { 3015 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.uid"); 3016 } 3017 else if (name.equals("patient")) { 3018 this.patient = new Reference(); 3019 return this.patient; 3020 } 3021 else if (name.equals("authoringTime")) { 3022 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.authoringTime"); 3023 } 3024 else if (name.equals("author")) { 3025 this.author = new Reference(); 3026 return this.author; 3027 } 3028 else if (name.equals("title")) { 3029 this.title = new CodeableConcept(); 3030 return this.title; 3031 } 3032 else if (name.equals("description")) { 3033 throw new FHIRException("Cannot call addChild on a primitive type ImagingExcerpt.description"); 3034 } 3035 else if (name.equals("study")) { 3036 return addStudy(); 3037 } 3038 else 3039 return super.addChild(name); 3040 } 3041 3042 public String fhirType() { 3043 return "ImagingExcerpt"; 3044 3045 } 3046 3047 public ImagingExcerpt copy() { 3048 ImagingExcerpt dst = new ImagingExcerpt(); 3049 copyValues(dst); 3050 dst.uid = uid == null ? null : uid.copy(); 3051 dst.patient = patient == null ? null : patient.copy(); 3052 dst.authoringTime = authoringTime == null ? null : authoringTime.copy(); 3053 dst.author = author == null ? null : author.copy(); 3054 dst.title = title == null ? null : title.copy(); 3055 dst.description = description == null ? null : description.copy(); 3056 if (study != null) { 3057 dst.study = new ArrayList<StudyComponent>(); 3058 for (StudyComponent i : study) 3059 dst.study.add(i.copy()); 3060 }; 3061 return dst; 3062 } 3063 3064 protected ImagingExcerpt typedCopy() { 3065 return copy(); 3066 } 3067 3068 @Override 3069 public boolean equalsDeep(Base other) { 3070 if (!super.equalsDeep(other)) 3071 return false; 3072 if (!(other instanceof ImagingExcerpt)) 3073 return false; 3074 ImagingExcerpt o = (ImagingExcerpt) other; 3075 return compareDeep(uid, o.uid, true) && compareDeep(patient, o.patient, true) && compareDeep(authoringTime, o.authoringTime, true) 3076 && compareDeep(author, o.author, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true) 3077 && compareDeep(study, o.study, true); 3078 } 3079 3080 @Override 3081 public boolean equalsShallow(Base other) { 3082 if (!super.equalsShallow(other)) 3083 return false; 3084 if (!(other instanceof ImagingExcerpt)) 3085 return false; 3086 ImagingExcerpt o = (ImagingExcerpt) other; 3087 return compareValues(uid, o.uid, true) && compareValues(authoringTime, o.authoringTime, true) && compareValues(description, o.description, true) 3088 ; 3089 } 3090 3091 public boolean isEmpty() { 3092 return super.isEmpty() && (uid == null || uid.isEmpty()) && (patient == null || patient.isEmpty()) 3093 && (authoringTime == null || authoringTime.isEmpty()) && (author == null || author.isEmpty()) 3094 && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (study == null || study.isEmpty()) 3095 ; 3096 } 3097 3098 @Override 3099 public ResourceType getResourceType() { 3100 return ResourceType.ImagingExcerpt; 3101 } 3102 3103 /** 3104 * Search parameter: <b>selected-study</b> 3105 * <p> 3106 * Description: <b>Study selected in key DICOM object selection</b><br> 3107 * Type: <b>uri</b><br> 3108 * Path: <b>ImagingExcerpt.study.uid</b><br> 3109 * </p> 3110 */ 3111 @SearchParamDefinition(name="selected-study", path="ImagingExcerpt.study.uid", description="Study selected in key DICOM object selection", type="uri" ) 3112 public static final String SP_SELECTED_STUDY = "selected-study"; 3113 /** 3114 * <b>Fluent Client</b> search parameter constant for <b>selected-study</b> 3115 * <p> 3116 * Description: <b>Study selected in key DICOM object selection</b><br> 3117 * Type: <b>uri</b><br> 3118 * Path: <b>ImagingExcerpt.study.uid</b><br> 3119 * </p> 3120 */ 3121 public static final ca.uhn.fhir.rest.gclient.UriClientParam SELECTED_STUDY = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_SELECTED_STUDY); 3122 3123 /** 3124 * Search parameter: <b>author</b> 3125 * <p> 3126 * Description: <b>Author of key DICOM object selection</b><br> 3127 * Type: <b>reference</b><br> 3128 * Path: <b>ImagingExcerpt.author</b><br> 3129 * </p> 3130 */ 3131 @SearchParamDefinition(name="author", path="ImagingExcerpt.author", description="Author of key DICOM object selection", type="reference" ) 3132 public static final String SP_AUTHOR = "author"; 3133 /** 3134 * <b>Fluent Client</b> search parameter constant for <b>author</b> 3135 * <p> 3136 * Description: <b>Author of key DICOM object selection</b><br> 3137 * Type: <b>reference</b><br> 3138 * Path: <b>ImagingExcerpt.author</b><br> 3139 * </p> 3140 */ 3141 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam AUTHOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_AUTHOR); 3142 3143/** 3144 * Constant for fluent queries to be used to add include statements. Specifies 3145 * the path value of "<b>ImagingExcerpt:author</b>". 3146 */ 3147 public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR = new ca.uhn.fhir.model.api.Include("ImagingExcerpt:author").toLocked(); 3148 3149 /** 3150 * Search parameter: <b>title</b> 3151 * <p> 3152 * Description: <b>Title of key DICOM object selection</b><br> 3153 * Type: <b>token</b><br> 3154 * Path: <b>ImagingExcerpt.title</b><br> 3155 * </p> 3156 */ 3157 @SearchParamDefinition(name="title", path="ImagingExcerpt.title", description="Title of key DICOM object selection", type="token" ) 3158 public static final String SP_TITLE = "title"; 3159 /** 3160 * <b>Fluent Client</b> search parameter constant for <b>title</b> 3161 * <p> 3162 * Description: <b>Title of key DICOM object selection</b><br> 3163 * Type: <b>token</b><br> 3164 * Path: <b>ImagingExcerpt.title</b><br> 3165 * </p> 3166 */ 3167 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TITLE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TITLE); 3168 3169 /** 3170 * Search parameter: <b>patient</b> 3171 * <p> 3172 * Description: <b>Subject of key DICOM object selection</b><br> 3173 * Type: <b>reference</b><br> 3174 * Path: <b>ImagingExcerpt.patient</b><br> 3175 * </p> 3176 */ 3177 @SearchParamDefinition(name="patient", path="ImagingExcerpt.patient", description="Subject of key DICOM object selection", type="reference" ) 3178 public static final String SP_PATIENT = "patient"; 3179 /** 3180 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 3181 * <p> 3182 * Description: <b>Subject of key DICOM object selection</b><br> 3183 * Type: <b>reference</b><br> 3184 * Path: <b>ImagingExcerpt.patient</b><br> 3185 * </p> 3186 */ 3187 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 3188 3189/** 3190 * Constant for fluent queries to be used to add include statements. Specifies 3191 * the path value of "<b>ImagingExcerpt:patient</b>". 3192 */ 3193 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("ImagingExcerpt:patient").toLocked(); 3194 3195 /** 3196 * Search parameter: <b>authoring-time</b> 3197 * <p> 3198 * Description: <b>Time of key DICOM object selection authoring</b><br> 3199 * Type: <b>date</b><br> 3200 * Path: <b>ImagingExcerpt.authoringTime</b><br> 3201 * </p> 3202 */ 3203 @SearchParamDefinition(name="authoring-time", path="ImagingExcerpt.authoringTime", description="Time of key DICOM object selection authoring", type="date" ) 3204 public static final String SP_AUTHORING_TIME = "authoring-time"; 3205 /** 3206 * <b>Fluent Client</b> search parameter constant for <b>authoring-time</b> 3207 * <p> 3208 * Description: <b>Time of key DICOM object selection authoring</b><br> 3209 * Type: <b>date</b><br> 3210 * Path: <b>ImagingExcerpt.authoringTime</b><br> 3211 * </p> 3212 */ 3213 public static final ca.uhn.fhir.rest.gclient.DateClientParam AUTHORING_TIME = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_AUTHORING_TIME); 3214 3215 /** 3216 * Search parameter: <b>identifier</b> 3217 * <p> 3218 * Description: <b>UID of key DICOM object selection</b><br> 3219 * Type: <b>uri</b><br> 3220 * Path: <b>ImagingExcerpt.uid</b><br> 3221 * </p> 3222 */ 3223 @SearchParamDefinition(name="identifier", path="ImagingExcerpt.uid", description="UID of key DICOM object selection", type="uri" ) 3224 public static final String SP_IDENTIFIER = "identifier"; 3225 /** 3226 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 3227 * <p> 3228 * Description: <b>UID of key DICOM object selection</b><br> 3229 * Type: <b>uri</b><br> 3230 * Path: <b>ImagingExcerpt.uid</b><br> 3231 * </p> 3232 */ 3233 public static final ca.uhn.fhir.rest.gclient.UriClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_IDENTIFIER); 3234 3235 3236}