Get and display an encounter's data based on its encounter number
The following client script will get an encounter's data based on its encounter number that you supply and display them in a table. (Pls. scroll down)
Select an encounter number from 2004000000 to 2004000002, enter it in the input box and press "Start demo". Note if you enter an invalid value or if the
encounter number does not exist in the remote database, an error message will be displayed.
// Load the library
require('ixr_library.inc.php');
// Create the client and connect to the remote server
$client = new IXR_Client('http://207.44.195.231/~care2x/foundry/modules/hxp/server.php');
// Create the header and supply the username and password
$header['usr'] = 'hxp';
$header['pw'] = 'hxp';
// Set the encounter number
$ENC = $HTTP_GET_VARS['enc'];
// Call the remote procedure
if (!$client->query('Encounter', $header, $ENC)){
// 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>';
while(list($x,$v) = each($response)){
echo "<TR><TD>$x</TD><TD>$v</TD></TR>";
}
echo '</TABLE>';
}
Select an encounter number from 2004000000 to 2004000002, enter it in the input box and press "Start demo". Note if you enter an invalid value or if the
encounter number does not exist in the remote database, an error message will be displayed.
|