-
Notifications
You must be signed in to change notification settings - Fork 0
/
diagnosis_response.php
36 lines (36 loc) · 1.16 KB
/
diagnosis_response.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require_once("c_transactions.php");
$db = new db_transactions();
$sql = "SELECT
r.d_study_id AS Study_ID,
i.diagnosis_id AS DiagID,
i.i_hei_id AS HEI_ID,
i.feeding_6wks AS Feeding_method_6_Weeks,
i.feeding_10wks AS Feeding_method_10_Weeks,
i.feeding_14wks AS Feeding_method_14_Weeeks,
i.feeding_9mths AS Feeding_method_9_Months,
i.feeding_12mths AS Feeding_method_12_Months,
i.feeding_15mths AS Feeding_method_15_Months,
i.feeding_18mths AS Feeding_method_18_Months,
i.first_results AS 1st_DNA_PCR,
i.second_results AS Repeat_PCR,
i.2nd_pcr_results AS 2nd_PCR_at_6_mon,
i.3nd_pcr_results AS 3rd_PCR_at_12_mon,
i.forth_results AS Confirmatory_PCR,
i.third_results AS 1st_Antibody_Test,
i.fifth_results AS Repeat_Confirmatory_PCR,
i.sixth_results AS Final_Antibody_Test,
i.hei_outcome AS HEI_Outcome,
i.next_appointment AS Next_Visit_Date
FROM infant_registration AS r
JOIN infant_diagnosis AS i
ON i.i_hei_id = r.hei_id
WHERE i.voided = 0";
$data = $db->getAssoArray($sql);
$results = array(
"sEcho" => 1,
"iTotalRecords" => count($data),
"iTotalDisplayRecords" => count($data),
"aaData"=>$data);
echo json_encode($results);
?>