
Initial Release
中文说明 | English
Medical Insurance Audit Evidence Assistant is a desktop demonstration for exploring how a hospital review team can receive encounter data, identify review items, inspect evidence and record human decisions. It brings an IRIS interoperability Production, vector search, an optional AI investigation and an operations workbench into one application.
Scope: The supplied encounters, rules and evidence are synthetic. The bundled evidence is fictional and is not an insurance policy. The system does not make legal or clinical decisions or automatically deny claims. Do not enter real patient data.
| Feature | What it does |
|---|---|
| FHIR test entry | Submits sample FHIR Bundles to the local demonstration endpoint, including duplicate-order and renal-function scenarios. |
| FHIR file intake | Uploads a synthetic JSON file through a custom inbound adapter; displays file status, recorded business stages and the associated case. |
| Audit tasks | Creates native Workflow Engine tasks for findings; reviewers can claim and complete them with a recorded decision. |
| Knowledge Evidence Library | Keyword search over two labelled fictional evidence snippets; case-review evidence is matched automatically by IRIS vector search. |
| AI investigation | On explicit request, uses AI Hub and restricted case/evidence tools to prepare a cited recommendation for human review. A model configuration is required. |
| Document vector library | Accepts synthetic TXT, Markdown and DOCX files, generates embeddings locally and stores them in a separate IRIS vector table. Uploaded documents can be searched in the document library; they are not included in the separate fictional-policy search or AI evidence tools. |
| Operations | Displays system overview, event history, recorded application stages and the embedded IRIS Production management page. |
| MCP and AI settings | Provides model configuration and, after optional gateway setup, MCP service status, call logs and client-token management. |
The included policy-like texts and vectors are demonstration fixtures: their 512-dimensional vectors are hand-constructed, so their similarity values do not establish semantic relevance or policy validity. AI output is a recommendation, and missing configuration or failed validation is reported as a failure.
HD.FHIRFileAdapter extends IRIS Ens.InboundAdapter to send completed FHIR files into the Production. It deduplicates content, retains original files and rate-limits failed retries. The workbench shows file status and the associated event.| Layer | Technology and role |
|---|---|
| Runtime and deployment | InterSystems IRIS Community AI Hub EAP build 154; Docker Compose creates the IRIS instance and persistent volume. |
| Interoperability and workflow | HD.Production connects FHIR intake, routing, audit, native Workflow Engine tasks and AI-review components. |
| AI | IRIS AI Hub %AI.Agent, authorized case and evidence tools, output validation, Config Store and IRIS Wallet. Live model calls require a separately configured provider. |
| Storage and retrieval | IRIS globals and SQL; IRIS Vector Search with VECTOR_COSINE for fictional fixtures; a separate HD.UploadedVectors table for uploaded documents. |
| Embeddings | A separate Python worker encodes uploaded documents. For document search, a single IRIS Production operation runs Embedded Python to encode queries using the same ONNX model. |
| Interface and integration | Desktop HTML/CSS/JavaScript workbench, REST endpoints and an optional local MCP gateway. |
flowchart TD
A[Synthetic FHIR encounter] --> B[Submit through FHIR test entry]
A --> BF[Upload synthetic FHIR file]
BF --> AD[Custom file inbound adapter]
AD --> C[IRIS Production processes the encounter]
B --> C
C --> D[Generate findings and retrieve fictional evidence]
D --> T[Native workflow task: claim and review]
T --> E[Reviewer examines the case]
E --> F{Optional AI investigation?}
F -- Yes --> G[Agent reads authorized case and evidence tools]
G --> H[Validate cited recommendation]
H --> I[Human review and decision]
F -- No --> I
J[Synthetic document upload] --> K[Local embedding worker]
K --> L[Separate IRIS upload-vector table]
Q[Document search query] --> P[Embedded Python query embedding]
P --> L
A workflow task for a new event is terminal after completion; historical events without workflow markers retain the legacy review behavior. The upload path is independent: uploaded documents are not automatically used by the fictional-evidence search. The flow view displays recorded application stages, not a complete native IRIS message trace.
flowchart LR
subgraph Client[Desktop browser]
UI[Review workbench]
end
subgraph IRIS[IRIS container]
API[REST and FHIR intake]
ADAPTER[Custom FHIR file adapter]
PROD[Interoperability Production]
AGENT[AI Hub agent and tools]
WORKER[Python document worker]
EMBED[Embedded Python search operation]
FLOW[Native Workflow Engine]
STORE[(IRIS globals, SQL and vectors)]
CONFIG[Config Store and IRIS Wallet]
API --> PROD
API --> ADAPTER
ADAPTER --> PROD
PROD --> STORE
PROD --> AGENT
PROD --> FLOW
PROD --> EMBED
AGENT --> STORE
AGENT --> CONFIG
WORKER --> STORE
end
UI --> API
UI -. administration .-> GATEWAY[Optional MCP gateway]
GATEWAY --> IRIS
AGENT -. explicit live call .-> MODEL[Configured model provider]
The external provider is only contacted for an explicitly initiated live investigation. Core IRIS health does not guarantee that the embedding worker has finished downloading and loading its dependencies.
2026.3.0AI.154.0. Obtain the appropriate architecture from the InterSystems AI Hub Early Access portal. This repository does not distribute the image.The clean-install and document-upload checks described below were run on ARM64. An x64 clean installation has not yet been verified.
Run commands from the repository root. After downloading the build 154 image for your platform, load it and retag it if necessary:
docker load -i /path/to/iris-ai-hub-build-154.tar.gz docker image ls # Replace with the repository:tag displayed by docker image ls, if different. docker tag iris-community:2026.3.0AI.154.0
docker compose up -d docker compose ps docker compose logs --tail=30 iris
Wait for the iris service to report healthy. On a new volume, Compose initializes IRIS, compiles the application, imports fictional vector fixtures, starts the Production and creates a random password for the local medreview administrator. Startup does not make an online LLM call.
Open http://127.0.0.1:52884/med-audit/ and sign in as medreview. Retrieve its password locally:
docker compose exec -T iris cat /durable/iris/private/med-audit-reviewer-password
Docker Compose defaults MED_AUDIT_DEFAULT_LOGIN_NO_CHANGE=1: once per data volume, it removes the first-login password-change requirement for _SYSTEM only. A fresh image accepts the IRIS default _SYSTEM / SYS; existing passwords are preserved and never reset. Set this option to 0 to skip initialization. This option is intended for a local demo.
The generated password and data persist across restarts. The account has IRIS administrative privileges and the HTTP port is bound to localhost. The embedded Production page signs in automatically with the demo administrator. Do not expose this demo publicly without an independent security review.
To select another host port, set MED_AUDIT_PORT before running Compose. docker compose down stops the project and preserves its volume. docker compose down -v deletes this project’s data and generated credentials.
In addition to Docker Compose, you can use ZPM (IPM) in the USER namespace of a dedicated IRIS Community AI Hub EAP build 154 instance. Enable Interoperability in the namespace and use an administrator account. The source path must be readable by the IRIS process:
USER>zpm "load /path/to/med-insurance-audit"
USER>set sc=##class(HD.PackageSetup).Start() if $system.Status.IsError(sc) { do $system.Status.DisplayError(sc) }
The package creates the vector table before compiling static SQL, then copies the web assets, tools, and synthetic fixtures into the IRIS manager directory. The start method creates or updates /med-audit and /med-audit-admin and starts HD.Production; run it only in a dedicated instance. Sign in with an existing IRIS administrator account and complete any required initial password change. Open http://host:port/med-audit/.
ZPM installs the application and fixtures but does not download the embedding model, install the separate upload worker’s Python dependencies, or configure an MCP gateway. Use the Compose setup above or provide equivalent prerequisites for document upload. This package has not been published to the public ZPM registry; zpm "install med-insurance-audit" will not install it from the public registry.
After signing in, open FHIR File Intake to upload a test JSON file, inspect its status and recorded stages, and open the associated case. The flow is not a complete IRIS message trace.
FHIRFileIntake is a custom Ens.InboundAdapter in the Production. Every three seconds it scans /durable/iris/private/fhir-inbox/ for UTF-8 FHIR Bundle files up to 1 MiB and sends them through the existing audit workflow. Compose creates the directory; for other deployments, create it with read access for the IRIS user or configure Inbox in the Production. Producers must finish writing a temporary file and atomically rename it in the same directory to *.ready.json. Original files are retained; identical content is deduplicated by SHA-256 and failed files are retained and retried periodically. This demo endpoint is for synthetic data and is not a complete FHIR server.
For example, submit the synthetic fixture inside the Compose container:
docker compose exec -T iris sh -c 'cp /workspace/samples/encounter-bundle.json /durable/iris/private/fhir-inbox/example.tmp && mv /durable/iris/private/fhir-inbox/example.tmp /durable/iris/private/fhir-inbox/example.ready.json'
Results appear in the existing case list. Files are not automatically deleted; operators must arrange their own retention and cleanup. Do not place real patient files in public source directories or images.
synthetic-demo; it has no official policy URL or effective date..txt file and wait for the job to show Imported. The uploaded text and embeddings go to the separate upload-vector table. Use Search uploaded documents to find matching chunks; results require human verification.This walkthrough exercises FHIR, evidence retrieval and manual review without a model key. It is not a replay of a successful AI investigation; without model configuration a live investigation cannot succeed.
The default image contains no LLM API key. Configure an available provider from the authenticated AI Settings page:
Costs: online calls can incur provider charges. The application allows at most 100 investigation attempts per UTC day; this is not a monetary budget, and no cumulative spending cap is enforced. Do not include keys in the repository. Currently the project configures keys through AI Settings/IRIS Wallet; an environment-variable key setup is not implemented. A fresh-install live AI call has not yet been verified for this distribution.
After core initialization, the upload worker starts in the IRIS container. It installs the dependencies in requirements.txt, downloads the pinned ONNX conversion and tokenizer, verifies their SHA-256 hashes and caches them in the volume. healthy applies to core IRIS and can appear before the worker is ready.
docker compose logs --tail=50 iris
Look for UPLOAD_WORKER_STARTING; the upload page also shows a worker heartbeat. If installation or download fails, logs contain UPLOAD_SETUP_DEPENDENCIES_FAILED or UPLOAD_SETUP_MODEL_FAILED, and setup retries every 30 seconds. The core workbench remains usable. The worker supports UTF-8 TXT, Markdown and DOCX up to 2 MB. Search uses Embedded Python in a single Production operation, matching only uploads with the same model hash. Uploaded content is not automatically a policy authority. Do not run the legacy host worker simultaneously for the same instance.
To disable automatic preparation and the worker, set MED_AUDIT_ENABLE_UPLOAD_WORKER=0 before docker compose up -d.
Once IRIS is healthy, run:
python3 scripts/setup-mcp.py
docker compose --profile mcp up -d mcp-gateway
The endpoint is http://127.0.0.1:52885/mcp. The setup creates private configuration under ignored artifacts/mcp-private/; do not commit it. Use the workbench MCP tabs to manage tokens and inspect status and logs. MCP is separate from the upload worker.
With the service healthy, run the core test without a paid model call:
python3 -m unittest discover -s tests -p test_clean_e2e.py -v
node --test tests/test_agent_flow.js tests/test_flow_model.js
For an isolated upload test after the worker is ready:
MED_AUDIT_TEST_UPLOAD=1 python3 -m unittest discover -s tests -p test_upload_e2e.py -v
MED_AUDIT_TEST_UPLOAD_SEARCH=1 python3 -m unittest discover -s tests -p test_upload_search_e2e.py -v
MED_AUDIT_TEST_WORKFLOW=1 python3 -m unittest discover -s tests -p test_workflow_e2e.py -v
These tests create synthetic records in the configured Compose project. To test another project/port, set COMPOSE_PROJECT_NAME and CLEAN_DEMO_BASE consistently. The complete Python suite also needs optional embedding dependencies; it is not required for starting the workbench.
If IRIS is not healthy, check docker compose logs iris and confirm the build 154 image and available resources. If upload jobs remain queued, check the worker heartbeat and download logs; core health alone does not confirm worker readiness. If an AI investigation fails, check the active profile, credentials and provider connectivity; saving a profile does not test a live call.
On ARM64, a fresh volume, FHIR and fixture retrieval, an isolated MCP flow, a synthetic document upload, vector insertion and restart/cache reuse were tested. This does not establish x64 support, production security or reproducible live AI acceptance in a new installation.
.
├── module.xml # ZPM / IPM package manifest
├── preload/ # Vector table initialization before package compilation
├── compose.yaml # IRIS, persistent volume and optional MCP gateway
├── requirements.txt # Container upload worker's Python dependencies
├── README.md / https://github.com/boanerges1227/MedicalInsuranceAudit/blob/main/README.zh-CN.md # English and Chinese documentation
├── https://github.com/boanerges1227/MedicalInsuranceAudit/blob/main/LICENSE # MIT license
├── samples/ # Fictional evidence, query, rule and FHIR fixtures
├── scripts/ # Startup, model download and optional MCP setup
├── src/
│ ├── HD/ # IRIS ObjectScript application and Production
│ │ └── MCP/ # MCP tools, access, service, tokens and monitoring
│ └── national/ # Empty placeholder; tests may use temporary files
├── tests/ # Automated checks; not required to run the app
├── tools/ # Local embedding and document upload worker
└── web/ # Desktop UI, static assets and sample FHIR data
artifacts/ may be created locally for optional MCP configuration and other private runtime files; it is Git-ignored. The upload model, Python environment and database data are stored in the Docker volume, not committed to this directory.
REVIEW_MISMATCH and blocks case closure; it requires manual investigation. Embedded Python search has not yet undergone long-duration load testing.