-**Important: Minimum supported PHP version has been updated to 8.0
-Last supported versions:
--> PHP 7.0 or 7.1 => [1.5.4](https://github.com/senaranya/HL7/tree/1.5.4)
+**Important: "new Message()" is deprecated and could be removed in a future release. Use HL7 factory class instead. See documents below
+Final releases for old PHP versions:
+-> PHP 7.0/7.1 => [1.5.4](https://github.com/senaranya/HL7/tree/1.5.4)
-> PHP 7.2 => [2.0.2](https://github.com/senaranya/HL7/tree/2.0.2)
-> PHP 7.4 => [2.1.7](https://github.com/senaranya/HL7/tree/2.1.7)**
diff --git a/composer.json b/composer.json
index d3719f1..124f52c 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
"minimum-stability": "dev",
"prefer-stable" : true,
"require": {
- "php": "^8.0",
+ "php": ">=8.1",
"ext-mbstring": "*"
},
"require-dev": {
diff --git a/composer.lock b/composer.lock
index e699f73..4f823bf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f9c9a0d54e257d7c98737159be4c92da",
+ "content-hash": "6768c81cd699818d36dc34b748503c34",
"packages": [],
"packages-dev": [
{
@@ -54,30 +54,30 @@
},
{
"name": "doctrine/instantiator",
- "version": "1.4.1",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
- "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
+ "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
"shasum": ""
},
"require": {
- "php": "^7.1 || ^8.0"
+ "php": "^8.1"
},
"require-dev": {
- "doctrine/coding-standard": "^9",
+ "doctrine/coding-standard": "^11",
"ext-pdo": "*",
"ext-phar": "*",
- "phpbench/phpbench": "^0.16 || ^1",
- "phpstan/phpstan": "^1.4",
- "phpstan/phpstan-phpunit": "^1",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "vimeo/psalm": "^4.22"
+ "phpbench/phpbench": "^1.2",
+ "phpstan/phpstan": "^1.9.4",
+ "phpstan/phpstan-phpunit": "^1.3",
+ "phpunit/phpunit": "^9.5.27",
+ "vimeo/psalm": "^5.4"
},
"type": "library",
"autoload": {
@@ -104,7 +104,7 @@
],
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
+ "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
},
"funding": [
{
@@ -120,20 +120,20 @@
"type": "tidelift"
}
],
- "time": "2022-03-03T08:28:38+00:00"
+ "time": "2022-12-30T00:23:10+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.11.0",
+ "version": "1.11.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
+ "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
- "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+ "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
"shasum": ""
},
"require": {
@@ -171,7 +171,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
},
"funding": [
{
@@ -179,20 +179,20 @@
"type": "tidelift"
}
],
- "time": "2022-03-03T13:19:32+00:00"
+ "time": "2023-03-08T13:26:56+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v4.15.1",
+ "version": "v4.15.5",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900"
+ "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
- "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
+ "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"shasum": ""
},
"require": {
@@ -233,9 +233,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
},
- "time": "2022-09-04T07:30:47+00:00"
+ "time": "2023-05-19T20:20:00+00:00"
},
{
"name": "phar-io/manifest",
@@ -350,23 +350,23 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.17",
+ "version": "9.2.26",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8"
+ "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8",
- "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
+ "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.14",
+ "nikic/php-parser": "^4.15",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@@ -381,8 +381,8 @@
"phpunit/phpunit": "^9.3"
},
"suggest": {
- "ext-pcov": "*",
- "ext-xdebug": "*"
+ "ext-pcov": "PHP extension that provides line coverage",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
},
"type": "library",
"extra": {
@@ -415,7 +415,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26"
},
"funding": [
{
@@ -423,7 +423,7 @@
"type": "github"
}
],
- "time": "2022-08-30T12:24:04+00:00"
+ "time": "2023-03-06T12:58:08+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -668,20 +668,20 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.5.24",
+ "version": "9.6.9",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5"
+ "reference": "a9aceaf20a682aeacf28d582654a1670d8826778"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
- "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778",
+ "reference": "a9aceaf20a682aeacf28d582654a1670d8826778",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1",
+ "doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
@@ -699,19 +699,19 @@
"phpunit/php-timer": "^5.0.2",
"sebastian/cli-parser": "^1.0.1",
"sebastian/code-unit": "^1.0.6",
- "sebastian/comparator": "^4.0.5",
+ "sebastian/comparator": "^4.0.8",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
- "sebastian/exporter": "^4.0.3",
+ "sebastian/exporter": "^4.0.5",
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.1",
+ "sebastian/type": "^3.2",
"sebastian/version": "^3.0.2"
},
"suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*"
+ "ext-soap": "To be able to generate mocks based on WSDL files",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
},
"bin": [
"phpunit"
@@ -719,7 +719,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.5-dev"
+ "dev-master": "9.6-dev"
}
},
"autoload": {
@@ -750,7 +750,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24"
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9"
},
"funding": [
{
@@ -760,9 +761,13 @@
{
"url": "https://github.com/sebastianbergmann",
"type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
}
],
- "time": "2022-08-30T07:42:16+00:00"
+ "time": "2023-06-11T06:13:56+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -1064,16 +1069,16 @@
},
{
"name": "sebastian/diff",
- "version": "4.0.4",
+ "version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
+ "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
- "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
+ "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
"shasum": ""
},
"require": {
@@ -1118,7 +1123,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
},
"funding": [
{
@@ -1126,20 +1131,20 @@
"type": "github"
}
],
- "time": "2020-10-26T13:10:38+00:00"
+ "time": "2023-05-07T05:35:17+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.4",
+ "version": "5.1.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
- "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
"shasum": ""
},
"require": {
@@ -1181,7 +1186,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
+ "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
},
"funding": [
{
@@ -1189,7 +1194,7 @@
"type": "github"
}
],
- "time": "2022-04-03T09:37:03+00:00"
+ "time": "2023-02-03T06:03:51+00:00"
},
{
"name": "sebastian/exporter",
@@ -1503,16 +1508,16 @@
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.4",
+ "version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
+ "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
- "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
"shasum": ""
},
"require": {
@@ -1551,10 +1556,10 @@
}
],
"description": "Provides functionality to recursively process PHP variables",
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
},
"funding": [
{
@@ -1562,7 +1567,7 @@
"type": "github"
}
],
- "time": "2020-10-26T13:17:30+00:00"
+ "time": "2023-02-03T06:07:39+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -1621,16 +1626,16 @@
},
{
"name": "sebastian/type",
- "version": "3.2.0",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
- "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
"shasum": ""
},
"require": {
@@ -1665,7 +1670,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
+ "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
},
"funding": [
{
@@ -1673,7 +1678,7 @@
"type": "github"
}
],
- "time": "2022-09-12T14:47:03+00:00"
+ "time": "2023-02-03T06:13:03+00:00"
},
{
"name": "sebastian/version",
@@ -1730,16 +1735,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.7.1",
+ "version": "3.7.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619"
+ "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619",
- "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879",
+ "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879",
"shasum": ""
},
"require": {
@@ -1775,14 +1780,15 @@
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
- "standards"
+ "standards",
+ "static analysis"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
- "time": "2022-06-18T07:21:10+00:00"
+ "time": "2023-02-22T23:07:41+00:00"
},
{
"name": "theseer/tokenizer",
@@ -1841,7 +1847,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": ">=7.3",
+ "php": "^8.0",
"ext-mbstring": "*"
},
"platform-dev": {
diff --git a/docs/Connection.md b/docs/Connection.md
index ba174f8..1b81dfe 100644
--- a/docs/Connection.md
+++ b/docs/Connection.md
@@ -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
```
@@ -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.|
@@ -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.
@@ -55,15 +54,21 @@ Creates a connection to a HL7 server, or throws exception when a connection coul
**Parameters**
-* `(string) $host`
-: Host to connect to
-* `(string) $port`
-: Port to connect to
+* `(string) $host`: Host to connect to
+* `(int) $port`: Port to connect to
+* `(int) $timeout`: Connection timeout
**Return Values**
`void`
+
+**Throws Exceptions**
+
+
+`\HL7ConnectionException`
+
+
@@ -72,7 +77,7 @@ Creates a connection to a HL7 server, or throws exception when a connection coul
**Description**
```php
-public __destruct (void)
+ __destruct (void)
```
@@ -87,6 +92,31 @@ public __destruct (void)
`void`
+
+
+
+
+### Connection::getSocket
+
+**Description**
+
+```php
+ getSocket (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -95,7 +125,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.
@@ -104,14 +134,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`
diff --git a/docs/Message.md b/docs/Message.md
index 5ad91c0..0fc693b 100644
--- a/docs/Message.md
+++ b/docs/Message.md
@@ -18,15 +18,27 @@ The segment separator defaults to \015. To change this, set the global variable
|------|-------------|
|[__construct](#message__construct)|Constructor for Message. Consider using the HL7 factory to obtain a message instead.|
|[addSegment](#messageaddsegment)|Append a segment to the end of the message|
+|[getFirstSegmentInstance](#messagegetfirstsegmentinstance)|Return the first segment with given name in the message|
|[getSegmentAsString](#messagegetsegmentasstring)|Get the segment identified by index as string, using the messages separators.|
|[getSegmentByIndex](#messagegetsegmentbyindex)|Return the segment specified by $index.|
|[getSegmentFieldAsString](#messagegetsegmentfieldasstring)|Get the field identified by $fieldIndex from segment $segmentIndex.|
+|[getSegmentIndex](#messagegetsegmentindex)||
|[getSegments](#messagegetsegments)|Return an array containing all segments in the right order.|
|[getSegmentsByName](#messagegetsegmentsbyname)|Return an array of all segments with the given name|
+|[hasSegment](#messagehassegment)|Check if given segment is present in the message object|
|[insertSegment](#messageinsertsegment)|Insert a segment.|
+|[isAdt](#messageisadt)||
+|[isEmpty](#messageisempty)||
+|[isOrm](#messageisorm)||
+|[isOru](#messageisoru)||
+|[isSiu](#messageissiu)||
+|[removeSegment](#messageremovesegment)||
|[removeSegmentByIndex](#messageremovesegmentbyindex)|Remove the segment indexed by $index.|
+|[removeSegmentsByName](#messageremovesegmentsbyname)|Remove given segment|
+|[resetSegmentIndices](#messageresetsegmentindices)|Reset index attribute of each given segment, so when those are added the indices start from 1|
|[segmentToString](#messagesegmenttostring)|Convert Segment object to string|
|[setSegment](#messagesetsegment)|Set the segment on index.|
+|[toFile](#messagetofile)|Write HL7 to a file|
|[toString](#messagetostring)|Return a string representation of this message.|
@@ -37,7 +49,7 @@ The segment separator defaults to \015. To change this, set the global variable
**Description**
```php
-public __construct (string $msgStr, array $hl7Globals)
+public __construct (string|null $msgStr, array|null $hl7Globals, bool $keepEmptySubFields, bool $resetIndices, bool $autoIncrementIndices, bool|null $doNotSplitRepetition)
```
Constructor for Message. Consider using the HL7 factory to obtain a message instead.
@@ -56,13 +68,25 @@ If the message couldn't be created, for example due to a erroneous HL7 message s
**Parameters**
-* `(string) $msgStr`
-* `(array) $hl7Globals`
+* `(string|null) $msgStr`
+* `(array|null) $hl7Globals`: Set control characters or HL7 properties. e.g., ['HL7_VERSION' => '2.5']
+* `(bool) $keepEmptySubFields`: Set this to true to retain empty sub-fields
+* `(bool) $resetIndices`: Reset Indices of each segment to 1.
+* `(bool) $autoIncrementIndices`: True: auto-increment for each instance of same segment.
+* `(bool|null) $doNotSplitRepetition`: If true, repeated segments will be in single array instead of sub-arrays.
+Note: Since this is non-standard, it may be removed in future!
**Return Values**
`void`
+
+**Throws Exceptions**
+
+
+`\HL7Exception`
+
+
@@ -71,7 +95,7 @@ If the message couldn't be created, for example due to a erroneous HL7 message s
**Description**
```php
-public addSegment (\Segment $segment)
+public addSegment (void)
```
Append a segment to the end of the message
@@ -80,11 +104,36 @@ Append a segment to the end of the message
**Parameters**
-* `(\Segment) $segment`
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### Message::getFirstSegmentInstance
+
+**Description**
+
+```php
+public getFirstSegmentInstance (void)
+```
+
+Return the first segment with given name in the message
+
+
+
+**Parameters**
+
+`This function has no parameters.`
**Return Values**
-`bool`
+`mixed|null`
+
@@ -105,8 +154,7 @@ Get the segment identified by index as string, using the messages separators.
**Parameters**
-* `(int) $index`
-: Index for segment to get
+* `(int) $index`: Index for segment to get
**Return Values**
@@ -114,6 +162,7 @@ Get the segment identified by index as string, using the messages separators.
> String representation of segment
+
@@ -131,13 +180,11 @@ Note: Segment count within the message starts at 0.
**Parameters**
-* `(int) $index`
-: Index where segment is inserted
+* `(int) $index`: Index where segment is inserted
**Return Values**
-`\Segment`
-
+`void`
@@ -164,10 +211,35 @@ Returns empty string if field is not set.
**Return Values**
-`mixed`
+`null|string`
> String representation of field
+
+
+
+
+### Message::getSegmentIndex
+
+**Description**
+
+```php
+ getSegmentIndex (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -193,6 +265,7 @@ Return an array containing all segments in the right order.
> List of all segments
+
@@ -210,8 +283,7 @@ Return an array of all segments with the given name
**Parameters**
-* `(string) $name`
-: Segment name
+* `(string) $name`: Segment name
**Return Values**
@@ -219,6 +291,31 @@ Return an array of all segments with the given name
> List of segments identified by name
+
+
+
+
+### Message::hasSegment
+
+**Description**
+
+```php
+public hasSegment (void)
+```
+
+Check if given segment is present in the message object
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -227,7 +324,7 @@ Return an array of all segments with the given name
**Description**
```php
-public insertSegment (\Segment $segment, null|int $index)
+public insertSegment (null|int $index)
```
Insert a segment.
@@ -236,14 +333,163 @@ Insert a segment.
**Parameters**
-* `(\Segment) $segment`
-* `(null|int) $index`
-: Index where segment is inserted
+* `(null|int) $index`: Index where segment is inserted
+
+**Return Values**
+
+`void`
+
+
+**Throws Exceptions**
+
+
+`\HL7Exception`
+
+
+
+
+
+### Message::isAdt
+
+**Description**
+
+```php
+ isAdt (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### Message::isEmpty
+
+**Description**
+
+```php
+ isEmpty (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### Message::isOrm
+
+**Description**
+
+```php
+ isOrm (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### Message::isOru
+
+**Description**
+
+```php
+ isOru (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
**Return Values**
`void`
+
+
+
+
+### Message::isSiu
+
+**Description**
+
+```php
+ isSiu (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### Message::removeSegment
+
+**Description**
+
+```php
+ removeSegment (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -262,14 +508,62 @@ after this one will be moved one index up.
**Parameters**
-* `(int) $index`
-: Index where segment is removed
+* `(int) $index`: Index where segment is removed
**Return Values**
-`boolean`
+`void`
+
+
+
+### Message::removeSegmentsByName
+
+**Description**
+
+```php
+public removeSegmentsByName (void)
+```
+
+Remove given segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`int`
+
+> Count of segments removed
+
+
+
+
+
+### Message::resetSegmentIndices
+
+**Description**
+
+```php
+public resetSegmentIndices (void)
+```
+
+Reset index attribute of each given segment, so when those are added the indices start from 1
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
@@ -279,7 +573,7 @@ after this one will be moved one index up.
**Description**
```php
-public segmentToString ( $seg)
+public segmentToString (void)
```
Convert Segment object to string
@@ -288,12 +582,11 @@ Convert Segment object to string
**Parameters**
-* `() $seg`
+`This function has no parameters.`
**Return Values**
-`string`
-
+`void`
@@ -304,7 +597,7 @@ Convert Segment object to string
**Description**
```php
-public setSegment (\Segment $segment, int $index)
+public setSegment (int $index)
```
Set the segment on index.
@@ -314,14 +607,48 @@ control characters and hl7 version, based on MSH(1), MSH(2) and MSH(12).
**Parameters**
-* `(\Segment) $segment`
* `(int) $index`
: Index where segment is set
**Return Values**
-`boolean`
+`void`
+
+**Throws Exceptions**
+
+
+`\InvalidArgumentException`
+
+
+
+
+
+### Message::toFile
+
+**Description**
+
+```php
+public toFile (void)
+```
+
+Write HL7 to a file
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+**Throws Exceptions**
+
+
+`\HL7Exception`
@@ -332,7 +659,7 @@ control characters and hl7 version, based on MSH(1), MSH(2) and MSH(12).
**Description**
```php
-public toString (boolean $pretty)
+public toString (bool $pretty)
```
Return a string representation of this message.
@@ -342,7 +669,7 @@ argument as some true value. This will not use the default segment separator, bu
**Parameters**
-* `(boolean) $pretty`
+* `(bool) $pretty`
: Whether to use \n as separator or default (\r).
**Return Values**
@@ -351,5 +678,12 @@ argument as some true value. This will not use the default segment separator, bu
> String representation of HL7 message
+
+**Throws Exceptions**
+
+
+`\HL7Exception`
+
+
diff --git a/docs/Messages/ACK.md b/docs/Messages/ACK.md
index fcfcd95..4031586 100644
--- a/docs/Messages/ACK.md
+++ b/docs/Messages/ACK.md
@@ -13,7 +13,7 @@ Aranyasen\HL7\Message
| Name | Description |
|------|-------------|
|[setAckCode](#acksetackcode)|Set the acknowledgement code for the acknowledgement.|
-|[setErrorMessage](#ackseterrormessage)|Set the error message for the acknowledgement.|
+|[setErrorMessage](#ackseterrormessage)|Set the error message for acknowledgement.|
## Inherited methods
@@ -21,15 +21,27 @@ Aranyasen\HL7\Message
|------|-------------|
|__construct|Constructor for Message. Consider using the HL7 factory to obtain a message instead.|
|addSegment|Append a segment to the end of the message|
+|getFirstSegmentInstance|Return the first segment with given name in the message|
|getSegmentAsString|Get the segment identified by index as string, using the messages separators.|
|getSegmentByIndex|Return the segment specified by $index.|
|getSegmentFieldAsString|Get the field identified by $fieldIndex from segment $segmentIndex.|
+| [getSegmentIndex](https://secure.php.net/manual/en/aranyasen\hl7\message.getsegmentindex.php) | - |
|getSegments|Return an array containing all segments in the right order.|
|getSegmentsByName|Return an array of all segments with the given name|
+|hasSegment|Check if given segment is present in the message object|
|insertSegment|Insert a segment.|
+| [isAdt](https://secure.php.net/manual/en/aranyasen\hl7\message.isadt.php) | - |
+| [isEmpty](https://secure.php.net/manual/en/aranyasen\hl7\message.isempty.php) | - |
+| [isOrm](https://secure.php.net/manual/en/aranyasen\hl7\message.isorm.php) | - |
+| [isOru](https://secure.php.net/manual/en/aranyasen\hl7\message.isoru.php) | - |
+| [isSiu](https://secure.php.net/manual/en/aranyasen\hl7\message.issiu.php) | - |
+| [removeSegment](https://secure.php.net/manual/en/aranyasen\hl7\message.removesegment.php) | - |
|removeSegmentByIndex|Remove the segment indexed by $index.|
+|removeSegmentsByName|Remove given segment|
+|resetSegmentIndices|Reset index attribute of each given segment, so when those are added the indices start from 1|
|segmentToString|Convert Segment object to string|
|setSegment|Set the segment on index.|
+|toFile|Write HL7 to a file|
|toString|Return a string representation of this message.|
@@ -39,7 +51,7 @@ Aranyasen\HL7\Message
**Description**
```php
-public setAckCode (string $code, string $msg)
+public setAckCode (string $code, string|null $msg)
```
Set the acknowledgement code for the acknowledgement.
@@ -52,13 +64,12 @@ This denotes: accept, general error and reject respectively. The ACK module will
* `(string) $code`
: Code to use in acknowledgement
-* `(string) $msg`
+* `(string|null) $msg`
: Acknowledgement message
**Return Values**
-`boolean`
-
+`void`
@@ -72,7 +83,7 @@ This denotes: accept, general error and reject respectively. The ACK module will
public setErrorMessage (string $msg)
```
-Set the error message for the acknowledgement.
+Set the error message for acknowledgement.
This will also set the error code to either AE or CE, depending on the mode of the incoming message.
@@ -85,5 +96,6 @@ This will also set the error code to either AE or CE, depending on the mode of t
`void`
+
diff --git a/docs/README.md b/docs/README.md
index 03d49cf..2773929 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,16 +1,32 @@
# Aranyasen\HL7
-* [Connection](Connection.md)
* [Message](Message.md)
-* [Messages\ACK](Messages/ACK.md)
* [Segment](Segment.md)
-* [Segments\MSH](Segments/MSH.md)
-* [Segments\PID](Segments/PID.md)
-* [Segments\IN1](Segments/IN1.md)
-* [Segments\IN3](Segments/IN3.md)
-* [Segments\NTE](Segments/NTE.md)
-* [Segments\DG1](Segments/DG1.md)
-* [Segments\OBR](Segments/OBR.md)
-* [Segments\OBX](Segments/OBX.md)
-* [Segments\ORC](Segments/ORC.md)
-* [Segments\PV1](Segments/PV1.md)
+* [Messages\ACK](Messages\ACK.md)
+* [Connection](Connection.md)
+* [Segments\AIG](Segments\AIG.md)
+* [Segments\AIL](Segments\AIL.md)
+* [Segments\AIP](Segments\AIP.md)
+* [Segments\DG1](Segments\DG1.md)
+* [Segments\EQU](Segments\EQU.md)
+* [Segments\EVN](Segments\EVN.md)
+* [Segments\FHS](Segments\FHS.md)
+* [Segments\FTS](Segments\FTS.md)
+* [Segments\GT1](Segments\GT1.md)
+* [Segments\IN1](Segments\IN1.md)
+* [Segments\IN3](Segments\IN3.md)
+* [Segments\MRG](Segments\MRG.md)
+* [Segments\MSA](Segments\MSA.md)
+* [Segments\MSH](Segments\MSH.md)
+* [Segments\NK1](Segments\NK1.md)
+* [Segments\NTE](Segments\NTE.md)
+* [Segments\OBR](Segments\OBR.md)
+* [Segments\OBX](Segments\OBX.md)
+* [Segments\ORC](Segments\ORC.md)
+* [Segments\PID](Segments\PID.md)
+* [Segments\PV1](Segments\PV1.md)
+* [Segments\PV2](Segments\PV2.md)
+* [Segments\RGS](Segments\RGS.md)
+* [Segments\SAC](Segments\SAC.md)
+* [Segments\SCH](Segments\SCH.md)
+* [Segments\TQ1](Segments\TQ1.md)
diff --git a/docs/Segment.md b/docs/Segment.md
index d834428..2f077ab 100644
--- a/docs/Segment.md
+++ b/docs/Segment.md
@@ -11,6 +11,7 @@
| Name | Description |
|------|-------------|
|[__construct](#segment__construct)|Create a segment.|
+|[clearField](#segmentclearfield)|Remove any existing value from the field|
|[getField](#segmentgetfield)|Get the field at index.|
|[getFields](#segmentgetfields)|Get fields from a segment|
|[getName](#segmentgetname)|Get the name of the segment. This is basically the value at index 0|
@@ -30,11 +31,11 @@ public __construct (string $name, array|null $fields)
Create a segment.
-A segment may be created with just a name or a name and an array of field
-values. The segment name should be a standard HL7 segment (e.g. MSH / PID etc.) that is three characters long, and
-upper case. If an array is given, all fields will be filled from that array. Note that for composed fields and
-sub-components, the array may hold sub-arrays and sub-sub-arrays. Repeated fields can not be supported the same
-way, since we can't distinguish between composed fields and repeated fields.
+A segment may be created with just a name or a name and an array of field values. The segment name should be a
+standard HL7 segment (e.g. MSH / PID etc.) that is three characters long, and upper case. If an array is given,
+all fields will be filled from that array. Note that for composed fields and sub-components, the array may hold
+sub-arrays and sub-sub-arrays. Repeated fields can not be supported the same way, since we can't distinguish
+between composed fields and repeated fields.
Example:
```php
@@ -46,15 +47,44 @@ echo $seg->getField(1);
**Parameters**
-* `(string) $name`
-: Name of the segment
-* `(array|null) $fields`
-: Fields for segment
+* `(string) $name`: Name of the segment
+* `(array|null) $fields`: Fields for segment
**Return Values**
`void`
+
+**Throws Exceptions**
+
+
+`\InvalidArgumentException`
+
+
+
+
+
+### Segment::clearField
+
+**Description**
+
+```php
+public clearField (int $index)
+```
+
+Remove any existing value from the field
+
+
+
+**Parameters**
+
+* `(int) $index`: Field index
+
+**Return Values**
+
+`void`
+
+
@@ -63,7 +93,7 @@ echo $seg->getField(1);
**Description**
```php
-public getField (int $index)
+public getField (void)
```
Get the field at index.
@@ -76,14 +106,12 @@ $field = $seg->getField(9); // Returns a string/null/array depending on what the
**Parameters**
-* `(int) $index`
-: Index of field
+`This function has no parameters.`
**Return Values**
-`null|string|array`
+`void`
-> The value of the field
@@ -103,10 +131,8 @@ fields from this index till the end of the segment will be returned.
**Parameters**
-* `(int) $from`
-: Start range at this index
-* `(int|null) $to`
-: Stop range at this index
+* `(int) $from`: Start range at this index
+* `(int|null) $to`: Stop range at this index
**Return Values**
@@ -114,6 +140,7 @@ fields from this index till the end of the segment will be returned.
> List of fields
+
@@ -135,10 +162,11 @@ Get the name of the segment. This is basically the value at index 0
**Return Values**
-`mixed`
+`string`
> Name of segment
+
@@ -147,7 +175,7 @@ Get the name of the segment. This is basically the value at index 0
**Description**
```php
-public setField (int $index, string|array $value)
+public setField (int $index)
```
Set the field specified by index to value.
@@ -168,15 +196,11 @@ If values are not provided at all, the method will just return.
**Parameters**
-* `(int) $index`
-: Index to set
-* `(string|array) $value`
-: Value for field
+* `(int) $index`: Index to set
**Return Values**
-`boolean`
-
+`void`
@@ -204,5 +228,6 @@ Get the number of fields for this segment, not including the name
> number of fields
+
diff --git a/docs/Segments/AIG.md b/docs/Segments/AIG.md
new file mode 100644
index 0000000..717ac95
--- /dev/null
+++ b/docs/Segments/AIG.md
@@ -0,0 +1,787 @@
+# Aranyasen\HL7\Segments\AIG
+
+AIG segment class
+
+AIG: Appointment information - general resource segment
+The AIG segment contains information about various kinds of resources (other than those with specifically defined
+segments in this chapter) that can be scheduled. Resources included in a transaction using this segment are assumed
+to be controlled by a schedule on a schedule filler application. Resources not controlled by a schedule are not
+identified on a schedule request using this segment. Resources described by this segment are general kinds of
+resources, such as equipment, that are identified with a simple identification code.
+
+Ref: http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7+v2.3.1&segment=AIG
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[__destruct](#aig__destruct)||
+|[getAllowSubstitutionCode](#aiggetallowsubstitutioncode)||
+|[getDuration](#aiggetduration)||
+|[getDurationUnits](#aiggetdurationunits)||
+|[getFillerStatusCode](#aiggetfillerstatuscode)||
+|[getID](#aiggetid)||
+|[getResourceGroup](#aiggetresourcegroup)||
+|[getResourceID](#aiggetresourceid)||
+|[getResourceQuantity](#aiggetresourcequantity)||
+|[getResourceQuantityUnits](#aiggetresourcequantityunits)||
+|[getResourceType](#aiggetresourcetype)||
+|[getSegmentActionCode](#aiggetsegmentactioncode)||
+|[getStartDateTime](#aiggetstartdatetime)||
+|[getStartDateTimeOffset](#aiggetstartdatetimeoffset)||
+|[getStartDateTimeOffsetUnits](#aiggetstartdatetimeoffsetunits)||
+|[resetIndex](#aigresetindex)|Reset index of this segment|
+|[setAllowSubstitutionCode](#aigsetallowsubstitutioncode)||
+|[setDuration](#aigsetduration)||
+|[setDurationUnits](#aigsetdurationunits)||
+|[setFillerStatusCode](#aigsetfillerstatuscode)||
+|[setID](#aigsetid)||
+|[setResourceGroup](#aigsetresourcegroup)||
+|[setResourceID](#aigsetresourceid)||
+|[setResourceQuantity](#aigsetresourcequantity)||
+|[setResourceQuantityUnits](#aigsetresourcequantityunits)||
+|[setResourceType](#aigsetresourcetype)||
+|[setSegmentActionCode](#aigsetsegmentactioncode)||
+|[setStartDateTime](#aigsetstartdatetime)||
+|[setStartDateTimeOffset](#aigsetstartdatetimeoffset)||
+|[setStartDateTimeOffsetUnits](#aigsetstartdatetimeoffsetunits)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### AIG::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getAllowSubstitutionCode
+
+**Description**
+
+```php
+ getAllowSubstitutionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getDuration
+
+**Description**
+
+```php
+ getDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getDurationUnits
+
+**Description**
+
+```php
+ getDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getFillerStatusCode
+
+**Description**
+
+```php
+ getFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getID
+
+**Description**
+
+```php
+ getID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getResourceGroup
+
+**Description**
+
+```php
+ getResourceGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getResourceID
+
+**Description**
+
+```php
+ getResourceID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getResourceQuantity
+
+**Description**
+
+```php
+ getResourceQuantity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getResourceQuantityUnits
+
+**Description**
+
+```php
+ getResourceQuantityUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getResourceType
+
+**Description**
+
+```php
+ getResourceType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getSegmentActionCode
+
+**Description**
+
+```php
+ getSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getStartDateTime
+
+**Description**
+
+```php
+ getStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getStartDateTimeOffset
+
+**Description**
+
+```php
+ getStartDateTimeOffset (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::getStartDateTimeOffsetUnits
+
+**Description**
+
+```php
+ getStartDateTimeOffsetUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setAllowSubstitutionCode
+
+**Description**
+
+```php
+ setAllowSubstitutionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setDuration
+
+**Description**
+
+```php
+ setDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setDurationUnits
+
+**Description**
+
+```php
+ setDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setFillerStatusCode
+
+**Description**
+
+```php
+ setFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setID
+
+**Description**
+
+```php
+ setID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setResourceGroup
+
+**Description**
+
+```php
+ setResourceGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setResourceID
+
+**Description**
+
+```php
+ setResourceID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setResourceQuantity
+
+**Description**
+
+```php
+ setResourceQuantity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setResourceQuantityUnits
+
+**Description**
+
+```php
+ setResourceQuantityUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setResourceType
+
+**Description**
+
+```php
+ setResourceType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setSegmentActionCode
+
+**Description**
+
+```php
+ setSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setStartDateTime
+
+**Description**
+
+```php
+ setStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setStartDateTimeOffset
+
+**Description**
+
+```php
+ setStartDateTimeOffset (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIG::setStartDateTimeOffsetUnits
+
+**Description**
+
+```php
+ setStartDateTimeOffsetUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/AIL.md b/docs/Segments/AIL.md
new file mode 100644
index 0000000..0dcfaeb
--- /dev/null
+++ b/docs/Segments/AIL.md
@@ -0,0 +1,688 @@
+# Aranyasen\HL7\Segments\AIL
+
+AIL segment class
+
+AIL: Appointment Information - Location Resource
+
+The AIL segment contains information about location resources (meeting rooms, operating rooms, examination rooms, or
+other locations) that can be scheduled. Resources included in a transaction using this segment are assumed to be
+controlled by a schedule on a schedule filler application. Resources not controlled by a schedule are not identified
+on a schedule request using this segment. Location resources are identified with this specific segment because of the
+specific encoding of locations used by the HL7 specification.
+
+Ref: http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7+v2.5.1&segment=AIL
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[__destruct](#ail__destruct)||
+|[getAllowSubstitutionCode](#ailgetallowsubstitutioncode)||
+|[getDuration](#ailgetduration)||
+|[getDurationUnits](#ailgetdurationunits)||
+|[getFillerStatusCode](#ailgetfillerstatuscode)||
+|[getID](#ailgetid)||
+|[getLocationGroup](#ailgetlocationgroup)||
+|[getLocationResourceID](#ailgetlocationresourceid)||
+|[getLocationTypeAIL](#ailgetlocationtypeail)||
+|[getSegmentActionCode](#ailgetsegmentactioncode)||
+|[getStartDateTime](#ailgetstartdatetime)||
+|[getStartDateTimeOffset](#ailgetstartdatetimeoffset)||
+|[getStartDateTimeOffsetUnits](#ailgetstartdatetimeoffsetunits)||
+|[resetIndex](#ailresetindex)|Reset index of this segment|
+|[setAllowSubstitutionCode](#ailsetallowsubstitutioncode)||
+|[setDuration](#ailsetduration)||
+|[setDurationUnits](#ailsetdurationunits)||
+|[setFillerStatusCode](#ailsetfillerstatuscode)||
+|[setID](#ailsetid)||
+|[setLocationGroup](#ailsetlocationgroup)||
+|[setLocationResourceID](#ailsetlocationresourceid)||
+|[setLocationTypeAIL](#ailsetlocationtypeail)||
+|[setSegmentActionCode](#ailsetsegmentactioncode)||
+|[setStartDateTime](#ailsetstartdatetime)||
+|[setStartDateTimeOffset](#ailsetstartdatetimeoffset)||
+|[setStartDateTimeOffsetUnits](#ailsetstartdatetimeoffsetunits)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### AIL::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getAllowSubstitutionCode
+
+**Description**
+
+```php
+ getAllowSubstitutionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getDuration
+
+**Description**
+
+```php
+ getDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getDurationUnits
+
+**Description**
+
+```php
+ getDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getFillerStatusCode
+
+**Description**
+
+```php
+ getFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getID
+
+**Description**
+
+```php
+ getID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getLocationGroup
+
+**Description**
+
+```php
+ getLocationGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getLocationResourceID
+
+**Description**
+
+```php
+ getLocationResourceID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getLocationTypeAIL
+
+**Description**
+
+```php
+ getLocationTypeAIL (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getSegmentActionCode
+
+**Description**
+
+```php
+ getSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getStartDateTime
+
+**Description**
+
+```php
+ getStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getStartDateTimeOffset
+
+**Description**
+
+```php
+ getStartDateTimeOffset (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::getStartDateTimeOffsetUnits
+
+**Description**
+
+```php
+ getStartDateTimeOffsetUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setAllowSubstitutionCode
+
+**Description**
+
+```php
+ setAllowSubstitutionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setDuration
+
+**Description**
+
+```php
+ setDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setDurationUnits
+
+**Description**
+
+```php
+ setDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setFillerStatusCode
+
+**Description**
+
+```php
+ setFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setID
+
+**Description**
+
+```php
+ setID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setLocationGroup
+
+**Description**
+
+```php
+ setLocationGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setLocationResourceID
+
+**Description**
+
+```php
+ setLocationResourceID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setLocationTypeAIL
+
+**Description**
+
+```php
+ setLocationTypeAIL (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setSegmentActionCode
+
+**Description**
+
+```php
+ setSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setStartDateTime
+
+**Description**
+
+```php
+ setStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setStartDateTimeOffset
+
+**Description**
+
+```php
+ setStartDateTimeOffset (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIL::setStartDateTimeOffsetUnits
+
+**Description**
+
+```php
+ setStartDateTimeOffsetUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/AIP.md b/docs/Segments/AIP.md
new file mode 100644
index 0000000..668c9c3
--- /dev/null
+++ b/docs/Segments/AIP.md
@@ -0,0 +1,688 @@
+# Aranyasen\HL7\Segments\AIP
+
+AIP segment class
+
+AIP: Appointment Information - Personnel Resource
+The AIP segment contains information about the personnel types that can be scheduled. Personnel included in a
+transaction using this segment are assumed to be controlled by a schedule on a schedule filler application.
+Personnel not controlled by a schedule are not identified on a schedule request using this segment. The kinds of
+personnel described on this segment include any healthcare provider in the institution controlled by a schedule (for
+example: technicians, physicians, nurses, surgeons, anesthesiologists, or CRNAs).
+
+
+Ref: http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7+v2.5.1&segment=AIP
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[__destruct](#aip__destruct)||
+|[getAllowSubstitutionCode](#aipgetallowsubstitutioncode)||
+|[getDuration](#aipgetduration)||
+|[getDurationUnits](#aipgetdurationunits)||
+|[getFillerStatusCode](#aipgetfillerstatuscode)||
+|[getID](#aipgetid)||
+|[getPersonnelResourceID](#aipgetpersonnelresourceid)||
+|[getResourceGroup](#aipgetresourcegroup)||
+|[getResourceType](#aipgetresourcetype)||
+|[getSegmentActionCode](#aipgetsegmentactioncode)||
+|[getStartDateTime](#aipgetstartdatetime)||
+|[getStartDateTimeOffset](#aipgetstartdatetimeoffset)||
+|[getStartDateTimeOffsetUnits](#aipgetstartdatetimeoffsetunits)||
+|[resetIndex](#aipresetindex)|Reset index of this segment|
+|[setAllowSubstitutionCode](#aipsetallowsubstitutioncode)||
+|[setDuration](#aipsetduration)||
+|[setDurationUnits](#aipsetdurationunits)||
+|[setFillerStatusCode](#aipsetfillerstatuscode)||
+|[setID](#aipsetid)||
+|[setPersonnelResourceID](#aipsetpersonnelresourceid)||
+|[setResourceGroup](#aipsetresourcegroup)||
+|[setResourceType](#aipsetresourcetype)||
+|[setSegmentActionCode](#aipsetsegmentactioncode)||
+|[setStartDateTime](#aipsetstartdatetime)||
+|[setStartDateTimeOffset](#aipsetstartdatetimeoffset)||
+|[setStartDateTimeOffsetUnits](#aipsetstartdatetimeoffsetunits)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### AIP::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getAllowSubstitutionCode
+
+**Description**
+
+```php
+ getAllowSubstitutionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getDuration
+
+**Description**
+
+```php
+ getDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getDurationUnits
+
+**Description**
+
+```php
+ getDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getFillerStatusCode
+
+**Description**
+
+```php
+ getFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getID
+
+**Description**
+
+```php
+ getID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getPersonnelResourceID
+
+**Description**
+
+```php
+ getPersonnelResourceID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getResourceGroup
+
+**Description**
+
+```php
+ getResourceGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getResourceType
+
+**Description**
+
+```php
+ getResourceType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getSegmentActionCode
+
+**Description**
+
+```php
+ getSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getStartDateTime
+
+**Description**
+
+```php
+ getStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getStartDateTimeOffset
+
+**Description**
+
+```php
+ getStartDateTimeOffset (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::getStartDateTimeOffsetUnits
+
+**Description**
+
+```php
+ getStartDateTimeOffsetUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setAllowSubstitutionCode
+
+**Description**
+
+```php
+ setAllowSubstitutionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setDuration
+
+**Description**
+
+```php
+ setDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setDurationUnits
+
+**Description**
+
+```php
+ setDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setFillerStatusCode
+
+**Description**
+
+```php
+ setFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setID
+
+**Description**
+
+```php
+ setID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setPersonnelResourceID
+
+**Description**
+
+```php
+ setPersonnelResourceID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setResourceGroup
+
+**Description**
+
+```php
+ setResourceGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setResourceType
+
+**Description**
+
+```php
+ setResourceType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setSegmentActionCode
+
+**Description**
+
+```php
+ setSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setStartDateTime
+
+**Description**
+
+```php
+ setStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setStartDateTimeOffset
+
+**Description**
+
+```php
+ setStartDateTimeOffset (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### AIP::setStartDateTimeOffsetUnits
+
+**Description**
+
+```php
+ setStartDateTimeOffsetUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/DG1.md b/docs/Segments/DG1.md
index 854230c..ed1ec01 100644
--- a/docs/Segments/DG1.md
+++ b/docs/Segments/DG1.md
@@ -13,6 +13,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#dg1__destruct)||
|[getAttestationDateTime](#dg1getattestationdatetime)||
|[getConfidentialIndicator](#dg1getconfidentialindicator)||
|[getDRGApprovalIndicator](#dg1getdrgapprovalindicator)||
@@ -32,6 +33,7 @@ Aranyasen\HL7\Segment
|[getOutlierCost](#dg1getoutliercost)||
|[getOutlierDays](#dg1getoutlierdays)||
|[getOutlierType](#dg1getoutliertype)||
+|[resetIndex](#dg1resetindex)|Reset index of this segment|
|[setAttestationDateTime](#dg1setattestationdatetime)||
|[setConfidentialIndicator](#dg1setconfidentialindicator)||
|[setDRGApprovalIndicator](#dg1setdrgapprovalindicator)||
@@ -57,6 +59,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -65,12 +68,36 @@ Aranyasen\HL7\Segment
+### DG1::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### DG1::getAttestationDateTime
**Description**
```php
-public getAttestationDateTime (void)
+ getAttestationDateTime (void)
```
@@ -85,6 +112,7 @@ public getAttestationDateTime (void)
`void`
+
@@ -93,7 +121,7 @@ public getAttestationDateTime (void)
**Description**
```php
-public getConfidentialIndicator (void)
+ getConfidentialIndicator (void)
```
@@ -108,6 +136,7 @@ public getConfidentialIndicator (void)
`void`
+
@@ -116,7 +145,7 @@ public getConfidentialIndicator (void)
**Description**
```php
-public getDRGApprovalIndicator (void)
+ getDRGApprovalIndicator (void)
```
@@ -131,6 +160,7 @@ public getDRGApprovalIndicator (void)
`void`
+
@@ -139,7 +169,7 @@ public getDRGApprovalIndicator (void)
**Description**
```php
-public getDRGGrouperReviewCode (void)
+ getDRGGrouperReviewCode (void)
```
@@ -154,6 +184,7 @@ public getDRGGrouperReviewCode (void)
`void`
+
@@ -162,7 +193,7 @@ public getDRGGrouperReviewCode (void)
**Description**
```php
-public getDiagnosingClinician (void)
+ getDiagnosingClinician (void)
```
@@ -177,6 +208,7 @@ public getDiagnosingClinician (void)
`void`
+
@@ -185,7 +217,7 @@ public getDiagnosingClinician (void)
**Description**
```php
-public getDiagnosisClassification (void)
+ getDiagnosisClassification (void)
```
@@ -200,6 +232,7 @@ public getDiagnosisClassification (void)
`void`
+
@@ -208,7 +241,7 @@ public getDiagnosisClassification (void)
**Description**
```php
-public getDiagnosisCodeDG1 (void)
+ getDiagnosisCodeDG1 (void)
```
@@ -223,6 +256,7 @@ public getDiagnosisCodeDG1 (void)
`void`
+
@@ -231,7 +265,7 @@ public getDiagnosisCodeDG1 (void)
**Description**
```php
-public getDiagnosisCodingMethod (void)
+ getDiagnosisCodingMethod (void)
```
@@ -246,6 +280,7 @@ public getDiagnosisCodingMethod (void)
`void`
+
@@ -254,7 +289,7 @@ public getDiagnosisCodingMethod (void)
**Description**
```php
-public getDiagnosisDateTime (void)
+ getDiagnosisDateTime (void)
```
@@ -269,6 +304,7 @@ public getDiagnosisDateTime (void)
`void`
+
@@ -277,7 +313,7 @@ public getDiagnosisDateTime (void)
**Description**
```php
-public getDiagnosisDescription (void)
+ getDiagnosisDescription (void)
```
@@ -292,6 +328,7 @@ public getDiagnosisDescription (void)
`void`
+
@@ -300,7 +337,7 @@ public getDiagnosisDescription (void)
**Description**
```php
-public getDiagnosisPriority (void)
+ getDiagnosisPriority (void)
```
@@ -315,6 +352,7 @@ public getDiagnosisPriority (void)
`void`
+
@@ -323,7 +361,7 @@ public getDiagnosisPriority (void)
**Description**
```php
-public getDiagnosisType (void)
+ getDiagnosisType (void)
```
@@ -338,6 +376,7 @@ public getDiagnosisType (void)
`void`
+
@@ -346,7 +385,7 @@ public getDiagnosisType (void)
**Description**
```php
-public getDiagnosticRelatedGroup (void)
+ getDiagnosticRelatedGroup (void)
```
@@ -361,6 +400,7 @@ public getDiagnosticRelatedGroup (void)
`void`
+
@@ -369,7 +409,7 @@ public getDiagnosticRelatedGroup (void)
**Description**
```php
-public getGrouperVersionAndType (void)
+ getGrouperVersionAndType (void)
```
@@ -384,6 +424,7 @@ public getGrouperVersionAndType (void)
`void`
+
@@ -392,7 +433,7 @@ public getGrouperVersionAndType (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -407,6 +448,7 @@ public getID (void)
`void`
+
@@ -415,7 +457,7 @@ public getID (void)
**Description**
```php
-public getMajorDiagnosticCategory (void)
+ getMajorDiagnosticCategory (void)
```
@@ -430,6 +472,7 @@ public getMajorDiagnosticCategory (void)
`void`
+
@@ -438,7 +481,7 @@ public getMajorDiagnosticCategory (void)
**Description**
```php
-public getOutlierCost (void)
+ getOutlierCost (void)
```
@@ -453,6 +496,7 @@ public getOutlierCost (void)
`void`
+
@@ -461,7 +505,7 @@ public getOutlierCost (void)
**Description**
```php
-public getOutlierDays (void)
+ getOutlierDays (void)
```
@@ -476,6 +520,7 @@ public getOutlierDays (void)
`void`
+
@@ -484,7 +529,7 @@ public getOutlierDays (void)
**Description**
```php
-public getOutlierType (void)
+ getOutlierType (void)
```
@@ -499,6 +544,31 @@ public getOutlierType (void)
`void`
+
+
+
+
+### DG1::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -507,7 +577,7 @@ public getOutlierType (void)
**Description**
```php
-public setAttestationDateTime (void)
+ setAttestationDateTime (void)
```
@@ -522,6 +592,7 @@ public setAttestationDateTime (void)
`void`
+
@@ -530,7 +601,7 @@ public setAttestationDateTime (void)
**Description**
```php
-public setConfidentialIndicator (void)
+ setConfidentialIndicator (void)
```
@@ -545,6 +616,7 @@ public setConfidentialIndicator (void)
`void`
+
@@ -553,7 +625,7 @@ public setConfidentialIndicator (void)
**Description**
```php
-public setDRGApprovalIndicator (void)
+ setDRGApprovalIndicator (void)
```
@@ -568,6 +640,7 @@ public setDRGApprovalIndicator (void)
`void`
+
@@ -576,7 +649,7 @@ public setDRGApprovalIndicator (void)
**Description**
```php
-public setDRGGrouperReviewCode (void)
+ setDRGGrouperReviewCode (void)
```
@@ -591,6 +664,7 @@ public setDRGGrouperReviewCode (void)
`void`
+
@@ -599,7 +673,7 @@ public setDRGGrouperReviewCode (void)
**Description**
```php
-public setDiagnosingClinician (void)
+ setDiagnosingClinician (void)
```
@@ -614,6 +688,7 @@ public setDiagnosingClinician (void)
`void`
+
@@ -622,7 +697,7 @@ public setDiagnosingClinician (void)
**Description**
```php
-public setDiagnosisClassification (void)
+ setDiagnosisClassification (void)
```
@@ -637,6 +712,7 @@ public setDiagnosisClassification (void)
`void`
+
@@ -645,7 +721,7 @@ public setDiagnosisClassification (void)
**Description**
```php
-public setDiagnosisCodeDG1 (void)
+ setDiagnosisCodeDG1 (void)
```
@@ -660,6 +736,7 @@ public setDiagnosisCodeDG1 (void)
`void`
+
@@ -668,7 +745,7 @@ public setDiagnosisCodeDG1 (void)
**Description**
```php
-public setDiagnosisCodingMethod (void)
+ setDiagnosisCodingMethod (void)
```
@@ -683,6 +760,7 @@ public setDiagnosisCodingMethod (void)
`void`
+
@@ -691,7 +769,7 @@ public setDiagnosisCodingMethod (void)
**Description**
```php
-public setDiagnosisDateTime (void)
+ setDiagnosisDateTime (void)
```
@@ -706,6 +784,7 @@ public setDiagnosisDateTime (void)
`void`
+
@@ -714,7 +793,7 @@ public setDiagnosisDateTime (void)
**Description**
```php
-public setDiagnosisDescription (void)
+ setDiagnosisDescription (void)
```
@@ -729,6 +808,7 @@ public setDiagnosisDescription (void)
`void`
+
@@ -737,7 +817,7 @@ public setDiagnosisDescription (void)
**Description**
```php
-public setDiagnosisPriority (void)
+ setDiagnosisPriority (void)
```
@@ -752,6 +832,7 @@ public setDiagnosisPriority (void)
`void`
+
@@ -760,7 +841,7 @@ public setDiagnosisPriority (void)
**Description**
```php
-public setDiagnosisType (void)
+ setDiagnosisType (void)
```
@@ -775,6 +856,7 @@ public setDiagnosisType (void)
`void`
+
@@ -783,7 +865,7 @@ public setDiagnosisType (void)
**Description**
```php
-public setDiagnosticRelatedGroup (void)
+ setDiagnosticRelatedGroup (void)
```
@@ -798,6 +880,7 @@ public setDiagnosticRelatedGroup (void)
`void`
+
@@ -806,7 +889,7 @@ public setDiagnosticRelatedGroup (void)
**Description**
```php
-public setGrouperVersionAndType (void)
+ setGrouperVersionAndType (void)
```
@@ -821,6 +904,7 @@ public setGrouperVersionAndType (void)
`void`
+
@@ -829,7 +913,7 @@ public setGrouperVersionAndType (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -844,6 +928,7 @@ public setID (void)
`void`
+
@@ -852,7 +937,7 @@ public setID (void)
**Description**
```php
-public setMajorDiagnosticCategory (void)
+ setMajorDiagnosticCategory (void)
```
@@ -867,6 +952,7 @@ public setMajorDiagnosticCategory (void)
`void`
+
@@ -875,7 +961,7 @@ public setMajorDiagnosticCategory (void)
**Description**
```php
-public setOutlierCost (void)
+ setOutlierCost (void)
```
@@ -890,6 +976,7 @@ public setOutlierCost (void)
`void`
+
@@ -898,7 +985,7 @@ public setOutlierCost (void)
**Description**
```php
-public setOutlierDays (void)
+ setOutlierDays (void)
```
@@ -913,6 +1000,7 @@ public setOutlierDays (void)
`void`
+
@@ -921,7 +1009,7 @@ public setOutlierDays (void)
**Description**
```php
-public setOutlierType (void)
+ setOutlierType (void)
```
@@ -936,5 +1024,6 @@ public setOutlierType (void)
`void`
+
diff --git a/docs/Segments/EQU.md b/docs/Segments/EQU.md
index ddf49b7..e07845d 100644
--- a/docs/Segments/EQU.md
+++ b/docs/Segments/EQU.md
@@ -30,6 +30,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -163,7 +164,7 @@ Aranyasen\HL7\Segment
**Description**
```php
-public static resetIndex (int $index)
+public static resetIndex (void)
```
Reset index of this segment
@@ -172,7 +173,7 @@ Reset index of this segment
**Parameters**
-* `(int) $index`
+`This function has no parameters.`
**Return Values**
diff --git a/docs/Segments/EVN.md b/docs/Segments/EVN.md
new file mode 100644
index 0000000..2edf5f1
--- /dev/null
+++ b/docs/Segments/EVN.md
@@ -0,0 +1,330 @@
+# Aranyasen\HL7\Segments\EVN
+
+EVN segment class
+Ref: http://hl7-definition.caristix.com:9010/HL7%20v2.3.1/segment/EVN
+ https://corepointhealth.com/resource-center/hl7-resources/hl7-evn-event-type-segment
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getDateTimePlannedEvent](#evngetdatetimeplannedevent)||
+|[getEventOccurred](#evngeteventoccurred)||
+|[getEventReasonCode](#evngeteventreasoncode)||
+|[getEventTypeCode](#evngeteventtypecode)||
+|[getOperatorID](#evngetoperatorid)||
+|[getRecordedDateTime](#evngetrecordeddatetime)||
+|[setDateTimePlannedEvent](#evnsetdatetimeplannedevent)||
+|[setEventOccurred](#evnseteventoccurred)||
+|[setEventReasonCode](#evnseteventreasoncode)||
+|[setEventTypeCode](#evnseteventtypecode)||
+|[setOperatorID](#evnsetoperatorid)||
+|[setRecordedDateTime](#evnsetrecordeddatetime)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### EVN::getDateTimePlannedEvent
+
+**Description**
+
+```php
+ getDateTimePlannedEvent (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::getEventOccurred
+
+**Description**
+
+```php
+ getEventOccurred (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::getEventReasonCode
+
+**Description**
+
+```php
+ getEventReasonCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::getEventTypeCode
+
+**Description**
+
+```php
+ getEventTypeCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::getOperatorID
+
+**Description**
+
+```php
+ getOperatorID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::getRecordedDateTime
+
+**Description**
+
+```php
+ getRecordedDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::setDateTimePlannedEvent
+
+**Description**
+
+```php
+ setDateTimePlannedEvent (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::setEventOccurred
+
+**Description**
+
+```php
+ setEventOccurred (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::setEventReasonCode
+
+**Description**
+
+```php
+ setEventReasonCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::setEventTypeCode
+
+**Description**
+
+```php
+ setEventTypeCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::setOperatorID
+
+**Description**
+
+```php
+ setOperatorID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### EVN::setRecordedDateTime
+
+**Description**
+
+```php
+ setRecordedDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/FHS.md b/docs/Segments/FHS.md
new file mode 100644
index 0000000..b434691
--- /dev/null
+++ b/docs/Segments/FHS.md
@@ -0,0 +1,629 @@
+# Aranyasen\HL7\Segments\FHS
+
+FHS: File Header Segment
+Ref: https://hl7-definition.caristix.com/v2/HL7v2.3/Segments/FHS
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getFileControlId](#fhsgetfilecontrolid)||
+|[getFileCreationDateTime](#fhsgetfilecreationdatetime)||
+|[getFileEncodingCharacters](#fhsgetfileencodingcharacters)||
+|[getFileFieldSeparator](#fhsgetfilefieldseparator)||
+|[getFileHeaderComment](#fhsgetfileheadercomment)||
+|[getFileNameId](#fhsgetfilenameid)||
+|[getFileRecievingApplication](#fhsgetfilerecievingapplication)||
+|[getFileRecievingFacility](#fhsgetfilerecievingfacility)||
+|[getFileSecurity](#fhsgetfilesecurity)||
+|[getFileSendingApplication](#fhsgetfilesendingapplication)||
+|[getFileSendingFacility](#fhsgetfilesendingfacility)||
+|[getReferenceFileControlId](#fhsgetreferencefilecontrolid)||
+|[setFileControlId](#fhssetfilecontrolid)||
+|[setFileCreationDateTime](#fhssetfilecreationdatetime)||
+|[setFileEncodingCharacters](#fhssetfileencodingcharacters)||
+|[setFileFieldSeparator](#fhssetfilefieldseparator)||
+|[setFileHeaderComment](#fhssetfileheadercomment)||
+|[setFileNameId](#fhssetfilenameid)||
+|[setFileRecievingApplication](#fhssetfilerecievingapplication)||
+|[setFileRecievingFacility](#fhssetfilerecievingfacility)||
+|[setFileSecurity](#fhssetfilesecurity)||
+|[setFileSendingApplication](#fhssetfilesendingapplication)||
+|[setFileSendingFacility](#fhssetfilesendingfacility)||
+|[setReferenceFileControlId](#fhssetreferencefilecontrolid)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### FHS::getFileControlId
+
+**Description**
+
+```php
+ getFileControlId (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileCreationDateTime
+
+**Description**
+
+```php
+ getFileCreationDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileEncodingCharacters
+
+**Description**
+
+```php
+ getFileEncodingCharacters (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileFieldSeparator
+
+**Description**
+
+```php
+ getFileFieldSeparator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileHeaderComment
+
+**Description**
+
+```php
+ getFileHeaderComment (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileNameId
+
+**Description**
+
+```php
+ getFileNameId (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileRecievingApplication
+
+**Description**
+
+```php
+ getFileRecievingApplication (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileRecievingFacility
+
+**Description**
+
+```php
+ getFileRecievingFacility (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileSecurity
+
+**Description**
+
+```php
+ getFileSecurity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileSendingApplication
+
+**Description**
+
+```php
+ getFileSendingApplication (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getFileSendingFacility
+
+**Description**
+
+```php
+ getFileSendingFacility (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::getReferenceFileControlId
+
+**Description**
+
+```php
+ getReferenceFileControlId (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileControlId
+
+**Description**
+
+```php
+ setFileControlId (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileCreationDateTime
+
+**Description**
+
+```php
+ setFileCreationDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileEncodingCharacters
+
+**Description**
+
+```php
+ setFileEncodingCharacters (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileFieldSeparator
+
+**Description**
+
+```php
+ setFileFieldSeparator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileHeaderComment
+
+**Description**
+
+```php
+ setFileHeaderComment (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileNameId
+
+**Description**
+
+```php
+ setFileNameId (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileRecievingApplication
+
+**Description**
+
+```php
+ setFileRecievingApplication (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileRecievingFacility
+
+**Description**
+
+```php
+ setFileRecievingFacility (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileSecurity
+
+**Description**
+
+```php
+ setFileSecurity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileSendingApplication
+
+**Description**
+
+```php
+ setFileSendingApplication (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setFileSendingFacility
+
+**Description**
+
+```php
+ setFileSendingFacility (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FHS::setReferenceFileControlId
+
+**Description**
+
+```php
+ setReferenceFileControlId (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/FTS.md b/docs/Segments/FTS.md
new file mode 100644
index 0000000..524f4ac
--- /dev/null
+++ b/docs/Segments/FTS.md
@@ -0,0 +1,129 @@
+# Aranyasen\HL7\Segments\FTS
+
+FTS: File Trailer Segment
+Ref: https://hl7-definition.caristix.com/v2/HL7v2.3/Segments/FTS
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getFileBatchCount](#ftsgetfilebatchcount)||
+|[getFileTrailerComment](#ftsgetfiletrailercomment)||
+|[setFileBatchCount](#ftssetfilebatchcount)||
+|[setFileTrailerComment](#ftssetfiletrailercomment)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### FTS::getFileBatchCount
+
+**Description**
+
+```php
+ getFileBatchCount (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FTS::getFileTrailerComment
+
+**Description**
+
+```php
+ getFileTrailerComment (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FTS::setFileBatchCount
+
+**Description**
+
+```php
+ setFileBatchCount (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### FTS::setFileTrailerComment
+
+**Description**
+
+```php
+ setFileTrailerComment (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/GT1.md b/docs/Segments/GT1.md
new file mode 100644
index 0000000..a4806d6
--- /dev/null
+++ b/docs/Segments/GT1.md
@@ -0,0 +1,2929 @@
+# Aranyasen\HL7\Segments\GT1
+
+GT1 segment class
+Reference: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/GT1
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[__destruct](#gt1__destruct)||
+|[getAmbulatoryStatus](#gt1getambulatorystatus)||
+|[getCitizenship](#gt1getcitizenship)||
+|[getContactPersonsName](#gt1getcontactpersonsname)||
+|[getContactPersonsPhone](#gt1getcontactpersonsphone)||
+|[getContactReason](#gt1getcontactreason)||
+|[getContactRelationship](#gt1getcontactrelationship)||
+|[getEmploymentStopDate](#gt1getemploymentstopdate)||
+|[getEthnicGroup](#gt1getethnicgroup)||
+|[getGuarantorAddress](#gt1getguarantoraddress)||
+|[getGuarantorAnnualIncome](#gt1getguarantorannualincome)||
+|[getGuarantorBeginDate](#gt1getguarantorbegindate)||
+|[getGuarantorBillingHoldFlag](#gt1getguarantorbillingholdflag)||
+|[getGuarantorBirthPlace](#gt1getguarantorbirthplace)||
+|[getGuarantorBusinessPhone](#gt1getguarantorbusinessphone)||
+|[getGuarantorChargeAdjustmentCode](#gt1getguarantorchargeadjustmentcode)||
+|[getGuarantorCreditRatingCode](#gt1getguarantorcreditratingcode)||
+|[getGuarantorDateOfBirth](#gt1getguarantordateofbirth)||
+|[getGuarantorDeathDateAndTime](#gt1getguarantordeathdateandtime)||
+|[getGuarantorDeathFlag](#gt1getguarantordeathflag)||
+|[getGuarantorEmployeeID](#gt1getguarantoremployeeid)||
+|[getGuarantorEmployerAddress](#gt1getguarantoremployeraddress)||
+|[getGuarantorEmployerID](#gt1getguarantoremployerid)||
+|[getGuarantorEmployerName](#gt1getguarantoremployername)||
+|[getGuarantorEmployerPhone](#gt1getguarantoremployerphone)||
+|[getGuarantorEmployersOrganizationName](#gt1getguarantoremployersorganizationname)||
+|[getGuarantorEmploymentStatus](#gt1getguarantoremploymentstatus)||
+|[getGuarantorEndDate](#gt1getguarantorenddate)||
+|[getGuarantorFinancialClass](#gt1getguarantorfinancialclass)||
+|[getGuarantorHireEffectiveDate](#gt1getguarantorhireeffectivedate)||
+|[getGuarantorHomePhone](#gt1getguarantorhomephone)||
+|[getGuarantorHouseholdSize](#gt1getguarantorhouseholdsize)||
+|[getGuarantorMaritalStatusCode](#gt1getguarantormaritalstatuscode)||
+|[getGuarantorName](#gt1getguarantorname)||
+|[getGuarantorNumber](#gt1getguarantornumber)||
+|[getGuarantorOrganizationName](#gt1getguarantororganizationname)||
+|[getGuarantorPriority](#gt1getguarantorpriority)||
+|[getGuarantorRace](#gt1getguarantorrace)||
+|[getGuarantorRelationship](#gt1getguarantorrelationship)||
+|[getGuarantorSSN](#gt1getguarantorssn)||
+|[getGuarantorSex](#gt1getguarantorsex)||
+|[getGuarantorSpouseName](#gt1getguarantorspousename)||
+|[getGuarantorType](#gt1getguarantortype)||
+|[getHandicap](#gt1gethandicap)||
+|[getID](#gt1getid)||
+|[getJobClass](#gt1getjobclass)||
+|[getJobStatus](#gt1getjobstatus)||
+|[getJobTitle](#gt1getjobtitle)||
+|[getLivingArrangement](#gt1getlivingarrangement)||
+|[getLivingDependency](#gt1getlivingdependency)||
+|[getMotherMaidenName](#gt1getmothermaidenname)||
+|[getNationality](#gt1getnationality)||
+|[getPrimaryLanguage](#gt1getprimarylanguage)||
+|[getProtectionIndicator](#gt1getprotectionindicator)||
+|[getPublicityCode](#gt1getpublicitycode)||
+|[getReligion](#gt1getreligion)||
+|[getStudentIndicator](#gt1getstudentindicator)||
+|[getVipIndicator](#gt1getvipindicator)||
+|[resetIndex](#gt1resetindex)|Reset index of this segment|
+|[setAmbulatoryStatus](#gt1setambulatorystatus)||
+|[setCitizenship](#gt1setcitizenship)||
+|[setContactPersonsName](#gt1setcontactpersonsname)||
+|[setContactPersonsPhone](#gt1setcontactpersonsphone)||
+|[setContactReason](#gt1setcontactreason)||
+|[setContactRelationship](#gt1setcontactrelationship)||
+|[setEmploymentStopDate](#gt1setemploymentstopdate)||
+|[setEthnicGroup](#gt1setethnicgroup)||
+|[setGuarantorAddress](#gt1setguarantoraddress)||
+|[setGuarantorAnnualIncome](#gt1setguarantorannualincome)||
+|[setGuarantorBeginDate](#gt1setguarantorbegindate)||
+|[setGuarantorBillingHoldFlag](#gt1setguarantorbillingholdflag)||
+|[setGuarantorBirthPlace](#gt1setguarantorbirthplace)||
+|[setGuarantorBusinessPhone](#gt1setguarantorbusinessphone)||
+|[setGuarantorChargeAdjustmentCode](#gt1setguarantorchargeadjustmentcode)||
+|[setGuarantorCreditRatingCode](#gt1setguarantorcreditratingcode)||
+|[setGuarantorDateOfBirth](#gt1setguarantordateofbirth)||
+|[setGuarantorDeathDateAndTime](#gt1setguarantordeathdateandtime)||
+|[setGuarantorDeathFlag](#gt1setguarantordeathflag)||
+|[setGuarantorEmployeeID](#gt1setguarantoremployeeid)||
+|[setGuarantorEmployerAddress](#gt1setguarantoremployeraddress)||
+|[setGuarantorEmployerID](#gt1setguarantoremployerid)||
+|[setGuarantorEmployerName](#gt1setguarantoremployername)||
+|[setGuarantorEmployerPhone](#gt1setguarantoremployerphone)||
+|[setGuarantorEmployersOrganizationName](#gt1setguarantoremployersorganizationname)||
+|[setGuarantorEmploymentStatus](#gt1setguarantoremploymentstatus)||
+|[setGuarantorEndDate](#gt1setguarantorenddate)||
+|[setGuarantorFinancialClass](#gt1setguarantorfinancialclass)||
+|[setGuarantorHireEffectiveDate](#gt1setguarantorhireeffectivedate)||
+|[setGuarantorHomePhone](#gt1setguarantorhomephone)||
+|[setGuarantorHouseholdSize](#gt1setguarantorhouseholdsize)||
+|[setGuarantorMaritalStatusCode](#gt1setguarantormaritalstatuscode)||
+|[setGuarantorName](#gt1setguarantorname)||
+|[setGuarantorNumber](#gt1setguarantornumber)||
+|[setGuarantorOrganizationName](#gt1setguarantororganizationname)||
+|[setGuarantorPriority](#gt1setguarantorpriority)||
+|[setGuarantorRace](#gt1setguarantorrace)||
+|[setGuarantorRelationship](#gt1setguarantorrelationship)||
+|[setGuarantorSSN](#gt1setguarantorssn)||
+|[setGuarantorSex](#gt1setguarantorsex)||
+|[setGuarantorSpouseName](#gt1setguarantorspousename)||
+|[setGuarantorType](#gt1setguarantortype)||
+|[setHandicap](#gt1sethandicap)||
+|[setID](#gt1setid)||
+|[setJobClass](#gt1setjobclass)||
+|[setJobStatus](#gt1setjobstatus)||
+|[setJobTitle](#gt1setjobtitle)||
+|[setLivingArrangement](#gt1setlivingarrangement)||
+|[setLivingDependency](#gt1setlivingdependency)||
+|[setMotherMaidenName](#gt1setmothermaidenname)||
+|[setNationality](#gt1setnationality)||
+|[setPrimaryLanguage](#gt1setprimarylanguage)||
+|[setProtectionIndicator](#gt1setprotectionindicator)||
+|[setPublicityCode](#gt1setpublicitycode)||
+|[setReligion](#gt1setreligion)||
+|[setStudentIndicator](#gt1setstudentindicator)||
+|[setVipIndicator](#gt1setvipindicator)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### GT1::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getAmbulatoryStatus
+
+**Description**
+
+```php
+ getAmbulatoryStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getCitizenship
+
+**Description**
+
+```php
+ getCitizenship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getContactPersonsName
+
+**Description**
+
+```php
+ getContactPersonsName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getContactPersonsPhone
+
+**Description**
+
+```php
+ getContactPersonsPhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getContactReason
+
+**Description**
+
+```php
+ getContactReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getContactRelationship
+
+**Description**
+
+```php
+ getContactRelationship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getEmploymentStopDate
+
+**Description**
+
+```php
+ getEmploymentStopDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getEthnicGroup
+
+**Description**
+
+```php
+ getEthnicGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorAddress
+
+**Description**
+
+```php
+ getGuarantorAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorAnnualIncome
+
+**Description**
+
+```php
+ getGuarantorAnnualIncome (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorBeginDate
+
+**Description**
+
+```php
+ getGuarantorBeginDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorBillingHoldFlag
+
+**Description**
+
+```php
+ getGuarantorBillingHoldFlag (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorBirthPlace
+
+**Description**
+
+```php
+ getGuarantorBirthPlace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorBusinessPhone
+
+**Description**
+
+```php
+ getGuarantorBusinessPhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorChargeAdjustmentCode
+
+**Description**
+
+```php
+ getGuarantorChargeAdjustmentCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorCreditRatingCode
+
+**Description**
+
+```php
+ getGuarantorCreditRatingCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorDateOfBirth
+
+**Description**
+
+```php
+ getGuarantorDateOfBirth (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorDeathDateAndTime
+
+**Description**
+
+```php
+ getGuarantorDeathDateAndTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorDeathFlag
+
+**Description**
+
+```php
+ getGuarantorDeathFlag (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmployeeID
+
+**Description**
+
+```php
+ getGuarantorEmployeeID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmployerAddress
+
+**Description**
+
+```php
+ getGuarantorEmployerAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmployerID
+
+**Description**
+
+```php
+ getGuarantorEmployerID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmployerName
+
+**Description**
+
+```php
+ getGuarantorEmployerName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmployerPhone
+
+**Description**
+
+```php
+ getGuarantorEmployerPhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmployersOrganizationName
+
+**Description**
+
+```php
+ getGuarantorEmployersOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEmploymentStatus
+
+**Description**
+
+```php
+ getGuarantorEmploymentStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorEndDate
+
+**Description**
+
+```php
+ getGuarantorEndDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorFinancialClass
+
+**Description**
+
+```php
+ getGuarantorFinancialClass (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorHireEffectiveDate
+
+**Description**
+
+```php
+ getGuarantorHireEffectiveDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorHomePhone
+
+**Description**
+
+```php
+ getGuarantorHomePhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorHouseholdSize
+
+**Description**
+
+```php
+ getGuarantorHouseholdSize (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorMaritalStatusCode
+
+**Description**
+
+```php
+ getGuarantorMaritalStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorName
+
+**Description**
+
+```php
+ getGuarantorName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorNumber
+
+**Description**
+
+```php
+ getGuarantorNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorOrganizationName
+
+**Description**
+
+```php
+ getGuarantorOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorPriority
+
+**Description**
+
+```php
+ getGuarantorPriority (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorRace
+
+**Description**
+
+```php
+ getGuarantorRace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorRelationship
+
+**Description**
+
+```php
+ getGuarantorRelationship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorSSN
+
+**Description**
+
+```php
+ getGuarantorSSN (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorSex
+
+**Description**
+
+```php
+ getGuarantorSex (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorSpouseName
+
+**Description**
+
+```php
+ getGuarantorSpouseName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getGuarantorType
+
+**Description**
+
+```php
+ getGuarantorType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getHandicap
+
+**Description**
+
+```php
+ getHandicap (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getID
+
+**Description**
+
+```php
+ getID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getJobClass
+
+**Description**
+
+```php
+ getJobClass (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getJobStatus
+
+**Description**
+
+```php
+ getJobStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getJobTitle
+
+**Description**
+
+```php
+ getJobTitle (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getLivingArrangement
+
+**Description**
+
+```php
+ getLivingArrangement (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getLivingDependency
+
+**Description**
+
+```php
+ getLivingDependency (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getMotherMaidenName
+
+**Description**
+
+```php
+ getMotherMaidenName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getNationality
+
+**Description**
+
+```php
+ getNationality (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getPrimaryLanguage
+
+**Description**
+
+```php
+ getPrimaryLanguage (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getProtectionIndicator
+
+**Description**
+
+```php
+ getProtectionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getPublicityCode
+
+**Description**
+
+```php
+ getPublicityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getReligion
+
+**Description**
+
+```php
+ getReligion (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getStudentIndicator
+
+**Description**
+
+```php
+ getStudentIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::getVipIndicator
+
+**Description**
+
+```php
+ getVipIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setAmbulatoryStatus
+
+**Description**
+
+```php
+ setAmbulatoryStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setCitizenship
+
+**Description**
+
+```php
+ setCitizenship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setContactPersonsName
+
+**Description**
+
+```php
+ setContactPersonsName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setContactPersonsPhone
+
+**Description**
+
+```php
+ setContactPersonsPhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setContactReason
+
+**Description**
+
+```php
+ setContactReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setContactRelationship
+
+**Description**
+
+```php
+ setContactRelationship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setEmploymentStopDate
+
+**Description**
+
+```php
+ setEmploymentStopDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setEthnicGroup
+
+**Description**
+
+```php
+ setEthnicGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorAddress
+
+**Description**
+
+```php
+ setGuarantorAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorAnnualIncome
+
+**Description**
+
+```php
+ setGuarantorAnnualIncome (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorBeginDate
+
+**Description**
+
+```php
+ setGuarantorBeginDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorBillingHoldFlag
+
+**Description**
+
+```php
+ setGuarantorBillingHoldFlag (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorBirthPlace
+
+**Description**
+
+```php
+ setGuarantorBirthPlace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorBusinessPhone
+
+**Description**
+
+```php
+ setGuarantorBusinessPhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorChargeAdjustmentCode
+
+**Description**
+
+```php
+ setGuarantorChargeAdjustmentCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorCreditRatingCode
+
+**Description**
+
+```php
+ setGuarantorCreditRatingCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorDateOfBirth
+
+**Description**
+
+```php
+ setGuarantorDateOfBirth (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorDeathDateAndTime
+
+**Description**
+
+```php
+ setGuarantorDeathDateAndTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorDeathFlag
+
+**Description**
+
+```php
+ setGuarantorDeathFlag (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmployeeID
+
+**Description**
+
+```php
+ setGuarantorEmployeeID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmployerAddress
+
+**Description**
+
+```php
+ setGuarantorEmployerAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmployerID
+
+**Description**
+
+```php
+ setGuarantorEmployerID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmployerName
+
+**Description**
+
+```php
+ setGuarantorEmployerName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmployerPhone
+
+**Description**
+
+```php
+ setGuarantorEmployerPhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmployersOrganizationName
+
+**Description**
+
+```php
+ setGuarantorEmployersOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEmploymentStatus
+
+**Description**
+
+```php
+ setGuarantorEmploymentStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorEndDate
+
+**Description**
+
+```php
+ setGuarantorEndDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorFinancialClass
+
+**Description**
+
+```php
+ setGuarantorFinancialClass (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorHireEffectiveDate
+
+**Description**
+
+```php
+ setGuarantorHireEffectiveDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorHomePhone
+
+**Description**
+
+```php
+ setGuarantorHomePhone (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorHouseholdSize
+
+**Description**
+
+```php
+ setGuarantorHouseholdSize (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorMaritalStatusCode
+
+**Description**
+
+```php
+ setGuarantorMaritalStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorName
+
+**Description**
+
+```php
+ setGuarantorName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorNumber
+
+**Description**
+
+```php
+ setGuarantorNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorOrganizationName
+
+**Description**
+
+```php
+ setGuarantorOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorPriority
+
+**Description**
+
+```php
+ setGuarantorPriority (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorRace
+
+**Description**
+
+```php
+ setGuarantorRace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorRelationship
+
+**Description**
+
+```php
+ setGuarantorRelationship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorSSN
+
+**Description**
+
+```php
+ setGuarantorSSN (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorSex
+
+**Description**
+
+```php
+ setGuarantorSex (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorSpouseName
+
+**Description**
+
+```php
+ setGuarantorSpouseName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setGuarantorType
+
+**Description**
+
+```php
+ setGuarantorType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setHandicap
+
+**Description**
+
+```php
+ setHandicap (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setID
+
+**Description**
+
+```php
+ setID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setJobClass
+
+**Description**
+
+```php
+ setJobClass (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setJobStatus
+
+**Description**
+
+```php
+ setJobStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setJobTitle
+
+**Description**
+
+```php
+ setJobTitle (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setLivingArrangement
+
+**Description**
+
+```php
+ setLivingArrangement (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setLivingDependency
+
+**Description**
+
+```php
+ setLivingDependency (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setMotherMaidenName
+
+**Description**
+
+```php
+ setMotherMaidenName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setNationality
+
+**Description**
+
+```php
+ setNationality (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setPrimaryLanguage
+
+**Description**
+
+```php
+ setPrimaryLanguage (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setProtectionIndicator
+
+**Description**
+
+```php
+ setProtectionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setPublicityCode
+
+**Description**
+
+```php
+ setPublicityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setReligion
+
+**Description**
+
+```php
+ setReligion (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setStudentIndicator
+
+**Description**
+
+```php
+ setStudentIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### GT1::setVipIndicator
+
+**Description**
+
+```php
+ setVipIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/IN1.md b/docs/Segments/IN1.md
index b0f7e7d..2b2bd56 100644
--- a/docs/Segments/IN1.md
+++ b/docs/Segments/IN1.md
@@ -13,6 +13,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#in1__destruct)||
|[getAssignmentOfBenefits](#in1getassignmentofbenefits)||
|[getAuthorizationInformation](#in1getauthorizationinformation)||
|[getBillingStatus](#in1getbillingstatus)||
@@ -62,6 +63,7 @@ Aranyasen\HL7\Segment
|[getVerificationBy](#in1getverificationby)||
|[getVerificationDateTime](#in1getverificationdatetime)||
|[getVerificationStatus](#in1getverificationstatus)||
+|[resetIndex](#in1resetindex)|Reset index of this segment|
|[setAssignmentOfBenefits](#in1setassignmentofbenefits)||
|[setAuthorizationInformation](#in1setauthorizationinformation)||
|[setBillingStatus](#in1setbillingstatus)||
@@ -117,6 +119,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -125,12 +128,36 @@ Aranyasen\HL7\Segment
+### IN1::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### IN1::getAssignmentOfBenefits
**Description**
```php
-public getAssignmentOfBenefits (void)
+ getAssignmentOfBenefits (void)
```
@@ -145,6 +172,7 @@ public getAssignmentOfBenefits (void)
`void`
+
@@ -153,7 +181,7 @@ public getAssignmentOfBenefits (void)
**Description**
```php
-public getAuthorizationInformation (void)
+ getAuthorizationInformation (void)
```
@@ -168,6 +196,7 @@ public getAuthorizationInformation (void)
`void`
+
@@ -176,7 +205,7 @@ public getAuthorizationInformation (void)
**Description**
```php
-public getBillingStatus (void)
+ getBillingStatus (void)
```
@@ -191,6 +220,7 @@ public getBillingStatus (void)
`void`
+
@@ -199,7 +229,7 @@ public getBillingStatus (void)
**Description**
```php
-public getCompanyPlanCode (void)
+ getCompanyPlanCode (void)
```
@@ -214,6 +244,7 @@ public getCompanyPlanCode (void)
`void`
+
@@ -222,7 +253,7 @@ public getCompanyPlanCode (void)
**Description**
```php
-public getCoordOfBenPriority (void)
+ getCoordOfBenPriority (void)
```
@@ -237,6 +268,7 @@ public getCoordOfBenPriority (void)
`void`
+
@@ -245,7 +277,7 @@ public getCoordOfBenPriority (void)
**Description**
```php
-public getCoordinationOfBenefits (void)
+ getCoordinationOfBenefits (void)
```
@@ -260,6 +292,7 @@ public getCoordinationOfBenefits (void)
`void`
+
@@ -268,7 +301,7 @@ public getCoordinationOfBenefits (void)
**Description**
```php
-public getCoverageType (void)
+ getCoverageType (void)
```
@@ -283,6 +316,7 @@ public getCoverageType (void)
`void`
+
@@ -291,7 +325,7 @@ public getCoverageType (void)
**Description**
```php
-public getDelayBeforeLRDay (void)
+ getDelayBeforeLRDay (void)
```
@@ -306,6 +340,7 @@ public getDelayBeforeLRDay (void)
`void`
+
@@ -314,7 +349,7 @@ public getDelayBeforeLRDay (void)
**Description**
```php
-public getGroupName (void)
+ getGroupName (void)
```
@@ -329,6 +364,7 @@ public getGroupName (void)
`void`
+
@@ -337,7 +373,7 @@ public getGroupName (void)
**Description**
```php
-public getGroupNumber (void)
+ getGroupNumber (void)
```
@@ -352,6 +388,7 @@ public getGroupNumber (void)
`void`
+
@@ -360,7 +397,7 @@ public getGroupNumber (void)
**Description**
```php
-public getHandicap (void)
+ getHandicap (void)
```
@@ -375,6 +412,7 @@ public getHandicap (void)
`void`
+
@@ -383,7 +421,7 @@ public getHandicap (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -398,6 +436,7 @@ public getID (void)
`void`
+
@@ -406,7 +445,7 @@ public getID (void)
**Description**
```php
-public getInsuranceCoContactPerson (void)
+ getInsuranceCoContactPerson (void)
```
@@ -421,6 +460,7 @@ public getInsuranceCoContactPerson (void)
`void`
+
@@ -429,7 +469,7 @@ public getInsuranceCoContactPerson (void)
**Description**
```php
-public getInsuranceCoPhoneNumber (void)
+ getInsuranceCoPhoneNumber (void)
```
@@ -444,6 +484,7 @@ public getInsuranceCoPhoneNumber (void)
`void`
+
@@ -452,7 +493,7 @@ public getInsuranceCoPhoneNumber (void)
**Description**
```php
-public getInsuranceCompanyAddress (void)
+ getInsuranceCompanyAddress (void)
```
@@ -467,6 +508,7 @@ public getInsuranceCompanyAddress (void)
`void`
+
@@ -475,7 +517,7 @@ public getInsuranceCompanyAddress (void)
**Description**
```php
-public getInsuranceCompanyID (void)
+ getInsuranceCompanyID (void)
```
@@ -490,6 +532,7 @@ public getInsuranceCompanyID (void)
`void`
+
@@ -498,7 +541,7 @@ public getInsuranceCompanyID (void)
**Description**
```php
-public getInsuranceCompanyName (void)
+ getInsuranceCompanyName (void)
```
@@ -513,6 +556,7 @@ public getInsuranceCompanyName (void)
`void`
+
@@ -521,7 +565,7 @@ public getInsuranceCompanyName (void)
**Description**
```php
-public getInsurancePlanID (void)
+ getInsurancePlanID (void)
```
@@ -536,6 +580,7 @@ public getInsurancePlanID (void)
`void`
+
@@ -544,7 +589,7 @@ public getInsurancePlanID (void)
**Description**
```php
-public getInsuredsAddress (void)
+ getInsuredsAddress (void)
```
@@ -559,6 +604,7 @@ public getInsuredsAddress (void)
`void`
+
@@ -567,7 +613,7 @@ public getInsuredsAddress (void)
**Description**
```php
-public getInsuredsDateOfBirth (void)
+ getInsuredsDateOfBirth (void)
```
@@ -582,6 +628,7 @@ public getInsuredsDateOfBirth (void)
`void`
+
@@ -590,7 +637,7 @@ public getInsuredsDateOfBirth (void)
**Description**
```php
-public getInsuredsEmployersAddress (void)
+ getInsuredsEmployersAddress (void)
```
@@ -605,6 +652,7 @@ public getInsuredsEmployersAddress (void)
`void`
+
@@ -613,7 +661,7 @@ public getInsuredsEmployersAddress (void)
**Description**
```php
-public getInsuredsEmploymentStatus (void)
+ getInsuredsEmploymentStatus (void)
```
@@ -628,6 +676,7 @@ public getInsuredsEmploymentStatus (void)
`void`
+
@@ -636,7 +685,7 @@ public getInsuredsEmploymentStatus (void)
**Description**
```php
-public getInsuredsGroupEmpID (void)
+ getInsuredsGroupEmpID (void)
```
@@ -651,6 +700,7 @@ public getInsuredsGroupEmpID (void)
`void`
+
@@ -659,7 +709,7 @@ public getInsuredsGroupEmpID (void)
**Description**
```php
-public getInsuredsGroupEmpName (void)
+ getInsuredsGroupEmpName (void)
```
@@ -674,6 +724,7 @@ public getInsuredsGroupEmpName (void)
`void`
+
@@ -682,7 +733,7 @@ public getInsuredsGroupEmpName (void)
**Description**
```php
-public getInsuredsIDNumber (void)
+ getInsuredsIDNumber (void)
```
@@ -697,6 +748,7 @@ public getInsuredsIDNumber (void)
`void`
+
@@ -705,7 +757,7 @@ public getInsuredsIDNumber (void)
**Description**
```php
-public getInsuredsRelationshipToPatient (void)
+ getInsuredsRelationshipToPatient (void)
```
@@ -720,6 +772,7 @@ public getInsuredsRelationshipToPatient (void)
`void`
+
@@ -728,7 +781,7 @@ public getInsuredsRelationshipToPatient (void)
**Description**
```php
-public getInsuredsSex (void)
+ getInsuredsSex (void)
```
@@ -743,6 +796,7 @@ public getInsuredsSex (void)
`void`
+
@@ -751,7 +805,7 @@ public getInsuredsSex (void)
**Description**
```php
-public getLifetimeReserveDays (void)
+ getLifetimeReserveDays (void)
```
@@ -766,6 +820,7 @@ public getLifetimeReserveDays (void)
`void`
+
@@ -774,7 +829,7 @@ public getLifetimeReserveDays (void)
**Description**
```php
-public getNameOfInsured (void)
+ getNameOfInsured (void)
```
@@ -789,6 +844,7 @@ public getNameOfInsured (void)
`void`
+
@@ -797,7 +853,7 @@ public getNameOfInsured (void)
**Description**
```php
-public getNoticeOfAdmissionDate (void)
+ getNoticeOfAdmissionDate (void)
```
@@ -812,6 +868,7 @@ public getNoticeOfAdmissionDate (void)
`void`
+
@@ -820,7 +877,7 @@ public getNoticeOfAdmissionDate (void)
**Description**
```php
-public getNoticeOfAdmissionFlag (void)
+ getNoticeOfAdmissionFlag (void)
```
@@ -835,6 +892,7 @@ public getNoticeOfAdmissionFlag (void)
`void`
+
@@ -843,7 +901,7 @@ public getNoticeOfAdmissionFlag (void)
**Description**
```php
-public getPlanEffectiveDate (void)
+ getPlanEffectiveDate (void)
```
@@ -858,6 +916,7 @@ public getPlanEffectiveDate (void)
`void`
+
@@ -866,7 +925,7 @@ public getPlanEffectiveDate (void)
**Description**
```php
-public getPlanExpirationDate (void)
+ getPlanExpirationDate (void)
```
@@ -881,6 +940,7 @@ public getPlanExpirationDate (void)
`void`
+
@@ -889,7 +949,7 @@ public getPlanExpirationDate (void)
**Description**
```php
-public getPlanType (void)
+ getPlanType (void)
```
@@ -904,6 +964,7 @@ public getPlanType (void)
`void`
+
@@ -912,7 +973,7 @@ public getPlanType (void)
**Description**
```php
-public getPolicyDeductible (void)
+ getPolicyDeductible (void)
```
@@ -927,6 +988,7 @@ public getPolicyDeductible (void)
`void`
+
@@ -935,7 +997,7 @@ public getPolicyDeductible (void)
**Description**
```php
-public getPolicyLimitAmount (void)
+ getPolicyLimitAmount (void)
```
@@ -950,6 +1012,7 @@ public getPolicyLimitAmount (void)
`void`
+
@@ -958,7 +1021,7 @@ public getPolicyLimitAmount (void)
**Description**
```php
-public getPolicyLimitDays (void)
+ getPolicyLimitDays (void)
```
@@ -973,6 +1036,7 @@ public getPolicyLimitDays (void)
`void`
+
@@ -981,7 +1045,7 @@ public getPolicyLimitDays (void)
**Description**
```php
-public getPolicyNumber (void)
+ getPolicyNumber (void)
```
@@ -996,6 +1060,7 @@ public getPolicyNumber (void)
`void`
+
@@ -1004,7 +1069,7 @@ public getPolicyNumber (void)
**Description**
```php
-public getPreAdmitCertPAC (void)
+ getPreAdmitCertPAC (void)
```
@@ -1019,6 +1084,7 @@ public getPreAdmitCertPAC (void)
`void`
+
@@ -1027,7 +1093,7 @@ public getPreAdmitCertPAC (void)
**Description**
```php
-public getPriorInsurancePlanID (void)
+ getPriorInsurancePlanID (void)
```
@@ -1042,6 +1108,7 @@ public getPriorInsurancePlanID (void)
`void`
+
@@ -1050,7 +1117,7 @@ public getPriorInsurancePlanID (void)
**Description**
```php
-public getReleaseInformationCode (void)
+ getReleaseInformationCode (void)
```
@@ -1065,6 +1132,7 @@ public getReleaseInformationCode (void)
`void`
+
@@ -1073,7 +1141,7 @@ public getReleaseInformationCode (void)
**Description**
```php
-public getReportOfEligibilityDate (void)
+ getReportOfEligibilityDate (void)
```
@@ -1088,6 +1156,7 @@ public getReportOfEligibilityDate (void)
`void`
+
@@ -1096,7 +1165,7 @@ public getReportOfEligibilityDate (void)
**Description**
```php
-public getReportOfEligibilityFlag (void)
+ getReportOfEligibilityFlag (void)
```
@@ -1111,6 +1180,7 @@ public getReportOfEligibilityFlag (void)
`void`
+
@@ -1119,7 +1189,7 @@ public getReportOfEligibilityFlag (void)
**Description**
```php
-public getRoomRatePrivate (void)
+ getRoomRatePrivate (void)
```
@@ -1134,6 +1204,7 @@ public getRoomRatePrivate (void)
`void`
+
@@ -1142,7 +1213,7 @@ public getRoomRatePrivate (void)
**Description**
```php
-public getRoomRateSemiPrivate (void)
+ getRoomRateSemiPrivate (void)
```
@@ -1157,6 +1228,7 @@ public getRoomRateSemiPrivate (void)
`void`
+
@@ -1165,7 +1237,7 @@ public getRoomRateSemiPrivate (void)
**Description**
```php
-public getTypeOfAgreementCode (void)
+ getTypeOfAgreementCode (void)
```
@@ -1180,6 +1252,7 @@ public getTypeOfAgreementCode (void)
`void`
+
@@ -1188,7 +1261,7 @@ public getTypeOfAgreementCode (void)
**Description**
```php
-public getVerificationBy (void)
+ getVerificationBy (void)
```
@@ -1203,6 +1276,7 @@ public getVerificationBy (void)
`void`
+
@@ -1211,7 +1285,7 @@ public getVerificationBy (void)
**Description**
```php
-public getVerificationDateTime (void)
+ getVerificationDateTime (void)
```
@@ -1226,6 +1300,7 @@ public getVerificationDateTime (void)
`void`
+
@@ -1234,7 +1309,7 @@ public getVerificationDateTime (void)
**Description**
```php
-public getVerificationStatus (void)
+ getVerificationStatus (void)
```
@@ -1249,6 +1324,31 @@ public getVerificationStatus (void)
`void`
+
+
+
+
+### IN1::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -1257,7 +1357,7 @@ public getVerificationStatus (void)
**Description**
```php
-public setAssignmentOfBenefits (void)
+ setAssignmentOfBenefits (void)
```
@@ -1272,6 +1372,7 @@ public setAssignmentOfBenefits (void)
`void`
+
@@ -1280,7 +1381,7 @@ public setAssignmentOfBenefits (void)
**Description**
```php
-public setAuthorizationInformation (void)
+ setAuthorizationInformation (void)
```
@@ -1295,6 +1396,7 @@ public setAuthorizationInformation (void)
`void`
+
@@ -1303,7 +1405,7 @@ public setAuthorizationInformation (void)
**Description**
```php
-public setBillingStatus (void)
+ setBillingStatus (void)
```
@@ -1318,6 +1420,7 @@ public setBillingStatus (void)
`void`
+
@@ -1326,7 +1429,7 @@ public setBillingStatus (void)
**Description**
```php
-public setCompanyPlanCode (void)
+ setCompanyPlanCode (void)
```
@@ -1341,6 +1444,7 @@ public setCompanyPlanCode (void)
`void`
+
@@ -1349,7 +1453,7 @@ public setCompanyPlanCode (void)
**Description**
```php
-public setCoordOfBenPriority (void)
+ setCoordOfBenPriority (void)
```
@@ -1364,6 +1468,7 @@ public setCoordOfBenPriority (void)
`void`
+
@@ -1372,7 +1477,7 @@ public setCoordOfBenPriority (void)
**Description**
```php
-public setCoordinationOfBenefits (void)
+ setCoordinationOfBenefits (void)
```
@@ -1387,6 +1492,7 @@ public setCoordinationOfBenefits (void)
`void`
+
@@ -1395,7 +1501,7 @@ public setCoordinationOfBenefits (void)
**Description**
```php
-public setCoverageType (void)
+ setCoverageType (void)
```
@@ -1410,6 +1516,7 @@ public setCoverageType (void)
`void`
+
@@ -1418,7 +1525,7 @@ public setCoverageType (void)
**Description**
```php
-public setDelayBeforeLRDay (void)
+ setDelayBeforeLRDay (void)
```
@@ -1433,6 +1540,7 @@ public setDelayBeforeLRDay (void)
`void`
+
@@ -1441,7 +1549,7 @@ public setDelayBeforeLRDay (void)
**Description**
```php
-public setGroupName (void)
+ setGroupName (void)
```
@@ -1456,6 +1564,7 @@ public setGroupName (void)
`void`
+
@@ -1464,7 +1573,7 @@ public setGroupName (void)
**Description**
```php
-public setGroupNumber (void)
+ setGroupNumber (void)
```
@@ -1479,6 +1588,7 @@ public setGroupNumber (void)
`void`
+
@@ -1487,7 +1597,7 @@ public setGroupNumber (void)
**Description**
```php
-public setHandicap (void)
+ setHandicap (void)
```
@@ -1502,6 +1612,7 @@ public setHandicap (void)
`void`
+
@@ -1510,7 +1621,7 @@ public setHandicap (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -1525,6 +1636,7 @@ public setID (void)
`void`
+
@@ -1533,7 +1645,7 @@ public setID (void)
**Description**
```php
-public setInsuranceCoContactPerson (void)
+ setInsuranceCoContactPerson (void)
```
@@ -1548,6 +1660,7 @@ public setInsuranceCoContactPerson (void)
`void`
+
@@ -1556,7 +1669,7 @@ public setInsuranceCoContactPerson (void)
**Description**
```php
-public setInsuranceCoPhoneNumber (void)
+ setInsuranceCoPhoneNumber (void)
```
@@ -1571,6 +1684,7 @@ public setInsuranceCoPhoneNumber (void)
`void`
+
@@ -1579,7 +1693,7 @@ public setInsuranceCoPhoneNumber (void)
**Description**
```php
-public setInsuranceCompanyAddress (void)
+ setInsuranceCompanyAddress (void)
```
@@ -1594,6 +1708,7 @@ public setInsuranceCompanyAddress (void)
`void`
+
@@ -1602,7 +1717,7 @@ public setInsuranceCompanyAddress (void)
**Description**
```php
-public setInsuranceCompanyID (void)
+ setInsuranceCompanyID (void)
```
@@ -1617,6 +1732,7 @@ public setInsuranceCompanyID (void)
`void`
+
@@ -1625,7 +1741,7 @@ public setInsuranceCompanyID (void)
**Description**
```php
-public setInsuranceCompanyName (void)
+ setInsuranceCompanyName (void)
```
@@ -1640,6 +1756,7 @@ public setInsuranceCompanyName (void)
`void`
+
@@ -1648,7 +1765,7 @@ public setInsuranceCompanyName (void)
**Description**
```php
-public setInsurancePlanID (void)
+ setInsurancePlanID (void)
```
@@ -1663,6 +1780,7 @@ public setInsurancePlanID (void)
`void`
+
@@ -1671,7 +1789,7 @@ public setInsurancePlanID (void)
**Description**
```php
-public setInsuredsAddress (void)
+ setInsuredsAddress (void)
```
@@ -1686,6 +1804,7 @@ public setInsuredsAddress (void)
`void`
+
@@ -1694,7 +1813,7 @@ public setInsuredsAddress (void)
**Description**
```php
-public setInsuredsDateOfBirth (void)
+ setInsuredsDateOfBirth (void)
```
@@ -1709,6 +1828,7 @@ public setInsuredsDateOfBirth (void)
`void`
+
@@ -1717,7 +1837,7 @@ public setInsuredsDateOfBirth (void)
**Description**
```php
-public setInsuredsEmployersAddress (void)
+ setInsuredsEmployersAddress (void)
```
@@ -1732,6 +1852,7 @@ public setInsuredsEmployersAddress (void)
`void`
+
@@ -1740,7 +1861,7 @@ public setInsuredsEmployersAddress (void)
**Description**
```php
-public setInsuredsEmploymentStatus (void)
+ setInsuredsEmploymentStatus (void)
```
@@ -1755,6 +1876,7 @@ public setInsuredsEmploymentStatus (void)
`void`
+
@@ -1763,7 +1885,7 @@ public setInsuredsEmploymentStatus (void)
**Description**
```php
-public setInsuredsGroupEmpID (void)
+ setInsuredsGroupEmpID (void)
```
@@ -1778,6 +1900,7 @@ public setInsuredsGroupEmpID (void)
`void`
+
@@ -1786,7 +1909,7 @@ public setInsuredsGroupEmpID (void)
**Description**
```php
-public setInsuredsGroupEmpName (void)
+ setInsuredsGroupEmpName (void)
```
@@ -1801,6 +1924,7 @@ public setInsuredsGroupEmpName (void)
`void`
+
@@ -1809,7 +1933,7 @@ public setInsuredsGroupEmpName (void)
**Description**
```php
-public setInsuredsIDNumber (void)
+ setInsuredsIDNumber (void)
```
@@ -1824,6 +1948,7 @@ public setInsuredsIDNumber (void)
`void`
+
@@ -1832,7 +1957,7 @@ public setInsuredsIDNumber (void)
**Description**
```php
-public setInsuredsRelationshipToPatient (void)
+ setInsuredsRelationshipToPatient (void)
```
@@ -1847,6 +1972,7 @@ public setInsuredsRelationshipToPatient (void)
`void`
+
@@ -1855,7 +1981,7 @@ public setInsuredsRelationshipToPatient (void)
**Description**
```php
-public setInsuredsSex (void)
+ setInsuredsSex (void)
```
@@ -1870,6 +1996,7 @@ public setInsuredsSex (void)
`void`
+
@@ -1878,7 +2005,7 @@ public setInsuredsSex (void)
**Description**
```php
-public setLifetimeReserveDays (void)
+ setLifetimeReserveDays (void)
```
@@ -1893,6 +2020,7 @@ public setLifetimeReserveDays (void)
`void`
+
@@ -1901,7 +2029,7 @@ public setLifetimeReserveDays (void)
**Description**
```php
-public setNameOfInsured (void)
+ setNameOfInsured (void)
```
@@ -1916,6 +2044,7 @@ public setNameOfInsured (void)
`void`
+
@@ -1924,7 +2053,7 @@ public setNameOfInsured (void)
**Description**
```php
-public setNoticeOfAdmissionDate (void)
+ setNoticeOfAdmissionDate (void)
```
@@ -1939,6 +2068,7 @@ public setNoticeOfAdmissionDate (void)
`void`
+
@@ -1947,7 +2077,7 @@ public setNoticeOfAdmissionDate (void)
**Description**
```php
-public setNoticeOfAdmissionFlag (void)
+ setNoticeOfAdmissionFlag (void)
```
@@ -1962,6 +2092,7 @@ public setNoticeOfAdmissionFlag (void)
`void`
+
@@ -1970,7 +2101,7 @@ public setNoticeOfAdmissionFlag (void)
**Description**
```php
-public setPlanEffectiveDate (void)
+ setPlanEffectiveDate (void)
```
@@ -1985,6 +2116,7 @@ public setPlanEffectiveDate (void)
`void`
+
@@ -1993,7 +2125,7 @@ public setPlanEffectiveDate (void)
**Description**
```php
-public setPlanExpirationDate (void)
+ setPlanExpirationDate (void)
```
@@ -2008,6 +2140,7 @@ public setPlanExpirationDate (void)
`void`
+
@@ -2016,7 +2149,7 @@ public setPlanExpirationDate (void)
**Description**
```php
-public setPlanType (void)
+ setPlanType (void)
```
@@ -2031,6 +2164,7 @@ public setPlanType (void)
`void`
+
@@ -2039,7 +2173,7 @@ public setPlanType (void)
**Description**
```php
-public setPolicyDeductible (void)
+ setPolicyDeductible (void)
```
@@ -2054,6 +2188,7 @@ public setPolicyDeductible (void)
`void`
+
@@ -2062,7 +2197,7 @@ public setPolicyDeductible (void)
**Description**
```php
-public setPolicyLimitAmount (void)
+ setPolicyLimitAmount (void)
```
@@ -2077,6 +2212,7 @@ public setPolicyLimitAmount (void)
`void`
+
@@ -2085,7 +2221,7 @@ public setPolicyLimitAmount (void)
**Description**
```php
-public setPolicyLimitDays (void)
+ setPolicyLimitDays (void)
```
@@ -2100,6 +2236,7 @@ public setPolicyLimitDays (void)
`void`
+
@@ -2108,7 +2245,7 @@ public setPolicyLimitDays (void)
**Description**
```php
-public setPolicyNumber (void)
+ setPolicyNumber (void)
```
@@ -2123,6 +2260,7 @@ public setPolicyNumber (void)
`void`
+
@@ -2131,7 +2269,7 @@ public setPolicyNumber (void)
**Description**
```php
-public setPreAdmitCertPAC (void)
+ setPreAdmitCertPAC (void)
```
@@ -2146,6 +2284,7 @@ public setPreAdmitCertPAC (void)
`void`
+
@@ -2154,7 +2293,7 @@ public setPreAdmitCertPAC (void)
**Description**
```php
-public setPriorInsurancePlanID (void)
+ setPriorInsurancePlanID (void)
```
@@ -2169,6 +2308,7 @@ public setPriorInsurancePlanID (void)
`void`
+
@@ -2177,7 +2317,7 @@ public setPriorInsurancePlanID (void)
**Description**
```php
-public setReleaseInformationCode (void)
+ setReleaseInformationCode (void)
```
@@ -2192,6 +2332,7 @@ public setReleaseInformationCode (void)
`void`
+
@@ -2200,7 +2341,7 @@ public setReleaseInformationCode (void)
**Description**
```php
-public setReportOfEligibilityDate (void)
+ setReportOfEligibilityDate (void)
```
@@ -2215,6 +2356,7 @@ public setReportOfEligibilityDate (void)
`void`
+
@@ -2223,7 +2365,7 @@ public setReportOfEligibilityDate (void)
**Description**
```php
-public setReportOfEligibilityFlag (void)
+ setReportOfEligibilityFlag (void)
```
@@ -2238,6 +2380,7 @@ public setReportOfEligibilityFlag (void)
`void`
+
@@ -2246,7 +2389,7 @@ public setReportOfEligibilityFlag (void)
**Description**
```php
-public setRoomRatePrivate (void)
+ setRoomRatePrivate (void)
```
@@ -2261,6 +2404,7 @@ public setRoomRatePrivate (void)
`void`
+
@@ -2269,7 +2413,7 @@ public setRoomRatePrivate (void)
**Description**
```php
-public setRoomRateSemiPrivate (void)
+ setRoomRateSemiPrivate (void)
```
@@ -2284,6 +2428,7 @@ public setRoomRateSemiPrivate (void)
`void`
+
@@ -2292,7 +2437,7 @@ public setRoomRateSemiPrivate (void)
**Description**
```php
-public setTypeOfAgreementCode (void)
+ setTypeOfAgreementCode (void)
```
@@ -2307,6 +2452,7 @@ public setTypeOfAgreementCode (void)
`void`
+
@@ -2315,7 +2461,7 @@ public setTypeOfAgreementCode (void)
**Description**
```php
-public setVerificationBy (void)
+ setVerificationBy (void)
```
@@ -2330,6 +2476,7 @@ public setVerificationBy (void)
`void`
+
@@ -2338,7 +2485,7 @@ public setVerificationBy (void)
**Description**
```php
-public setVerificationDateTime (void)
+ setVerificationDateTime (void)
```
@@ -2353,6 +2500,7 @@ public setVerificationDateTime (void)
`void`
+
@@ -2361,7 +2509,7 @@ public setVerificationDateTime (void)
**Description**
```php
-public setVerificationStatus (void)
+ setVerificationStatus (void)
```
@@ -2376,5 +2524,6 @@ public setVerificationStatus (void)
`void`
+
diff --git a/docs/Segments/IN3.md b/docs/Segments/IN3.md
index a323bda..8443061 100644
--- a/docs/Segments/IN3.md
+++ b/docs/Segments/IN3.md
@@ -13,6 +13,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#in3__destruct)||
|[getAppealReason](#in3getappealreason)||
|[getCaseManager](#in3getcasemanager)||
|[getCertificationAgency](#in3getcertificationagency)||
@@ -38,6 +39,7 @@ Aranyasen\HL7\Segment
|[getSecondOpinionDocumentationReceived](#in3getsecondopiniondocumentationreceived)||
|[getSecondOpinionPhysician](#in3getsecondopinionphysician)||
|[getSecondOpinionStatus](#in3getsecondopinionstatus)||
+|[resetIndex](#in3resetindex)|Reset index of this segment|
|[setAppealReason](#in3setappealreason)||
|[setCaseManager](#in3setcasemanager)||
|[setCertificationAgency](#in3setcertificationagency)||
@@ -69,6 +71,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -77,12 +80,36 @@ Aranyasen\HL7\Segment
+### IN3::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### IN3::getAppealReason
**Description**
```php
-public getAppealReason (void)
+ getAppealReason (void)
```
@@ -97,6 +124,7 @@ public getAppealReason (void)
`void`
+
@@ -105,7 +133,7 @@ public getAppealReason (void)
**Description**
```php
-public getCaseManager (void)
+ getCaseManager (void)
```
@@ -120,6 +148,7 @@ public getCaseManager (void)
`void`
+
@@ -128,7 +157,7 @@ public getCaseManager (void)
**Description**
```php
-public getCertificationAgency (void)
+ getCertificationAgency (void)
```
@@ -143,6 +172,7 @@ public getCertificationAgency (void)
`void`
+
@@ -151,7 +181,7 @@ public getCertificationAgency (void)
**Description**
```php
-public getCertificationAgencyPhoneNumber (void)
+ getCertificationAgencyPhoneNumber (void)
```
@@ -166,6 +196,7 @@ public getCertificationAgencyPhoneNumber (void)
`void`
+
@@ -174,7 +205,7 @@ public getCertificationAgencyPhoneNumber (void)
**Description**
```php
-public getCertificationBeginDate (void)
+ getCertificationBeginDate (void)
```
@@ -189,6 +220,7 @@ public getCertificationBeginDate (void)
`void`
+
@@ -197,7 +229,7 @@ public getCertificationBeginDate (void)
**Description**
```php
-public getCertificationContact (void)
+ getCertificationContact (void)
```
@@ -212,6 +244,7 @@ public getCertificationContact (void)
`void`
+
@@ -220,7 +253,7 @@ public getCertificationContact (void)
**Description**
```php
-public getCertificationContactPhoneNumber (void)
+ getCertificationContactPhoneNumber (void)
```
@@ -235,6 +268,7 @@ public getCertificationContactPhoneNumber (void)
`void`
+
@@ -243,7 +277,7 @@ public getCertificationContactPhoneNumber (void)
**Description**
```php
-public getCertificationDateTime (void)
+ getCertificationDateTime (void)
```
@@ -258,6 +292,7 @@ public getCertificationDateTime (void)
`void`
+
@@ -266,7 +301,7 @@ public getCertificationDateTime (void)
**Description**
```php
-public getCertificationEndDate (void)
+ getCertificationEndDate (void)
```
@@ -281,6 +316,7 @@ public getCertificationEndDate (void)
`void`
+
@@ -289,7 +325,7 @@ public getCertificationEndDate (void)
**Description**
```php
-public getCertificationModifyDateTime (void)
+ getCertificationModifyDateTime (void)
```
@@ -304,6 +340,7 @@ public getCertificationModifyDateTime (void)
`void`
+
@@ -312,7 +349,7 @@ public getCertificationModifyDateTime (void)
**Description**
```php
-public getCertificationNumber (void)
+ getCertificationNumber (void)
```
@@ -327,6 +364,7 @@ public getCertificationNumber (void)
`void`
+
@@ -335,7 +373,7 @@ public getCertificationNumber (void)
**Description**
```php
-public getCertificationRequired (void)
+ getCertificationRequired (void)
```
@@ -350,6 +388,7 @@ public getCertificationRequired (void)
`void`
+
@@ -358,7 +397,7 @@ public getCertificationRequired (void)
**Description**
```php
-public getCertifiedBy (void)
+ getCertifiedBy (void)
```
@@ -373,6 +412,7 @@ public getCertifiedBy (void)
`void`
+
@@ -381,7 +421,7 @@ public getCertifiedBy (void)
**Description**
```php
-public getDays (void)
+ getDays (void)
```
@@ -396,6 +436,7 @@ public getDays (void)
`void`
+
@@ -404,7 +445,7 @@ public getDays (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -419,6 +460,7 @@ public getID (void)
`void`
+
@@ -427,7 +469,7 @@ public getID (void)
**Description**
```php
-public getNonConcurCodeDescription (void)
+ getNonConcurCodeDescription (void)
```
@@ -442,6 +484,7 @@ public getNonConcurCodeDescription (void)
`void`
+
@@ -450,7 +493,7 @@ public getNonConcurCodeDescription (void)
**Description**
```php
-public getNonConcurEffectiveDateTime (void)
+ getNonConcurEffectiveDateTime (void)
```
@@ -465,6 +508,7 @@ public getNonConcurEffectiveDateTime (void)
`void`
+
@@ -473,7 +517,7 @@ public getNonConcurEffectiveDateTime (void)
**Description**
```php
-public getOperator (void)
+ getOperator (void)
```
@@ -488,6 +532,7 @@ public getOperator (void)
`void`
+
@@ -496,7 +541,7 @@ public getOperator (void)
**Description**
```php
-public getPenalty (void)
+ getPenalty (void)
```
@@ -511,6 +556,7 @@ public getPenalty (void)
`void`
+
@@ -519,7 +565,7 @@ public getPenalty (void)
**Description**
```php
-public getPhysicianReviewer (void)
+ getPhysicianReviewer (void)
```
@@ -534,6 +580,7 @@ public getPhysicianReviewer (void)
`void`
+
@@ -542,7 +589,7 @@ public getPhysicianReviewer (void)
**Description**
```php
-public getPreCertificationRequirement (void)
+ getPreCertificationRequirement (void)
```
@@ -557,6 +604,7 @@ public getPreCertificationRequirement (void)
`void`
+
@@ -565,7 +613,7 @@ public getPreCertificationRequirement (void)
**Description**
```php
-public getSecondOpinionDate (void)
+ getSecondOpinionDate (void)
```
@@ -580,6 +628,7 @@ public getSecondOpinionDate (void)
`void`
+
@@ -588,7 +637,7 @@ public getSecondOpinionDate (void)
**Description**
```php
-public getSecondOpinionDocumentationReceived (void)
+ getSecondOpinionDocumentationReceived (void)
```
@@ -603,6 +652,7 @@ public getSecondOpinionDocumentationReceived (void)
`void`
+
@@ -611,7 +661,7 @@ public getSecondOpinionDocumentationReceived (void)
**Description**
```php
-public getSecondOpinionPhysician (void)
+ getSecondOpinionPhysician (void)
```
@@ -626,6 +676,7 @@ public getSecondOpinionPhysician (void)
`void`
+
@@ -634,7 +685,7 @@ public getSecondOpinionPhysician (void)
**Description**
```php
-public getSecondOpinionStatus (void)
+ getSecondOpinionStatus (void)
```
@@ -649,6 +700,31 @@ public getSecondOpinionStatus (void)
`void`
+
+
+
+
+### IN3::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -657,7 +733,7 @@ public getSecondOpinionStatus (void)
**Description**
```php
-public setAppealReason (void)
+ setAppealReason (void)
```
@@ -672,6 +748,7 @@ public setAppealReason (void)
`void`
+
@@ -680,7 +757,7 @@ public setAppealReason (void)
**Description**
```php
-public setCaseManager (void)
+ setCaseManager (void)
```
@@ -695,6 +772,7 @@ public setCaseManager (void)
`void`
+
@@ -703,7 +781,7 @@ public setCaseManager (void)
**Description**
```php
-public setCertificationAgency (void)
+ setCertificationAgency (void)
```
@@ -718,6 +796,7 @@ public setCertificationAgency (void)
`void`
+
@@ -726,7 +805,7 @@ public setCertificationAgency (void)
**Description**
```php
-public setCertificationAgencyPhoneNumber (void)
+ setCertificationAgencyPhoneNumber (void)
```
@@ -741,6 +820,7 @@ public setCertificationAgencyPhoneNumber (void)
`void`
+
@@ -749,7 +829,7 @@ public setCertificationAgencyPhoneNumber (void)
**Description**
```php
-public setCertificationBeginDate (void)
+ setCertificationBeginDate (void)
```
@@ -764,6 +844,7 @@ public setCertificationBeginDate (void)
`void`
+
@@ -772,7 +853,7 @@ public setCertificationBeginDate (void)
**Description**
```php
-public setCertificationContact (void)
+ setCertificationContact (void)
```
@@ -787,6 +868,7 @@ public setCertificationContact (void)
`void`
+
@@ -795,7 +877,7 @@ public setCertificationContact (void)
**Description**
```php
-public setCertificationContactPhoneNumber (void)
+ setCertificationContactPhoneNumber (void)
```
@@ -810,6 +892,7 @@ public setCertificationContactPhoneNumber (void)
`void`
+
@@ -818,7 +901,7 @@ public setCertificationContactPhoneNumber (void)
**Description**
```php
-public setCertificationDateTime (void)
+ setCertificationDateTime (void)
```
@@ -833,6 +916,7 @@ public setCertificationDateTime (void)
`void`
+
@@ -841,7 +925,7 @@ public setCertificationDateTime (void)
**Description**
```php
-public setCertificationEndDate (void)
+ setCertificationEndDate (void)
```
@@ -856,6 +940,7 @@ public setCertificationEndDate (void)
`void`
+
@@ -864,7 +949,7 @@ public setCertificationEndDate (void)
**Description**
```php
-public setCertificationModifyDateTime (void)
+ setCertificationModifyDateTime (void)
```
@@ -879,6 +964,7 @@ public setCertificationModifyDateTime (void)
`void`
+
@@ -887,7 +973,7 @@ public setCertificationModifyDateTime (void)
**Description**
```php
-public setCertificationNumber (void)
+ setCertificationNumber (void)
```
@@ -902,6 +988,7 @@ public setCertificationNumber (void)
`void`
+
@@ -910,7 +997,7 @@ public setCertificationNumber (void)
**Description**
```php
-public setCertificationRequired (void)
+ setCertificationRequired (void)
```
@@ -925,6 +1012,7 @@ public setCertificationRequired (void)
`void`
+
@@ -933,7 +1021,7 @@ public setCertificationRequired (void)
**Description**
```php
-public setCertifiedBy (void)
+ setCertifiedBy (void)
```
@@ -948,6 +1036,7 @@ public setCertifiedBy (void)
`void`
+
@@ -956,7 +1045,7 @@ public setCertifiedBy (void)
**Description**
```php
-public setDays (void)
+ setDays (void)
```
@@ -971,6 +1060,7 @@ public setDays (void)
`void`
+
@@ -979,7 +1069,7 @@ public setDays (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -994,6 +1084,7 @@ public setID (void)
`void`
+
@@ -1002,7 +1093,7 @@ public setID (void)
**Description**
```php
-public setNonConcurCodeDescription (void)
+ setNonConcurCodeDescription (void)
```
@@ -1017,6 +1108,7 @@ public setNonConcurCodeDescription (void)
`void`
+
@@ -1025,7 +1117,7 @@ public setNonConcurCodeDescription (void)
**Description**
```php
-public setNonConcurEffectiveDateTime (void)
+ setNonConcurEffectiveDateTime (void)
```
@@ -1040,6 +1132,7 @@ public setNonConcurEffectiveDateTime (void)
`void`
+
@@ -1048,7 +1141,7 @@ public setNonConcurEffectiveDateTime (void)
**Description**
```php
-public setOperator (void)
+ setOperator (void)
```
@@ -1063,6 +1156,7 @@ public setOperator (void)
`void`
+
@@ -1071,7 +1165,7 @@ public setOperator (void)
**Description**
```php
-public setPenalty (void)
+ setPenalty (void)
```
@@ -1086,6 +1180,7 @@ public setPenalty (void)
`void`
+
@@ -1094,7 +1189,7 @@ public setPenalty (void)
**Description**
```php
-public setPhysicianReviewer (void)
+ setPhysicianReviewer (void)
```
@@ -1109,6 +1204,7 @@ public setPhysicianReviewer (void)
`void`
+
@@ -1117,7 +1213,7 @@ public setPhysicianReviewer (void)
**Description**
```php
-public setPreCertificationRequirement (void)
+ setPreCertificationRequirement (void)
```
@@ -1132,6 +1228,7 @@ public setPreCertificationRequirement (void)
`void`
+
@@ -1140,7 +1237,7 @@ public setPreCertificationRequirement (void)
**Description**
```php
-public setSecondOpinionDate (void)
+ setSecondOpinionDate (void)
```
@@ -1155,6 +1252,7 @@ public setSecondOpinionDate (void)
`void`
+
@@ -1163,7 +1261,7 @@ public setSecondOpinionDate (void)
**Description**
```php
-public setSecondOpinionDocumentationReceived (void)
+ setSecondOpinionDocumentationReceived (void)
```
@@ -1178,6 +1276,7 @@ public setSecondOpinionDocumentationReceived (void)
`void`
+
@@ -1186,7 +1285,7 @@ public setSecondOpinionDocumentationReceived (void)
**Description**
```php
-public setSecondOpinionPhysician (void)
+ setSecondOpinionPhysician (void)
```
@@ -1201,6 +1300,7 @@ public setSecondOpinionPhysician (void)
`void`
+
@@ -1209,7 +1309,7 @@ public setSecondOpinionPhysician (void)
**Description**
```php
-public setSecondOpinionStatus (void)
+ setSecondOpinionStatus (void)
```
@@ -1224,5 +1324,6 @@ public setSecondOpinionStatus (void)
`void`
+
diff --git a/docs/Segments/MRG.md b/docs/Segments/MRG.md
new file mode 100644
index 0000000..fe8f1ff
--- /dev/null
+++ b/docs/Segments/MRG.md
@@ -0,0 +1,379 @@
+# Aranyasen\HL7\Segments\MRG
+
+MRG segment class
+Ref: http://hl7-definition.caristix.com:9010/HL7%20v2.3.1/segment/MRG
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getPriorAlternatePatientID](#mrggetprioralternatepatientid)||
+|[getPriorAlternateVisitID](#mrggetprioralternatevisitid)||
+|[getPriorPatientAccountNumber](#mrggetpriorpatientaccountnumber)||
+|[getPriorPatientID](#mrggetpriorpatientid)||
+|[getPriorPatientIdentifierList](#mrggetpriorpatientidentifierlist)||
+|[getPriorPatientName](#mrggetpriorpatientname)||
+|[getPriorVisitNumber](#mrggetpriorvisitnumber)||
+|[setPriorAlternatePatientID](#mrgsetprioralternatepatientid)||
+|[setPriorAlternateVisitID](#mrgsetprioralternatevisitid)||
+|[setPriorPatientAccountNumber](#mrgsetpriorpatientaccountnumber)||
+|[setPriorPatientID](#mrgsetpriorpatientid)||
+|[setPriorPatientIdentifierList](#mrgsetpriorpatientidentifierlist)||
+|[setPriorPatientName](#mrgsetpriorpatientname)||
+|[setPriorVisitNumber](#mrgsetpriorvisitnumber)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### MRG::getPriorAlternatePatientID
+
+**Description**
+
+```php
+ getPriorAlternatePatientID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::getPriorAlternateVisitID
+
+**Description**
+
+```php
+ getPriorAlternateVisitID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::getPriorPatientAccountNumber
+
+**Description**
+
+```php
+ getPriorPatientAccountNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::getPriorPatientID
+
+**Description**
+
+```php
+ getPriorPatientID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::getPriorPatientIdentifierList
+
+**Description**
+
+```php
+ getPriorPatientIdentifierList (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::getPriorPatientName
+
+**Description**
+
+```php
+ getPriorPatientName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::getPriorVisitNumber
+
+**Description**
+
+```php
+ getPriorVisitNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorAlternatePatientID
+
+**Description**
+
+```php
+ setPriorAlternatePatientID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorAlternateVisitID
+
+**Description**
+
+```php
+ setPriorAlternateVisitID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorPatientAccountNumber
+
+**Description**
+
+```php
+ setPriorPatientAccountNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorPatientID
+
+**Description**
+
+```php
+ setPriorPatientID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorPatientIdentifierList
+
+**Description**
+
+```php
+ setPriorPatientIdentifierList (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorPatientName
+
+**Description**
+
+```php
+ setPriorPatientName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MRG::setPriorVisitNumber
+
+**Description**
+
+```php
+ setPriorVisitNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/MSA.md b/docs/Segments/MSA.md
new file mode 100644
index 0000000..a676388
--- /dev/null
+++ b/docs/Segments/MSA.md
@@ -0,0 +1,329 @@
+# Aranyasen\HL7\Segments\MSA
+
+MSA: Message acknowledgement segment
+Ref: http://hl7-definition.caristix.com:9010/HL7%20v2.3/segment/MSA
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getAcknowledgementCode](#msagetacknowledgementcode)||
+|[getDelayedAcknowledgementType](#msagetdelayedacknowledgementtype)||
+|[getErrorCondition](#msageterrorcondition)||
+|[getExpectedSequenceNumber](#msagetexpectedsequencenumber)||
+|[getMessageControlID](#msagetmessagecontrolid)||
+|[getTextMessage](#msagettextmessage)||
+|[setAcknowledgementCode](#msasetacknowledgementcode)||
+|[setDelayedAcknowledgementType](#msasetdelayedacknowledgementtype)||
+|[setErrorCondition](#msaseterrorcondition)||
+|[setExpectedSequenceNumber](#msasetexpectedsequencenumber)||
+|[setMessageControlID](#msasetmessagecontrolid)||
+|[setTextMessage](#msasettextmessage)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### MSA::getAcknowledgementCode
+
+**Description**
+
+```php
+ getAcknowledgementCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::getDelayedAcknowledgementType
+
+**Description**
+
+```php
+ getDelayedAcknowledgementType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::getErrorCondition
+
+**Description**
+
+```php
+ getErrorCondition (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::getExpectedSequenceNumber
+
+**Description**
+
+```php
+ getExpectedSequenceNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::getMessageControlID
+
+**Description**
+
+```php
+ getMessageControlID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::getTextMessage
+
+**Description**
+
+```php
+ getTextMessage (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::setAcknowledgementCode
+
+**Description**
+
+```php
+ setAcknowledgementCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::setDelayedAcknowledgementType
+
+**Description**
+
+```php
+ setDelayedAcknowledgementType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::setErrorCondition
+
+**Description**
+
+```php
+ setErrorCondition (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::setExpectedSequenceNumber
+
+**Description**
+
+```php
+ setExpectedSequenceNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::setMessageControlID
+
+**Description**
+
+```php
+ setMessageControlID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### MSA::setTextMessage
+
+**Description**
+
+```php
+ setTextMessage (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/MSH.md b/docs/Segments/MSH.md
index 51928ba..01424f8 100644
--- a/docs/Segments/MSH.md
+++ b/docs/Segments/MSH.md
@@ -62,6 +62,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -75,7 +76,7 @@ Aranyasen\HL7\Segment
**Description**
```php
-public getDateTimeOfMessage (void)
+ getDateTimeOfMessage (void)
```
@@ -90,6 +91,7 @@ public getDateTimeOfMessage (void)
`void`
+
@@ -98,7 +100,7 @@ public getDateTimeOfMessage (void)
**Description**
```php
-public getMessageControlId (void)
+ getMessageControlId (void)
```
@@ -113,6 +115,7 @@ public getMessageControlId (void)
`void`
+
@@ -121,7 +124,7 @@ public getMessageControlId (void)
**Description**
```php
-public getMessageType (int $position)
+public getMessageType (void)
```
ORM / ORU etc.
@@ -130,12 +133,11 @@ ORM / ORU etc.
**Parameters**
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`string`
-
+`void`
@@ -146,7 +148,7 @@ ORM / ORU etc.
**Description**
```php
-public getProcessingId (void)
+ getProcessingId (void)
```
@@ -161,6 +163,7 @@ public getProcessingId (void)
`void`
+
@@ -169,7 +172,7 @@ public getProcessingId (void)
**Description**
```php
-public getReceivingApplication (void)
+ getReceivingApplication (void)
```
@@ -184,6 +187,7 @@ public getReceivingApplication (void)
`void`
+
@@ -192,7 +196,7 @@ public getReceivingApplication (void)
**Description**
```php
-public getReceivingFacility (void)
+ getReceivingFacility (void)
```
@@ -207,6 +211,7 @@ public getReceivingFacility (void)
`void`
+
@@ -215,7 +220,7 @@ public getReceivingFacility (void)
**Description**
```php
-public getSendingApplication (void)
+ getSendingApplication (void)
```
@@ -230,6 +235,7 @@ public getSendingApplication (void)
`void`
+
@@ -238,7 +244,7 @@ public getSendingApplication (void)
**Description**
```php
-public getSendingFacility (void)
+ getSendingFacility (void)
```
@@ -253,6 +259,7 @@ public getSendingFacility (void)
`void`
+
@@ -261,7 +268,7 @@ public getSendingFacility (void)
**Description**
```php
-public getTriggerEvent (void)
+ getTriggerEvent (void)
```
@@ -276,6 +283,7 @@ public getTriggerEvent (void)
`void`
+
@@ -284,7 +292,7 @@ public getTriggerEvent (void)
**Description**
```php
-public getVersionId (int $position)
+public getVersionId (void)
```
Get HL7 version, e.g. 2.1, 2.3, 3.0 etc.
@@ -293,12 +301,11 @@ Get HL7 version, e.g. 2.1, 2.3, 3.0 etc.
**Parameters**
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`array|null|string`
-
+`void`
@@ -309,7 +316,7 @@ Get HL7 version, e.g. 2.1, 2.3, 3.0 etc.
**Description**
```php
-public setAcceptAcknowledgementType (void)
+ setAcceptAcknowledgementType (void)
```
@@ -324,6 +331,7 @@ public setAcceptAcknowledgementType (void)
`void`
+
@@ -332,7 +340,7 @@ public setAcceptAcknowledgementType (void)
**Description**
```php
-public setApplicationAcknowledgementType (void)
+ setApplicationAcknowledgementType (void)
```
@@ -347,6 +355,7 @@ public setApplicationAcknowledgementType (void)
`void`
+
@@ -355,7 +364,7 @@ public setApplicationAcknowledgementType (void)
**Description**
```php
-public setCharacterSet (void)
+ setCharacterSet (void)
```
@@ -370,6 +379,7 @@ public setCharacterSet (void)
`void`
+
@@ -378,7 +388,7 @@ public setCharacterSet (void)
**Description**
```php
-public setContinuationPointer (void)
+ setContinuationPointer (void)
```
@@ -393,6 +403,7 @@ public setContinuationPointer (void)
`void`
+
@@ -401,7 +412,7 @@ public setContinuationPointer (void)
**Description**
```php
-public setCountryCode (void)
+ setCountryCode (void)
```
@@ -416,6 +427,7 @@ public setCountryCode (void)
`void`
+
@@ -424,7 +436,7 @@ public setCountryCode (void)
**Description**
```php
-public setDateTimeOfMessage (void)
+ setDateTimeOfMessage (void)
```
@@ -439,6 +451,7 @@ public setDateTimeOfMessage (void)
`void`
+
@@ -447,7 +460,7 @@ public setDateTimeOfMessage (void)
**Description**
```php
-public setMessageControlId (void)
+ setMessageControlId (void)
```
@@ -462,6 +475,7 @@ public setMessageControlId (void)
`void`
+
@@ -470,7 +484,7 @@ public setMessageControlId (void)
**Description**
```php
-public setMessageType (string $value, int $position)
+public setMessageType (string $value)
```
Sets message type to MSH segment.
@@ -491,12 +505,10 @@ If it was empty then the new value will be just ORM.
**Parameters**
* `(string) $value`
-* `(int) $position`
**Return Values**
-`bool`
-
+`void`
@@ -507,7 +519,7 @@ If it was empty then the new value will be just ORM.
**Description**
```php
-public setPrincipalLanguage (void)
+ setPrincipalLanguage (void)
```
@@ -522,6 +534,7 @@ public setPrincipalLanguage (void)
`void`
+
@@ -530,7 +543,7 @@ public setPrincipalLanguage (void)
**Description**
```php
-public setProcessingId (void)
+ setProcessingId (void)
```
@@ -545,6 +558,7 @@ public setProcessingId (void)
`void`
+
@@ -553,7 +567,7 @@ public setProcessingId (void)
**Description**
```php
-public setReceivingApplication (void)
+ setReceivingApplication (void)
```
@@ -568,6 +582,7 @@ public setReceivingApplication (void)
`void`
+
@@ -576,7 +591,7 @@ public setReceivingApplication (void)
**Description**
```php
-public setReceivingFacility (void)
+ setReceivingFacility (void)
```
@@ -591,6 +606,7 @@ public setReceivingFacility (void)
`void`
+
@@ -599,7 +615,7 @@ public setReceivingFacility (void)
**Description**
```php
-public setSecurity (void)
+ setSecurity (void)
```
@@ -614,6 +630,7 @@ public setSecurity (void)
`void`
+
@@ -622,7 +639,7 @@ public setSecurity (void)
**Description**
```php
-public setSendingApplication (void)
+ setSendingApplication (void)
```
@@ -637,6 +654,7 @@ public setSendingApplication (void)
`void`
+
@@ -645,7 +663,7 @@ public setSendingApplication (void)
**Description**
```php
-public setSendingFacility (void)
+ setSendingFacility (void)
```
@@ -660,6 +678,7 @@ public setSendingFacility (void)
`void`
+
@@ -668,7 +687,7 @@ public setSendingFacility (void)
**Description**
```php
-public setSequenceNumber (void)
+ setSequenceNumber (void)
```
@@ -683,6 +702,7 @@ public setSequenceNumber (void)
`void`
+
@@ -691,7 +711,7 @@ public setSequenceNumber (void)
**Description**
```php
-public setTriggerEvent (string $value, int $position)
+public setTriggerEvent (string $value)
```
Sets trigger event to MSH segment.
@@ -712,12 +732,10 @@ If trigger event was not set then it will set the new value.
**Parameters**
* `(string) $value`
-* `(int) $position`
**Return Values**
-`bool`
-
+`void`
@@ -728,7 +746,7 @@ If trigger event was not set then it will set the new value.
**Description**
```php
-public setVersionId (void)
+ setVersionId (void)
```
@@ -743,5 +761,6 @@ public setVersionId (void)
`void`
+
diff --git a/docs/Segments/NK1.md b/docs/Segments/NK1.md
new file mode 100644
index 0000000..03f6cd9
--- /dev/null
+++ b/docs/Segments/NK1.md
@@ -0,0 +1,2032 @@
+# Aranyasen\HL7\Segments\NK1
+
+NK1 segment class: Next of Kin / Associated Parties
+The NK1 segment contains information about the patients other related parties. Any associated parties may be
+identified. Utilizing NK1-1 - set ID, multiple NK1 segments can be sent to patient accounts.
+
+Ref: https://hl7-definition.caristix.com/v2/HL7v2.5/Segments/NK1
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[__destruct](#nk1__destruct)||
+|[getAddress](#nk1getaddress)||
+|[getAdministrativeSex](#nk1getadministrativesex)||
+|[getAmbulatoryStatus](#nk1getambulatorystatus)||
+|[getBusinessPhoneNumber](#nk1getbusinessphonenumber)||
+|[getCitizenship](#nk1getcitizenship)||
+|[getContactPersonSocialSecurityNumber](#nk1getcontactpersonsocialsecuritynumber)||
+|[getContactPersonsAddress](#nk1getcontactpersonsaddress)||
+|[getContactPersonsName](#nk1getcontactpersonsname)||
+|[getContactPersonsTelephoneNumber](#nk1getcontactpersonstelephonenumber)||
+|[getContactReason](#nk1getcontactreason)||
+|[getContactRole](#nk1getcontactrole)||
+|[getDateTimeOfBirth](#nk1getdatetimeofbirth)||
+|[getEndDate](#nk1getenddate)||
+|[getEthnicGroup](#nk1getethnicgroup)||
+|[getHandicap](#nk1gethandicap)||
+|[getID](#nk1getid)||
+|[getJobStatus](#nk1getjobstatus)||
+|[getLivingArrangement](#nk1getlivingarrangement)||
+|[getLivingDependency](#nk1getlivingdependency)||
+|[getMaritalStatus](#nk1getmaritalstatus)||
+|[getMothersMaidenName](#nk1getmothersmaidenname)||
+|[getNKName](#nk1getnkname)||
+|[getNationality](#nk1getnationality)||
+|[getNextOfKinBirthPlace](#nk1getnextofkinbirthplace)||
+|[getNextOfKinOrAssociatedPartiesEmployeeNumber](#nk1getnextofkinorassociatedpartiesemployeenumber)||
+|[getNextOfKinOrAssociatedPartiesJobCodeOrClass](#nk1getnextofkinorassociatedpartiesjobcodeorclass)||
+|[getNextOfKinOrAssociatedPartiesJobTitle](#nk1getnextofkinorassociatedpartiesjobtitle)||
+|[getNextOfKinOrAssociatedPartysIdentifiers](#nk1getnextofkinorassociatedpartysidentifiers)||
+|[getOrganizationName](#nk1getorganizationname)||
+|[getPhoneNumber](#nk1getphonenumber)||
+|[getPrimaryLanguage](#nk1getprimarylanguage)||
+|[getProtectionIndicator](#nk1getprotectionindicator)||
+|[getPublicityCode](#nk1getpublicitycode)||
+|[getRace](#nk1getrace)||
+|[getRelationship](#nk1getrelationship)||
+|[getReligion](#nk1getreligion)||
+|[getStartDate](#nk1getstartdate)||
+|[getStudentIndicator](#nk1getstudentindicator)||
+|[getVipIndicator](#nk1getvipindicator)||
+|[resetIndex](#nk1resetindex)|Reset index of this segment|
+|[setAddress](#nk1setaddress)||
+|[setAdministrativeSex](#nk1setadministrativesex)||
+|[setAmbulatoryStatus](#nk1setambulatorystatus)||
+|[setBusinessPhoneNumber](#nk1setbusinessphonenumber)||
+|[setCitizenship](#nk1setcitizenship)||
+|[setContactPersonSocialSecurityNumber](#nk1setcontactpersonsocialsecuritynumber)||
+|[setContactPersonsAddress](#nk1setcontactpersonsaddress)||
+|[setContactPersonsName](#nk1setcontactpersonsname)||
+|[setContactPersonsTelephoneNumber](#nk1setcontactpersonstelephonenumber)||
+|[setContactReason](#nk1setcontactreason)||
+|[setContactRole](#nk1setcontactrole)||
+|[setDateTimeOfBirth](#nk1setdatetimeofbirth)||
+|[setEndDate](#nk1setenddate)||
+|[setEthnicGroup](#nk1setethnicgroup)||
+|[setHandicap](#nk1sethandicap)||
+|[setID](#nk1setid)||
+|[setJobStatus](#nk1setjobstatus)||
+|[setLivingArrangement](#nk1setlivingarrangement)||
+|[setLivingDependency](#nk1setlivingdependency)||
+|[setMaritalStatus](#nk1setmaritalstatus)||
+|[setMothersMaidenName](#nk1setmothersmaidenname)||
+|[setNKName](#nk1setnkname)||
+|[setNationality](#nk1setnationality)||
+|[setNextOfKinBirthPlace](#nk1setnextofkinbirthplace)||
+|[setNextOfKinOrAssociatedPartiesEmployeeNumber](#nk1setnextofkinorassociatedpartiesemployeenumber)||
+|[setNextOfKinOrAssociatedPartiesJobCodeOrClass](#nk1setnextofkinorassociatedpartiesjobcodeorclass)||
+|[setNextOfKinOrAssociatedPartiesJobTitle](#nk1setnextofkinorassociatedpartiesjobtitle)||
+|[setNextOfKinOrAssociatedPartysIdentifiers](#nk1setnextofkinorassociatedpartysidentifiers)||
+|[setOrganizationName](#nk1setorganizationname)||
+|[setPhoneNumber](#nk1setphonenumber)||
+|[setPrimaryLanguage](#nk1setprimarylanguage)||
+|[setProtectionIndicator](#nk1setprotectionindicator)||
+|[setPublicityCode](#nk1setpublicitycode)||
+|[setRace](#nk1setrace)||
+|[setRelationship](#nk1setrelationship)||
+|[setReligion](#nk1setreligion)||
+|[setStartDate](#nk1setstartdate)||
+|[setStudentIndicator](#nk1setstudentindicator)||
+|[setVipIndicator](#nk1setvipindicator)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### NK1::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getAddress
+
+**Description**
+
+```php
+ getAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getAdministrativeSex
+
+**Description**
+
+```php
+ getAdministrativeSex (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getAmbulatoryStatus
+
+**Description**
+
+```php
+ getAmbulatoryStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getBusinessPhoneNumber
+
+**Description**
+
+```php
+ getBusinessPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getCitizenship
+
+**Description**
+
+```php
+ getCitizenship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getContactPersonSocialSecurityNumber
+
+**Description**
+
+```php
+ getContactPersonSocialSecurityNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getContactPersonsAddress
+
+**Description**
+
+```php
+ getContactPersonsAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getContactPersonsName
+
+**Description**
+
+```php
+ getContactPersonsName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getContactPersonsTelephoneNumber
+
+**Description**
+
+```php
+ getContactPersonsTelephoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getContactReason
+
+**Description**
+
+```php
+ getContactReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getContactRole
+
+**Description**
+
+```php
+ getContactRole (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getDateTimeOfBirth
+
+**Description**
+
+```php
+ getDateTimeOfBirth (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getEndDate
+
+**Description**
+
+```php
+ getEndDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getEthnicGroup
+
+**Description**
+
+```php
+ getEthnicGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getHandicap
+
+**Description**
+
+```php
+ getHandicap (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getID
+
+**Description**
+
+```php
+ getID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getJobStatus
+
+**Description**
+
+```php
+ getJobStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getLivingArrangement
+
+**Description**
+
+```php
+ getLivingArrangement (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getLivingDependency
+
+**Description**
+
+```php
+ getLivingDependency (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getMaritalStatus
+
+**Description**
+
+```php
+ getMaritalStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getMothersMaidenName
+
+**Description**
+
+```php
+ getMothersMaidenName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNKName
+
+**Description**
+
+```php
+ getNKName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNationality
+
+**Description**
+
+```php
+ getNationality (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNextOfKinBirthPlace
+
+**Description**
+
+```php
+ getNextOfKinBirthPlace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNextOfKinOrAssociatedPartiesEmployeeNumber
+
+**Description**
+
+```php
+ getNextOfKinOrAssociatedPartiesEmployeeNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNextOfKinOrAssociatedPartiesJobCodeOrClass
+
+**Description**
+
+```php
+ getNextOfKinOrAssociatedPartiesJobCodeOrClass (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNextOfKinOrAssociatedPartiesJobTitle
+
+**Description**
+
+```php
+ getNextOfKinOrAssociatedPartiesJobTitle (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getNextOfKinOrAssociatedPartysIdentifiers
+
+**Description**
+
+```php
+ getNextOfKinOrAssociatedPartysIdentifiers (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getOrganizationName
+
+**Description**
+
+```php
+ getOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getPhoneNumber
+
+**Description**
+
+```php
+ getPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getPrimaryLanguage
+
+**Description**
+
+```php
+ getPrimaryLanguage (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getProtectionIndicator
+
+**Description**
+
+```php
+ getProtectionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getPublicityCode
+
+**Description**
+
+```php
+ getPublicityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getRace
+
+**Description**
+
+```php
+ getRace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getRelationship
+
+**Description**
+
+```php
+ getRelationship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getReligion
+
+**Description**
+
+```php
+ getReligion (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getStartDate
+
+**Description**
+
+```php
+ getStartDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getStudentIndicator
+
+**Description**
+
+```php
+ getStudentIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::getVipIndicator
+
+**Description**
+
+```php
+ getVipIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setAddress
+
+**Description**
+
+```php
+ setAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setAdministrativeSex
+
+**Description**
+
+```php
+ setAdministrativeSex (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setAmbulatoryStatus
+
+**Description**
+
+```php
+ setAmbulatoryStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setBusinessPhoneNumber
+
+**Description**
+
+```php
+ setBusinessPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setCitizenship
+
+**Description**
+
+```php
+ setCitizenship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setContactPersonSocialSecurityNumber
+
+**Description**
+
+```php
+ setContactPersonSocialSecurityNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setContactPersonsAddress
+
+**Description**
+
+```php
+ setContactPersonsAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setContactPersonsName
+
+**Description**
+
+```php
+ setContactPersonsName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setContactPersonsTelephoneNumber
+
+**Description**
+
+```php
+ setContactPersonsTelephoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setContactReason
+
+**Description**
+
+```php
+ setContactReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setContactRole
+
+**Description**
+
+```php
+ setContactRole (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setDateTimeOfBirth
+
+**Description**
+
+```php
+ setDateTimeOfBirth (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setEndDate
+
+**Description**
+
+```php
+ setEndDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setEthnicGroup
+
+**Description**
+
+```php
+ setEthnicGroup (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setHandicap
+
+**Description**
+
+```php
+ setHandicap (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setID
+
+**Description**
+
+```php
+ setID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setJobStatus
+
+**Description**
+
+```php
+ setJobStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setLivingArrangement
+
+**Description**
+
+```php
+ setLivingArrangement (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setLivingDependency
+
+**Description**
+
+```php
+ setLivingDependency (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setMaritalStatus
+
+**Description**
+
+```php
+ setMaritalStatus (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setMothersMaidenName
+
+**Description**
+
+```php
+ setMothersMaidenName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNKName
+
+**Description**
+
+```php
+ setNKName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNationality
+
+**Description**
+
+```php
+ setNationality (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNextOfKinBirthPlace
+
+**Description**
+
+```php
+ setNextOfKinBirthPlace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNextOfKinOrAssociatedPartiesEmployeeNumber
+
+**Description**
+
+```php
+ setNextOfKinOrAssociatedPartiesEmployeeNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNextOfKinOrAssociatedPartiesJobCodeOrClass
+
+**Description**
+
+```php
+ setNextOfKinOrAssociatedPartiesJobCodeOrClass (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNextOfKinOrAssociatedPartiesJobTitle
+
+**Description**
+
+```php
+ setNextOfKinOrAssociatedPartiesJobTitle (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setNextOfKinOrAssociatedPartysIdentifiers
+
+**Description**
+
+```php
+ setNextOfKinOrAssociatedPartysIdentifiers (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setOrganizationName
+
+**Description**
+
+```php
+ setOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setPhoneNumber
+
+**Description**
+
+```php
+ setPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setPrimaryLanguage
+
+**Description**
+
+```php
+ setPrimaryLanguage (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setProtectionIndicator
+
+**Description**
+
+```php
+ setProtectionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setPublicityCode
+
+**Description**
+
+```php
+ setPublicityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setRace
+
+**Description**
+
+```php
+ setRace (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setRelationship
+
+**Description**
+
+```php
+ setRelationship (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setReligion
+
+**Description**
+
+```php
+ setReligion (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setStartDate
+
+**Description**
+
+```php
+ setStartDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setStudentIndicator
+
+**Description**
+
+```php
+ setStudentIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### NK1::setVipIndicator
+
+**Description**
+
+```php
+ setVipIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/NTE.md b/docs/Segments/NTE.md
index 6e09bbd..a4c8fc8 100644
--- a/docs/Segments/NTE.md
+++ b/docs/Segments/NTE.md
@@ -13,10 +13,12 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#nte__destruct)||
|[getComment](#ntegetcomment)||
|[getCommentType](#ntegetcommenttype)||
|[getID](#ntegetid)||
|[getSourceOfComment](#ntegetsourceofcomment)||
+|[resetIndex](#nteresetindex)|Reset index of this segment|
|[setComment](#ntesetcomment)||
|[setCommentType](#ntesetcommenttype)||
|[setID](#ntesetid)||
@@ -27,6 +29,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -35,12 +38,36 @@ Aranyasen\HL7\Segment
+### NTE::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### NTE::getComment
**Description**
```php
-public getComment (void)
+ getComment (void)
```
@@ -55,6 +82,7 @@ public getComment (void)
`void`
+
@@ -63,7 +91,7 @@ public getComment (void)
**Description**
```php
-public getCommentType (void)
+ getCommentType (void)
```
@@ -78,6 +106,7 @@ public getCommentType (void)
`void`
+
@@ -86,7 +115,7 @@ public getCommentType (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -101,6 +130,7 @@ public getID (void)
`void`
+
@@ -109,7 +139,7 @@ public getID (void)
**Description**
```php
-public getSourceOfComment (void)
+ getSourceOfComment (void)
```
@@ -124,6 +154,31 @@ public getSourceOfComment (void)
`void`
+
+
+
+
+### NTE::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -132,7 +187,7 @@ public getSourceOfComment (void)
**Description**
```php
-public setComment (void)
+ setComment (void)
```
@@ -147,6 +202,7 @@ public setComment (void)
`void`
+
@@ -155,7 +211,7 @@ public setComment (void)
**Description**
```php
-public setCommentType (void)
+ setCommentType (void)
```
@@ -170,6 +226,7 @@ public setCommentType (void)
`void`
+
@@ -178,7 +235,7 @@ public setCommentType (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -193,6 +250,7 @@ public setID (void)
`void`
+
@@ -201,7 +259,7 @@ public setID (void)
**Description**
```php
-public setSourceOfComment (void)
+ setSourceOfComment (void)
```
@@ -216,5 +274,6 @@ public setSourceOfComment (void)
`void`
+
diff --git a/docs/Segments/OBR.md b/docs/Segments/OBR.md
index dca4f00..34b9afc 100644
--- a/docs/Segments/OBR.md
+++ b/docs/Segments/OBR.md
@@ -13,6 +13,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#obr__destruct)||
|[getAssistantResultInterpreter](#obrgetassistantresultinterpreter)||
|[getChargetoPractice](#obrgetchargetopractice)||
|[getCollectionVolume](#obrgetcollectionvolume)||
@@ -56,6 +57,7 @@ Aranyasen\HL7\Segment
|[getTransportLogisticsofCollectedSample](#obrgettransportlogisticsofcollectedsample)||
|[getTransportationMode](#obrgettransportationmode)||
|[getUniversalServiceID](#obrgetuniversalserviceid)||
+|[resetIndex](#obrresetindex)|Reset index of this segment|
|[setAssistantResultInterpreter](#obrsetassistantresultinterpreter)||
|[setChargetoPractice](#obrsetchargetopractice)||
|[setCollectionVolume](#obrsetcollectionvolume)||
@@ -87,7 +89,7 @@ Aranyasen\HL7\Segment
|[setRequestedDatetime](#obrsetrequesteddatetime)||
|[setResultCopiesTo](#obrsetresultcopiesto)||
|[setResultStatus](#obrsetresultstatus)||
-|[setResultsRptStatusChngDateTime](#obrsetresultsrptstatuschngdatetime)||
+|[setResultsRptStatusChngDateTime](#obrsetresultsrptstatuschngdatetime)|This field specifies the date/time when the results were reported or status changed. This field is used to indicate the date and time that the results are composed into a report and released, or that a status, as defined in ORC-5 order status, is entered or changed. (This is a results field only.) When other applications (such as office or clinical database applications) query the laboratory application for untransmitted results, the information in this field may be used to control processing on the communications link. Usually, the ordering service would want only those results for which the reporting date/time is greater than the date/time the inquiring application last received results.|
|[setScheduledDateTime](#obrsetscheduleddatetime)||
|[setSpecimenActionCode](#obrsetspecimenactioncode)||
|[setSpecimenReceivedDateTime](#obrsetspecimenreceiveddatetime)||
@@ -105,6 +107,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -113,12 +116,36 @@ Aranyasen\HL7\Segment
+### OBR::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### OBR::getAssistantResultInterpreter
**Description**
```php
-public getAssistantResultInterpreter (void)
+ getAssistantResultInterpreter (void)
```
@@ -133,6 +160,7 @@ public getAssistantResultInterpreter (void)
`void`
+
@@ -141,7 +169,7 @@ public getAssistantResultInterpreter (void)
**Description**
```php
-public getChargetoPractice (void)
+ getChargetoPractice (void)
```
@@ -156,6 +184,7 @@ public getChargetoPractice (void)
`void`
+
@@ -164,7 +193,7 @@ public getChargetoPractice (void)
**Description**
```php
-public getCollectionVolume (void)
+ getCollectionVolume (void)
```
@@ -179,6 +208,7 @@ public getCollectionVolume (void)
`void`
+
@@ -187,7 +217,7 @@ public getCollectionVolume (void)
**Description**
```php
-public getCollectorIdentifier (void)
+ getCollectorIdentifier (void)
```
@@ -202,6 +232,7 @@ public getCollectorIdentifier (void)
`void`
+
@@ -210,7 +241,7 @@ public getCollectorIdentifier (void)
**Description**
```php
-public getCollectorsComment (void)
+ getCollectorsComment (void)
```
@@ -225,6 +256,7 @@ public getCollectorsComment (void)
`void`
+
@@ -233,7 +265,7 @@ public getCollectorsComment (void)
**Description**
```php
-public getDangerCode (void)
+ getDangerCode (void)
```
@@ -248,6 +280,7 @@ public getDangerCode (void)
`void`
+
@@ -256,7 +289,7 @@ public getDangerCode (void)
**Description**
```php
-public getDiagnosticServSectID (void)
+ getDiagnosticServSectID (void)
```
@@ -271,6 +304,7 @@ public getDiagnosticServSectID (void)
`void`
+
@@ -279,7 +313,7 @@ public getDiagnosticServSectID (void)
**Description**
```php
-public getEscortRequired (void)
+ getEscortRequired (void)
```
@@ -294,6 +328,7 @@ public getEscortRequired (void)
`void`
+
@@ -302,7 +337,7 @@ public getEscortRequired (void)
**Description**
```php
-public getFillerField1 (void)
+ getFillerField1 (void)
```
@@ -317,6 +352,7 @@ public getFillerField1 (void)
`void`
+
@@ -325,7 +361,7 @@ public getFillerField1 (void)
**Description**
```php
-public getFillerField2 (void)
+ getFillerField2 (void)
```
@@ -340,6 +376,7 @@ public getFillerField2 (void)
`void`
+
@@ -348,7 +385,7 @@ public getFillerField2 (void)
**Description**
```php
-public getFillerOrderNumber (void)
+ getFillerOrderNumber (void)
```
@@ -363,6 +400,7 @@ public getFillerOrderNumber (void)
`void`
+
@@ -371,7 +409,7 @@ public getFillerOrderNumber (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -386,6 +424,7 @@ public getID (void)
`void`
+
@@ -394,7 +433,7 @@ public getID (void)
**Description**
```php
-public getNumberofSampleContainers (void)
+ getNumberofSampleContainers (void)
```
@@ -409,6 +448,7 @@ public getNumberofSampleContainers (void)
`void`
+
@@ -417,7 +457,7 @@ public getNumberofSampleContainers (void)
**Description**
```php
-public getObservationDateTime (void)
+ getObservationDateTime (void)
```
@@ -432,6 +472,7 @@ public getObservationDateTime (void)
`void`
+
@@ -440,7 +481,7 @@ public getObservationDateTime (void)
**Description**
```php
-public getObservationEndDateTime (void)
+ getObservationEndDateTime (void)
```
@@ -455,6 +496,7 @@ public getObservationEndDateTime (void)
`void`
+
@@ -463,7 +505,7 @@ public getObservationEndDateTime (void)
**Description**
```php
-public getOrderCallbackPhoneNumber (void)
+ getOrderCallbackPhoneNumber (void)
```
@@ -478,6 +520,7 @@ public getOrderCallbackPhoneNumber (void)
`void`
+
@@ -486,7 +529,7 @@ public getOrderCallbackPhoneNumber (void)
**Description**
```php
-public getOrderingProvider (void)
+ getOrderingProvider (void)
```
@@ -501,6 +544,7 @@ public getOrderingProvider (void)
`void`
+
@@ -509,7 +553,7 @@ public getOrderingProvider (void)
**Description**
```php
-public getParent (void)
+ getParent (void)
```
@@ -524,6 +568,7 @@ public getParent (void)
`void`
+
@@ -532,7 +577,7 @@ public getParent (void)
**Description**
```php
-public getParentResult (void)
+ getParentResult (void)
```
@@ -547,6 +592,7 @@ public getParentResult (void)
`void`
+
@@ -555,7 +601,7 @@ public getParentResult (void)
**Description**
```php
-public getPlacerOrderNumber (void)
+ getPlacerOrderNumber (void)
```
@@ -570,6 +616,7 @@ public getPlacerOrderNumber (void)
`void`
+
@@ -578,7 +625,7 @@ public getPlacerOrderNumber (void)
**Description**
```php
-public getPlacerfield1 (void)
+ getPlacerfield1 (void)
```
@@ -593,6 +640,7 @@ public getPlacerfield1 (void)
`void`
+
@@ -601,7 +649,7 @@ public getPlacerfield1 (void)
**Description**
```php
-public getPlacerfield2 (void)
+ getPlacerfield2 (void)
```
@@ -616,6 +664,7 @@ public getPlacerfield2 (void)
`void`
+
@@ -624,7 +673,7 @@ public getPlacerfield2 (void)
**Description**
```php
-public getPlannedPatientTransportComment (void)
+ getPlannedPatientTransportComment (void)
```
@@ -639,6 +688,7 @@ public getPlannedPatientTransportComment (void)
`void`
+
@@ -647,7 +697,7 @@ public getPlannedPatientTransportComment (void)
**Description**
```php
-public getPrincipalResultInterpreter (void)
+ getPrincipalResultInterpreter (void)
```
@@ -662,6 +712,7 @@ public getPrincipalResultInterpreter (void)
`void`
+
@@ -670,7 +721,7 @@ public getPrincipalResultInterpreter (void)
**Description**
```php
-public getPriority (void)
+ getPriority (void)
```
@@ -685,6 +736,7 @@ public getPriority (void)
`void`
+
@@ -693,7 +745,7 @@ public getPriority (void)
**Description**
```php
-public getQuantityTiming (void)
+ getQuantityTiming (void)
```
@@ -708,6 +760,7 @@ public getQuantityTiming (void)
`void`
+
@@ -716,7 +769,7 @@ public getQuantityTiming (void)
**Description**
```php
-public getReasonforStudy (void)
+ getReasonforStudy (void)
```
@@ -731,6 +784,7 @@ public getReasonforStudy (void)
`void`
+
@@ -739,7 +793,7 @@ public getReasonforStudy (void)
**Description**
```php
-public getRelevantClinicalInfo (void)
+ getRelevantClinicalInfo (void)
```
@@ -754,6 +808,7 @@ public getRelevantClinicalInfo (void)
`void`
+
@@ -762,7 +817,7 @@ public getRelevantClinicalInfo (void)
**Description**
```php
-public getRequestedDatetime (void)
+ getRequestedDatetime (void)
```
@@ -777,6 +832,7 @@ public getRequestedDatetime (void)
`void`
+
@@ -785,7 +841,7 @@ public getRequestedDatetime (void)
**Description**
```php
-public getResultCopiesTo (void)
+ getResultCopiesTo (void)
```
@@ -800,6 +856,7 @@ public getResultCopiesTo (void)
`void`
+
@@ -808,7 +865,7 @@ public getResultCopiesTo (void)
**Description**
```php
-public getResultStatus (void)
+ getResultStatus (void)
```
@@ -823,6 +880,7 @@ public getResultStatus (void)
`void`
+
@@ -831,7 +889,7 @@ public getResultStatus (void)
**Description**
```php
-public getResultsRptStatusChngDateTime (void)
+ getResultsRptStatusChngDateTime (void)
```
@@ -846,6 +904,7 @@ public getResultsRptStatusChngDateTime (void)
`void`
+
@@ -854,7 +913,7 @@ public getResultsRptStatusChngDateTime (void)
**Description**
```php
-public getScheduledDateTime (void)
+ getScheduledDateTime (void)
```
@@ -869,6 +928,7 @@ public getScheduledDateTime (void)
`void`
+
@@ -877,7 +937,7 @@ public getScheduledDateTime (void)
**Description**
```php
-public getSpecimenActionCode (void)
+ getSpecimenActionCode (void)
```
@@ -892,6 +952,7 @@ public getSpecimenActionCode (void)
`void`
+
@@ -900,7 +961,7 @@ public getSpecimenActionCode (void)
**Description**
```php
-public getSpecimenReceivedDateTime (void)
+ getSpecimenReceivedDateTime (void)
```
@@ -915,6 +976,7 @@ public getSpecimenReceivedDateTime (void)
`void`
+
@@ -923,7 +985,7 @@ public getSpecimenReceivedDateTime (void)
**Description**
```php
-public getSpecimenSource (void)
+ getSpecimenSource (void)
```
@@ -938,6 +1000,7 @@ public getSpecimenSource (void)
`void`
+
@@ -946,7 +1009,7 @@ public getSpecimenSource (void)
**Description**
```php
-public getTechnician (void)
+ getTechnician (void)
```
@@ -961,6 +1024,7 @@ public getTechnician (void)
`void`
+
@@ -969,7 +1033,7 @@ public getTechnician (void)
**Description**
```php
-public getTranscriptionist (void)
+ getTranscriptionist (void)
```
@@ -984,6 +1048,7 @@ public getTranscriptionist (void)
`void`
+
@@ -992,7 +1057,7 @@ public getTranscriptionist (void)
**Description**
```php
-public getTransportArranged (void)
+ getTransportArranged (void)
```
@@ -1007,6 +1072,7 @@ public getTransportArranged (void)
`void`
+
@@ -1015,7 +1081,7 @@ public getTransportArranged (void)
**Description**
```php
-public getTransportArrangementResponsibility (void)
+ getTransportArrangementResponsibility (void)
```
@@ -1030,6 +1096,7 @@ public getTransportArrangementResponsibility (void)
`void`
+
@@ -1038,7 +1105,7 @@ public getTransportArrangementResponsibility (void)
**Description**
```php
-public getTransportLogisticsofCollectedSample (void)
+ getTransportLogisticsofCollectedSample (void)
```
@@ -1053,6 +1120,7 @@ public getTransportLogisticsofCollectedSample (void)
`void`
+
@@ -1061,7 +1129,7 @@ public getTransportLogisticsofCollectedSample (void)
**Description**
```php
-public getTransportationMode (void)
+ getTransportationMode (void)
```
@@ -1076,6 +1144,7 @@ public getTransportationMode (void)
`void`
+
@@ -1084,7 +1153,7 @@ public getTransportationMode (void)
**Description**
```php
-public getUniversalServiceID (void)
+ getUniversalServiceID (void)
```
@@ -1099,6 +1168,31 @@ public getUniversalServiceID (void)
`void`
+
+
+
+
+### OBR::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -1107,7 +1201,7 @@ public getUniversalServiceID (void)
**Description**
```php
-public setAssistantResultInterpreter (void)
+ setAssistantResultInterpreter (void)
```
@@ -1122,6 +1216,7 @@ public setAssistantResultInterpreter (void)
`void`
+
@@ -1130,7 +1225,7 @@ public setAssistantResultInterpreter (void)
**Description**
```php
-public setChargetoPractice (void)
+ setChargetoPractice (void)
```
@@ -1145,6 +1240,7 @@ public setChargetoPractice (void)
`void`
+
@@ -1153,7 +1249,7 @@ public setChargetoPractice (void)
**Description**
```php
-public setCollectionVolume (void)
+ setCollectionVolume (void)
```
@@ -1168,6 +1264,7 @@ public setCollectionVolume (void)
`void`
+
@@ -1176,7 +1273,7 @@ public setCollectionVolume (void)
**Description**
```php
-public setCollectorIdentifier (void)
+ setCollectorIdentifier (void)
```
@@ -1191,6 +1288,7 @@ public setCollectorIdentifier (void)
`void`
+
@@ -1199,7 +1297,7 @@ public setCollectorIdentifier (void)
**Description**
```php
-public setCollectorsComment (void)
+ setCollectorsComment (void)
```
@@ -1214,6 +1312,7 @@ public setCollectorsComment (void)
`void`
+
@@ -1222,7 +1321,7 @@ public setCollectorsComment (void)
**Description**
```php
-public setDangerCode (void)
+ setDangerCode (void)
```
@@ -1237,6 +1336,7 @@ public setDangerCode (void)
`void`
+
@@ -1245,7 +1345,7 @@ public setDangerCode (void)
**Description**
```php
-public setDiagnosticServSectID (void)
+ setDiagnosticServSectID (void)
```
@@ -1260,6 +1360,7 @@ public setDiagnosticServSectID (void)
`void`
+
@@ -1268,7 +1369,7 @@ public setDiagnosticServSectID (void)
**Description**
```php
-public setEscortRequired (void)
+ setEscortRequired (void)
```
@@ -1283,6 +1384,7 @@ public setEscortRequired (void)
`void`
+
@@ -1291,7 +1393,7 @@ public setEscortRequired (void)
**Description**
```php
-public setFillerField1 (void)
+ setFillerField1 (void)
```
@@ -1306,6 +1408,7 @@ public setFillerField1 (void)
`void`
+
@@ -1314,7 +1417,7 @@ public setFillerField1 (void)
**Description**
```php
-public setFillerField2 (void)
+ setFillerField2 (void)
```
@@ -1329,6 +1432,7 @@ public setFillerField2 (void)
`void`
+
@@ -1337,7 +1441,7 @@ public setFillerField2 (void)
**Description**
```php
-public setFillerOrderNumber (void)
+ setFillerOrderNumber (void)
```
@@ -1352,6 +1456,7 @@ public setFillerOrderNumber (void)
`void`
+
@@ -1360,7 +1465,7 @@ public setFillerOrderNumber (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -1375,6 +1480,7 @@ public setID (void)
`void`
+
@@ -1383,7 +1489,7 @@ public setID (void)
**Description**
```php
-public setNumberofSampleContainers (void)
+ setNumberofSampleContainers (void)
```
@@ -1398,6 +1504,7 @@ public setNumberofSampleContainers (void)
`void`
+
@@ -1406,7 +1513,7 @@ public setNumberofSampleContainers (void)
**Description**
```php
-public setObservationDateTime (void)
+ setObservationDateTime (void)
```
@@ -1421,6 +1528,7 @@ public setObservationDateTime (void)
`void`
+
@@ -1429,7 +1537,7 @@ public setObservationDateTime (void)
**Description**
```php
-public setObservationEndDateTime (void)
+ setObservationEndDateTime (void)
```
@@ -1444,6 +1552,7 @@ public setObservationEndDateTime (void)
`void`
+
@@ -1452,7 +1561,7 @@ public setObservationEndDateTime (void)
**Description**
```php
-public setOrderCallbackPhoneNumber (void)
+ setOrderCallbackPhoneNumber (void)
```
@@ -1467,6 +1576,7 @@ public setOrderCallbackPhoneNumber (void)
`void`
+
@@ -1475,7 +1585,7 @@ public setOrderCallbackPhoneNumber (void)
**Description**
```php
-public setOrderingProvider (void)
+ setOrderingProvider (void)
```
@@ -1490,6 +1600,7 @@ public setOrderingProvider (void)
`void`
+
@@ -1498,7 +1609,7 @@ public setOrderingProvider (void)
**Description**
```php
-public setParent (void)
+ setParent (void)
```
@@ -1513,6 +1624,7 @@ public setParent (void)
`void`
+
@@ -1521,7 +1633,7 @@ public setParent (void)
**Description**
```php
-public setParentResult (void)
+ setParentResult (void)
```
@@ -1536,6 +1648,7 @@ public setParentResult (void)
`void`
+
@@ -1544,7 +1657,7 @@ public setParentResult (void)
**Description**
```php
-public setPlacerOrderNumber (void)
+ setPlacerOrderNumber (void)
```
@@ -1559,6 +1672,7 @@ public setPlacerOrderNumber (void)
`void`
+
@@ -1567,7 +1681,7 @@ public setPlacerOrderNumber (void)
**Description**
```php
-public setPlacerfield1 (void)
+ setPlacerfield1 (void)
```
@@ -1582,6 +1696,7 @@ public setPlacerfield1 (void)
`void`
+
@@ -1590,7 +1705,7 @@ public setPlacerfield1 (void)
**Description**
```php
-public setPlacerfield2 (void)
+ setPlacerfield2 (void)
```
@@ -1605,6 +1720,7 @@ public setPlacerfield2 (void)
`void`
+
@@ -1613,7 +1729,7 @@ public setPlacerfield2 (void)
**Description**
```php
-public setPlannedPatientTransportComment (void)
+ setPlannedPatientTransportComment (void)
```
@@ -1628,6 +1744,7 @@ public setPlannedPatientTransportComment (void)
`void`
+
@@ -1636,7 +1753,7 @@ public setPlannedPatientTransportComment (void)
**Description**
```php
-public setPrincipalResultInterpreter (void)
+ setPrincipalResultInterpreter (void)
```
@@ -1651,6 +1768,7 @@ public setPrincipalResultInterpreter (void)
`void`
+
@@ -1659,7 +1777,7 @@ public setPrincipalResultInterpreter (void)
**Description**
```php
-public setPriority (void)
+ setPriority (void)
```
@@ -1674,6 +1792,7 @@ public setPriority (void)
`void`
+
@@ -1682,7 +1801,7 @@ public setPriority (void)
**Description**
```php
-public setQuantityTiming (void)
+ setQuantityTiming (void)
```
@@ -1697,6 +1816,7 @@ public setQuantityTiming (void)
`void`
+
@@ -1705,7 +1825,7 @@ public setQuantityTiming (void)
**Description**
```php
-public setReasonforStudy (void)
+ setReasonforStudy (void)
```
@@ -1720,6 +1840,7 @@ public setReasonforStudy (void)
`void`
+
@@ -1728,7 +1849,7 @@ public setReasonforStudy (void)
**Description**
```php
-public setRelevantClinicalInfo (void)
+ setRelevantClinicalInfo (void)
```
@@ -1743,6 +1864,7 @@ public setRelevantClinicalInfo (void)
`void`
+
@@ -1751,7 +1873,7 @@ public setRelevantClinicalInfo (void)
**Description**
```php
-public setRequestedDatetime (void)
+ setRequestedDatetime (void)
```
@@ -1766,6 +1888,7 @@ public setRequestedDatetime (void)
`void`
+
@@ -1774,7 +1897,7 @@ public setRequestedDatetime (void)
**Description**
```php
-public setResultCopiesTo (void)
+ setResultCopiesTo (void)
```
@@ -1789,6 +1912,7 @@ public setResultCopiesTo (void)
`void`
+
@@ -1797,7 +1921,7 @@ public setResultCopiesTo (void)
**Description**
```php
-public setResultStatus (void)
+ setResultStatus (void)
```
@@ -1812,6 +1936,7 @@ public setResultStatus (void)
`void`
+
@@ -1823,7 +1948,7 @@ public setResultStatus (void)
public setResultsRptStatusChngDateTime (void)
```
-
+This field specifies the date/time when the results were reported or status changed. This field is used to indicate the date and time that the results are composed into a report and released, or that a status, as defined in ORC-5 order status, is entered or changed. (This is a results field only.) When other applications (such as office or clinical database applications) query the laboratory application for untransmitted results, the information in this field may be used to control processing on the communications link. Usually, the ordering service would want only those results for which the reporting date/time is greater than the date/time the inquiring application last received results.
@@ -1833,7 +1958,10 @@ public setResultsRptStatusChngDateTime (void)
**Return Values**
-`void`
+`bool`
+
+
+
@@ -1843,7 +1971,7 @@ public setResultsRptStatusChngDateTime (void)
**Description**
```php
-public setScheduledDateTime (void)
+ setScheduledDateTime (void)
```
@@ -1858,6 +1986,7 @@ public setScheduledDateTime (void)
`void`
+
@@ -1866,7 +1995,7 @@ public setScheduledDateTime (void)
**Description**
```php
-public setSpecimenActionCode (void)
+ setSpecimenActionCode (void)
```
@@ -1881,6 +2010,7 @@ public setSpecimenActionCode (void)
`void`
+
@@ -1889,7 +2019,7 @@ public setSpecimenActionCode (void)
**Description**
```php
-public setSpecimenReceivedDateTime (void)
+ setSpecimenReceivedDateTime (void)
```
@@ -1904,6 +2034,7 @@ public setSpecimenReceivedDateTime (void)
`void`
+
@@ -1912,7 +2043,7 @@ public setSpecimenReceivedDateTime (void)
**Description**
```php
-public setSpecimenSource (void)
+ setSpecimenSource (void)
```
@@ -1927,6 +2058,7 @@ public setSpecimenSource (void)
`void`
+
@@ -1935,7 +2067,7 @@ public setSpecimenSource (void)
**Description**
```php
-public setTechnician (void)
+ setTechnician (void)
```
@@ -1950,6 +2082,7 @@ public setTechnician (void)
`void`
+
@@ -1958,7 +2091,7 @@ public setTechnician (void)
**Description**
```php
-public setTranscriptionist (void)
+ setTranscriptionist (void)
```
@@ -1973,6 +2106,7 @@ public setTranscriptionist (void)
`void`
+
@@ -1981,7 +2115,7 @@ public setTranscriptionist (void)
**Description**
```php
-public setTransportArranged (void)
+ setTransportArranged (void)
```
@@ -1996,6 +2130,7 @@ public setTransportArranged (void)
`void`
+
@@ -2004,7 +2139,7 @@ public setTransportArranged (void)
**Description**
```php
-public setTransportArrangementResponsibility (void)
+ setTransportArrangementResponsibility (void)
```
@@ -2019,6 +2154,7 @@ public setTransportArrangementResponsibility (void)
`void`
+
@@ -2027,7 +2163,7 @@ public setTransportArrangementResponsibility (void)
**Description**
```php
-public setTransportLogisticsofCollectedSample (void)
+ setTransportLogisticsofCollectedSample (void)
```
@@ -2042,6 +2178,7 @@ public setTransportLogisticsofCollectedSample (void)
`void`
+
@@ -2050,7 +2187,7 @@ public setTransportLogisticsofCollectedSample (void)
**Description**
```php
-public setTransportationMode (void)
+ setTransportationMode (void)
```
@@ -2065,6 +2202,7 @@ public setTransportationMode (void)
`void`
+
@@ -2073,7 +2211,7 @@ public setTransportationMode (void)
**Description**
```php
-public setUniversalServiceID (void)
+ setUniversalServiceID (void)
```
@@ -2088,5 +2226,6 @@ public setUniversalServiceID (void)
`void`
+
diff --git a/docs/Segments/OBX.md b/docs/Segments/OBX.md
index 44067c9..516edb0 100644
--- a/docs/Segments/OBX.md
+++ b/docs/Segments/OBX.md
@@ -1,7 +1,7 @@
# Aranyasen\HL7\Segments\OBX
OBX segment class
-Ref: https://corepointhealth.com/resource-center/hl7-resources/hl7-obx-segment
+Ref: https://hl7-definition.caristix.com/v2/HL7v2.5.1/Segments/OBX
@@ -13,9 +13,12 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#obx__destruct)||
|[getAbnormalFlags](#obxgetabnormalflags)||
|[getDataLastObsNormalValues](#obxgetdatalastobsnormalvalues)||
+|[getDateTimeOfAnalysis](#obxgetdatetimeofanalysis)||
|[getDateTimeOfTheObservation](#obxgetdatetimeoftheobservation)||
+|[getEquipmentInstanceIdentifier](#obxgetequipmentinstanceidentifier)||
|[getID](#obxgetid)||
|[getNatureOfAbnormalTest](#obxgetnatureofabnormaltest)||
|[getObservationIdentifier](#obxgetobservationidentifier)||
@@ -30,9 +33,12 @@ Aranyasen\HL7\Segment
|[getUnits](#obxgetunits)||
|[getUserDefinedAccessChecks](#obxgetuserdefinedaccesschecks)||
|[getValueType](#obxgetvaluetype)||
+|[resetIndex](#obxresetindex)|Reset index of this segment|
|[setAbnormalFlags](#obxsetabnormalflags)||
|[setDataLastObsNormalValues](#obxsetdatalastobsnormalvalues)||
+|[setDateTimeOfAnalysis](#obxsetdatetimeofanalysis)||
|[setDateTimeOfTheObservation](#obxsetdatetimeoftheobservation)||
+|[setEquipmentInstanceIdentifier](#obxsetequipmentinstanceidentifier)||
|[setID](#obxsetid)||
|[setNatureOfAbnormalTest](#obxsetnatureofabnormaltest)||
|[setObservationIdentifier](#obxsetobservationidentifier)||
@@ -53,6 +59,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -61,12 +68,36 @@ Aranyasen\HL7\Segment
+### OBX::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### OBX::getAbnormalFlags
**Description**
```php
-public getAbnormalFlags (void)
+ getAbnormalFlags (void)
```
@@ -81,6 +112,7 @@ public getAbnormalFlags (void)
`void`
+
@@ -89,7 +121,7 @@ public getAbnormalFlags (void)
**Description**
```php
-public getDataLastObsNormalValues (void)
+ getDataLastObsNormalValues (void)
```
@@ -104,6 +136,31 @@ public getDataLastObsNormalValues (void)
`void`
+
+
+
+
+### OBX::getDateTimeOfAnalysis
+
+**Description**
+
+```php
+ getDateTimeOfAnalysis (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -112,7 +169,7 @@ public getDataLastObsNormalValues (void)
**Description**
```php
-public getDateTimeOfTheObservation (void)
+ getDateTimeOfTheObservation (void)
```
@@ -127,6 +184,31 @@ public getDateTimeOfTheObservation (void)
`void`
+
+
+
+
+### OBX::getEquipmentInstanceIdentifier
+
+**Description**
+
+```php
+ getEquipmentInstanceIdentifier (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -135,7 +217,7 @@ public getDateTimeOfTheObservation (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -150,6 +232,7 @@ public getID (void)
`void`
+
@@ -158,7 +241,7 @@ public getID (void)
**Description**
```php
-public getNatureOfAbnormalTest (void)
+ getNatureOfAbnormalTest (void)
```
@@ -173,6 +256,7 @@ public getNatureOfAbnormalTest (void)
`void`
+
@@ -181,7 +265,7 @@ public getNatureOfAbnormalTest (void)
**Description**
```php
-public getObservationIdentifier (void)
+ getObservationIdentifier (void)
```
@@ -196,6 +280,7 @@ public getObservationIdentifier (void)
`void`
+
@@ -204,7 +289,7 @@ public getObservationIdentifier (void)
**Description**
```php
-public getObservationMethod (void)
+ getObservationMethod (void)
```
@@ -219,6 +304,7 @@ public getObservationMethod (void)
`void`
+
@@ -227,7 +313,7 @@ public getObservationMethod (void)
**Description**
```php
-public getObservationSubId (void)
+ getObservationSubId (void)
```
@@ -242,6 +328,7 @@ public getObservationSubId (void)
`void`
+
@@ -250,7 +337,7 @@ public getObservationSubId (void)
**Description**
```php
-public getObservationValue (void)
+ getObservationValue (void)
```
@@ -265,6 +352,7 @@ public getObservationValue (void)
`void`
+
@@ -273,7 +361,7 @@ public getObservationValue (void)
**Description**
```php
-public getObserveResultStatus (void)
+ getObserveResultStatus (void)
```
@@ -288,6 +376,7 @@ public getObserveResultStatus (void)
`void`
+
@@ -296,7 +385,7 @@ public getObserveResultStatus (void)
**Description**
```php
-public getProbability (void)
+ getProbability (void)
```
@@ -311,6 +400,7 @@ public getProbability (void)
`void`
+
@@ -319,7 +409,7 @@ public getProbability (void)
**Description**
```php
-public getProducersId (void)
+ getProducersId (void)
```
@@ -334,6 +424,7 @@ public getProducersId (void)
`void`
+
@@ -342,7 +433,7 @@ public getProducersId (void)
**Description**
```php
-public getReferenceRange (void)
+ getReferenceRange (void)
```
@@ -357,6 +448,7 @@ public getReferenceRange (void)
`void`
+
@@ -365,7 +457,7 @@ public getReferenceRange (void)
**Description**
```php
-public getResponsibleObserver (void)
+ getResponsibleObserver (void)
```
@@ -380,6 +472,7 @@ public getResponsibleObserver (void)
`void`
+
@@ -388,7 +481,7 @@ public getResponsibleObserver (void)
**Description**
```php
-public getUnits (void)
+ getUnits (void)
```
@@ -403,6 +496,7 @@ public getUnits (void)
`void`
+
@@ -411,7 +505,7 @@ public getUnits (void)
**Description**
```php
-public getUserDefinedAccessChecks (void)
+ getUserDefinedAccessChecks (void)
```
@@ -426,6 +520,7 @@ public getUserDefinedAccessChecks (void)
`void`
+
@@ -434,7 +529,7 @@ public getUserDefinedAccessChecks (void)
**Description**
```php
-public getValueType (void)
+ getValueType (void)
```
@@ -449,6 +544,31 @@ public getValueType (void)
`void`
+
+
+
+
+### OBX::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -457,7 +577,7 @@ public getValueType (void)
**Description**
```php
-public setAbnormalFlags (void)
+ setAbnormalFlags (void)
```
@@ -472,6 +592,7 @@ public setAbnormalFlags (void)
`void`
+
@@ -480,7 +601,31 @@ public setAbnormalFlags (void)
**Description**
```php
-public setDataLastObsNormalValues (void)
+ setDataLastObsNormalValues (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### OBX::setDateTimeOfAnalysis
+
+**Description**
+
+```php
+ setDateTimeOfAnalysis (void)
```
@@ -495,6 +640,7 @@ public setDataLastObsNormalValues (void)
`void`
+
@@ -503,7 +649,7 @@ public setDataLastObsNormalValues (void)
**Description**
```php
-public setDateTimeOfTheObservation (void)
+ setDateTimeOfTheObservation (void)
```
@@ -518,6 +664,31 @@ public setDateTimeOfTheObservation (void)
`void`
+
+
+
+
+### OBX::setEquipmentInstanceIdentifier
+
+**Description**
+
+```php
+ setEquipmentInstanceIdentifier (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -526,7 +697,7 @@ public setDateTimeOfTheObservation (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -541,6 +712,7 @@ public setID (void)
`void`
+
@@ -549,7 +721,7 @@ public setID (void)
**Description**
```php
-public setNatureOfAbnormalTest (void)
+ setNatureOfAbnormalTest (void)
```
@@ -564,6 +736,7 @@ public setNatureOfAbnormalTest (void)
`void`
+
@@ -572,7 +745,7 @@ public setNatureOfAbnormalTest (void)
**Description**
```php
-public setObservationIdentifier (void)
+ setObservationIdentifier (void)
```
@@ -587,6 +760,7 @@ public setObservationIdentifier (void)
`void`
+
@@ -595,7 +769,7 @@ public setObservationIdentifier (void)
**Description**
```php
-public setObservationMethod (void)
+ setObservationMethod (void)
```
@@ -610,6 +784,7 @@ public setObservationMethod (void)
`void`
+
@@ -618,7 +793,7 @@ public setObservationMethod (void)
**Description**
```php
-public setObservationSubId (void)
+ setObservationSubId (void)
```
@@ -633,6 +808,7 @@ public setObservationSubId (void)
`void`
+
@@ -641,7 +817,7 @@ public setObservationSubId (void)
**Description**
```php
-public setObservationValue (void)
+ setObservationValue (void)
```
@@ -656,6 +832,7 @@ public setObservationValue (void)
`void`
+
@@ -664,7 +841,7 @@ public setObservationValue (void)
**Description**
```php
-public setObserveResultStatus (void)
+ setObserveResultStatus (void)
```
@@ -679,6 +856,7 @@ public setObserveResultStatus (void)
`void`
+
@@ -687,7 +865,7 @@ public setObserveResultStatus (void)
**Description**
```php
-public setProbability (void)
+ setProbability (void)
```
@@ -702,6 +880,7 @@ public setProbability (void)
`void`
+
@@ -710,7 +889,7 @@ public setProbability (void)
**Description**
```php
-public setProducersId (void)
+ setProducersId (void)
```
@@ -725,6 +904,7 @@ public setProducersId (void)
`void`
+
@@ -733,7 +913,7 @@ public setProducersId (void)
**Description**
```php
-public setReferenceRange (void)
+ setReferenceRange (void)
```
@@ -748,6 +928,7 @@ public setReferenceRange (void)
`void`
+
@@ -756,7 +937,7 @@ public setReferenceRange (void)
**Description**
```php
-public setResponsibleObserver (void)
+ setResponsibleObserver (void)
```
@@ -771,6 +952,7 @@ public setResponsibleObserver (void)
`void`
+
@@ -779,7 +961,7 @@ public setResponsibleObserver (void)
**Description**
```php
-public setUnits (void)
+ setUnits (void)
```
@@ -794,6 +976,7 @@ public setUnits (void)
`void`
+
@@ -802,7 +985,7 @@ public setUnits (void)
**Description**
```php
-public setUserDefinedAccessChecks (void)
+ setUserDefinedAccessChecks (void)
```
@@ -817,6 +1000,7 @@ public setUserDefinedAccessChecks (void)
`void`
+
@@ -825,7 +1009,7 @@ public setUserDefinedAccessChecks (void)
**Description**
```php
-public setValueType (void)
+ setValueType (void)
```
@@ -840,5 +1024,6 @@ public setValueType (void)
`void`
+
diff --git a/docs/Segments/ORC.md b/docs/Segments/ORC.md
index 56eb178..11fb139 100644
--- a/docs/Segments/ORC.md
+++ b/docs/Segments/ORC.md
@@ -81,6 +81,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -94,7 +95,7 @@ Aranyasen\HL7\Segment
**Description**
```php
-public getActionBy (void)
+ getActionBy (void)
```
@@ -109,6 +110,7 @@ public getActionBy (void)
`void`
+
@@ -117,7 +119,7 @@ public getActionBy (void)
**Description**
```php
-public getAdvancedBeneficiaryNoticeCode (void)
+ getAdvancedBeneficiaryNoticeCode (void)
```
@@ -132,6 +134,7 @@ public getAdvancedBeneficiaryNoticeCode (void)
`void`
+
@@ -140,7 +143,7 @@ public getAdvancedBeneficiaryNoticeCode (void)
**Description**
```php
-public getAdvancedBeneficiaryNoticeOverrideReason (void)
+ getAdvancedBeneficiaryNoticeOverrideReason (void)
```
@@ -155,6 +158,7 @@ public getAdvancedBeneficiaryNoticeOverrideReason (void)
`void`
+
@@ -163,7 +167,7 @@ public getAdvancedBeneficiaryNoticeOverrideReason (void)
**Description**
```php
-public getCallBackPhoneNumber (void)
+ getCallBackPhoneNumber (void)
```
@@ -178,6 +182,7 @@ public getCallBackPhoneNumber (void)
`void`
+
@@ -186,7 +191,7 @@ public getCallBackPhoneNumber (void)
**Description**
```php
-public getConfidentialityCode (void)
+ getConfidentialityCode (void)
```
@@ -201,6 +206,7 @@ public getConfidentialityCode (void)
`void`
+
@@ -209,7 +215,7 @@ public getConfidentialityCode (void)
**Description**
```php
-public getDateTimeofTransaction (void)
+ getDateTimeofTransaction (void)
```
@@ -224,6 +230,7 @@ public getDateTimeofTransaction (void)
`void`
+
@@ -232,7 +239,7 @@ public getDateTimeofTransaction (void)
**Description**
```php
-public getEnteredBy (void)
+ getEnteredBy (void)
```
@@ -247,6 +254,7 @@ public getEnteredBy (void)
`void`
+
@@ -255,7 +263,7 @@ public getEnteredBy (void)
**Description**
```php
-public getEntererAuthorizationMode (void)
+ getEntererAuthorizationMode (void)
```
@@ -270,6 +278,7 @@ public getEntererAuthorizationMode (void)
`void`
+
@@ -278,7 +287,7 @@ public getEntererAuthorizationMode (void)
**Description**
```php
-public getEnterersLocation (void)
+ getEnterersLocation (void)
```
@@ -293,6 +302,7 @@ public getEnterersLocation (void)
`void`
+
@@ -301,7 +311,7 @@ public getEnterersLocation (void)
**Description**
```php
-public getEnteringDevice (void)
+ getEnteringDevice (void)
```
@@ -316,6 +326,7 @@ public getEnteringDevice (void)
`void`
+
@@ -324,7 +335,7 @@ public getEnteringDevice (void)
**Description**
```php
-public getEnteringOrganization (void)
+ getEnteringOrganization (void)
```
@@ -339,6 +350,7 @@ public getEnteringOrganization (void)
`void`
+
@@ -347,7 +359,7 @@ public getEnteringOrganization (void)
**Description**
```php
-public getFillerOrderNumber (void)
+ getFillerOrderNumber (void)
```
@@ -362,6 +374,7 @@ public getFillerOrderNumber (void)
`void`
+
@@ -370,7 +383,7 @@ public getFillerOrderNumber (void)
**Description**
```php
-public getFillersExpectedAvailabilityDateTime (void)
+ getFillersExpectedAvailabilityDateTime (void)
```
@@ -385,6 +398,7 @@ public getFillersExpectedAvailabilityDateTime (void)
`void`
+
@@ -393,7 +407,7 @@ public getFillersExpectedAvailabilityDateTime (void)
**Description**
```php
-public getOrderControl (void)
+ getOrderControl (void)
```
@@ -408,6 +422,7 @@ public getOrderControl (void)
`void`
+
@@ -416,7 +431,7 @@ public getOrderControl (void)
**Description**
```php
-public getOrderControlCodeReason (void)
+ getOrderControlCodeReason (void)
```
@@ -431,6 +446,7 @@ public getOrderControlCodeReason (void)
`void`
+
@@ -439,7 +455,7 @@ public getOrderControlCodeReason (void)
**Description**
```php
-public getOrderEffectiveDateTime (void)
+ getOrderEffectiveDateTime (void)
```
@@ -454,6 +470,7 @@ public getOrderEffectiveDateTime (void)
`void`
+
@@ -462,7 +479,7 @@ public getOrderEffectiveDateTime (void)
**Description**
```php
-public getOrderStatus (void)
+ getOrderStatus (void)
```
@@ -477,6 +494,7 @@ public getOrderStatus (void)
`void`
+
@@ -485,7 +503,7 @@ public getOrderStatus (void)
**Description**
```php
-public getOrderStatusModifier (void)
+ getOrderStatusModifier (void)
```
@@ -500,6 +518,7 @@ public getOrderStatusModifier (void)
`void`
+
@@ -508,7 +527,7 @@ public getOrderStatusModifier (void)
**Description**
```php
-public getOrderType (void)
+ getOrderType (void)
```
@@ -523,6 +542,7 @@ public getOrderType (void)
`void`
+
@@ -531,7 +551,7 @@ public getOrderType (void)
**Description**
```php
-public getOrderingFacilityAddress (void)
+ getOrderingFacilityAddress (void)
```
@@ -546,6 +566,7 @@ public getOrderingFacilityAddress (void)
`void`
+
@@ -554,7 +575,7 @@ public getOrderingFacilityAddress (void)
**Description**
```php
-public getOrderingFacilityName (void)
+ getOrderingFacilityName (void)
```
@@ -569,6 +590,7 @@ public getOrderingFacilityName (void)
`void`
+
@@ -577,7 +599,7 @@ public getOrderingFacilityName (void)
**Description**
```php
-public getOrderingFacilityPhoneNumber (void)
+ getOrderingFacilityPhoneNumber (void)
```
@@ -592,6 +614,7 @@ public getOrderingFacilityPhoneNumber (void)
`void`
+
@@ -600,7 +623,7 @@ public getOrderingFacilityPhoneNumber (void)
**Description**
```php
-public getOrderingProvider (void)
+ getOrderingProvider (void)
```
@@ -615,6 +638,7 @@ public getOrderingProvider (void)
`void`
+
@@ -623,7 +647,7 @@ public getOrderingProvider (void)
**Description**
```php
-public getOrderingProviderAddress (void)
+ getOrderingProviderAddress (void)
```
@@ -638,6 +662,7 @@ public getOrderingProviderAddress (void)
`void`
+
@@ -646,7 +671,7 @@ public getOrderingProviderAddress (void)
**Description**
```php
-public getParentOrder (void)
+ getParentOrder (void)
```
@@ -661,6 +686,7 @@ public getParentOrder (void)
`void`
+
@@ -669,7 +695,7 @@ public getParentOrder (void)
**Description**
```php
-public getParentUniversalServiceIdentifier (void)
+ getParentUniversalServiceIdentifier (void)
```
@@ -684,6 +710,7 @@ public getParentUniversalServiceIdentifier (void)
`void`
+
@@ -692,7 +719,7 @@ public getParentUniversalServiceIdentifier (void)
**Description**
```php
-public getPlacerGroupNumber (void)
+ getPlacerGroupNumber (void)
```
@@ -707,6 +734,7 @@ public getPlacerGroupNumber (void)
`void`
+
@@ -715,7 +743,7 @@ public getPlacerGroupNumber (void)
**Description**
```php
-public getPlacerOrderNumber (void)
+ getPlacerOrderNumber (void)
```
@@ -730,6 +758,7 @@ public getPlacerOrderNumber (void)
`void`
+
@@ -738,7 +767,7 @@ public getPlacerOrderNumber (void)
**Description**
```php
-public getQuantityTiming (void)
+ getQuantityTiming (void)
```
@@ -753,6 +782,7 @@ public getQuantityTiming (void)
`void`
+
@@ -761,7 +791,7 @@ public getQuantityTiming (void)
**Description**
```php
-public getResponseFlag (void)
+ getResponseFlag (void)
```
@@ -776,6 +806,7 @@ public getResponseFlag (void)
`void`
+
@@ -784,7 +815,7 @@ public getResponseFlag (void)
**Description**
```php
-public getVerifiedBy (void)
+ getVerifiedBy (void)
```
@@ -799,6 +830,7 @@ public getVerifiedBy (void)
`void`
+
@@ -807,7 +839,7 @@ public getVerifiedBy (void)
**Description**
```php
-public setActionBy (void)
+ setActionBy (void)
```
@@ -822,6 +854,7 @@ public setActionBy (void)
`void`
+
@@ -830,7 +863,7 @@ public setActionBy (void)
**Description**
```php
-public setAdvancedBeneficiaryNoticeCode (void)
+ setAdvancedBeneficiaryNoticeCode (void)
```
@@ -845,6 +878,7 @@ public setAdvancedBeneficiaryNoticeCode (void)
`void`
+
@@ -853,7 +887,7 @@ public setAdvancedBeneficiaryNoticeCode (void)
**Description**
```php
-public setAdvancedBeneficiaryNoticeOverrideReason (void)
+ setAdvancedBeneficiaryNoticeOverrideReason (void)
```
@@ -868,6 +902,7 @@ public setAdvancedBeneficiaryNoticeOverrideReason (void)
`void`
+
@@ -876,7 +911,7 @@ public setAdvancedBeneficiaryNoticeOverrideReason (void)
**Description**
```php
-public setCallBackPhoneNumber (void)
+ setCallBackPhoneNumber (void)
```
@@ -891,6 +926,7 @@ public setCallBackPhoneNumber (void)
`void`
+
@@ -899,7 +935,7 @@ public setCallBackPhoneNumber (void)
**Description**
```php
-public setConfidentialityCode (void)
+ setConfidentialityCode (void)
```
@@ -914,6 +950,7 @@ public setConfidentialityCode (void)
`void`
+
@@ -922,7 +959,7 @@ public setConfidentialityCode (void)
**Description**
```php
-public setDateTimeofTransaction (void)
+ setDateTimeofTransaction (void)
```
@@ -937,6 +974,7 @@ public setDateTimeofTransaction (void)
`void`
+
@@ -945,7 +983,7 @@ public setDateTimeofTransaction (void)
**Description**
```php
-public setEnteredBy (void)
+ setEnteredBy (void)
```
@@ -960,6 +998,7 @@ public setEnteredBy (void)
`void`
+
@@ -968,7 +1007,7 @@ public setEnteredBy (void)
**Description**
```php
-public setEntererAuthorizationMode (void)
+ setEntererAuthorizationMode (void)
```
@@ -983,6 +1022,7 @@ public setEntererAuthorizationMode (void)
`void`
+
@@ -991,7 +1031,7 @@ public setEntererAuthorizationMode (void)
**Description**
```php
-public setEnterersLocation (void)
+ setEnterersLocation (void)
```
@@ -1006,6 +1046,7 @@ public setEnterersLocation (void)
`void`
+
@@ -1014,7 +1055,7 @@ public setEnterersLocation (void)
**Description**
```php
-public setEnteringDevice (void)
+ setEnteringDevice (void)
```
@@ -1029,6 +1070,7 @@ public setEnteringDevice (void)
`void`
+
@@ -1037,7 +1079,7 @@ public setEnteringDevice (void)
**Description**
```php
-public setEnteringOrganization (void)
+ setEnteringOrganization (void)
```
@@ -1052,6 +1094,7 @@ public setEnteringOrganization (void)
`void`
+
@@ -1060,7 +1103,7 @@ public setEnteringOrganization (void)
**Description**
```php
-public setFillerOrderNumber (void)
+ setFillerOrderNumber (void)
```
@@ -1075,6 +1118,7 @@ public setFillerOrderNumber (void)
`void`
+
@@ -1083,7 +1127,7 @@ public setFillerOrderNumber (void)
**Description**
```php
-public setFillersExpectedAvailabilityDateTime (void)
+ setFillersExpectedAvailabilityDateTime (void)
```
@@ -1098,6 +1142,7 @@ public setFillersExpectedAvailabilityDateTime (void)
`void`
+
@@ -1106,7 +1151,7 @@ public setFillersExpectedAvailabilityDateTime (void)
**Description**
```php
-public setOrderControl (void)
+ setOrderControl (void)
```
@@ -1121,6 +1166,7 @@ public setOrderControl (void)
`void`
+
@@ -1129,7 +1175,7 @@ public setOrderControl (void)
**Description**
```php
-public setOrderControlCodeReason (void)
+ setOrderControlCodeReason (void)
```
@@ -1144,6 +1190,7 @@ public setOrderControlCodeReason (void)
`void`
+
@@ -1152,7 +1199,7 @@ public setOrderControlCodeReason (void)
**Description**
```php
-public setOrderEffectiveDateTime (void)
+ setOrderEffectiveDateTime (void)
```
@@ -1167,6 +1214,7 @@ public setOrderEffectiveDateTime (void)
`void`
+
@@ -1175,7 +1223,7 @@ public setOrderEffectiveDateTime (void)
**Description**
```php
-public setOrderStatus (void)
+ setOrderStatus (void)
```
@@ -1190,6 +1238,7 @@ public setOrderStatus (void)
`void`
+
@@ -1198,7 +1247,7 @@ public setOrderStatus (void)
**Description**
```php
-public setOrderStatusModifier (void)
+ setOrderStatusModifier (void)
```
@@ -1213,6 +1262,7 @@ public setOrderStatusModifier (void)
`void`
+
@@ -1221,7 +1271,7 @@ public setOrderStatusModifier (void)
**Description**
```php
-public setOrderType (void)
+ setOrderType (void)
```
@@ -1236,6 +1286,7 @@ public setOrderType (void)
`void`
+
@@ -1244,7 +1295,7 @@ public setOrderType (void)
**Description**
```php
-public setOrderingFacilityAddress (void)
+ setOrderingFacilityAddress (void)
```
@@ -1259,6 +1310,7 @@ public setOrderingFacilityAddress (void)
`void`
+
@@ -1267,7 +1319,7 @@ public setOrderingFacilityAddress (void)
**Description**
```php
-public setOrderingFacilityName (void)
+ setOrderingFacilityName (void)
```
@@ -1282,6 +1334,7 @@ public setOrderingFacilityName (void)
`void`
+
@@ -1290,7 +1343,7 @@ public setOrderingFacilityName (void)
**Description**
```php
-public setOrderingFacilityPhoneNumber (void)
+ setOrderingFacilityPhoneNumber (void)
```
@@ -1305,6 +1358,7 @@ public setOrderingFacilityPhoneNumber (void)
`void`
+
@@ -1313,7 +1367,7 @@ public setOrderingFacilityPhoneNumber (void)
**Description**
```php
-public setOrderingProvider (void)
+ setOrderingProvider (void)
```
@@ -1328,6 +1382,7 @@ public setOrderingProvider (void)
`void`
+
@@ -1336,7 +1391,7 @@ public setOrderingProvider (void)
**Description**
```php
-public setOrderingProviderAddress (void)
+ setOrderingProviderAddress (void)
```
@@ -1351,6 +1406,7 @@ public setOrderingProviderAddress (void)
`void`
+
@@ -1359,7 +1415,7 @@ public setOrderingProviderAddress (void)
**Description**
```php
-public setParentOrder (void)
+ setParentOrder (void)
```
@@ -1374,6 +1430,7 @@ public setParentOrder (void)
`void`
+
@@ -1382,7 +1439,7 @@ public setParentOrder (void)
**Description**
```php
-public setParentUniversalServiceIdentifier (void)
+ setParentUniversalServiceIdentifier (void)
```
@@ -1397,6 +1454,7 @@ public setParentUniversalServiceIdentifier (void)
`void`
+
@@ -1405,7 +1463,7 @@ public setParentUniversalServiceIdentifier (void)
**Description**
```php
-public setPlacerGroupNumber (void)
+ setPlacerGroupNumber (void)
```
@@ -1420,6 +1478,7 @@ public setPlacerGroupNumber (void)
`void`
+
@@ -1428,7 +1487,7 @@ public setPlacerGroupNumber (void)
**Description**
```php
-public setPlacerOrderNumber (void)
+ setPlacerOrderNumber (void)
```
@@ -1443,6 +1502,7 @@ public setPlacerOrderNumber (void)
`void`
+
@@ -1451,7 +1511,7 @@ public setPlacerOrderNumber (void)
**Description**
```php
-public setQuantityTiming (void)
+ setQuantityTiming (void)
```
@@ -1466,6 +1526,7 @@ public setQuantityTiming (void)
`void`
+
@@ -1474,7 +1535,7 @@ public setQuantityTiming (void)
**Description**
```php
-public setResponseFlag (void)
+ setResponseFlag (void)
```
@@ -1489,6 +1550,7 @@ public setResponseFlag (void)
`void`
+
@@ -1497,7 +1559,7 @@ public setResponseFlag (void)
**Description**
```php
-public setVerifiedBy (void)
+ setVerifiedBy (void)
```
@@ -1512,5 +1574,6 @@ public setVerifiedBy (void)
`void`
+
diff --git a/docs/Segments/PID.md b/docs/Segments/PID.md
index 715aace..3296378 100644
--- a/docs/Segments/PID.md
+++ b/docs/Segments/PID.md
@@ -1,6 +1,7 @@
# Aranyasen\HL7\Segments\PID
PID segment class
+Reference: https://corepointhealth.com/resource-center/hl7-resources/hl7-pid-segment
@@ -12,6 +13,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#pid__destruct)||
|[getAlternatePatientID](#pidgetalternatepatientid)||
|[getBirthOrder](#pidgetbirthorder)||
|[getBirthPlace](#pidgetbirthplace)||
@@ -42,6 +44,7 @@ Aranyasen\HL7\Segment
|[getSSNNumber](#pidgetssnnumber)||
|[getSex](#pidgetsex)||
|[getVeteransMilitaryStatus](#pidgetveteransmilitarystatus)||
+|[resetIndex](#pidresetindex)|Reset index of this segment|
|[setAlternatePatientID](#pidsetalternatepatientid)||
|[setBirthOrder](#pidsetbirthorder)||
|[setBirthPlace](#pidsetbirthplace)||
@@ -78,6 +81,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -86,12 +90,36 @@ Aranyasen\HL7\Segment
+### PID::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### PID::getAlternatePatientID
**Description**
```php
-public getAlternatePatientID (void)
+ getAlternatePatientID (void)
```
@@ -106,6 +134,7 @@ public getAlternatePatientID (void)
`void`
+
@@ -114,7 +143,7 @@ public getAlternatePatientID (void)
**Description**
```php
-public getBirthOrder (void)
+ getBirthOrder (void)
```
@@ -129,6 +158,7 @@ public getBirthOrder (void)
`void`
+
@@ -137,7 +167,7 @@ public getBirthOrder (void)
**Description**
```php
-public getBirthPlace (void)
+ getBirthPlace (void)
```
@@ -152,6 +182,7 @@ public getBirthPlace (void)
`void`
+
@@ -160,7 +191,7 @@ public getBirthPlace (void)
**Description**
```php
-public getCitizenship (void)
+ getCitizenship (void)
```
@@ -175,6 +206,7 @@ public getCitizenship (void)
`void`
+
@@ -183,7 +215,7 @@ public getCitizenship (void)
**Description**
```php
-public getCountryCode (void)
+ getCountryCode (void)
```
@@ -198,6 +230,7 @@ public getCountryCode (void)
`void`
+
@@ -206,7 +239,7 @@ public getCountryCode (void)
**Description**
```php
-public getDateTimeOfBirth (void)
+ getDateTimeOfBirth (void)
```
@@ -221,6 +254,7 @@ public getDateTimeOfBirth (void)
`void`
+
@@ -229,7 +263,7 @@ public getDateTimeOfBirth (void)
**Description**
```php
-public getDriversLicenseNumber (void)
+ getDriversLicenseNumber (void)
```
@@ -244,6 +278,7 @@ public getDriversLicenseNumber (void)
`void`
+
@@ -252,7 +287,7 @@ public getDriversLicenseNumber (void)
**Description**
```php
-public getEthnicGroup (void)
+ getEthnicGroup (void)
```
@@ -267,6 +302,7 @@ public getEthnicGroup (void)
`void`
+
@@ -275,7 +311,7 @@ public getEthnicGroup (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -290,6 +326,7 @@ public getID (void)
`void`
+
@@ -298,7 +335,7 @@ public getID (void)
**Description**
```php
-public getMaritalStatus (void)
+ getMaritalStatus (void)
```
@@ -313,6 +350,7 @@ public getMaritalStatus (void)
`void`
+
@@ -321,7 +359,7 @@ public getMaritalStatus (void)
**Description**
```php
-public getMothersIdentifier (void)
+ getMothersIdentifier (void)
```
@@ -336,6 +374,7 @@ public getMothersIdentifier (void)
`void`
+
@@ -344,7 +383,7 @@ public getMothersIdentifier (void)
**Description**
```php
-public getMothersMaidenName (void)
+ getMothersMaidenName (void)
```
@@ -359,6 +398,7 @@ public getMothersMaidenName (void)
`void`
+
@@ -367,7 +407,7 @@ public getMothersMaidenName (void)
**Description**
```php
-public getMultipleBirthIndicator (void)
+ getMultipleBirthIndicator (void)
```
@@ -382,6 +422,7 @@ public getMultipleBirthIndicator (void)
`void`
+
@@ -390,7 +431,7 @@ public getMultipleBirthIndicator (void)
**Description**
```php
-public getNationality (void)
+ getNationality (void)
```
@@ -405,6 +446,7 @@ public getNationality (void)
`void`
+
@@ -413,7 +455,7 @@ public getNationality (void)
**Description**
```php
-public getPatientAccountNumber (void)
+ getPatientAccountNumber (void)
```
@@ -428,6 +470,7 @@ public getPatientAccountNumber (void)
`void`
+
@@ -436,7 +479,7 @@ public getPatientAccountNumber (void)
**Description**
```php
-public getPatientAddress (void)
+ getPatientAddress (void)
```
@@ -451,6 +494,7 @@ public getPatientAddress (void)
`void`
+
@@ -459,7 +503,7 @@ public getPatientAddress (void)
**Description**
```php
-public getPatientAlias (void)
+ getPatientAlias (void)
```
@@ -474,6 +518,7 @@ public getPatientAlias (void)
`void`
+
@@ -482,7 +527,7 @@ public getPatientAlias (void)
**Description**
```php
-public getPatientDeathDateAndTime (void)
+ getPatientDeathDateAndTime (void)
```
@@ -497,6 +542,7 @@ public getPatientDeathDateAndTime (void)
`void`
+
@@ -505,7 +551,7 @@ public getPatientDeathDateAndTime (void)
**Description**
```php
-public getPatientDeathIndicator (void)
+ getPatientDeathIndicator (void)
```
@@ -520,6 +566,7 @@ public getPatientDeathIndicator (void)
`void`
+
@@ -528,7 +575,7 @@ public getPatientDeathIndicator (void)
**Description**
```php
-public getPatientID (void)
+ getPatientID (void)
```
@@ -543,6 +590,7 @@ public getPatientID (void)
`void`
+
@@ -551,7 +599,7 @@ public getPatientID (void)
**Description**
```php
-public getPatientIdentifierList (int $position)
+public getPatientIdentifierList (void)
```
Patient ID (Internal ID)
@@ -560,7 +608,7 @@ Patient ID (Internal ID)
**Parameters**
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
@@ -568,6 +616,7 @@ Patient ID (Internal ID)
+
@@ -576,7 +625,7 @@ Patient ID (Internal ID)
**Description**
```php
-public getPatientName (void)
+ getPatientName (void)
```
@@ -591,6 +640,7 @@ public getPatientName (void)
`void`
+
@@ -599,7 +649,7 @@ public getPatientName (void)
**Description**
```php
-public getPhoneNumberBusiness (void)
+ getPhoneNumberBusiness (void)
```
@@ -614,6 +664,7 @@ public getPhoneNumberBusiness (void)
`void`
+
@@ -622,7 +673,7 @@ public getPhoneNumberBusiness (void)
**Description**
```php
-public getPhoneNumberHome (void)
+ getPhoneNumberHome (void)
```
@@ -637,6 +688,7 @@ public getPhoneNumberHome (void)
`void`
+
@@ -645,7 +697,7 @@ public getPhoneNumberHome (void)
**Description**
```php
-public getPrimaryLanguage (void)
+ getPrimaryLanguage (void)
```
@@ -660,6 +712,7 @@ public getPrimaryLanguage (void)
`void`
+
@@ -668,7 +721,7 @@ public getPrimaryLanguage (void)
**Description**
```php
-public getRace (void)
+ getRace (void)
```
@@ -683,6 +736,7 @@ public getRace (void)
`void`
+
@@ -691,7 +745,7 @@ public getRace (void)
**Description**
```php
-public getReligion (void)
+ getReligion (void)
```
@@ -706,6 +760,7 @@ public getReligion (void)
`void`
+
@@ -714,7 +769,7 @@ public getReligion (void)
**Description**
```php
-public getSSNNumber (void)
+ getSSNNumber (void)
```
@@ -729,6 +784,7 @@ public getSSNNumber (void)
`void`
+
@@ -737,7 +793,7 @@ public getSSNNumber (void)
**Description**
```php
-public getSex (void)
+ getSex (void)
```
@@ -752,6 +808,7 @@ public getSex (void)
`void`
+
@@ -760,7 +817,7 @@ public getSex (void)
**Description**
```php
-public getVeteransMilitaryStatus (void)
+ getVeteransMilitaryStatus (void)
```
@@ -775,6 +832,31 @@ public getVeteransMilitaryStatus (void)
`void`
+
+
+
+
+### PID::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -783,7 +865,7 @@ public getVeteransMilitaryStatus (void)
**Description**
```php
-public setAlternatePatientID (void)
+ setAlternatePatientID (void)
```
@@ -798,6 +880,7 @@ public setAlternatePatientID (void)
`void`
+
@@ -806,7 +889,7 @@ public setAlternatePatientID (void)
**Description**
```php
-public setBirthOrder (void)
+ setBirthOrder (void)
```
@@ -821,6 +904,7 @@ public setBirthOrder (void)
`void`
+
@@ -829,7 +913,7 @@ public setBirthOrder (void)
**Description**
```php
-public setBirthPlace (void)
+ setBirthPlace (void)
```
@@ -844,6 +928,7 @@ public setBirthPlace (void)
`void`
+
@@ -852,7 +937,7 @@ public setBirthPlace (void)
**Description**
```php
-public setCitizenship (void)
+ setCitizenship (void)
```
@@ -867,6 +952,7 @@ public setCitizenship (void)
`void`
+
@@ -875,7 +961,7 @@ public setCitizenship (void)
**Description**
```php
-public setCountryCode (void)
+ setCountryCode (void)
```
@@ -890,6 +976,7 @@ public setCountryCode (void)
`void`
+
@@ -898,7 +985,7 @@ public setCountryCode (void)
**Description**
```php
-public setDateTimeOfBirth (void)
+ setDateTimeOfBirth (void)
```
@@ -913,6 +1000,7 @@ public setDateTimeOfBirth (void)
`void`
+
@@ -921,7 +1009,7 @@ public setDateTimeOfBirth (void)
**Description**
```php
-public setDriversLicenseNumber (void)
+ setDriversLicenseNumber (void)
```
@@ -936,6 +1024,7 @@ public setDriversLicenseNumber (void)
`void`
+
@@ -944,7 +1033,7 @@ public setDriversLicenseNumber (void)
**Description**
```php
-public setEthnicGroup (void)
+ setEthnicGroup (void)
```
@@ -959,6 +1048,7 @@ public setEthnicGroup (void)
`void`
+
@@ -967,7 +1057,7 @@ public setEthnicGroup (void)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -982,6 +1072,7 @@ public setID (void)
`void`
+
@@ -990,7 +1081,7 @@ public setID (void)
**Description**
```php
-public setMaritalStatus (void)
+ setMaritalStatus (void)
```
@@ -1005,6 +1096,7 @@ public setMaritalStatus (void)
`void`
+
@@ -1013,7 +1105,7 @@ public setMaritalStatus (void)
**Description**
```php
-public setMothersIdentifier (void)
+ setMothersIdentifier (void)
```
@@ -1028,6 +1120,7 @@ public setMothersIdentifier (void)
`void`
+
@@ -1036,7 +1129,7 @@ public setMothersIdentifier (void)
**Description**
```php
-public setMothersMaidenName (void)
+ setMothersMaidenName (void)
```
@@ -1051,6 +1144,7 @@ public setMothersMaidenName (void)
`void`
+
@@ -1059,7 +1153,7 @@ public setMothersMaidenName (void)
**Description**
```php
-public setMultipleBirthIndicator (void)
+ setMultipleBirthIndicator (void)
```
@@ -1074,6 +1168,7 @@ public setMultipleBirthIndicator (void)
`void`
+
@@ -1082,7 +1177,7 @@ public setMultipleBirthIndicator (void)
**Description**
```php
-public setNationality (void)
+ setNationality (void)
```
@@ -1097,6 +1192,7 @@ public setNationality (void)
`void`
+
@@ -1105,7 +1201,7 @@ public setNationality (void)
**Description**
```php
-public setPatientAccountNumber (void)
+ setPatientAccountNumber (void)
```
@@ -1120,6 +1216,7 @@ public setPatientAccountNumber (void)
`void`
+
@@ -1128,7 +1225,7 @@ public setPatientAccountNumber (void)
**Description**
```php
-public setPatientAddress (void)
+ setPatientAddress (void)
```
@@ -1143,6 +1240,7 @@ public setPatientAddress (void)
`void`
+
@@ -1151,7 +1249,7 @@ public setPatientAddress (void)
**Description**
```php
-public setPatientAlias (void)
+ setPatientAlias (void)
```
@@ -1166,6 +1264,7 @@ public setPatientAlias (void)
`void`
+
@@ -1174,7 +1273,7 @@ public setPatientAlias (void)
**Description**
```php
-public setPatientDeathDateAndTime (void)
+ setPatientDeathDateAndTime (void)
```
@@ -1189,6 +1288,7 @@ public setPatientDeathDateAndTime (void)
`void`
+
@@ -1197,7 +1297,7 @@ public setPatientDeathDateAndTime (void)
**Description**
```php
-public setPatientDeathIndicator (void)
+ setPatientDeathIndicator (void)
```
@@ -1212,6 +1312,7 @@ public setPatientDeathIndicator (void)
`void`
+
@@ -1220,7 +1321,7 @@ public setPatientDeathIndicator (void)
**Description**
```php
-public setPatientID (void)
+ setPatientID (void)
```
@@ -1235,6 +1336,7 @@ public setPatientID (void)
`void`
+
@@ -1243,7 +1345,7 @@ public setPatientID (void)
**Description**
```php
-public setPatientIdentifierList (string $value, int $position)
+public setPatientIdentifierList (string $value)
```
Patient ID (Internal ID)
@@ -1253,12 +1355,10 @@ Patient ID (Internal ID)
**Parameters**
* `(string) $value`
-* `(int) $position`
**Return Values**
-`bool`
-
+`void`
@@ -1269,7 +1369,7 @@ Patient ID (Internal ID)
**Description**
```php
-public setPatientName (void)
+ setPatientName (void)
```
@@ -1284,6 +1384,7 @@ public setPatientName (void)
`void`
+
@@ -1292,7 +1393,7 @@ public setPatientName (void)
**Description**
```php
-public setPhoneNumberBusiness (void)
+ setPhoneNumberBusiness (void)
```
@@ -1307,6 +1408,7 @@ public setPhoneNumberBusiness (void)
`void`
+
@@ -1315,7 +1417,7 @@ public setPhoneNumberBusiness (void)
**Description**
```php
-public setPhoneNumberHome (void)
+ setPhoneNumberHome (void)
```
@@ -1330,6 +1432,7 @@ public setPhoneNumberHome (void)
`void`
+
@@ -1338,7 +1441,7 @@ public setPhoneNumberHome (void)
**Description**
```php
-public setPrimaryLanguage (void)
+ setPrimaryLanguage (void)
```
@@ -1353,6 +1456,7 @@ public setPrimaryLanguage (void)
`void`
+
@@ -1361,7 +1465,7 @@ public setPrimaryLanguage (void)
**Description**
```php
-public setRace (void)
+ setRace (void)
```
@@ -1376,6 +1480,7 @@ public setRace (void)
`void`
+
@@ -1384,7 +1489,7 @@ public setRace (void)
**Description**
```php
-public setReligion (void)
+ setReligion (void)
```
@@ -1399,6 +1504,7 @@ public setReligion (void)
`void`
+
@@ -1407,7 +1513,7 @@ public setReligion (void)
**Description**
```php
-public setSSNNumber (void)
+ setSSNNumber (void)
```
@@ -1422,6 +1528,7 @@ public setSSNNumber (void)
`void`
+
@@ -1430,7 +1537,7 @@ public setSSNNumber (void)
**Description**
```php
-public setSex (void)
+ setSex (void)
```
@@ -1445,6 +1552,7 @@ public setSex (void)
`void`
+
@@ -1453,7 +1561,7 @@ public setSex (void)
**Description**
```php
-public setVeteransMilitaryStatus (void)
+ setVeteransMilitaryStatus (void)
```
@@ -1468,5 +1576,6 @@ public setVeteransMilitaryStatus (void)
`void`
+
diff --git a/docs/Segments/PV1.md b/docs/Segments/PV1.md
index 0749cc7..0d3b921 100644
--- a/docs/Segments/PV1.md
+++ b/docs/Segments/PV1.md
@@ -13,6 +13,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
+|[__destruct](#pv1__destruct)||
|[getAccountStatus](#pv1getaccountstatus)||
|[getAdmissionType](#pv1getadmissiontype)||
|[getAdmitDateTime](#pv1getadmitdatetime)||
@@ -65,6 +66,7 @@ Aranyasen\HL7\Segment
|[getVipIndicator](#pv1getvipindicator)||
|[getVisitIndicator](#pv1getvisitindicator)||
|[getVisitNumber](#pv1getvisitnumber)||
+|[resetIndex](#pv1resetindex)|Reset index of this segment|
|[setAccountStatus](#pv1setaccountstatus)||
|[setAdmissionType](#pv1setadmissiontype)||
|[setAdmitDateTime](#pv1setadmitdatetime)||
@@ -123,6 +125,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -131,12 +134,36 @@ Aranyasen\HL7\Segment
+### PV1::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
### PV1::getAccountStatus
**Description**
```php
-public getAccountStatus (void)
+ getAccountStatus (void)
```
@@ -151,6 +178,7 @@ public getAccountStatus (void)
`void`
+
@@ -159,7 +187,7 @@ public getAccountStatus (void)
**Description**
```php
-public getAdmissionType (void)
+ getAdmissionType (void)
```
@@ -174,6 +202,7 @@ public getAdmissionType (void)
`void`
+
@@ -182,7 +211,7 @@ public getAdmissionType (void)
**Description**
```php
-public getAdmitDateTime (void)
+ getAdmitDateTime (void)
```
@@ -197,6 +226,7 @@ public getAdmitDateTime (void)
`void`
+
@@ -205,7 +235,7 @@ public getAdmitDateTime (void)
**Description**
```php
-public getAdmitSource (void)
+ getAdmitSource (void)
```
@@ -220,6 +250,7 @@ public getAdmitSource (void)
`void`
+
@@ -228,7 +259,7 @@ public getAdmitSource (void)
**Description**
```php
-public getAdmittingDoctor (void)
+ getAdmittingDoctor (void)
```
@@ -243,6 +274,7 @@ public getAdmittingDoctor (void)
`void`
+
@@ -251,7 +283,7 @@ public getAdmittingDoctor (void)
**Description**
```php
-public getAlternateVisitID (void)
+ getAlternateVisitID (void)
```
@@ -266,6 +298,7 @@ public getAlternateVisitID (void)
`void`
+
@@ -274,7 +307,7 @@ public getAlternateVisitID (void)
**Description**
```php
-public getAmbulatoryStatus (void)
+ getAmbulatoryStatus (void)
```
@@ -289,6 +322,7 @@ public getAmbulatoryStatus (void)
`void`
+
@@ -297,7 +331,7 @@ public getAmbulatoryStatus (void)
**Description**
```php
-public getAssignedPatientLocation (void)
+ getAssignedPatientLocation (void)
```
@@ -312,6 +346,7 @@ public getAssignedPatientLocation (void)
`void`
+
@@ -320,7 +355,7 @@ public getAssignedPatientLocation (void)
**Description**
```php
-public getAttendingDoctor (void)
+ getAttendingDoctor (void)
```
@@ -335,6 +370,7 @@ public getAttendingDoctor (void)
`void`
+
@@ -343,7 +379,7 @@ public getAttendingDoctor (void)
**Description**
```php
-public getBadDebtAgencyCode (void)
+ getBadDebtAgencyCode (void)
```
@@ -358,6 +394,7 @@ public getBadDebtAgencyCode (void)
`void`
+
@@ -366,7 +403,7 @@ public getBadDebtAgencyCode (void)
**Description**
```php
-public getBadDebtRecoveryAmount (void)
+ getBadDebtRecoveryAmount (void)
```
@@ -381,6 +418,7 @@ public getBadDebtRecoveryAmount (void)
`void`
+
@@ -389,7 +427,7 @@ public getBadDebtRecoveryAmount (void)
**Description**
```php
-public getBadDebtTransferAmount (void)
+ getBadDebtTransferAmount (void)
```
@@ -404,6 +442,7 @@ public getBadDebtTransferAmount (void)
`void`
+
@@ -412,7 +451,7 @@ public getBadDebtTransferAmount (void)
**Description**
```php
-public getBedStatus (void)
+ getBedStatus (void)
```
@@ -427,6 +466,7 @@ public getBedStatus (void)
`void`
+
@@ -435,7 +475,7 @@ public getBedStatus (void)
**Description**
```php
-public getChargePriceIndicator (void)
+ getChargePriceIndicator (void)
```
@@ -450,6 +490,7 @@ public getChargePriceIndicator (void)
`void`
+
@@ -458,7 +499,7 @@ public getChargePriceIndicator (void)
**Description**
```php
-public getConsultingDoctor (void)
+ getConsultingDoctor (void)
```
@@ -473,6 +514,7 @@ public getConsultingDoctor (void)
`void`
+
@@ -481,7 +523,7 @@ public getConsultingDoctor (void)
**Description**
```php
-public getContractAmount (void)
+ getContractAmount (void)
```
@@ -496,6 +538,7 @@ public getContractAmount (void)
`void`
+
@@ -504,7 +547,7 @@ public getContractAmount (void)
**Description**
```php
-public getContractCode (void)
+ getContractCode (void)
```
@@ -519,6 +562,7 @@ public getContractCode (void)
`void`
+
@@ -527,7 +571,7 @@ public getContractCode (void)
**Description**
```php
-public getContractEffectiveDate (void)
+ getContractEffectiveDate (void)
```
@@ -542,6 +586,7 @@ public getContractEffectiveDate (void)
`void`
+
@@ -550,7 +595,7 @@ public getContractEffectiveDate (void)
**Description**
```php
-public getContractPeriod (void)
+ getContractPeriod (void)
```
@@ -565,6 +610,7 @@ public getContractPeriod (void)
`void`
+
@@ -573,7 +619,7 @@ public getContractPeriod (void)
**Description**
```php
-public getCourtesyCode (void)
+ getCourtesyCode (void)
```
@@ -588,6 +634,7 @@ public getCourtesyCode (void)
`void`
+
@@ -596,7 +643,7 @@ public getCourtesyCode (void)
**Description**
```php
-public getCreditRating (void)
+ getCreditRating (void)
```
@@ -611,6 +658,7 @@ public getCreditRating (void)
`void`
+
@@ -619,7 +667,7 @@ public getCreditRating (void)
**Description**
```php
-public getCurrentPatientBalance (void)
+ getCurrentPatientBalance (void)
```
@@ -634,6 +682,7 @@ public getCurrentPatientBalance (void)
`void`
+
@@ -642,7 +691,7 @@ public getCurrentPatientBalance (void)
**Description**
```php
-public getDeleteAccountDate (void)
+ getDeleteAccountDate (void)
```
@@ -657,6 +706,7 @@ public getDeleteAccountDate (void)
`void`
+
@@ -665,7 +715,7 @@ public getDeleteAccountDate (void)
**Description**
```php
-public getDeleteAccountIndicator (void)
+ getDeleteAccountIndicator (void)
```
@@ -680,6 +730,7 @@ public getDeleteAccountIndicator (void)
`void`
+
@@ -688,7 +739,7 @@ public getDeleteAccountIndicator (void)
**Description**
```php
-public getDietType (void)
+ getDietType (void)
```
@@ -703,6 +754,7 @@ public getDietType (void)
`void`
+
@@ -711,7 +763,7 @@ public getDietType (void)
**Description**
```php
-public getDischargeDateTime (void)
+ getDischargeDateTime (void)
```
@@ -726,6 +778,7 @@ public getDischargeDateTime (void)
`void`
+
@@ -734,7 +787,7 @@ public getDischargeDateTime (void)
**Description**
```php
-public getDischargeDisposition (void)
+ getDischargeDisposition (void)
```
@@ -749,6 +802,7 @@ public getDischargeDisposition (void)
`void`
+
@@ -757,7 +811,7 @@ public getDischargeDisposition (void)
**Description**
```php
-public getDischargedToLocation (void)
+ getDischargedToLocation (void)
```
@@ -772,6 +826,7 @@ public getDischargedToLocation (void)
`void`
+
@@ -780,7 +835,7 @@ public getDischargedToLocation (void)
**Description**
```php
-public getFinancialClass (void)
+ getFinancialClass (void)
```
@@ -795,6 +850,7 @@ public getFinancialClass (void)
`void`
+
@@ -803,7 +859,7 @@ public getFinancialClass (void)
**Description**
```php
-public getHospitalService (void)
+ getHospitalService (void)
```
@@ -818,6 +874,7 @@ public getHospitalService (void)
`void`
+
@@ -826,7 +883,7 @@ public getHospitalService (void)
**Description**
```php
-public getID (void)
+ getID (void)
```
@@ -841,6 +898,7 @@ public getID (void)
`void`
+
@@ -849,7 +907,7 @@ public getID (void)
**Description**
```php
-public getInterestCode (void)
+ getInterestCode (void)
```
@@ -864,6 +922,7 @@ public getInterestCode (void)
`void`
+
@@ -872,7 +931,7 @@ public getInterestCode (void)
**Description**
```php
-public getOtherHealthcareProvider (void)
+ getOtherHealthcareProvider (void)
```
@@ -887,6 +946,7 @@ public getOtherHealthcareProvider (void)
`void`
+
@@ -895,7 +955,7 @@ public getOtherHealthcareProvider (void)
**Description**
```php
-public getPatientClass (void)
+ getPatientClass (void)
```
@@ -910,6 +970,7 @@ public getPatientClass (void)
`void`
+
@@ -918,7 +979,7 @@ public getPatientClass (void)
**Description**
```php
-public getPatientType (void)
+ getPatientType (void)
```
@@ -933,6 +994,7 @@ public getPatientType (void)
`void`
+
@@ -941,7 +1003,7 @@ public getPatientType (void)
**Description**
```php
-public getPendingLocation (void)
+ getPendingLocation (void)
```
@@ -956,6 +1018,7 @@ public getPendingLocation (void)
`void`
+
@@ -964,7 +1027,7 @@ public getPendingLocation (void)
**Description**
```php
-public getPreAdmitNumber (void)
+ getPreAdmitNumber (void)
```
@@ -979,6 +1042,7 @@ public getPreAdmitNumber (void)
`void`
+
@@ -987,7 +1051,7 @@ public getPreAdmitNumber (void)
**Description**
```php
-public getPreAdmitTestIndicator (void)
+ getPreAdmitTestIndicator (void)
```
@@ -1002,6 +1066,7 @@ public getPreAdmitTestIndicator (void)
`void`
+
@@ -1010,7 +1075,7 @@ public getPreAdmitTestIndicator (void)
**Description**
```php
-public getPriorPatientLocation (void)
+ getPriorPatientLocation (void)
```
@@ -1025,6 +1090,7 @@ public getPriorPatientLocation (void)
`void`
+
@@ -1033,7 +1099,7 @@ public getPriorPatientLocation (void)
**Description**
```php
-public getPriorTemporaryLocation (void)
+ getPriorTemporaryLocation (void)
```
@@ -1048,6 +1114,7 @@ public getPriorTemporaryLocation (void)
`void`
+
@@ -1056,7 +1123,7 @@ public getPriorTemporaryLocation (void)
**Description**
```php
-public getReAdmissionIndicator (void)
+ getReAdmissionIndicator (void)
```
@@ -1071,6 +1138,7 @@ public getReAdmissionIndicator (void)
`void`
+
@@ -1079,7 +1147,7 @@ public getReAdmissionIndicator (void)
**Description**
```php
-public getReferringDoctor (void)
+ getReferringDoctor (void)
```
@@ -1094,6 +1162,7 @@ public getReferringDoctor (void)
`void`
+
@@ -1102,7 +1171,7 @@ public getReferringDoctor (void)
**Description**
```php
-public getServicingFacility (void)
+ getServicingFacility (void)
```
@@ -1117,6 +1186,7 @@ public getServicingFacility (void)
`void`
+
@@ -1125,7 +1195,7 @@ public getServicingFacility (void)
**Description**
```php
-public getTemporaryLocation (void)
+ getTemporaryLocation (void)
```
@@ -1140,6 +1210,7 @@ public getTemporaryLocation (void)
`void`
+
@@ -1148,7 +1219,7 @@ public getTemporaryLocation (void)
**Description**
```php
-public getTotalAdjustments (void)
+ getTotalAdjustments (void)
```
@@ -1163,6 +1234,7 @@ public getTotalAdjustments (void)
`void`
+
@@ -1171,7 +1243,7 @@ public getTotalAdjustments (void)
**Description**
```php
-public getTotalCharges (void)
+ getTotalCharges (void)
```
@@ -1186,6 +1258,7 @@ public getTotalCharges (void)
`void`
+
@@ -1194,7 +1267,7 @@ public getTotalCharges (void)
**Description**
```php
-public getTotalPayments (void)
+ getTotalPayments (void)
```
@@ -1209,6 +1282,7 @@ public getTotalPayments (void)
`void`
+
@@ -1217,7 +1291,7 @@ public getTotalPayments (void)
**Description**
```php
-public getTransferToBadDebtCode (void)
+ getTransferToBadDebtCode (void)
```
@@ -1232,6 +1306,7 @@ public getTransferToBadDebtCode (void)
`void`
+
@@ -1240,7 +1315,7 @@ public getTransferToBadDebtCode (void)
**Description**
```php
-public getTransferToBadDebtDate (void)
+ getTransferToBadDebtDate (void)
```
@@ -1255,6 +1330,7 @@ public getTransferToBadDebtDate (void)
`void`
+
@@ -1263,7 +1339,7 @@ public getTransferToBadDebtDate (void)
**Description**
```php
-public getVipIndicator (void)
+ getVipIndicator (void)
```
@@ -1278,6 +1354,7 @@ public getVipIndicator (void)
`void`
+
@@ -1286,7 +1363,7 @@ public getVipIndicator (void)
**Description**
```php
-public getVisitIndicator (void)
+ getVisitIndicator (void)
```
@@ -1301,6 +1378,7 @@ public getVisitIndicator (void)
`void`
+
@@ -1309,7 +1387,7 @@ public getVisitIndicator (void)
**Description**
```php
-public getVisitNumber (void)
+ getVisitNumber (void)
```
@@ -1324,6 +1402,31 @@ public getVisitNumber (void)
`void`
+
+
+
+
+### PV1::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
@@ -1332,7 +1435,7 @@ public getVisitNumber (void)
**Description**
```php
-public setAccountStatus ( $value, int $position)
+ setAccountStatus (void)
```
@@ -1341,13 +1444,11 @@ public setAccountStatus ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1358,7 +1459,7 @@ public setAccountStatus ( $value, int $position)
**Description**
```php
-public setAdmissionType ( $value, int $position)
+ setAdmissionType (void)
```
@@ -1367,13 +1468,11 @@ public setAdmissionType ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1384,7 +1483,7 @@ public setAdmissionType ( $value, int $position)
**Description**
```php
-public setAdmitDateTime ( $value, int $position)
+ setAdmitDateTime (void)
```
@@ -1393,13 +1492,11 @@ public setAdmitDateTime ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1410,7 +1507,7 @@ public setAdmitDateTime ( $value, int $position)
**Description**
```php
-public setAdmitSource ( $value, int $position)
+ setAdmitSource (void)
```
@@ -1419,13 +1516,11 @@ public setAdmitSource ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1436,7 +1531,7 @@ public setAdmitSource ( $value, int $position)
**Description**
```php
-public setAdmittingDoctor ( $value, int $position)
+ setAdmittingDoctor (void)
```
@@ -1445,13 +1540,11 @@ public setAdmittingDoctor ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1462,7 +1555,7 @@ public setAdmittingDoctor ( $value, int $position)
**Description**
```php
-public setAlternateVisitID ( $value, int $position)
+ setAlternateVisitID (void)
```
@@ -1471,13 +1564,11 @@ public setAlternateVisitID ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1488,7 +1579,7 @@ public setAlternateVisitID ( $value, int $position)
**Description**
```php
-public setAmbulatoryStatus ( $value, int $position)
+ setAmbulatoryStatus (void)
```
@@ -1497,13 +1588,11 @@ public setAmbulatoryStatus ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1514,7 +1603,7 @@ public setAmbulatoryStatus ( $value, int $position)
**Description**
```php
-public setAssignedPatientLocation (void)
+ setAssignedPatientLocation (void)
```
@@ -1529,6 +1618,7 @@ public setAssignedPatientLocation (void)
`void`
+
@@ -1537,7 +1627,7 @@ public setAssignedPatientLocation (void)
**Description**
```php
-public setAttendingDoctor ( $value, int $position)
+ setAttendingDoctor (void)
```
@@ -1546,13 +1636,11 @@ public setAttendingDoctor ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1563,7 +1651,7 @@ public setAttendingDoctor ( $value, int $position)
**Description**
```php
-public setBadDebtAgencyCode ( $value, int $position)
+ setBadDebtAgencyCode (void)
```
@@ -1572,13 +1660,11 @@ public setBadDebtAgencyCode ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1589,7 +1675,7 @@ public setBadDebtAgencyCode ( $value, int $position)
**Description**
```php
-public setBadDebtRecoveryAmount ( $value, int $position)
+ setBadDebtRecoveryAmount (void)
```
@@ -1598,13 +1684,11 @@ public setBadDebtRecoveryAmount ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1615,7 +1699,7 @@ public setBadDebtRecoveryAmount ( $value, int $position)
**Description**
```php
-public setBadDebtTransferAmount ( $value, int $position)
+ setBadDebtTransferAmount (void)
```
@@ -1624,13 +1708,11 @@ public setBadDebtTransferAmount ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1641,7 +1723,7 @@ public setBadDebtTransferAmount ( $value, int $position)
**Description**
```php
-public setBedStatus ( $value, int $position)
+ setBedStatus (void)
```
@@ -1650,13 +1732,11 @@ public setBedStatus ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1667,7 +1747,7 @@ public setBedStatus ( $value, int $position)
**Description**
```php
-public setChargePriceIndicator ( $value, int $position)
+ setChargePriceIndicator (void)
```
@@ -1676,13 +1756,11 @@ public setChargePriceIndicator ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1693,7 +1771,7 @@ public setChargePriceIndicator ( $value, int $position)
**Description**
```php
-public setConsultingDoctor ( $value, int $position)
+ setConsultingDoctor (void)
```
@@ -1702,13 +1780,11 @@ public setConsultingDoctor ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1719,7 +1795,7 @@ public setConsultingDoctor ( $value, int $position)
**Description**
```php
-public setContractAmount ( $value, int $position)
+ setContractAmount (void)
```
@@ -1728,13 +1804,11 @@ public setContractAmount ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1745,7 +1819,7 @@ public setContractAmount ( $value, int $position)
**Description**
```php
-public setContractCode ( $value, int $position)
+ setContractCode (void)
```
@@ -1754,13 +1828,11 @@ public setContractCode ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1771,7 +1843,7 @@ public setContractCode ( $value, int $position)
**Description**
```php
-public setContractEffectiveDate ( $value, int $position)
+ setContractEffectiveDate (void)
```
@@ -1780,13 +1852,11 @@ public setContractEffectiveDate ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1797,7 +1867,7 @@ public setContractEffectiveDate ( $value, int $position)
**Description**
```php
-public setContractPeriod ( $value, int $position)
+ setContractPeriod (void)
```
@@ -1806,13 +1876,11 @@ public setContractPeriod ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1823,7 +1891,7 @@ public setContractPeriod ( $value, int $position)
**Description**
```php
-public setCourtesyCode ( $value, int $position)
+ setCourtesyCode (void)
```
@@ -1832,13 +1900,11 @@ public setCourtesyCode ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1849,7 +1915,7 @@ public setCourtesyCode ( $value, int $position)
**Description**
```php
-public setCreditRating ( $value, int $position)
+ setCreditRating (void)
```
@@ -1858,13 +1924,11 @@ public setCreditRating ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1875,7 +1939,7 @@ public setCreditRating ( $value, int $position)
**Description**
```php
-public setCurrentPatientBalance ( $value, int $position)
+ setCurrentPatientBalance (void)
```
@@ -1884,13 +1948,11 @@ public setCurrentPatientBalance ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1901,7 +1963,7 @@ public setCurrentPatientBalance ( $value, int $position)
**Description**
```php
-public setDeleteAccountDate ( $value, int $position)
+ setDeleteAccountDate (void)
```
@@ -1910,13 +1972,11 @@ public setDeleteAccountDate ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1927,7 +1987,7 @@ public setDeleteAccountDate ( $value, int $position)
**Description**
```php
-public setDeleteAccountIndicator ( $value, int $position)
+ setDeleteAccountIndicator (void)
```
@@ -1936,13 +1996,11 @@ public setDeleteAccountIndicator ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1953,7 +2011,7 @@ public setDeleteAccountIndicator ( $value, int $position)
**Description**
```php
-public setDietType ( $value, int $position)
+ setDietType (void)
```
@@ -1962,13 +2020,11 @@ public setDietType ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -1979,7 +2035,7 @@ public setDietType ( $value, int $position)
**Description**
```php
-public setDischargeDateTime ( $value, int $position)
+ setDischargeDateTime (void)
```
@@ -1988,13 +2044,11 @@ public setDischargeDateTime ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2005,7 +2059,7 @@ public setDischargeDateTime ( $value, int $position)
**Description**
```php
-public setDischargeDisposition ( $value, int $position)
+ setDischargeDisposition (void)
```
@@ -2014,13 +2068,11 @@ public setDischargeDisposition ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2031,7 +2083,7 @@ public setDischargeDisposition ( $value, int $position)
**Description**
```php
-public setDischargedToLocation ( $value, int $position)
+ setDischargedToLocation (void)
```
@@ -2040,13 +2092,11 @@ public setDischargedToLocation ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2057,7 +2107,7 @@ public setDischargedToLocation ( $value, int $position)
**Description**
```php
-public setFinancialClass ( $value, int $position)
+ setFinancialClass (void)
```
@@ -2066,13 +2116,11 @@ public setFinancialClass ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2083,7 +2131,7 @@ public setFinancialClass ( $value, int $position)
**Description**
```php
-public setHospitalService ( $value, int $position)
+ setHospitalService (void)
```
@@ -2092,13 +2140,11 @@ public setHospitalService ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2109,7 +2155,7 @@ public setHospitalService ( $value, int $position)
**Description**
```php
-public setID (void)
+ setID (void)
```
@@ -2124,6 +2170,7 @@ public setID (void)
`void`
+
@@ -2132,7 +2179,7 @@ public setID (void)
**Description**
```php
-public setInterestCode ( $value, int $position)
+ setInterestCode (void)
```
@@ -2141,13 +2188,11 @@ public setInterestCode ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2158,7 +2203,7 @@ public setInterestCode ( $value, int $position)
**Description**
```php
-public setOtherHealthcareProvider ( $value, int $position)
+ setOtherHealthcareProvider (void)
```
@@ -2167,13 +2212,11 @@ public setOtherHealthcareProvider ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2184,7 +2227,7 @@ public setOtherHealthcareProvider ( $value, int $position)
**Description**
```php
-public setPatientClass (void)
+ setPatientClass (void)
```
@@ -2199,6 +2242,7 @@ public setPatientClass (void)
`void`
+
@@ -2207,7 +2251,7 @@ public setPatientClass (void)
**Description**
```php
-public setPatientType ( $value, int $position)
+ setPatientType (void)
```
@@ -2216,13 +2260,11 @@ public setPatientType ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2233,7 +2275,7 @@ public setPatientType ( $value, int $position)
**Description**
```php
-public setPendingLocation ( $value, int $position)
+ setPendingLocation (void)
```
@@ -2242,13 +2284,11 @@ public setPendingLocation ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2259,7 +2299,7 @@ public setPendingLocation ( $value, int $position)
**Description**
```php
-public setPreAdmitNumber ( $value, int $position)
+ setPreAdmitNumber (void)
```
@@ -2268,13 +2308,11 @@ public setPreAdmitNumber ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2285,7 +2323,7 @@ public setPreAdmitNumber ( $value, int $position)
**Description**
```php
-public setPreAdmitTestIndicator ( $value, int $position)
+ setPreAdmitTestIndicator (void)
```
@@ -2294,13 +2332,11 @@ public setPreAdmitTestIndicator ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2311,7 +2347,7 @@ public setPreAdmitTestIndicator ( $value, int $position)
**Description**
```php
-public setPriorPatientLocation ( $value, int $position)
+ setPriorPatientLocation (void)
```
@@ -2320,13 +2356,11 @@ public setPriorPatientLocation ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2337,7 +2371,7 @@ public setPriorPatientLocation ( $value, int $position)
**Description**
```php
-public setPriorTemporaryLocation ( $value, int $position)
+ setPriorTemporaryLocation (void)
```
@@ -2346,13 +2380,11 @@ public setPriorTemporaryLocation ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2363,7 +2395,7 @@ public setPriorTemporaryLocation ( $value, int $position)
**Description**
```php
-public setReAdmissionIndicator ( $value, int $position)
+ setReAdmissionIndicator (void)
```
@@ -2372,13 +2404,11 @@ public setReAdmissionIndicator ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2389,7 +2419,7 @@ public setReAdmissionIndicator ( $value, int $position)
**Description**
```php
-public setReferringDoctor ( $value, int $position)
+ setReferringDoctor (void)
```
@@ -2398,13 +2428,11 @@ public setReferringDoctor ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2415,7 +2443,7 @@ public setReferringDoctor ( $value, int $position)
**Description**
```php
-public setServicingFacility ( $value, int $position)
+ setServicingFacility (void)
```
@@ -2424,13 +2452,11 @@ public setServicingFacility ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2441,7 +2467,7 @@ public setServicingFacility ( $value, int $position)
**Description**
```php
-public setTemporaryLocation ( $value, int $position)
+ setTemporaryLocation (void)
```
@@ -2450,13 +2476,11 @@ public setTemporaryLocation ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2467,7 +2491,7 @@ public setTemporaryLocation ( $value, int $position)
**Description**
```php
-public setTotalAdjustments ( $value, int $position)
+ setTotalAdjustments (void)
```
@@ -2476,13 +2500,11 @@ public setTotalAdjustments ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2493,7 +2515,7 @@ public setTotalAdjustments ( $value, int $position)
**Description**
```php
-public setTotalCharges ( $value, int $position)
+ setTotalCharges (void)
```
@@ -2502,13 +2524,11 @@ public setTotalCharges ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2519,7 +2539,7 @@ public setTotalCharges ( $value, int $position)
**Description**
```php
-public setTotalPayments ( $value, int $position)
+ setTotalPayments (void)
```
@@ -2528,13 +2548,11 @@ public setTotalPayments ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2545,7 +2563,7 @@ public setTotalPayments ( $value, int $position)
**Description**
```php
-public setTransferToBadDebtCode ( $value, int $position)
+ setTransferToBadDebtCode (void)
```
@@ -2554,13 +2572,11 @@ public setTransferToBadDebtCode ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2571,7 +2587,7 @@ public setTransferToBadDebtCode ( $value, int $position)
**Description**
```php
-public setTransferToBadDebtDate ( $value, int $position)
+ setTransferToBadDebtDate (void)
```
@@ -2580,13 +2596,11 @@ public setTransferToBadDebtDate ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2597,7 +2611,7 @@ public setTransferToBadDebtDate ( $value, int $position)
**Description**
```php
-public setVipIndicator ( $value, int $position)
+ setVipIndicator (void)
```
@@ -2606,13 +2620,11 @@ public setVipIndicator ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2623,7 +2635,7 @@ public setVipIndicator ( $value, int $position)
**Description**
```php
-public setVisitIndicator ( $value, int $position)
+ setVisitIndicator (void)
```
@@ -2632,13 +2644,11 @@ public setVisitIndicator ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
@@ -2649,7 +2659,7 @@ public setVisitIndicator ( $value, int $position)
**Description**
```php
-public setVisitNumber ( $value, int $position)
+ setVisitNumber (void)
```
@@ -2658,13 +2668,11 @@ public setVisitNumber ( $value, int $position)
**Parameters**
-* `() $value`
-* `(int) $position`
+`This function has no parameters.`
**Return Values**
-`bool`
-
+`void`
diff --git a/docs/Segments/PV2.md b/docs/Segments/PV2.md
new file mode 100644
index 0000000..a6e9043
--- /dev/null
+++ b/docs/Segments/PV2.md
@@ -0,0 +1,2354 @@
+# Aranyasen\HL7\Segments\PV2
+
+PV2 segment class
+Ref: https://hl7-definition.caristix.com/v2/HL7v2.4/Segments/PV2
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getAccommodationCode](#pv2getaccommodationcode)||
+|[getActualLengthOfInpatientStay](#pv2getactuallengthofinpatientstay)||
+|[getAdmissionLevelOfCareCode](#pv2getadmissionlevelofcarecode)||
+|[getAdmitReason](#pv2getadmitreason)||
+|[getAdvanceDirectiveCode](#pv2getadvancedirectivecode)||
+|[getBabyDetainedIndicator](#pv2getbabydetainedindicator)||
+|[getBillingMediaCode](#pv2getbillingmediacode)||
+|[getClinicOrganizationName](#pv2getclinicorganizationname)||
+|[getEmploymentIllnessRelatedIndicator](#pv2getemploymentillnessrelatedindicator)||
+|[getEstimatedLengthofInpatientStay](#pv2getestimatedlengthofinpatientstay)||
+|[getExpectedAdmitDateTime](#pv2getexpectedadmitdatetime)||
+|[getExpectedDischargeDateTime](#pv2getexpecteddischargedatetime)||
+|[getExpectedDischargeDisposition](#pv2getexpecteddischargedisposition)||
+|[getExpectedLOAReturnDateTime](#pv2getexpectedloareturndatetime)||
+|[getExpectedNumberOfInsurancePlans](#pv2getexpectednumberofinsuranceplans)||
+|[getExpectedSurgeryDateAndTime](#pv2getexpectedsurgerydateandtime)||
+|[getFirstSimilarIllnessDate](#pv2getfirstsimilarillnessdate)||
+|[getLivingWillCode](#pv2getlivingwillcode)||
+|[getMilitaryNonAvailabilityCode](#pv2getmilitarynonavailabilitycode)||
+|[getMilitaryPartnershipCode](#pv2getmilitarypartnershipcode)||
+|[getModeOfArrivalCode](#pv2getmodeofarrivalcode)||
+|[getNewbornBabyIndicator](#pv2getnewbornbabyindicator)||
+|[getOrganDonorCode](#pv2getorgandonorcode)||
+|[getPatientChargeAdjustmentCode](#pv2getpatientchargeadjustmentcode)||
+|[getPatientConditionCode](#pv2getpatientconditioncode)||
+|[getPatientStatusCode](#pv2getpatientstatuscode)||
+|[getPatientStatusEffectiveDate](#pv2getpatientstatuseffectivedate)||
+|[getPatientValuables](#pv2getpatientvaluables)||
+|[getPatientValuablesLocation](#pv2getpatientvaluableslocation)||
+|[getPrecautionCode](#pv2getprecautioncode)||
+|[getPreviousServiceDate](#pv2getpreviousservicedate)||
+|[getPreviousTreatmentDate](#pv2getprevioustreatmentdate)||
+|[getPurgeStatusCode](#pv2getpurgestatuscode)||
+|[getPurgeStatusDate](#pv2getpurgestatusdate)||
+|[getRecreationalDrugUseCode](#pv2getrecreationaldrugusecode)||
+|[getRecurringServiceCode](#pv2getrecurringservicecode)||
+|[getReferralSourceCode](#pv2getreferralsourcecode)||
+|[getRetentionIndicator](#pv2getretentionindicator)||
+|[getSignatureOnFileDate](#pv2getsignatureonfiledate)||
+|[getSpecialProgramCode](#pv2getspecialprogramcode)||
+|[getTransferReason](#pv2gettransferreason)||
+|[getVisitDescription](#pv2getvisitdescription)||
+|[getVisitPriorityCode](#pv2getvisitprioritycode)||
+|[getVisitProtectionIndicator](#pv2getvisitprotectionindicator)||
+|[getVisitPublicityCode](#pv2getvisitpublicitycode)||
+|[getVisitUserCode](#pv2getvisitusercode)||
+|[setAccommodationCode](#pv2setaccommodationcode)||
+|[setActualLengthOfInpatientStay](#pv2setactuallengthofinpatientstay)||
+|[setAdmissionLevelOfCareCode](#pv2setadmissionlevelofcarecode)||
+|[setAdmitReason](#pv2setadmitreason)||
+|[setAdvanceDirectiveCode](#pv2setadvancedirectivecode)||
+|[setBabyDetainedIndicator](#pv2setbabydetainedindicator)||
+|[setBillingMediaCode](#pv2setbillingmediacode)||
+|[setClinicOrganizationName](#pv2setclinicorganizationname)||
+|[setEmploymentIllnessRelatedIndicator](#pv2setemploymentillnessrelatedindicator)||
+|[setEstimatedLengthofInpatientStay](#pv2setestimatedlengthofinpatientstay)||
+|[setExpectedAdmitDateTime](#pv2setexpectedadmitdatetime)||
+|[setExpectedDischargeDateTime](#pv2setexpecteddischargedatetime)||
+|[setExpectedDischargeDisposition](#pv2setexpecteddischargedisposition)||
+|[setExpectedLOAReturnDateTime](#pv2setexpectedloareturndatetime)||
+|[setExpectedNumberOfInsurancePlans](#pv2setexpectednumberofinsuranceplans)||
+|[setExpectedSurgeryDateAndTime](#pv2setexpectedsurgerydateandtime)||
+|[setFirstSimilarIllnessDate](#pv2setfirstsimilarillnessdate)||
+|[setLivingWillCode](#pv2setlivingwillcode)||
+|[setMilitaryNonAvailabilityCode](#pv2setmilitarynonavailabilitycode)||
+|[setMilitaryPartnershipCode](#pv2setmilitarypartnershipcode)||
+|[setModeOfArrivalCode](#pv2setmodeofarrivalcode)||
+|[setNewbornBabyIndicator](#pv2setnewbornbabyindicator)||
+|[setOrganDonorCode](#pv2setorgandonorcode)||
+|[setPatientChargeAdjustmentCode](#pv2setpatientchargeadjustmentcode)||
+|[setPatientConditionCode](#pv2setpatientconditioncode)||
+|[setPatientStatusCode](#pv2setpatientstatuscode)||
+|[setPatientStatusEffectiveDate](#pv2setpatientstatuseffectivedate)||
+|[setPatientValuables](#pv2setpatientvaluables)||
+|[setPatientValuablesLocation](#pv2setpatientvaluableslocation)||
+|[setPrecautionCode](#pv2setprecautioncode)||
+|[setPreviousServiceDate](#pv2setpreviousservicedate)||
+|[setPreviousTreatmentDate](#pv2setprevioustreatmentdate)||
+|[setPriorPendingLocation](#pv2setpriorpendinglocation)||
+|[setPurgeStatusCode](#pv2setpurgestatuscode)||
+|[setPurgeStatusDate](#pv2setpurgestatusdate)||
+|[setRecreationalDrugUseCode](#pv2setrecreationaldrugusecode)||
+|[setRecurringServiceCode](#pv2setrecurringservicecode)||
+|[setReferralSourceCode](#pv2setreferralsourcecode)||
+|[setRetentionIndicator](#pv2setretentionindicator)||
+|[setSignatureOnFileDate](#pv2setsignatureonfiledate)||
+|[setSpecialProgramCode](#pv2setspecialprogramcode)||
+|[setTransferReason](#pv2settransferreason)||
+|[setVisitDescription](#pv2setvisitdescription)||
+|[setVisitPriorityCode](#pv2setvisitprioritycode)||
+|[setVisitProtectionIndicator](#pv2setvisitprotectionindicator)||
+|[setVisitPublicityCode](#pv2setvisitpublicitycode)||
+|[setVisitUserCode](#pv2setvisitusercode)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### PV2::getAccommodationCode
+
+**Description**
+
+```php
+ getAccommodationCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getActualLengthOfInpatientStay
+
+**Description**
+
+```php
+ getActualLengthOfInpatientStay (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getAdmissionLevelOfCareCode
+
+**Description**
+
+```php
+ getAdmissionLevelOfCareCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getAdmitReason
+
+**Description**
+
+```php
+ getAdmitReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getAdvanceDirectiveCode
+
+**Description**
+
+```php
+ getAdvanceDirectiveCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getBabyDetainedIndicator
+
+**Description**
+
+```php
+ getBabyDetainedIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getBillingMediaCode
+
+**Description**
+
+```php
+ getBillingMediaCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getClinicOrganizationName
+
+**Description**
+
+```php
+ getClinicOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getEmploymentIllnessRelatedIndicator
+
+**Description**
+
+```php
+ getEmploymentIllnessRelatedIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getEstimatedLengthofInpatientStay
+
+**Description**
+
+```php
+ getEstimatedLengthofInpatientStay (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getExpectedAdmitDateTime
+
+**Description**
+
+```php
+ getExpectedAdmitDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getExpectedDischargeDateTime
+
+**Description**
+
+```php
+ getExpectedDischargeDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getExpectedDischargeDisposition
+
+**Description**
+
+```php
+ getExpectedDischargeDisposition (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getExpectedLOAReturnDateTime
+
+**Description**
+
+```php
+ getExpectedLOAReturnDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getExpectedNumberOfInsurancePlans
+
+**Description**
+
+```php
+ getExpectedNumberOfInsurancePlans (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getExpectedSurgeryDateAndTime
+
+**Description**
+
+```php
+ getExpectedSurgeryDateAndTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getFirstSimilarIllnessDate
+
+**Description**
+
+```php
+ getFirstSimilarIllnessDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getLivingWillCode
+
+**Description**
+
+```php
+ getLivingWillCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getMilitaryNonAvailabilityCode
+
+**Description**
+
+```php
+ getMilitaryNonAvailabilityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getMilitaryPartnershipCode
+
+**Description**
+
+```php
+ getMilitaryPartnershipCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getModeOfArrivalCode
+
+**Description**
+
+```php
+ getModeOfArrivalCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getNewbornBabyIndicator
+
+**Description**
+
+```php
+ getNewbornBabyIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getOrganDonorCode
+
+**Description**
+
+```php
+ getOrganDonorCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPatientChargeAdjustmentCode
+
+**Description**
+
+```php
+ getPatientChargeAdjustmentCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPatientConditionCode
+
+**Description**
+
+```php
+ getPatientConditionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPatientStatusCode
+
+**Description**
+
+```php
+ getPatientStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPatientStatusEffectiveDate
+
+**Description**
+
+```php
+ getPatientStatusEffectiveDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPatientValuables
+
+**Description**
+
+```php
+ getPatientValuables (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPatientValuablesLocation
+
+**Description**
+
+```php
+ getPatientValuablesLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPrecautionCode
+
+**Description**
+
+```php
+ getPrecautionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPreviousServiceDate
+
+**Description**
+
+```php
+ getPreviousServiceDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPreviousTreatmentDate
+
+**Description**
+
+```php
+ getPreviousTreatmentDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPurgeStatusCode
+
+**Description**
+
+```php
+ getPurgeStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getPurgeStatusDate
+
+**Description**
+
+```php
+ getPurgeStatusDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getRecreationalDrugUseCode
+
+**Description**
+
+```php
+ getRecreationalDrugUseCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getRecurringServiceCode
+
+**Description**
+
+```php
+ getRecurringServiceCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getReferralSourceCode
+
+**Description**
+
+```php
+ getReferralSourceCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getRetentionIndicator
+
+**Description**
+
+```php
+ getRetentionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getSignatureOnFileDate
+
+**Description**
+
+```php
+ getSignatureOnFileDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getSpecialProgramCode
+
+**Description**
+
+```php
+ getSpecialProgramCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getTransferReason
+
+**Description**
+
+```php
+ getTransferReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getVisitDescription
+
+**Description**
+
+```php
+ getVisitDescription (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getVisitPriorityCode
+
+**Description**
+
+```php
+ getVisitPriorityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getVisitProtectionIndicator
+
+**Description**
+
+```php
+ getVisitProtectionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getVisitPublicityCode
+
+**Description**
+
+```php
+ getVisitPublicityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::getVisitUserCode
+
+**Description**
+
+```php
+ getVisitUserCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setAccommodationCode
+
+**Description**
+
+```php
+ setAccommodationCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setActualLengthOfInpatientStay
+
+**Description**
+
+```php
+ setActualLengthOfInpatientStay (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setAdmissionLevelOfCareCode
+
+**Description**
+
+```php
+ setAdmissionLevelOfCareCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setAdmitReason
+
+**Description**
+
+```php
+ setAdmitReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setAdvanceDirectiveCode
+
+**Description**
+
+```php
+ setAdvanceDirectiveCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setBabyDetainedIndicator
+
+**Description**
+
+```php
+ setBabyDetainedIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setBillingMediaCode
+
+**Description**
+
+```php
+ setBillingMediaCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setClinicOrganizationName
+
+**Description**
+
+```php
+ setClinicOrganizationName (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setEmploymentIllnessRelatedIndicator
+
+**Description**
+
+```php
+ setEmploymentIllnessRelatedIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setEstimatedLengthofInpatientStay
+
+**Description**
+
+```php
+ setEstimatedLengthofInpatientStay (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setExpectedAdmitDateTime
+
+**Description**
+
+```php
+ setExpectedAdmitDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setExpectedDischargeDateTime
+
+**Description**
+
+```php
+ setExpectedDischargeDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setExpectedDischargeDisposition
+
+**Description**
+
+```php
+ setExpectedDischargeDisposition (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setExpectedLOAReturnDateTime
+
+**Description**
+
+```php
+ setExpectedLOAReturnDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setExpectedNumberOfInsurancePlans
+
+**Description**
+
+```php
+ setExpectedNumberOfInsurancePlans (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setExpectedSurgeryDateAndTime
+
+**Description**
+
+```php
+ setExpectedSurgeryDateAndTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setFirstSimilarIllnessDate
+
+**Description**
+
+```php
+ setFirstSimilarIllnessDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setLivingWillCode
+
+**Description**
+
+```php
+ setLivingWillCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setMilitaryNonAvailabilityCode
+
+**Description**
+
+```php
+ setMilitaryNonAvailabilityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setMilitaryPartnershipCode
+
+**Description**
+
+```php
+ setMilitaryPartnershipCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setModeOfArrivalCode
+
+**Description**
+
+```php
+ setModeOfArrivalCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setNewbornBabyIndicator
+
+**Description**
+
+```php
+ setNewbornBabyIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setOrganDonorCode
+
+**Description**
+
+```php
+ setOrganDonorCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPatientChargeAdjustmentCode
+
+**Description**
+
+```php
+ setPatientChargeAdjustmentCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPatientConditionCode
+
+**Description**
+
+```php
+ setPatientConditionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPatientStatusCode
+
+**Description**
+
+```php
+ setPatientStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPatientStatusEffectiveDate
+
+**Description**
+
+```php
+ setPatientStatusEffectiveDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPatientValuables
+
+**Description**
+
+```php
+ setPatientValuables (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPatientValuablesLocation
+
+**Description**
+
+```php
+ setPatientValuablesLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPrecautionCode
+
+**Description**
+
+```php
+ setPrecautionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPreviousServiceDate
+
+**Description**
+
+```php
+ setPreviousServiceDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPreviousTreatmentDate
+
+**Description**
+
+```php
+ setPreviousTreatmentDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPriorPendingLocation
+
+**Description**
+
+```php
+ setPriorPendingLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPurgeStatusCode
+
+**Description**
+
+```php
+ setPurgeStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setPurgeStatusDate
+
+**Description**
+
+```php
+ setPurgeStatusDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setRecreationalDrugUseCode
+
+**Description**
+
+```php
+ setRecreationalDrugUseCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setRecurringServiceCode
+
+**Description**
+
+```php
+ setRecurringServiceCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setReferralSourceCode
+
+**Description**
+
+```php
+ setReferralSourceCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setRetentionIndicator
+
+**Description**
+
+```php
+ setRetentionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setSignatureOnFileDate
+
+**Description**
+
+```php
+ setSignatureOnFileDate (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setSpecialProgramCode
+
+**Description**
+
+```php
+ setSpecialProgramCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setTransferReason
+
+**Description**
+
+```php
+ setTransferReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setVisitDescription
+
+**Description**
+
+```php
+ setVisitDescription (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setVisitPriorityCode
+
+**Description**
+
+```php
+ setVisitPriorityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setVisitProtectionIndicator
+
+**Description**
+
+```php
+ setVisitProtectionIndicator (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setVisitPublicityCode
+
+**Description**
+
+```php
+ setVisitPublicityCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### PV2::setVisitUserCode
+
+**Description**
+
+```php
+ setVisitUserCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/RGS.md b/docs/Segments/RGS.md
new file mode 100644
index 0000000..5c1a75f
--- /dev/null
+++ b/docs/Segments/RGS.md
@@ -0,0 +1,229 @@
+# Aranyasen\HL7\Segments\RGS
+
+RGS segment class
+Ref: http://hl7-definition.caristix.com:9010/Default.aspx?version=HL7+v2.5.1&segment=RGS
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[__destruct](#rgs__destruct)||
+|[getID](#rgsgetid)||
+|[getResourceGroupID](#rgsgetresourcegroupid)||
+|[getSegmentActionCode](#rgsgetsegmentactioncode)||
+|[resetIndex](#rgsresetindex)|Reset index of this segment|
+|[setID](#rgssetid)||
+|[setResourceGroupID](#rgssetresourcegroupid)||
+|[setSegmentActionCode](#rgssetsegmentactioncode)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### RGS::__destruct
+
+**Description**
+
+```php
+ __destruct (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::getID
+
+**Description**
+
+```php
+ getID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::getResourceGroupID
+
+**Description**
+
+```php
+ getResourceGroupID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::getSegmentActionCode
+
+**Description**
+
+```php
+ getSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::resetIndex
+
+**Description**
+
+```php
+public static resetIndex (void)
+```
+
+Reset index of this segment
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::setID
+
+**Description**
+
+```php
+ setID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::setResourceGroupID
+
+**Description**
+
+```php
+ setResourceGroupID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### RGS::setSegmentActionCode
+
+**Description**
+
+```php
+ setSegmentActionCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/SAC.md b/docs/Segments/SAC.md
index e67cfc1..b0265c8 100644
--- a/docs/Segments/SAC.md
+++ b/docs/Segments/SAC.md
@@ -108,6 +108,7 @@ Aranyasen\HL7\Segment
| Name | Description |
|------|-------------|
|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
|getField|Get the field at index.|
|getFields|Get fields from a segment|
|getName|Get the name of the segment. This is basically the value at index 0|
@@ -1177,7 +1178,7 @@ Aranyasen\HL7\Segment
**Description**
```php
-public static resetIndex (int $index)
+public static resetIndex (void)
```
Reset index of this segment
@@ -1186,7 +1187,7 @@ Reset index of this segment
**Parameters**
-* `(int) $index`
+`This function has no parameters.`
**Return Values**
diff --git a/docs/Segments/SCH.md b/docs/Segments/SCH.md
new file mode 100644
index 0000000..776e35c
--- /dev/null
+++ b/docs/Segments/SCH.md
@@ -0,0 +1,1280 @@
+# Aranyasen\HL7\Segments\SCH
+
+SCH segment class
+Ref: https://corepointhealth.com/resource-center/hl7-resources/hl7-siu-message
+http://hl7-definition.caristix.com:9010/HL7%20v2.3.1/segment/SCH
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getAppointmentDuration](#schgetappointmentduration)||
+|[getAppointmentDurationUnits](#schgetappointmentdurationunits)||
+|[getAppointmentReason](#schgetappointmentreason)||
+|[getAppointmentTimingQuantity](#schgetappointmenttimingquantity)||
+|[getAppointmentType](#schgetappointmenttype)||
+|[getEnteredbyLocation](#schgetenteredbylocation)||
+|[getEnteredbyPerson](#schgetenteredbyperson)||
+|[getEnteredbyPhoneNumber](#schgetenteredbyphonenumber)||
+|[getEventReason](#schgeteventreason)||
+|[getFillerAppointmentID](#schgetfillerappointmentid)||
+|[getFillerContactAddress](#schgetfillercontactaddress)||
+|[getFillerContactLocation](#schgetfillercontactlocation)||
+|[getFillerContactPerson](#schgetfillercontactperson)||
+|[getFillerContactPhoneNumber](#schgetfillercontactphonenumber)||
+|[getFillerStatusCode](#schgetfillerstatuscode)||
+|[getOccurrenceNumber](#schgetoccurrencenumber)||
+|[getParentFillerAppointmentID](#schgetparentfillerappointmentid)||
+|[getParentPlacerAppointmentID](#schgetparentplacerappointmentid)||
+|[getPlacerAppointmentID](#schgetplacerappointmentid)||
+|[getPlacerContactAddress](#schgetplacercontactaddress)||
+|[getPlacerContactLocation](#schgetplacercontactlocation)||
+|[getPlacerContactPerson](#schgetplacercontactperson)||
+|[getPlacerContactPhoneNumber](#schgetplacercontactphonenumber)||
+|[getPlacerGroupNumber](#schgetplacergroupnumber)||
+|[getScheduleID](#schgetscheduleid)||
+|[setAppointmentDuration](#schsetappointmentduration)||
+|[setAppointmentDurationUnits](#schsetappointmentdurationunits)||
+|[setAppointmentReason](#schsetappointmentreason)||
+|[setAppointmentTimingQuantity](#schsetappointmenttimingquantity)||
+|[setAppointmentType](#schsetappointmenttype)||
+|[setEnteredbyLocation](#schsetenteredbylocation)||
+|[setEnteredbyPerson](#schsetenteredbyperson)||
+|[setEnteredbyPhoneNumber](#schsetenteredbyphonenumber)||
+|[setEventReason](#schseteventreason)||
+|[setFillerAppointmentID](#schsetfillerappointmentid)||
+|[setFillerContactAddress](#schsetfillercontactaddress)||
+|[setFillerContactLocation](#schsetfillercontactlocation)||
+|[setFillerContactPerson](#schsetfillercontactperson)||
+|[setFillerContactPhoneNumber](#schsetfillercontactphonenumber)||
+|[setFillerStatusCode](#schsetfillerstatuscode)||
+|[setOccurrenceNumber](#schsetoccurrencenumber)||
+|[setParentFillerAppointmentID](#schsetparentfillerappointmentid)||
+|[setParentPlacerAppointmentID](#schsetparentplacerappointmentid)||
+|[setPlacerAppointmentID](#schsetplacerappointmentid)||
+|[setPlacerContactAddress](#schsetplacercontactaddress)||
+|[setPlacerContactLocation](#schsetplacercontactlocation)||
+|[setPlacerContactPerson](#schsetplacercontactperson)||
+|[setPlacerContactPhoneNumber](#schsetplacercontactphonenumber)||
+|[setPlacerGroupNumber](#schsetplacergroupnumber)||
+|[setScheduleID](#schsetscheduleid)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### SCH::getAppointmentDuration
+
+**Description**
+
+```php
+ getAppointmentDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getAppointmentDurationUnits
+
+**Description**
+
+```php
+ getAppointmentDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getAppointmentReason
+
+**Description**
+
+```php
+ getAppointmentReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getAppointmentTimingQuantity
+
+**Description**
+
+```php
+ getAppointmentTimingQuantity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getAppointmentType
+
+**Description**
+
+```php
+ getAppointmentType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getEnteredbyLocation
+
+**Description**
+
+```php
+ getEnteredbyLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getEnteredbyPerson
+
+**Description**
+
+```php
+ getEnteredbyPerson (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getEnteredbyPhoneNumber
+
+**Description**
+
+```php
+ getEnteredbyPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getEventReason
+
+**Description**
+
+```php
+ getEventReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getFillerAppointmentID
+
+**Description**
+
+```php
+ getFillerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getFillerContactAddress
+
+**Description**
+
+```php
+ getFillerContactAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getFillerContactLocation
+
+**Description**
+
+```php
+ getFillerContactLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getFillerContactPerson
+
+**Description**
+
+```php
+ getFillerContactPerson (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getFillerContactPhoneNumber
+
+**Description**
+
+```php
+ getFillerContactPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getFillerStatusCode
+
+**Description**
+
+```php
+ getFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getOccurrenceNumber
+
+**Description**
+
+```php
+ getOccurrenceNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getParentFillerAppointmentID
+
+**Description**
+
+```php
+ getParentFillerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getParentPlacerAppointmentID
+
+**Description**
+
+```php
+ getParentPlacerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getPlacerAppointmentID
+
+**Description**
+
+```php
+ getPlacerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getPlacerContactAddress
+
+**Description**
+
+```php
+ getPlacerContactAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getPlacerContactLocation
+
+**Description**
+
+```php
+ getPlacerContactLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getPlacerContactPerson
+
+**Description**
+
+```php
+ getPlacerContactPerson (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getPlacerContactPhoneNumber
+
+**Description**
+
+```php
+ getPlacerContactPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getPlacerGroupNumber
+
+**Description**
+
+```php
+ getPlacerGroupNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::getScheduleID
+
+**Description**
+
+```php
+ getScheduleID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setAppointmentDuration
+
+**Description**
+
+```php
+ setAppointmentDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setAppointmentDurationUnits
+
+**Description**
+
+```php
+ setAppointmentDurationUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setAppointmentReason
+
+**Description**
+
+```php
+ setAppointmentReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setAppointmentTimingQuantity
+
+**Description**
+
+```php
+ setAppointmentTimingQuantity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setAppointmentType
+
+**Description**
+
+```php
+ setAppointmentType (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setEnteredbyLocation
+
+**Description**
+
+```php
+ setEnteredbyLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setEnteredbyPerson
+
+**Description**
+
+```php
+ setEnteredbyPerson (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setEnteredbyPhoneNumber
+
+**Description**
+
+```php
+ setEnteredbyPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setEventReason
+
+**Description**
+
+```php
+ setEventReason (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setFillerAppointmentID
+
+**Description**
+
+```php
+ setFillerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setFillerContactAddress
+
+**Description**
+
+```php
+ setFillerContactAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setFillerContactLocation
+
+**Description**
+
+```php
+ setFillerContactLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setFillerContactPerson
+
+**Description**
+
+```php
+ setFillerContactPerson (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setFillerContactPhoneNumber
+
+**Description**
+
+```php
+ setFillerContactPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setFillerStatusCode
+
+**Description**
+
+```php
+ setFillerStatusCode (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setOccurrenceNumber
+
+**Description**
+
+```php
+ setOccurrenceNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setParentFillerAppointmentID
+
+**Description**
+
+```php
+ setParentFillerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setParentPlacerAppointmentID
+
+**Description**
+
+```php
+ setParentPlacerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setPlacerAppointmentID
+
+**Description**
+
+```php
+ setPlacerAppointmentID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setPlacerContactAddress
+
+**Description**
+
+```php
+ setPlacerContactAddress (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setPlacerContactLocation
+
+**Description**
+
+```php
+ setPlacerContactLocation (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setPlacerContactPerson
+
+**Description**
+
+```php
+ setPlacerContactPerson (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setPlacerContactPhoneNumber
+
+**Description**
+
+```php
+ setPlacerContactPhoneNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setPlacerGroupNumber
+
+**Description**
+
+```php
+ setPlacerGroupNumber (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### SCH::setScheduleID
+
+**Description**
+
+```php
+ setScheduleID (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/docs/Segments/TQ1.md b/docs/Segments/TQ1.md
new file mode 100644
index 0000000..3d6dd08
--- /dev/null
+++ b/docs/Segments/TQ1.md
@@ -0,0 +1,729 @@
+# Aranyasen\HL7\Segments\TQ1
+
+TQ1 segment class
+Ref: http://hl7-definition.caristix.com:9010/HL7%20v2.5.1/dataType/Default.aspx?version=HL7+v2.5.1&dataType=TQ1
+
+
+
+## Extend:
+
+Aranyasen\HL7\Segment
+
+## Methods
+
+| Name | Description |
+|------|-------------|
+|[getConditionText](#tq1getconditiontext)||
+|[getConjunction](#tq1getconjunction)||
+|[getEndDateTime](#tq1getenddatetime)||
+|[getExplicitTime](#tq1getexplicittime)||
+|[getOccurrenceDuration](#tq1getoccurrenceduration)||
+|[getPriority](#tq1getpriority)||
+|[getQuantity](#tq1getquantity)||
+|[getRelativeTimeAndUnits](#tq1getrelativetimeandunits)||
+|[getRepeatPattern](#tq1getrepeatpattern)||
+|[getServiceDuration](#tq1getserviceduration)||
+|[getSetIdTQ1](#tq1getsetidtq1)||
+|[getStartDateTime](#tq1getstartdatetime)||
+|[getTextInstruction](#tq1gettextinstruction)||
+|[getTotalOccurrences](#tq1gettotaloccurrences)||
+|[setConditionText](#tq1setconditiontext)||
+|[setConjunction](#tq1setconjunction)||
+|[setEndDateTime](#tq1setenddatetime)||
+|[setExplicitTime](#tq1setexplicittime)||
+|[setOccurrenceDuration](#tq1setoccurrenceduration)||
+|[setPriority](#tq1setpriority)||
+|[setQuantity](#tq1setquantity)||
+|[setRelativeTimeAndUnits](#tq1setrelativetimeandunits)||
+|[setRepeatPattern](#tq1setrepeatpattern)||
+|[setServiceDuration](#tq1setserviceduration)||
+|[setSetIdTQ1](#tq1setsetidtq1)||
+|[setStartDateTime](#tq1setstartdatetime)||
+|[setTextInstruction](#tq1settextinstruction)||
+|[setTotalOccurrences](#tq1settotaloccurrences)||
+
+## Inherited methods
+
+| Name | Description |
+|------|-------------|
+|__construct|Create a segment.|
+|clearField|Remove any existing value from the field|
+|getField|Get the field at index.|
+|getFields|Get fields from a segment|
+|getName|Get the name of the segment. This is basically the value at index 0|
+|setField|Set the field specified by index to value.|
+|size|Get the number of fields for this segment, not including the name|
+
+
+
+### TQ1::getConditionText
+
+**Description**
+
+```php
+ getConditionText (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getConjunction
+
+**Description**
+
+```php
+ getConjunction (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getEndDateTime
+
+**Description**
+
+```php
+ getEndDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getExplicitTime
+
+**Description**
+
+```php
+ getExplicitTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getOccurrenceDuration
+
+**Description**
+
+```php
+ getOccurrenceDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getPriority
+
+**Description**
+
+```php
+ getPriority (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getQuantity
+
+**Description**
+
+```php
+ getQuantity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getRelativeTimeAndUnits
+
+**Description**
+
+```php
+ getRelativeTimeAndUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getRepeatPattern
+
+**Description**
+
+```php
+ getRepeatPattern (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getServiceDuration
+
+**Description**
+
+```php
+ getServiceDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getSetIdTQ1
+
+**Description**
+
+```php
+ getSetIdTQ1 (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getStartDateTime
+
+**Description**
+
+```php
+ getStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getTextInstruction
+
+**Description**
+
+```php
+ getTextInstruction (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::getTotalOccurrences
+
+**Description**
+
+```php
+ getTotalOccurrences (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setConditionText
+
+**Description**
+
+```php
+ setConditionText (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setConjunction
+
+**Description**
+
+```php
+ setConjunction (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setEndDateTime
+
+**Description**
+
+```php
+ setEndDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setExplicitTime
+
+**Description**
+
+```php
+ setExplicitTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setOccurrenceDuration
+
+**Description**
+
+```php
+ setOccurrenceDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setPriority
+
+**Description**
+
+```php
+ setPriority (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setQuantity
+
+**Description**
+
+```php
+ setQuantity (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setRelativeTimeAndUnits
+
+**Description**
+
+```php
+ setRelativeTimeAndUnits (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setRepeatPattern
+
+**Description**
+
+```php
+ setRepeatPattern (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setServiceDuration
+
+**Description**
+
+```php
+ setServiceDuration (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setSetIdTQ1
+
+**Description**
+
+```php
+ setSetIdTQ1 (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setStartDateTime
+
+**Description**
+
+```php
+ setStartDateTime (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setTextInstruction
+
+**Description**
+
+```php
+ setTextInstruction (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
+
+### TQ1::setTotalOccurrences
+
+**Description**
+
+```php
+ setTotalOccurrences (void)
+```
+
+
+
+
+
+**Parameters**
+
+`This function has no parameters.`
+
+**Return Values**
+
+`void`
+
+
+
+
diff --git a/src/HL7/Message.php b/src/HL7/Message.php
index 9284f7e..d20d881 100644
--- a/src/HL7/Message.php
+++ b/src/HL7/Message.php
@@ -5,7 +5,6 @@
namespace Aranyasen\HL7;
use Aranyasen\Exceptions\HL7Exception;
-use InvalidArgumentException;
/**
* Class specifying the HL7 message, both request and response.
@@ -18,18 +17,19 @@
*/
class Message
{
+ use SegmentManagerTrait;
use MessageHelpersTrait;
protected array $segments = [];
protected string $segmentSeparator;
protected bool $segmentEndingBar; # true, if '|' at end of each segment is needed
- protected $fieldSeparator;
+ protected string $fieldSeparator;
protected string $componentSeparator;
protected string $subcomponentSeparator;
protected string $repetitionSeparator;
protected string $escapeChar;
- protected $hl7Version;
+ protected string $hl7Version;
// Split (or not) repeated subfields joined by ~. E.g. if true, parses 3^0~4^1 to [3, '0~4', 1]
protected bool $doNotSplitRepetition;
@@ -48,7 +48,7 @@ class Message
* been added to the message will result in setting these values for the message.
*
* If the message couldn't be created, for example due to a erroneous HL7 message string, an error is raised.
- * @param string|null $msgStr
+ * @param string|null $msgString
* @param array|null $hl7Globals Set control characters or HL7 properties. e.g., ['HL7_VERSION' => '2.5']
* @param bool $keepEmptySubFields Set this to true to retain empty sub-fields
* @param bool $resetIndices Reset Indices of each segment to 1.
@@ -56,9 +56,10 @@ class Message
* @param bool|null $doNotSplitRepetition If true, repeated segments will be in single array instead of sub-arrays.
* Note: Since this is non-standard, it may be removed in future!
* @throws HL7Exception
+ * @deprecated Use HL7 factory class instead. Check readme
*/
public function __construct(
- string $msgStr = null,
+ string $msgString = null,
array $hl7Globals = null,
bool $keepEmptySubFields = false,
bool $resetIndices = false,
@@ -82,16 +83,16 @@ public function __construct(
}
// If no HL7 string is passed to the constructor, nothing else to do
- if (!$msgStr) {
+ if (!$msgString) {
return;
}
- $segments = preg_split("/[\n\r" . $this->segmentSeparator . ']/', $msgStr, -1, PREG_SPLIT_NO_EMPTY);
+ $segments = preg_split("/[\n\r{$this->segmentSeparator}]/", $msgString, -1, PREG_SPLIT_NO_EMPTY);
$this->setSeparators($segments[0]); // First segment is MSH, the control segment
// Do all segments
foreach ($segments as $index => $segmentString) {
- $fields = preg_split("/\\" . $this->fieldSeparator . '/', $segmentString);
+ $fields = preg_split("/\\{$this->fieldSeparator}/", $segmentString);
$segmentName = array_shift($fields);
foreach ($fields as $j => $field) {
@@ -109,149 +110,6 @@ public function __construct(
}
}
- /**
- * Append a segment to the end of the message
- */
- public function addSegment(Segment $segment): bool
- {
- if (count($this->segments) === 0) {
- $this->resetCtrl($segment);
- }
-
- $this->segments[] = $segment;
-
- return true;
- }
-
- /**
- * Insert a segment.
- *
- * @param null|int $index Index where segment is inserted
- * @throws InvalidArgumentException
- */
- public function insertSegment(Segment $segment, int $index = null): void
- {
- if ($index > count($this->segments)) {
- throw new InvalidArgumentException("Index out of range. Index: $index, Total segments: " .
- count($this->segments));
- }
-
- if ($index === 0) {
- $this->resetCtrl($segment);
- array_unshift($this->segments, $segment);
- } elseif ($index === count($this->segments)) {
- $this->segments[] = $segment;
- } else {
- $this->segments =
- array_merge(
- array_slice($this->segments, 0, $index),
- [$segment],
- array_slice($this->segments, $index)
- );
- }
- }
-
- /**
- * Return the segment specified by $index.
- *
- * Note: Segment count within the message starts at 0.
- *
- * @param int $index Index where segment is inserted
- */
- public function getSegmentByIndex(int $index): ?Segment
- {
- if ($index >= count($this->segments)) {
- return null;
- }
-
- return $this->segments[$index];
- }
-
- public function getSegmentIndex(Segment $segment): ?int
- {
- foreach ($this->segments as $ii => $value) {
- if ($value === $segment) {
- return $ii;
- }
- }
- return null;
- }
-
- /**
- * Return an array of all segments with the given name
- *
- * @param string $name Segment name
- * @return array List of segments identified by name
- */
- public function getSegmentsByName(string $name): array
- {
- $segmentsByName = [];
-
- foreach ($this->segments as $seg) {
- if ($seg->getName() === $name) {
- $segmentsByName[] = $seg;
- }
- }
-
- return $segmentsByName;
- }
-
- /**
- * Remove the segment indexed by $index.
- *
- * If it doesn't exist, nothing happens, if it does, all segments
- * after this one will be moved one index up.
- *
- * @param int $index Index where segment is removed
- */
- public function removeSegmentByIndex(int $index): bool
- {
- if ($index < count($this->segments)) {
- array_splice($this->segments, $index, 1);
- }
-
- return true;
- }
-
- /**
- * Remove given segment
- *
- * @return int Count of segments removed
- */
- public function removeSegmentsByName(string $segmentName): int
- {
- $count = 0;
- foreach ($this->getSegmentsByName($segmentName) as $segment) {
- $this->removeSegmentByIndex($this->getSegmentIndex($segment));
- $count++;
- }
- return $count;
- }
-
- /**
- * Set the segment on index.
- *
- * If index is out of range, or not provided, do nothing. Setting MSH on index 0 will re-validate field separator,
- * control characters and hl7 version, based on MSH(1), MSH(2) and MSH(12).
- *
- * @param int $index Index where segment is set
- * @throws InvalidArgumentException
- */
- public function setSegment(Segment $segment, int $index): bool
- {
- if (!isset($index) || $index > count($this->segments)) {
- throw new InvalidArgumentException('Index out of range');
- }
-
- if ($index === 0 && $segment->getName() === 'MSH') {
- $this->resetCtrl($segment);
- }
-
- $this->segments[$index] = $segment;
-
- return true;
- }
-
/**
* After change of MSH, reset control fields
*/
@@ -275,16 +133,6 @@ protected function resetCtrl(Segment $segment): bool
return true;
}
- /**
- * Return an array containing all segments in the right order.
- *
- * @return array List of all segments
- */
- public function getSegments(): array
- {
- return $this->segments;
- }
-
/**
* Return a string representation of this message.
*
@@ -292,11 +140,9 @@ public function getSegments(): array
* argument as some true value. This will not use the default segment separator, but '\n' instead.
*
* @param boolean $pretty Whether to use \n as separator or default (\r).
- * @return mixed String representation of HL7 message
- * @access public
* @throws HL7Exception
*/
- public function toString(bool $pretty = false)
+ public function toString(bool $pretty = false): string
{
if (empty($this->segments)) {
throw new HL7Exception('Message contains no data. Can not convert to string');
@@ -320,53 +166,6 @@ public function toString(bool $pretty = false)
return $message;
}
- /**
- * Convert Segment object to string
- */
- public function segmentToString(Segment $seg): string
- {
- $segmentName = $seg->getName();
- $segmentString = $segmentName . $this->fieldSeparator;
- $fields = $seg->getFields(($segmentName === 'MSH' ? 2 : 1));
-
- foreach ($fields as $field) {
- if (is_array($field)) {
- foreach ($field as $index => $value) {
- is_array($value)
- ? ($segmentString .= implode($this->subcomponentSeparator, $value))
- : ($segmentString .= $value);
-
- if ($index < (count($field) - 1)) {
- $segmentString .= $this->componentSeparator;
- }
- }
- } else {
- $segmentString .= $field;
- }
-
- $segmentString .= $this->fieldSeparator;
- }
-
- return $segmentString;
- }
-
- /**
- * Reset index attribute of each given segment, so when those are added the indices start from 1
- */
- public function resetSegmentIndices(): void
- {
- $reflector = new \ReflectionClass($this);
- $segments = glob(dirname($reflector->getFileName()) . '/Segments/*.php');
-
- // Go through each available segment class and reset its ID
- foreach ($segments as $file) { // ['OBR', 'PID', 'OBX', 'IN1'...]
- $className = "Aranyasen\\HL7\\Segments\\" . pathinfo($file, PATHINFO_FILENAME);
- if (class_exists($className) && method_exists($className, 'resetIndex')) {
- $className::resetIndex();
- }
- }
- }
-
private function extractComponentsFromField(string $field, bool $keepEmptySubFields): array|string
{
$pregFlags = $keepEmptySubFields
@@ -374,7 +173,7 @@ private function extractComponentsFromField(string $field, bool $keepEmptySubFie
: PREG_SPLIT_NO_EMPTY;
if ((str_contains($field, $this->repetitionSeparator)) && (! $this->doNotSplitRepetition)) {
- $components = preg_split("/\\" . $this->repetitionSeparator . '/', $field, -1, $pregFlags);
+ $components = preg_split("/\\{$this->repetitionSeparator}/", $field, -1, $pregFlags);
$fields = [];
foreach ($components as $index => $component) {
$fields[$index] = $this->extractComponentsFromField($component, $keepEmptySubFields);
@@ -383,13 +182,13 @@ private function extractComponentsFromField(string $field, bool $keepEmptySubFie
return $fields;
}
- $components = preg_split("/\\" . $this->componentSeparator . '/', $field, -1, $pregFlags);
+ $components = preg_split("/\\{$this->componentSeparator}/", $field, -1, $pregFlags);
foreach ($components as $index => $component) {
- $subComps = preg_split("/\\" . $this->subcomponentSeparator . '/', $component);
+ $subComponents = preg_split("/\\{$this->subcomponentSeparator}/", $component);
// Make it a ref or just the value
- $components[$index] = count($subComps) === 1
- ? $subComps[0]
- : $subComps;
+ $components[$index] = count($subComponents) === 1
+ ? $subComponents[0]
+ : $subComponents;
}
return count($components) === 1
@@ -410,7 +209,7 @@ private function setSeparators(string $msh): void
[, , $fieldSep, $compSep, $repSep, $esc, $subCompSep, $fieldSepCtrl] = $matches;
- // Check whether field separator is repeated after 4 control characters
+ // Check whether the field separator is used after 4 control characters
if ($fieldSep !== $fieldSepCtrl) {
throw new HL7Exception('Not a valid message: field separator invalid', E_USER_ERROR);
}
@@ -424,20 +223,4 @@ private function setSeparators(string $msh): void
$this->escapeChar = $esc;
$this->repetitionSeparator = $repSep;
}
-
- private function getSegmentClass(string $segmentName, array $fields, bool $autoIncrementIndices): Segment
- {
- // If a class exists for the segment under segments/, (e.g., MSH)
- $className = "Aranyasen\\HL7\\Segments\\$segmentName";
- if (!class_exists($className)) {
- return new Segment($segmentName, $fields);
- }
-
- if ($segmentName === 'MSH') {
- array_unshift($fields, $this->fieldSeparator); # First field for MSH is '|'
- return new $className($fields);
- }
-
- return new $className($fields, $autoIncrementIndices);
- }
}
diff --git a/src/HL7/MessageHelpersTrait.php b/src/HL7/MessageHelpersTrait.php
index 7d5da55..f904427 100644
--- a/src/HL7/MessageHelpersTrait.php
+++ b/src/HL7/MessageHelpersTrait.php
@@ -9,65 +9,6 @@
trait MessageHelpersTrait
{
- /**
- * Get the segment identified by index as string, using the messages separators.
- *
- * @param int $index Index for segment to get
- * @return string|null String representation of segment
- */
- public function getSegmentAsString(int $index): ?string
- {
- $seg = $this->getSegmentByIndex($index);
-
- if ($seg === null) {
- return null;
- }
-
- return $this->segmentToString($seg);
- }
-
- /**
- * Get the field identified by $fieldIndex from segment $segmentIndex.
- *
- * Returns empty string if field is not set.
- *
- * @param int $segmentIndex Index for segment to get
- * @param int $fieldIndex Index for field to get
- * @return null|string String representation of field
- */
- public function getSegmentFieldAsString(int $segmentIndex, int $fieldIndex): ?string
- {
- $segment = $this->getSegmentByIndex($segmentIndex);
-
- if ($segment === null) {
- return null;
- }
-
- $field = $segment->getField($fieldIndex);
-
- if (!$field) {
- return null;
- }
-
- $fieldString = null;
-
- if (\is_array($field)) {
- foreach ($field as $i => $value) {
- \is_array($value)
- ? ($fieldString .= implode($this->subcomponentSeparator, $value))
- : ($fieldString .= $value);
-
- if ($i < (\count($field) - 1)) {
- $fieldString .= $this->componentSeparator;
- }
- }
- } else {
- $fieldString .= $field;
- }
-
- return $fieldString;
- }
-
/**
* Write HL7 to a file
*
@@ -109,48 +50,6 @@ public function isSiu(): bool
return str_contains($msh->getMessageType(), 'SIU');
}
- /**
- * Check if given segment is present in the message object
- */
- public function hasSegment(string $segment): bool
- {
- return count($this->getSegmentsByName(strtoupper($segment))) > 0;
- }
-
- /**
- * Return the first segment with given name in the message
- *
- * @return mixed|null
- */
- public function getFirstSegmentInstance(string $segment)
- {
- if (!$this->hasSegment($segment)) {
- return null;
- }
- return $this->getSegmentsByName($segment)[0];
- }
-
- /**
- * @param bool $reIndex After deleting, re-index remaining segments of same name
- */
- public function removeSegment(Segment $segment, bool $reIndex = false): void
- {
- if (($key = array_search($segment, $this->segments, true)) !== false) {
- unset($this->segments[$key]);
- }
-
- if (!$reIndex) {
- return;
- }
-
- $segments = $this->getSegmentsByName($segment->getName());
- $index = 1;
- /** @var Segment $seg */
- foreach ($segments as $seg) {
- $seg->setField(1, $index++);
- }
- }
-
public function isEmpty(): bool
{
return empty($this->getSegments());
diff --git a/src/HL7/Messages/ACK.php b/src/HL7/Messages/ACK.php
index 93f98cd..8d40af8 100644
--- a/src/HL7/Messages/ACK.php
+++ b/src/HL7/Messages/ACK.php
@@ -4,11 +4,10 @@
namespace Aranyasen\HL7\Messages;
+use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Segments\MSA;
use Aranyasen\HL7\Segments\MSH;
-use Exception;
-use InvalidArgumentException;
class ACK extends Message
{
@@ -23,11 +22,10 @@ class ACK extends Message
* Convenience module implementing an acknowledgement (ACK) message. This can be used in HL7 servers to create an
* acknowledgement for an incoming message.
*
- * @param Message|null $req
- * @param MSH|null $reqMsh
- * @param array|null $hl7Globals Set control characters or HL7 properties. e.g., ['HL7_VERSION' => '2.5']
- * @throws Exception
- * @throws InvalidArgumentException
+ * @param Message|null $req
+ * @param MSH|null $reqMsh
+ * @param array|null $hl7Globals Set control characters or HL7 properties. e.g., ['HL7_VERSION' => '2.5']
+ * @throws HL7Exception
*/
public function __construct(Message $req = null, MSH $reqMsh = null, array $hl7Globals = null)
{
@@ -87,21 +85,20 @@ public function setAckCode(string $code, string $msg = null): bool
$mode = 'A';
// Determine acknowledge mode: normal or enhanced
- //
if ($this->ACK_TYPE === 'E') {
$mode = 'C';
}
- if (\strlen($code) === 1) {
+ if (strlen($code) === 1) {
$code = "$mode$code";
}
- $seg1 = $this->getSegmentByIndex(1);
- if (!empty($seg1)) {
- $seg1->setField(1, $code);
+ $segment = $this->getSegmentByIndex(1);
+ if (!empty($segment)) {
+ $segment->setField(1, $code);
}
if ($msg) {
- $seg1->setField(3, $msg);
+ $segment->setField(3, $msg);
}
return true;
diff --git a/src/HL7/Segment.php b/src/HL7/Segment.php
index d30a5d2..8f3462d 100644
--- a/src/HL7/Segment.php
+++ b/src/HL7/Segment.php
@@ -4,7 +4,7 @@
namespace Aranyasen\HL7;
-use InvalidArgumentException;
+use Aranyasen\Exceptions\HL7Exception;
class Segment
{
@@ -27,16 +27,15 @@ class Segment
* echo $seg->getField(1);
* ```
*
- * @author Aranya Sen
* @param string $name Name of the segment
* @param array|null $fields Fields for segment
- * @throws InvalidArgumentException
+ * @throws HL7Exception
*/
public function __construct(string $name, array $fields = null)
{
// Is the name 3 upper case characters?
if ((!$name) || (strlen($name) !== 3) || (strtoupper($name) !== $name)) {
- throw new InvalidArgumentException("Segment name '$name' should be 3 characters and in uppercase");
+ throw new HL7Exception("Segment name '$name' should be 3 characters and in uppercase");
}
$this->fields[0] = $name;
diff --git a/src/HL7/SegmentManagerTrait.php b/src/HL7/SegmentManagerTrait.php
new file mode 100644
index 0000000..3b1213e
--- /dev/null
+++ b/src/HL7/SegmentManagerTrait.php
@@ -0,0 +1,359 @@
+getSegmentByIndex($index);
+
+ if ($seg === null) {
+ return null;
+ }
+
+ return $this->segmentToString($seg);
+ }
+
+ /**
+ * Get the field identified by $fieldIndex from segment $segmentIndex.
+ *
+ * Returns empty string if field is not set.
+ *
+ * @param int $segmentIndex Index for segment to get
+ * @param int $fieldIndex Index for field to get
+ * @return null|string String representation of field
+ */
+ public function getSegmentFieldAsString(int $segmentIndex, int $fieldIndex): ?string
+ {
+ $segment = $this->getSegmentByIndex($segmentIndex);
+
+ if ($segment === null) {
+ return null;
+ }
+
+ $field = $segment->getField($fieldIndex);
+
+ if (!$field) {
+ return null;
+ }
+
+ $fieldString = null;
+
+ if (is_array($field)) {
+ foreach ($field as $i => $value) {
+ is_array($value)
+ ? ($fieldString .= implode($this->subcomponentSeparator, $value))
+ : ($fieldString .= $value);
+
+ if ($i < (count($field) - 1)) {
+ $fieldString .= $this->componentSeparator;
+ }
+ }
+ } else {
+ $fieldString .= $field;
+ }
+
+ return $fieldString;
+ }
+ /**
+ * Check if given segment is present in the message object
+ */
+ public function hasSegment(string $segment): bool
+ {
+ return count($this->getSegmentsByName(strtoupper($segment))) > 0;
+ }
+
+ /**
+ * Return the first segment with given name in the message
+ */
+ public function getFirstSegmentInstance(string $segment): ?Segment
+ {
+ if (!$this->hasSegment($segment)) {
+ return null;
+ }
+ return $this->getSegmentsByName($segment)[0];
+ }
+
+ /**
+ * @param bool $reIndex After deleting, re-index remaining segments of same name
+ */
+ public function removeSegment(Segment $segment, bool $reIndex = false): void
+ {
+ if (($key = array_search($segment, $this->segments, true)) !== false) {
+ unset($this->segments[$key]);
+ }
+
+ if (!$reIndex) {
+ return;
+ }
+
+ $segments = $this->getSegmentsByName($segment->getName());
+ $index = 1;
+ foreach ($segments as $seg) {
+ $seg->setField(1, $index++);
+ }
+ }
+
+ /**
+ * Append a segment to the end of the message
+ */
+ public function addSegment(Segment $segment): bool
+ {
+ $isFirstSegment = count($this->segments) === 0;
+ if ($isFirstSegment && $segment->getName() !== 'MSH') {
+ throw new HL7Exception('First segment added to an empty Message should be MSH');
+ }
+
+ if ($isFirstSegment) {
+ $this->resetCtrl($segment);
+ }
+
+ $this->segments[] = $segment;
+
+ return true;
+ }
+
+ /**
+ * Insert a segment.
+ * Setting MSH on index 0 will re-validate field separator, control characters and hl7 version, based on MSH(1),
+ * MSH(2) and MSH(12)
+ *
+ * @param null|int $index Index where segment should be inserted
+ * @param bool $replace Replace the current segment in given $index
+ * @throws HL7Exception
+ */
+ public function insertSegment(Segment $segment, int $index = null, bool $replace = false): void
+ {
+ if ($index > count($this->segments)) {
+ throw new HL7Exception("Index '$index' greater than the number of total segments " .
+ count($this->segments));
+ }
+
+ if ($index === 0) {
+ if ($segment->getName() !== 'MSH') {
+ throw new HL7Exception('Only MSH can be inserted at position 0');
+ }
+ if (!$replace) {
+ throw new HL7Exception('MSH segment can not be replaced unless forced');
+ }
+ $this->resetCtrl($segment);
+ array_unshift($this->segments, $segment);
+ return;
+ }
+
+ if ($index === count($this->segments)) {
+ $this->addSegment($segment);
+ return;
+ }
+
+ if ($replace) {
+ $this->segments[$index] = $segment;
+ }
+
+ // If $index is less than total number of current segments. This is a true "insert" scenario...
+ $this->segments =
+ array_merge(
+ array_slice($this->segments, 0, $index),
+ [$segment],
+ array_slice($this->segments, $index)
+ );
+ }
+
+ /**
+ * Return the segment specified by $index.
+ *
+ * Note: Segment count within the message starts at 0.
+ *
+ * @param int $index Index where segment is inserted
+ */
+ public function getSegmentByIndex(int $index): ?Segment
+ {
+ if ($index >= count($this->segments)) {
+ return null;
+ }
+
+ return $this->segments[$index];
+ }
+
+ public function getSegmentIndex(Segment $segment): ?int
+ {
+ foreach ($this->segments as $key => $value) {
+ if ($value === $segment) {
+ return $key;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return an array of all segments with the given name
+ *
+ * @param string $name Segment name
+ * @return array
+ */
+ public function getSegmentsByName(string $name): array
+ {
+ $segmentsByName = [];
+
+ foreach ($this->segments as $segment) {
+ if ($segment->getName() === $name) {
+ $segmentsByName[] = $segment;
+ }
+ }
+
+ return $segmentsByName;
+ }
+
+ /**
+ * Remove the segment indexed by $index.
+ *
+ * If it doesn't exist, nothing happens, if it does, all segments after this one will be moved one index up.
+ *
+ * @param int $index Index where segment is removed
+ */
+ public function removeSegmentByIndex(int $index): bool
+ {
+ if ($index < count($this->segments)) {
+ array_splice($this->segments, $index, 1);
+ }
+
+ return true;
+ }
+
+ /**
+ * Remove given segment
+ *
+ * @return int Count of segments removed
+ */
+ public function removeSegmentsByName(string $segmentName): int
+ {
+ $count = 0;
+ foreach ($this->getSegmentsByName($segmentName) as $segment) {
+ $this->removeSegmentByIndex($this->getSegmentIndex($segment));
+ $count++;
+ }
+ return $count;
+ }
+
+ /**
+ * Set the segment on index.
+ *
+ * If index is out of range, or not provided, do nothing. Setting MSH on index 0 will re-validate field separator,
+ * control characters and hl7 version, based on MSH(1), MSH(2) and MSH(12).
+ *
+ * @param int $index Index where segment is set
+ * @throws HL7Exception
+ * @deprecated Use insertSegment() instead
+ */
+ public function setSegment(Segment $segment, int $index): bool
+ {
+ if (!isset($index) || $index > count($this->segments)) {
+ throw new HL7Exception('Index out of range');
+ }
+
+ if ($index === 0 && $segment->getName() === 'MSH') {
+ $this->resetCtrl($segment);
+ }
+
+ $this->segments[$index] = $segment;
+
+ return true;
+ }
+
+ /**
+ * @throws HL7Exception
+ */
+ public function replaceSegment(Segment $segment, int $index): void
+ {
+ $this->insertSegment($segment, $index, true);
+ }
+
+ /**
+ * Return an array containing all segments in the right order.
+ *
+ * @return array
+ */
+ public function getSegments(): array
+ {
+ return $this->segments;
+ }
+
+
+ /**
+ * Convert Segment object to string
+ */
+ public function segmentToString(Segment $seg): string
+ {
+ $segmentName = $seg->getName();
+ $segmentString = $segmentName . $this->fieldSeparator;
+ $fields = $seg->getFields(($segmentName === 'MSH' ? 2 : 1));
+
+ foreach ($fields as $field) {
+ if (is_array($field)) {
+ foreach ($field as $index => $value) {
+ is_array($value)
+ ? ($segmentString .= implode($this->subcomponentSeparator, $value))
+ : ($segmentString .= $value);
+
+ if ($index < (count($field) - 1)) {
+ $segmentString .= $this->componentSeparator;
+ }
+ }
+ } else {
+ $segmentString .= $field;
+ }
+
+ $segmentString .= $this->fieldSeparator;
+ }
+
+ return $segmentString;
+ }
+
+ /**
+ * Reset index attribute of each given segment, so when those are added the indices start from 1
+ */
+ public function resetSegmentIndices(): void
+ {
+ $reflector = new ReflectionClass($this);
+ $segments = glob(dirname($reflector->getFileName()) . '/Segments/*.php');
+
+ // Go through each available segment class and reset its ID
+ foreach ($segments as $file) { // ['OBR', 'PID', 'OBX', 'IN1'...]
+ $className = "Aranyasen\\HL7\\Segments\\" . pathinfo($file, PATHINFO_FILENAME);
+ if (class_exists($className) && method_exists($className, 'resetIndex')) {
+ $className::resetIndex();
+ }
+ }
+ }
+
+ /**
+ * @throws HL7Exception
+ */
+ private function getSegmentClass(string $segmentName, array $fields, bool $autoIncrementIndices): Segment
+ {
+ // If a class exists for the segment under segments/, (e.g., MSH)
+ $className = "Aranyasen\\HL7\\Segments\\$segmentName";
+ if (!class_exists($className)) {
+ return new Segment($segmentName, $fields);
+ }
+
+ if ($segmentName === 'MSH') {
+ array_unshift($fields, $this->fieldSeparator); # First field for MSH is '|'
+ return new $className($fields);
+ }
+
+ return new $className($fields, $autoIncrementIndices);
+ }
+}
diff --git a/src/HL7/Segments/GT1.php b/src/HL7/Segments/GT1.php
index 5eb06e2..c8e657b 100644
--- a/src/HL7/Segments/GT1.php
+++ b/src/HL7/Segments/GT1.php
@@ -4,6 +4,7 @@
namespace Aranyasen\HL7\Segments;
+use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Segment;
/**
@@ -84,7 +85,7 @@ public function setGuarantorSex(string $value, int $position = 9)
{
// Ref: https://hl7-definition.caristix.com/v2/HL7v2.4/Tables/0001
if (!in_array($value, ['A', 'F', 'M', 'N', 'O', 'U'], true)) {
- throw new InvalidArgumentException("Sex should one of 'A', 'F', 'M', 'N', 'O' or 'U'. Given: '$value'");
+ throw new HL7Exception("Sex should one of 'A', 'F', 'M', 'N', 'O' or 'U'. Given: '$value'");
}
return $this->setField($position, $value);
}
diff --git a/src/HL7/Segments/MSH.php b/src/HL7/Segments/MSH.php
index a84c69c..2659417 100644
--- a/src/HL7/Segments/MSH.php
+++ b/src/HL7/Segments/MSH.php
@@ -4,9 +4,8 @@
namespace Aranyasen\HL7\Segments;
+use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Segment;
-use Exception;
-use InvalidArgumentException;
/**
* MSH (message header) segment class
@@ -36,9 +35,9 @@ class MSH extends Segment
* sub-components, the array may hold sub-arrays and sub-sub-arrays. If the reference is not given, the MSH segment
* will be created with the MSH 1,2,7,10 and 12 fields filled in for convenience.
*
- * @param null|array $fields
- * @param null|array $hl7Globals
- * @throws InvalidArgumentException|Exception
+ * @param null|array $fields
+ * @param null|array $hl7Globals
+ * @throws HL7Exception
*/
public function __construct(array $fields = null, array $hl7Globals = null)
{
diff --git a/src/HL7/Segments/PID.php b/src/HL7/Segments/PID.php
index 03cfec7..b54d560 100644
--- a/src/HL7/Segments/PID.php
+++ b/src/HL7/Segments/PID.php
@@ -4,8 +4,8 @@
namespace Aranyasen\HL7\Segments;
+use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Segment;
-use InvalidArgumentException;
/**
* PID segment class
@@ -77,7 +77,7 @@ public function setDateTimeOfBirth($value, int $position = 7)
{
// TODO: Validate if $value is of the form %Y%m%d%H%M%S
//if ($value !== 'F' && $value !== 'M') {
- // throw new \InvalidArgumentException("Date should be of the form YYYYmmddHHMMSS. Given: '$value''");
+ // throw new \Hl7Exception("Date should be of the form YYYYmmddHHMMSS. Given: '$value''");
//}
return $this->setField($position, $value);
}
@@ -86,7 +86,7 @@ public function setSex(string $value, int $position = 8)
{
// Ref: https://hl7-definition.caristix.com/v2/HL7v2.4/Tables/0001
if (!in_array($value, ['A', 'F', 'M', 'N', 'O', 'U'], true)) {
- throw new InvalidArgumentException("Sex should one of 'A', 'F', 'M', 'N', 'O' or 'U'. Given: '$value'");
+ throw new HL7Exception("Sex should one of 'A', 'F', 'M', 'N', 'O' or 'U'. Given: '$value'");
}
return $this->setField($position, $value);
}
diff --git a/tests/MessageTest.php b/tests/MessageTest.php
index 6e5ff1e..2684947 100644
--- a/tests/MessageTest.php
+++ b/tests/MessageTest.php
@@ -10,7 +10,6 @@
use Aranyasen\HL7\Segments\MSH;
use Aranyasen\HL7\Segments\PID;
use Exception;
-use InvalidArgumentException;
use DMS\PHPUnitExtensions\ArraySubset\Assert;
class MessageTest extends TestCase
@@ -27,6 +26,15 @@ public function subfields_can_be_retained_when_required(): void
Assert::assertArraySubset(['', 'AAAA1', '', '', 'BB'], $fields);
}
+ /** @test */
+ public function field_separator_should_be_used_in_the_MSH_segment(): void
+ {
+ $this->expectException(HL7Exception::class);
+ $this->expectExceptionMessage('Not a valid message: field separator invalid');
+ $invalidFieldSeparator = '='; // Can be any character but |
+ new Message("MSH|^~\\&$invalidFieldSeparator");
+ }
+
/** @test */
public function segments_can_be_added_to_existing_message(): void
{
@@ -42,6 +50,17 @@ public function segments_can_be_added_to_existing_message(): void
}
/** @test */
+ public function first_segment_added_to_an_empty_message_should_be_MSH(): void
+ {
+ $msg = new Message();
+ $this->expectException(HL7Exception::class);
+ $this->expectExceptionMessage('First segment added to an empty Message should be MSH');
+ $msg->addSegment(new Segment('PID'));
+ }
+
+ /** @test
+ * @throws HL7Exception
+ */
public function fields_can_be_added_to_existing_segments(): void
{
$msg = new Message();
@@ -145,11 +164,11 @@ public function subcomponents_can_be_separated_by_custom_character(): void
}
/** @test */
- public function segments_can_be_added_from_message(): void
+ public function segments_can_be_added_to_message(): void
{
- $msg = new Message();
+ $msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('XXX'));
- self::assertSame('XXX', $msg->getSegmentByIndex(0)->getName(), 'Add segment');
+ self::assertSame('XXX', $msg->getSegmentByIndex(1)->getName(), 'Add segment');
}
/** @test */
@@ -173,11 +192,11 @@ public function segment_can_be_removed_from_message(): void
/** @test */
public function segments_can_be_removed_from_message_using_index(): void
{
- $msg = new Message();
+ $msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('XXX'));
$msg->addSegment(new Segment('YYY'));
- $msg->removeSegmentByIndex(0);
- self::assertSame('YYY', $msg->getSegmentByIndex(0)->getName(), 'Remove segment');
+ $msg->removeSegmentByIndex(1);
+ self::assertSame('YYY', $msg->getSegmentByIndex(1)->getName(), 'Remove segment');
}
/**
@@ -200,20 +219,30 @@ public function segments_can_be_removed_by_name(): void
/** @test */
public function a_new_segment_can_be_inserted_between_two_existing_segments(): void
{
- $msg = new Message();
+ $msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('AAA'));
$msg->addSegment(new Segment('BBB'));
- $msg->insertSegment(new Segment('XXX'), 1);
+ $msg->insertSegment(new Segment('XXX'), 2);
+
+ self::assertSame('XXX', $msg->getSegmentByIndex(2)->getName(), 'Inserted segment');
+ self::assertSame('BBB', $msg->getSegmentByIndex(3)->getName(), 'Existing segment should shift');
+ }
+
+ /** @test */
+ public function the_only_segment_that_can_be_inserted_in_0_index_is_msh(): void
+ {
+ $msg = new Message("MSH|^~\\&|1|\r");
+ $msg->insertSegment(new Segment('MSH'), 0, true); // Should be allowed
- self::assertSame('XXX', $msg->getSegmentByIndex(1)->getName(), 'Inserted segment');
- self::assertSame('BBB', $msg->getSegmentByIndex(2)->getName(), 'Existing segment should shift');
+ self::expectException(HL7Exception::class);
+ $msg->insertSegment(new Segment('XXX'), 0); // Should not be allowed
}
/** @test */
public function it_should_not_be_possible_to_insert_segment_beyond_last_index(): void
{
$msg = new Message();
- $this->expectException(InvalidArgumentException::class);
+ $this->expectException(HL7Exception::class);
$msg->insertSegment(new Segment('ZZ1'), 3);
self::assertEmpty($msg->getSegmentByIndex(3), 'Erroneous insert');
}
@@ -221,17 +250,19 @@ public function it_should_not_be_possible_to_insert_segment_beyond_last_index():
/** @test */
public function a_segment_can_be_overwritten(): void
{
- $msg = new Message();
+ $msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('AAA'));
- $msg->setSegment(new Segment('BBB'), 0);
+ $msg->setSegment(new Segment('BBB'), 1);
self::assertCount(0, $msg->getSegmentsByName('AAA'), 'No AAA segment anymore');
- self::assertSame('BBB', $msg->getSegmentByIndex(0)->getName(), 'BBB should have replaced AAA');
+ self::assertSame('BBB', $msg->getSegmentByIndex(1)->getName(), 'BBB should have replaced AAA');
}
- /** @test */
+ /** @test
+ * @throws HL7Exception
+ */
public function same_segment_type_can_be_added_multiple_times(): void
{
- $msg = new Message();
+ $msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('AAA'));
$msg->addSegment(new Segment('AAA'));
self::assertCount(2, $msg->getSegmentsByName('AAA'), 'Message should have 2 AAAs');
diff --git a/tests/Segments/PIDTest.php b/tests/Segments/PIDTest.php
index 8234dbb..8c85fc3 100644
--- a/tests/Segments/PIDTest.php
+++ b/tests/Segments/PIDTest.php
@@ -8,7 +8,6 @@
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Segments\PID;
use Aranyasen\HL7\Tests\TestCase;
-use InvalidArgumentException;
class PIDTest extends TestCase
{
@@ -32,7 +31,7 @@ public function PID_8_should_accept_value_for_sex_as_per_hl7_standard(string $va
public function PID_8_should_not_accept_non_standard_values_for_sex(string $invalidSexValue): void
{
$pidSegment = (new PID());
- $this->expectException(InvalidArgumentException::class);
+ $this->expectException(HL7Exception::class);
$this->expectExceptionMessage("Sex should one of 'A', 'F', 'M', 'N', 'O' or 'U'. Given: '$invalidSexValue'");
$pidSegment->setSex($invalidSexValue);
self::assertEmpty($pidSegment->getSex(), "Sex should not have been set with value: $invalidSexValue");
From 3a1a67d718cb7696ac13cbc02760f1d3ad9e9789 Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sun, 17 Sep 2023 10:45:40 +0530
Subject: [PATCH 02/13] Error checks code refactors generate docs (#100)
* Regenerate docs
* The first segment to an empty Message should always be MSH
* Add missing files
* Misc code refactor
* Composer update
* Bump PHP to 8.1
* Refactor test
* Run actions on pushing to all branches
* Fix typo in GitHub action
---
.github/workflows/main_ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml
index 136dd26..5a6b703 100644
--- a/.github/workflows/main_ci.yml
+++ b/.github/workflows/main_ci.yml
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: [ 8.1', '8.2' ]
+ php-versions: [ '8.1', '8.2' ]
name: PHP ${{ matrix.php-versions }} Test on ubuntu-latest
steps:
- name: Checkout
From 43ba7501015d5a2a4354249c252b930ea58dc3a2 Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sun, 17 Sep 2023 10:50:50 +0530
Subject: [PATCH 03/13] Revert setSegment as per master
---
src/HL7/SegmentManagerTrait.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/HL7/SegmentManagerTrait.php b/src/HL7/SegmentManagerTrait.php
index 3b1213e..533678f 100644
--- a/src/HL7/SegmentManagerTrait.php
+++ b/src/HL7/SegmentManagerTrait.php
@@ -259,7 +259,7 @@ public function removeSegmentsByName(string $segmentName): int
*/
public function setSegment(Segment $segment, int $index): bool
{
- if (!isset($index) || $index > count($this->segments)) {
+ if ($index > count($this->segments)) {
throw new HL7Exception('Index out of range');
}
From ba46482acab1d9665a5b1ab4ca5bce51293d14b8 Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sun, 17 Sep 2023 11:06:11 +0530
Subject: [PATCH 04/13] Fix tests
---
src/HL7/SegmentManagerTrait.php | 4 ++--
tests/MessageTest.php | 4 ++--
tests/SegmentTest.php | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/HL7/SegmentManagerTrait.php b/src/HL7/SegmentManagerTrait.php
index 533678f..f3b1607 100644
--- a/src/HL7/SegmentManagerTrait.php
+++ b/src/HL7/SegmentManagerTrait.php
@@ -145,8 +145,8 @@ public function insertSegment(Segment $segment, int $index = null, bool $replace
if ($segment->getName() !== 'MSH') {
throw new HL7Exception('Only MSH can be inserted at position 0');
}
- if (!$replace) {
- throw new HL7Exception('MSH segment can not be replaced unless forced');
+ if ($this->hasSegment('MSH') && !$replace) {
+ throw new HL7Exception('MSH already exists. It can not be replaced unless $replace is true');
}
$this->resetCtrl($segment);
array_unshift($this->segments, $segment);
diff --git a/tests/MessageTest.php b/tests/MessageTest.php
index 0cff454..dff9693 100644
--- a/tests/MessageTest.php
+++ b/tests/MessageTest.php
@@ -255,7 +255,7 @@ public function the_only_segment_that_can_be_inserted_in_0_index_is_msh(): void
$msg = new Message("MSH|^~\\&|1|\r");
$msg->insertSegment(new Segment('MSH'), 0, true); // Should be allowed
- self::expectException(HL7Exception::class);
+ $this->expectException(HL7Exception::class);
$msg->insertSegment(new Segment('XXX'), 0); // Should not be allowed
}
@@ -303,7 +303,7 @@ public function a_segment_can_be_overwritten(): void
/** @test */
public function setSegment_throws_exception_when_the_target_index_is_beyond_total_count_of_segments(): void
{
- $this->expectException(InvalidArgumentException::class);
+ $this->expectException(HL7Exception::class);
$msg = new Message("MSH|^~\\&|1|\nAAA|1|\n");
$msg->setSegment(new Segment('BBB'), 3);
}
diff --git a/tests/SegmentTest.php b/tests/SegmentTest.php
index ca8e46d..be6f9bf 100644
--- a/tests/SegmentTest.php
+++ b/tests/SegmentTest.php
@@ -4,29 +4,29 @@
namespace Aranyasen\HL7\Tests;
+use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Segment;
-use InvalidArgumentException;
class SegmentTest extends TestCase
{
/** @test */
public function it_throws_error_when_segment_name_has_less_than_3_characters(): void
{
- $this->expectException(InvalidArgumentException::class);
+ $this->expectException(HL7Exception::class);
new Segment('XX');
}
/** @test */
public function it_throws_exception_when_a_blank_string_is_passed_as_segment_name(): void
{
- $this->expectException(InvalidArgumentException::class);
+ $this->expectException(HL7Exception::class);
new Segment('');
}
/** @test */
public function it_throws_exception_when_segment_name_is_not_in_upper_case(): void
{
- $this->expectException(InvalidArgumentException::class);
+ $this->expectException(HL7Exception::class);
new Segment('xxx');
}
From 585cedfd655d1e7ce54975acc2ee3bc3c9a7f59a Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Mon, 6 Jan 2025 06:48:00 +0530
Subject: [PATCH 05/13] Bump min PHP to 8.2. Misc post-rebase changes
---
.github/workflows/main_ci.yml | 2 +-
composer.json | 2 +-
src/HL7/SegmentManagerTrait.php | 105 +++++++++++++++++++++++++++++---
tests/MessageTest.php | 2 +-
4 files changed, 100 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml
index 5a6b703..d81fd1d 100644
--- a/.github/workflows/main_ci.yml
+++ b/.github/workflows/main_ci.yml
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: [ '8.1', '8.2' ]
+ php-versions: [ '8.2', '8.3', '8.4' ]
name: PHP ${{ matrix.php-versions }} Test on ubuntu-latest
steps:
- name: Checkout
diff --git a/composer.json b/composer.json
index 124f52c..37bc6ba 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
"minimum-stability": "dev",
"prefer-stable" : true,
"require": {
- "php": ">=8.1",
+ "php": ">=8.2",
"ext-mbstring": "*"
},
"require-dev": {
diff --git a/src/HL7/SegmentManagerTrait.php b/src/HL7/SegmentManagerTrait.php
index f3b1607..c16a1e5 100644
--- a/src/HL7/SegmentManagerTrait.php
+++ b/src/HL7/SegmentManagerTrait.php
@@ -17,13 +17,13 @@ trait SegmentManagerTrait
*/
public function getSegmentAsString(int $index): ?string
{
- $seg = $this->getSegmentByIndex($index);
+ $segment = $this->getSegmentByIndex($index);
- if ($seg === null) {
+ if ($segment === null) {
return null;
}
- return $this->segmentToString($seg);
+ return $this->segmentToString($segment);
}
/**
@@ -134,7 +134,7 @@ public function addSegment(Segment $segment): bool
* @param bool $replace Replace the current segment in given $index
* @throws HL7Exception
*/
- public function insertSegment(Segment $segment, int $index = null, bool $replace = false): void
+ public function insertSegment(Segment $segment, ?int $index = null, bool $replace = false): void
{
if ($index > count($this->segments)) {
throw new HL7Exception("Index '$index' greater than the number of total segments " .
@@ -290,15 +290,14 @@ public function getSegments(): array
return $this->segments;
}
-
/**
* Convert Segment object to string
*/
- public function segmentToString(Segment $seg): string
+ public function segmentToString(Segment $segment): string
{
- $segmentName = $seg->getName();
+ $segmentName = $segment->getName();
$segmentString = $segmentName . $this->fieldSeparator;
- $fields = $seg->getFields(($segmentName === 'MSH' ? 2 : 1));
+ $fields = $segment->getFields(($segmentName === 'MSH' ? 2 : 1));
foreach ($fields as $field) {
if (is_array($field)) {
@@ -356,4 +355,94 @@ private function getSegmentClass(string $segmentName, array $fields, bool $autoI
return new $className($fields, $autoIncrementIndices);
}
+
+ /**
+ * Return an array of all segments with the given subclass of Segment
+ *
+ * @param string $segmentClass Segment class
+ * @return array List of segments identified by class
+ * @throws HL7Exception
+ */
+ public function getSegmentsByClass(string $segmentClass): array
+ {
+ if (!is_subclass_of($segmentClass, Segment::class)) {
+ throw new HL7Exception("$segmentClass is not a subclass of " . Segment::class);
+ }
+ $segmentsByClass = [];
+
+ foreach ($this->segments as $segment) {
+ if ($segment instanceof $segmentClass) {
+ $segmentsByClass[] = $segment;
+ }
+ }
+
+ return $segmentsByClass;
+ }
+
+ /**
+ * Remove given segment
+ *
+ * @return int Count of segments removed
+ * @throws HL7Exception
+ */
+ public function removeSegmentsByClass(string $segmentClass): int
+ {
+ if (!is_subclass_of($segmentClass, Segment::class)) {
+ throw new HL7Exception("$segmentClass is not a subclass of " . Segment::class);
+ }
+ $count = 0;
+ foreach ($this->getSegmentsByClass($segmentClass) as $segment) {
+ $this->removeSegmentByIndex($this->getSegmentIndex($segment));
+ $count++;
+ }
+ return $count;
+ }
+
+ /**
+ * Reindex all the segments in the message
+ */
+ public function reindexSegments(): void
+ {
+ $indexes = [];
+ foreach ($this->segments as $segment) {
+ if (method_exists($segment, "setID")) {
+ if (!array_key_exists($segment->getName(), $indexes)) {
+ $indexes[$segment->getName()] = 1;
+ }
+ $segment->setId($indexes[$segment->getName()]++);
+ }
+ }
+ }
+
+ /**
+ * Return the first segment of the given class in the message
+ *
+ * @return mixed|null
+ * @throws HL7Exception
+ */
+ public function getFirstSegmentInstanceByClass(string $segmentClass): Segment|null
+ {
+ if (!$this->hasSegmentOfClass($segmentClass)) {
+ return null;
+ }
+ return $this->getSegmentsByClass($segmentClass)[0];
+ }
+
+ /**
+ * Check if given segment is present in the message object by class name
+ * @throws HL7Exception
+ */
+ public function hasSegmentOfClass(string $segmentClass): bool
+ {
+ return count($this->getSegmentsByClass($segmentClass)) > 0;
+ }
+
+ /**
+ * Check if given segment is present in the message object by class name
+ * @throws HL7Exception
+ */
+ public function hasSegmentByClass(string $segmentClass): bool
+ {
+ return count($this->getSegmentsByClass($segmentClass)) > 0;
+ }
}
diff --git a/tests/MessageTest.php b/tests/MessageTest.php
index 71b4a41..e53e593 100644
--- a/tests/MessageTest.php
+++ b/tests/MessageTest.php
@@ -668,7 +668,7 @@ public function segments_can_be_retrieved_by_class(): void
/** @test */
public function reindex_message_segments(): void
{
- $message = new Message(autoIncrementIndices: false);
+ $message = new Message('MSH|^~\&|||||||', autoIncrementIndices: false);
$pid = new PID();
$pid->setId(2);
$message->addSegment($pid);
From b6f7d03fdb66244bbfbf6f0b24b19a4d7ef0fc8d Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Mon, 6 Jan 2025 07:24:34 +0530
Subject: [PATCH 06/13] Improve test name
---
tests/MessageTest.php | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/MessageTest.php b/tests/MessageTest.php
index e53e593..5fb8a16 100644
--- a/tests/MessageTest.php
+++ b/tests/MessageTest.php
@@ -50,12 +50,13 @@ public function subfields_can_be_retained_when_required(): void
}
/** @test */
- public function field_separator_should_be_used_in_the_MSH_segment(): void
+ public function field_separator_specified_should_be_used_in_the_MSH_segment(): void
{
$this->expectException(HL7Exception::class);
$this->expectExceptionMessage('Not a valid message: field separator invalid');
- $invalidFieldSeparator = '='; // Can be any character but |
- new Message("MSH|^~\\&$invalidFieldSeparator");
+ $fieldSeparator = '=';
+ $fieldSeparatorUsedInMsh = '|';
+ new Message("MSH$fieldSeparatorUsedInMsh^~\\&$fieldSeparator");
}
/** @test */
From 6fdc3196925d1ee9c2047d89cb521d589a982abe Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Mon, 6 Jan 2025 08:51:30 +0530
Subject: [PATCH 07/13] Upgrade PhpUnit to v11
---
composer.json | 5 +-
composer.lock | 828 +++++++++++++++++--------------------
phpunit.xml | 24 +-
tests/AckTest.php | 8 +-
tests/ConnectionTest.php | 7 +-
tests/HL7Test.php | 43 +-
tests/MessageTest.php | 170 +++-----
tests/SegmentTest.php | 40 +-
tests/Segments/MSHTest.php | 20 +-
tests/Segments/NK1Test.php | 7 +-
tests/Segments/OBXTest.php | 4 +-
tests/Segments/PIDTest.php | 22 +-
12 files changed, 517 insertions(+), 661 deletions(-)
diff --git a/composer.json b/composer.json
index 37bc6ba..82a111c 100644
--- a/composer.json
+++ b/composer.json
@@ -18,11 +18,10 @@
"ext-mbstring": "*"
},
"require-dev": {
- "phpunit/phpunit": "^9",
- "dms/phpunit-arraysubset-asserts": "^0.2",
+ "phpunit/phpunit": "^11.5.2",
"ext-pcntl": "*",
"ext-sockets": "*",
- "squizlabs/php_codesniffer": "^3.6"
+ "squizlabs/php_codesniffer": "^3.11.2"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index 4f823bf..9f5251c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,136 +4,21 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "6768c81cd699818d36dc34b748503c34",
+ "content-hash": "93e410afed4cdbe7d4957a8ecbadce84",
"packages": [],
"packages-dev": [
- {
- "name": "dms/phpunit-arraysubset-asserts",
- "version": "v0.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/rdohms/phpunit-arraysubset-asserts.git",
- "reference": "8e3673a70019a60df484e36fc3271d63cbdc40ea"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/rdohms/phpunit-arraysubset-asserts/zipball/8e3673a70019a60df484e36fc3271d63cbdc40ea",
- "reference": "8e3673a70019a60df484e36fc3271d63cbdc40ea",
- "shasum": ""
- },
- "require": {
- "php": "^7.3|^8.0",
- "phpunit/phpunit": "^9.0"
- },
- "require-dev": {
- "dms/coding-standard": "^1.0",
- "squizlabs/php_codesniffer": "^3.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "DMS\\PHPUnitExtensions\\ArraySubset\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Rafael Dohms",
- "email": "rdohms@gmail.com"
- }
- ],
- "description": "This package provides ArraySubset and related asserts once deprecated in PHPUnit 8",
- "support": {
- "issues": "https://github.com/rdohms/phpunit-arraysubset-asserts/issues",
- "source": "https://github.com/rdohms/phpunit-arraysubset-asserts/tree/v0.2.1"
- },
- "time": "2020-10-03T21:43:40+00:00"
- },
- {
- "name": "doctrine/instantiator",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0",
- "shasum": ""
- },
- "require": {
- "php": "^8.1"
- },
- "require-dev": {
- "doctrine/coding-standard": "^11",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^1.2",
- "phpstan/phpstan": "^1.9.4",
- "phpstan/phpstan-phpunit": "^1.3",
- "phpunit/phpunit": "^9.5.27",
- "vimeo/psalm": "^5.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Marco Pivetta",
- "email": "ocramius@gmail.com",
- "homepage": "https://ocramius.github.io/"
- }
- ],
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "support": {
- "issues": "https://github.com/doctrine/instantiator/issues",
- "source": "https://github.com/doctrine/instantiator/tree/2.0.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
- "type": "tidelift"
- }
- ],
- "time": "2022-12-30T00:23:10+00:00"
- },
{
"name": "myclabs/deep-copy",
- "version": "1.11.1",
+ "version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
+ "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845",
+ "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845",
"shasum": ""
},
"require": {
@@ -141,11 +26,12 @@
},
"conflict": {
"doctrine/collections": "<1.6.8",
- "doctrine/common": "<2.13.3 || >=3,<3.2.2"
+ "doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpspec/prophecy": "^1.10",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
@@ -171,7 +57,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1"
},
"funding": [
{
@@ -179,29 +65,31 @@
"type": "tidelift"
}
],
- "time": "2023-03-08T13:26:56+00:00"
+ "time": "2024-11-08T17:47:46+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v4.15.5",
+ "version": "v5.4.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
+ "reference": "447a020a1f875a434d62f2a401f53b82a396e494"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
- "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494",
+ "reference": "447a020a1f875a434d62f2a401f53b82a396e494",
"shasum": ""
},
"require": {
+ "ext-ctype": "*",
+ "ext-json": "*",
"ext-tokenizer": "*",
- "php": ">=7.0"
+ "php": ">=7.4"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+ "phpunit/phpunit": "^9.0"
},
"bin": [
"bin/php-parse"
@@ -209,7 +97,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.9-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -233,26 +121,27 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0"
},
- "time": "2023-05-19T20:20:00+00:00"
+ "time": "2024-12-30T11:07:19+00:00"
},
{
"name": "phar-io/manifest",
- "version": "2.0.3",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
+ "reference": "54750ef60c58e43759730615a392c31c80e23176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
- "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-phar": "*",
"ext-xmlwriter": "*",
"phar-io/version": "^3.0.1",
@@ -293,9 +182,15 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
- "source": "https://github.com/phar-io/manifest/tree/2.0.3"
+ "source": "https://github.com/phar-io/manifest/tree/2.0.4"
},
- "time": "2021-07-20T11:28:43+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:33:53+00:00"
},
{
"name": "phar-io/version",
@@ -350,35 +245,35 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.26",
+ "version": "11.0.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1"
+ "reference": "418c59fd080954f8c4aa5631d9502ecda2387118"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
- "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118",
+ "reference": "418c59fd080954f8c4aa5631d9502ecda2387118",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.15",
- "php": ">=7.3",
- "phpunit/php-file-iterator": "^3.0.3",
- "phpunit/php-text-template": "^2.0.2",
- "sebastian/code-unit-reverse-lookup": "^2.0.2",
- "sebastian/complexity": "^2.0",
- "sebastian/environment": "^5.1.2",
- "sebastian/lines-of-code": "^1.0.3",
- "sebastian/version": "^3.0.1",
- "theseer/tokenizer": "^1.2.0"
+ "nikic/php-parser": "^5.3.1",
+ "php": ">=8.2",
+ "phpunit/php-file-iterator": "^5.1.0",
+ "phpunit/php-text-template": "^4.0.1",
+ "sebastian/code-unit-reverse-lookup": "^4.0.1",
+ "sebastian/complexity": "^4.0.1",
+ "sebastian/environment": "^7.2.0",
+ "sebastian/lines-of-code": "^3.0.1",
+ "sebastian/version": "^5.0.2",
+ "theseer/tokenizer": "^1.2.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.5.0"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
@@ -387,7 +282,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.2-dev"
+ "dev-main": "11.0.x-dev"
}
},
"autoload": {
@@ -415,7 +310,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26"
+ "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8"
},
"funding": [
{
@@ -423,32 +319,32 @@
"type": "github"
}
],
- "time": "2023-03-06T12:58:08+00:00"
+ "time": "2024-12-11T12:34:27+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "3.0.6",
+ "version": "5.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
+ "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/118cfaaa8bc5aef3287bf315b6060b1174754af6",
+ "reference": "118cfaaa8bc5aef3287bf315b6060b1174754af6",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -475,7 +371,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.1.0"
},
"funding": [
{
@@ -483,28 +380,28 @@
"type": "github"
}
],
- "time": "2021-12-02T12:48:52+00:00"
+ "time": "2024-08-27T05:02:59+00:00"
},
{
"name": "phpunit/php-invoker",
- "version": "3.1.1",
+ "version": "5.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/c1ca3814734c07492b3d4c5f794f4b0995333da2",
+ "reference": "c1ca3814734c07492b3d4c5f794f4b0995333da2",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
"ext-pcntl": "*",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"suggest": {
"ext-pcntl": "*"
@@ -512,7 +409,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -538,7 +435,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
- "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ "security": "https://github.com/sebastianbergmann/php-invoker/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.1"
},
"funding": [
{
@@ -546,32 +444,32 @@
"type": "github"
}
],
- "time": "2020-09-28T05:58:55+00:00"
+ "time": "2024-07-03T05:07:44+00:00"
},
{
"name": "phpunit/php-text-template",
- "version": "2.0.4",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
+ "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/3e0404dc6b300e6bf56415467ebcb3fe4f33e964",
+ "reference": "3e0404dc6b300e6bf56415467ebcb3fe4f33e964",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -597,7 +495,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ "security": "https://github.com/sebastianbergmann/php-text-template/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.1"
},
"funding": [
{
@@ -605,32 +504,32 @@
"type": "github"
}
],
- "time": "2020-10-26T05:33:50+00:00"
+ "time": "2024-07-03T05:08:43+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "5.0.3",
+ "version": "7.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
+ "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3b415def83fbcb41f991d9ebf16ae4ad8b7837b3",
+ "reference": "3b415def83fbcb41f991d9ebf16ae4ad8b7837b3",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "7.0-dev"
}
},
"autoload": {
@@ -656,7 +555,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ "security": "https://github.com/sebastianbergmann/php-timer/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.1"
},
"funding": [
{
@@ -664,54 +564,52 @@
"type": "github"
}
],
- "time": "2020-10-26T13:16:10+00:00"
+ "time": "2024-07-03T05:09:35+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.6.9",
+ "version": "11.5.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a9aceaf20a682aeacf28d582654a1670d8826778"
+ "reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778",
- "reference": "a9aceaf20a682aeacf28d582654a1670d8826778",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/153d0531b9f7e883c5053160cad6dd5ac28140b3",
+ "reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.3",
- "phar-io/version": "^3.0.2",
- "php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.13",
- "phpunit/php-file-iterator": "^3.0.5",
- "phpunit/php-invoker": "^3.1.1",
- "phpunit/php-text-template": "^2.0.3",
- "phpunit/php-timer": "^5.0.2",
- "sebastian/cli-parser": "^1.0.1",
- "sebastian/code-unit": "^1.0.6",
- "sebastian/comparator": "^4.0.8",
- "sebastian/diff": "^4.0.3",
- "sebastian/environment": "^5.1.3",
- "sebastian/exporter": "^4.0.5",
- "sebastian/global-state": "^5.0.1",
- "sebastian/object-enumerator": "^4.0.3",
- "sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.2",
- "sebastian/version": "^3.0.2"
+ "myclabs/deep-copy": "^1.12.1",
+ "phar-io/manifest": "^2.0.4",
+ "phar-io/version": "^3.2.1",
+ "php": ">=8.2",
+ "phpunit/php-code-coverage": "^11.0.8",
+ "phpunit/php-file-iterator": "^5.1.0",
+ "phpunit/php-invoker": "^5.0.1",
+ "phpunit/php-text-template": "^4.0.1",
+ "phpunit/php-timer": "^7.0.1",
+ "sebastian/cli-parser": "^3.0.2",
+ "sebastian/code-unit": "^3.0.2",
+ "sebastian/comparator": "^6.2.1",
+ "sebastian/diff": "^6.0.2",
+ "sebastian/environment": "^7.2.0",
+ "sebastian/exporter": "^6.3.0",
+ "sebastian/global-state": "^7.0.2",
+ "sebastian/object-enumerator": "^6.0.1",
+ "sebastian/type": "^5.1.0",
+ "sebastian/version": "^5.0.2",
+ "staabm/side-effects-detector": "^1.0.5"
},
"suggest": {
- "ext-soap": "To be able to generate mocks based on WSDL files",
- "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
+ "ext-soap": "To be able to generate mocks based on WSDL files"
},
"bin": [
"phpunit"
@@ -719,7 +617,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.6-dev"
+ "dev-main": "11.5-dev"
}
},
"autoload": {
@@ -751,7 +649,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.2"
},
"funding": [
{
@@ -767,32 +665,32 @@
"type": "tidelift"
}
],
- "time": "2023-06-11T06:13:56+00:00"
+ "time": "2024-12-21T05:51:08+00:00"
},
{
"name": "sebastian/cli-parser",
- "version": "1.0.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
- "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/15c5dd40dc4f38794d383bb95465193f5e0ae180",
+ "reference": "15c5dd40dc4f38794d383bb95465193f5e0ae180",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -815,7 +713,8 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
- "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
+ "security": "https://github.com/sebastianbergmann/cli-parser/security/policy",
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.2"
},
"funding": [
{
@@ -823,32 +722,32 @@
"type": "github"
}
],
- "time": "2020-09-28T06:08:49+00:00"
+ "time": "2024-07-03T04:41:36+00:00"
},
{
"name": "sebastian/code-unit",
- "version": "1.0.8",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
+ "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca",
+ "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -871,7 +770,8 @@
"homepage": "https://github.com/sebastianbergmann/code-unit",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit/issues",
- "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ "security": "https://github.com/sebastianbergmann/code-unit/security/policy",
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2"
},
"funding": [
{
@@ -879,32 +779,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:08:54+00:00"
+ "time": "2024-12-12T09:59:06+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "2.0.3",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ "reference": "183a9b2632194febd219bb9246eee421dad8d45e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/183a9b2632194febd219bb9246eee421dad8d45e",
+ "reference": "183a9b2632194febd219bb9246eee421dad8d45e",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -926,7 +826,8 @@
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.1"
},
"funding": [
{
@@ -934,34 +835,36 @@
"type": "github"
}
],
- "time": "2020-09-28T05:30:19+00:00"
+ "time": "2024-07-03T04:45:54+00:00"
},
{
"name": "sebastian/comparator",
- "version": "4.0.8",
+ "version": "6.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
+ "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739",
+ "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/diff": "^4.0",
- "sebastian/exporter": "^4.0"
+ "ext-dom": "*",
+ "ext-mbstring": "*",
+ "php": ">=8.2",
+ "sebastian/diff": "^6.0",
+ "sebastian/exporter": "^6.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "6.2-dev"
}
},
"autoload": {
@@ -1000,7 +903,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ "security": "https://github.com/sebastianbergmann/comparator/security/policy",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1"
},
"funding": [
{
@@ -1008,33 +912,33 @@
"type": "github"
}
],
- "time": "2022-09-14T12:41:17+00:00"
+ "time": "2024-10-31T05:30:08+00:00"
},
{
"name": "sebastian/complexity",
- "version": "2.0.2",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+ "reference": "ee41d384ab1906c68852636b6de493846e13e5a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
- "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ee41d384ab1906c68852636b6de493846e13e5a0",
+ "reference": "ee41d384ab1906c68852636b6de493846e13e5a0",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.7",
- "php": ">=7.3"
+ "nikic/php-parser": "^5.0",
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -1057,7 +961,8 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
+ "security": "https://github.com/sebastianbergmann/complexity/security/policy",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.1"
},
"funding": [
{
@@ -1065,33 +970,33 @@
"type": "github"
}
],
- "time": "2020-10-26T15:52:27+00:00"
+ "time": "2024-07-03T04:49:50+00:00"
},
{
"name": "sebastian/diff",
- "version": "4.0.5",
+ "version": "6.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131"
+ "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
- "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/b4ccd857127db5d41a5b676f24b51371d76d8544",
+ "reference": "b4ccd857127db5d41a5b676f24b51371d76d8544",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3",
+ "phpunit/phpunit": "^11.0",
"symfony/process": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -1123,7 +1028,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5"
+ "security": "https://github.com/sebastianbergmann/diff/security/policy",
+ "source": "https://github.com/sebastianbergmann/diff/tree/6.0.2"
},
"funding": [
{
@@ -1131,27 +1037,27 @@
"type": "github"
}
],
- "time": "2023-05-07T05:35:17+00:00"
+ "time": "2024-07-03T04:53:05+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.5",
+ "version": "7.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
+ "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5",
+ "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"suggest": {
"ext-posix": "*"
@@ -1159,7 +1065,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.1-dev"
+ "dev-main": "7.2-dev"
}
},
"autoload": {
@@ -1178,7 +1084,7 @@
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "homepage": "https://github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
@@ -1186,7 +1092,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ "security": "https://github.com/sebastianbergmann/environment/security/policy",
+ "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0"
},
"funding": [
{
@@ -1194,34 +1101,34 @@
"type": "github"
}
],
- "time": "2023-02-03T06:03:51+00:00"
+ "time": "2024-07-03T04:54:44+00:00"
},
{
"name": "sebastian/exporter",
- "version": "4.0.5",
+ "version": "6.3.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
+ "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
- "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3",
+ "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/recursion-context": "^4.0"
+ "ext-mbstring": "*",
+ "php": ">=8.2",
+ "sebastian/recursion-context": "^6.0"
},
"require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "6.1-dev"
}
},
"autoload": {
@@ -1263,7 +1170,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
+ "security": "https://github.com/sebastianbergmann/exporter/security/policy",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0"
},
"funding": [
{
@@ -1271,38 +1179,35 @@
"type": "github"
}
],
- "time": "2022-09-14T06:03:37+00:00"
+ "time": "2024-12-05T09:17:50+00:00"
},
{
"name": "sebastian/global-state",
- "version": "5.0.5",
+ "version": "7.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
+ "reference": "3be331570a721f9a4b5917f4209773de17f747d7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
- "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7",
+ "reference": "3be331570a721f9a4b5917f4209773de17f747d7",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
+ "php": ">=8.2",
+ "sebastian/object-reflector": "^4.0",
+ "sebastian/recursion-context": "^6.0"
},
"require-dev": {
"ext-dom": "*",
- "phpunit/phpunit": "^9.3"
- },
- "suggest": {
- "ext-uopz": "*"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "7.0-dev"
}
},
"autoload": {
@@ -1321,13 +1226,14 @@
}
],
"description": "Snapshotting of global state",
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "homepage": "https://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
+ "security": "https://github.com/sebastianbergmann/global-state/security/policy",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.2"
},
"funding": [
{
@@ -1335,33 +1241,33 @@
"type": "github"
}
],
- "time": "2022-02-14T08:28:10+00:00"
+ "time": "2024-07-03T04:57:36+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "1.0.3",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+ "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
- "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d36ad0d782e5756913e42ad87cb2890f4ffe467a",
+ "reference": "d36ad0d782e5756913e42ad87cb2890f4ffe467a",
"shasum": ""
},
"require": {
- "nikic/php-parser": "^4.6",
- "php": ">=7.3"
+ "nikic/php-parser": "^5.0",
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -1384,7 +1290,8 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
+ "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.1"
},
"funding": [
{
@@ -1392,34 +1299,34 @@
"type": "github"
}
],
- "time": "2020-11-28T06:42:11+00:00"
+ "time": "2024-07-03T04:58:38+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "4.0.4",
+ "version": "6.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
+ "reference": "f5b498e631a74204185071eb41f33f38d64608aa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa",
+ "reference": "f5b498e631a74204185071eb41f33f38d64608aa",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
+ "php": ">=8.2",
+ "sebastian/object-reflector": "^4.0",
+ "sebastian/recursion-context": "^6.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -1441,7 +1348,8 @@
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.1"
},
"funding": [
{
@@ -1449,32 +1357,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:12:34+00:00"
+ "time": "2024-07-03T05:00:13+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "2.0.4",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
+ "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9",
+ "reference": "6e1a43b411b2ad34146dee7524cb13a068bb35f9",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -1496,7 +1404,8 @@
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ "security": "https://github.com/sebastianbergmann/object-reflector/security/policy",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.1"
},
"funding": [
{
@@ -1504,32 +1413,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:14:26+00:00"
+ "time": "2024-07-03T05:01:32+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.5",
+ "version": "6.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ "reference": "694d156164372abbd149a4b85ccda2e4670c0e16"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16",
+ "reference": "694d156164372abbd149a4b85ccda2e4670c0e16",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^11.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -1559,7 +1468,8 @@
"homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
+ "security": "https://github.com/sebastianbergmann/recursion-context/security/policy",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2"
},
"funding": [
{
@@ -1567,87 +1477,32 @@
"type": "github"
}
],
- "time": "2023-02-03T06:07:39+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
- "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "support": {
- "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2020-09-28T06:45:17+00:00"
+ "time": "2024-07-03T05:10:34+00:00"
},
{
"name": "sebastian/type",
- "version": "3.2.1",
+ "version": "5.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
+ "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/461b9c5da241511a2a0e8f240814fb23ce5c0aac",
+ "reference": "461b9c5da241511a2a0e8f240814fb23ce5c0aac",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"require-dev": {
- "phpunit/phpunit": "^9.5"
+ "phpunit/phpunit": "^11.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-main": "5.1-dev"
}
},
"autoload": {
@@ -1670,7 +1525,8 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ "security": "https://github.com/sebastianbergmann/type/security/policy",
+ "source": "https://github.com/sebastianbergmann/type/tree/5.1.0"
},
"funding": [
{
@@ -1678,29 +1534,29 @@
"type": "github"
}
],
- "time": "2023-02-03T06:13:03+00:00"
+ "time": "2024-09-17T13:12:04+00:00"
},
{
"name": "sebastian/version",
- "version": "3.0.2",
+ "version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "c6c1022351a901512170118436c764e473f6de8c"
+ "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
- "reference": "c6c1022351a901512170118436c764e473f6de8c",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874",
+ "reference": "c687e3387b99f5b03b6caa64c74b63e2936ff874",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -1723,7 +1579,8 @@
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
- "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ "security": "https://github.com/sebastianbergmann/version/security/policy",
+ "source": "https://github.com/sebastianbergmann/version/tree/5.0.2"
},
"funding": [
{
@@ -1731,20 +1588,20 @@
"type": "github"
}
],
- "time": "2020-09-28T06:39:44+00:00"
+ "time": "2024-10-09T05:16:32+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.7.2",
+ "version": "3.11.2",
"source": {
"type": "git",
- "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879"
+ "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
+ "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879",
- "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079",
+ "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079",
"shasum": ""
},
"require": {
@@ -1754,11 +1611,11 @@
"php": ">=5.4.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
},
"bin": [
- "bin/phpcs",
- "bin/phpcbf"
+ "bin/phpcbf",
+ "bin/phpcs"
],
"type": "library",
"extra": {
@@ -1773,35 +1630,110 @@
"authors": [
{
"name": "Greg Sherwood",
- "role": "lead"
+ "role": "Former lead"
+ },
+ {
+ "name": "Juliette Reinders Folmer",
+ "role": "Current lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
- "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
+ "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards",
"static analysis"
],
"support": {
- "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
- "source": "https://github.com/squizlabs/PHP_CodeSniffer",
- "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
+ "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
+ "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
+ "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
+ "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/PHPCSStandards",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/jrfnl",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/php_codesniffer",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2024-12-11T16:04:26+00:00"
+ },
+ {
+ "name": "staabm/side-effects-detector",
+ "version": "1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/staabm/side-effects-detector.git",
+ "reference": "d8334211a140ce329c13726d4a715adbddd0a163"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163",
+ "reference": "d8334211a140ce329c13726d4a715adbddd0a163",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": "^7.4 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/extension-installer": "^1.4.3",
+ "phpstan/phpstan": "^1.12.6",
+ "phpunit/phpunit": "^9.6.21",
+ "symfony/var-dumper": "^5.4.43",
+ "tomasvotruba/type-coverage": "1.0.0",
+ "tomasvotruba/unused-public": "1.0.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "lib/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A static analysis tool to detect side effects in PHP code",
+ "keywords": [
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/staabm/side-effects-detector/issues",
+ "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5"
},
- "time": "2023-02-22T23:07:41+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/staabm",
+ "type": "github"
+ }
+ ],
+ "time": "2024-10-20T05:08:20+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.2.1",
+ "version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
- "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": ""
},
"require": {
@@ -1830,7 +1762,7 @@
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"support": {
"issues": "https://github.com/theseer/tokenizer/issues",
- "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
},
"funding": [
{
@@ -1838,7 +1770,7 @@
"type": "github"
}
],
- "time": "2021-07-28T10:34:58+00:00"
+ "time": "2024-03-03T12:36:25+00:00"
}
],
"aliases": [],
@@ -1847,12 +1779,12 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": "^8.0",
+ "php": ">=8.2",
"ext-mbstring": "*"
},
"platform-dev": {
"ext-pcntl": "*",
"ext-sockets": "*"
},
- "plugin-api-version": "2.3.0"
+ "plugin-api-version": "2.6.0"
}
diff --git a/phpunit.xml b/phpunit.xml
index 3803699..e672596 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,6 +1,19 @@
-
-
+
+
+
+ ./tests/
+
+
+
-
-
- ./tests/
-
-
+
diff --git a/tests/AckTest.php b/tests/AckTest.php
index fa8dc68..bae0375 100644
--- a/tests/AckTest.php
+++ b/tests/AckTest.php
@@ -8,6 +8,7 @@
use Aranyasen\HL7\Messages\ACK;
use Aranyasen\HL7\Segments\MSH;
use Exception;
+use PHPUnit\Framework\Attributes\Test;
class AckTest extends TestCase
{
@@ -82,10 +83,10 @@ public function test()
self::assertSame('CE', $seg1->getField(1), 'Code CE after setting message');
}
- /** @test
+ /**
* @throws Exception
*/
- public function a_MSH_can_be_provided_to_get_the_fields_from(): void
+ #[Test] public function a_MSH_can_be_provided_to_get_the_fields_from(): void
{
$msg = new Message("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|");
$msh = new MSH(
@@ -99,10 +100,9 @@ public function a_MSH_can_be_provided_to_get_the_fields_from(): void
}
/**
- * @test
* @throws Exception
*/
- public function globals_can_be_passed_to_constructor(): void
+ #[Test] public function globals_can_be_passed_to_constructor(): void
{
$msg = new Message("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|");
$ack = new ACK($msg, null, ['SEGMENT_SEPARATOR' => '\r\n']);
diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php
index 4fc648e..a5ac08d 100644
--- a/tests/ConnectionTest.php
+++ b/tests/ConnectionTest.php
@@ -8,6 +8,7 @@
use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Connection;
+use PHPUnit\Framework\Attributes\Test;
use RuntimeException;
class ConnectionTest extends TestCase
@@ -23,11 +24,10 @@ protected function tearDown(): void
}
/**
- * @test
* @throws HL7ConnectionException
* @throws HL7Exception
*/
- public function a_message_can_be_sent_to_a_hl7_server(): void
+ #[Test] public function a_message_can_be_sent_to_a_hl7_server(): void
{
if (!extension_loaded('pcntl')) {
self::markTestSkipped("Extension pcntl_fork is not loaded");
@@ -56,11 +56,10 @@ public function a_message_can_be_sent_to_a_hl7_server(): void
}
/**
- * @test
* @throws HL7ConnectionException
* @throws HL7Exception
*/
- public function do_not_wait_for_ack_after_sending_if_corresponding_parameter_is_set(): void
+ #[Test] public function do_not_wait_for_ack_after_sending_if_corresponding_parameter_is_set(): void
{
if (!extension_loaded('pcntl')) {
self::markTestSkipped("Extension pcntl_fork is not loaded");
diff --git a/tests/HL7Test.php b/tests/HL7Test.php
index d8718ee..f0082fd 100644
--- a/tests/HL7Test.php
+++ b/tests/HL7Test.php
@@ -7,42 +7,42 @@
use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7;
use Aranyasen\HL7\Segments\PID;
-use DMS\PHPUnitExtensions\ArraySubset\Assert;
+use PHPUnit\Framework\Attributes\Test;
class HL7Test extends TestCase
{
- /** @test
+ /**
* @throws HL7Exception
*/
- public function hl7_message_can_be_created_using_factory_class(): void
+ #[Test] public function hl7_message_can_be_created_using_factory_class(): void
{
$msg = HL7::build()->createMessage();
self::assertIsObject($msg);
self::assertSame(HL7\Message::class, $msg::class);
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function factory_creates_a_msh_segment_with_defaults_when_no_message_string_provided(): void
+ #[Test] public function factory_creates_a_msh_segment_with_defaults_when_no_message_string_provided(): void
{
$msg = HL7::build()->createMessage();
self::assertStringContainsString('MSH|^~\&|||||', $msg->toString(true));
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function a_message_can_be_built_from_a_provided_hl7_string(): void
+ #[Test] public function a_message_can_be_built_from_a_provided_hl7_string(): void
{
$msg = HL7::from("MSH|^~\\&|1|\rABC|||xxx|\r")->createMessage();
self::assertSame("MSH|^~\\&|1|\nABC|||xxx|\n", $msg->toString(true));
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function hl7_property_in_a_given_hl7_string_can_be_overridden(): void
+ #[Test] public function hl7_property_in_a_given_hl7_string_can_be_overridden(): void
{
self::markTestSkipped('property cannot be overridden yet in Message() constructor');
$msg = HL7::from("MSH|^~\\&|1|\rABC|||xxx|\r")
@@ -51,10 +51,9 @@ public function hl7_property_in_a_given_hl7_string_can_be_overridden(): void
self::assertSame("MSH|^~=&|1|\nABC|||xxx|\n", $msg->toString(true));
}
/**
- * @test
* @throws HL7Exception
*/
- public function hl7_properties_can_be_set_using_chained_methods(): void
+ #[Test] public function hl7_properties_can_be_set_using_chained_methods(): void
{
$msg = HL7::build()
->withSegmentSeparator('[')
@@ -68,20 +67,16 @@ public function hl7_properties_can_be_set_using_chained_methods(): void
self::assertStringContainsString('MSH#*`=}#', $msg->toString(true));
}
- /**
- * @test
- * @throws Exception
- */
- public function empty_subfields_can_be_retained_if_needed(): void
+ #[Test] public function empty_subfields_can_be_retained_if_needed(): void
{
$msg = HL7::from("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|")->keepEmptySubfields()->createMessage();
- Assert::assertArraySubset(['', 'AAAA1', '', '', 'BB'], $msg->getSegmentByIndex(1)->getField(3));
+ $this->assertSame(['', 'AAAA1', '', '', 'BB'], $msg->getSegmentByIndex(1)->getField(3));
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function indices_of_each_segment_can_be_reset_when_message_is_composed(): void
+ #[Test] public function indices_of_each_segment_can_be_reset_when_message_is_composed(): void
{
// Create a message with a PID segment
$msg1 = HL7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->createMessage();
@@ -124,10 +119,9 @@ public function indices_of_each_segment_can_be_reset_when_message_is_composed():
}
/**
- * @test
* @throws HL7Exception
*/
- public function auto_increment_of_segment_indices_can_be_avoided(): void
+ #[Test] public function auto_increment_of_segment_indices_can_be_avoided(): void
{
$hl7String = "MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OBX|1||22^BB|\n";
@@ -157,10 +151,10 @@ public function auto_increment_of_segment_indices_can_be_avoided(): void
);
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function repetition_separation_character_can_be_ignored(): void
+ #[Test] public function repetition_separation_character_can_be_ignored(): void
{
$message = Hl7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")
->createMessage();
@@ -177,8 +171,7 @@ public function repetition_separation_character_can_be_ignored(): void
self::assertSame(['3', '0~4', '1'], $patientIdentifierList);
}
- /** @test */
- public function it_throws_exception_when_multiple_character_property_is_provided(): void
+ #[Test] public function it_throws_exception_when_multiple_character_property_is_provided(): void
{
$this->expectException(HL7Exception::class);
$this->expectExceptionMessage("Parameter should be a single character. Received: 'aa'");
diff --git a/tests/MessageTest.php b/tests/MessageTest.php
index 5fb8a16..33a119c 100644
--- a/tests/MessageTest.php
+++ b/tests/MessageTest.php
@@ -12,45 +12,34 @@
use Aranyasen\HL7\Segments\OBX;
use Aranyasen\HL7\Segments\PID;
use Exception;
-use DMS\PHPUnitExtensions\ArraySubset\Assert;
+use PHPUnit\Framework\Attributes\Test;
class MessageTest extends TestCase
{
- /** @test */
- public function segments_can_be_retrieved_using_index(): void
+ #[Test] public function segments_can_be_retrieved_using_index(): void
{
$msg = new Message("MSH|^~\\&|1|\rABC|\r");
self::assertSame('ABC', $msg->getSegmentByIndex(1)->getName());
}
- /** @test */
- public function segmentByIndex_returns_null_when_target_index_is_beyond_the_total_number_of_segments(): void
+ #[Test] public function segmentByIndex_returns_null_when_target_index_is_beyond_the_total_number_of_segments(): void
{
$msg = new Message("MSH|^~\\&|1|\rABC|\r");
self::assertNull($msg->getSegmentByIndex(2));
}
- /** @test */
- public function it_throws_error_when_field_separator_control_char_doesnt_match_the_actual_field_separators(): void
- {
- $this->expectException(HL7Exception::class);
- $msg = new Message("MSH|^~\\\r");
- }
-
/**
- * @test
* @throws Exception
*/
- public function subfields_can_be_retained_when_required(): void
+ #[Test] public function subfields_can_be_retained_when_required(): void
{
$msg = new Message("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|", null, true);
$pv1 = $msg->getSegmentByIndex(1);
$fields = $pv1->getField(3);
- Assert::assertArraySubset(['', 'AAAA1', '', '', 'BB'], $fields);
+ $this->assertSame(['', 'AAAA1', '', '', 'BB'], $fields);
}
- /** @test */
- public function field_separator_specified_should_be_used_in_the_MSH_segment(): void
+ #[Test] public function field_separator_specified_should_match_the_field_separator_in_MSH_segment(): void
{
$this->expectException(HL7Exception::class);
$this->expectExceptionMessage('Not a valid message: field separator invalid');
@@ -59,8 +48,7 @@ public function field_separator_specified_should_be_used_in_the_MSH_segment(): v
new Message("MSH$fieldSeparatorUsedInMsh^~\\&$fieldSeparator");
}
- /** @test */
- public function segments_can_be_added_to_existing_message(): void
+ #[Test] public function segments_can_be_added_to_existing_message(): void
{
$msg = new Message();
$msg->addSegment(new MSH());
@@ -73,8 +61,7 @@ public function segments_can_be_added_to_existing_message(): void
self::assertSame('PID', $seg1->getName(), 'Segment 1 name PID');
}
- /** @test */
- public function first_segment_added_to_an_empty_message_should_be_MSH(): void
+ #[Test] public function first_segment_added_to_an_empty_message_should_be_MSH(): void
{
$msg = new Message();
$this->expectException(HL7Exception::class);
@@ -82,10 +69,10 @@ public function first_segment_added_to_an_empty_message_should_be_MSH(): void
$msg->addSegment(new Segment('PID'));
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function fields_can_be_added_to_existing_segments(): void
+ #[Test] public function fields_can_be_added_to_existing_segments(): void
{
$msg = new Message();
$msg->addSegment(new MSH());
@@ -101,18 +88,16 @@ public function fields_can_be_added_to_existing_segments(): void
self::assertSame('XXX', $msg->getSegmentByIndex(0)->getField(3), '3d field of MSH');
}
- /** @test */
- public function control_characters_are_properly_set_from_MSH_Segment(): void
+ #[Test] public function control_characters_are_properly_set_from_MSH_Segment(): void
{
$msg = new Message("MSH|^~\\&|1|\rABC|||xxx|\r");
self::assertSame("^~\\&", $msg->getSegmentByIndex(0)->getField(2), 'Encoding characters');
}
/**
- * @test
* @throws Exception
*/
- public function control_characters_can_be_customized_using_second_argument(): void
+ #[Test] public function control_characters_can_be_customized_using_second_argument(): void
{
$msg = new Message("MSH|^~\\&|1|\nABC|||xxx|\n", ['SEGMENT_SEPARATOR' => '\r\n']);
self::assertSame('MSH|^~\\&|1|\r\nABC|||xxx|\r\n', $msg->toString(), 'Custom line-endings');
@@ -123,10 +108,10 @@ public function control_characters_can_be_customized_using_second_argument(): vo
);
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function message_can_be_converted_to_string(): void
+ #[Test] public function message_can_be_converted_to_string(): void
{
$msg = new Message("MSH|^~\\&|1|\rABC|||xxx|\r");
self::assertSame('MSH|^~\\&|1|\nABC|||xxx|\n', $msg->toString(), 'String representation of message');
@@ -137,18 +122,17 @@ public function message_can_be_converted_to_string(): void
);
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function toString_method_throws_exception_when_message_empty(): void
+ #[Test] public function toString_method_throws_exception_when_message_empty(): void
{
$msg = new Message();
$this->expectException(HL7Exception::class);
$msg->toString();
}
- /** @test */
- public function fields_and_subfields_can_be_set_properly(): void
+ #[Test] public function fields_and_subfields_can_be_set_properly(): void
{
$msg = new Message("MSH|^~\\&|1|\rABC|||xx^x&y&z^yy^zz|\r");
$segment1 = $msg->getSegmentByIndex(1);
@@ -158,8 +142,7 @@ public function fields_and_subfields_can_be_set_properly(): void
self::assertSame($fields[1][1], 'y', 'Subcomposed field');
}
- /** @test */
- public function fields_can_be_separated_by_custom_character(): void
+ #[Test] public function fields_can_be_separated_by_custom_character(): void
{
$msg = new Message("MSH*^~\\&*1\rABC***xxx\r"); // Use * as a field separator
@@ -171,32 +154,28 @@ public function fields_can_be_separated_by_custom_character(): void
self::assertSame('1', $msg->getSegmentByIndex(0)->getField(3), '3d field of MSH');
}
- /** @test */
- public function components_of_a_field_can_be_separated_by_custom_character(): void
+ #[Test] public function components_of_a_field_can_be_separated_by_custom_character(): void
{
$msg = new Message("MSH|*~\\&|1\rABC|||x*y*z\r");
$field = $msg->getSegmentByIndex(1)->getField(3);
self::assertSame('x', $field[0], 'Composed field with * as separator between subfields');
}
- /** @test */
- public function subcomponents_can_be_separated_by_custom_character(): void
+ #[Test] public function subcomponents_can_be_separated_by_custom_character(): void
{
$msg = new Message("MSH|^~\\@|1\rABC|||a^x@y@z^b\r");
$field = $msg->getSegmentByIndex(1)->getField(3);
self::assertSame('y', $field[1][1], 'Subcomposed field with @ as separator');
}
- /** @test */
- public function segments_can_be_added_to_message(): void
+ #[Test] public function segments_can_be_added_to_message(): void
{
$msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('XXX'));
self::assertSame('XXX', $msg->getSegmentByIndex(1)->getName(), 'Add segment');
}
- /** @test */
- public function segment_can_be_removed_from_message(): void
+ #[Test] public function segment_can_be_removed_from_message(): void
{
$msg = new Message("MSH|^~\\&|1|\nAAA|1||xxx|\nBBB|1|\nBBB|2|");
$segment = $msg->getFirstSegmentInstance('BBB');
@@ -218,8 +197,7 @@ public function segment_can_be_removed_from_message(): void
self::assertSame("MSH|^~\\&|1|\nAAA|1||xxx|\nBBB|2|\n", $msg->toString(true));
}
- /** @test */
- public function segments_can_be_removed_from_message_using_index(): void
+ #[Test] public function segments_can_be_removed_from_message_using_index(): void
{
$msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('XXX'));
@@ -229,10 +207,9 @@ public function segments_can_be_removed_from_message_using_index(): void
}
/**
- * @test
* @throws Exception
*/
- public function segments_can_be_removed_by_name(): void
+ #[Test] public function segments_can_be_removed_by_name(): void
{
$msg = new Message("MSH|^~\\&|1|\nAAA|1||xxx|\nAAA|2||\nBBB|1|\n");
$count = $msg->removeSegmentsByName('AAA');
@@ -245,8 +222,7 @@ public function segments_can_be_removed_by_name(): void
self::assertSame(2, $count);
}
- /** @test */
- public function a_new_segment_can_be_inserted_between_two_existing_segments(): void
+ #[Test] public function a_new_segment_can_be_inserted_between_two_existing_segments(): void
{
$msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('AAA'));
@@ -257,8 +233,7 @@ public function a_new_segment_can_be_inserted_between_two_existing_segments(): v
self::assertSame('BBB', $msg->getSegmentByIndex(3)->getName(), 'Existing segment should shift');
}
- /** @test */
- public function the_only_segment_that_can_be_inserted_in_0_index_is_msh(): void
+ #[Test] public function the_only_segment_that_can_be_inserted_in_0_index_is_msh(): void
{
$msg = new Message("MSH|^~\\&|1|\r");
$msg->insertSegment(new Segment('MSH'), 0, true); // Should be allowed
@@ -267,8 +242,7 @@ public function the_only_segment_that_can_be_inserted_in_0_index_is_msh(): void
$msg->insertSegment(new Segment('XXX'), 0); // Should not be allowed
}
- /** @test */
- public function MSH_segment_can_be_inserted_with_new_control_characters(): void
+ #[Test] public function MSH_segment_can_be_inserted_with_new_control_characters(): void
{
$msg = new Message();
$msh = new MSH(['MSH', '#~\&', '', '', '', '', '', '', ['AAA', 'BBB'], '', '', '555']);
@@ -281,16 +255,14 @@ public function MSH_segment_can_be_inserted_with_new_control_characters(): void
);
}
- /** @test */
- public function insertSegment_appends_when_the_target_index_is_same_as_the_count_of_total_segments(): void
+ #[Test] public function insertSegment_appends_when_the_target_index_is_same_as_the_count_of_total_segments(): void
{
$msg = new Message("MSH|^~\\&|1|\rAAA|1", null, true);
$msg->insertSegment(new Segment('XXX'), 2);
self::assertSame('MSH|^~\&|1|\nAAA|1|\nXXX|\n', $msg->toString());
}
- /** @test */
- public function it_should_not_be_possible_to_insert_segment_beyond_last_index(): void
+ #[Test] public function it_should_not_be_possible_to_insert_segment_beyond_last_index(): void
{
$msg = new Message();
$this->expectException(HL7Exception::class);
@@ -298,8 +270,7 @@ public function it_should_not_be_possible_to_insert_segment_beyond_last_index():
self::assertEmpty($msg->getSegmentByIndex(3), 'Erroneous insert');
}
- /** @test */
- public function a_segment_can_be_overwritten(): void
+ #[Test] public function a_segment_can_be_overwritten(): void
{
$msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('AAA'));
@@ -308,16 +279,14 @@ public function a_segment_can_be_overwritten(): void
self::assertSame('BBB', $msg->getSegmentByIndex(1)->getName(), 'BBB should have replaced AAA');
}
- /** @test */
- public function setSegment_throws_exception_when_the_target_index_is_beyond_total_count_of_segments(): void
+ #[Test] public function setSegment_throws_exception_when_the_target_index_is_beyond_total_count_of_segments(): void
{
$this->expectException(HL7Exception::class);
$msg = new Message("MSH|^~\\&|1|\nAAA|1|\n");
$msg->setSegment(new Segment('BBB'), 3);
}
- /** @test */
- public function setSegment_resets_control_characters_when_adding_MSH_segment_at_0th_index(): void
+ #[Test] public function setSegment_resets_control_characters_when_adding_MSH_segment_at_0th_index(): void
{
$msg = new Message();
$msh = new MSH(['MSH', '#~\&', '', '', '', '', '', '', ['AAA', 'BBB'], '', '', '555']);
@@ -329,8 +298,7 @@ public function setSegment_resets_control_characters_when_adding_MSH_segment_at_
);
}
- /** @test */
- public function same_segment_type_can_be_added_multiple_times(): void
+ #[Test] public function same_segment_type_can_be_added_multiple_times(): void
{
$msg = new Message("MSH|^~\\&|1|\r");
$msg->addSegment(new Segment('AAA'));
@@ -338,10 +306,10 @@ public function same_segment_type_can_be_added_multiple_times(): void
self::assertCount(2, $msg->getSegmentsByName('AAA'), 'Message should have 2 AAAs');
}
- /** @test
+ /**
* @throws Exception
*/
- public function field_separator_can_be_changed_after_message_creation(): void
+ #[Test] public function field_separator_can_be_changed_after_message_creation(): void
{
$msg = new Message();
$msh = new MSH([]);
@@ -356,26 +324,23 @@ public function field_separator_can_be_changed_after_message_creation(): void
}
/**
- * @test
* @throws Exception
*/
- public function a_message_can_be_constructed_from_a_string(): void
+ #[Test] public function a_message_can_be_constructed_from_a_string(): void
{
$str = 'MSH|^~\&|Aranya HL7|Aranya HQ|VISION|MISYS|200404061744||DFT^P03|TC-2743|P^T|2.3|||AL|NE||ASCII||| |';
$msg = new Message($str);
self::assertCount(1, $msg->getSegments(), 'Message from string');
}
- /** @test */
- public function a_message_can_be_converted_to_a_string(): void
+ #[Test] public function a_message_can_be_converted_to_a_string(): void
{
$str = 'MSH|^~\&|Aranya HL7|Aranya HQ|VISION|MISYS|200404061744||DFT^P03|TC-2743|P^T|2.3|||AL|NE||ASCII||| |';
$msg = new Message($str);
self::assertSame("$str\n", $msg->toString(true), 'Message to string with subcomponents');
}
- /** @test */
- public function a_segment_can_be_retrieved_as_a_string(): void
+ #[Test] public function a_segment_can_be_retrieved_as_a_string(): void
{
$msg = new Message("MSH*^~\\&*1\rXXX*a^b^c*a^b1&b2^c*xxx\r");
self::assertSame("MSH*^~\\&*1*", $msg->getSegmentAsString(0), 'MSH segment as string');
@@ -392,39 +357,32 @@ public function a_segment_can_be_retrieved_as_a_string(): void
self::assertSame('a^b1&b2^c', $msg->getSegmentFieldAsString(1, 2), 'XXX(2) as string');
}
- /** @test */
- public function getSegmentAsString_returns_null_if_the_target_segment_doesnt_exist(): void
+ #[Test] public function getSegmentAsString_returns_null_if_the_target_segment_doesnt_exist(): void
{
$msg = new Message("MSH|^~\\&|1|\nABC|");
self::assertNull($msg->getSegmentAsString(5));
}
- /** @test */
- public function getSegmentFieldAsString_returns_null_if_the_target_segment_doesnt_exist(): void
+ #[Test] public function getSegmentFieldAsString_returns_null_if_the_target_segment_doesnt_exist(): void
{
$msg = new Message("MSH|^~\\&|1|\nABC|");
self::assertNull($msg->getSegmentFieldAsString(5, 1));
}
- /** @test */
- public function getSegmentFieldAsString_returns_null_if_the_target_field_doesnt_exist(): void
+ #[Test] public function getSegmentFieldAsString_returns_null_if_the_target_field_doesnt_exist(): void
{
$msg = new Message("MSH|^~\\&|1|\nABC|");
self::assertNull($msg->getSegmentFieldAsString(1, 5));
}
- /**
- * @test
- */
- public function an_exception_will_be_throw_in_invalid_string(): void
+ #[Test] public function an_exception_will_be_throw_in_invalid_string(): void
{
$this->expectException(HL7Exception::class);
$this->expectExceptionMessage('Not a valid message: invalid control segment');
new Message("I'm an invalid message");
}
- /** @test */
- public function segment_ending_bar_can_be_omitted(): void
+ #[Test] public function segment_ending_bar_can_be_omitted(): void
{
$msg = new Message("MSH|^~\\&|1|\nABC|||xxx|\n", ['SEGMENT_ENDING_BAR' => false]);
self::assertSame("MSH|^~\\&|1\nABC|||xxx\n", $msg->toString(true), 'No ending bar on each segment');
@@ -433,8 +391,7 @@ public function segment_ending_bar_can_be_omitted(): void
self::assertSame("MSH|^~\\&|1|\nABC|||xxx|\n", $msg->toString(true), 'Ending bar retains by default');
}
- /** @test */
- public function segment_index_can_be_retrieved_from_a_message(): void
+ #[Test] public function segment_index_can_be_retrieved_from_a_message(): void
{
$message = new Message("MSH|^~\\&|1|\n");
$pid = new PID();
@@ -447,15 +404,13 @@ public function segment_index_can_be_retrieved_from_a_message(): void
self::assertSame(2, $message->getSegmentIndex($pid));
}
- /** @test */
- public function segmentIndex_returns_null_if_the_target_segment_is_not_found(): void
+ #[Test] public function segmentIndex_returns_null_if_the_target_segment_is_not_found(): void
{
$message = new Message("MSH|^~\\&|1|\nABC|\n");
self::assertNull($message->getSegmentIndex(new Segment('XXX')));
}
- /** @test */
- public function message_type_can_be_checked(): void
+ #[Test] public function message_type_can_be_checked(): void
{
$msg = new Message("MSH|^~\&|||||||ORM^O01||P|2.3.1|");
self::assertTrue($msg->isOrm());
@@ -490,10 +445,9 @@ public function message_type_can_be_checked(): void
*
* This test verifies both.
*
- * @test
* @throws Exception
*/
- public function segment_id_can_be_reset_on_demand(): void
+ #[Test] public function segment_id_can_be_reset_on_demand(): void
{
PID::resetIndex(); // Start with a clean slate
@@ -536,10 +490,9 @@ public function segment_id_can_be_reset_on_demand(): void
}
/**
- * @test
* @throws Exception
*/
- public function segment_index_autoincrement_can_be_avoided(): void
+ #[Test] public function segment_index_autoincrement_can_be_avoided(): void
{
$hl7String = "MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OBX|1||22^BB|\n";
@@ -564,8 +517,7 @@ public function segment_index_autoincrement_can_be_avoided(): void
);
}
- /** @test */
- public function a_segments_presence_can_be_checked(): void
+ #[Test] public function a_segments_presence_can_be_checked(): void
{
$message = new Message("MSH|^~\&|||||||ORM^O01||P|2.3.1|");
self::assertFalse($message->hasSegment('PID'));
@@ -574,8 +526,7 @@ public function a_segments_presence_can_be_checked(): void
self::assertTrue($message->hasSegment('PID'));
}
- /** @test */
- public function first_of_the_given_segment_name_can_be_easily_obtained_using_a_helper_method(): void
+ #[Test] public function first_of_the_given_segment_name_can_be_easily_obtained_using_a_helper_method(): void
{
$message = new Message("MSH|^~\&|||||||ORM^O01||P|2.3.1|");
$message->addSegment(new PID());
@@ -592,15 +543,13 @@ public function first_of_the_given_segment_name_can_be_easily_obtained_using_a_h
self::assertNull($message->getFirstSegmentInstance('XXX'), 'Non existing segment should return null');
}
- /** @test */
- public function message_can_be_verified_as_empty(): void
+ #[Test] public function message_can_be_verified_as_empty(): void
{
self::assertTrue((new Message())->isEmpty());
self::assertFalse((new Message("MSH|^~\&|||||||ORM^O01||P|2.3.1|"))->isEmpty());
}
- /** @test */
- public function field_with_repetition_separator_splits_into_array_by_default(): void
+ #[Test] public function field_with_repetition_separator_splits_into_array_by_default(): void
{
$message = new Message("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1"); // Repetition separator is ~
$patientIdentifierList = $message->getSegmentByIndex(1)->getField(3);
@@ -611,8 +560,7 @@ public function field_with_repetition_separator_splits_into_array_by_default():
self::assertSame('1', $patientIdentifierList[1][1]);
}
- /** @test */
- public function field_with_repetition_separator_can_be_split_into_array(): void
+ #[Test] public function field_with_repetition_separator_can_be_split_into_array(): void
{
$message = new Message("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1", doNotSplitRepetition: false);
$patientIdentifierList = $message->getSegmentByIndex(1)->getField(3);
@@ -623,8 +571,7 @@ public function field_with_repetition_separator_can_be_split_into_array(): void
self::assertSame('1', $patientIdentifierList[1][1]);
}
- /** @test */
- public function repetition_separation_character_can_be_ignored(): void
+ #[Test] public function repetition_separation_character_can_be_ignored(): void
{
$message = new Message("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1", doNotSplitRepetition: true);
$pid = $message->getSegmentByIndex(1);
@@ -633,8 +580,7 @@ public function repetition_separation_character_can_be_ignored(): void
self::assertSame(['3', '0~4', '1'], $patientIdentifierList);
}
- /** @test */
- public function a_message_can_be_saved_in_a_file(): void
+ #[Test] public function a_message_can_be_saved_in_a_file(): void
{
$hl7File = __DIR__ . DIRECTORY_SEPARATOR . 'hl7_test_' . random_int(100, 1000) . '.hl7';
$message = new Message("MSH|^~\&|");
@@ -646,8 +592,7 @@ public function a_message_can_be_saved_in_a_file(): void
}
}
- /** @test */
- public function segments_can_be_retrieved_by_class(): void
+ #[Test] public function segments_can_be_retrieved_by_class(): void
{
$message = new Message(
"MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1\nOBX|1|||\nOBX|2|||",
@@ -666,8 +611,7 @@ public function segments_can_be_retrieved_by_class(): void
self::assertCount(0, $OBRs);
}
- /** @test */
- public function reindex_message_segments(): void
+ #[Test] public function reindex_message_segments(): void
{
$message = new Message('MSH|^~\&|||||||', autoIncrementIndices: false);
$pid = new PID();
diff --git a/tests/SegmentTest.php b/tests/SegmentTest.php
index be6f9bf..6a8f361 100644
--- a/tests/SegmentTest.php
+++ b/tests/SegmentTest.php
@@ -6,40 +6,36 @@
use Aranyasen\Exceptions\HL7Exception;
use Aranyasen\HL7\Segment;
+use PHPUnit\Framework\Attributes\Test;
class SegmentTest extends TestCase
{
- /** @test */
- public function it_throws_error_when_segment_name_has_less_than_3_characters(): void
+ #[Test] public function it_throws_error_when_segment_name_has_less_than_3_characters(): void
{
$this->expectException(HL7Exception::class);
new Segment('XX');
}
- /** @test */
- public function it_throws_exception_when_a_blank_string_is_passed_as_segment_name(): void
+ #[Test] public function it_throws_exception_when_a_blank_string_is_passed_as_segment_name(): void
{
$this->expectException(HL7Exception::class);
new Segment('');
}
- /** @test */
- public function it_throws_exception_when_segment_name_is_not_in_upper_case(): void
+ #[Test] public function it_throws_exception_when_segment_name_is_not_in_upper_case(): void
{
$this->expectException(HL7Exception::class);
new Segment('xxx');
}
- /** @test */
- public function field_at_a_given_nonzero_index_can_be_set(): void
+ #[Test] public function field_at_a_given_nonzero_index_can_be_set(): void
{
$seg = new Segment('XXX');
$seg->setField(1, 'YYY');
self::assertSame('YYY', $seg->getField(1), 'Field 1 is YYY');
}
- /** @test */
- public function field_at_index_0_can_not_be_changed(): void
+ #[Test] public function field_at_index_0_can_not_be_changed(): void
{
$seg = new Segment('XXX');
$seg->setField(0, 'YYY');
@@ -48,16 +44,14 @@ public function field_at_index_0_can_not_be_changed(): void
self::assertSame('XXX', $seg->getName(), 'Segment name is still the same');
}
- /** @test */
- public function a_segment_can_be_constructed_from_an_array(): void
+ #[Test] public function a_segment_can_be_constructed_from_an_array(): void
{
$seg = new Segment('XXX', ['a', 'b', 'c', ['p', 'q', 'r'], 'd']);
self::assertSame('c', $seg->getField(3), 'Constructor with array');
self::assertSame('r', $seg->getField(4)[2], 'Constructor with array for composed fields');
}
- /** @test */
- public function field_can_be_cleared(): void
+ #[Test] public function field_can_be_cleared(): void
{
$segment = new Segment('XXX', ['a']);
self::assertSame('a', $segment->getField(1));
@@ -65,8 +59,7 @@ public function field_can_be_cleared(): void
self::assertNull($segment->getField(1), 'Field 1 should be NULL');
}
- /** @test */
- public function field_can_be_set_using_array(): void
+ #[Test] public function field_can_be_set_using_array(): void
{
$seg = new Segment('XXX');
$seg->setField(3, ['1', '2', '3']);
@@ -75,32 +68,28 @@ public function field_can_be_set_using_array(): void
self::assertSame('2', $seg->getField(3)[1], 'Getting single value from composed field');
}
- /** @test */
- public function fields_from_a_given_position_to_end_can_be_retrieved_in_an_array(): void
+ #[Test] public function fields_from_a_given_position_to_end_can_be_retrieved_in_an_array(): void
{
$seg = new Segment('XXX');
$seg->setField(8, 'aaa');
self::assertCount(7, $seg->getFields(2), 'Getting all fields from 2nd index');
}
- /** @test */
- public function a_chunk_of_fields_can_be_retrieved_from_a_segment(): void
+ #[Test] public function a_chunk_of_fields_can_be_retrieved_from_a_segment(): void
{
$seg = new Segment('XXX');
$seg->setField(8, 'aaa');
self::assertCount(3, $seg->getFields(2, 4), 'Getting fields from 2 till 4');
}
- /** @test */
- public function setting_field_beyond_last_index_creates_empty_fields_in_between(): void
+ #[Test] public function setting_field_beyond_last_index_creates_empty_fields_in_between(): void
{
$seg = new Segment('XXX');
$seg->setField(8, 'aaa');
self::assertCount(9, $seg->getFields(), 'Number of fields in segment');
}
- /** @test */
- public function total_size_of_a_segment_can_be_obtained(): void
+ #[Test] public function total_size_of_a_segment_can_be_obtained(): void
{
$seg = new Segment('XXX');
$seg->setField(8, ['']);
@@ -109,8 +98,7 @@ public function total_size_of_a_segment_can_be_obtained(): void
self::assertSame(12, $seg->size(), 'Size operator');
}
- /** @test */
- public function a_field_can_have_0_as_a_value(): void
+ #[Test] public function a_field_can_have_0_as_a_value(): void
{
$segment = new Segment('XXX');
diff --git a/tests/Segments/MSHTest.php b/tests/Segments/MSHTest.php
index 930a9cd..0fdd1e1 100644
--- a/tests/Segments/MSHTest.php
+++ b/tests/Segments/MSHTest.php
@@ -7,11 +7,11 @@
use Aranyasen\HL7\Segments\MSH;
use Aranyasen\HL7\Tests\TestCase;
use Exception;
+use PHPUnit\Framework\Attributes\Test;
class MSHTest extends TestCase
{
- /** @test */
- public function MSH_formed_without_any_arguments_should_have_mandatory_fields_set_automatically(): void
+ #[Test] public function MSH_formed_without_any_arguments_should_have_mandatory_fields_set_automatically(): void
{
$msh = new MSH();
self::assertSame('|', $msh->getField(1));
@@ -22,10 +22,10 @@ public function MSH_formed_without_any_arguments_should_have_mandatory_fields_se
self::assertNotEmpty($msh->getMessageControlId());
}
- /** @test
+ /**
* @throws Exception
*/
- public function an_array_of_fields_can_be_passed_to_constructor_to_construct_MSH(): void
+ #[Test] public function an_array_of_fields_can_be_passed_to_constructor_to_construct_MSH(): void
{
$msh = new MSH(
[
@@ -42,24 +42,21 @@ public function an_array_of_fields_can_be_passed_to_constructor_to_construct_MSH
);
}
- /** @test */
- public function field_separator_can_be_set(): void
+ #[Test] public function field_separator_can_be_set(): void
{
$msh = new MSH();
$msh->setField(1, '*');
self::assertSame('*', $msh->getField(1), 'MSH Field sep field (MSH(1))');
}
- /** @test */
- public function more_than_one_character_as_field_separator_is_not_accepted(): void
+ #[Test] public function more_than_one_character_as_field_separator_is_not_accepted(): void
{
$msh = new MSH();
$msh->setField(1, 'xx');
self::assertSame('|', $msh->getField(1), 'MSH Field sep field (MSH(1))');
}
- /** @test */
- public function version_id_can_be_string_or_array_for_v2_7_onwards(): void
+ #[Test] public function version_id_can_be_string_or_array_for_v2_7_onwards(): void
{
$msh = new MSH();
$msh->setVersionId('2.3');
@@ -69,8 +66,7 @@ public function version_id_can_be_string_or_array_for_v2_7_onwards(): void
self::assertSame(['2.7', 'NZL', '1.0'], $msh->getVersionId());
}
- /** @test */
- public function index_2_in_MSH_accepts_only_4_character_strings(): void
+ #[Test] public function index_2_in_MSH_accepts_only_4_character_strings(): void
{
$msh = new MSH();
$msh->setField(2, 'xxxx');
diff --git a/tests/Segments/NK1Test.php b/tests/Segments/NK1Test.php
index 883f58c..4b4683c 100644
--- a/tests/Segments/NK1Test.php
+++ b/tests/Segments/NK1Test.php
@@ -7,11 +7,11 @@
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Segments\NK1;
use Aranyasen\HL7\Tests\TestCase;
+use PHPUnit\Framework\Attributes\Test;
class NK1Test extends TestCase
{
- /** @test */
- public function NK1_segment_can_be_parsed_from_a_HL7_message(): void
+ #[Test] public function NK1_segment_can_be_parsed_from_a_HL7_message(): void
{
$msg = new Message("MSH|^~\\&|1|\nNK1|1|John^Doe|\n");
$nk1Segments = $msg->getSegmentsByName('NK1');
@@ -20,8 +20,7 @@ public function NK1_segment_can_be_parsed_from_a_HL7_message(): void
self::assertSame(['John', 'Doe'], $nk1Segments[0]->getNKName());
}
- /** @test */
- public function next_of_kin_name_can_be_set_and_get(): void
+ #[Test] public function next_of_kin_name_can_be_set_and_get(): void
{
$nk1Segment = new NK1();
$nk1Segment->setNKName("John Doe");
diff --git a/tests/Segments/OBXTest.php b/tests/Segments/OBXTest.php
index 98348f4..fa49b21 100644
--- a/tests/Segments/OBXTest.php
+++ b/tests/Segments/OBXTest.php
@@ -6,11 +6,11 @@
use Aranyasen\HL7\Segments\OBX;
use Aranyasen\HL7\Tests\TestCase;
+use PHPUnit\Framework\Attributes\Test;
class OBXTest extends TestCase
{
- /** @test */
- public function segment_id_automatically_increments_when_a_new_instance_is_created(): void
+ #[Test] public function segment_id_automatically_increments_when_a_new_instance_is_created(): void
{
OBX::resetIndex(); // Previous tests would have incremented the static $index variable
diff --git a/tests/Segments/PIDTest.php b/tests/Segments/PIDTest.php
index 8c85fc3..6a2232f 100644
--- a/tests/Segments/PIDTest.php
+++ b/tests/Segments/PIDTest.php
@@ -8,14 +8,13 @@
use Aranyasen\HL7\Message;
use Aranyasen\HL7\Segments\PID;
use Aranyasen\HL7\Tests\TestCase;
+use PHPUnit\Framework\Attributes\DataProvider;
+use PHPUnit\Framework\Attributes\Test;
class PIDTest extends TestCase
{
- /**
- * @dataProvider validSexValues
- * @test
- */
- public function PID_8_should_accept_value_for_sex_as_per_hl7_standard(string $validSexValue): void
+ #[DataProvider('validSexValues')]
+ #[Test] public function PID_8_should_accept_value_for_sex_as_per_hl7_standard(string $validSexValue): void
{
$pidSegment = (new PID());
$pidSegment->setSex($validSexValue);
@@ -24,11 +23,10 @@ public function PID_8_should_accept_value_for_sex_as_per_hl7_standard(string $va
}
/**
- * @dataProvider invalidSexValues
- * @test
* @param string $invalidSexValue
*/
- public function PID_8_should_not_accept_non_standard_values_for_sex(string $invalidSexValue): void
+ #[DataProvider('invalidSexValues')]
+ #[Test] public function PID_8_should_not_accept_non_standard_values_for_sex(string $invalidSexValue): void
{
$pidSegment = (new PID());
$this->expectException(HL7Exception::class);
@@ -38,10 +36,10 @@ public function PID_8_should_not_accept_non_standard_values_for_sex(string $inva
self::assertEmpty($pidSegment->getField(8), "Sex should not have been set with value: $invalidSexValue");
}
- /** @test
+ /**
* @throws HL7Exception
*/
- public function PID_5_should_parse_properly(): void
+ #[Test] public function PID_5_should_parse_properly(): void
{
$messageString = "MSH|^~\\&|1|\r" .
'PID|||||' .
@@ -56,14 +54,14 @@ public function PID_5_should_parse_properly(): void
);
}
- public function validSexValues(): array
+ public static function validSexValues(): array
{
return [
['A'], ['F'], ['M'], ['N'], ['O'], ['U']
];
}
- public function invalidSexValues(): array
+ public static function invalidSexValues(): array
{
return [
['B'], ['Z'], ['z'], ['a']
From 985f02f168f3b7b2fa4de8e78e4143890561e13a Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Mon, 6 Jan 2025 08:56:02 +0530
Subject: [PATCH 08/13] Better test output
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 82a111c..0d946a5 100644
--- a/composer.json
+++ b/composer.json
@@ -34,7 +34,7 @@
}
},
"scripts": {
- "test": "vendor/bin/phpunit tests/ --coverage-text",
+ "test": "vendor/bin/phpunit tests/ --coverage-text --testdox --colors=always",
"lint": "vendor/bin/phpcs"
},
"extra": {
From 0a96e6ca438b269a7ba9f71e9632bdc375a0e885 Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sat, 11 Jan 2025 13:10:00 +0530
Subject: [PATCH 09/13] Use HL7 factory as the primary method of creating
Message object
---
README.md | 63 ++++++++++++++++++++++++-----------------------
UPGRADE.md | 12 +++++++++
src/HL7.php | 8 ++++++
tests/HL7Test.php | 42 +++++++++++++++++++------------
4 files changed, 78 insertions(+), 47 deletions(-)
create mode 100644 UPGRADE.md
diff --git a/README.md b/README.md
index a245f8a..fb7d151 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,12 @@
**Important: "new Message()" is deprecated and could be removed in a future release. Use HL7 factory class instead. See documents below
+
Final releases for old PHP versions:
-> PHP 7.0/7.1 => [1.5.4](https://github.com/senaranya/HL7/tree/1.5.4)
-> PHP 7.2 => [2.0.2](https://github.com/senaranya/HL7/tree/2.0.2)
-> PHP 7.4 => [2.1.7](https://github.com/senaranya/HL7/tree/2.1.7)**
+-> PHP 8.1 => [3.1.7](https://github.com/senaranya/HL7/tree/3.1.7)**
## Introduction
@@ -35,10 +37,8 @@ use Aranyasen\HL7\Segments\MSH; // If MSH is used
### Parsing
```php
// Create a Message object from a HL7 string
-$message = HL7::from("MSH|^~\\&|1|")->createMessage(); // Returns Message object
-
-// Or, using Message class...
-$message = new Message("MSH|^~\\&|1|\rPID|||abcd|\r"); // Either \n or \r can be used as segment endings
+$message = HL7::from("MSH|^~\\&|1|")->create();
+$message = HL7::from("MSH|^~\\&|1|\rPID|||abcd|\r")->create(); // Creates Message object with two segments with \r as segment ending (\n can also be used)
// Get string form of the message
echo $message->toString(true);
@@ -52,43 +52,41 @@ $message->getFirstSegmentInstance('ABC'); // Returns the first ABC segment. Same
$message->hasSegment('ABC'); // return true or false based on whether PID is present in the $message object
// Check if a message is empty
-$message = new Message();
+$message = HL7::create();
$message->isempty(); // Returns true
```
### Composing new messages
```php
// The class `HL7` can be used to build HL7 object. It is a factory class with various helper methods to help build a hl7.
-$message = HL7::build()->createMessage(); // Creates an empty message
+$message = HL7::build()->create(); // Creates an empty message
// The HL7 factory class provides methods that can be chained together in a fluent fashion
$message = HL7::build()
->withComponentSeparator('#')
->withFieldSeparator('-')
- ->createMessage();
-
-// Or, using Message class...
-$message = new Message();
+ ->create();
```
-#### Message constructor parameters
+#### Configuring HL7 messages
```php
-// When a message is composed using Message class, there are multiple parameters available to define the properties of the HL7.
-// Note: All of these properties are available as fluent methods in HL7 factory class (shown above). So it's recommended to use that for readability
-
// Creating multiple message objects may have an unexpected side effect: segments start with wrong index values (Check tests/MessageTest for explanation)...
-// Use 4th argument as true, or call resetSegmentIndices() on $message object to reset segment indices to 1
-$message = new Message("MSH|^~\&|||||||ORM^O01||P|2.3.1|", null, true, true);
+// So to reset segment indices to 1:
+HL7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->resetIndices()->create(); // Use resetIndices() while creating a new message
+$message->resetSegmentIndices(); // or call resetSegmentIndices() on an existing $message object
// ... any segments added here will now start index from 1, as expected.
```
```php
// Sometimes you may want to have exact index values, rather than auto-incrementing for each instance of a segment
-// Use 5th argument as false...
$hl7String = "MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OBX|1||22^BB|\n";
-$message = new Message($hl7String, null, true, true, false); $// $message contains both OBXs with given indexes in the string
+$message = HL7::from($hl7String)
+ ->autoIncrementIndices(false)
+ ->create();
+// $message now contains both OBXs with given indexes in the string
```
```php
-// Create a segment with empty sub-fields retained
-$message = new Message("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|", null, true); // Third argument 'true' forces to keep all sub-fields
+// Ensure empty sub-fields are not removed
+// Note: We should perhaps _always_ use this while creating a message object, as we don't want empty subfields removed. In future versions, this will be the default
+$message = HL7::from("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|")->keepEmptySubfields()->create();
$pv1 = $message->getSegmentByIndex(1);
$fields = $pv1->getField(3); // $fields is ['', 'AAAA1', '', '', 'BB']
@@ -98,16 +96,19 @@ $message->toString(true); // Returns "MSH|^~\&|1\nABC|||xxx\n"
(new Connection($ip, $port))->send($message); // Sends the message without ending bar-characters (details on Connection below)
// Specify custom values for separators, HL7 version etc.
-$message = new Message("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|", ['SEGMENT_SEPARATOR' => '\r\n', 'HL7_VERSION' => '2.3']);
+$message = HL7::from("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|")
+ ->withSegmentSeparator('\r\n')
+ ->withHL7Version('2.3')
+ ->create();
// Segment with separator character (~) creates sub-arrays containing each sub-segment
-$message = new Message("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1"); // Creates [[3,0], [4,1]]
+$message = HL7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")->create(); // Creates [[3,0], [4,1]]
-// To create a single array instead, pass 'true' as 6th argument. This may be used to retain behavior from previous releases
-// Notice: Since this leads to a non-standard behavior, it may be removed in future
-$message = new Message("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1", null, false, false, true, true); // Creates ['3', '0~4', '1']
-// or
-$message = new Message("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1", doNotSplitRepetition: true); // Creates ['3', '0~4', '1']
+// To create a single array instead, use doNotSplitRepetition()
+// Note: Since this leads to a non-standard behavior, it may be removed in future
+$message = HL7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")
+ ->doNotSplitRepetition()
+ ->create(); // Creates ['3', '0~4', '1']
```
#### Handling segments and fields
@@ -124,7 +125,7 @@ $abc->setField(1, 'xyz');
$abc->setField(2, 0);
$abc->setField(4, ['']); // Set an empty field at 4th position. 2nd and 3rd positions will be automatically set to empty
$abc->clearField(2); // Clear the value from field 2
-$message->setSegment($abc, 1); // Message is now: "MSH|^~\&|||||20171116140058|||2017111614005840157||2.3|\nABC|xyz|\n"
+$message->insertSegment($abc, 1); // Message is now: "MSH|^~\&|||||20171116140058|||2017111614005840157||2.3|\nABC|xyz|\n"
// Create a defined segment (To know which segments are defined in this package, look into Segments/ directory)
// Advantages of defined segments over custom ones (shown above) are 1) Helpful setter methods, 2) Auto-incrementing segment index
@@ -145,7 +146,7 @@ Side note: In order to run Connection you need to install PHP ext-sockets [https
```php
$ip = '127.0.0.1'; // An IP
$port = '12001'; // And Port where a HL7 listener is listening
-$message = new Message($hl7String); // Create a Message object from your HL7 string
+$message = HL7::from($hl7String)->create(); // Create a Message object from your HL7 string. See above for details
// Create a Socket and get ready to send message. Optionally add timeout in seconds as 3rd argument (default: 10 sec)
$connection = new Connection($ip, $port);
@@ -172,12 +173,12 @@ else {
```
Create an ACK response from a given HL7 message:
```php
-$msg = new Message("MSH|^~\\&|1|\rABC|1||^AAAA1^^^BB|", null, true);
+$msg = HL7::from("MSH|^~\\&|1|\rABC|1||^AAAA1^^^BB|")->keepEmptySubfields()->create();
$ackResponse = new ACK($msg);
```
Options can be passed while creating ACK object:
```php
-$msg = new Message("MSH|^~\\&|1|\rABC|1||^AAAA1^^^BB|", null, true);
+$msg = HL7::from("MSH|^~\\&|1|\rABC|1||^AAAA1^^^BB|")->keepEmptySubfields()->create();
$ackResponse = new ACK($msg, null, ['SEGMENT_SEPARATOR' => '\r\n', 'HL7_VERSION' => '2.5']);
```
diff --git a/UPGRADE.md b/UPGRADE.md
new file mode 100644
index 0000000..9c701dc
--- /dev/null
+++ b/UPGRADE.md
@@ -0,0 +1,12 @@
+## 4.0
+### Breaking changes
+ - First segment in the Message object can only be MSH. E.g. this will now fail: `(new Message())->addSegment(new Segment('XXX'))`, so it has to be `(new Message("MSH|^~\\&|1|\r"))->addSegment(new Segment('XXX'))`
+ - In `insertSegment()` method, only MSH can be inserted now in the 0th index
+ - Replaced all `InvalidArgumentException` with `HL7Exception`, so update the catches accordingly
+ - Dropped support for PHP 8.1. Minimum version required is now 8.2. So if your project can not be upgraded to 8.2, you'll need to continue using 3.x version
+### Non-breaking changes
+ - Using `new Message()` is deprecated, and might be removed in a future version. Use HL7 factory to create a new HL7 object instead. See readme on how to use it
+ - `setSegment` method is deprecated. Use `insertSegment` instead
+ - In `insertSegment`, added a replace parameter to replace a current segment in place
+ - Added `replaceSegment` method
+ - Added `create` method in HL7 factory that is an alias to `createMessage`
diff --git a/src/HL7.php b/src/HL7.php
index 7f6a971..606a19d 100644
--- a/src/HL7.php
+++ b/src/HL7.php
@@ -76,6 +76,14 @@ public function createMessage(): Message
);
}
+ /**
+ * @throws HL7Exception
+ */
+ public function create(): Message
+ {
+ return $this->createMessage();
+ }
+
/**
* Create a new MSH segment, using the global HL7 variables as defaults.
* @throws Exception
diff --git a/tests/HL7Test.php b/tests/HL7Test.php
index f0082fd..45c692d 100644
--- a/tests/HL7Test.php
+++ b/tests/HL7Test.php
@@ -16,7 +16,17 @@ class HL7Test extends TestCase
*/
#[Test] public function hl7_message_can_be_created_using_factory_class(): void
{
- $msg = HL7::build()->createMessage();
+ $msg = HL7::build()->create();
+ self::assertIsObject($msg);
+ self::assertSame(HL7\Message::class, $msg::class);
+ }
+
+ /**
+ * @throws HL7Exception
+ */
+ #[Test] public function hl7_message_can_be_created_using_create_alias_method(): void
+ {
+ $msg = HL7::build()->create();
self::assertIsObject($msg);
self::assertSame(HL7\Message::class, $msg::class);
}
@@ -26,7 +36,7 @@ class HL7Test extends TestCase
*/
#[Test] public function factory_creates_a_msh_segment_with_defaults_when_no_message_string_provided(): void
{
- $msg = HL7::build()->createMessage();
+ $msg = HL7::build()->create();
self::assertStringContainsString('MSH|^~\&|||||', $msg->toString(true));
}
@@ -35,7 +45,7 @@ class HL7Test extends TestCase
*/
#[Test] public function a_message_can_be_built_from_a_provided_hl7_string(): void
{
- $msg = HL7::from("MSH|^~\\&|1|\rABC|||xxx|\r")->createMessage();
+ $msg = HL7::from("MSH|^~\\&|1|\rABC|||xxx|\r")->create();
self::assertSame("MSH|^~\\&|1|\nABC|||xxx|\n", $msg->toString(true));
}
@@ -47,7 +57,7 @@ class HL7Test extends TestCase
self::markTestSkipped('property cannot be overridden yet in Message() constructor');
$msg = HL7::from("MSH|^~\\&|1|\rABC|||xxx|\r")
->withEscapeCharacter('=')
- ->createMessage();
+ ->create();
self::assertSame("MSH|^~=&|1|\nABC|||xxx|\n", $msg->toString(true));
}
/**
@@ -63,13 +73,13 @@ class HL7Test extends TestCase
->withRepetitionSeparator('`')
->withEscapeCharacter('=')
->withHL7Version('555.666')
- ->createMessage();
+ ->create();
self::assertStringContainsString('MSH#*`=}#', $msg->toString(true));
}
#[Test] public function empty_subfields_can_be_retained_if_needed(): void
{
- $msg = HL7::from("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|")->keepEmptySubfields()->createMessage();
+ $msg = HL7::from("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|")->keepEmptySubfields()->create();
$this->assertSame(['', 'AAAA1', '', '', 'BB'], $msg->getSegmentByIndex(1)->getField(3));
}
@@ -79,7 +89,7 @@ class HL7Test extends TestCase
#[Test] public function indices_of_each_segment_can_be_reset_when_message_is_composed(): void
{
// Create a message with a PID segment
- $msg1 = HL7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->createMessage();
+ $msg1 = HL7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->create();
$msg1->addSegment(new PID());
self::assertSame(
"MSH|^~\&|||||||ORM^O01||P|2.3.1|\nPID|1|\n",
@@ -88,7 +98,7 @@ class HL7Test extends TestCase
);
// Create another message with a PID segment
- $msg2 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->createMessage();
+ $msg2 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->create();
$msg2->addSegment(new PID());
self::assertSame(
"MSH|^~\&|||||||ORM^O01||P|2.3.1|\nPID|2|\n",
@@ -99,12 +109,12 @@ class HL7Test extends TestCase
// Create another message with a PID segment, this time with resetIndices()
$msg3 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")
->resetIndices()
- ->createMessage();
+ ->create();
$msg3->addSegment(new PID());
self::assertSame("MSH|^~\&|||||||ORM^O01||P|2.3.1|\nPID|1|\n", $msg3->toString(true), 'PID index resets to 1');
// Create a message with a PID segment
- $msg4 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->createMessage();
+ $msg4 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->create();
$msg4->addSegment(new PID());
self::assertSame(
"MSH|^~\&|||||||ORM^O01||P|2.3.1|\nPID|2|\n",
@@ -112,7 +122,7 @@ class HL7Test extends TestCase
'PID index gets incremented'
);
- $msg5 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->createMessage();
+ $msg5 = Hl7::from("MSH|^~\&|||||||ORM^O01||P|2.3.1|")->create();
$msg5->resetSegmentIndices();
$msg5->addSegment(new PID());
self::assertSame("MSH|^~\&|||||||ORM^O01||P|2.3.1|\nPID|1|\n", $msg5->toString(true), 'PID index resets to 1');
@@ -126,7 +136,7 @@ class HL7Test extends TestCase
$hl7String = "MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OBX|1||22^BB|\n";
$msg = Hl7::from($hl7String)
- ->createMessage();
+ ->create();
self::assertSame(
"MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OBX|2||22^BB|\n",
$msg->toString(true),
@@ -135,7 +145,7 @@ class HL7Test extends TestCase
$msg = Hl7::from($hl7String)
->autoIncrementIndices(false)
- ->createMessage();
+ ->create();
self::assertSame(
"MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OBX|1||22^BB|\n",
$msg->toString(true)
@@ -143,7 +153,7 @@ class HL7Test extends TestCase
$msg = Hl7::from("MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "PID|||3^0\n")
->autoIncrementIndices(false)
- ->createMessage();
+ ->create();
self::assertSame(
"MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "PID|||3^0|\n",
$msg->toString(true),
@@ -157,7 +167,7 @@ class HL7Test extends TestCase
#[Test] public function repetition_separation_character_can_be_ignored(): void
{
$message = Hl7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")
- ->createMessage();
+ ->create();
self::assertIsArray(
$message->getSegmentByIndex(1)->getField(3),
'By default repetition should be split into array'
@@ -165,7 +175,7 @@ class HL7Test extends TestCase
$message = Hl7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")
->doNotSplitRepetition() // Ignore repetition separator character
- ->createMessage();
+ ->create();
$patientIdentifierList = $message->getSegmentByIndex(1)->getField(3);
self::assertIsArray($patientIdentifierList);
self::assertSame(['3', '0~4', '1'], $patientIdentifierList);
From d3bfb59757302d9ad5ec7f1e7790130ce0d0a173 Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sat, 11 Jan 2025 16:06:13 +0530
Subject: [PATCH 10/13] withSegmentSeparator should accept CRLF (\r\n)
---
README.md | 54 +++++++++++++++++++++++------------------------
UPGRADE.md | 1 +
src/HL7.php | 5 ++++-
tests/HL7Test.php | 29 ++++++++++++++++++++++---
4 files changed, 57 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index fb7d151..f5e59f8 100644
--- a/README.md
+++ b/README.md
@@ -5,13 +5,13 @@
-**Important: "new Message()" is deprecated and could be removed in a future release. Use HL7 factory class instead. See documents below
+**Important: "new Message()" is deprecated and could be removed in a future release. Use HL7 factory class instead. See documents below**
Final releases for old PHP versions:
-> PHP 7.0/7.1 => [1.5.4](https://github.com/senaranya/HL7/tree/1.5.4)
-> PHP 7.2 => [2.0.2](https://github.com/senaranya/HL7/tree/2.0.2)
--> PHP 7.4 => [2.1.7](https://github.com/senaranya/HL7/tree/2.1.7)**
--> PHP 8.1 => [3.1.7](https://github.com/senaranya/HL7/tree/3.1.7)**
+-> PHP 7.4 => [2.1.7](https://github.com/senaranya/HL7/tree/2.1.7)
+-> PHP 8.1 => [3.1.7](https://github.com/senaranya/HL7/tree/3.1.7)
## Introduction
@@ -24,19 +24,11 @@ composer require aranyasen/hl7
```
## Usage
-### Import library
-```php
-// First, import classes from the library as needed...
-use Aranyasen\HL7; // HL7 factory class
-use Aranyasen\HL7\Message; // If Message is used
-use Aranyasen\HL7\Segment; // If Segment is used
-use Aranyasen\HL7\Segments\MSH; // If MSH is used
-// ... and so on
-```
### Parsing
```php
// Create a Message object from a HL7 string
+use Aranyasen\HL7;
$message = HL7::from("MSH|^~\\&|1|")->create();
$message = HL7::from("MSH|^~\\&|1|\rPID|||abcd|\r")->create(); // Creates Message object with two segments with \r as segment ending (\n can also be used)
@@ -52,22 +44,27 @@ $message->getFirstSegmentInstance('ABC'); // Returns the first ABC segment. Same
$message->hasSegment('ABC'); // return true or false based on whether PID is present in the $message object
// Check if a message is empty
-$message = HL7::create();
-$message->isempty(); // Returns true
+$message = HL7::build()->create();
+$message->removeSegmentsByName('MSH')
+$message->isEmpty(); // Returns true
```
### Composing new messages
```php
// The class `HL7` can be used to build HL7 object. It is a factory class with various helper methods to help build a hl7.
-$message = HL7::build()->create(); // Creates an empty message
-
-// The HL7 factory class provides methods that can be chained together in a fluent fashion
+$message = HL7::build()->create(); // Creates a Message containing MSH segment with default separators, version etc.
+```
+#### Configuring HL7 messages
+```php
+// The HL7 factory class provides methods that can be chained together in a fluent fashion. These can be used to
+// override the defaults
$message = HL7::build()
- ->withComponentSeparator('#')
- ->withFieldSeparator('-')
+ ->withComponentSeparator('#') // Use # as the component separator instead of the default ^
+ ->withFieldSeparator('-') // Use - as the field separator instead of the default |
+ ->withSegmentSeparator('\r\n') // Override segment separator
+ ->withHL7Version('2.3') // Use HL7 version 2.3
->create();
```
-#### Configuring HL7 messages
```php
// Creating multiple message objects may have an unexpected side effect: segments start with wrong index values (Check tests/MessageTest for explanation)...
// So to reset segment indices to 1:
@@ -81,7 +78,7 @@ $hl7String = "MSH|^~\&|||||||ORU^R01|00001|P|2.3.1|\n" . "OBX|1||11^AA|\n" . "OB
$message = HL7::from($hl7String)
->autoIncrementIndices(false)
->create();
-// $message now contains both OBXs with given indexes in the string
+// $message now contains both OBXs with 1 as the index, instead of 1 and 2
```
```php
// Ensure empty sub-fields are not removed
@@ -91,16 +88,12 @@ $pv1 = $message->getSegmentByIndex(1);
$fields = $pv1->getField(3); // $fields is ['', 'AAAA1', '', '', 'BB']
// Create/send message with segment-ending bar character (|) removed
+use Aranyasen\HL7\Message;
$message = new Message("MSH|^~\\&|1|\nABC|||xxx\n", ['SEGMENT_ENDING_BAR' => false]);
$message->toString(true); // Returns "MSH|^~\&|1\nABC|||xxx\n"
(new Connection($ip, $port))->send($message); // Sends the message without ending bar-characters (details on Connection below)
-
-// Specify custom values for separators, HL7 version etc.
-$message = HL7::from("MSH|^~\\&|1|\rPV1|1|O|^AAAA1^^^BB|")
- ->withSegmentSeparator('\r\n')
- ->withHL7Version('2.3')
- ->create();
-
+```
+```php
// Segment with separator character (~) creates sub-arrays containing each sub-segment
$message = HL7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")->create(); // Creates [[3,0], [4,1]]
@@ -116,10 +109,12 @@ $message = HL7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")
// Once a message object is created, we can now add, insert, set segments and fields.
// Create a MSH segment and add to message object
+use Aranyasen\HL7\Segments\MSH;
$msh = new MSH();
$message->addSegment($msh); // Message is: "MSH|^~\&|||||20171116140058|||2017111614005840157||2.3|\n"
// Create a custom segment
+use Aranyasen\HL7\Segment;
$abc = new Segment('ABC');
$abc->setField(1, 'xyz');
$abc->setField(2, 0);
@@ -129,6 +124,7 @@ $message->insertSegment($abc, 1); // Message is now: "MSH|^~\&|||||2017111614005
// Create a defined segment (To know which segments are defined in this package, look into Segments/ directory)
// Advantages of defined segments over custom ones (shown above) are 1) Helpful setter methods, 2) Auto-incrementing segment index
+use Aranyasen\HL7\Segments\PID;
$pid = new PID(); // Automatically creates PID segment, and adds segment index at PID.1
$pid->setPatientName([$lastname, $firstname, $middlename, $suffix]); // Use a setter method to add patient's name at standard position (PID.5)
$pid->setField('abcd', 5); // Apart from standard setter methods, you can manually set a value at any position too
@@ -156,6 +152,7 @@ echo $response->toString(true); // Prints ACK from the listener
### ACK
Handle ACK message returned from a remote HL7 listener...
```php
+use Aranyasen\HL7\Connection;
$ack = (new Connection($ip, $port))->send($message); // Send a HL7 to remote listener
$returnString = $ack->toString(true);
if (strpos($returnString, 'MSH') === false) {
@@ -173,6 +170,7 @@ else {
```
Create an ACK response from a given HL7 message:
```php
+use Aranyasen\HL7\Messages\ACK;
$msg = HL7::from("MSH|^~\\&|1|\rABC|1||^AAAA1^^^BB|")->keepEmptySubfields()->create();
$ackResponse = new ACK($msg);
```
diff --git a/UPGRADE.md b/UPGRADE.md
index 9c701dc..5ad7288 100644
--- a/UPGRADE.md
+++ b/UPGRADE.md
@@ -4,6 +4,7 @@
- In `insertSegment()` method, only MSH can be inserted now in the 0th index
- Replaced all `InvalidArgumentException` with `HL7Exception`, so update the catches accordingly
- Dropped support for PHP 8.1. Minimum version required is now 8.2. So if your project can not be upgraded to 8.2, you'll need to continue using 3.x version
+ - `withSegmentSeparator` in HL7 accepts CRLF (\r\n) as argument. Any other multi-character separator will continue to throw exception
### Non-breaking changes
- Using `new Message()` is deprecated, and might be removed in a future version. Use HL7 factory to create a new HL7 object instead. See readme on how to use it
- `setSegment` method is deprecated. Use `insertSegment` instead
diff --git a/src/HL7.php b/src/HL7.php
index 606a19d..a00a3c9 100644
--- a/src/HL7.php
+++ b/src/HL7.php
@@ -149,7 +149,10 @@ public function withFieldSeparator(string $value): self
*/
public function withSegmentSeparator(string $value): self
{
- $this->checkIfSingleCharacter($value);
+ $value = str_replace(['\r', '\n'], ["\r", "\n"], $value);
+ if ($value !== "\r\n") {
+ $this->checkIfSingleCharacter($value);
+ }
return $this->setGlobal('SEGMENT_SEPARATOR', $value);
}
diff --git a/tests/HL7Test.php b/tests/HL7Test.php
index 45c692d..8bf2d6d 100644
--- a/tests/HL7Test.php
+++ b/tests/HL7Test.php
@@ -166,8 +166,7 @@ class HL7Test extends TestCase
*/
#[Test] public function repetition_separation_character_can_be_ignored(): void
{
- $message = Hl7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")
- ->create();
+ $message = Hl7::from("MSH|^~\&|||||||ADT^A01||P|2.3.1|\nPID|||3^0~4^1")->create();
self::assertIsArray(
$message->getSegmentByIndex(1)->getField(3),
'By default repetition should be split into array'
@@ -185,6 +184,30 @@ class HL7Test extends TestCase
{
$this->expectException(HL7Exception::class);
$this->expectExceptionMessage("Parameter should be a single character. Received: 'aa'");
- HL7::build()->withSegmentSeparator('aa');
+ HL7::build()->withEscapeCharacter('aa')->create();
+ }
+
+ /** @throws HL7Exception */
+ #[Test] public function it_accepts_crlf_as_segment_separator(): void
+ {
+ $message = HL7::from("MSH|^~\\&|1|")
+ ->withSegmentSeparator("\r\n") // With double-quotes
+ ->create();
+ $this->assertSame($message->toString(true), "MSH|^~\\&|1|\r\n");
+
+ $message = HL7::from("MSH|^~\\&|1|")
+ ->withSegmentSeparator('\r\n') // With single-quotes
+ ->create();
+ $this->assertSame($message->toString(true), "MSH|^~\\&|1|\r\n");
+ }
+
+ /** @throws HL7Exception */
+ #[Test] public function any_other_multi_char_segment_separator_throws_exception(): void
+ {
+ $this->expectException(HL7Exception::class);
+ $this->expectExceptionMessage("Parameter should be a single character. Received: 'aa'");
+ HL7::from("MSH|^~\\&|1|")
+ ->withSegmentSeparator('aa')
+ ->create();
}
}
From b3111a18a9554350c614d3c0e0ae366418586aed Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sat, 25 Jan 2025 11:18:28 +0530
Subject: [PATCH 11/13] update dependencies
---
composer.json | 4 ++--
composer.lock | 45 ++++++++++++++++++++++++++-------------------
2 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/composer.json b/composer.json
index 0d946a5..3fc9591 100644
--- a/composer.json
+++ b/composer.json
@@ -18,10 +18,10 @@
"ext-mbstring": "*"
},
"require-dev": {
- "phpunit/phpunit": "^11.5.2",
+ "phpunit/phpunit": "^11.5.3",
"ext-pcntl": "*",
"ext-sockets": "*",
- "squizlabs/php_codesniffer": "^3.11.2"
+ "squizlabs/php_codesniffer": "^3.11.3"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index 9f5251c..59a5688 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "93e410afed4cdbe7d4957a8ecbadce84",
+ "content-hash": "6f71d3615ccbf7619c59609bac2b24b5",
"packages": [],
"packages-dev": [
{
@@ -568,16 +568,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "11.5.2",
+ "version": "11.5.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3"
+ "reference": "30e319e578a7b5da3543073e30002bf82042f701"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/153d0531b9f7e883c5053160cad6dd5ac28140b3",
- "reference": "153d0531b9f7e883c5053160cad6dd5ac28140b3",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/30e319e578a7b5da3543073e30002bf82042f701",
+ "reference": "30e319e578a7b5da3543073e30002bf82042f701",
"shasum": ""
},
"require": {
@@ -598,7 +598,7 @@
"phpunit/php-timer": "^7.0.1",
"sebastian/cli-parser": "^3.0.2",
"sebastian/code-unit": "^3.0.2",
- "sebastian/comparator": "^6.2.1",
+ "sebastian/comparator": "^6.3.0",
"sebastian/diff": "^6.0.2",
"sebastian/environment": "^7.2.0",
"sebastian/exporter": "^6.3.0",
@@ -649,7 +649,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.2"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.3"
},
"funding": [
{
@@ -665,7 +665,7 @@
"type": "tidelift"
}
],
- "time": "2024-12-21T05:51:08+00:00"
+ "time": "2025-01-13T09:36:00+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -839,16 +839,16 @@
},
{
"name": "sebastian/comparator",
- "version": "6.2.1",
+ "version": "6.3.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739"
+ "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/43d129d6a0f81c78bee378b46688293eb7ea3739",
- "reference": "43d129d6a0f81c78bee378b46688293eb7ea3739",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/d4e47a769525c4dd38cea90e5dcd435ddbbc7115",
+ "reference": "d4e47a769525c4dd38cea90e5dcd435ddbbc7115",
"shasum": ""
},
"require": {
@@ -861,6 +861,9 @@
"require-dev": {
"phpunit/phpunit": "^11.4"
},
+ "suggest": {
+ "ext-bcmath": "For comparing BcMath\\Number objects"
+ },
"type": "library",
"extra": {
"branch-alias": {
@@ -904,7 +907,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy",
- "source": "https://github.com/sebastianbergmann/comparator/tree/6.2.1"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/6.3.0"
},
"funding": [
{
@@ -912,7 +915,7 @@
"type": "github"
}
],
- "time": "2024-10-31T05:30:08+00:00"
+ "time": "2025-01-06T10:28:19+00:00"
},
{
"name": "sebastian/complexity",
@@ -1592,16 +1595,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.11.2",
+ "version": "3.11.3",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079"
+ "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/1368f4a58c3c52114b86b1abe8f4098869cb0079",
- "reference": "1368f4a58c3c52114b86b1abe8f4098869cb0079",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10",
+ "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10",
"shasum": ""
},
"require": {
@@ -1666,9 +1669,13 @@
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
+ },
+ {
+ "url": "https://thanks.dev/phpcsstandards",
+ "type": "thanks_dev"
}
],
- "time": "2024-12-11T16:04:26+00:00"
+ "time": "2025-01-23T17:04:15+00:00"
},
{
"name": "staabm/side-effects-detector",
From 3bacbe21ebce1519a416c83a7b7b071486fa62a2 Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sat, 25 Jan 2025 14:19:59 +0530
Subject: [PATCH 12/13] update docs
---
README.md | 7 +++----
UPGRADE.md | 3 +++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 02fe778..9817695 100644
--- a/README.md
+++ b/README.md
@@ -6,15 +6,14 @@
## Important
-- "new Message()" is deprecated and could be removed in a future release. Use HL7 factory class instead. See documents below**
+- "_**new Message()**_" is deprecated and could be removed in a future release. Use _**HL7 factory**_ class instead. See documents below
+- The global setting `SEGMENT_ENDING_BAR` is deprecated and will be removed in a future release. If you're using this in your code, replace it with `WITH_SEGMENT_ENDING_FIELD_SEPARATOR`.
- Minimum supported PHP version has been updated to 8.0
Last supported versions:
- PHP 7.0 or 7.1 => [1.5.4](https://github.com/senaranya/HL7/tree/1.5.4)
- PHP 7.2 => [2.0.2](https://github.com/senaranya/HL7/tree/2.0.2)
- PHP 7.4 => [2.1.7](https://github.com/senaranya/HL7/tree/2.1.7)
- PHP 8.1 => [3.1.7](https://github.com/senaranya/HL7/tree/3.1.8)
-- The global setting `SEGMENT_ENDING_BAR` is deprecated and will be removed in a future release. Use
-`WITH_SEGMENT_ENDING_FIELD_SEPARATOR` instead.
## Introduction
@@ -158,7 +157,7 @@ Handle ACK message returned from a remote HL7 listener...
use Aranyasen\HL7\Connection;
$ack = (new Connection($ip, $port))->send($message); // Send a HL7 to remote listener
$returnString = $ack->toString(true);
-if (strpos($returnString, 'MSH') === false) {
+if (str_contains($returnString, 'MSH') === false) {
echo "Failed to send HL7 to 'IP' => $ip, 'Port' => $port";
}
$msa = $ack->getFirstSegmentInstance('MSA');
diff --git a/UPGRADE.md b/UPGRADE.md
index 5ad7288..dd87dff 100644
--- a/UPGRADE.md
+++ b/UPGRADE.md
@@ -9,5 +9,8 @@
- Using `new Message()` is deprecated, and might be removed in a future version. Use HL7 factory to create a new HL7 object instead. See readme on how to use it
- `setSegment` method is deprecated. Use `insertSegment` instead
- In `insertSegment`, added a replace parameter to replace a current segment in place
+ - Updated API docs
- Added `replaceSegment` method
+ - PhpUnit bumped to v11
- Added `create` method in HL7 factory that is an alias to `createMessage`
+ - Code has been significantly cleaned up, especially in Message class
From 1f57ed0d0235ae066a62d57266da9190106d14da Mon Sep 17 00:00:00 2001
From: Aranya Sen
Date: Sat, 25 Jan 2025 14:29:16 +0530
Subject: [PATCH 13/13] update readme
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 9817695..6a40354 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
## Important
-- "_**new Message()**_" is deprecated and could be removed in a future release. Use _**HL7 factory**_ class instead. See documents below
+- "_**new Message()**_" is deprecated and could be removed in a future release. Use _**HL7**_ factory class instead. See documents below
- The global setting `SEGMENT_ENDING_BAR` is deprecated and will be removed in a future release. If you're using this in your code, replace it with `WITH_SEGMENT_ENDING_FIELD_SEPARATOR`.
- Minimum supported PHP version has been updated to 8.0
Last supported versions:
@@ -17,7 +17,7 @@
## Introduction
-A PHP-based HL7 v2.x Parsing, Generation and Sending library, inspired from the famous Perl Net-HL7 package.
+This is a PHP package to create, parse and send HL7 v2 messages. This was originally inspired from Net-HL7 Perl package.
## Installation