2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

added 'predefined outcomes' filter

This commit is contained in:
Alex
2015-09-09 11:58:43 +03:00
parent 33630a432b
commit 5c3bc40f69
2 changed files with 13 additions and 4 deletions

View File

@@ -101,7 +101,9 @@ function display_outcomes($contacted,$ca,$case_id)
AND call_attempt_id = '$ca'";
$rs = $db->GetAll($sql);
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q LEFT JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = $case_id");
if (!empty($rs))
{
//we have an appointment made ... only select appointment ID's
@@ -123,6 +125,7 @@ function display_outcomes($contacted,$ca,$case_id)
$sql = "SELECT outcome_id,description,contacted
FROM outcome
WHERE contacted = '$contacted'
AND outcome_id IN ('$outcomes')
AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)";
}
}
@@ -133,6 +136,7 @@ function display_outcomes($contacted,$ca,$case_id)
$sql = "SELECT outcome_id,description,contacted
FROM outcome
WHERE contacted = '$contacted'
AND outcome_id IN ('$outcomes')
AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)";
}
}