Skip to content

MSC4302: Exchanging FHIR resources via Matrix events#4302

Open
Johennes wants to merge 23 commits intomatrix-org:mainfrom
gematik:johannes/fhir-resources
Open

MSC4302: Exchanging FHIR resources via Matrix events#4302
Johennes wants to merge 23 commits intomatrix-org:mainfrom
gematik:johannes/fhir-resources

Conversation

@Johennes
Copy link
Copy Markdown
Contributor

@Johennes Johennes commented Jun 20, 2025

@Johennes Johennes force-pushed the johannes/fhir-resources branch from 76f53cc to 2c81e3f Compare June 20, 2025 07:46
@Johennes Johennes changed the title MSCXXXX: Exchanging FHIR resources via Matrix events MSC4302: Exchanging FHIR resources via Matrix events Jun 20, 2025
@Johennes Johennes marked this pull request as ready for review June 20, 2025 07:47
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Jun 20, 2025
@github-project-automation github-project-automation bot moved this to Needs idea feedback / initial review in Spec Core Team Workflow Jun 20, 2025
Comment thread proposals/4302-🔥-resources.md Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation requirements:

  • Demonstration of use

Comment thread proposals/4302-🔥-resources.md Outdated
Comment thread proposals/4302-fhir-resources.md Outdated
@Johennes Johennes force-pushed the johannes/fhir-resources branch from 8a5bbb4 to 1d3004c Compare November 7, 2025 14:32
@denis-loh
Copy link
Copy Markdown

I am not sure, if it is a good idea to introduce a deep coupling to a specialized feature into a public standard. I know that there are also other use cases where custom room events are used (for instance in German BOS communication systems). If they would also contribute their custom types, wouldn't it dilute the matrix standard too much in future?

This MSC would conflict with the generalization (matrix)/ specialization (fhir) concept of the specification.

@fnwbr
Copy link
Copy Markdown

fnwbr commented Jan 22, 2026

When describing the alternative the risk of “leaking metadata to the home server” is being mentioned.

How does the proposed solution mitigate that risk?

Comment on lines +134 to +142
[RFC 2045] allows MIME types to include modifying parameters. The contents of
`m.fhir.structure_definition` could, therefore, be included alongside the media type[^1].

``` http
Content-type: application/fhir+json; url="https://gematik.de/fhir/isik/StructureDefinition/ISiKFormularDefinition"; ...
```

This would allow reusing the `m.file` message type but leaks metadata to the home server in
[`POST /_matrix/media/v3/upload`].
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Copying the comment here because we're encouraged to keep discussions in threads on the diff so that they can more easily be split-tracked.)

@fnwbr said:

When describing the alternative the risk of “leaking metadata to the home server” is being mentioned.

How does the proposed solution mitigate that risk?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed solution encapsulates all information related to the FHIR resource in a room event. In encrypted rooms, this event will be end-to-end encrypted. So unless the event is used in public rooms, there should be no additional metadata leakage introduced by this proposal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Copying the comment here because we're encouraged to keep discussions in threads on the diff so that they can more easily be split-tracked.)

@denis-loh said:

I am not sure, if it is a good idea to introduce a deep coupling to a specialized feature into a public standard. I know that there are also other use cases where custom room events are used (for instance in German BOS communication systems). If they would also contribute their custom types, wouldn't it dilute the matrix standard too much in future?

This MSC would conflict with the generalization (matrix)/ specialization (fhir) concept of the specification.

It's a fair question whether or not the use case is large enough to warrant inclusion into Matrix.

That being said, I don't think this proposal introduces a "deep coupling" between Matrix and FHIR. It's already possible to exchange FHIR via Matrix today. All this proposal does is add a handful of metadata properties to facility that. This doesn't feel much different from how URL previews include properties from the Open Graph standard just that Open Graph is probably more widely known.

ichderjens and others added 5 commits January 26, 2026 14:08
Johennes added 2 commits March 6, 2026 11:03
Signed-off-by: Johannes Marbach <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants