Difference between revisions of "The OpenEMR API"
(document acl_check.) |
(add patient.inc.) |
||
Line 22: | Line 22: | ||
| A category/subcategory describing a specific ACO, and optionally, a username to check, and type or types of access being requested | | A category/subcategory describing a specific ACO, and optionally, a username to check, and type or types of access being requested | ||
| TRUE or FALSE if a single type of access is being checked, or an array of TRUE/FALSE values coresponding to the types of access requested | | TRUE or FALSE if a single type of access is being checked, or an array of TRUE/FALSE values coresponding to the types of access requested | ||
|} | |||
== patient.inc == | |||
The preferred method of including patient.inc from your form is to use require_once. for instance: '''require_once($GLOBALS['srcdir'].'/patient.inc');'''. | |||
The following functions are common to use everywhere in OpenEMR: | |||
{| class="wikitable" border="1" cellpadding="1" | |||
|- | |||
! Function | |||
! Use | |||
! Accepts | |||
! Returns | |||
|- | |||
| getPatientData | |||
| Get a patient's demographic data. | |||
| A patient ID, and optionally a subsection of the patient's demographic data to retrieve. | |||
| The requested subsection of a patient's demographic data. If no subsection was given, returns everything, with the date of birth as the last field. | |||
|} | |} | ||
Revision as of 10:16, 6 December 2012
Overview
The OpenEMR API is divided into many modules, few of which have been documented.
There is presently a documentation project underway. please see OpenEMR API for an overview.
Core API
api.inc
The preferred method of including api.inc from your form is to use require_once. for instance: require_once($GLOBALS['srcdir'].'/api.inc');.
The following functions are common to use everywhere in OpenEMR:
Function | Use | Accepts | Returns |
---|---|---|---|
acl_check | Check if a user has a given type or types of access to an access control object | A category/subcategory describing a specific ACO, and optionally, a username to check, and type or types of access being requested | TRUE or FALSE if a single type of access is being checked, or an array of TRUE/FALSE values coresponding to the types of access requested |
patient.inc
The preferred method of including patient.inc from your form is to use require_once. for instance: require_once($GLOBALS['srcdir'].'/patient.inc');.
The following functions are common to use everywhere in OpenEMR:
Function | Use | Accepts | Returns |
---|---|---|---|
getPatientData | Get a patient's demographic data. | A patient ID, and optionally a subsection of the patient's demographic data to retrieve. | The requested subsection of a patient's demographic data. If no subsection was given, returns everything, with the date of birth as the last field. |
Forms API
The Forms API includes all of the functions required to create both per-encounter and non-encounter forms in the OpenEMR system. see The Forms API for more information.
Notes API
The Notes API manages non-medical notes, attached to a client's medical record. see The Notes API for more information.