Difference between revisions of "The Notes API"

From OpenEMR Project Wiki
(start documenting ACL checks required.)
Line 6: Line 6:
Thos loads up all of the functions for dealing with notes.
Thos loads up all of the functions for dealing with notes.


Once that is done, it is important to use the appropriate ACL checks to ensure that users who are viewing/updating/deleting notes are authorized to do so.
Once that is done, it is important to use the appropriate ACL checks to ensure that users who are viewing/updating/deleting notes are authorized to do so. the 'patients/notes' ACO should be checked in the following situations:
{| class="wikitable" border="1" cellpadding="1"
|-
! Permission
! Operation
|-
| (empty string)
| Should be checked any time note contents are going to be displayed
|}


Once pnotes.inc is included, the following functions are available:
Once pnotes.inc is included, the following functions are available:

Revision as of 09:36, 6 December 2012

Using the Notes API

The Notes API is available in OpenEMR by including the following line in your code:

require_once("$srcdir/pnotes.inc");

Thos loads up all of the functions for dealing with notes.

Once that is done, it is important to use the appropriate ACL checks to ensure that users who are viewing/updating/deleting notes are authorized to do so. the 'patients/notes' ACO should be checked in the following situations:

Permission Operation
(empty string) Should be checked any time note contents are going to be displayed

Once pnotes.inc is included, the following functions are available:

addPnote

deletePnote

getPnoteById

getPnotesByUser

updatePnote

updatePnoteMessageStatus

Dependencies

The Notes API uses the database table 'pnotes' to store its data.