001package org.hl7.fhir.dstu3.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 Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import ca.uhn.fhir.model.api.annotation.ResourceDef; 038import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 039import ca.uhn.fhir.model.api.annotation.Child; 040import ca.uhn.fhir.model.api.annotation.ChildOrder; 041import ca.uhn.fhir.model.api.annotation.Description; 042import ca.uhn.fhir.model.api.annotation.Block; 043import org.hl7.fhir.instance.model.api.*; 044import org.hl7.fhir.exceptions.FHIRException; 045/** 046 * A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. 047 */ 048@ResourceDef(name="Media", profile="http://hl7.org/fhir/Profile/Media") 049public class Media extends DomainResource { 050 051 public enum DigitalMediaType { 052 /** 053 * The media consists of one or more unmoving images, including photographs, computer-generated graphs and charts, and scanned documents 054 */ 055 PHOTO, 056 /** 057 * The media consists of a series of frames that capture a moving image 058 */ 059 VIDEO, 060 /** 061 * The media consists of a sound recording 062 */ 063 AUDIO, 064 /** 065 * added to help the parsers with the generic types 066 */ 067 NULL; 068 public static DigitalMediaType fromCode(String codeString) throws FHIRException { 069 if (codeString == null || "".equals(codeString)) 070 return null; 071 if ("photo".equals(codeString)) 072 return PHOTO; 073 if ("video".equals(codeString)) 074 return VIDEO; 075 if ("audio".equals(codeString)) 076 return AUDIO; 077 if (Configuration.isAcceptInvalidEnums()) 078 return null; 079 else 080 throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'"); 081 } 082 public String toCode() { 083 switch (this) { 084 case PHOTO: return "photo"; 085 case VIDEO: return "video"; 086 case AUDIO: return "audio"; 087 default: return "?"; 088 } 089 } 090 public String getSystem() { 091 switch (this) { 092 case PHOTO: return "http://hl7.org/fhir/digital-media-type"; 093 case VIDEO: return "http://hl7.org/fhir/digital-media-type"; 094 case AUDIO: return "http://hl7.org/fhir/digital-media-type"; 095 default: return "?"; 096 } 097 } 098 public String getDefinition() { 099 switch (this) { 100 case PHOTO: return "The media consists of one or more unmoving images, including photographs, computer-generated graphs and charts, and scanned documents"; 101 case VIDEO: return "The media consists of a series of frames that capture a moving image"; 102 case AUDIO: return "The media consists of a sound recording"; 103 default: return "?"; 104 } 105 } 106 public String getDisplay() { 107 switch (this) { 108 case PHOTO: return "Photo"; 109 case VIDEO: return "Video"; 110 case AUDIO: return "Audio"; 111 default: return "?"; 112 } 113 } 114 } 115 116 public static class DigitalMediaTypeEnumFactory implements EnumFactory<DigitalMediaType> { 117 public DigitalMediaType fromCode(String codeString) throws IllegalArgumentException { 118 if (codeString == null || "".equals(codeString)) 119 if (codeString == null || "".equals(codeString)) 120 return null; 121 if ("photo".equals(codeString)) 122 return DigitalMediaType.PHOTO; 123 if ("video".equals(codeString)) 124 return DigitalMediaType.VIDEO; 125 if ("audio".equals(codeString)) 126 return DigitalMediaType.AUDIO; 127 throw new IllegalArgumentException("Unknown DigitalMediaType code '"+codeString+"'"); 128 } 129 public Enumeration<DigitalMediaType> fromType(Base code) throws FHIRException { 130 if (code == null) 131 return null; 132 if (code.isEmpty()) 133 return new Enumeration<DigitalMediaType>(this); 134 String codeString = ((PrimitiveType) code).asStringValue(); 135 if (codeString == null || "".equals(codeString)) 136 return null; 137 if ("photo".equals(codeString)) 138 return new Enumeration<DigitalMediaType>(this, DigitalMediaType.PHOTO); 139 if ("video".equals(codeString)) 140 return new Enumeration<DigitalMediaType>(this, DigitalMediaType.VIDEO); 141 if ("audio".equals(codeString)) 142 return new Enumeration<DigitalMediaType>(this, DigitalMediaType.AUDIO); 143 throw new FHIRException("Unknown DigitalMediaType code '"+codeString+"'"); 144 } 145 public String toCode(DigitalMediaType code) { 146 if (code == DigitalMediaType.PHOTO) 147 return "photo"; 148 if (code == DigitalMediaType.VIDEO) 149 return "video"; 150 if (code == DigitalMediaType.AUDIO) 151 return "audio"; 152 return "?"; 153 } 154 public String toSystem(DigitalMediaType code) { 155 return code.getSystem(); 156 } 157 } 158 159 /** 160 * Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers. 161 */ 162 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 163 @Description(shortDefinition="Identifier(s) for the image", formalDefinition="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." ) 164 protected List<Identifier> identifier; 165 166 /** 167 * A procedure that is fulfilled in whole or in part by the creation of this media. 168 */ 169 @Child(name = "basedOn", type = {ProcedureRequest.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 170 @Description(shortDefinition="Procedure that caused this media to be created", formalDefinition="A procedure that is fulfilled in whole or in part by the creation of this media." ) 171 protected List<Reference> basedOn; 172 /** 173 * The actual objects that are the target of the reference (A procedure that is fulfilled in whole or in part by the creation of this media.) 174 */ 175 protected List<ProcedureRequest> basedOnTarget; 176 177 178 /** 179 * Whether the media is a photo (still image), an audio recording, or a video recording. 180 */ 181 @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true) 182 @Description(shortDefinition="photo | video | audio", formalDefinition="Whether the media is a photo (still image), an audio recording, or a video recording." ) 183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/digital-media-type") 184 protected Enumeration<DigitalMediaType> type; 185 186 /** 187 * Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality. 188 */ 189 @Child(name = "subtype", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true) 190 @Description(shortDefinition="The type of acquisition equipment/process", formalDefinition="Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality." ) 191 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/digital-media-subtype") 192 protected CodeableConcept subtype; 193 194 /** 195 * The name of the imaging view e.g. Lateral or Antero-posterior (AP). 196 */ 197 @Child(name = "view", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=true) 198 @Description(shortDefinition="Imaging view, e.g. Lateral or Antero-posterior", formalDefinition="The name of the imaging view e.g. Lateral or Antero-posterior (AP)." ) 199 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/media-view") 200 protected CodeableConcept view; 201 202 /** 203 * Who/What this Media is a record of. 204 */ 205 @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class, Specimen.class}, order=5, min=0, max=1, modifier=false, summary=true) 206 @Description(shortDefinition="Who/What this Media is a record of", formalDefinition="Who/What this Media is a record of." ) 207 protected Reference subject; 208 209 /** 210 * The actual object that is the target of the reference (Who/What this Media is a record of.) 211 */ 212 protected Resource subjectTarget; 213 214 /** 215 * The encounter or episode of care that establishes the context for this media. 216 */ 217 @Child(name = "context", type = {Encounter.class, EpisodeOfCare.class}, order=6, min=0, max=1, modifier=false, summary=true) 218 @Description(shortDefinition="Encounter / Episode associated with media", formalDefinition="The encounter or episode of care that establishes the context for this media." ) 219 protected Reference context; 220 221 /** 222 * The actual object that is the target of the reference (The encounter or episode of care that establishes the context for this media.) 223 */ 224 protected Resource contextTarget; 225 226 /** 227 * The date and time(s) at which the media was collected. 228 */ 229 @Child(name = "occurrence", type = {DateTimeType.class, Period.class}, order=7, min=0, max=1, modifier=false, summary=true) 230 @Description(shortDefinition="When Media was collected", formalDefinition="The date and time(s) at which the media was collected." ) 231 protected Type occurrence; 232 233 /** 234 * The person who administered the collection of the image. 235 */ 236 @Child(name = "operator", type = {Practitioner.class}, order=8, min=0, max=1, modifier=false, summary=true) 237 @Description(shortDefinition="The person who generated the image", formalDefinition="The person who administered the collection of the image." ) 238 protected Reference operator; 239 240 /** 241 * The actual object that is the target of the reference (The person who administered the collection of the image.) 242 */ 243 protected Practitioner operatorTarget; 244 245 /** 246 * Describes why the event occurred in coded or textual form. 247 */ 248 @Child(name = "reasonCode", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 249 @Description(shortDefinition="Why was event performed?", formalDefinition="Describes why the event occurred in coded or textual form." ) 250 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/procedure-reason") 251 protected List<CodeableConcept> reasonCode; 252 253 /** 254 * Indicates the site on the subject's body where the media was collected (i.e. the target site). 255 */ 256 @Child(name = "bodySite", type = {CodeableConcept.class}, order=10, min=0, max=1, modifier=false, summary=true) 257 @Description(shortDefinition="Body part in media", formalDefinition="Indicates the site on the subject's body where the media was collected (i.e. the target site)." ) 258 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/body-site") 259 protected CodeableConcept bodySite; 260 261 /** 262 * The device used to collect the media. 263 */ 264 @Child(name = "device", type = {Device.class, DeviceMetric.class}, order=11, min=0, max=1, modifier=false, summary=true) 265 @Description(shortDefinition="Observing Device", formalDefinition="The device used to collect the media." ) 266 protected Reference device; 267 268 /** 269 * The actual object that is the target of the reference (The device used to collect the media.) 270 */ 271 protected Resource deviceTarget; 272 273 /** 274 * Height of the image in pixels (photo/video). 275 */ 276 @Child(name = "height", type = {PositiveIntType.class}, order=12, min=0, max=1, modifier=false, summary=true) 277 @Description(shortDefinition="Height of the image in pixels (photo/video)", formalDefinition="Height of the image in pixels (photo/video)." ) 278 protected PositiveIntType height; 279 280 /** 281 * Width of the image in pixels (photo/video). 282 */ 283 @Child(name = "width", type = {PositiveIntType.class}, order=13, min=0, max=1, modifier=false, summary=true) 284 @Description(shortDefinition="Width of the image in pixels (photo/video)", formalDefinition="Width of the image in pixels (photo/video)." ) 285 protected PositiveIntType width; 286 287 /** 288 * 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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. 289 */ 290 @Child(name = "frames", type = {PositiveIntType.class}, order=14, min=0, max=1, modifier=false, summary=true) 291 @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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required." ) 292 protected PositiveIntType frames; 293 294 /** 295 * The duration of the recording in seconds - for audio and video. 296 */ 297 @Child(name = "duration", type = {UnsignedIntType.class}, order=15, min=0, max=1, modifier=false, summary=true) 298 @Description(shortDefinition="Length in seconds (audio / video)", formalDefinition="The duration of the recording in seconds - for audio and video." ) 299 protected UnsignedIntType duration; 300 301 /** 302 * The actual content of the media - inline or by direct reference to the media source file. 303 */ 304 @Child(name = "content", type = {Attachment.class}, order=16, min=1, max=1, modifier=false, summary=false) 305 @Description(shortDefinition="Actual Media - reference or data", formalDefinition="The actual content of the media - inline or by direct reference to the media source file." ) 306 protected Attachment content; 307 308 /** 309 * Comments made about the media by the performer, subject or other participants. 310 */ 311 @Child(name = "note", type = {Annotation.class}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 312 @Description(shortDefinition="Comments made about the media", formalDefinition="Comments made about the media by the performer, subject or other participants." ) 313 protected List<Annotation> note; 314 315 private static final long serialVersionUID = -831317677L; 316 317 /** 318 * Constructor 319 */ 320 public Media() { 321 super(); 322 } 323 324 /** 325 * Constructor 326 */ 327 public Media(Enumeration<DigitalMediaType> type, Attachment content) { 328 super(); 329 this.type = type; 330 this.content = content; 331 } 332 333 /** 334 * @return {@link #identifier} (Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.) 335 */ 336 public List<Identifier> getIdentifier() { 337 if (this.identifier == null) 338 this.identifier = new ArrayList<Identifier>(); 339 return this.identifier; 340 } 341 342 /** 343 * @return Returns a reference to <code>this</code> for easy method chaining 344 */ 345 public Media setIdentifier(List<Identifier> theIdentifier) { 346 this.identifier = theIdentifier; 347 return this; 348 } 349 350 public boolean hasIdentifier() { 351 if (this.identifier == null) 352 return false; 353 for (Identifier item : this.identifier) 354 if (!item.isEmpty()) 355 return true; 356 return false; 357 } 358 359 public Identifier addIdentifier() { //3 360 Identifier t = new Identifier(); 361 if (this.identifier == null) 362 this.identifier = new ArrayList<Identifier>(); 363 this.identifier.add(t); 364 return t; 365 } 366 367 public Media addIdentifier(Identifier t) { //3 368 if (t == null) 369 return this; 370 if (this.identifier == null) 371 this.identifier = new ArrayList<Identifier>(); 372 this.identifier.add(t); 373 return this; 374 } 375 376 /** 377 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist 378 */ 379 public Identifier getIdentifierFirstRep() { 380 if (getIdentifier().isEmpty()) { 381 addIdentifier(); 382 } 383 return getIdentifier().get(0); 384 } 385 386 /** 387 * @return {@link #basedOn} (A procedure that is fulfilled in whole or in part by the creation of this media.) 388 */ 389 public List<Reference> getBasedOn() { 390 if (this.basedOn == null) 391 this.basedOn = new ArrayList<Reference>(); 392 return this.basedOn; 393 } 394 395 /** 396 * @return Returns a reference to <code>this</code> for easy method chaining 397 */ 398 public Media setBasedOn(List<Reference> theBasedOn) { 399 this.basedOn = theBasedOn; 400 return this; 401 } 402 403 public boolean hasBasedOn() { 404 if (this.basedOn == null) 405 return false; 406 for (Reference item : this.basedOn) 407 if (!item.isEmpty()) 408 return true; 409 return false; 410 } 411 412 public Reference addBasedOn() { //3 413 Reference t = new Reference(); 414 if (this.basedOn == null) 415 this.basedOn = new ArrayList<Reference>(); 416 this.basedOn.add(t); 417 return t; 418 } 419 420 public Media addBasedOn(Reference t) { //3 421 if (t == null) 422 return this; 423 if (this.basedOn == null) 424 this.basedOn = new ArrayList<Reference>(); 425 this.basedOn.add(t); 426 return this; 427 } 428 429 /** 430 * @return The first repetition of repeating field {@link #basedOn}, creating it if it does not already exist 431 */ 432 public Reference getBasedOnFirstRep() { 433 if (getBasedOn().isEmpty()) { 434 addBasedOn(); 435 } 436 return getBasedOn().get(0); 437 } 438 439 /** 440 * @deprecated Use Reference#setResource(IBaseResource) instead 441 */ 442 @Deprecated 443 public List<ProcedureRequest> getBasedOnTarget() { 444 if (this.basedOnTarget == null) 445 this.basedOnTarget = new ArrayList<ProcedureRequest>(); 446 return this.basedOnTarget; 447 } 448 449 /** 450 * @deprecated Use Reference#setResource(IBaseResource) instead 451 */ 452 @Deprecated 453 public ProcedureRequest addBasedOnTarget() { 454 ProcedureRequest r = new ProcedureRequest(); 455 if (this.basedOnTarget == null) 456 this.basedOnTarget = new ArrayList<ProcedureRequest>(); 457 this.basedOnTarget.add(r); 458 return r; 459 } 460 461 /** 462 * @return {@link #type} (Whether the media is a photo (still image), an audio recording, or a video recording.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 463 */ 464 public Enumeration<DigitalMediaType> getTypeElement() { 465 if (this.type == null) 466 if (Configuration.errorOnAutoCreate()) 467 throw new Error("Attempt to auto-create Media.type"); 468 else if (Configuration.doAutoCreate()) 469 this.type = new Enumeration<DigitalMediaType>(new DigitalMediaTypeEnumFactory()); // bb 470 return this.type; 471 } 472 473 public boolean hasTypeElement() { 474 return this.type != null && !this.type.isEmpty(); 475 } 476 477 public boolean hasType() { 478 return this.type != null && !this.type.isEmpty(); 479 } 480 481 /** 482 * @param value {@link #type} (Whether the media is a photo (still image), an audio recording, or a video recording.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 483 */ 484 public Media setTypeElement(Enumeration<DigitalMediaType> value) { 485 this.type = value; 486 return this; 487 } 488 489 /** 490 * @return Whether the media is a photo (still image), an audio recording, or a video recording. 491 */ 492 public DigitalMediaType getType() { 493 return this.type == null ? null : this.type.getValue(); 494 } 495 496 /** 497 * @param value Whether the media is a photo (still image), an audio recording, or a video recording. 498 */ 499 public Media setType(DigitalMediaType value) { 500 if (this.type == null) 501 this.type = new Enumeration<DigitalMediaType>(new DigitalMediaTypeEnumFactory()); 502 this.type.setValue(value); 503 return this; 504 } 505 506 /** 507 * @return {@link #subtype} (Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.) 508 */ 509 public CodeableConcept getSubtype() { 510 if (this.subtype == null) 511 if (Configuration.errorOnAutoCreate()) 512 throw new Error("Attempt to auto-create Media.subtype"); 513 else if (Configuration.doAutoCreate()) 514 this.subtype = new CodeableConcept(); // cc 515 return this.subtype; 516 } 517 518 public boolean hasSubtype() { 519 return this.subtype != null && !this.subtype.isEmpty(); 520 } 521 522 /** 523 * @param value {@link #subtype} (Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.) 524 */ 525 public Media setSubtype(CodeableConcept value) { 526 this.subtype = value; 527 return this; 528 } 529 530 /** 531 * @return {@link #view} (The name of the imaging view e.g. Lateral or Antero-posterior (AP).) 532 */ 533 public CodeableConcept getView() { 534 if (this.view == null) 535 if (Configuration.errorOnAutoCreate()) 536 throw new Error("Attempt to auto-create Media.view"); 537 else if (Configuration.doAutoCreate()) 538 this.view = new CodeableConcept(); // cc 539 return this.view; 540 } 541 542 public boolean hasView() { 543 return this.view != null && !this.view.isEmpty(); 544 } 545 546 /** 547 * @param value {@link #view} (The name of the imaging view e.g. Lateral or Antero-posterior (AP).) 548 */ 549 public Media setView(CodeableConcept value) { 550 this.view = value; 551 return this; 552 } 553 554 /** 555 * @return {@link #subject} (Who/What this Media is a record of.) 556 */ 557 public Reference getSubject() { 558 if (this.subject == null) 559 if (Configuration.errorOnAutoCreate()) 560 throw new Error("Attempt to auto-create Media.subject"); 561 else if (Configuration.doAutoCreate()) 562 this.subject = new Reference(); // cc 563 return this.subject; 564 } 565 566 public boolean hasSubject() { 567 return this.subject != null && !this.subject.isEmpty(); 568 } 569 570 /** 571 * @param value {@link #subject} (Who/What this Media is a record of.) 572 */ 573 public Media setSubject(Reference value) { 574 this.subject = value; 575 return this; 576 } 577 578 /** 579 * @return {@link #subject} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who/What this Media is a record of.) 580 */ 581 public Resource getSubjectTarget() { 582 return this.subjectTarget; 583 } 584 585 /** 586 * @param value {@link #subject} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who/What this Media is a record of.) 587 */ 588 public Media setSubjectTarget(Resource value) { 589 this.subjectTarget = value; 590 return this; 591 } 592 593 /** 594 * @return {@link #context} (The encounter or episode of care that establishes the context for this media.) 595 */ 596 public Reference getContext() { 597 if (this.context == null) 598 if (Configuration.errorOnAutoCreate()) 599 throw new Error("Attempt to auto-create Media.context"); 600 else if (Configuration.doAutoCreate()) 601 this.context = new Reference(); // cc 602 return this.context; 603 } 604 605 public boolean hasContext() { 606 return this.context != null && !this.context.isEmpty(); 607 } 608 609 /** 610 * @param value {@link #context} (The encounter or episode of care that establishes the context for this media.) 611 */ 612 public Media setContext(Reference value) { 613 this.context = value; 614 return this; 615 } 616 617 /** 618 * @return {@link #context} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter or episode of care that establishes the context for this media.) 619 */ 620 public Resource getContextTarget() { 621 return this.contextTarget; 622 } 623 624 /** 625 * @param value {@link #context} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter or episode of care that establishes the context for this media.) 626 */ 627 public Media setContextTarget(Resource value) { 628 this.contextTarget = value; 629 return this; 630 } 631 632 /** 633 * @return {@link #occurrence} (The date and time(s) at which the media was collected.) 634 */ 635 public Type getOccurrence() { 636 return this.occurrence; 637 } 638 639 /** 640 * @return {@link #occurrence} (The date and time(s) at which the media was collected.) 641 */ 642 public DateTimeType getOccurrenceDateTimeType() throws FHIRException { 643 if (!(this.occurrence instanceof DateTimeType)) 644 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 645 return (DateTimeType) this.occurrence; 646 } 647 648 public boolean hasOccurrenceDateTimeType() { 649 return this.occurrence instanceof DateTimeType; 650 } 651 652 /** 653 * @return {@link #occurrence} (The date and time(s) at which the media was collected.) 654 */ 655 public Period getOccurrencePeriod() throws FHIRException { 656 if (!(this.occurrence instanceof Period)) 657 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.occurrence.getClass().getName()+" was encountered"); 658 return (Period) this.occurrence; 659 } 660 661 public boolean hasOccurrencePeriod() { 662 return this.occurrence instanceof Period; 663 } 664 665 public boolean hasOccurrence() { 666 return this.occurrence != null && !this.occurrence.isEmpty(); 667 } 668 669 /** 670 * @param value {@link #occurrence} (The date and time(s) at which the media was collected.) 671 */ 672 public Media setOccurrence(Type value) { 673 this.occurrence = value; 674 return this; 675 } 676 677 /** 678 * @return {@link #operator} (The person who administered the collection of the image.) 679 */ 680 public Reference getOperator() { 681 if (this.operator == null) 682 if (Configuration.errorOnAutoCreate()) 683 throw new Error("Attempt to auto-create Media.operator"); 684 else if (Configuration.doAutoCreate()) 685 this.operator = new Reference(); // cc 686 return this.operator; 687 } 688 689 public boolean hasOperator() { 690 return this.operator != null && !this.operator.isEmpty(); 691 } 692 693 /** 694 * @param value {@link #operator} (The person who administered the collection of the image.) 695 */ 696 public Media setOperator(Reference value) { 697 this.operator = value; 698 return this; 699 } 700 701 /** 702 * @return {@link #operator} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who administered the collection of the image.) 703 */ 704 public Practitioner getOperatorTarget() { 705 if (this.operatorTarget == null) 706 if (Configuration.errorOnAutoCreate()) 707 throw new Error("Attempt to auto-create Media.operator"); 708 else if (Configuration.doAutoCreate()) 709 this.operatorTarget = new Practitioner(); // aa 710 return this.operatorTarget; 711 } 712 713 /** 714 * @param value {@link #operator} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who administered the collection of the image.) 715 */ 716 public Media setOperatorTarget(Practitioner value) { 717 this.operatorTarget = value; 718 return this; 719 } 720 721 /** 722 * @return {@link #reasonCode} (Describes why the event occurred in coded or textual form.) 723 */ 724 public List<CodeableConcept> getReasonCode() { 725 if (this.reasonCode == null) 726 this.reasonCode = new ArrayList<CodeableConcept>(); 727 return this.reasonCode; 728 } 729 730 /** 731 * @return Returns a reference to <code>this</code> for easy method chaining 732 */ 733 public Media setReasonCode(List<CodeableConcept> theReasonCode) { 734 this.reasonCode = theReasonCode; 735 return this; 736 } 737 738 public boolean hasReasonCode() { 739 if (this.reasonCode == null) 740 return false; 741 for (CodeableConcept item : this.reasonCode) 742 if (!item.isEmpty()) 743 return true; 744 return false; 745 } 746 747 public CodeableConcept addReasonCode() { //3 748 CodeableConcept t = new CodeableConcept(); 749 if (this.reasonCode == null) 750 this.reasonCode = new ArrayList<CodeableConcept>(); 751 this.reasonCode.add(t); 752 return t; 753 } 754 755 public Media addReasonCode(CodeableConcept t) { //3 756 if (t == null) 757 return this; 758 if (this.reasonCode == null) 759 this.reasonCode = new ArrayList<CodeableConcept>(); 760 this.reasonCode.add(t); 761 return this; 762 } 763 764 /** 765 * @return The first repetition of repeating field {@link #reasonCode}, creating it if it does not already exist 766 */ 767 public CodeableConcept getReasonCodeFirstRep() { 768 if (getReasonCode().isEmpty()) { 769 addReasonCode(); 770 } 771 return getReasonCode().get(0); 772 } 773 774 /** 775 * @return {@link #bodySite} (Indicates the site on the subject's body where the media was collected (i.e. the target site).) 776 */ 777 public CodeableConcept getBodySite() { 778 if (this.bodySite == null) 779 if (Configuration.errorOnAutoCreate()) 780 throw new Error("Attempt to auto-create Media.bodySite"); 781 else if (Configuration.doAutoCreate()) 782 this.bodySite = new CodeableConcept(); // cc 783 return this.bodySite; 784 } 785 786 public boolean hasBodySite() { 787 return this.bodySite != null && !this.bodySite.isEmpty(); 788 } 789 790 /** 791 * @param value {@link #bodySite} (Indicates the site on the subject's body where the media was collected (i.e. the target site).) 792 */ 793 public Media setBodySite(CodeableConcept value) { 794 this.bodySite = value; 795 return this; 796 } 797 798 /** 799 * @return {@link #device} (The device used to collect the media.) 800 */ 801 public Reference getDevice() { 802 if (this.device == null) 803 if (Configuration.errorOnAutoCreate()) 804 throw new Error("Attempt to auto-create Media.device"); 805 else if (Configuration.doAutoCreate()) 806 this.device = new Reference(); // cc 807 return this.device; 808 } 809 810 public boolean hasDevice() { 811 return this.device != null && !this.device.isEmpty(); 812 } 813 814 /** 815 * @param value {@link #device} (The device used to collect the media.) 816 */ 817 public Media setDevice(Reference value) { 818 this.device = value; 819 return this; 820 } 821 822 /** 823 * @return {@link #device} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device used to collect the media.) 824 */ 825 public Resource getDeviceTarget() { 826 return this.deviceTarget; 827 } 828 829 /** 830 * @param value {@link #device} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device used to collect the media.) 831 */ 832 public Media setDeviceTarget(Resource value) { 833 this.deviceTarget = value; 834 return this; 835 } 836 837 /** 838 * @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 839 */ 840 public PositiveIntType getHeightElement() { 841 if (this.height == null) 842 if (Configuration.errorOnAutoCreate()) 843 throw new Error("Attempt to auto-create Media.height"); 844 else if (Configuration.doAutoCreate()) 845 this.height = new PositiveIntType(); // bb 846 return this.height; 847 } 848 849 public boolean hasHeightElement() { 850 return this.height != null && !this.height.isEmpty(); 851 } 852 853 public boolean hasHeight() { 854 return this.height != null && !this.height.isEmpty(); 855 } 856 857 /** 858 * @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 859 */ 860 public Media setHeightElement(PositiveIntType value) { 861 this.height = value; 862 return this; 863 } 864 865 /** 866 * @return Height of the image in pixels (photo/video). 867 */ 868 public int getHeight() { 869 return this.height == null || this.height.isEmpty() ? 0 : this.height.getValue(); 870 } 871 872 /** 873 * @param value Height of the image in pixels (photo/video). 874 */ 875 public Media setHeight(int value) { 876 if (this.height == null) 877 this.height = new PositiveIntType(); 878 this.height.setValue(value); 879 return this; 880 } 881 882 /** 883 * @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 884 */ 885 public PositiveIntType getWidthElement() { 886 if (this.width == null) 887 if (Configuration.errorOnAutoCreate()) 888 throw new Error("Attempt to auto-create Media.width"); 889 else if (Configuration.doAutoCreate()) 890 this.width = new PositiveIntType(); // bb 891 return this.width; 892 } 893 894 public boolean hasWidthElement() { 895 return this.width != null && !this.width.isEmpty(); 896 } 897 898 public boolean hasWidth() { 899 return this.width != null && !this.width.isEmpty(); 900 } 901 902 /** 903 * @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 904 */ 905 public Media setWidthElement(PositiveIntType value) { 906 this.width = value; 907 return this; 908 } 909 910 /** 911 * @return Width of the image in pixels (photo/video). 912 */ 913 public int getWidth() { 914 return this.width == null || this.width.isEmpty() ? 0 : this.width.getValue(); 915 } 916 917 /** 918 * @param value Width of the image in pixels (photo/video). 919 */ 920 public Media setWidth(int value) { 921 if (this.width == null) 922 this.width = new PositiveIntType(); 923 this.width.setValue(value); 924 return this; 925 } 926 927 /** 928 * @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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value 929 */ 930 public PositiveIntType getFramesElement() { 931 if (this.frames == null) 932 if (Configuration.errorOnAutoCreate()) 933 throw new Error("Attempt to auto-create Media.frames"); 934 else if (Configuration.doAutoCreate()) 935 this.frames = new PositiveIntType(); // bb 936 return this.frames; 937 } 938 939 public boolean hasFramesElement() { 940 return this.frames != null && !this.frames.isEmpty(); 941 } 942 943 public boolean hasFrames() { 944 return this.frames != null && !this.frames.isEmpty(); 945 } 946 947 /** 948 * @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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value 949 */ 950 public Media setFramesElement(PositiveIntType value) { 951 this.frames = value; 952 return this; 953 } 954 955 /** 956 * @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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. 957 */ 958 public int getFrames() { 959 return this.frames == null || this.frames.isEmpty() ? 0 : this.frames.getValue(); 960 } 961 962 /** 963 * @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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required. 964 */ 965 public Media setFrames(int value) { 966 if (this.frames == null) 967 this.frames = new PositiveIntType(); 968 this.frames.setValue(value); 969 return this; 970 } 971 972 /** 973 * @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 974 */ 975 public UnsignedIntType getDurationElement() { 976 if (this.duration == null) 977 if (Configuration.errorOnAutoCreate()) 978 throw new Error("Attempt to auto-create Media.duration"); 979 else if (Configuration.doAutoCreate()) 980 this.duration = new UnsignedIntType(); // bb 981 return this.duration; 982 } 983 984 public boolean hasDurationElement() { 985 return this.duration != null && !this.duration.isEmpty(); 986 } 987 988 public boolean hasDuration() { 989 return this.duration != null && !this.duration.isEmpty(); 990 } 991 992 /** 993 * @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 994 */ 995 public Media setDurationElement(UnsignedIntType value) { 996 this.duration = value; 997 return this; 998 } 999 1000 /** 1001 * @return The duration of the recording in seconds - for audio and video. 1002 */ 1003 public int getDuration() { 1004 return this.duration == null || this.duration.isEmpty() ? 0 : this.duration.getValue(); 1005 } 1006 1007 /** 1008 * @param value The duration of the recording in seconds - for audio and video. 1009 */ 1010 public Media setDuration(int value) { 1011 if (this.duration == null) 1012 this.duration = new UnsignedIntType(); 1013 this.duration.setValue(value); 1014 return this; 1015 } 1016 1017 /** 1018 * @return {@link #content} (The actual content of the media - inline or by direct reference to the media source file.) 1019 */ 1020 public Attachment getContent() { 1021 if (this.content == null) 1022 if (Configuration.errorOnAutoCreate()) 1023 throw new Error("Attempt to auto-create Media.content"); 1024 else if (Configuration.doAutoCreate()) 1025 this.content = new Attachment(); // cc 1026 return this.content; 1027 } 1028 1029 public boolean hasContent() { 1030 return this.content != null && !this.content.isEmpty(); 1031 } 1032 1033 /** 1034 * @param value {@link #content} (The actual content of the media - inline or by direct reference to the media source file.) 1035 */ 1036 public Media setContent(Attachment value) { 1037 this.content = value; 1038 return this; 1039 } 1040 1041 /** 1042 * @return {@link #note} (Comments made about the media by the performer, subject or other participants.) 1043 */ 1044 public List<Annotation> getNote() { 1045 if (this.note == null) 1046 this.note = new ArrayList<Annotation>(); 1047 return this.note; 1048 } 1049 1050 /** 1051 * @return Returns a reference to <code>this</code> for easy method chaining 1052 */ 1053 public Media setNote(List<Annotation> theNote) { 1054 this.note = theNote; 1055 return this; 1056 } 1057 1058 public boolean hasNote() { 1059 if (this.note == null) 1060 return false; 1061 for (Annotation item : this.note) 1062 if (!item.isEmpty()) 1063 return true; 1064 return false; 1065 } 1066 1067 public Annotation addNote() { //3 1068 Annotation t = new Annotation(); 1069 if (this.note == null) 1070 this.note = new ArrayList<Annotation>(); 1071 this.note.add(t); 1072 return t; 1073 } 1074 1075 public Media addNote(Annotation t) { //3 1076 if (t == null) 1077 return this; 1078 if (this.note == null) 1079 this.note = new ArrayList<Annotation>(); 1080 this.note.add(t); 1081 return this; 1082 } 1083 1084 /** 1085 * @return The first repetition of repeating field {@link #note}, creating it if it does not already exist 1086 */ 1087 public Annotation getNoteFirstRep() { 1088 if (getNote().isEmpty()) { 1089 addNote(); 1090 } 1091 return getNote().get(0); 1092 } 1093 1094 protected void listChildren(List<Property> childrenList) { 1095 super.listChildren(childrenList); 1096 childrenList.add(new Property("identifier", "Identifier", "Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1097 childrenList.add(new Property("basedOn", "Reference(ProcedureRequest)", "A procedure that is fulfilled in whole or in part by the creation of this media.", 0, java.lang.Integer.MAX_VALUE, basedOn)); 1098 childrenList.add(new Property("type", "code", "Whether the media is a photo (still image), an audio recording, or a video recording.", 0, java.lang.Integer.MAX_VALUE, type)); 1099 childrenList.add(new Property("subtype", "CodeableConcept", "Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.", 0, java.lang.Integer.MAX_VALUE, subtype)); 1100 childrenList.add(new Property("view", "CodeableConcept", "The name of the imaging view e.g. Lateral or Antero-posterior (AP).", 0, java.lang.Integer.MAX_VALUE, view)); 1101 childrenList.add(new Property("subject", "Reference(Patient|Practitioner|Group|Device|Specimen)", "Who/What this Media is a record of.", 0, java.lang.Integer.MAX_VALUE, subject)); 1102 childrenList.add(new Property("context", "Reference(Encounter|EpisodeOfCare)", "The encounter or episode of care that establishes the context for this media.", 0, java.lang.Integer.MAX_VALUE, context)); 1103 childrenList.add(new Property("occurrence[x]", "dateTime|Period", "The date and time(s) at which the media was collected.", 0, java.lang.Integer.MAX_VALUE, occurrence)); 1104 childrenList.add(new Property("operator", "Reference(Practitioner)", "The person who administered the collection of the image.", 0, java.lang.Integer.MAX_VALUE, operator)); 1105 childrenList.add(new Property("reasonCode", "CodeableConcept", "Describes why the event occurred in coded or textual form.", 0, java.lang.Integer.MAX_VALUE, reasonCode)); 1106 childrenList.add(new Property("bodySite", "CodeableConcept", "Indicates the site on the subject's body where the media was collected (i.e. the target site).", 0, java.lang.Integer.MAX_VALUE, bodySite)); 1107 childrenList.add(new Property("device", "Reference(Device|DeviceMetric)", "The device used to collect the media.", 0, java.lang.Integer.MAX_VALUE, device)); 1108 childrenList.add(new Property("height", "positiveInt", "Height of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, height)); 1109 childrenList.add(new Property("width", "positiveInt", "Width of the image in pixels (photo/video).", 0, java.lang.Integer.MAX_VALUE, width)); 1110 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. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.", 0, java.lang.Integer.MAX_VALUE, frames)); 1111 childrenList.add(new Property("duration", "unsignedInt", "The duration of the recording in seconds - for audio and video.", 0, java.lang.Integer.MAX_VALUE, duration)); 1112 childrenList.add(new Property("content", "Attachment", "The actual content of the media - inline or by direct reference to the media source file.", 0, java.lang.Integer.MAX_VALUE, content)); 1113 childrenList.add(new Property("note", "Annotation", "Comments made about the media by the performer, subject or other participants.", 0, java.lang.Integer.MAX_VALUE, note)); 1114 } 1115 1116 @Override 1117 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1118 switch (hash) { 1119 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1120 case -332612366: /*basedOn*/ return this.basedOn == null ? new Base[0] : this.basedOn.toArray(new Base[this.basedOn.size()]); // Reference 1121 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<DigitalMediaType> 1122 case -1867567750: /*subtype*/ return this.subtype == null ? new Base[0] : new Base[] {this.subtype}; // CodeableConcept 1123 case 3619493: /*view*/ return this.view == null ? new Base[0] : new Base[] {this.view}; // CodeableConcept 1124 case -1867885268: /*subject*/ return this.subject == null ? new Base[0] : new Base[] {this.subject}; // Reference 1125 case 951530927: /*context*/ return this.context == null ? new Base[0] : new Base[] {this.context}; // Reference 1126 case 1687874001: /*occurrence*/ return this.occurrence == null ? new Base[0] : new Base[] {this.occurrence}; // Type 1127 case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Reference 1128 case 722137681: /*reasonCode*/ return this.reasonCode == null ? new Base[0] : this.reasonCode.toArray(new Base[this.reasonCode.size()]); // CodeableConcept 1129 case 1702620169: /*bodySite*/ return this.bodySite == null ? new Base[0] : new Base[] {this.bodySite}; // CodeableConcept 1130 case -1335157162: /*device*/ return this.device == null ? new Base[0] : new Base[] {this.device}; // Reference 1131 case -1221029593: /*height*/ return this.height == null ? new Base[0] : new Base[] {this.height}; // PositiveIntType 1132 case 113126854: /*width*/ return this.width == null ? new Base[0] : new Base[] {this.width}; // PositiveIntType 1133 case -1266514778: /*frames*/ return this.frames == null ? new Base[0] : new Base[] {this.frames}; // PositiveIntType 1134 case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // UnsignedIntType 1135 case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Attachment 1136 case 3387378: /*note*/ return this.note == null ? new Base[0] : this.note.toArray(new Base[this.note.size()]); // Annotation 1137 default: return super.getProperty(hash, name, checkValid); 1138 } 1139 1140 } 1141 1142 @Override 1143 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1144 switch (hash) { 1145 case -1618432855: // identifier 1146 this.getIdentifier().add(castToIdentifier(value)); // Identifier 1147 return value; 1148 case -332612366: // basedOn 1149 this.getBasedOn().add(castToReference(value)); // Reference 1150 return value; 1151 case 3575610: // type 1152 value = new DigitalMediaTypeEnumFactory().fromType(castToCode(value)); 1153 this.type = (Enumeration) value; // Enumeration<DigitalMediaType> 1154 return value; 1155 case -1867567750: // subtype 1156 this.subtype = castToCodeableConcept(value); // CodeableConcept 1157 return value; 1158 case 3619493: // view 1159 this.view = castToCodeableConcept(value); // CodeableConcept 1160 return value; 1161 case -1867885268: // subject 1162 this.subject = castToReference(value); // Reference 1163 return value; 1164 case 951530927: // context 1165 this.context = castToReference(value); // Reference 1166 return value; 1167 case 1687874001: // occurrence 1168 this.occurrence = castToType(value); // Type 1169 return value; 1170 case -500553564: // operator 1171 this.operator = castToReference(value); // Reference 1172 return value; 1173 case 722137681: // reasonCode 1174 this.getReasonCode().add(castToCodeableConcept(value)); // CodeableConcept 1175 return value; 1176 case 1702620169: // bodySite 1177 this.bodySite = castToCodeableConcept(value); // CodeableConcept 1178 return value; 1179 case -1335157162: // device 1180 this.device = castToReference(value); // Reference 1181 return value; 1182 case -1221029593: // height 1183 this.height = castToPositiveInt(value); // PositiveIntType 1184 return value; 1185 case 113126854: // width 1186 this.width = castToPositiveInt(value); // PositiveIntType 1187 return value; 1188 case -1266514778: // frames 1189 this.frames = castToPositiveInt(value); // PositiveIntType 1190 return value; 1191 case -1992012396: // duration 1192 this.duration = castToUnsignedInt(value); // UnsignedIntType 1193 return value; 1194 case 951530617: // content 1195 this.content = castToAttachment(value); // Attachment 1196 return value; 1197 case 3387378: // note 1198 this.getNote().add(castToAnnotation(value)); // Annotation 1199 return value; 1200 default: return super.setProperty(hash, name, value); 1201 } 1202 1203 } 1204 1205 @Override 1206 public Base setProperty(String name, Base value) throws FHIRException { 1207 if (name.equals("identifier")) { 1208 this.getIdentifier().add(castToIdentifier(value)); 1209 } else if (name.equals("basedOn")) { 1210 this.getBasedOn().add(castToReference(value)); 1211 } else if (name.equals("type")) { 1212 value = new DigitalMediaTypeEnumFactory().fromType(castToCode(value)); 1213 this.type = (Enumeration) value; // Enumeration<DigitalMediaType> 1214 } else if (name.equals("subtype")) { 1215 this.subtype = castToCodeableConcept(value); // CodeableConcept 1216 } else if (name.equals("view")) { 1217 this.view = castToCodeableConcept(value); // CodeableConcept 1218 } else if (name.equals("subject")) { 1219 this.subject = castToReference(value); // Reference 1220 } else if (name.equals("context")) { 1221 this.context = castToReference(value); // Reference 1222 } else if (name.equals("occurrence[x]")) { 1223 this.occurrence = castToType(value); // Type 1224 } else if (name.equals("operator")) { 1225 this.operator = castToReference(value); // Reference 1226 } else if (name.equals("reasonCode")) { 1227 this.getReasonCode().add(castToCodeableConcept(value)); 1228 } else if (name.equals("bodySite")) { 1229 this.bodySite = castToCodeableConcept(value); // CodeableConcept 1230 } else if (name.equals("device")) { 1231 this.device = castToReference(value); // Reference 1232 } else if (name.equals("height")) { 1233 this.height = castToPositiveInt(value); // PositiveIntType 1234 } else if (name.equals("width")) { 1235 this.width = castToPositiveInt(value); // PositiveIntType 1236 } else if (name.equals("frames")) { 1237 this.frames = castToPositiveInt(value); // PositiveIntType 1238 } else if (name.equals("duration")) { 1239 this.duration = castToUnsignedInt(value); // UnsignedIntType 1240 } else if (name.equals("content")) { 1241 this.content = castToAttachment(value); // Attachment 1242 } else if (name.equals("note")) { 1243 this.getNote().add(castToAnnotation(value)); 1244 } else 1245 return super.setProperty(name, value); 1246 return value; 1247 } 1248 1249 @Override 1250 public Base makeProperty(int hash, String name) throws FHIRException { 1251 switch (hash) { 1252 case -1618432855: return addIdentifier(); 1253 case -332612366: return addBasedOn(); 1254 case 3575610: return getTypeElement(); 1255 case -1867567750: return getSubtype(); 1256 case 3619493: return getView(); 1257 case -1867885268: return getSubject(); 1258 case 951530927: return getContext(); 1259 case -2022646513: return getOccurrence(); 1260 case 1687874001: return getOccurrence(); 1261 case -500553564: return getOperator(); 1262 case 722137681: return addReasonCode(); 1263 case 1702620169: return getBodySite(); 1264 case -1335157162: return getDevice(); 1265 case -1221029593: return getHeightElement(); 1266 case 113126854: return getWidthElement(); 1267 case -1266514778: return getFramesElement(); 1268 case -1992012396: return getDurationElement(); 1269 case 951530617: return getContent(); 1270 case 3387378: return addNote(); 1271 default: return super.makeProperty(hash, name); 1272 } 1273 1274 } 1275 1276 @Override 1277 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1278 switch (hash) { 1279 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1280 case -332612366: /*basedOn*/ return new String[] {"Reference"}; 1281 case 3575610: /*type*/ return new String[] {"code"}; 1282 case -1867567750: /*subtype*/ return new String[] {"CodeableConcept"}; 1283 case 3619493: /*view*/ return new String[] {"CodeableConcept"}; 1284 case -1867885268: /*subject*/ return new String[] {"Reference"}; 1285 case 951530927: /*context*/ return new String[] {"Reference"}; 1286 case 1687874001: /*occurrence*/ return new String[] {"dateTime", "Period"}; 1287 case -500553564: /*operator*/ return new String[] {"Reference"}; 1288 case 722137681: /*reasonCode*/ return new String[] {"CodeableConcept"}; 1289 case 1702620169: /*bodySite*/ return new String[] {"CodeableConcept"}; 1290 case -1335157162: /*device*/ return new String[] {"Reference"}; 1291 case -1221029593: /*height*/ return new String[] {"positiveInt"}; 1292 case 113126854: /*width*/ return new String[] {"positiveInt"}; 1293 case -1266514778: /*frames*/ return new String[] {"positiveInt"}; 1294 case -1992012396: /*duration*/ return new String[] {"unsignedInt"}; 1295 case 951530617: /*content*/ return new String[] {"Attachment"}; 1296 case 3387378: /*note*/ return new String[] {"Annotation"}; 1297 default: return super.getTypesForProperty(hash, name); 1298 } 1299 1300 } 1301 1302 @Override 1303 public Base addChild(String name) throws FHIRException { 1304 if (name.equals("identifier")) { 1305 return addIdentifier(); 1306 } 1307 else if (name.equals("basedOn")) { 1308 return addBasedOn(); 1309 } 1310 else if (name.equals("type")) { 1311 throw new FHIRException("Cannot call addChild on a primitive type Media.type"); 1312 } 1313 else if (name.equals("subtype")) { 1314 this.subtype = new CodeableConcept(); 1315 return this.subtype; 1316 } 1317 else if (name.equals("view")) { 1318 this.view = new CodeableConcept(); 1319 return this.view; 1320 } 1321 else if (name.equals("subject")) { 1322 this.subject = new Reference(); 1323 return this.subject; 1324 } 1325 else if (name.equals("context")) { 1326 this.context = new Reference(); 1327 return this.context; 1328 } 1329 else if (name.equals("occurrenceDateTime")) { 1330 this.occurrence = new DateTimeType(); 1331 return this.occurrence; 1332 } 1333 else if (name.equals("occurrencePeriod")) { 1334 this.occurrence = new Period(); 1335 return this.occurrence; 1336 } 1337 else if (name.equals("operator")) { 1338 this.operator = new Reference(); 1339 return this.operator; 1340 } 1341 else if (name.equals("reasonCode")) { 1342 return addReasonCode(); 1343 } 1344 else if (name.equals("bodySite")) { 1345 this.bodySite = new CodeableConcept(); 1346 return this.bodySite; 1347 } 1348 else if (name.equals("device")) { 1349 this.device = new Reference(); 1350 return this.device; 1351 } 1352 else if (name.equals("height")) { 1353 throw new FHIRException("Cannot call addChild on a primitive type Media.height"); 1354 } 1355 else if (name.equals("width")) { 1356 throw new FHIRException("Cannot call addChild on a primitive type Media.width"); 1357 } 1358 else if (name.equals("frames")) { 1359 throw new FHIRException("Cannot call addChild on a primitive type Media.frames"); 1360 } 1361 else if (name.equals("duration")) { 1362 throw new FHIRException("Cannot call addChild on a primitive type Media.duration"); 1363 } 1364 else if (name.equals("content")) { 1365 this.content = new Attachment(); 1366 return this.content; 1367 } 1368 else if (name.equals("note")) { 1369 return addNote(); 1370 } 1371 else 1372 return super.addChild(name); 1373 } 1374 1375 public String fhirType() { 1376 return "Media"; 1377 1378 } 1379 1380 public Media copy() { 1381 Media dst = new Media(); 1382 copyValues(dst); 1383 if (identifier != null) { 1384 dst.identifier = new ArrayList<Identifier>(); 1385 for (Identifier i : identifier) 1386 dst.identifier.add(i.copy()); 1387 }; 1388 if (basedOn != null) { 1389 dst.basedOn = new ArrayList<Reference>(); 1390 for (Reference i : basedOn) 1391 dst.basedOn.add(i.copy()); 1392 }; 1393 dst.type = type == null ? null : type.copy(); 1394 dst.subtype = subtype == null ? null : subtype.copy(); 1395 dst.view = view == null ? null : view.copy(); 1396 dst.subject = subject == null ? null : subject.copy(); 1397 dst.context = context == null ? null : context.copy(); 1398 dst.occurrence = occurrence == null ? null : occurrence.copy(); 1399 dst.operator = operator == null ? null : operator.copy(); 1400 if (reasonCode != null) { 1401 dst.reasonCode = new ArrayList<CodeableConcept>(); 1402 for (CodeableConcept i : reasonCode) 1403 dst.reasonCode.add(i.copy()); 1404 }; 1405 dst.bodySite = bodySite == null ? null : bodySite.copy(); 1406 dst.device = device == null ? null : device.copy(); 1407 dst.height = height == null ? null : height.copy(); 1408 dst.width = width == null ? null : width.copy(); 1409 dst.frames = frames == null ? null : frames.copy(); 1410 dst.duration = duration == null ? null : duration.copy(); 1411 dst.content = content == null ? null : content.copy(); 1412 if (note != null) { 1413 dst.note = new ArrayList<Annotation>(); 1414 for (Annotation i : note) 1415 dst.note.add(i.copy()); 1416 }; 1417 return dst; 1418 } 1419 1420 protected Media typedCopy() { 1421 return copy(); 1422 } 1423 1424 @Override 1425 public boolean equalsDeep(Base other) { 1426 if (!super.equalsDeep(other)) 1427 return false; 1428 if (!(other instanceof Media)) 1429 return false; 1430 Media o = (Media) other; 1431 return compareDeep(identifier, o.identifier, true) && compareDeep(basedOn, o.basedOn, true) && compareDeep(type, o.type, true) 1432 && compareDeep(subtype, o.subtype, true) && compareDeep(view, o.view, true) && compareDeep(subject, o.subject, true) 1433 && compareDeep(context, o.context, true) && compareDeep(occurrence, o.occurrence, true) && compareDeep(operator, o.operator, true) 1434 && compareDeep(reasonCode, o.reasonCode, true) && compareDeep(bodySite, o.bodySite, true) && compareDeep(device, o.device, true) 1435 && compareDeep(height, o.height, true) && compareDeep(width, o.width, true) && compareDeep(frames, o.frames, true) 1436 && compareDeep(duration, o.duration, true) && compareDeep(content, o.content, true) && compareDeep(note, o.note, true) 1437 ; 1438 } 1439 1440 @Override 1441 public boolean equalsShallow(Base other) { 1442 if (!super.equalsShallow(other)) 1443 return false; 1444 if (!(other instanceof Media)) 1445 return false; 1446 Media o = (Media) other; 1447 return compareValues(type, o.type, true) && compareValues(height, o.height, true) && compareValues(width, o.width, true) 1448 && compareValues(frames, o.frames, true) && compareValues(duration, o.duration, true); 1449 } 1450 1451 public boolean isEmpty() { 1452 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, basedOn, type 1453 , subtype, view, subject, context, occurrence, operator, reasonCode, bodySite 1454 , device, height, width, frames, duration, content, note); 1455 } 1456 1457 @Override 1458 public ResourceType getResourceType() { 1459 return ResourceType.Media; 1460 } 1461 1462 /** 1463 * Search parameter: <b>date</b> 1464 * <p> 1465 * Description: <b>When Media was collected</b><br> 1466 * Type: <b>date</b><br> 1467 * Path: <b>Media.occurrence[x]</b><br> 1468 * </p> 1469 */ 1470 @SearchParamDefinition(name="date", path="Media.occurrence", description="When Media was collected", type="date" ) 1471 public static final String SP_DATE = "date"; 1472 /** 1473 * <b>Fluent Client</b> search parameter constant for <b>date</b> 1474 * <p> 1475 * Description: <b>When Media was collected</b><br> 1476 * Type: <b>date</b><br> 1477 * Path: <b>Media.occurrence[x]</b><br> 1478 * </p> 1479 */ 1480 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 1481 1482 /** 1483 * Search parameter: <b>identifier</b> 1484 * <p> 1485 * Description: <b>Identifier(s) for the image</b><br> 1486 * Type: <b>token</b><br> 1487 * Path: <b>Media.identifier</b><br> 1488 * </p> 1489 */ 1490 @SearchParamDefinition(name="identifier", path="Media.identifier", description="Identifier(s) for the image", type="token" ) 1491 public static final String SP_IDENTIFIER = "identifier"; 1492 /** 1493 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1494 * <p> 1495 * Description: <b>Identifier(s) for the image</b><br> 1496 * Type: <b>token</b><br> 1497 * Path: <b>Media.identifier</b><br> 1498 * </p> 1499 */ 1500 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1501 1502 /** 1503 * Search parameter: <b>created</b> 1504 * <p> 1505 * Description: <b>Date attachment was first created</b><br> 1506 * Type: <b>date</b><br> 1507 * Path: <b>Media.content.creation</b><br> 1508 * </p> 1509 */ 1510 @SearchParamDefinition(name="created", path="Media.content.creation", description="Date attachment was first created", type="date" ) 1511 public static final String SP_CREATED = "created"; 1512 /** 1513 * <b>Fluent Client</b> search parameter constant for <b>created</b> 1514 * <p> 1515 * Description: <b>Date attachment was first created</b><br> 1516 * Type: <b>date</b><br> 1517 * Path: <b>Media.content.creation</b><br> 1518 * </p> 1519 */ 1520 public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_CREATED); 1521 1522 /** 1523 * Search parameter: <b>subject</b> 1524 * <p> 1525 * Description: <b>Who/What this Media is a record of</b><br> 1526 * Type: <b>reference</b><br> 1527 * Path: <b>Media.subject</b><br> 1528 * </p> 1529 */ 1530 @SearchParamDefinition(name="subject", path="Media.subject", description="Who/What this Media is a record of", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Device"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Patient"), @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Device.class, Group.class, Patient.class, Practitioner.class, Specimen.class } ) 1531 public static final String SP_SUBJECT = "subject"; 1532 /** 1533 * <b>Fluent Client</b> search parameter constant for <b>subject</b> 1534 * <p> 1535 * Description: <b>Who/What this Media is a record of</b><br> 1536 * Type: <b>reference</b><br> 1537 * Path: <b>Media.subject</b><br> 1538 * </p> 1539 */ 1540 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_SUBJECT); 1541 1542/** 1543 * Constant for fluent queries to be used to add include statements. Specifies 1544 * the path value of "<b>Media:subject</b>". 1545 */ 1546 public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT = new ca.uhn.fhir.model.api.Include("Media:subject").toLocked(); 1547 1548 /** 1549 * Search parameter: <b>type</b> 1550 * <p> 1551 * Description: <b>photo | video | audio</b><br> 1552 * Type: <b>token</b><br> 1553 * Path: <b>Media.type</b><br> 1554 * </p> 1555 */ 1556 @SearchParamDefinition(name="type", path="Media.type", description="photo | video | audio", type="token" ) 1557 public static final String SP_TYPE = "type"; 1558 /** 1559 * <b>Fluent Client</b> search parameter constant for <b>type</b> 1560 * <p> 1561 * Description: <b>photo | video | audio</b><br> 1562 * Type: <b>token</b><br> 1563 * Path: <b>Media.type</b><br> 1564 * </p> 1565 */ 1566 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 1567 1568 /** 1569 * Search parameter: <b>operator</b> 1570 * <p> 1571 * Description: <b>The person who generated the image</b><br> 1572 * Type: <b>reference</b><br> 1573 * Path: <b>Media.operator</b><br> 1574 * </p> 1575 */ 1576 @SearchParamDefinition(name="operator", path="Media.operator", description="The person who generated the image", type="reference", providesMembershipIn={ @ca.uhn.fhir.model.api.annotation.Compartment(name="Practitioner") }, target={Practitioner.class } ) 1577 public static final String SP_OPERATOR = "operator"; 1578 /** 1579 * <b>Fluent Client</b> search parameter constant for <b>operator</b> 1580 * <p> 1581 * Description: <b>The person who generated the image</b><br> 1582 * Type: <b>reference</b><br> 1583 * Path: <b>Media.operator</b><br> 1584 * </p> 1585 */ 1586 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OPERATOR = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OPERATOR); 1587 1588/** 1589 * Constant for fluent queries to be used to add include statements. Specifies 1590 * the path value of "<b>Media:operator</b>". 1591 */ 1592 public static final ca.uhn.fhir.model.api.Include INCLUDE_OPERATOR = new ca.uhn.fhir.model.api.Include("Media:operator").toLocked(); 1593 1594 /** 1595 * Search parameter: <b>view</b> 1596 * <p> 1597 * Description: <b>Imaging view, e.g. Lateral or Antero-posterior</b><br> 1598 * Type: <b>token</b><br> 1599 * Path: <b>Media.view</b><br> 1600 * </p> 1601 */ 1602 @SearchParamDefinition(name="view", path="Media.view", description="Imaging view, e.g. Lateral or Antero-posterior", type="token" ) 1603 public static final String SP_VIEW = "view"; 1604 /** 1605 * <b>Fluent Client</b> search parameter constant for <b>view</b> 1606 * <p> 1607 * Description: <b>Imaging view, e.g. Lateral or Antero-posterior</b><br> 1608 * Type: <b>token</b><br> 1609 * Path: <b>Media.view</b><br> 1610 * </p> 1611 */ 1612 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VIEW = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VIEW); 1613 1614 /** 1615 * Search parameter: <b>site</b> 1616 * <p> 1617 * Description: <b>Body part in media</b><br> 1618 * Type: <b>token</b><br> 1619 * Path: <b>Media.bodySite</b><br> 1620 * </p> 1621 */ 1622 @SearchParamDefinition(name="site", path="Media.bodySite", description="Body part in media", type="token" ) 1623 public static final String SP_SITE = "site"; 1624 /** 1625 * <b>Fluent Client</b> search parameter constant for <b>site</b> 1626 * <p> 1627 * Description: <b>Body part in media</b><br> 1628 * Type: <b>token</b><br> 1629 * Path: <b>Media.bodySite</b><br> 1630 * </p> 1631 */ 1632 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SITE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SITE); 1633 1634 /** 1635 * Search parameter: <b>based-on</b> 1636 * <p> 1637 * Description: <b>Procedure that caused this media to be created</b><br> 1638 * Type: <b>reference</b><br> 1639 * Path: <b>Media.basedOn</b><br> 1640 * </p> 1641 */ 1642 @SearchParamDefinition(name="based-on", path="Media.basedOn", description="Procedure that caused this media to be created", type="reference", target={ProcedureRequest.class } ) 1643 public static final String SP_BASED_ON = "based-on"; 1644 /** 1645 * <b>Fluent Client</b> search parameter constant for <b>based-on</b> 1646 * <p> 1647 * Description: <b>Procedure that caused this media to be created</b><br> 1648 * Type: <b>reference</b><br> 1649 * Path: <b>Media.basedOn</b><br> 1650 * </p> 1651 */ 1652 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASED_ON); 1653 1654/** 1655 * Constant for fluent queries to be used to add include statements. Specifies 1656 * the path value of "<b>Media:based-on</b>". 1657 */ 1658 public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON = new ca.uhn.fhir.model.api.Include("Media:based-on").toLocked(); 1659 1660 /** 1661 * Search parameter: <b>subtype</b> 1662 * <p> 1663 * Description: <b>The type of acquisition equipment/process</b><br> 1664 * Type: <b>token</b><br> 1665 * Path: <b>Media.subtype</b><br> 1666 * </p> 1667 */ 1668 @SearchParamDefinition(name="subtype", path="Media.subtype", description="The type of acquisition equipment/process", type="token" ) 1669 public static final String SP_SUBTYPE = "subtype"; 1670 /** 1671 * <b>Fluent Client</b> search parameter constant for <b>subtype</b> 1672 * <p> 1673 * Description: <b>The type of acquisition equipment/process</b><br> 1674 * Type: <b>token</b><br> 1675 * Path: <b>Media.subtype</b><br> 1676 * </p> 1677 */ 1678 public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBTYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SUBTYPE); 1679 1680 /** 1681 * Search parameter: <b>patient</b> 1682 * <p> 1683 * Description: <b>Who/What this Media is a record of</b><br> 1684 * Type: <b>reference</b><br> 1685 * Path: <b>Media.subject</b><br> 1686 * </p> 1687 */ 1688 @SearchParamDefinition(name="patient", path="Media.subject", description="Who/What this Media is a record of", type="reference", target={Patient.class } ) 1689 public static final String SP_PATIENT = "patient"; 1690 /** 1691 * <b>Fluent Client</b> search parameter constant for <b>patient</b> 1692 * <p> 1693 * Description: <b>Who/What this Media is a record of</b><br> 1694 * Type: <b>reference</b><br> 1695 * Path: <b>Media.subject</b><br> 1696 * </p> 1697 */ 1698 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PATIENT); 1699 1700/** 1701 * Constant for fluent queries to be used to add include statements. Specifies 1702 * the path value of "<b>Media:patient</b>". 1703 */ 1704 public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT = new ca.uhn.fhir.model.api.Include("Media:patient").toLocked(); 1705 1706 /** 1707 * Search parameter: <b>context</b> 1708 * <p> 1709 * Description: <b>Encounter / Episode associated with media</b><br> 1710 * Type: <b>reference</b><br> 1711 * Path: <b>Media.context</b><br> 1712 * </p> 1713 */ 1714 @SearchParamDefinition(name="context", path="Media.context", description="Encounter / Episode associated with media", type="reference", target={Encounter.class, EpisodeOfCare.class } ) 1715 public static final String SP_CONTEXT = "context"; 1716 /** 1717 * <b>Fluent Client</b> search parameter constant for <b>context</b> 1718 * <p> 1719 * Description: <b>Encounter / Episode associated with media</b><br> 1720 * Type: <b>reference</b><br> 1721 * Path: <b>Media.context</b><br> 1722 * </p> 1723 */ 1724 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_CONTEXT); 1725 1726/** 1727 * Constant for fluent queries to be used to add include statements. Specifies 1728 * the path value of "<b>Media:context</b>". 1729 */ 1730 public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT = new ca.uhn.fhir.model.api.Include("Media:context").toLocked(); 1731 1732 /** 1733 * Search parameter: <b>device</b> 1734 * <p> 1735 * Description: <b>Observing Device</b><br> 1736 * Type: <b>reference</b><br> 1737 * Path: <b>Media.device</b><br> 1738 * </p> 1739 */ 1740 @SearchParamDefinition(name="device", path="Media.device", description="Observing Device", type="reference", target={Device.class, DeviceMetric.class } ) 1741 public static final String SP_DEVICE = "device"; 1742 /** 1743 * <b>Fluent Client</b> search parameter constant for <b>device</b> 1744 * <p> 1745 * Description: <b>Observing Device</b><br> 1746 * Type: <b>reference</b><br> 1747 * Path: <b>Media.device</b><br> 1748 * </p> 1749 */ 1750 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEVICE); 1751 1752/** 1753 * Constant for fluent queries to be used to add include statements. Specifies 1754 * the path value of "<b>Media:device</b>". 1755 */ 1756 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE = new ca.uhn.fhir.model.api.Include("Media:device").toLocked(); 1757 1758 1759} 1760