How to Fix ‘Access Denied Not in your program domain’ error

Share this

If you come across this error:

“Access Denied.
You cannot access this client’s Encounters because he/she is not in your program domain. What this means is that this client is currently not, and never has been a participant in any program you have rights to.
Please talk to your administrator about getting the proper access.”

This error is due to the value of “program_id” in the admission table of the OSCAR database.

admission table description:

You can go to Administration>Reports>Query By Example and type “select * from admission” to show your admission table. The default value for the Admission Program ID (program_id column) is usually 10016 but if you have an online booking system or other software that changed this/added a demographic with a different program ID, then you will receive the access denied message.

To be able to access all patients’ charts, you can set the Admission ID to the same value for everyone.

This can only be done through the OSCAR database’s back-end (mysql command).

First you need to backup the OSCAR database before making any change!

Once logged into your mysql back-end, USE the oscar database and then you can run the command to change the program_id column.

To set the program_id of all patients in OSCAR to ex. ‘10016’:

UPDATE admission
SET program_id = 10016;

To set the program_id of specific demographics in OSCAR (replace 1, 23, 442, 5332 with the demographic numbers) ex.:

UPDATE admission
SET program_id = 10016
WHERE client_id IN (1, 23, 442, 5332);

(the client_id in the admission table is the demographic_no from the demographic table)