audit-lookup is a small, self-contained Angular app for exploring FHIR R4 Provenance inside a Bundle: it builds a directed graph (with cycle handling and merged edges), highlights HL7 v2 vs CDA / OID-style sources, flags orphan resources, and exposes pan/zoom, agent labels, recorded times, and raw entity.what JSON.
Version 1.0.0 — see src/app/version.ts and package.json.
- Transformation map — sortable-style table of each Provenance step (recorded, role, from → to, agent, source preview); expand a row for the full
entity.whatpayload (e.g. entire HL7 v2 body). - Load bundles — paste JSON, open a
.jsonfile, or fetch a URL (subject to browser CORS). - Built-in samples — two one-click demos in the UI; more JSON examples live under
public/samples/(see below). - Validation —
FhirBundleValidatorServicewith clear error messages and a 6 MB parse guard. - Session persistence — last successfully parsed bundle stored in
sessionStoragefor the tab (cleared with Clear). - Export — download the active bundle as
fhir-bundle.json. - Accessibility — skip link, focus outlines,
aria-liveerrors, keyboard shortcuts in the loader. - Container-ready — multi-stage Dockerfile + nginx + Compose (see below).
- Router —
provideRouterwith lazy-loaded home route and scroll restoration.
npm install
npm startOpen the dev server URL (usually http://localhost:4200/). Use Ctrl+Enter / ⌘+Enter in the JSON editor to parse.
npm test
npm run builddocker build -t audit-lookup:latest .
docker run --rm -p 8080:80 audit-lookup:latestOr:
docker compose up --buildThen open http://localhost:8080. Static SPA only — terminate TLS in front (ingress, reverse proxy).
Files: Dockerfile, docker-compose.yml, docker/nginx.conf, .dockerignore.
If you already have a Bundle in parent code:
<app-provenance-trace [bundle]="myBundle" />Types live in src/app/fhir/fhir-types.ts. Parsing and layout are in ProvenanceGraphService.
| Area | Role |
|---|---|
src/app/core/fhir-bundle-validator.service.ts |
JSON parse + Bundle shape checks |
src/app/bundle-loader/ |
Paste / file / URL / samples UI |
src/app/pages/home.page.ts |
Shell page: loader + trace + export + session restore |
src/app/provenance/ |
Graph service + trace component |
public/samples/ |
Example bundles (copied to dist/.../browser/samples/) |
Synthetic demo data only — not real members or claims. Use Open file… in the app, or copy-paste the JSON.
| File | What it shows |
|---|---|
example-provenance-v2-bundle.json |
HL7 v2–style source (urn:ietf:rfc:3986 + MSH-style value) → Patient; one Assembler agent. Same as UI Sample: HL7 v2 source. |
example-provenance-cda-bundle.json |
CDA / OID–style source → Composition + Patient; derivative entity. Same as UI Sample: CDA / OID source. |
example-provenance-chain-bundle.json |
Two-step lineage: v2 source → Patient → (derivative) → Observation; different agents per step. |
example-provenance-hl7v2-large-bundle.json |
Large synthetic HL7 v2.5.1 pipe message (MSH/EVN/PID/PV1/NK1/GT1/IN1/AL1/DG1/many OBX + NTE/ZPD) embedded in Provenance.entity.what.identifier.value — not raw wire storage, but realistic volume for UI/detail-panel testing. Synthetic only. |
example-provenance-orphan-bundle.json |
Provenance covers Patient only; Claim is in the bundle but not targeted — shows orphan styling on the graph. |
example-bundle-no-provenance.json |
Patient + Observation, no Provenance resources — app shows the “No provenance to display” empty state. |
After ng build or Docker, these are served from /samples/<filename> (same origin as the app).
MIT.
Educational and interoperability tooling — not a medical device. Do not use for clinical decisions without appropriate validation, contracts, and regulatory review where applicable.