Stream: implementers
Topic: message bundle send parameters
Yagami L (Mar 11 2021 at 19:50):
Hello! What is the best way to send parameters in a message bundle (in this case we need to send boolean flags)?
Lloyd McKenzie (Mar 11 2021 at 21:25):
Can you give some examples?
Yagami L (Mar 11 2021 at 21:43):
We are using a message bundle to import (and create) a patient from one system to another. But we need specify whether or not to call a certain own operation ($invite) on the new created patient.
In other words, we need to send in the message bundle a flag (a parameter) that specifies whether to call the operation (or not).
In theory, you can send metadata like this in the MessageHeader resource, but we don't know what that would be like.
Yagami L (Mar 12 2021 at 14:50):
bundle message e.g.
{
"resourceType": "Bundle",
"type": "message",
"entry": [
{
"resource": {
"resourceType": "MessageHeader",
"eventCoding": {
"system": "http://example.org/fhir/message-events",
"code": "import"
},
"source": {
"endpoint": "http://example.system.com"
}
}
},
{
"resource": {
"name": [
{
"use": "official",
"given": [
"John"
],
"family": "Doe"
}
],
"birthDate": "1989-11-09",
"resourceType": "Patient",
"telecom": [
{
"use": "home",
"value": "johndoe@email.com",
"system": "email"
}
],
"gender": "male"
}
}
]
}
The question is how we can include the invite flag in the message bundle, so that the receiving system of the bundle decides to call the $invite operation (we work in the receiving system)
Any help, please
Vassil Peytchev (Mar 12 2021 at 15:03):
For the ones for which the intent is to import only, you have an event code of "import" (as shown above). For the ones that you also wish to "invite", you could specify a different event code, e.g. "importAndInvite".
Yagami L (Mar 12 2021 at 15:09):
For this case it works, thanks. But the problem is that if we have more flags in the future, the number of events grows exponentially.
The general question is how to send parameters in the bundle message.
Lloyd McKenzie (Mar 12 2021 at 15:13):
You can include a Parameters resource, but in general, if the behavior is different you should have distinct events - because that drives what systems claim conformance to.
Yagami L (Mar 12 2021 at 15:40):
thanks to both!
Last updated: Apr 12 2022 at 19:14 UTC