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