From: Kevin Yeh Date: Wed, 27 Feb 2013 01:22:50 +0000 (-0500) Subject: Syntax change and comment fix for parseAgeInfo calls X-Git-Tag: whats-been-changed~386 X-Git-Url: https://repo.or.cz/w/openemr.git/commitdiff_plain/e4818c9af81d9d5efc9b9e0b55d06a37228126b3 Syntax change and comment fix for parseAgeInfo calls --- diff --git a/library/classes/rulesets/library/RsPatient.php b/library/classes/rulesets/library/RsPatient.php index e838a443a..bfa0b227d 100644 --- a/library/classes/rulesets/library/RsPatient.php +++ b/library/classes/rulesets/library/RsPatient.php @@ -31,6 +31,7 @@ class RsPatient public function calculateAgeOnDate( $date ) { - return parseAgeInfo($this->dob,$date)['age']; + $ageInfo=parseAgeInfo($this->dob,$date); + return $ageInfo['age']; } } diff --git a/library/clinical_rules.php b/library/clinical_rules.php index 9a1a238a0..99fb5050f 100644 --- a/library/clinical_rules.php +++ b/library/clinical_rules.php @@ -2106,7 +2106,8 @@ function convertCompSql($comp) { * @return float years(decimal) from dob to target(date) */ function convertDobtoAgeYearDecimal($dob,$target) { - return parseAgeInfo($dob,$target)['age']; + $ageInfo=parseAgeInfo($dob,$target); + return $ageInfo['age']; } /** @@ -2117,7 +2118,8 @@ function convertDobtoAgeYearDecimal($dob,$target) { * @return float months(decimal) from dob to target(date) */ function convertDobtoAgeMonthDecimal($dob,$target) { - return parseAgeInfo($dob,$target)['age_in_months']; + $ageInfo=parseAgeInfo($dob,$target); + return $ageInfo['age_in_months']; } /** diff --git a/library/patient.inc b/library/patient.inc index 8efe7e1e3..ab38ea02f 100644 --- a/library/patient.inc +++ b/library/patient.inc @@ -1254,8 +1254,10 @@ function getPatientAge($dobYMD, $nowYMD=null) * * @param string $dob date of birth * @param string $target date to calculate age on - * @return float years(decimal) from dob to target(date) - */ + * @return array containing + * age - decimal age in years + * age_in_months - decimal age in months + * ageinYMD - formatted string #y #m #d */ function parseAgeInfo($dob,$target) { // Prepare dob (expected in order Y M D, remove whatever delimiters might be there