PHPackages                             amin0x/hl7\_php\_api\_lib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. amin0x/hl7\_php\_api\_lib

ActiveLibarary[API Development](/categories/api)

amin0x/hl7\_php\_api\_lib
=========================

project to implement Nabidh HL7

v1.0.1(1y ago)241Apache-2.0PHPPHP &gt;=7.4

Since Jan 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Amin0x/HL7_PHP_API_LIB)[ Packagist](https://packagist.org/packages/amin0x/hl7_php_api_lib)[ RSS](/packages/amin0x-hl7-php-api-lib/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

HL7\_PHP\_API\_LIB
==================

[](#hl7_php_api_lib)

project to implement Nabidh HL7 using PHP

**Amin Omer** **

install
-------

[](#install)

composer require amin0x/hl7\_php\_api\_lib

useage
------

[](#useage)

> **Patient transfer message**

```
$nabidh = new Nabidh();
$pt = new ADT_A02_Patient_Transfer();
$pt->getMSH()->setSendingFacility('TESTHOS20');
$pt->getMSH()->setDateTimeofMessage(date('YmdHis'));
$pt->getMSH()->setProcessingID('D');

$pt->getPID()->setDateTimeofBirth(date('Ymd', strtotime('19990507')));
$pt->getPID()->setPhoneNumberHome('0123456789', 'abc@example.com');
$pt->getPID()->addPatientIdentifierList('123123','TESTHOS20', 'MRN');
$pt->getPID()->setPatientAddress('Dubai', 'Dubai', '', '784');
$pt->getPID()->setPatientName('amin', 'o', 'mohamed');
$pt->getPID()->setLastUpdateDateTime(date('YmdHis'));
$pt->getPID()->setAdministrativeSex('M');
$pt->getPID()->setPrimaryLanguage('ENG');
$pt->getPID()->setNationality(Nationality::Canadian[0]);
$pt->getPID()->setMaritalStatus('M');
$pt->getPID()->setReligion('MOS');
$pt->getPID()->setSSNNumberPatient('111111111111111');
$pt->getPID()->setPatientDeathIndicator('N');
$pt->getPID()->setIdentityUnknownIndicator('T');

$pt->getEVN()->setRecordedDateTime(date('YmdHis'));
$pt->getEVN()->setEventFacility('1111111');
$pt->getEVN()->setEventTypeCode('A02');
$pt->getEVN()->setEventOccurred(date('YmdHis'));

$pt->getPV1()->setID(1);
$pt->getPV1()->setAdmissionType('O');
$pt->getPV1()->setAdmitDateTime(date('YmdHis'));
$pt->getPV1()->setHospitalService(HospitalService::Unknown);
$pt->getPV1()->setVisitNumber('99999');

$apl = new PL();
$apl->setPointOfCare('');
$apl->setFacility('TCODE10');
$apl->setLocationDescription('Test Hospital 20');
$pt->getPV1()->setAssignedPatientLocation($apl);

$AttendingDoctor = new XCN();
$AttendingDoctor->setIdNumber('445566');
$AttendingDoctor->setLastName('Ahmed');
$AttendingDoctor->setFirstName('omer');
$AttendingDoctor->setMiddleName('mohamed');
$AttendingDoctor->setAssigningAuthority('SHERYAN');
$AttendingDoctor->setPrefex('Dr.');
$pt->getPV1()->setAttendingDoctor($AttendingDoctor);

$res = $nabidh->sendMessage($pt, 'http://example.com/adt?app_id=&api_key=');
if ($res !== false && $res->isSuccess()){
    //success
} else {
    //error
}

```

> **Patient Admit**

```
$nabidh = new Nabidh();
$pt = new ADT_A01_Admit_Patient();
$pt->getMSH()->setSendingFacility('TESTHOS20');
$pt->getMSH()->setDateTimeofMessage(date('YmdHis'));
$pt->getMSH()->setProcessingID('D');
$pt->getPID()->setAdministrativeSex('M');
$pt->getPID()->setDateTimeofBirth(date('Ymd', strtotime('19990507')));
$pt->getPID()->setPhoneNumberHome('0123456789', 'abc@example.com');
$pt->getEVN()->setRecordedDateTime(date('r'));
$pt->getEVN()->setEventFacility('TCODE10');

$pt->getPID()->addPatientIdentifierList('123123', 'TESTHOS20', 'PPN');
$pt->getPID()->setPatientAddress('abc', 'abc state', '123', 'UK');
$pt->getPID()->setNationality('USA');
$pt->getPID()->setPhoneNumberHome('0123456789');

$apl = new PL();
$apl->setFacility('TCODE10');
$apl->setLocationDescription('Test Hospital 20');
$pt->getPV1()->setAssignedPatientLocation($apl);

```

Supported Messages
------------------

[](#supported-messages)

> 1. ADT\_A01\_Admit\_Patient
> 2. ADT\_A02\_Patient\_Transfer
> 3. ADT\_A03\_Discharge\_Event
> 4. ADT\_A04\_Register\_Patient
> 5. ADT\_A05\_Pre\_Admit\_Patient
> 6. ADT\_A06\_Change\_Outpatient\_To\_Inpatient
> 7. ADT\_A07\_Change\_Inpatient\_To\_Outpatient
> 8. ADT\_A08\_Update\_Patient\_Information
> 9. ADT\_A09\_Patient\_Departed
> 10. ADT\_A10\_Patient\_Arrived
> 11. ADT\_A11\_Cancel\_Admit
> 12. ADT\_A12\_Cancel\_Transfer
> 13. ADT\_A13\_Cancel\_discharge\_event
> 14. ADT\_A23\_Delete\_Patient\_Record
> 15. ADT\_A28\_Add\_patient\_information
> 16. ADT\_A30\_Merge\_Patient\_Information
> 17. ADT\_A31\_Update\_patient\_information
> 18. ADT\_A39\_Merge\_Patient
> 19. ADT\_A47\_Change\_Patient\_Identifier\_List
> 20. MDM\_T02\_Original\_Document\_Notification
> 21. MDM\_T11\_Document\_Cancel\_Notification
> 22. ORM\_O01\_Medication\_Orders
> 23. ORU\_R01\_Observation\_Results
> 24. PPR\_PC1\_Add\_Probalem
> 25. PPR\_PC2\_Update\_Probalem
> 26. PPR\_PC3\_Delete\_Probalem
> 27. VXU\_V04\_Vaccination\_Record\_Message

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~496 days

Total

3

Last Release

635d ago

Major Versions

v0.1.0-alpha → v1.0.02022-03-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16211223?v=4)[Amin Omer](/maintainers/Aminomer)[@AminOmer](https://github.com/AminOmer)

---

Top Contributors

[![Amin0x](https://avatars.githubusercontent.com/u/49003095?v=4)](https://github.com/Amin0x "Amin0x (84 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/amin0x-hl7-php-api-lib/health.svg)

```
[![Health](https://phpackages.com/badges/amin0x-hl7-php-api-lib/health.svg)](https://phpackages.com/packages/amin0x-hl7-php-api-lib)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
