How to use OpenEMR api

How can we use Open EMR Api.

1 Like

Hi prateek,

Are you looking for OpenEMR API mentioned in the following link?
http://www.open-emr.org/wiki/index.php?title=OpenEMR_API
This API feature is still in early phase to auto-document the OpenEMR codebase.
OpenEMR is also looking to come up with FHIR(RESTful API) enabled OpenEMR.

Know more about FHIR,follow the below links :
http://hl7.org/fhir/modules.html

Thanks,
ViSolve

1 Like

Prateek,

As Visolve has noted, a formal API is not available at this time. However, integrating your app with the system is quite possible.

Can you expand on your use case so I can give you some areas of the codebase to look into?

Thanks,
Matthew

Hi Matthew
Please let me know how i create login api and get patient list in openemr using api.

Thanks,
Prateek

1 Like

HI Prateek,

You’ll have to add custom PHP code yourself, but you may find the following useful for inspiration: GitHub - oemr501c3/openemr-api: Prototype API for OpenEMR - Contributed by Med Master Mobile. LLC to OEMR

Note that the code is outdated, but it should point you to the general locations.

Thanks,
Matthew

Hi Matthew,

Thanks for reply currently i am using Medmasterpro-API. According to my finding these api work on old db structure.

I have to change in api according to new db structure but i don’t know flow current working database structure.

Thanks
Prateek

Hi Prateek,

You will find the Medmaster pro API to be a great inspiration and starting point. You are correct that it is not using the latest DB, but it will point you to the general tables.

As far as patient list goes, were you able to pull back the information or do you need assistance?

Thanks,
Matthew

Hi @prateek ,

I think the biggest hurdle to deal with is to bring it in line with the relatively new authentication code (this was done to make OpenEMR much more secure). As I recall, the API authentication was based on the older OpenEMR mechanism. Can see what this entailed here (the changes to support this would likely be straightforward):
http://www.open-emr.org/wiki/index.php/Codebase_Security#Optimize_password_security

-brady

1 Like