Hospital IT / Technical Department

Technical Integration and Installation Guide

HIS integration methods, data flows, on-premise architecture, minimum system requirements and network/security requirements. Labels: Available ready today · Roadmap planned.

Contents

1. Technology summary

LayerTechnology
ApplicationNext.js (Node.js 20) — server-side rendering + REST API
DatabasePostgreSQL 16
AuthenticationUsername/password (bcrypt), JWT session, role-based access control (RBAC)
Reverse proxy / TLSCaddy (automatic HTTPS) — institutional certificates also supported
PackagingDocker + Docker Compose (one image for cloud and on-premise)
Integration engineMirth Connect (NextGen Connect) — recommended as the HL7/MLLP broker
File storeLocal disk (volume) or S3/MinIO (images, ultrasound and NST attachments)

2. Integration methods

PartoAI connects to the HIS through an adapter (anti-corruption) layer. The core software knows one canonical data model; HIS-specific fields are isolated in adapters at the edge. Supported transports:

a) HL7 v2.x + MLLP Message parsing available Live MLLP listener: via Mirth

The standard most hospital information systems speak. Recommended topology: HIS ⇄ Mirth Connect (MLLP/TCP) ⇄ PartoAI REST. Mirth handles message transformation, queueing, retries and logging; PartoAI only speaks its own REST API. PartoAI includes HL7 parsing and generation helpers (PID → patient demographics, MDM generation).

b) REST / JSON web service Available

If the HIS offers a REST service, the adapter calls it directly over HTTPS with a token. PartoAI's own REST API is integrated the same way (see section 5).

c) SOAP web service Wrapped in the adapter

Some HIS products provide SOAP/WSDL; it is wrapped in the adapter and converted to the canonical model.

d) File / batch (HL7 file, CSV) Available

Works without a live connection: an HL7 ADT message from the HIS is pasted in, or a batch file is transferred. A fast go-live before the integration agreement is complete is possible this way.

FHIR: PartoAI's canonical model is designed close to FHIR; a native FHIR API is on the roadmap. If your HIS provides FHIR, the adapter can be mapped to it.

3. HL7 message types (scope)

DirectionMessagePurpose
HIS → PartoAIADT^A01 / A04 / A08Admission / registration / update — automatically create or match the patient arriving at the labour ward
PartoAI → HISQBP^Q22 / RSP or RESTPatient lookup by national ID or protocol number
PartoAI → HISORU^R01Sending observations/results (e.g. monitoring data)
PartoAI → HISMDM^T02Sending the birth/partogram document

Field mappings (segment/field indexes) are confirmed in the adapter against the HIS vendor's conformance guide. Institution code and national ID matching are supported.

4. Data flow (typical scenario)

HISADT / QBP / MDM Mirth ConnectMLLP ⇄ REST Adaptercanonical model PartoAImonitoring · alerts · records ① Admission (ADT) → patient match · ② Labour followed in PartoAI · ③ Birth record (MDM/ORU) → HIS
  1. Admission: When the patient is admitted to the labour ward, the HIS sends an ADT → Mirth → PartoAI creates or matches the patient (by national ID or protocol number).
  2. Monitoring: Throughout labour all data is kept in PartoAI; NST/CTG assessment and alerts are produced here.
  3. Write-back: When the birth is complete, PartoAI sends the birth summary as MDM/ORU to the HIS through Mirth.

5. PartoAI REST API Available

All endpoints run over HTTPS with session/token authentication; requests and responses are JSON. Every call is written to the audit log; raw PHI is not logged.

EndpointMethodDescription
/api/integrations/lookupPOSTPatient lookup by national ID / protocol number / HL7; pre-fills the admission form
/api/integrations/pushPOSTSends the completed birth record to the HIS (or generates an HL7 MDM)
/api/integrations/statusGETThe hospital's integration status and supported types
/api/nst/evaluatePOSTNST/CTG assessment (rule engine + optional AI); alert on Cat. II/III

Example — patient lookup request and response:

POST /api/integrations/lookup
Content-Type: application/json

{ "nationalId": "10000000146", "protocolNo": "2026-5567" }

→ 200 OK
{ "ok": true,
  "patient": { "nationalId":"10000000146","name":"...","ga":39,"gravida":2,"parity":1 } }

Connection details (baseUrl, token) are defined per hospital in the admin panel; the token is stored encrypted, on the server only.

6. On-premise architecture

