Stream: hapi
Topic: Return multiple ValueSets with one query?
Joe Jordan (Jun 22 2020 at 19:28):
I'm currently working on some functionality utilizing the Condition resource, and was trying unsuccessfully to get multiple related valuesets returned using a single network call. Is this possible? Another wrinkle is that when called on their own they require the $expand command to get all the values. So ideally I'm looking to create a single network call that will return the $expand valueSets for ValueSet/condition-category, ValueSet/condition-ver-status, and ValueSet/condition-clinical. Any suggestions?
Grahame Grieve (Jun 23 2020 at 05:24):
have you looked at batch?
Joe Jordan (Jun 23 2020 at 21:05):
Thanks for the hint @Grahame Grieve got it working :+1:
If anyone stumbles onto this thread in the future, you can send a 'Bundle' resource object with the type 'batch' to your FHIR server. The 'entry' values you provide to this bundle are an array of request objects, i.e.
{
request: {
method: "GET",
url: "ValueSet/$expand?url=http://hl7.org/fhir/ValueSet/condition-clinical"
}
}
The returned Bundle will have a type of 'batch-response' with a list of valueSet result entries, assuming they exist on your server.
Last updated: Apr 12 2022 at 19:14 UTC