Blood Pressure Chart (PHP Script)


Home / Blood Pressure Chart (PHP Script)

enter image description here

Source: Google Images

Hi Guys! This is a 1 of the four (4) simple php scripts for identifying the pediatric vital signs. Below is the code for Blood pressure chart. Watch out for other vital sign scripts that i will post next. Okay, enough of the chit chat blah blah blah. Below is the php code

function blood_pressure_chart($age,$rate) {

    $rate = explode("/",$rate);

    $systolic = $rate[0]; // upper number
    $diastolic = $rate[1]; // lower number


    // School Age
    if($age>=6 && $age<=9) {

        if(($systolic>=97 && $systolic<=115) && (($diastolic>=57 && $diastolic<=76))) {
            return ''Normal'';
        }
        else {
            return ''Abnormal'';
        }
    }

    // Pre-Adolescent
    else if($age>=10 && $age<=11) {

        if(($systolic>=102 && $systolic<=120) && (($diastolic>=61 && $diastolic<=80))) {
            return ''Normal'';
        }
        else {
            return ''Abnormal'';
        }
    }


    // Adolescent
    else if($age>=12 && $age<=15) {

        if(($systolic>=110 && $systolic<=131) && (($diastolic>=64 && $diastolic<=83))) {
            return ''Normal'';
        }
        else {
            return ''Abnormal'';
        }
    }   

}

Basic Usage:

echo blood_pressure_chart(12,''120/80''); // Output: Normal

Please refer to this link http://www.pedscases.com/pediatric-vital-signs-reference-chart for the blood pressure rate