|
|
Daftar semua pasien keluar yang tersedia didatabase
Skrip klien berikut akan meminta server remote untuk mengembalikan sebuah daftar dari seluruh pasien keluar. Skrip akan menampilkan daftar hasil ke sebuah tabel. (Pls. scroll down)
// Load the library
require('ixr_library.inc.php');
// Create the client and connect to the remote server
$client = new IXR_Client('http://www.care2x.net/foundry/modules/hxp/server.php');
// Create the header and supply the username and password
$header['usr'] = 'hxp';
$header['pw'] = 'hxp';
// Call the remote procedure
if (!$client->query('Encounter.Outpatient.List', $header)){
// If error, show info
echo ('An error occured - '.$client->getErrorCode().' : '.$client->getErrorMessage();
}else{
// Get the result
$response = $client->getResponse();
// Display the result
echo '<TABLE BORDER=0>';
echo "<TR>
<TD> Encounter nr </TD>
<TD> Admission type </TD>
<TD> PID </TD>
<TD> Family name </TD>
<TD> First name </TD>
<TD> Date of birth </TD>
<TD> Zip code </TD>
<TD> Sex </TD>
<TD> Blood group </TD>
</TR>";
while(list($x,$v) = each($response)){
echo "<TR>";
while(list($y, $z) = each($v)){
echo '<TD>'.$v.'</TD>';
}
echo "</TR>";
}
echo '</TABLE>';
}
|