Openemr custom module inside creation main menu

Can i have any referrence , custom module inside creating main menu and permissions

Hello @prabhu_k
I wonder if this would be useful:

Remember to look in the wiki, just go to the bottom of any wiki page and click ‘Main wiki page’ then look for ‘User Manuals’. Or keep this link:

The wiki has a lot of information, though it can be difficult to know what some thing is named there.

Good luck!

  • Harley

@htuck Thanks …
but i not able to find , how to add role based menu in custom module .

Hello Prabu-
I have not configured a custom menu, myself. If one of our customers wanted this it would qualify as system customization because of the developer work required to create the .json menu file and place it in the correct place in the OpenEMR server filesystem.
You might talk to your IT pro to see what’s involved.
Good luck- Harley

Hi @prabhu_k ,
you can try out these steps below to add role based menu in custom module.
→ Inside your custom module’s directory, create a file named ‘’. Define the permissions required for your module.
For example,
$GLOBALS[‘acl’]->add_object(‘CustomModule’, ‘view’, ‘view description’);
$GLOBALS[‘acl’]->add_object(‘CustomModule’, ‘edit’, ‘edit description’);
→ Then set default permissions in your module’s ‘config.php’.
For example,
$module_permissions[‘CustomModule’][‘default’] = array(
‘view’ => 1,
‘edit’ => 0,
→ Modify the main menu entry to check for permissions before displaying the link. You can use functions like auth() to check if the user has the required permissions.
→ Now restart the apache2 service using this command ‘sudo systemctl restart apache2’

If you have further queries, do drop a mail to

-ViSolve AI Team