send info between accounts

0
send info between accounts : for example in my case I have an app from a doctor's office I want the doctor's account to send a prescription to the secretary's account how can I do that ?! Note : the prescription is a document
asked
1 answers
0

I guess there is several ways to do it, but I will do as follow : 

You have to create an entity prescription  (which is a generalization of the entity system FileDocument), the entity prescription will be linked to the entity account. (secretary_prescription, 1 account / * prescription). 

The entity prescription will also be link the same way to another account (the doctor, doctor_prescription, 1 account / * prescription)

 

Then in your application process (after the upload of the prescription by a doctor) after a click on a button, you retrieve the secretary account, and put that account in the assocation secretary_prescription, retrieve the doctor account, and put that account in the association doctor_prescription.

I would also suggest to add a boolean attribute in the account entity to know if an account is a secretary or a doctor.

answered