Stream: implementers
Topic: Group.member queries
Peter Bernhardt (Oct 04 2016 at 17:51):
I'm looking at a use case for modelling a potentially large population of patients defined in a group. How might I support a query for members of a group with the _include option to list the member patient records? Would this be a bundle with a list of Patient that has the necessary pagination links?
Peter Bernhardt (Oct 04 2016 at 17:56):
Maybe an OperationDefinition would solve this?
Lloyd McKenzie (Oct 04 2016 at 18:41):
You would query on Patient and use reverse chaining to filter to only those patients pointed to by the desired Group. Pagination would then function as normal. http://hl7.org/fhir/2016sep/search.html#has
Peter Bernhardt (Oct 04 2016 at 19:14):
So, something like this? GET [base]/Patient?_has:Group:member:entity:_id=123
If so, I find this confusing.
Brian Postlethwaite (Oct 04 2016 at 20:20):
This would give you the patients, but not the details of the group membership.
I actually think that the group membership should be a seperate resource, and therefore wouldn't be an issue here.
(for small groups, the memeber records could be contained, except for the rule that says thay need to be referenced by the resource, not the other way around)
Lloyd McKenzie (Oct 04 2016 at 20:34):
Well, you could query the Group too. But that's the only way to get the paging behavior you want. (The Group would contain all reference, but they're light so that should be ok.)
Last updated: Apr 12 2022 at 19:14 UTC