Embedding a new app in OpenEMR

Hi Everyone,

I am looking for some guidance regarding embedding a third-party application inside OpenEMR. Is it possible to do so? If yes, could someone please share the steps or provide some resources on how to achieve this?

Specifically, I am interested in embedding the app as a hyperlink or button within the OpenEMR interface, similar to how other tools or external apps are integrated.

Any insights or suggestions would be greatly appreciated!

Thanks in advance!

Well it depends on the 3rd party application and the level of control you have over that 3rd party application.

But you can simply do this by using an iFrame within OpenEMR to achieve this purpose.

<?php
$app_url = "https://app.example.com"; // The URL of the app to embed
echo '<iframe src="' . $app_url . '" width="100%" height="600px" frameborder="0"></iframe>';
?>

There maybe authorization requirements on the 3rd party application side of things or the 3rd party may expose specific api’s that may make all this possible.

You can edit the menu by adding an element
openemr\site\openemr\interface\main\tabs\menu\menus\standard.json
to make it look something like this:

{
"label": "A.P.P.",
"menu_id": "app0",
"target": "app",
"url": "/app_folder/app.php",
"children": [],
"requirement": 0
},

Place all the files of your application in app_folder.
Then log out and log in to openemr and it will appear in the menu
The application opens in a new tab

1 Like

Hello Kofi, Thanks for reply, here in this case 3rd party application will be my application i will have full control over it, in this approach I have to think about authorization , how i can authorization a user against openEMR in my application

Hello Luis Thanks for suggestion I will try this approach

1 Like

Here is an explanation of the items:
https://www.open-emr.org/wiki/index.php/Role_Based_Menus#Custom_Menu_Development_Explanation

The link provided below does exactly what you’re looking for. It authenticates the user and then returns a url. the url is what is referenced in the iframe on line 224

1 Like