InstantMessage

The FHIR R4 InstantMessage resource represents real-time or asynchronous messages exchanged between healthcare providers, care teams, or patients. It is used to document communication for audit, coordination, or workflow purposes.

Use Cases

  • Fetch messages exchanged between care team members
  • Post a new communication record for a patient
  • Get notified when a new secure message is received

Base URLs

Authentication

All requests require OAuth 2.0 authentication using a Bearer Token. Unauthorized requests return a 401 Unauthorized response.

Required Scope: instantmessage.read for GET

For more information, go to: OAuth 2.0 Authentication.

Supported Methods

MethodOperationDescription
GETRead InstantMessageRetrieves a specific InstantMessage record by its FHIR ID.
GETSearch InstantMessageSearches for InstantMessage records for a specified patient or thread.

Frequently Used Search Parameters

ParameterDescriptionFHIR Data TypeRequired
patientFilters messages related to a patientReferenceYes
sentFilters by when the message was sentdateNo
senderFilters by the person or system who sent itReferenceNo
recipientFilters by who received the messageReferenceNo
statusFilters by delivery statustokenNo
categoryFilters by communication categorytokenNo

Commonly Returned Resource Attributes

AttributeDescriptionFHIR Data TypeExample
statusStatus of the messagecodecompleted, in-progress
categoryClassification of message contentCodeableConceptnotification, instruction
senderPerson or device sending the messageReferencePractitioner/123
recipientMessage recipientsReference[]Patient/456, Practitioner/789
sentDate/time message was sentdateTime2024-10-01T10:20:30Z
receivedDate/time message was receiveddateTime2024-10-01T10:21:00Z
subjectThe subject of the communication (typically a patient)ReferencePatient/456
payloadThe actual message content or attachmentsstring, AttachmentText content or file reference

Webhooks

Clients can subscribe to receive notifications when new instant messages are created or existing messages are updated. For more information, go to: Webhooks & Polling.

Error Handling

All InstantMessage operations follow standard Health Gorilla error handling, including use of FHIR OperationOutcome for structured responses. For more information, go to: Error Handling.

Additional Resources

HL7 FHIR Communication Resource