All components run as Docker containers on a single server. Only 443 (HTTPS) is exposed; the database, file store and integration engine are not reachable from outside.

Hospital server — Docker Caddy (reverse proxy):443 HTTPS (only external port) Application (Next.js):3000 (internal) PostgreSQL:5432 (internal) · PHI encrypted Backup servicescheduled pg_dump File storevolume / MinIO Mirth (optional)MLLP :6661 (internal) HISinternal network / VPN · mTLS

6b. Example connection scenario (Windows infrastructure)

Even if the hospital's HIS runs on Windows Server + MSSQL, PartoAI integrates without difficulty. PartoAI runs on the hospital's existing virtualisation (VMware/Hyper-V), in a small Ubuntu VM; the Windows servers are not touched. Because the integration is protocol-based (HL7/TCP) it is independent of the operating system — the HIS database (MSSQL) is never accessed.

Hospital virtualisation (VMware / Hyper-V) — internal VLAN Windows Server HIS + MSSQL 10.0.1.10 HL7 interface Ubuntu VM PartoAI (Docker) + Mirth · 10.0.1.20 app · db · backup HL7 MLLP :6661 (TCP) Clinical workstations browser · Windows HTTPS :443 Windows untouched · MSSQL not accessed · HL7 exchange over the network only

Step-by-step installation (example)

#StepOwner
1An Ubuntu 22.04 VM is created on the existing hypervisor (8 vCPU / 16 GB / 250 GB) and attached to the internal VLAN (e.g. 10.0.1.20)Hospital IT
2Docker + Compose are installed on the VM; the PartoAI package is started (app + db + backup + Mirth)Joint
3Internal domain name + certificate for clinical access (e.g. partoai.hastane.local → 443)Joint
4The HL7 interface is enabled on the HIS side; the ADT feed is routed to Mirth (10.0.1.20:6661)Hospital IT + HIS vendor
5Mirth channels: inbound ADT → PartoAI REST; outbound birth record (MDM) → HIS. With mTLSPartoAI
6Test: a sample patient ADT is sent and the match is verified in PartoAI; birth-record write-back is testedJoint
Quick-start option: Until the HIS HL7 interface is enabled (steps 4–5 depend on the vendor and IT, and can take time), PartoAI can be used straight away on the same VM in manual HL7 / manual entry mode. When the integration is complete it is switched on — use is not interrupted.

Note: IP addresses and domain names are examples; they follow the institution's network plan. If the hospital does not want a Linux VM at all, Docker with a WSL2 back end on Windows Server, or a native (Node + PostgreSQL) installation, is also possible; an Ubuntu VM is the cleanest and recommended option.

7. System requirements (on-premise)

ResourceMinimum (pilot / single unit)Recommended (production)
CPU4 vCPU8 vCPU
RAM8 GB16 GB
Disk100 GB SSD250+ GB NVMe (+ separate backup disk)
Operating systemLinux (Ubuntu 22.04 LTS recommended) · Docker + Docker Compose
VirtualisationVM or physical server; dedicated resources recommended
BackupEncrypted disk (LUKS) + automatic backup + off-site copy

Scale note: even in a national scenario of about one million births a year the write load is low for PostgreSQL; for large institutions a read replica and more memory are recommended.

8. Network, port and security requirements

PortDirectionPurpose
443/TCP (and 80→443)Inbound (users)HTTPS access to the application — the only external port
3000/TCPInternalApplication (reached only by the proxy; not exposed)
5432/TCPInternalPostgreSQL (not exposed)
6661/TCP (MLLP)Internal / HIS VLANHL7 integration (Mirth); with the HIS only, mTLS
22/TCP (SSH)ManagementOver the management network / VPN only

9. Data, encryption and backup

10. Installation and updates

git clone <repo> && cd rap
cp .env.docker.example .env      # passwords, PHI key, domain name
docker compose up -d --build     # app + db + caddy + backup
# update:
git pull && docker compose up -d --build

The deliverable is a single container package that hospital IT can start within minutes. Updates are supplied as versioned images/packages; schema migrations are applied automatically and safely at start-up (with an automatic fallback if something goes wrong).

11. Responsibility matrix

AreaHospital ITPartoAI
Server / VM provision, operating system✓—
Network, firewall, VPN, segmentation✓Advisory
Disk encryption, physical security✓—
Application installation and updatesJoint✓
Application encryption, audit, backup script—✓
HIS access / test environment✓ (with the vendor)Adapter development
Off-site backup copy and retention✓Procedure