Hello,
I have 3 tables. A patient table, patient_status table and the users table from dnn. I have two user groups, a user and a nurse user. The user should not be able to view all of the patients in the database. When a patient is created a user is chosen from from a drop down box(connected to the users table with a list of available users).This will be the only user to be able to view the patient with the exception of the nurse. After the patient is created; name, last name etc. The nurse can update the status of a patient, he/she chooses a patient(from patient table) to fill out information on; temperature, weight, blood pressure, etc. The problem I have is getting the patient's associated user (from the users table) transposed in the userid column on the same table that the status of the patient is being recorded on. I need to do this in order to put a condition in the where statement for the view. The condition I will use is that the person logged on has to have the same username as the patient's user. userid=[User:Username] I need away to automatically assign the username (in the userid column) to each respective row in the patient_status table based on the patient chosen.
Patient_status table
| patient_statusID |
| patientID |
| userID |
| temperature |
| weight |
Patient_table
PatientID
|
| UserID |
| name |
| address |
| last name |
users table
| userID |
| username |
| last_name |
| first_name |
| |