From b26c7ef6bf1797808a83f7b0032f8bee0800c00e Mon Sep 17 00:00:00 2001 From: Julia Longtin Date: Wed, 6 Feb 2013 19:37:12 +0000 Subject: [PATCH] Add docblock to the getPatientData function. --- library/patient.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/patient.inc b/library/patient.inc index 5407b2893..31e75b84c 100644 --- a/library/patient.inc +++ b/library/patient.inc @@ -35,6 +35,16 @@ $policy_types = array( '47' => xl('Other Liability Insurance is Primary'), ); +/** + * Get a patient's demographic data. + * + * @param int $pid The PID of the patient + * @param string $given an optional subsection of the patient's demographic + * data to retrieve. + * @return array 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. + */ function getPatientData($pid, $given = "*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS") { $sql = "select $given from patient_data where pid=? order by date DESC limit 0,1"; return sqlQuery($sql, array($pid) ); -- 2.11.4.GIT