Hey 👋 I have a modelling question from healthcare...
# spicedb
d
Hey 👋 I have a modelling question from healthcare (german healthcare, precisely): These are my constraints: - A hospital has doctors and patients - there are patients, but some of them are VIPs (people whose medical records should not be seen by every doctor) - there are patients who are employees of the hospital (and therefore their state of health is taboo for the employer) - there are doctors who are only allowed to see patients who are not VIPs and not employees (normal case) - there are doctors who are also allowed to see patients who are VIPs (e.g. chief_doctor) - There are doctors who are also allowed to see patients who are employees (company_doctor, specially trained in data protection) Now I think about how to model this. I thought about custom roles, but there are multiple options, as I see it, and I wanted to ask for advice which road to take: 1: Using a kind of "status" definition and a relation for the patient - this feels a bit messy. 2: using caveats for the patient status - this would make me loose some visibility, when I understand it correctly. 3: using a different definition vip_patient - this would work somehow, but given that we also have "internal_patients" which could also have vip status (a.k.a. "private insurance" instead of "normal insurance") this would also get a bit messy like option 1, when there are more statuses or definitions involved. Any hints? 🙂
3 Views