Example #1
0
//echo $query;
$result = mysql_query($query);
if (mysql_num_rows($result) == 0) {
    echo _("The data has yet to be entered by the lactation consultant.") . "<br />";
} else {
    while ($row = mysql_fetch_array($result)) {
        echo _("If any of this information is incorrect") . ", <a href=\"mailto:LACTOR <" . WEB_SUPPORT_EMAIL . ">?subject=Change Infant Information for " . $_SESSION['mid'] . "\">" . _("please contact the lactation consultant") . ".</a><br />";
        echo "<br />";
        echo "<table border='0'><tbody>";
        echo "<tr><td>" . _("Infant initials") . ":</td><td>" . $row['InfantInitials'] . "</td></tr>";
        echo "<tr><td>" . _("Gestational age") . ":</td><td>" . getVocab('gestate', $row['GestationalAge']) . "</td></tr>";
        echo "<tr><td>" . _("Appropiateness for gestational age") . ":</td><td>" . getVocab('GestationalAge', $row['AppropAge']) . "</td></tr>";
        echo "<br />";
        echo "<tr><td>" . _("Date of birth") . ":</td><td>" . modDate2($row['DOB']) . "</td></tr>";
        echo "<tr><td>" . _("Infant weight at birth") . ":</td><td>" . getWeight($row['BirthWeight']) . "</td></tr>";
        echo "<tr><td>" . _("Date of discharge") . ":</td><td>" . modDate2($row['DOD']) . "</td></tr>";
        echo "<tr><td>" . _("Weight at discharge") . ":</td><td>" . getWeight($row['DischargeWeight']) . "</td></tr>";
        echo "<br />";
        echo "<tr><td>" . _("Type of first feeding") . ":</td><td>" . getVocab('TypeFirstDischarge', $row['TypeFirstBreast']) . "</td></tr>";
        echo "<tr><td>" . _("Infant's age at first feeding session") . ":</td><td>" . getVocab('AgeFirstFeed', $row['TypeFirstBreast']) . "</td></tr>";
        echo "<tr><td>" . _("Time of starting breast milk expression") . ":</td><td>" . getVocab('TimeStartBreast', $row['AgeFirstFeed']) . "</td></tr>";
        echo "<tr><td>" . _("Frequency of breast milk expression") . ":</td><td>" . getVocab('FreqBreastExpr', $row['FreqBreastExpr']) . "</td></tr>";
        echo "<br />";
        echo "<tr><td>" . _("First primary care provider visit") . ":</td><td>" . getVocab('FirstPrimCare', $row['FirstPrimCare']) . "</td></tr>";
        echo "<tr><td>" . _("Need for extra primary care provider") . ":</td><td>" . getVocab('NeedExtraCare', $row['NeedExtraCare']) . "</td></tr>";
        echo "<tr><td>" . _("Times of extra primary care on first month") . ":</td><td>" . getVocab('TimesExtraCare', $row['TimesExtraCare']) . "</td></tr>";
        echo "<tr><td>" . _("Hospitalization during the first month") . ":</td><td>" . getVocab('HospFirstMonth', $row['HospFirstMonth']) . "</td></tr>";
        echo "</tbody></table>";
    }
}
?>
Example #2
0
echo "<table border='0'><tbody>";
echo "<tr><td>" . _("Infant initials") . ":</td><td><input class='standardtextform' type='text' name='InfantInitials' value='" . $row['InfantInitials'] . "'></td></tr>";
echo "<tr><td>" . _("Gestational age") . ":</td><td><select name='GestationalAge' class='standardselect'>";
echo selectControlledVocabulary("gestate", $row['GestationalAge']);
echo "</select></td></tr>";
echo "<tr><td>" . _("Appropiateness for gestational age") . ":</td><td><select name='AppropAge' class='standardselect'>";
echo selectControlledVocabulary("GestationalAge", $row['AppropAge']);
echo "</select></td></tr>";
echo "<br />";
if (isset($row['DOB']) && $row['DOB'] != "0000-00-00 00:00:00") {
    $d1 = modDate2($row['DOB']);
} else {
    $d1 = "";
}
if (isset($row['DOD']) && $row['DOD'] != "0000-00-00 00:00:00") {
    $d2 = modDate2($row['DOD']);
} else {
    $d2 = "";
}
echo "<tr><td>" . _("Date of birth") . ":</td><td><input class='datepicker' type='text' value='" . $d1 . "' name='dateBirth' /></td></tr>";
echo "<tr><td>" . _("Infant weight at birth") . ":</td><td><select name='BirthWeightPounds'>";
echo selectControlledVocabulary('pounds', getWeight($row['BirthWeight'], 0));
echo "</select> <select name='BirthWeightOunces'>";
echo selectControlledVocabulary('ounces', getWeight($row['BirthWeight'], 1));
echo "</select></td></tr>";
echo "<tr><td>" . _("Date of discharge") . ":</td><td><input class='datepicker' type='text' value='" . $d2 . "' name='dateDischarge' /></td></tr>";
echo "<tr><td>" . _("Weight at discharge") . ":</td><td><select name='DischargeWeightPounds'>";
echo selectControlledVocabulary('pounds', getWeight($row['DischargeWeight'], 0));
echo "</select> <select name='DischargeWeightOunces'>";
echo selectControlledVocabulary('ounces', getWeight($row['DischargeWeight'], 1));
echo "</select></td></tr>";
    if (!$result) {
        error_log(mysql_error());
    }
    $row = mysql_fetch_assoc($result);
    header('Content-type: application/csv');
    header("Content-disposition: attachment; filename=" . str_replace(" ", "_", $row['Name']) . "_Child_Info.csv");
    //  header('Content-type: text/plain');
    echo '"Mother\'s Name","Infant\'s Initials","Gestational Age","Appropriateness of gestational age",' . '"Date of Birth","Weight at birth","Date of Discharge","Type of first feeding",' . '"Age at first feeding session","Time of starting breast milk expression",' . '"Frequency of breast milk expression","First primary care provider visit",' . '"Need for extra primary care provider","Times of extra pimary care on the first month",' . '"Hopitalization during the first month"' . "\n";
    do {
        echo '"' . $row['Name'] . "\",";
        echo '"' . $row['InfantInitials'] . "\",";
        echo '"' . $_SESSION['vocab']['gestate'][$row['GestationalAge']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['GestationalAge'][$row['AppropAge']]['TextValue'] . "\",";
        echo '"' . modDate2($row['DOB']) . "\",";
        echo '"' . formatWeight($row['BirthWeight']) . "\",";
        echo '"' . modDate2($row['DOD']) . "\",";
        echo '"' . formatWeight($row['DischargeWeight']) . "\",";
        echo '"' . $_SESSION['vocab']['sup-type'][$row['TypeFirstBreast']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['AgeFirstFeed'][$row['AgeFirstFeed']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['TimeStartBreast'][$row['TimeStartBreast']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['FreqBreastExpr'][$row['FreqBreastExpr']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['FirstPrimCare'][$row['FirstPrimCare']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['NeedExtraCare'][$row['NeedExtraCare']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['TimesExtraCare'][$row['TimesExtraCare']]['TextValue'] . "\",";
        echo '"' . $_SESSION['vocab']['HospFirstMonth'][$row['HospFirstMonth']]['TextValue'] . "\"\n";
    } while ($row = mysql_fetch_assoc($result));
    exit;
}
function action_text($action)
{
    switch ($action) {
Example #4
0
if (isset($_SESSION['opt6'])) {
    unset($_SESSION['opt6']);
}
?>

<?php 
$query = "SELECT * FROM Notifications, NotificationDescription, Mothers \n\t\t\t\t\t\tLEFT JOIN MotherInfo ON (Mothers.mid = MotherInfo.mid)\n\t          WHERE \n\t\t\t\t\t\t  Notifications.ntype = NotificationDescription.ntype AND \n\t\t\t\t\t\t\tMothers.mid = Notifications.mid AND status != 8 AND {$where} \n\t\t\t\t\t\tORDER BY \n\t\t\t\t\t\t\tNotifications.mid ASC, astatus ASC, NotificationIssued DESC, status ASC;";
$result = mysql_query($query);
echo "<div id='container'>";
echo "<div class='tabs'>";
echo "<ul class='menu'>";
echo "<li id='breastfeeding' class='active'><a href='#results'>Results</a></li>";
echo "</ul>";
echo "<div id='results'>";
if (mysql_num_rows($result) == 0) {
    echo "<br /><h3>" . _("No notifications entries for date range") . ": " . modDate2($_SESSION['dateFrom']) . " " . _("to") . " " . modDate2($_SESSION['dateTo']) . " " . _("for the selected users") . "</h3>";
} else {
    echo "<h1><img src='image/notification.gif' alt=''/> " . _("Notifications") . "</h1>";
    echo "<ul>";
    echo "<table id='breast'>";
    echo "<thead>";
    echo "<tr>";
    echo "<td>Name</td>";
    echo "<td>Email</td>";
    echo "<td>Issue Date</td>";
    echo "<td>Problem</td>";
    echo "<td>Read by User</td>";
    echo "<td>Read by Admin</td>";
    echo "<td>Mark As Read</td>";
    echo "</tr>";
    echo "</thead>";
Example #5
0
        echo "<ul>";
    }
    echo "</div>";
    echo "</div>";
}
if (@$_POST['option5'] == "MorbidityEntry") {
    $query = "SELECT * FROM \n\t\t\t\t\t\tDiary, MorbidityEntry, Mothers \n\t\t\t\t\t\tLEFT JOIN MotherInfo ON (Mothers.mid=MotherInfo.mid) \n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\tEntryType = 4 AND \n\t\t\t\t\t\tDiary.mid = Mothers.mid AND \n\t\t\t\t\t\tDiary.EntryId = MorbidityEntry.EntryId AND {$where}";
    $result = mysql_query($query);
    echo "<div id=\"container\">";
    echo "<ul class=\"menu\">";
    echo "<li id=\"breastfeeding\" class=\"active\">Health Issues</li>";
    echo "</ul>";
    echo "<span class=\"clear\"></span>";
    echo "<div class=\"content breastfeeding\">";
    if (mysql_num_rows($result) == 0) {
        echo "<br /><h3>No health issues entries for date range: " . modDate2($_SESSION['dateFrom']) . " to " . modDate2($_SESSION['dateTo']) . " for the selected users</h3>";
    } else {
        echo "<h1><img src=\"../image/morbidity.gif\" alt=\"\"/> Health Issues Entries</h1>";
        echo "<ul>";
        echo "<table id=\"breast\">";
        echo "<thead>";
        echo "<tr>";
        echo "<td>" . _("Name") . "</td>";
        echo "<td>" . _("Email") . "</td>";
        echo "<td>" . _("Date &amp; Time") . "</td>";
        echo "<td>" . _("Type") . "</td>";
        echo "</tr>";
        echo "</thead>";
        echo "<tbody>";
        $m = 0;
        $c = 0;
Example #6
0
    echo "</table>";
}
?>
<ul>
</div>
<div id="health" class="content morbidity">
<h1><img src="image/morbidity.gif" width=48 height=48 alt=""/> <?php 
echo _("Health Issue Diaries");
?>
</h1>
<ul>
<?php 
$query = "SELECT * FROM Diary, MorbidityEntry WHERE EntryDate BETWEEN '" . $_SESSION['dateFrom'] . " 00:00:00' AND '" . $_SESSION['dateTo'] . " 23:59:59' AND EntryType = 4 AND Diary.EntryId = MorbidityEntry.EntryId AND mid = " . $_SESSION['mid'] . " ORDER BY EntryDate DESC, InputDate DESC";
$result = mysql_query($query);
if (mysql_num_rows($result) == 0) {
    echo "<h3>" . _("No health issue entries for date range") . ": " . modDate2($_SESSION['dateFrom']) . " to " . modDate2($_SESSION['dateTo']) . "</h3>";
} else {
    echo "<table id='morb' class='diary' border='1' cellpadding='3' cellspacing='0'>";
    echo "<thead>";
    echo "<tr>";
    echo "<th>" . _("Date &amp; Time") . "</th>";
    echo "<th>" . _("Type") . "</th>";
    echo "<th>" . _("Modify") . "</th>";
    echo "</tr>";
    echo "</thead>";
    echo "<tbody>";
    while ($row = mysql_fetch_array($result)) {
        if (passed($row['EntryDate']) == 1) {
            $c = 'old';
            $m = "-";
        } else {