JamGuard Quick Start
JamGuard requires JamMPI
JamGuard queries HAPI FHIR for all active MedicationRequests using the golden patient ID. Without JamMPI providing golden record links, JamGuard cannot see cross-branch medications.
Prerequisites
- JamMPI running and golden records populated
- HAPI FHIR with patient data from at least two branches
- NLM RxNorm API access (free, no API key required)
1. Deploy JamGuard
docker-compose.yaml
jamguard:
image: ghcr.io/akhester-technologies/jamguard:1.0.0
ports: ["8094:8094"]
environment:
HAPI_FHIR_URL: http://hapi:8080/fhir
JAMMPI_URL: http://jammpi:8081/fhir
JAMCONNECT_URL: http://jamconnect:8091
2. Configure the DDI rule
application.yaml
jamguard:
ddi:
enabled: true
block-on-major: true
warn-on-moderate: true
nlm-rxnorm-url: https://rxnav.nlm.nih.gov/REST
allergy:
enabled: true
missed-followup:
enabled: true
window-hours: 72
scan-cron: "0 0 * * * *"
polypharmacy:
enabled: true
threshold-count: 10
min-age: 65
duplicate-rx:
enabled: true
window-days: 30
3. Test with a DDI scenario
# First, create an active Aspirin prescription for GOLDEN-00441 at Branch 07
# Then, attempt to prescribe Warfarin at Branch 03:
curl -X POST http://localhost:8080/fhir/MedicationRequest \
-H "Authorization: Bearer {token}" \
-d @warfarin-request.json
# JamGuard fires before HAPI JPA executes
# Response if MAJOR DDI detected:
# HTTP 422 Unprocessable Entity
# {"issue": [{"severity": "error", "code": "business-rule",
# "diagnostics": "JamGuard DDI MAJOR: Warfarin × Aspirin — increased bleeding risk"}]}