Limiting a therapy practitioner to their own patie...
# support
o
ChatGPT is suggesting I accomplish this by using "group" resources rather than the "multi tenancy" docs on medplum. I dont mind using groups, just confirming that it is a viable option. Our use case: We will have a few admins that oversee everything, will be in charge of adding new practitioners. Then, we want a practitioner to only be able to access the data of patients they are working with rather than letting them access every patient's data. Ie, we may not need multi-tenancy from what I understand because we dont have admins that need isolation from anything.
r
Yes you could use Groups as a way to create cohorts of patients. In your UI, you could craft your search queries to only fetch patients from those groups that are associated with the Practitioner
This wouldn't prevent underlying API access to those patients. This is just a UI level fix
The multitenancy docs you referred to implement a server-side solution for isolating patients
So the right tool for you will depend on your requirements
o
So an access policy cant be made that limits patients to those in they same group?
f
Yea, you could achieve this with access policies to prevent underlying api access, but it would be a little bit more involved. You should check [this](https://www.medplum.com/blog/multi-tenant-mso) post out, where I show how to do this. But rather than using Organization references, you can use your Group.
o
to clarify, this would involve creating an access policy specific to each group that says "can only access data for this group". Wouldnt that be an issue since the medplum pricing says we can only create upto 3 access policies on our current plan? Even if we went up to the 6k plan, it would only allow 10 access policies? Unless "3 access policies" doesnt mean what it sounds like
i
@oscadev you wouldn't create an access policy per group here. You would create a single access policy that managed your MSO permissions structure
152 Views