Hi !

Durupalion's

I'm trying to develop a web app in Drupal 7.x . In my web app there are two kind of role one is Hospital and next is patient. Role Hospital can create patient Role User's. e.g :- A hospital name ABCD creates its patient's. I want to know which patient was created by which hospital and only that hospital is allowed to see its patient's record.

I shall be highly thankful for your help.

Comments

bappa.sarkar’s picture

Not sure about any contributed module present for this purpose or not.

But you always can create your own module for this. You need to create user insert hook to get the uid of the created user and use global $user in the same hook to know the uid of the creator.

prashannajabara’s picture

Thank you for your support. I'll try that one

parvind’s picture

Drupal subuser module do the same thing what you need -
http://drupal.org/project/subuser

Thanks and Regards
Parvind

prashannajabara’s picture

Thank you Pravind for suggesting such a module. I was in search of such module. Thank you 1ce again.

steeph’s picture

The first thing that came to my mind is rules. You could probably set up a rule that writes the name or ID of the acting user into a field that is related to the created user.