Example #1
0
<?php

include "../includes/db_lib.php";
$dhims2 = new DHIMS2();
echo $dhims2->deleteItems($_REQUEST['l'], $_REQUEST['items']);
Example #2
0
<?php

include "../includes/db_lib.php";
$dhims2 = new DHIMS2();
$lab_config_id = $_REQUEST['l'];
echo json_encode($dhims2->getConfigs($lab_config_id));
file_put_contents("test_file.txt", json_encode($dhims2->getConfigs($lab_config_id)));
Example #3
0
<?php

ini_set('max_execution_time', 600);
ini_set('memory_limit', '300M');
include_once "../includes/db_lib.php";
include_once "../includes/dhims2.php";
$dhims2_test_counts = json_decode(stripslashes($_REQUEST['dhims2_test_counts']), true);
$dhims2 = new DHIMS2();
$sending_configs = $dhims2->getSendingConfigs($_REQUEST['lab_config_id']);
$scount = 0;
$jsonsending_start = '{ "dataValues": [';
$jsonsending_end = '] }';
$xmlsending_start = '<dataValueSet xmlns="http://dhis2.org/schema/dxf/2.0">' . "\n";
$xmlsending_end = "\n" . '</dataValueSet>';
$sending_values = "";
///we can either send as xml or json.
////but my default is json
//$mode = 'xml';
$mode = 'json';
if (!is_array($sending_configs)) {
    echo "no";
    exit;
}
if (is_array($dhims2_test_counts)) {
    $icount = count($dhims2_test_counts);
    $scount = count($sending_configs);
    for ($i = 0; $i < $scount; $i++) {
        if ($mode == 'json') {
            if (empty($sending_values)) {
                $sending_values = prepareJSONValues($sending_configs[$i]);
            } else {
Example #4
0
<?php

//file_put_contents("dhims2.txt",$_REQUEST['blis2dataelement_text']);
include "../includes/db_lib.php";
$dhims2 = new DHIMS2();
$dhims2->blisGender = $_REQUEST['blisgender'];
$dhims2->blisAgegroup = $_REQUEST['bliscat'];
$dhims2->blisTestID = $_REQUEST['blis2dataelement_text'];
//dhims2 values
$dhims2->username = $_REQUEST['dhims2username'];
$dhims2->password = $_REQUEST['dhims2password'];
$dhims2->entryPeriod = $_REQUEST['entryperiod'];
$dhims2->orgUnit = $_REQUEST['dhims2orgunit'] . '^' . $_REQUEST['dhims2orgunit_text'];
$dhims2->dataSet = $_REQUEST['dhims2dataset'] . '^' . $_REQUEST['dhims2dataset_text'];
$dhims2->dataElement = $_REQUEST['dhims2dataelement'] . '^' . $_REQUEST['dhims2dataelement_text'];
$dhims2->categoryCombo = $_REQUEST['dhims2catCombo'] . '^' . $_REQUEST['dhims2catCombo_text'];
$lab_config_id = $_REQUEST['lid'];
$dhims2->Save($lab_config_id);
Example #5
0
<?php

include "../includes/db_lib.php";
$dhims2 = new DHIMS2();
echo json_encode($dhims2->getConfigs('blis_1007'));