Skip to content

Commit

Permalink
Merge pull request #158 from medplum/rahul-hl7-bots
Browse files Browse the repository at this point in the history
HL7 Lab Integration
  • Loading branch information
reshmakh committed May 19, 2023
2 parents c0933b3 + 34adfb7 commit bafdfaa
Show file tree
Hide file tree
Showing 7 changed files with 3,486 additions and 2,060 deletions.
3,913 changes: 1,857 additions & 2,056 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"author": "Medplum <hello@medplum.com>",
"license": "Apache-2.0",
"devDependencies": {
"@medplum/cli": "2.0.17",
"@medplum/core": "2.0.17",
"@medplum/fhirtypes": "2.0.17",
"@medplum/mock": "2.0.17",
"@medplum/cli": "2.0.19",
"@medplum/core": "2.0.19",
"@medplum/fhirtypes": "2.0.19",
"@medplum/mock": "2.0.19",
"@types/node": "18.16.2",
"@types/node-fetch": "^2.6.2",
"@types/ssh2-sftp-client": "^9.0.0",
Expand Down
15 changes: 15 additions & 0 deletions src/examples/lab-integration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Medplum HL7 Lab Integration Bots

The bots in this directory demonstrate an example HL7v2 lab integration integration. These bots send and receive HL7 files through an SFTP server and can be automatically triggered by Medplum subscriptions.

For our purposes, we'll be focusing on two specific types of messages, the ORM and the ORU.

- **ORM (Order Message)**: These messages are used by healthcare providers to place an order for a lab test or procedure.

- **ORU (Observation Result Message)**: These messages are used to transmit the results of a lab test or procedure from the performing lab back to the ordering provider.

## Overview of Bots

1. **send-orm-message.ts**: This bot demonstrates how to send an HL7 ORM message to a third-party lab using Medplum and SFTP. This can be triggered when a new `ServiceRequest` resource is created in Medplum.

2. **read-oru-message.ts**: This bot demonstrates how to read results from an HL7 ORU message using Medplum and SFTP. This can be triggered to be [run on a timer](https://www.medplum.com/docs/bots/bot-cron-job) to poll for results periodically.
Loading

0 comments on commit bafdfaa

Please sign in to comment.