Stream: implementers
Topic: Using parameter.id
Yunwei Wang (Jun 17 2019 at 16:16):
Following my previous question, I am trying to figure out the result structure of my little FHIR operation. Here is my use case: I am building a FHIR operation which takes a list of MedicationRequest and returns analytic result for each MedicationRequest. Each result contains two values: id for MedicationRequest and a boolean value true/false. I am thinking if I can use parameter.id to pass id for input MedicationRequest. It looks like this
{
"parameter": [
{
"id": "medication-100"
"name": "result",
"part": [
{
"name": "indicator",
"valueBoolean": true
}
]
},
....
Otherwise, I can pass the medication id as part of parameter.part. Like this:
{
"parameter": [
{
"name": "result",
"part": [
{
"name": "id",
"valueId": "medication-100"
},
{
"name": "indicator",
"valueBoolean": true
}
]
},
...
So which one is better?
Lloyd McKenzie (Jun 17 2019 at 17:08):
The latter. The 'id' on parameter is the id of the parameter - it's not a reference to anything else. If you want a reference to something else, then it needs to be a distinct parameter. (Seems pretty restrictive to use ids rather than full references as that makes significant assumptions about where the resources will be.)
Last updated: Apr 12 2022 at 19:14 UTC