English

Daftar pertemuan personal yang tersedia didatabase

Skrip klien berikut akan meminta server remote untuk mengembalikan sebuah daftar seluruh pertemuan seseorang. Skrip akan menampilkan daftar yang dihasilkan kedalam sebuah tabel.

Pilih nomor PID dari 10000000 sampai 10000004, masukkan didalam kotak masukan dan tekan "Mulai Demo". Catatan jika anda memasukkan nilai yang salah atau PID atau pertemuan tidak ada didatabase remote, sebuah pesan error akan ditampilkan.

 
// 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';

// Set the PID
$PID = $HTTP_GET_VARS['pid'];

// Call the remote procedure
if (!$client->query('Person.Encounter', $header, $PID)){
	
	// 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> Date/Time </TD>
	<TD> Admission type </TD>
	<TD> Discharged </TD>
	<TD> Discharge date </TD>
	</TR>";
	
	while(list($x,$v) = each($response)){
		echo "<TR>";
		while(list($y, $z) = each($v)){
			echo '<TD>'.$v.'</TD>';
		}
		echo "</TR>";
	}


	echo '</TABLE>';
}
Pilih nomor PID dari 10000000 sampai 10000004, masukkan didalam kotak input dan tekan "Mulai Demo". Catatan:jika anda memasukkan nilai yang salah atau jika PID atau pertemuan tidak ada di database remote, Sebuah pesan error akan ditampilkan.


©2004 HXP All rights reserved