Dr G,
Brilliant user needs analysis!!
What you’re describing is a Many-to-Many relationship, where potentially many (parents, grandparents, guardians) might need access to multiple (children/parents’) charts.
For relational databases, this requires a linking table with fields
- User account with access (Username) (Unique identifier1)
- Chart to be accessed (Unique identifier 2, or 61225,4, etc)
- (One Permission, eg to give others access, view, add info etc.)
Each Permission/Chart/User requires its own record.
Each user has a unique identifier
Each chart has a unique identifier
Each entry in the linking table has just one permission to one chart for one user.
Thus:
- Mary Smith (User ID with this access)
- Bill Jones (Chart ID Mary has access to)
- (Full control/add info/view) (Mary’s permission)
Changing this is a job for the elect guardians of the database and their high priests, because it could break many other things.
This interacts with another critically important table,
- User account with access (Username) (Unique identifier)
- Salted, encrypted password
- ‘Salt’ data
This is also the solution for the ‘Patient Portal creating (or NOT creating) duplicate charts’ problem because a parent or guardian should be able to create multiple dependents’ charts, but only if that’s clearly what they intend. If a Portal User who already has a chart tries to create a new chart this should default to them logging in to their OWN chart.
eg.,
Patient message:
You already have a chart at (Office Name.)
Buttons:
- Log in to your chart? (default)
- Create a new chart for someone else you take care of?
Great job describing the program behavior (you/we) need!!
Accurately describing what the program needs to do is critical to writing the code to do it.
(This may already exist, but I suspect it doesn’t, because of the problems we’ve seen with creating duplicate user charts from the portal.)
Fixing this should actually make the database guardians’ job easier because it solves a host of gnarly problems that otherwise get unsatisfactory patchwork solutions.