> ## Documentation Index
> Fetch the complete documentation index at: https://hmis-docs.derrickmugabwa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration context

> Confirmed scope, decisions, and current status of Phase 1 laboratory integration.

## Scope

Phase 1 is a results-first universal laboratory integration. HMIS is the clinical source of truth and Open Integration Engine (OIE) is the transport and protocol boundary.

## Confirmed decisions

* One physical `DiagnosticSpecimen` can serve one or more compatible requisitions.
* HMIS creates and prints the specimen barcode at collection.
* OIE owns analyzer network/protocol configuration. HMIS never stores analyzer credentials.
* HMIS accepts normalized results through a Sanctum-protected API.
* Redis is not required for this phase; Laravel's database queue is used.
* OIE runs in Docker Compose with a separate PostgreSQL database.
* Outbound analyzer orders are deferred. The pilot supports analyzer pull-by-barcode worklists.

## Pilot capability status

| Capability                             | Status                                 |           |
| -------------------------------------- | -------------------------------------- | --------- |
| Specimen collection, barcode, dispatch | Working                                |           |
| Instrument/test mapping                | Working                                |           |
| OIE to HMIS result relay               | Working                                |           |
| OIE worklist relay                     | Working                                |           |
| ASTM/TCP result import                 | Validated                              |           |
| HL7/MLLP result import                 | Validated                              |           |
| HL7 \`MSA                              | AA\` acknowledgement                   | Validated |
| Real analyzer onboarding               | Pending vendor interface documentation |           |

## Current pilot identifiers

| Item                | Value          |
| ------------------- | -------------- |
| Instrument code     | `PILOT-HEM-01` |
| Analyzer test code  | `HGB`          |
| HMIS parameter code | `PILOT-HGB`    |
| Expected unit       | `g/dL`         |
| ASTM listener       | `5000`         |
| HL7/MLLP listener   | `2575`         |

<Warning>
  The values above are local-pilot identifiers, not production defaults. Production configuration must be based on the analyzer vendor's interface manual and sample messages.
</Warning>
