Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 44 additions & 18 deletions .phpdoc-md
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
<?php

use Aranyasen\HL7;
use Aranyasen\HL7\Segments\PV1;
use Aranyasen\HL7\Segments\ORC;
use Aranyasen\HL7\Segments\OBX;
use Aranyasen\HL7\Segments\OBR;
use Aranyasen\HL7\Connection;
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Messages\ACK;
use Aranyasen\HL7\Segment;
use Aranyasen\HL7\Segments\AIG;
use Aranyasen\HL7\Segments\AIL;
use Aranyasen\HL7\Segments\AIP;
use Aranyasen\HL7\Segments\DG1;
use Aranyasen\HL7\Segments\NTE;
use Aranyasen\HL7\Segments\IN3;
use Aranyasen\HL7\Segments\EQU;
use Aranyasen\HL7\Segments\EVN;
use Aranyasen\HL7\Segments\FHS;
use Aranyasen\HL7\Segments\FTS;
use Aranyasen\HL7\Segments\GT1;
use Aranyasen\HL7\Segments\IN1;
use Aranyasen\HL7\Segments\PID;
use Aranyasen\HL7\Segments\IN3;
use Aranyasen\HL7\Segments\MRG;
use Aranyasen\HL7\Segments\MSA;
use Aranyasen\HL7\Segments\MSH;
use Aranyasen\HL7\Segments\EVN;
use Aranyasen\HL7\Segments\EQU;
use Aranyasen\HL7\Segments\NK1;
use Aranyasen\HL7\Segments\NTE;
use Aranyasen\HL7\Segments\OBR;
use Aranyasen\HL7\Segments\OBX;
use Aranyasen\HL7\Segments\ORC;
use Aranyasen\HL7\Segments\PID;
use Aranyasen\HL7\Segments\PV1;
use Aranyasen\HL7\Segments\PV2;
use Aranyasen\HL7\Segments\RGS;
use Aranyasen\HL7\Segments\SAC;
use Aranyasen\HL7\Segment;
use Aranyasen\HL7\Messages\ACK;
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Connection;
use Aranyasen\HL7\Segments\SCH;
use Aranyasen\HL7\Segments\TQ1;

return (object)[
'rootNamespace' => HL7::class,
Expand All @@ -28,18 +41,31 @@ return (object)[
Message::class,
ACK::class,
Segment::class,
MSH::class,
PID::class,
AIG::class,
AIL::class,
AIP::class,
DG1::class,
EQU::class,
EVN::class,
FHS::class,
FTS::class,
GT1::class,
IN1::class,
IN3::class,
MRG::class,
MSA::class,
MSH::class,
NK1::class,
NTE::class,
DG1::class,
OBR::class,
OBX::class,
ORC::class,
PID::class,
PV1::class,
EVN::class,
EQU::class,
PV2::class,
RGS::class,
SAC::class,
SCH::class,
TQ1::class,
],
];
60 changes: 51 additions & 9 deletions docs/Connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ Usage:
```php
$connection = new Connection('127.0.0.1', 5002);
$req = new Message();
// .

.. set some request attributes
// ... set some request attributes
$response = $connection->send($req);
$response->toString(); // Read ACK message from remote
```
Expand Down Expand Up @@ -36,6 +34,7 @@ End of message signal for HL7 server. Defaults to \034\015.
|------|-------------|
|[__construct](#connection__construct)|Creates a connection to a HL7 server, or throws exception when a connection could not be established.|
|[__destruct](#connection__destruct)||
|[getSocket](#connectiongetsocket)||
|[send](#connectionsend)|Sends a Message object over this connection.|


Expand All @@ -46,7 +45,7 @@ End of message signal for HL7 server. Defaults to \034\015.
**Description**

```php
public __construct (string $host, string $port)
public __construct (string $host, int $port, int $timeout)
```

Creates a connection to a HL7 server, or throws exception when a connection could not be established.
Expand All @@ -57,13 +56,22 @@ Creates a connection to a HL7 server, or throws exception when a connection coul

* `(string) $host`
: Host to connect to
* `(string) $port`
* `(int) $port`
: Port to connect to
* `(int) $timeout`
: Connection timeout

**Return Values**

`void`


**Throws Exceptions**


`\HL7ConnectionException`


<hr />


Expand All @@ -72,7 +80,7 @@ Creates a connection to a HL7 server, or throws exception when a connection coul
**Description**

```php
public __destruct (void)
__destruct (void)
```


Expand All @@ -87,6 +95,31 @@ public __destruct (void)

`void`


<hr />


### Connection::getSocket

**Description**

```php
getSocket (void)
```





**Parameters**

`This function has no parameters.`

**Return Values**

`void`


<hr />


Expand All @@ -95,7 +128,7 @@ public __destruct (void)
**Description**

```php
public send (\Message $req, string $responseCharEncoding)
public send (string $responseCharEncoding, bool $noWait)
```

Sends a Message object over this connection.
Expand All @@ -104,14 +137,23 @@ Sends a Message object over this connection.

**Parameters**

* `(\Message) $req`
* `(string) $responseCharEncoding`
: The expected character encoding of the response.
* `(bool) $noWait`
: Do no wait for ACK. Helpful for building load testing tools...

**Return Values**

`\Message`
`void`


**Throws Exceptions**


`\HL7ConnectionException`


`\HL7Exception`


<hr />
Expand Down
Loading