> ## 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.

# HMIS configuration

> Configure the clinical records that an analyzer integration needs.

## Required configuration

1. Create the diagnostic service and its diagnostic parameter.
2. Configure result type, expected unit, and reference ranges.
3. Create an active laboratory instrument with an immutable machine code.
4. Enable worklist support for instruments that pull orders by barcode.
5. Create an active instrument-test mapping.

## Mapping model

The analyzer test code is supplied by the machine/vendor interface. It is not required to match the HMIS parameter code.

| Vendor/analyzer | HMIS        | Mapping             |
| --------------- | ----------- | ------------------- |
| `HGB`           | `PILOT-HGB` | `HGB` → `PILOT-HGB` |

The mapping validates expected result type and unit. Version 1 quarantines mismatches rather than silently converting them.

## Operational workflow

1. Order the diagnostic service during a patient visit.
2. Collect the specimen and print the barcode label.
3. Dispatch the specimen to the configured instrument.
4. The analyzer queries the dispatched barcode worklist.
5. OIE imports results and HMIS completes the requisition only when all required mapped results are present.
