Need help for Net_HL7
| From: | Marciano Hardjowikromo | Date: | Thu, 26 Jan 2006 18:05:27 +0000 |
| Subject: | Need help for Net_HL7 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-22695@lists.php.net to get a copy of this message | ||
Hi there,
I am using Net_HL7 package wich can be found at
http://pear.php.net/package/Net_HL7/. I have
download and copied this
package into my webfolder. I created a file connection.php in the same
webfolder.
Wich look as the folowing:
<?php
require_once "Net/HL7/Segments/MSH.php";
require_once "Net/HL7/Message.php";
require_once "Net/HL7/Connection.php";
require_once "test_base.php";
$msg = new Net_HL7_Message();
$msg->addSegment(new Net_HL7_Segments_MSH());
$seg1 = new Net_HL7_Segment("PID");
$seg1->setField(3, "XXX");
$msg->addSegment($seg1);
$conn = new Net_HL7_Connection("145.39.158.56", 10006);
ok($conn, "Trying to connect");
$conn || exit -1;
ok($conn, "Sending message\n" . $msg->toString(1));
$resp = $conn->send($msg);
$resp || exit -1;
$msh = $resp->getSegmentByIndex(0);
ok($msh->getField(9) == "ACK", "Checking ACK field");
$conn->close();
?>
As i am trying to run the this file in my webrowser i get a time out. Well
its more like its connecting and i don't get any responds. I use mozilla
firefox as webbrowser.
I have tested the connection and it works.
What i am actually need to make is a simple form where you fill in a patient
id. Then sends it to the server via the HL7 protocol wich received back all
this patient information.
I hope you can help me, because i am a novince in php and hl7.
Thank you,
Marciano Hardjowikromo