This page is part of the FHIR Specification (v3.5.0: R4 Ballot #2). 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
Orders and Observations 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.
Trial-Use Note: The Orders and Observations workgroups wants to make the balloter aware than observations that require the attachment data types are represented by the Media resource instead of Observation. There have been several significant changes to the Media resource in order to align it with Observation and the workflow event pattern including:
- The addition of the partOf and issued elements.
- The required
type
was changed an optional category and thesubtype
element was renamed to modality.- Additional reference targets added to the
subject
,operator
, andbasedOn
elements- The additions of several standard event extensions.
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 AdverseEvent, ClinicalImpression, DeviceUseStatement, DiagnosticReport, ImagingStudy, MedicationKnowledge and Observation
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Media | TU | DomainResource | A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
identifier | Σ | 0..* | Identifier | Identifier(s) for the image |
basedOn | Σ | 0..* | Reference(ServiceRequest | CarePlan) | Procedure that caused this media to be created |
partOf | Σ | 0..* | Reference(Any) | Part of referenced event |
status | ?!Σ | 1..1 | code | preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown EventStatus (Required) |
type | Σ | 0..1 | CodeableConcept | Classification of media as image, video, or audio Media Type (Extensible) |
modality | Σ | 0..1 | CodeableConcept | The type of acquisition equipment/process Media Modality (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 | Location) | Who/What this Media is a record of |
context | Σ | 0..1 | Reference(Encounter | EpisodeOfCare) | Encounter / Episode associated with media |
created[x] | Σ | 0..1 | When Media was collected | |
createdDateTime | dateTime | |||
createdPeriod | Period | |||
issued | Σ | 0..1 | instant | Date/Time this version was made available |
operator | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization | CareTeam | Patient | Device | RelatedPerson) | The person who generated the image |
reasonCode | Σ | 0..* | CodeableConcept | Why was event performed? Procedure Reason Codes (Example) |
bodySite | Σ | 0..1 | CodeableConcept | Observed body part SNOMED CT Body Structures (Example) |
deviceName | Σ | 0..1 | string | Name of the device/manufacturer |
device | Σ | 0..1 | Reference(Device | DeviceMetric | Device) | Observing Device |
height | Σ | 0..1 | positiveInt | Height of the image in pixels (photo/video) |
width | Σ | 0..1 | positiveInt | Width of the image in pixels (photo/video) |
frames | Σ | 0..1 | positiveInt | Number of frames if > 1 (photo) |
duration | Σ | 0..1 | decimal | 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(ServiceRequest|CarePlan) Procedure that caused this media to be created --></basedOn> <partOf><!-- 0..* Reference(Any) Part of referenced event --></partOf> <status value="[code]"/><!-- 1..1 preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown --> <type><!-- 0..1 CodeableConcept Classification of media as image, video, or audio --></type> <modality><!-- 0..1 CodeableConcept The type of acquisition equipment/process --></modality> <view><!-- 0..1 CodeableConcept Imaging view, e.g. Lateral or Antero-posterior --></view> <subject><!-- 0..1 Reference(Patient|Practitioner|Group|Device|Specimen|Location) Who/What this Media is a record of --></subject> <context><!-- 0..1 Reference(Encounter|EpisodeOfCare) Encounter / Episode associated with media --></context> <created[x]><!-- 0..1 dateTime|Period When Media was collected --></created[x]> <issued value="[instant]"/><!-- 0..1 Date/Time this version was made available --> <operator><!-- 0..1 Reference(Practitioner|PractitionerRole|Organization| CareTeam|Patient|Device|RelatedPerson) The person who generated the image --></operator> <reasonCode><!-- 0..* CodeableConcept Why was event performed? --></reasonCode> <bodySite><!-- 0..1 CodeableConcept Observed body part --></bodySite> <deviceName value="[string]"/><!-- 0..1 Name of the device/manufacturer --> <device><!-- 0..1 Reference(Device|DeviceMetric|Device) 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="[decimal]"/><!-- 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(ServiceRequest|CarePlan) }], // Procedure that caused this media to be created "partOf" : [{ Reference(Any) }], // Part of referenced event "status" : "<code>", // R! preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown "type" : { CodeableConcept }, // Classification of media as image, video, or audio "modality" : { CodeableConcept }, // The type of acquisition equipment/process "view" : { CodeableConcept }, // Imaging view, e.g. Lateral or Antero-posterior "subject" : { Reference(Patient|Practitioner|Group|Device|Specimen|Location) }, // Who/What this Media is a record of "context" : { Reference(Encounter|EpisodeOfCare) }, // Encounter / Episode associated with media // created[x]: When Media was collected. One of these 2: "createdDateTime" : "<dateTime>", "createdPeriod" : { Period }, "issued" : "<instant>", // Date/Time this version was made available "operator" : { Reference(Practitioner|PractitionerRole|Organization| CareTeam|Patient|Device|RelatedPerson) }, // The person who generated the image "reasonCode" : [{ CodeableConcept }], // Why was event performed? "bodySite" : { CodeableConcept }, // Observed body part "deviceName" : "<string>", // Name of the device/manufacturer "device" : { Reference(Device|DeviceMetric|Device) }, // Observing Device "height" : "<positiveInt>", // Height of the image in pixels (photo/video) "width" : "<positiveInt>", // Width of the image in pixels (photo/video) "frames" : "<positiveInt>", // Number of frames if > 1 (photo) "duration" : <decimal>, // 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(ServiceRequest|CarePlan) ], ... ; # 0..* Procedure that caused this media to be created fhir:Media.partOf [ Reference(Any) ], ... ; # 0..* Part of referenced event fhir:Media.status [ code ]; # 1..1 preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown fhir:Media.type [ CodeableConcept ]; # 0..1 Classification of media as image, video, or audio fhir:Media.modality [ 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|Location) ]; # 0..1 Who/What this Media is a record of fhir:Media.context [ Reference(Encounter|EpisodeOfCare) ]; # 0..1 Encounter / Episode associated with media # Media.created[x] : 0..1 When Media was collected. One of these 2 fhir:Media.createdDateTime [ dateTime ] fhir:Media.createdPeriod [ Period ] fhir:Media.issued [ instant ]; # 0..1 Date/Time this version was made available fhir:Media.operator [ Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson) ]; # 0..1 The person who generated the image fhir:Media.reasonCode [ CodeableConcept ], ... ; # 0..* Why was event performed? fhir:Media.bodySite [ CodeableConcept ]; # 0..1 Observed body part fhir:Media.deviceName [ string ]; # 0..1 Name of the device/manufacturer fhir:Media.device [ Reference(Device|DeviceMetric|Device) ]; # 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 [ decimal ]; # 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 R3
Media | |
Media.basedOn |
|
Media.partOf |
|
Media.status |
|
Media.type |
|
Media.modality |
|
Media.subject |
|
Media.created[x] |
|
Media.issued |
|
Media.operator |
|
Media.deviceName |
|
Media.device |
|
Media.frames |
|
Media.duration |
|
Media.subtype |
|
Media.occurrence[x] |
|
See the Full Difference for further information
This analysis is available as XML or JSON.
See R3 <--> R4 Conversion Maps (status = 4 tests of which 4 fail to execute.)
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Media | TU | DomainResource | A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension | |
identifier | Σ | 0..* | Identifier | Identifier(s) for the image |
basedOn | Σ | 0..* | Reference(ServiceRequest | CarePlan) | Procedure that caused this media to be created |
partOf | Σ | 0..* | Reference(Any) | Part of referenced event |
status | ?!Σ | 1..1 | code | preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown EventStatus (Required) |
type | Σ | 0..1 | CodeableConcept | Classification of media as image, video, or audio Media Type (Extensible) |
modality | Σ | 0..1 | CodeableConcept | The type of acquisition equipment/process Media Modality (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 | Location) | Who/What this Media is a record of |
context | Σ | 0..1 | Reference(Encounter | EpisodeOfCare) | Encounter / Episode associated with media |
created[x] | Σ | 0..1 | When Media was collected | |
createdDateTime | dateTime | |||
createdPeriod | Period | |||
issued | Σ | 0..1 | instant | Date/Time this version was made available |
operator | Σ | 0..1 | Reference(Practitioner | PractitionerRole | Organization | CareTeam | Patient | Device | RelatedPerson) | The person who generated the image |
reasonCode | Σ | 0..* | CodeableConcept | Why was event performed? Procedure Reason Codes (Example) |
bodySite | Σ | 0..1 | CodeableConcept | Observed body part SNOMED CT Body Structures (Example) |
deviceName | Σ | 0..1 | string | Name of the device/manufacturer |
device | Σ | 0..1 | Reference(Device | DeviceMetric | Device) | Observing Device |
height | Σ | 0..1 | positiveInt | Height of the image in pixels (photo/video) |
width | Σ | 0..1 | positiveInt | Width of the image in pixels (photo/video) |
frames | Σ | 0..1 | positiveInt | Number of frames if > 1 (photo) |
duration | Σ | 0..1 | decimal | 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(ServiceRequest|CarePlan) Procedure that caused this media to be created --></basedOn> <partOf><!-- 0..* Reference(Any) Part of referenced event --></partOf> <status value="[code]"/><!-- 1..1 preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown --> <type><!-- 0..1 CodeableConcept Classification of media as image, video, or audio --></type> <modality><!-- 0..1 CodeableConcept The type of acquisition equipment/process --></modality> <view><!-- 0..1 CodeableConcept Imaging view, e.g. Lateral or Antero-posterior --></view> <subject><!-- 0..1 Reference(Patient|Practitioner|Group|Device|Specimen|Location) Who/What this Media is a record of --></subject> <context><!-- 0..1 Reference(Encounter|EpisodeOfCare) Encounter / Episode associated with media --></context> <created[x]><!-- 0..1 dateTime|Period When Media was collected --></created[x]> <issued value="[instant]"/><!-- 0..1 Date/Time this version was made available --> <operator><!-- 0..1 Reference(Practitioner|PractitionerRole|Organization| CareTeam|Patient|Device|RelatedPerson) The person who generated the image --></operator> <reasonCode><!-- 0..* CodeableConcept Why was event performed? --></reasonCode> <bodySite><!-- 0..1 CodeableConcept Observed body part --></bodySite> <deviceName value="[string]"/><!-- 0..1 Name of the device/manufacturer --> <device><!-- 0..1 Reference(Device|DeviceMetric|Device) 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="[decimal]"/><!-- 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(ServiceRequest|CarePlan) }], // Procedure that caused this media to be created "partOf" : [{ Reference(Any) }], // Part of referenced event "status" : "<code>", // R! preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown "type" : { CodeableConcept }, // Classification of media as image, video, or audio "modality" : { CodeableConcept }, // The type of acquisition equipment/process "view" : { CodeableConcept }, // Imaging view, e.g. Lateral or Antero-posterior "subject" : { Reference(Patient|Practitioner|Group|Device|Specimen|Location) }, // Who/What this Media is a record of "context" : { Reference(Encounter|EpisodeOfCare) }, // Encounter / Episode associated with media // created[x]: When Media was collected. One of these 2: "createdDateTime" : "<dateTime>", "createdPeriod" : { Period }, "issued" : "<instant>", // Date/Time this version was made available "operator" : { Reference(Practitioner|PractitionerRole|Organization| CareTeam|Patient|Device|RelatedPerson) }, // The person who generated the image "reasonCode" : [{ CodeableConcept }], // Why was event performed? "bodySite" : { CodeableConcept }, // Observed body part "deviceName" : "<string>", // Name of the device/manufacturer "device" : { Reference(Device|DeviceMetric|Device) }, // Observing Device "height" : "<positiveInt>", // Height of the image in pixels (photo/video) "width" : "<positiveInt>", // Width of the image in pixels (photo/video) "frames" : "<positiveInt>", // Number of frames if > 1 (photo) "duration" : <decimal>, // 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(ServiceRequest|CarePlan) ], ... ; # 0..* Procedure that caused this media to be created fhir:Media.partOf [ Reference(Any) ], ... ; # 0..* Part of referenced event fhir:Media.status [ code ]; # 1..1 preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown fhir:Media.type [ CodeableConcept ]; # 0..1 Classification of media as image, video, or audio fhir:Media.modality [ 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|Location) ]; # 0..1 Who/What this Media is a record of fhir:Media.context [ Reference(Encounter|EpisodeOfCare) ]; # 0..1 Encounter / Episode associated with media # Media.created[x] : 0..1 When Media was collected. One of these 2 fhir:Media.createdDateTime [ dateTime ] fhir:Media.createdPeriod [ Period ] fhir:Media.issued [ instant ]; # 0..1 Date/Time this version was made available fhir:Media.operator [ Reference(Practitioner|PractitionerRole|Organization|CareTeam|Patient|Device|RelatedPerson) ]; # 0..1 The person who generated the image fhir:Media.reasonCode [ CodeableConcept ], ... ; # 0..* Why was event performed? fhir:Media.bodySite [ CodeableConcept ]; # 0..1 Observed body part fhir:Media.deviceName [ string ]; # 0..1 Name of the device/manufacturer fhir:Media.device [ Reference(Device|DeviceMetric|Device) ]; # 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 [ decimal ]; # 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 Release 3
Media | |
Media.basedOn |
|
Media.partOf |
|
Media.status |
|
Media.type |
|
Media.modality |
|
Media.subject |
|
Media.created[x] |
|
Media.issued |
|
Media.operator |
|
Media.deviceName |
|
Media.device |
|
Media.frames |
|
Media.duration |
|
Media.subtype |
|
Media.occurrence[x] |
|
See the Full Difference for further information
This analysis is available as XML or JSON.
See R3 <--> R4 Conversion Maps (status = 4 tests of which 4 fail to execute.)
See the Profiles & Extensions and the alternate definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions & the dependency analysis
Path | Definition | Type | Reference |
---|---|---|---|
Media.status | Codes identifying the lifecycle stage of a event. | Required | EventStatus |
Media.type | Codes for high level media categories. | Extensible | MediaType |
Media.modality | Detailed information about the type of the image - its kind, purpose, or the kind of equipment used to generate it. | Example | MediaModality |
Media.view | Imaging view (projection) used when collecting an image. | Example | MediaCollectionView/Projection |
Media.reasonCode | The reason for the media. | Example | ProcedureReasonCodes |
Media.bodySite | Codes describing anatomical locations. May include laterality. | Example | SNOMEDCTBodyStructures |
The media resource contains several date/times:
Media.created[x]
- The date(/time) of collection, or the period over which collection occurredMedia.duration
- The duration of the media. The duration might differ from createdPeriod if recording was pausedMedia.content.creation
- This should be consistent with the Media.created[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 (CarePlan, ServiceRequest) | |
context | reference | Encounter / Episode associated with media | Media.context (EpisodeOfCare, Encounter) | |
created | date | When Media was collected | Media.created | |
device | reference | Observing Device | Media.device (Device, DeviceMetric) | |
identifier | token | Identifier(s) for the image | Media.identifier | |
modality | token | The type of acquisition equipment/process | Media.modality | |
operator | reference | The person who generated the image | Media.operator (Practitioner, Organization, CareTeam, Device, Patient, PractitionerRole, RelatedPerson) | |
patient | reference | Who/What this Media is a record of | Media.subject.where(resolve() is Patient) (Patient) | |
site | token | Observed body part | Media.bodySite | |
status | token | preparation | in-progress | not-done | suspended | aborted | completed | entered-in-error | unknown | Media.status | |
subject | reference | Who/What this Media is a record of | Media.subject (Practitioner, Group, Specimen, Device, Patient, Location) | |
type | token | Classification of media as image, video, or audio | Media.type | |
view | token | Imaging view, e.g. Lateral or Antero-posterior | Media.view |