Hi @jon.goody,
I would advise using Retrieve “on-behalf-of” practitioner user information (A040, FHIR R4) to determine what users the SPCA can act on behalf of.
For this specific request it looks like you are authenticating as 555045992108 as a SPCA and trying to login on behalf of 555045992108 (the same user). This is not allowed as in this case you would just select the SPC role.
The rules for determining the users that an SPCA can act on behalf of:
- All the Service Provider Clinicians (excluding themself) from all Service Provider Workgroups that the Professional User is a member of for the chosen e-RS Organisation.
So if you are authenticating as User A as an SPCA and you want to act on behalf of User B. Then User B must share a workgroup with User A (at that organisation) and have the SPC role.
If you have an example that doesn’t work (when you aren’t using the same user) then let me know and we can try to troubleshoot.
Hopefully that helps.
Regards,
Adam.