Jennifer Academy

Code: Healthcare data with Jennifer

Code for "Healthcare data with Jennifer"

The programs behind the slides, for Jennifer 0.27.0. Run everything from this folder. Every patient, value and identifier is invented: Jane Doe, PAT-1001 and specimen S-2001 do not exist. Nothing here talks to a real analyzer, LIS or FHIR server: the analyzer is analyzer.j and the FHIR server is fhirfake.j, both on loopback.

Setup

jvc update     # reads deck.toml: @deckyard/astm 0.2.0, fhir 0.3.0, hl7 0.2.0 into vendor/

The chain uses the loopback ports 4001 (ASTM), 2575 (MLLP) and 8090 (FHIR).

Programs

FileShows (slides)Run
sample.txtthe analyzer's ASTM message, one record per line (3)read by results.j and analyzer.j
results.jparsing the records, results, and the error for a record before any header (4)jennifer run results.j
analyzer.ja stand-in for the instrument: sends sample.txt over LIS01 to 127.0.0.1:4001 (5)started by run.sh
lis.jthe LIS: receives the ASTM message, maps it to an ORU^R01, sends it over MLLP and prints the acknowledgement (5, 6, 8, 9, 11)started by run.sh
bridge.jHL7 in, FHIR out: hl7.serve, the Patient, an Observation per OBX, one transaction (11 to 14)started by run.sh; jennifer run bridge.j [fhir-base-url]
fhirfake.jthe FHIR server for the demo: transactions, read, search, a 404 with an OperationOutcome; prints every stored Observation (13, 16)started by run.sh; jennifer run fhirfake.j
readback.jfhir.search and the fhir.http error of a read (16)run by run.sh at the end
oru.txtthe ORU^R01 that lis.j sent in one run, one segment per line (6)read by paths.j
paths.jreading with terser paths, the strict whole-field read, escapes (7, 10)jennifer run paths.j
run.shthe whole chain: fake, bridge, LIS, analyzer, then readback.j./run.sh

run.sh writes fhirfake.log, bridge.log and lis.log; delete them afterwards. The fake keeps everything in memory and has no authentication.

To see the first run of slide 15, the AE acknowledgement, change the MRN constant in bridge.j to "http://example.org/fhir/mrn" and run ./run.sh again: fhir.entry refuses the conditional URL, hl7.serve answers AE and lis.j prints the reason.

FileSize
LICENSE899 Braw
README.md2.2 KiBraw
analyzer.j481 Braw
bridge.j3.5 KiBraw
deck.toml442 Braw
fhirfake.j4.5 KiBraw
lis.j3.2 KiBraw
oru.txt342 Braw
paths.j969 Braw
readback.j738 Braw
results.j778 Braw
run.sh499 Braw
sample.txt275 Braw