charithv
04/17/2025, 1:58 PMmedplum.subscribeToCriteria(
`Communication?subject=${groupRef}`
);
and out AccessPolicy has something like this
{
"resourceType": "Subscription",
"criteria": "Subscription?type=websocket"
},
here the group ref is a bit complicated, two groups are created for each user with Group.name=chat- and Group.name=chat- to identify the chats and notifications per user .
could you pls help us with appropriate criteria for this .finnbergquist
04/17/2025, 4:50 PMcharithv
04/17/2025, 4:53 PMfinnbergquist
04/17/2025, 5:06 PMfinnbergquist
04/17/2025, 6:18 PMcharithv
04/18/2025, 2:41 AMfinnbergquist
04/18/2025, 6:06 PMfinnbergquist
04/18/2025, 8:53 PM{
"resourceType": "Subscription",
"criteria": "Subscription?type=websocket"
},
and was able to get that to work finefinnbergquist
04/18/2025, 8:54 PMcharithv
04/21/2025, 11:10 AMfinnbergquist
04/21/2025, 6:52 PMfinnbergquist
04/21/2025, 6:55 PMfinnbergquist
04/22/2025, 9:09 PMfinnbergquist
04/22/2025, 9:10 PMcharithv
04/23/2025, 3:36 AMfinnbergquist
04/23/2025, 5:58 PMcharithv
04/24/2025, 4:01 PMfinn@medplum.com as practitioner on our staging env and assigned you a access policy https://app.medplum.com/AccessPolicy/3461237b-27a5-4efe-90c4-6919a2e1417c
to reproduce you can try to play with create a subscription on Communication?subject=<Group ref >finnbergquist
04/24/2025, 4:01 PMcharithv
04/24/2025, 4:28 PMfinnbergquist
04/24/2025, 6:40 PMhttps://api.medplum.com/fhir/R4/Subscription
Request Method:
POST
and also the JSON for a Communication resource that you did not receive a webhook for.
One other thought I had. Can you make sure that the people in the chat have access to the Group and Communication resources in their AccessPoliciescharithv
04/25/2025, 1:26 AMcharithv
04/25/2025, 2:30 PMcharithv
04/25/2025, 2:31 PMcharithv
04/25/2025, 2:33 PM{
"resourceType": "Communication",
"criteria": "Communication?recipient=%profile"
},
{
"resourceType": "Communication",
"criteria": "Communication?sender=%profile"
},finnbergquist
04/28/2025, 3:05 PMfinnbergquist
04/28/2025, 3:06 PM