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