modules/ patient_acl. emr. module.php

Summary
Adds an ACL for a patient AXO.
Removes specified patient ACL.
Get ACLs for patient AXO object
Retrieve list of valid ACO object as an associative array, meant to be used in a selection widget.
Retrieve list of valid ARO object as an associative array, meant to be used in a selection widget.
Get ACL objects (ACO, ARO) which pertain to specified ACL
Resolve the AXO id for a particular patient record ID
Get the section ID for an AXO, ARO, ACO, et cetera

Functions

add_acl

function add_acl ($pid,  
$aco,  
$aro,  
$obj = NULL)

Adds an ACL for a patient AXO.  Currently is not “smart” in that it does not search for existing ACLs with the same objects to add users to, but rather adds another ACL to the list.  Probably needs to be fixed in the long run?

Parameters

$pidPatient record id
$acoArray of ACO object ids (add, view, modify, etc)
$aroArray of ARO object ids (user_1, user_2, etc)
$obj(optional) ACL object

Returns

Boolean, success

delete_acl

function delete_acl ($pid,
$acl_id)

Removes specified patient ACL.  Checks to see whether the ACL belongs to the patient before removing.

Parameters

$pidPatient record id
$acl_idACL record id

Returns

Boolean, success.

get_acl_for_patient

function get_acl_for_patient ($pid)

Get ACLs for patient AXO object

Parameters

$pidPatient record id

Returns

Array of ACL ids, or empty array if none are found.

get_aco

function get_aco ( )

Retrieve list of valid ACO object as an associative array, meant to be used in a selection widget.

Returns

Associative array with keys representing the names of the ACOs in question and the values containing their IDs.

get_aro

function get_aro ( )

Retrieve list of valid ARO object as an associative array, meant to be used in a selection widget.

Returns

Associative array with keys representing the names of the AROs in question and the values containing their IDs.

get_object_for_acl

function get_object_for_acl ($acl_id,
$type)

Get ACL objects (ACO, ARO) which pertain to specified ACL

Parameters

$acl_idRecord ID of the ACL in question
$typeaco or aro

get_axo_for_patient

function get_axo_for_patient ($pid)

Resolve the AXO id for a particular patient record ID

Parameters

$pidPatient record ID

Returns

ACL AXO record id

get_object_section

function get_object_section ($type,
$value)

Get the section ID for an AXO, ARO, ACO, et cetera

Parameters

$typeaxo, aro, aco
$valueSection value in question

Returns

ACL id for section

function add_acl ($pid,  
$aco,  
$aro,  
$obj = NULL)
Adds an ACL for a patient AXO.
function delete_acl ($pid,
$acl_id)
Removes specified patient ACL.
function get_acl_for_patient ($pid)
Get ACLs for patient AXO object
function get_aco ( )
Retrieve list of valid ACO object as an associative array, meant to be used in a selection widget.
function get_aro ( )
Retrieve list of valid ARO object as an associative array, meant to be used in a selection widget.
function get_object_for_acl ($acl_id,
$type)
Get ACL objects (ACO, ARO) which pertain to specified ACL
function get_axo_for_patient ($pid)
Resolve the AXO id for a particular patient record ID
function get_object_section ($type,
$value)
Get the section ID for an AXO, ARO, ACO, et cetera