This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R4B R4 R3 R2
FHIR Infrastructure Work Group | Maturity Level: 1 | Trial Use | Compartments: Device, Patient, Practitioner |
A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
The Media resource contains photos, videos, and audio recordings. It is used with media acquired or used as part of the healthcare process. Here are some typical usages:
This resource captures a specific type of Observation - an Observation whose value is audio, video or image data. This resource is the preferred representation of such forms of information as it exposes the metadata relevant for interpreting the information. However, in some legacy environments, media information may occasionally appear in Observation instead. Systems should be aware of this possibility.
The Media resource is able to contain medical images in a DICOM format. These images may also be made accessible through an ImagingStudy resource, which provides a direct reference to the image to a WADO-RS server.
For such images, the WADO-RS framework is a preferred method for representing the images - the WADO-RS service may include rendering the image with annotations and display parameters from an associated DICOM presentation state, for instance.
On the other hand, the media resource allows for a robust transfer of an image across boundaries where the WADO-RS service is not available. For this reason, medical images can also be represented in a Media resource, but the Media.content.url should provide a reference to a source WADO-RS service for the image.
This resource is referenced by diagnosticreport
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Media | I | DomainResource | A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference + Height can only be used for a photo or video + Width can only be used for a photo or video + Frames can only be used for a photo + Duration can only be used for an audio or a video Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
identifier | Σ | 0..* | Identifier | Identifier(s) for the image |
basedOn | Σ | 0..* | Reference(ProcedureRequest) | Procedure that caused this media to be created |
type | Σ | 1..1 | code | photo | video | audio DigitalMediaType (Required) |
subtype | Σ | 0..1 | CodeableConcept | The type of acquisition equipment/process Media SubType (Example) |
view | Σ | 0..1 | CodeableConcept | Imaging view, e.g. Lateral or Antero-posterior Media Collection View/Projection (Example) |
subject | Σ | 0..1 | Reference(Patient | Practitioner | Group | Device | Specimen) | Who/What this Media is a record of |
context | Σ | 0..1 | Reference(Encounter | EpisodeOfCare) | Encounter / Episode associated with media |
occurrence[x] | Σ | 0..1 | When Media was collected | |
occurrenceDateTime | dateTime | |||
occurrencePeriod | Period | |||
operator | Σ | 0..1 | Reference(Practitioner) | The person who generated the image |
reasonCode | Σ | 0..* | CodeableConcept | Why was event performed? Procedure Reason Codes (Example) |
bodySite | Σ | 0..1 | CodeableConcept | Body part in media SNOMED CT Body Structures (Example) |
device | Σ | 0..1 | Reference(Device | DeviceMetric) | Observing Device |
height | ΣI | 0..1 | positiveInt | Height of the image in pixels (photo/video) |
width | ΣI | 0..1 | positiveInt | Width of the image in pixels (photo/video) |
frames | ΣI | 0..1 | positiveInt | Number of frames if > 1 (photo) |
duration | ΣI | 0..1 | unsignedInt | Length in seconds (audio / video) |
content | 1..1 | Attachment | Actual Media - reference or data | |
note | 0..* | Annotation | Comments made about the media | |
Documentation for this format |
UML Diagram (Legend)
XML Template
<Media xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <identifier><!-- 0..* Identifier Identifier(s) for the image --></identifier> <basedOn><!-- 0..* Reference(ProcedureRequest) Procedure that caused this media to be created --></basedOn> <type value="[code]"/><!-- 1..1 photo | video | audio --> <subtype><!-- 0..1 CodeableConcept The type of acquisition equipment/process --></subtype> <view><!-- 0..1 CodeableConcept Imaging view, e.g. Lateral or Antero-posterior --></view> <subject><!-- 0..1 Reference(Patient|Practitioner|Group|Device|Specimen) Who/What this Media is a record of --></subject> <context><!-- 0..1 Reference(Encounter|EpisodeOfCare) Encounter / Episode associated with media --></context> <occurrence[x]><!-- 0..1 dateTime|Period When Media was collected --></occurrence[x]> <operator><!-- 0..1 Reference(Practitioner) The person who generated the image --></operator> <reasonCode><!-- 0..* CodeableConcept Why was event performed? --></reasonCode> <bodySite><!-- 0..1 CodeableConcept Body part in media --></bodySite> <device><!-- 0..1 Reference(Device|DeviceMetric) Observing Device --></device> <height value="[positiveInt]"/><!-- 0..1 Height of the image in pixels (photo/video) --> <width value="[positiveInt]"/><!-- 0..1 Width of the image in pixels (photo/video) --> <frames value="[positiveInt]"/><!-- 0..1 Number of frames if > 1 (photo) --> <duration value="[unsignedInt]"/><!-- 0..1 Length in seconds (audio / video) --> <content><!-- 1..1 Attachment Actual Media - reference or data --></content> <note><!-- 0..* Annotation Comments made about the media --></note> </Media>
JSON Template
{ "resourceType" : "Media", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "identifier" : [{ Identifier }], // Identifier(s) for the image "basedOn" : [{ Reference(ProcedureRequest) }], // Procedure that caused this media to be created "type" : "<code>", // R! photo | video | audio "subtype" : { CodeableConcept }, // The type of acquisition equipment/process "view" : { CodeableConcept }, // Imaging view, e.g. Lateral or Antero-posterior "subject" : { Reference(Patient|Practitioner|Group|Device|Specimen) }, // Who/What this Media is a record of "context" : { Reference(Encounter|EpisodeOfCare) }, // Encounter / Episode associated with media // occurrence[x]: When Media was collected. One of these 2: "occurrenceDateTime" : "<dateTime>", "occurrencePeriod" : { Period }, "operator" : { Reference(Practitioner) }, // The person who generated the image "reasonCode" : [{ CodeableConcept }], // Why was event performed? "bodySite" : { CodeableConcept }, // Body part in media "device" : { Reference(Device|DeviceMetric) }, // Observing Device "height" : "<positiveInt>", // C? Height of the image in pixels (photo/video) "width" : "<positiveInt>", // C? Width of the image in pixels (photo/video) "frames" : "<positiveInt>", // C? Number of frames if > 1 (photo) "duration" : "<unsignedInt>", // C? Length in seconds (audio / video) "content" : { Attachment }, // R! Actual Media - reference or data "note" : [{ Annotation }] // Comments made about the media }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:Media; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:Media.identifier [ Identifier ], ... ; # 0..* Identifier(s) for the image fhir:Media.basedOn [ Reference(ProcedureRequest) ], ... ; # 0..* Procedure that caused this media to be created fhir:Media.type [ code ]; # 1..1 photo | video | audio fhir:Media.subtype [ CodeableConcept ]; # 0..1 The type of acquisition equipment/process fhir:Media.view [ CodeableConcept ]; # 0..1 Imaging view, e.g. Lateral or Antero-posterior fhir:Media.subject [ Reference(Patient|Practitioner|Group|Device|Specimen) ]; # 0..1 Who/What this Media is a record of fhir:Media.context [ Reference(Encounter|EpisodeOfCare) ]; # 0..1 Encounter / Episode associated with media # Media.occurrence[x] : 0..1 When Media was collected. One of these 2 fhir:Media.occurrenceDateTime [ dateTime ] fhir:Media.occurrencePeriod [ Period ] fhir:Media.operator [ Reference(Practitioner) ]; # 0..1 The person who generated the image fhir:Media.reasonCode [ CodeableConcept ], ... ; # 0..* Why was event performed? fhir:Media.bodySite [ CodeableConcept ]; # 0..1 Body part in media fhir:Media.device [ Reference(Device|DeviceMetric) ]; # 0..1 Observing Device fhir:Media.height [ positiveInt ]; # 0..1 Height of the image in pixels (photo/video) fhir:Media.width [ positiveInt ]; # 0..1 Width of the image in pixels (photo/video) fhir:Media.frames [ positiveInt ]; # 0..1 Number of frames if > 1 (photo) fhir:Media.duration [ unsignedInt ]; # 0..1 Length in seconds (audio / video) fhir:Media.content [ Attachment ]; # 1..1 Actual Media - reference or data fhir:Media.note [ Annotation ], ... ; # 0..* Comments made about the media ]
Changes since DSTU2
Media | |
Media.basedOn |
|
Media.context |
|
Media.occurrence[x] |
|
Media.reasonCode |
|
Media.bodySite |
|
Media.device |
|
Media.note |
|
Media.deviceName |
|
See the Full Difference for further information
This analysis is available as XML or JSON.
See R2 <--> R3 Conversion Maps (status = 3 tests that all execute ok. All tests pass round-trip testing and all r3 resources are valid.).
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Media | I | DomainResource | A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference + Height can only be used for a photo or video + Width can only be used for a photo or video + Frames can only be used for a photo + Duration can only be used for an audio or a video Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
identifier | Σ | 0..* | Identifier | Identifier(s) for the image |
basedOn | Σ | 0..* | Reference(ProcedureRequest) | Procedure that caused this media to be created |
type | Σ | 1..1 | code | photo | video | audio DigitalMediaType (Required) |
subtype | Σ | 0..1 | CodeableConcept | The type of acquisition equipment/process Media SubType (Example) |
view | Σ | 0..1 | CodeableConcept | Imaging view, e.g. Lateral or Antero-posterior Media Collection View/Projection (Example) |
subject | Σ | 0..1 | Reference(Patient | Practitioner | Group | Device | Specimen) | Who/What this Media is a record of |
context | Σ | 0..1 | Reference(Encounter | EpisodeOfCare) | Encounter / Episode associated with media |
occurrence[x] | Σ | 0..1 | When Media was collected | |
occurrenceDateTime | dateTime | |||
occurrencePeriod | Period | |||
operator | Σ | 0..1 | Reference(Practitioner) | The person who generated the image |
reasonCode | Σ | 0..* | CodeableConcept | Why was event performed? Procedure Reason Codes (Example) |
bodySite | Σ | 0..1 | CodeableConcept | Body part in media SNOMED CT Body Structures (Example) |
device | Σ | 0..1 | Reference(Device | DeviceMetric) | Observing Device |
height | ΣI | 0..1 | positiveInt | Height of the image in pixels (photo/video) |
width | ΣI | 0..1 | positiveInt | Width of the image in pixels (photo/video) |
frames | ΣI | 0..1 | positiveInt | Number of frames if > 1 (photo) |
duration | ΣI | 0..1 | unsignedInt | Length in seconds (audio / video) |
content | 1..1 | Attachment | Actual Media - reference or data | |
note | 0..* | Annotation | Comments made about the media | |
Documentation for this format |
XML Template
<Media xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <identifier><!-- 0..* Identifier Identifier(s) for the image --></identifier> <basedOn><!-- 0..* Reference(ProcedureRequest) Procedure that caused this media to be created --></basedOn> <type value="[code]"/><!-- 1..1 photo | video | audio --> <subtype><!-- 0..1 CodeableConcept The type of acquisition equipment/process --></subtype> <view><!-- 0..1 CodeableConcept Imaging view, e.g. Lateral or Antero-posterior --></view> <subject><!-- 0..1 Reference(Patient|Practitioner|Group|Device|Specimen) Who/What this Media is a record of --></subject> <context><!-- 0..1 Reference(Encounter|EpisodeOfCare) Encounter / Episode associated with media --></context> <occurrence[x]><!-- 0..1 dateTime|Period When Media was collected --></occurrence[x]> <operator><!-- 0..1 Reference(Practitioner) The person who generated the image --></operator> <reasonCode><!-- 0..* CodeableConcept Why was event performed? --></reasonCode> <bodySite><!-- 0..1 CodeableConcept Body part in media --></bodySite> <device><!-- 0..1 Reference(Device|DeviceMetric) Observing Device --></device> <height value="[positiveInt]"/><!-- 0..1 Height of the image in pixels (photo/video) --> <width value="[positiveInt]"/><!-- 0..1 Width of the image in pixels (photo/video) --> <frames value="[positiveInt]"/><!-- 0..1 Number of frames if > 1 (photo) --> <duration value="[unsignedInt]"/><!-- 0..1 Length in seconds (audio / video) --> <content><!-- 1..1 Attachment Actual Media - reference or data --></content> <note><!-- 0..* Annotation Comments made about the media --></note> </Media>
JSON Template
{ "resourceType" : "Media", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "identifier" : [{ Identifier }], // Identifier(s) for the image "basedOn" : [{ Reference(ProcedureRequest) }], // Procedure that caused this media to be created "type" : "<code>", // R! photo | video | audio "subtype" : { CodeableConcept }, // The type of acquisition equipment/process "view" : { CodeableConcept }, // Imaging view, e.g. Lateral or Antero-posterior "subject" : { Reference(Patient|Practitioner|Group|Device|Specimen) }, // Who/What this Media is a record of "context" : { Reference(Encounter|EpisodeOfCare) }, // Encounter / Episode associated with media // occurrence[x]: When Media was collected. One of these 2: "occurrenceDateTime" : "<dateTime>", "occurrencePeriod" : { Period }, "operator" : { Reference(Practitioner) }, // The person who generated the image "reasonCode" : [{ CodeableConcept }], // Why was event performed? "bodySite" : { CodeableConcept }, // Body part in media "device" : { Reference(Device|DeviceMetric) }, // Observing Device "height" : "<positiveInt>", // C? Height of the image in pixels (photo/video) "width" : "<positiveInt>", // C? Width of the image in pixels (photo/video) "frames" : "<positiveInt>", // C? Number of frames if > 1 (photo) "duration" : "<unsignedInt>", // C? Length in seconds (audio / video) "content" : { Attachment }, // R! Actual Media - reference or data "note" : [{ Annotation }] // Comments made about the media }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ a fhir:Media; fhir:nodeRole fhir:treeRoot; # if this is the parser root # from Resource: .id, .meta, .implicitRules, and .language # from DomainResource: .text, .contained, .extension, and .modifierExtension fhir:Media.identifier [ Identifier ], ... ; # 0..* Identifier(s) for the image fhir:Media.basedOn [ Reference(ProcedureRequest) ], ... ; # 0..* Procedure that caused this media to be created fhir:Media.type [ code ]; # 1..1 photo | video | audio fhir:Media.subtype [ CodeableConcept ]; # 0..1 The type of acquisition equipment/process fhir:Media.view [ CodeableConcept ]; # 0..1 Imaging view, e.g. Lateral or Antero-posterior fhir:Media.subject [ Reference(Patient|Practitioner|Group|Device|Specimen) ]; # 0..1 Who/What this Media is a record of fhir:Media.context [ Reference(Encounter|EpisodeOfCare) ]; # 0..1 Encounter / Episode associated with media # Media.occurrence[x] : 0..1 When Media was collected. One of these 2 fhir:Media.occurrenceDateTime [ dateTime ] fhir:Media.occurrencePeriod [ Period ] fhir:Media.operator [ Reference(Practitioner) ]; # 0..1 The person who generated the image fhir:Media.reasonCode [ CodeableConcept ], ... ; # 0..* Why was event performed? fhir:Media.bodySite [ CodeableConcept ]; # 0..1 Body part in media fhir:Media.device [ Reference(Device|DeviceMetric) ]; # 0..1 Observing Device fhir:Media.height [ positiveInt ]; # 0..1 Height of the image in pixels (photo/video) fhir:Media.width [ positiveInt ]; # 0..1 Width of the image in pixels (photo/video) fhir:Media.frames [ positiveInt ]; # 0..1 Number of frames if > 1 (photo) fhir:Media.duration [ unsignedInt ]; # 0..1 Length in seconds (audio / video) fhir:Media.content [ Attachment ]; # 1..1 Actual Media - reference or data fhir:Media.note [ Annotation ], ... ; # 0..* Comments made about the media ]
Changes since DSTU2
Media | |
Media.basedOn |
|
Media.context |
|
Media.occurrence[x] |
|
Media.reasonCode |
|
Media.bodySite |
|
Media.device |
|
Media.note |
|
Media.deviceName |
|
See the Full Difference for further information
This analysis is available as XML or JSON.
See R2 <--> R3 Conversion Maps (status = 3 tests that all execute ok. All tests pass round-trip testing and all r3 resources are valid.).
Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron (for ) + JSON Schema, ShEx (for Turtle)
Path | Definition | Type | Reference |
---|---|---|---|
Media.type | Whether the media is a photo, video, or audio | Required | DigitalMediaType |
Media.subtype | Detailed information about the type of the image - its kind, purpose, or the kind of equipment used to generate it | Example | Media SubType |
Media.view | Imaging view (projection) used when collecting an image | Example | Media Collection View/Projection |
Media.reasonCode | The reason for the media | Example | Procedure Reason Codes |
Media.bodySite | Codes describing anatomical locations. May include laterality. | Example | SNOMED CT Body Structures |
The media resource contains several date/times:
Media.occurrence[x]
- The date(/time) of collection, or the period over which collection occuredMedia.duration
- The duration of the media. The duration might differ from occurrencePeriod if recording was pausedMedia.content.creation
- This should be consistent with the Media.occurrence[x] but might be different due to partial / edited recordings
This resource can embed the image information directly through the attachment.data
element.
However, good practice is generally to use the attachment.url
element to point to a Binary resource.
Servers will frequently be able to persist Binary resources in purpose-dedicated repositories more suitable to potentially large artifacts.
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Expression | In Common |
based-on | reference | Procedure that caused this media to be created | Media.basedOn (ProcedureRequest) | |
context | reference | Encounter / Episode associated with media | Media.context (EpisodeOfCare, Encounter) | |
created | date | Date attachment was first created | Media.content.creation | |
date | date | When Media was collected | Media.occurrence | |
device | reference | Observing Device | Media.device (Device, DeviceMetric) | |
identifier | token | Identifier(s) for the image | Media.identifier | |
operator | reference | The person who generated the image | Media.operator (Practitioner) | |
patient | reference | Who/What this Media is a record of | Media.subject (Patient) | |
site | token | Body part in media | Media.bodySite | |
subject | reference | Who/What this Media is a record of | Media.subject (Practitioner, Group, Specimen, Device, Patient) | |
subtype | token | The type of acquisition equipment/process | Media.subtype | |
type | token | photo | video | audio | Media.type | |
view | token | Imaging view, e.g. Lateral or Antero-posterior | Media.view |