%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php //error_reporting(E_ALL); define('DB_SERVER', "localhost"); define('DB_USERNAME', "root"); define('DB_PASSWORD', "STech@2019"); define('DB_DATABASE', "sharda_diagnostics_db"); define('COMPANY', "ShardaTech pvt ltd."); /* Connect to MySQL and select the database. */ $conn = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE); if (!$conn) { mysqli_connect_error(); } // Call Service API's $url = 'http://103.101.118.15:2010/api/PatientApp/GetServiceList'; $post = ["HospitalLocationId"=> "1","FacilityId"=>"4","Pincode"=>"0","ServiceId"=>0,"ServiceCategory"=>0,"IsHomeService"=>0,"ServiceType"=>"I"]; $serviceListArray = sdCreatePatient($url, $post); print_r($serviceListArray); die; /*$currentDate = date('Y-m-d H:i:s'); //$myDate = date("Y-m-d", strtotime( date( "Y-m-d", strtotime( date("Y-m-d") ) )."-1 month" )); $myDate = date('Y-m-d', strtotime('-10 days', strtotime($currentDate))); $myDate = $myDate. ' 00:00:00'; //die; //$sql = "select qid,no_time_served,no_time_corrected from `savsoft_qbank` where no_time_corrected>0 order by qid desc limit 3000"; $sql = "select qid,no_time_served,no_time_corrected from `savsoft_qbank` where no_time_corrected>0 AND (mdate>='".$myDate."' AND mdate<='".$currentDate."') order by qid desc limit 1000"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { echo ("total count - " . mysqli_num_rows($result) . "<br/>"); while ($row = mysqli_fetch_assoc($result)) { $qid = $row['qid']; $level = ''; if($row['no_time_served']>0) { $perc=($row['no_time_corrected']/$row['no_time_served'])*100; $tmpperc = intval($perc); $level = ''; if($tmpperc<=29){ $level = 'Complex'; } else if($tmpperc<=59 && $tmpperc>=30){ $level = 'Medium'; } else if($tmpperc>=60){ $level = 'Easy'; } } $sqlUpdate = "UPDATE `savsoft_qbank` SET level='".$level."' WHERE qid = $qid" ; mysqli_query($conn, $sqlUpdate); } echo "<br/> end<br/>"; } else { echo "no record found"; }*/ /* * Function : sdCreatePatient * */ function sdCreatePatient($url='http://103.101.118.15:2010/api/PatientApp/CreatePatient', $post) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); $response = curl_exec($ch); $result = json_decode($response); curl_close($ch); // Close the connection return $result; }