Skip to content

IndicinaAdmin/audit-lookup

 
 

Repository files navigation

audit-lookup

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.

What you get

  • Transformation map — sortable-style table of each Provenance step (recorded, role, from → to, agent, source preview); expand a row for the full entity.what payload (e.g. entire HL7 v2 body).
  • Load bundles — paste JSON, open a .json file, 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).
  • ValidationFhirBundleValidatorService with clear error messages and a 6 MB parse guard.
  • Session persistence — last successfully parsed bundle stored in sessionStorage for the tab (cleared with Clear).
  • Export — download the active bundle as fhir-bundle.json.
  • Accessibility — skip link, focus outlines, aria-live errors, keyboard shortcuts in the loader.
  • Container-ready — multi-stage Dockerfile + nginx + Compose (see below).
  • RouterprovideRouter with lazy-loaded home route and scroll restoration.

Quick start (local)

npm install
npm start

Open the dev server URL (usually http://localhost:4200/). Use Ctrl+Enter / ⌘+Enter in the JSON editor to parse.

npm test
npm run build

Docker

docker build -t audit-lookup:latest .
docker run --rm -p 8080:80 audit-lookup:latest

Or:

docker compose up --build

Then open http://localhost:8080. Static SPA only — terminate TLS in front (ingress, reverse proxy).

Files: Dockerfile, docker-compose.yml, docker/nginx.conf, .dockerignore.

Embedding the graph only

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.

Project layout

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/)

Example Bundle files (public/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.valuenot 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).

License

MIT.

Disclaimer

Educational and interoperability tooling — not a medical device. Do not use for clinical decisions without appropriate validation, contracts, and regulatory review where applicable.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 64.5%
  • SCSS 17.6%
  • HTML 17.5%
  • Dockerfile 0.4%