PHPackages                             nstaff/hl7-orm001 - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nstaff/hl7-orm001

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nstaff/hl7-orm001
=================

Extension of aranyasen/hl7 to support easier relationships between OBX and ORC segments in an ORU message

011PHP

Since Mar 21Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nstaff/hl7-orm001)[ Packagist](https://packagist.org/packages/nstaff/hl7-orm001)[ RSS](/packages/nstaff-hl7-orm001/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
------------

[](#introduction)

An extension of the aranyasen/hl7 build specifically modified for ORM^001 messages. This package solidifies the relationship between OBX and OBR segments by giving them a concrete parent/child relationship.

Installation
------------

[](#installation)

```
composer require nstaff/hl7-orm001
```

Usage
-----

[](#usage)

### Parsing

[](#parsing)

See aranyasen/hl7 for basic usage details

### Using obx - obr relationship

[](#using-obx---obr-relationship)

```
    //With a new message instantiated
    $obrArray = $msg->getOBRs();
    $obxs = $obrArray[0]->getOBXs();
```

Fields can be accessed using aranyasen library. However some additions were made/overridden

```
    //Gives the type of the segment. OBX.3
    $obxs[0]->getType();
    //Gives the value of the segment OBX.5
    $obxs[0]->getValue();
```

Child OBXs are can be assigned at runtime

```
    $obrArray[0]->addOBX($myObxVar);

```

For convenience, plain language getters setters for ordering provider have been added to the OBR segments to do nested array access on first and last name. Typically:

```
    $obr->getOrderingProvider();

```

will return an array. To make life simpler this wrapper was also added to provide direct access to first and last names:

```
    $obr->getOrderingProviderFirst();
    $obr->getOrderingProviderLast();

```

Additionally retriving test code and plan language test name for the OBR were added:

```
    $obr->getTestCode();
    $obr->getTestName();

```

### TODOs

[](#todos)

- Data Validation
- Search by regex and return segment/field/index
- Define more segments

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5291529881c8c5ef58e5a5b808bcd0b79f67ee47ec0a63f3838d251ee5b5044?d=identicon)[nstaff](/maintainers/nstaff)

---

Top Contributors

[![nstaff-unmc](https://avatars.githubusercontent.com/u/215519565?v=4)](https://github.com/nstaff-unmc "nstaff-unmc (5 commits)")

### Embed Badge

![Health badge](/badges/nstaff-hl7-orm001/health.svg)

```
[![Health](https://phpackages.com/badges/nstaff-hl7-orm001/health.svg)](https://phpackages.com/packages/nstaff-hl7-orm001)
```

PHPackages © 2026

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