Create new navbar menu for custom role

Can any one suggest me how can I create custom role and also create custom navbar menu for each role

Hi @Rakesh custom role can be created from ACL where you need to create new group and then you can add the access control objects to it. But to create custom navbar menu, code change is needed. Let me know if you need any assistance for the same.

its fine , but i need your assistance.

Sure, let me know how can we connect.

Hi Rakesh - i don’t know if the following will help - it’s something i’ve done to set up custom menus for our users.

The menus are defined in .json files. You’ll find examples in interface/main/tabs/menu, as well as the folder mentioned below for custom menus

you can place custom menus in the folder sites/default/documents/custom_menus.

you can then specify the menu that a particular user should use, from the ones in the custom_menus folder, by going to admin/users, clicking on the user you are setting up, and looking in ‘main menu role’ for your custom menu.

you can also set up menus for the patient menu role, by putting those in sites/default/documents/custom_menus/patient_menus

To set up a new menu bar copy one of the existing menus and adjust to your needs.

there is some documentation at Role Based Menus - OpenEMR Project Wiki

and more menu files to look at in

Thank you, Now i will try if i am facing any issue i can connect with you.

1 Like

yes i find that file so that i can customize the menu as per my requirements, but i have doubts,

  1. I want to create two new role in openemr so that the role contains unique menu item rather than the existing menu. How can i do that.

  2. If i created another json file like custom.json , wherei link that json file in code so that it can run the project smoothly.

  3. How i do all these process so that i can see the menu option in the dropdown

I think you got my problem , i am expecting your reply.

hi rakesh,
i’m sorry not to have got back to you sooner. I gather from the chat with arjun that you have achieved what you wanted to do now? or is there still some part of this that is unresolved ?

@ruth I have already completed all the issues that Arjun faces. And I have resolved my problem with creating a custom nav menu. But I have one issue. What do you suggest I do when I create one user so that data stores in which table, and at the time of login, the required data for login retrieves from which table?

@ruth I found there are two tables used to store the user information. One is user_secure, which stores the username and password, and this is required for the login, and the next table is user_table, which stores all the necessary information, including the username.

Actually, I want to create a new user registration page, so I insert the username and password into the users_secure table and store all the necessary information in the table. At the time of login, I am facing an error with an invalid username and password.

Please give me the solutions.

hi @rakesh, sorry i was totally tied up with some other work, i’ll try to look at this tomorrow morning (uk time)

@ruth No issue; please look at this in your free time and suggest solutions. But its very important for this.

i wonder if it is to do with the encryption - as you can see passwords are not held in plain text.

is there any more information you can give me? how did you insert the new credentials in the db? did you write your new registration page in php? i’d be happy to have a look at it. Are there any messages in the log file? etc…

Dear @ruth Don’t worry, I have already fixed that issue that I was facing in the past. Thanks for your support and help.

1 Like

brilliant, well done - out of interest (and learning) what was the solution?

i added some links from reports to next to add new pt. Very helpful. If you need help with these do let me know.

1 Like

Dear @Robert_James Its very helpful.

@ruth I have one doubt: I want to manage the code and updates through git. but I am trying many times, but I can’t do that.


  1. I have setup OpenEMR on my laptop, and then I uploaded it to a separate git repository. When I pull the code from that branch and try to run it on another laptop, it’s not working.

  2. If I run pull the code from the branch to my laptop from where I uploaded to git. then its running, but why is it not working on another laptop?

  3. What is that issue.

@ruth @Roshan_Yengul @Robert_James Can you kindly suggest me the solution how I deploy the openemr through git branch, my PC is windows and my server is Linux, so how I deploy and how I modify the changes regularly.

When I copy all the file from the server and paste in my git repo then it showing errors that means login page not showing.

When I setup first time in my laptop and then copy all these files from my laptop and paste ii to server then it showing same error that login page not showing.

Please suggest me the solutions how I deploy it through git.

Now I am doing change individual files that I want to change , but this process is difficult.