From 847637f2ed0dd4ae99d351e08c988ac596882a8f Mon Sep 17 00:00:00 2001
From: abrichr Before the write, matching records: {html.escape(before)} {html.escape(str(setup.get('minutes', '?')))} minutes "
+ f"to the first checked write, {len(setup.get('decisions', []))} decisions: {doc['mode'].upper()} writes to {html.escape(doc['upstream'])}. "
+ "Each write was checked against the system of record. None was blocked "
+ "or changed. {doc['writes_seen']} writes seen, in {doc['checks']} checks "
+ "(a record's create, retries and corrections are one check). Added latency per write: median {oh['median']} ms, "
+ f"largest {oh['max']} ms. {doc['mode'].upper()} writes to {html.escape(doc['upstream'])}. "
- "Each write was checked against the system of record. None was blocked "
- "or changed. "
+ for w in c["writes"]
+ )
+ rows = "".join(
+ f"{w['method']} {html.escape(w['path'])} {w['status']} "
+ f"{w['held_ms'] + w['proxy_ms']:.0f} ms "
+ for f in ev.get("fields") or []
+ )
+ if not rows and c["sent"]:
+ rows = "".join(
+ f"{html.escape(f['record'])} "
+ f"{html.escape(f['field'])} {_value(f['sent'])} "
+ f"{_value(f['stored'])} "
+ for k, v in c["sent"].items()
+ )
+ reasons = "".join(f"{html.escape(k)} {_value(v)} {reasons}
"
+ + (
+ "
"
+ if rows
+ else ""
+ )
+ + (
+ f" {rows}Record Field Agent sent "
+ f"Store holds now
"
+ + " {writes}Write Path Reply Added Evidence
"
+ + html.escape(json.dumps(ev, indent=1, sort_keys=True, default=str)[:20000])
+ + "
{title} ({len(items)})
" + "".join(map(_item, items))
+ )
+ ok = [c for c in doc["items"] if c["verdict"] == "CONFIRMED"]
+ if ok:
+ sections.append(
+ f"Confirmed ({len(ok)})
Show
"
+ + "".join(map(_item, ok))
+ + "Setup
{decisions}
"
+ )
+ errors = ""
+ if doc["errors"]:
+ errors = (
+ "Shadow errors
"
+ + html.escape("\n".join(doc["errors"]))
+ + ""
+ )
+ return (
+ ""
+ ""
+ f"Shadow report
"
+ f"Shadow report
"
f"
{doc['writes_seen']} writes seen, in {doc['checks']} checks " "(a record's create, retries and corrections are one check).
" f"Confirmed at first, then refuted when checked again: " + "something changed after the write.
" + "".join(map(_item, late)), + ) ok = [c for c in doc["items"] if c["verdict"] == "CONFIRMED"] if ok: sections.append( @@ -189,7 +258,17 @@ def render_html(doc: dict[str, Any], setup: dict[str, Any] | None = None) -> str f"{doc['writes_seen']} writes seen, in {doc['checks']} checks " "(a record's create, retries and corrections are one check).
" f"Added latency per write: median {oh['median']} ms, " + + ( + "
How they landed wrong:
Added latency per write: median {oh['median']} ms, " f"largest {oh['max']} ms.
" + "".join(sections) + setup_html diff --git a/packages/flow/tests/test_shadow.py b/packages/flow/tests/test_shadow.py index 60e60a9522..05536aa763 100644 --- a/packages/flow/tests/test_shadow.py +++ b/packages/flow/tests/test_shadow.py @@ -279,3 +279,23 @@ def test_a_write_the_route_doesnt_fit_is_uncertain_not_refuted(tmp_path: Path) - (item,) = sh.results()["items"] assert item["verdict"] == "UNCERTAIN" and len(app.received) == 1 assert "doesn't give lname (at surname)" in item["reasons"][0] + + +def test_a_late_write_after_a_sql_confirmation_is_refuted_on_the_recheck( + tmp_path: Path, +) -> None: + db = _db(tmp_path) + app = App(db) + sh = _shadow(tmp_path, app, db) + sh.routes[0].contract.config.frame.database.recheck_after_s = 1 + assert _post(sh.url, BODY)[0] == 201 + sh.flush() + (ep,) = sh.episodes + assert ep.verdict == "CONFIRMED" and ep.recheck_at + con = sqlite3.connect(db) # a background job, a second later + con.execute("UPDATE patient SET phone='9' WHERE id=1") + con.commit() + con.close() + sh.run_rechecks(now=True) + sh.stop() + assert ep.late_verdict == "REFUTED" and sh.results()["late_refuted"] == 1 diff --git a/packages/flow/tests/test_shadow_fhir.py b/packages/flow/tests/test_shadow_fhir.py index 8fd0b8b3df..c004f9af5f 100644 --- a/packages/flow/tests/test_shadow_fhir.py +++ b/packages/flow/tests/test_shadow_fhir.py @@ -11,6 +11,7 @@ import http.client import json import threading +from datetime import datetime, timezone from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path from typing import Any @@ -20,6 +21,7 @@ from openadapt_flow import ensure_record from openadapt_flow.ensure_record import Baseline, EnsureResult, load_contract from openadapt_flow.shadow import Shadow +from openadapt_flow.shadow_report import render_html CONTRACT = ( Path(__file__).resolve().parents[1] @@ -78,8 +80,6 @@ def env(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> dict[str, Any]: calls: dict[str, Any] = {"verify": [], "outcome": "created_verified", "ev": {}} def baseline(contract: Any, params: Any, reader: Any = None) -> Baseline: - from datetime import datetime, timezone - return Baseline(started=datetime.now(timezone.utc), matches={}) def verify(contract: Any, params: Any, base: Any, **kw: Any) -> EnsureResult: @@ -95,6 +95,9 @@ def verify(contract: Any, params: Any, base: Any, **kw: Any) -> EnsureResult: "fetch", lambda self, url, params=None: ({}, {"resourceType": "AllergyIntolerance"}), ) + monkeypatch.setattr( + ensure_record.FhirReader, "server_time", lambda self: datetime.now(timezone.utc) + ) fhir = Fhir() sh = Shadow( upstream=fhir.url, @@ -193,3 +196,24 @@ def test_a_path_outside_ascii_still_goes_through(env: dict[str, Any]) -> None: paths = [p for _, p, _ in env["fhir"].received] assert "/fhir/R4/Observation?n=%E9" in paths assert all(e.verdict for e in sh.episodes) and not sh.errors + + +def test_a_confirmed_write_is_checked_again_and_a_late_change_refutes_it( + env: dict[str, Any], +) -> None: + sh = env["sh"] + _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1")) + sh.flush() + (ep,) = sh.episodes + assert ep.verdict == "CONFIRMED" and ep.recheck_at > 0 + assert sh.results()["rechecks_pending"] == 1 + # Later, a side write by the agent's credential lands outside the proxy. + env["calls"]["outcome"] = "needs_review" + env["calls"]["ev"] = {"agent_writes": 2} + sh.run_rechecks(now=True) + doc = sh.results() + assert ep.late_verdict == "REFUTED" and doc["late_refuted"] == 1 + assert "Landed wrong after the check (1)" in render_html(doc) + # The recheck is told every other write the agent sent, checked or not. + assert env["calls"]["verify"][-1]["declared"] == [] + assert ep.late_reasons[0].startswith("since the first check: ") From 7a49687e3929dc35538815a40483089eb613fb97 Mon Sep 17 00:00:00 2001 From: abrichrFHIR writes to http://127.0.0.1:9743. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
42 writes seen, in 32 checks (a record's create, retries and corrections are one check).
How they landed wrong:
Added latency per write: median 25.3 ms, largest 45.0 ms.
Confirmed at first, then refuted when checked again: something changed after the write.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 41 ms |
{
+ "after": {
+ "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "f6efe421-c750-4162-a8fb-a660629b87d3",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:54:41.735Z",
+ "versionId": "95bc4c4c-b396-408f-b5d2-e6de4332c2b4"
+ },
+ "patient": {
+ "reference": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
+ "stored": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469296.2015731,
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ],
+ "verdict": "REFUTED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8 | (not sent) | none | deceasedBoolean |
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 28 ms |
{
+ "after": {
+ "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "deceasedBoolean": true,
+ "gender": "female",
+ "id": "1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:44:19.423Z",
+ "versionId": "16cadd8a-bfda-4d8e-9529-5dca8b54ab47"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ },
+ {
+ "field": "(not sent)",
+ "record": "Patient/1b68619c-eeb7-4584-9f50-56b67a020ed8",
+ "same": false,
+ "sent": null,
+ "stored": "deceasedBoolean"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 28 ms |
{
+ "after": {
+ "Patient/f39af25c-8aa8-4695-9cba-292a37859abb": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "f39af25c-8aa8-4695-9cba-292a37859abb",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:44:52.162Z",
+ "versionId": "010235c3-2af1-4239-92b4-b7c5c9ce863c"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/f39af25c-8aa8-4695-9cba-292a37859abb",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 2,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 34 ms |
{
+ "after": {
+ "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:46:26.392Z",
+ "versionId": "b3439938-121b-424d-993e-e282979ebc84"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/1a5f5ad9-e8a4-41bc-82d2-8009ae2a893d",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 18 ms |
| PUT | /fhir/R4/AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500 | 200 | 0 ms |
{
+ "after": {
+ "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "02794b85-4b82-4c82-8482-68dc48e2f500",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:50:47.285Z",
+ "versionId": "aa79f6a5-47a3-4d1f-8422-657db2e372ce"
+ },
+ "patient": {
+ "reference": "Patient/c1580976-4160-47e8-a22e-40e164205dff"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500",
+ "same": true,
+ "sent": "Patient/c1580976-4160-47e8-a22e-40e164205dff",
+ "stored": "Patient/c1580976-4160-47e8-a22e-40e164205dff"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/02794b85-4b82-4c82-8482-68dc48e2f500",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 18 ms |
| PUT | /fhir/R4/AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37 | 200 | 0 ms |
{
+ "after": {
+ "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:51:27.105Z",
+ "versionId": "e3f81756-0989-4ce7-b9ea-223096e09d3f"
+ },
+ "patient": {
+ "reference": "Patient/a18f44dd-c797-4d85-b79c-b980e0caae93"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "same": true,
+ "sent": "Patient/a18f44dd-c797-4d85-b79c-b980e0caae93",
+ "stored": "Patient/a18f44dd-c797-4d85-b79c-b980e0caae93"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/5f6c42f4-7f1f-42e6-ae98-3930b8b0eb37",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 23 ms |
{
+ "after": {
+ "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:52:35.053Z",
+ "versionId": "8cbe43b3-ec28-4cb2-aaea-6140481036cb"
+ },
+ "patient": {
+ "reference": "Patient/cdd3a1a0-d8f4-46b6-86d7-370c6e206cbd"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "same": true,
+ "sent": "Patient/cdd3a1a0-d8f4-46b6-86d7-370c6e206cbd",
+ "stored": "Patient/cdd3a1a0-d8f4-46b6-86d7-370c6e206cbd"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/55ea2bda-29ba-4dc5-b9a9-869e3c5a2989",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 2,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 23 ms |
{
+ "after": {
+ "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:53:18.359Z",
+ "versionId": "4da5b723-95c1-4e9d-aea3-0f2ef502cebe"
+ },
+ "patient": {
+ "reference": "Patient/bc2d5e37-08df-4aa1-a840-da514979e7d0"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "same": true,
+ "sent": "Patient/bc2d5e37-08df-4aa1-a840-da514979e7d0",
+ "stored": "Patient/bc2d5e37-08df-4aa1-a840-da514979e7d0"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/4ef678c4-837c-4e88-af5e-0df486ed3f44",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance",
+ "Patient"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 28 ms |
| PUT | /fhir/R4/Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785 | 200 | 0 ms |
{
+ "after": {
+ "Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "74bef10b-6917-42c4-a3d2-ce82b71d3785",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:57:53.217Z",
+ "versionId": "8102c195-e03a-4c9d-bb81-0fb98262389d"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/a424b05d-5798-4ae3-a3b8-c3f40f385504"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785",
+ "same": true,
+ "sent": "Patient/a424b05d-5798-4ae3-a3b8-c3f40f385504",
+ "stored": "Patient/a424b05d-5798-4ae3-a3b8-c3f40f385504"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/74bef10b-6917-42c4-a3d2-ce82b71d3785",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 32 ms |
{
+ "after": {
+ "Appointment/e9f1af78-852a-4bb1-8c16-ef8cef0d1502": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "e9f1af78-852a-4bb1-8c16-ef8cef0d1502",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:58:51.670Z",
+ "versionId": "22a16a4a-f3b6-4548-9702-5bb743646a9b"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/6ba947da-1964-4a3f-acb7-6d323c537065"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/e9f1af78-852a-4bb1-8c16-ef8cef0d1502",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/e9f1af78-852a-4bb1-8c16-ef8cef0d1502",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/e9f1af78-852a-4bb1-8c16-ef8cef0d1502",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/e9f1af78-852a-4bb1-8c16-ef8cef0d1502",
+ "same": true,
+ "sent": "Patient/6ba947da-1964-4a3f-acb7-6d323c537065",
+ "stored": "Patient/6ba947da-1964-4a3f-acb7-6d323c537065"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/e9f1af78-852a-4bb1-8c16-ef8cef0d1502",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 2,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 33 ms |
{
+ "after": {
+ "Appointment/ffe78f6c-1b13-4ff1-9420-93f8abf4410f": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "ffe78f6c-1b13-4ff1-9420-93f8abf4410f",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:59:47.817Z",
+ "versionId": "40c82dad-5c5f-4900-b08e-ce6b463f8476"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/153f34c0-2d59-4863-a5f4-397f7cd707a2"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/ffe78f6c-1b13-4ff1-9420-93f8abf4410f",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/ffe78f6c-1b13-4ff1-9420-93f8abf4410f",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/ffe78f6c-1b13-4ff1-9420-93f8abf4410f",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/ffe78f6c-1b13-4ff1-9420-93f8abf4410f",
+ "same": true,
+ "sent": "Patient/153f34c0-2d59-4863-a5f4-397f7cd707a2",
+ "stored": "Patient/153f34c0-2d59-4863-a5f4-397f7cd707a2"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/ffe78f6c-1b13-4ff1-9420-93f8abf4410f",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 20 ms |
{
+ "after": {
+ "Appointment/dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9",
+ "meta": {
+ "lastUpdated": "2026-10-31T18:01:57.718Z",
+ "versionId": "19f233cf-a4af-41ea-b140-8f2fbf193855"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/d8324f65-4490-42db-bf39-16760e51bd2c"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9",
+ "same": true,
+ "sent": "Patient/d8324f65-4490-42db-bf39-16760e51bd2c",
+ "stored": "Patient/d8324f65-4490-42db-bf39-16760e51bd2c"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/dfe2b9d8-3bb2-4b2f-bf81-ac73345f54d9",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance",
+ "Appointment"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 19 ms |
| PUT | /fhir/R4/Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4 | 200 | 0 ms |
{
+ "after": {
+ "Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "6e4c2ea7-c505-4c8a-9e13-8cd2252520b4",
+ "meta": {
+ "lastUpdated": "2026-10-31T18:02:48.154Z",
+ "versionId": "c1c1c93f-9812-499c-9afc-cce837a6e00f"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/2c05058f-d242-4455-86e5-045830a74f9a"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4",
+ "same": true,
+ "sent": "Patient/2c05058f-d242-4455-86e5-045830a74f9a",
+ "stored": "Patient/2c05058f-d242-4455-86e5-045830a74f9a"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/6e4c2ea7-c505-4c8a-9e13-8cd2252520b4",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 34 ms |
{
+ "after": {
+ "Patient/00000000-0000-4000-8000-000000000000": {
+ "unreadable": "GET http://localhost:9740/fhir/R4/Patient/00000000-0000-4000-8000-000000000000 returned HTTP 404"
+ }
+ },
+ "before": [],
+ "fields": [],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [],
+ "agent_writes": 0,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
+ "after": {
+ "Patient/4b121980-4909-455e-957a-3a432d6d4e79": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "4b121980-4909-455e-957a-3a432d6d4e79",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:41:46.911Z",
+ "versionId": "e808f63f-1525-4301-bacd-31a1cf2aa61a"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/4b121980-4909-455e-957a-3a432d6d4e79",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468520.601135,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 28 ms |
| PUT | /fhir/R4/Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846 | 200 | 0 ms |
{
+ "after": {
+ "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:43:13.130Z",
+ "versionId": "d472e811-6286-4dbd-a446-7c06705f19c9"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468607.523259,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "corrected": true,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "writes_to_record": 2
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 26 ms |
| PUT | /fhir/R4/Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e | 200 | 0 ms |
{
+ "after": {
+ "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:43:50.908Z",
+ "versionId": "b2741223-986f-4b88-be45-0234a6e04ef7"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468644.917254,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "corrected": true,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "writes_to_record": 2
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 504 | 36 ms |
{
+ "after": {},
+ "before": [],
+ "fields": [],
+ "recheck": {
+ "at": 1793468758.2523441,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 504
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 503 | 32 ms |
| POST | /fhir/R4/Patient | 201 | 0 ms |
{
+ "after": {
+ "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:47:14.151Z",
+ "versionId": "49b43284-da97-4655-81b9-c08a48bf4019"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468848.459701,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 503,
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 36 ms |
{
+ "after": {
+ "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA",
+ "use": "home"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:47:52.299Z",
+ "versionId": "ae6eac6a-44c7-4f57-a779-0e9bd67f8f82"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ],
+ "use": "official"
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "use": "home",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468886.125221,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 17 ms |
{
+ "after": {
+ "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "033b2015-ebf8-43f7-84a9-317413585fc5",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:48:55.243Z",
+ "versionId": "87d69fb5-bbf9-44d2-b9a3-8465e95fac07"
+ },
+ "patient": {
+ "reference": "Patient/87937296-fac8-47ce-9987-bffa06b4f393"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5",
+ "same": true,
+ "sent": "Patient/87937296-fac8-47ce-9987-bffa06b4f393",
+ "stored": "Patient/87937296-fac8-47ce-9987-bffa06b4f393"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468949.770093,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 45 ms |
{
+ "after": {
+ "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:50:06.387Z",
+ "versionId": "9fc5644b-6043-4469-88c0-481360399957"
+ },
+ "patient": {
+ "reference": "Patient/84863d51-d495-42d9-ac10-f3989ba8fbae"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "same": true,
+ "sent": "Patient/84863d51-d495-42d9-ac10-f3989ba8fbae",
+ "stored": "Patient/84863d51-d495-42d9-ac10-f3989ba8fbae"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469021.155902,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 24 ms |
| PUT | /fhir/R4/AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04 | 200 | 0 ms |
{
+ "after": {
+ "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "355dd166-6a5a-4858-be99-101f52b48b04",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:52:01.197Z",
+ "versionId": "1ac644e0-f229-4af0-9e19-c80ae21d3898"
+ },
+ "patient": {
+ "reference": "Patient/933cd60e-4756-45a6-bb0f-d19a332b586c"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04",
+ "same": true,
+ "sent": "Patient/933cd60e-4756-45a6-bb0f-d19a332b586c",
+ "stored": "Patient/933cd60e-4756-45a6-bb0f-d19a332b586c"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469136.83149,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "corrected": true,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "writes_to_record": 2
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 42 ms |
{
+ "after": {
+ "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:54:00.273Z",
+ "versionId": "ef1baa1a-9023-4fe6-af5d-21f18bc1ea70"
+ },
+ "patient": {
+ "reference": "Patient/8919a3b1-ccd2-47ae-9b12-de5fa1ff0a10"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "same": true,
+ "sent": "Patient/8919a3b1-ccd2-47ae-9b12-de5fa1ff0a10",
+ "stored": "Patient/8919a3b1-ccd2-47ae-9b12-de5fa1ff0a10"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469255.167888,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 41 ms |
{
+ "after": {
+ "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "f6efe421-c750-4162-a8fb-a660629b87d3",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:54:41.735Z",
+ "versionId": "95bc4c4c-b396-408f-b5d2-e6de4332c2b4"
+ },
+ "patient": {
+ "reference": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
+ "stored": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469296.2015731,
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ],
+ "verdict": "REFUTED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 18 ms |
{
+ "after": {
+ "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:55:16.252Z",
+ "versionId": "77a02008-f721-4eac-b8e1-5b3699394977"
+ },
+ "patient": {
+ "reference": "Patient/ebc9bb8b-a55a-48b6-aa65-6cce722cd364"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "same": true,
+ "sent": "Patient/ebc9bb8b-a55a-48b6-aa65-6cce722cd364",
+ "stored": "Patient/ebc9bb8b-a55a-48b6-aa65-6cce722cd364"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469330.796386,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 38 ms |
{
+ "after": {
+ "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:56:00.765Z",
+ "versionId": "9bb2318a-d91e-454c-a452-0e3cb3383c5b"
+ },
+ "patient": {
+ "reference": "Patient/fb26ec12-0d5c-4494-ba85-1038de9af87d"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "same": true,
+ "sent": "Patient/fb26ec12-0d5c-4494-ba85-1038de9af87d",
+ "stored": "Patient/fb26ec12-0d5c-4494-ba85-1038de9af87d"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793469375.285702,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 1,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 27 ms |
{
+ "after": {
+ "Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "7f6dbbb0-9e20-46c8-83a3-84f567d1de9e",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:56:40.039Z",
+ "versionId": "3f33023c-f9e4-4925-b85f-fb77d4697e12"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/8df9fe89-fd79-43d0-bcc6-70362c212962"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e",
+ "same": true,
+ "sent": "Patient/8df9fe89-fd79-43d0-bcc6-70362c212962",
+ "stored": "Patient/8df9fe89-fd79-43d0-bcc6-70362c212962"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793469415.134672,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 24 ms |
| PUT | /fhir/R4/Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f | 200 | 0 ms |
{
+ "after": {
+ "Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "5d20f967-ab10-4ec9-93d6-922c7603070f",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:58:23.953Z",
+ "versionId": "5ceb29a8-3c8b-4f22-a658-cf2ad08e992f"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/9e276981-0730-4b92-be16-ccf8cfd163c1"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f",
+ "same": true,
+ "sent": "Patient/9e276981-0730-4b92-be16-ccf8cfd163c1",
+ "stored": "Patient/9e276981-0730-4b92-be16-ccf8cfd163c1"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793469521.39901,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "corrected": true,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "writes_to_record": 2
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| status | booked | ||
| start | 2026-11-17T14:00:00Z | ||
| end | 2026-11-17T14:30:00Z | ||
| patient | Patient/7b44ac49-b88e-45d0-95b7-08118312a47d | ||
| practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 504 | 29 ms |
{
+ "after": {},
+ "before": [],
+ "fields": [],
+ "recheck": {
+ "at": 1793469574.956411,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 504
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 33 ms |
{
+ "after": {
+ "Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "2f779ce5-948c-46c2-a18f-3cef786a7cff",
+ "meta": {
+ "lastUpdated": "2026-10-31T18:00:29.827Z",
+ "versionId": "6ce98752-6f2d-4f26-b5c2-e31e6bb73ecd"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/292f116d-479d-46c3-a9b4-f91280a65e1e"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff",
+ "same": true,
+ "sent": "Patient/292f116d-479d-46c3-a9b4-f91280a65e1e",
+ "stored": "Patient/292f116d-479d-46c3-a9b4-f91280a65e1e"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793469644.621291,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 18 ms |
| PUT | /fhir/R4/Appointment/b8324537-f357-4ae1-a350-2006597f71fe | 200 | 0 ms |
{
+ "after": {
+ "Appointment/b8324537-f357-4ae1-a350-2006597f71fe": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "b8324537-f357-4ae1-a350-2006597f71fe",
+ "meta": {
+ "lastUpdated": "2026-10-31T18:01:16.905Z",
+ "versionId": "36ea586c-7229-4b51-be53-bbb12e824904"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/c4d0e4f8-55e3-433d-81e7-808eb99f01dc"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/b8324537-f357-4ae1-a350-2006597f71fe",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/b8324537-f357-4ae1-a350-2006597f71fe",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/b8324537-f357-4ae1-a350-2006597f71fe",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/b8324537-f357-4ae1-a350-2006597f71fe",
+ "same": true,
+ "sent": "Patient/c4d0e4f8-55e3-433d-81e7-808eb99f01dc",
+ "stored": "Patient/c4d0e4f8-55e3-433d-81e7-808eb99f01dc"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/b8324537-f357-4ae1-a350-2006597f71fe",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793469692.076894,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201,
+ 200
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "corrected": true,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "writes_to_record": 2
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 27 ms |
{
+ "after": {
+ "Appointment/94733b93-8a58-43f0-8cdd-d66871649c03": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "94733b93-8a58-43f0-8cdd-d66871649c03",
+ "meta": {
+ "lastUpdated": "2026-10-31T18:03:29.672Z",
+ "versionId": "0b48d7fe-3a37-4da1-ab77-985b87698266"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/52c06423-0869-44e7-ac00-05195a33f737"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/94733b93-8a58-43f0-8cdd-d66871649c03",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/94733b93-8a58-43f0-8cdd-d66871649c03",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/94733b93-8a58-43f0-8cdd-d66871649c03",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/94733b93-8a58-43f0-8cdd-d66871649c03",
+ "same": true,
+ "sent": "Patient/52c06423-0869-44e7-ac00-05195a33f737",
+ "stored": "Patient/52c06423-0869-44e7-ac00-05195a33f737"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/94733b93-8a58-43f0-8cdd-d66871649c03",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793469824.305779,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}FHIR writes to http://127.0.0.1:9743. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
33 writes seen, in 33 checks (a record's create, retries and corrections are one check).
How they landed wrong:
Added latency per write: median 15.2 ms, largest 37.8 ms.
Confirmed at first, then refuted when checked again: something changed after the write.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:38:23.985Z",
+ "versionId": "fb0e98cd-be83-4e5c-b194-29a4ff8bcf85"
+ },
+ "patient": {
+ "reference": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
+ "stored": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468314.547277,
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ],
+ "verdict": "REFUTED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e | birthDate | 1988-04-22 | 1988-02-04 |
| 9 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 27 ms |
{
+ "after": {
+ "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-02-04",
+ "gender": "female",
+ "id": "5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:34:47.647Z",
+ "versionId": "472ac397-ee9b-4290-9765-b1b826da58f2"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": false,
+ "sent": "1988-04-22",
+ "stored": "1988-02-04"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/5ec0827f-c57e-4ebc-b827-fd1cfbf22a3e",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741 | phone | 413-555-0187 | 413-555-0178 |
| 9 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 26 ms |
{
+ "after": {
+ "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:34:58.814Z",
+ "versionId": "42abf29a-4086-487b-b1d9-be01065e7829"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0178"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": false,
+ "sent": "413-555-0187",
+ "stored": "413-555-0178"
+ },
+ {
+ "field": "email",
+ "record": "Patient/f2a3486f-16b7-4e5f-9404-e0e596d24741",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Patient/9aee7cef-16d4-4071-ae32-70619e519863 | (not sent) | none | deceasedBoolean |
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 38 ms |
{
+ "after": {
+ "Patient/9aee7cef-16d4-4071-ae32-70619e519863": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "deceasedBoolean": true,
+ "gender": "female",
+ "id": "9aee7cef-16d4-4071-ae32-70619e519863",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:35:10.014Z",
+ "versionId": "eac4916c-adce-407f-918b-11be1910bfa2"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ },
+ {
+ "field": "(not sent)",
+ "record": "Patient/9aee7cef-16d4-4071-ae32-70619e519863",
+ "same": false,
+ "sent": null,
+ "stored": "deceasedBoolean"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 27 ms |
{
+ "after": {
+ "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:35:21.225Z",
+ "versionId": "4c88bead-2e1a-4087-bacf-d219afefe67c"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/5208bfaf-f51a-4192-a00b-864f5a024d22",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 2,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 27 ms |
{
+ "after": {
+ "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:35:45.896Z",
+ "versionId": "730d70db-63e2-472e-b7ff-75f0d51042fc"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/28d55542-2412-4a3a-98db-44ec3d47ef68",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d | patient | Patient/9b8d64b0-ba6a-4d62-a9a0-86ed0243ef90 | Patient/6784fdcb-56e6-40ea-b1cc-70922257bb3f |
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 15 ms |
{
+ "after": {
+ "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:37:15.031Z",
+ "versionId": "2445768a-72de-4cdd-833d-a81c8b43e57b"
+ },
+ "patient": {
+ "reference": "Patient/6784fdcb-56e6-40ea-b1cc-70922257bb3f"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "same": false,
+ "sent": "Patient/9b8d64b0-ba6a-4d62-a9a0-86ed0243ef90",
+ "stored": "Patient/6784fdcb-56e6-40ea-b1cc-70922257bb3f"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/865e8ac4-d7aa-443d-acbe-d28de9ea834d",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7 | code | 91936005 | 294505008 |
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "294505008",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:37:26.108Z",
+ "versionId": "cf898f95-a1de-4306-b87e-82df26769071"
+ },
+ "patient": {
+ "reference": "Patient/3456fc18-4b69-47ca-8a24-f4521dda15a2"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "same": true,
+ "sent": "Patient/3456fc18-4b69-47ca-8a24-f4521dda15a2",
+ "stored": "Patient/3456fc18-4b69-47ca-8a24-f4521dda15a2"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "same": false,
+ "sent": "91936005",
+ "stored": "294505008"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/3513ca33-e78c-41ba-be7c-d69bb7c2bbc7",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044 | criticality | high | low |
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "low",
+ "id": "a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:37:37.198Z",
+ "versionId": "f6092bf7-27ea-4ae7-84a4-edc33198f53e"
+ },
+ "patient": {
+ "reference": "Patient/0406cc0a-1637-4bf0-8db4-6d10f6af00bd"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "same": true,
+ "sent": "Patient/0406cc0a-1637-4bf0-8db4-6d10f6af00bd",
+ "stored": "Patient/0406cc0a-1637-4bf0-8db4-6d10f6af00bd"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "same": false,
+ "sent": "high",
+ "stored": "low"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/a354a084-99e4-4bf7-9ecb-1d89f84e3044",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:37:48.296Z",
+ "versionId": "54adbc1f-bc75-43a8-8906-0e9c416275bb"
+ },
+ "patient": {
+ "reference": "Patient/64f8fff0-9fbc-4824-bf17-495faabf94c5"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "same": true,
+ "sent": "Patient/64f8fff0-9fbc-4824-bf17-495faabf94c5",
+ "stored": "Patient/64f8fff0-9fbc-4824-bf17-495faabf94c5"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/81d86c79-5738-4193-b20b-c2941c8a8ba0",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 2,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:37:59.467Z",
+ "versionId": "7db8f140-9b7e-4bf5-ae54-fc1820c1a152"
+ },
+ "patient": {
+ "reference": "Patient/18bf765b-1782-42e4-a598-903ce1320905"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "same": true,
+ "sent": "Patient/18bf765b-1782-42e4-a598-903ce1320905",
+ "stored": "Patient/18bf765b-1782-42e4-a598-903ce1320905"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/cf3ef71e-1dc1-4b8f-9d76-1be82507a12d",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance",
+ "Patient"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Appointment/74a46f65-ed89-4ade-b094-54196df60d83 | start | 2026-11-17T14:00:00Z | 2026-11-17T15:00:00Z |
| Appointment/74a46f65-ed89-4ade-b094-54196df60d83 | end | 2026-11-17T14:30:00Z | 2026-11-17T15:30:00Z |
| 3 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+ "after": {
+ "Appointment/74a46f65-ed89-4ade-b094-54196df60d83": {
+ "end": "2026-11-17T15:30:00Z",
+ "id": "74a46f65-ed89-4ade-b094-54196df60d83",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:39:24.774Z",
+ "versionId": "6ec9ae9f-8216-4029-ae28-08554d3f765e"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/afc1adf4-22d3-451f-8d00-15b343bbbe53"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T15:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/74a46f65-ed89-4ade-b094-54196df60d83",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/74a46f65-ed89-4ade-b094-54196df60d83",
+ "same": false,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T15:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/74a46f65-ed89-4ade-b094-54196df60d83",
+ "same": false,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T15:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/74a46f65-ed89-4ade-b094-54196df60d83",
+ "same": true,
+ "sent": "Patient/afc1adf4-22d3-451f-8d00-15b343bbbe53",
+ "stored": "Patient/afc1adf4-22d3-451f-8d00-15b343bbbe53"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/74a46f65-ed89-4ade-b094-54196df60d83",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Appointment/4532d989-2bc6-440e-8610-e5c9be273c96 | practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f | Practitioner/761f7119-2022-41e2-8471-fc7dfa18b328 |
| 4 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 14 ms |
{
+ "after": {
+ "Appointment/4532d989-2bc6-440e-8610-e5c9be273c96": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "4532d989-2bc6-440e-8610-e5c9be273c96",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:39:35.858Z",
+ "versionId": "30027a5d-10c9-449a-a2f4-ca9a84b34886"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/455d5b01-e8ed-40b8-b1df-18b8ffa58d0b"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/761f7119-2022-41e2-8471-fc7dfa18b328"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/4532d989-2bc6-440e-8610-e5c9be273c96",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/4532d989-2bc6-440e-8610-e5c9be273c96",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/4532d989-2bc6-440e-8610-e5c9be273c96",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/4532d989-2bc6-440e-8610-e5c9be273c96",
+ "same": true,
+ "sent": "Patient/455d5b01-e8ed-40b8-b1df-18b8ffa58d0b",
+ "stored": "Patient/455d5b01-e8ed-40b8-b1df-18b8ffa58d0b"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/4532d989-2bc6-440e-8610-e5c9be273c96",
+ "same": false,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/761f7119-2022-41e2-8471-fc7dfa18b328"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+ "after": {
+ "Appointment/945bf20b-1519-4e5d-81fa-b8bc6a49361d": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "945bf20b-1519-4e5d-81fa-b8bc6a49361d",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:39:46.949Z",
+ "versionId": "5c98156b-5d7a-429c-a47c-fc94eb2302e6"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/64106f0e-d8be-4496-98f0-24b966ff0c2d"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/945bf20b-1519-4e5d-81fa-b8bc6a49361d",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/945bf20b-1519-4e5d-81fa-b8bc6a49361d",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/945bf20b-1519-4e5d-81fa-b8bc6a49361d",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/945bf20b-1519-4e5d-81fa-b8bc6a49361d",
+ "same": true,
+ "sent": "Patient/64106f0e-d8be-4496-98f0-24b966ff0c2d",
+ "stored": "Patient/64106f0e-d8be-4496-98f0-24b966ff0c2d"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/945bf20b-1519-4e5d-81fa-b8bc6a49361d",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 2,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+ "after": {
+ "Appointment/946cf955-75d1-4951-ab18-09b3ad989ec7": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "946cf955-75d1-4951-ab18-09b3ad989ec7",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:40:11.310Z",
+ "versionId": "aba6f746-acc0-421e-a025-d30ebf79d1d8"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/2d05ece8-0bdd-42f6-92ea-13eb1f57d300"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/946cf955-75d1-4951-ab18-09b3ad989ec7",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/946cf955-75d1-4951-ab18-09b3ad989ec7",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/946cf955-75d1-4951-ab18-09b3ad989ec7",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/946cf955-75d1-4951-ab18-09b3ad989ec7",
+ "same": true,
+ "sent": "Patient/2d05ece8-0bdd-42f6-92ea-13eb1f57d300",
+ "stored": "Patient/2d05ece8-0bdd-42f6-92ea-13eb1f57d300"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/946cf955-75d1-4951-ab18-09b3ad989ec7",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405 | status | booked | proposed |
| 4 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+ "after": {
+ "Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "26d83825-c911-4e3e-a11e-bcf1212fa405",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:40:35.701Z",
+ "versionId": "83a7afe7-e7bd-4ad6-9e05-60224c1ba042"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/f264c3a5-4bff-45c1-85a9-2c11b6485ac4"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "proposed"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405",
+ "same": false,
+ "sent": "booked",
+ "stored": "proposed"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405",
+ "same": true,
+ "sent": "Patient/f264c3a5-4bff-45c1-85a9-2c11b6485ac4",
+ "stored": "Patient/f264c3a5-4bff-45c1-85a9-2c11b6485ac4"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/26d83825-c911-4e3e-a11e-bcf1212fa405",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 16 ms |
{
+ "after": {
+ "Appointment/ec124981-b787-47de-8fde-01fa30793779": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "ec124981-b787-47de-8fde-01fa30793779",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:40:46.811Z",
+ "versionId": "ac20b2d5-81fe-48c1-b4df-6767954a3b29"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/342b2a50-b8f2-44cc-aa39-54c0d91c5b70"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/ec124981-b787-47de-8fde-01fa30793779",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/ec124981-b787-47de-8fde-01fa30793779",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/ec124981-b787-47de-8fde-01fa30793779",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/ec124981-b787-47de-8fde-01fa30793779",
+ "same": true,
+ "sent": "Patient/342b2a50-b8f2-44cc-aa39-54c0d91c5b70",
+ "stored": "Patient/342b2a50-b8f2-44cc-aa39-54c0d91c5b70"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/ec124981-b787-47de-8fde-01fa30793779",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance",
+ "Appointment"
+ ],
+ "agent_writes": 2,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| Appointment/1392f448-3384-448b-978a-f7fcacbea6cc | patient | Patient/95839c97-77e2-47e4-92a0-649465992232 | Patient/e65491a6-51fb-41ed-b8a5-a7093f1364f1 |
| 4 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 21 ms |
{
+ "after": {
+ "Appointment/1392f448-3384-448b-978a-f7fcacbea6cc": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "1392f448-3384-448b-978a-f7fcacbea6cc",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:40:58.007Z",
+ "versionId": "68d4426a-efbe-4d58-b183-91ce217976cc"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/e65491a6-51fb-41ed-b8a5-a7093f1364f1"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/1392f448-3384-448b-978a-f7fcacbea6cc",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/1392f448-3384-448b-978a-f7fcacbea6cc",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/1392f448-3384-448b-978a-f7fcacbea6cc",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/1392f448-3384-448b-978a-f7fcacbea6cc",
+ "same": false,
+ "sent": "Patient/95839c97-77e2-47e4-92a0-649465992232",
+ "stored": "Patient/e65491a6-51fb-41ed-b8a5-a7093f1364f1"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/1392f448-3384-448b-978a-f7fcacbea6cc",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 503 | 24 ms |
{
+ "after": {},
+ "before": [],
+ "fields": [],
+ "replies": [
+ 503
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [],
+ "agent_writes": 0,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 25 ms |
{
+ "after": {
+ "Patient/00000000-0000-4000-8000-000000000000": {
+ "unreadable": "GET http://localhost:9740/fhir/R4/Patient/00000000-0000-4000-8000-000000000000 returned HTTP 404"
+ }
+ },
+ "before": [],
+ "fields": [],
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 0,
+ "agent_write_types": [],
+ "agent_writes": 0,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "needs_review",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
+ "after": {
+ "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:34:13.067Z",
+ "versionId": "aab4ffa4-223a-40c4-ace7-9e514b5ab64f"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468063.708895,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
+ "after": {
+ "Patient/e1464f85-5c70-4098-a25d-b8278440c469": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "e1464f85-5c70-4098-a25d-b8278440c469",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:34:34.272Z",
+ "versionId": "eb28310d-f001-4e00-8899-6d0bae621722"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/e1464f85-5c70-4098-a25d-b8278440c469",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468084.9708538,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 504 | 27 ms |
{
+ "after": {},
+ "before": [],
+ "fields": [],
+ "recheck": {
+ "at": 1793468143.1951602,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 504
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 25 ms |
{
+ "after": {
+ "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "14 Birch Lane"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1988-04-22",
+ "gender": "female",
+ "id": "5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:36:16.346Z",
+ "versionId": "ddc6da33-ca88-444f-8a98-1606f513e1a3"
+ },
+ "name": [
+ {
+ "family": "Okafor",
+ "given": [
+ "Lena"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-0187"
+ },
+ {
+ "system": "email",
+ "value": "lena.okafor@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "Lena",
+ "stored": "Lena"
+ },
+ {
+ "field": "family",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "Okafor",
+ "stored": "Okafor"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "1988-04-22",
+ "stored": "1988-04-22"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "14 Birch Lane",
+ "stored": "14 Birch Lane"
+ },
+ {
+ "field": "city",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "413-555-0187",
+ "stored": "413-555-0187"
+ },
+ {
+ "field": "email",
+ "record": "Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed",
+ "same": true,
+ "sent": "lena.okafor@example.org",
+ "stored": "lena.okafor@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793468186.973973,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:36:40.732Z",
+ "versionId": "72ac3f75-d96b-4b60-bb1b-55f97dd00543"
+ },
+ "patient": {
+ "reference": "Patient/dfb25df9-fb95-4b8e-a887-910a281e3268"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "same": true,
+ "sent": "Patient/dfb25df9-fb95-4b8e-a887-910a281e3268",
+ "stored": "Patient/dfb25df9-fb95-4b8e-a887-910a281e3268"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468211.310466,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:37:01.805Z",
+ "versionId": "067d082b-c819-460d-80ca-955e5ff17406"
+ },
+ "patient": {
+ "reference": "Patient/c09b9a32-c888-4bf9-bce6-c529d59da0ab"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "same": true,
+ "sent": "Patient/c09b9a32-c888-4bf9-bce6-c529d59da0ab",
+ "stored": "Patient/c09b9a32-c888-4bf9-bce6-c529d59da0ab"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468232.358717,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 16 ms |
{
+ "after": {
+ "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:38:10.699Z",
+ "versionId": "cf70af12-432f-4431-aefe-3cf25d265019"
+ },
+ "patient": {
+ "reference": "Patient/deb45d64-180e-467f-8f78-6723c21a5daa"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "same": true,
+ "sent": "Patient/deb45d64-180e-467f-8f78-6723c21a5daa",
+ "stored": "Patient/deb45d64-180e-467f-8f78-6723c21a5daa"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468301.31057,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 1,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:38:23.985Z",
+ "versionId": "fb0e98cd-be83-4e5c-b194-29a4ff8bcf85"
+ },
+ "patient": {
+ "reference": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
+ "stored": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468314.547277,
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ],
+ "verdict": "REFUTED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+ "after": {
+ "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:38:37.212Z",
+ "versionId": "fd7fa505-d7c2-46b1-b7a1-64640473a5e2"
+ },
+ "patient": {
+ "reference": "Patient/6aeabdac-2c10-48c9-a88b-038ddea0eaf4"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "same": true,
+ "sent": "Patient/6aeabdac-2c10-48c9-a88b-038ddea0eaf4",
+ "stored": "Patient/6aeabdac-2c10-48c9-a88b-038ddea0eaf4"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468327.772285,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 15 ms |
{
+ "after": {
+ "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6": {
+ "clinicalStatus": {
+ "coding": [
+ {
+ "code": "active",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "code": "91936005",
+ "display": "Allergy to penicillin",
+ "system": "http://snomed.info/sct"
+ }
+ ]
+ },
+ "criticality": "high",
+ "id": "4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:38:50.447Z",
+ "versionId": "dae62445-1fe5-4d2d-80dd-75a41e974f9a"
+ },
+ "patient": {
+ "reference": "Patient/aeb90990-a26a-4aca-8433-cf0843af8cd1"
+ },
+ "resourceType": "AllergyIntolerance",
+ "verificationStatus": {
+ "coding": [
+ {
+ "code": "confirmed",
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
+ }
+ ]
+ }
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "patient",
+ "record": "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "same": true,
+ "sent": "Patient/aeb90990-a26a-4aca-8433-cf0843af8cd1",
+ "stored": "Patient/aeb90990-a26a-4aca-8433-cf0843af8cd1"
+ },
+ {
+ "field": "code_system",
+ "record": "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "same": true,
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct"
+ },
+ {
+ "field": "code",
+ "record": "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "same": true,
+ "sent": "91936005",
+ "stored": "91936005"
+ },
+ {
+ "field": "criticality",
+ "record": "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "same": true,
+ "sent": "high",
+ "stored": "high"
+ },
+ {
+ "field": "clinical_status",
+ "record": "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "same": true,
+ "sent": "active",
+ "stored": "active"
+ },
+ {
+ "field": "verification_status",
+ "record": "AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6",
+ "same": true,
+ "sent": "confirmed",
+ "stored": "confirmed"
+ }
+ ],
+ "recheck": {
+ "at": 1793468341.029949,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 1,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+ "after": {
+ "Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "197dd22f-855e-4f1a-8f05-871faeb6f055",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:39:03.697Z",
+ "versionId": "b4c47960-29a2-407e-b330-991d99441da1"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/2d5cb62c-3cb8-4854-9b34-d838fe6f8118"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055",
+ "same": true,
+ "sent": "Patient/2d5cb62c-3cb8-4854-9b34-d838fe6f8118",
+ "stored": "Patient/2d5cb62c-3cb8-4854-9b34-d838fe6f8118"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793468354.2606888,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| status | booked | ||
| start | 2026-11-17T14:00:00Z | ||
| end | 2026-11-17T14:30:00Z | ||
| patient | Patient/8b929879-1320-43c8-b9a7-9a8e5ecf09b4 | ||
| practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 504 | 14 ms |
{
+ "after": {},
+ "before": [],
+ "fields": [],
+ "recheck": {
+ "at": 1793468408.631721,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 504
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+ "after": {
+ "Appointment/ec933615-1112-4693-9f19-eb920fc35511": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "ec933615-1112-4693-9f19-eb920fc35511",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:40:22.467Z",
+ "versionId": "40d96d54-9d4b-448e-b52d-2346109ce81a"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/da24ba82-6f67-4789-83f0-bbfd36ac76dd"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/ec933615-1112-4693-9f19-eb920fc35511",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/ec933615-1112-4693-9f19-eb920fc35511",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/ec933615-1112-4693-9f19-eb920fc35511",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/ec933615-1112-4693-9f19-eb920fc35511",
+ "same": true,
+ "sent": "Patient/da24ba82-6f67-4789-83f0-bbfd36ac76dd",
+ "stored": "Patient/da24ba82-6f67-4789-83f0-bbfd36ac76dd"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/ec933615-1112-4693-9f19-eb920fc35511",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793468433.013375,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 1,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 20 ms |
{
+ "after": {
+ "Appointment/77a36797-5b44-4f4c-9806-21affee4c890": {
+ "end": "2026-11-17T14:30:00Z",
+ "id": "77a36797-5b44-4f4c-9806-21affee4c890",
+ "meta": {
+ "lastUpdated": "2026-10-31T17:41:09.105Z",
+ "versionId": "ff0b3e47-a0cf-48a0-bc58-22a2beab8bd3"
+ },
+ "participant": [
+ {
+ "actor": {
+ "reference": "Patient/e38fdac4-2cf1-4ef3-87d9-54cc3d908d06"
+ },
+ "status": "accepted"
+ },
+ {
+ "actor": {
+ "reference": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ },
+ "status": "accepted"
+ }
+ ],
+ "resourceType": "Appointment",
+ "start": "2026-11-17T14:00:00Z",
+ "status": "booked"
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "status",
+ "record": "Appointment/77a36797-5b44-4f4c-9806-21affee4c890",
+ "same": true,
+ "sent": "booked",
+ "stored": "booked"
+ },
+ {
+ "field": "start",
+ "record": "Appointment/77a36797-5b44-4f4c-9806-21affee4c890",
+ "same": true,
+ "sent": "2026-11-17T14:00:00Z",
+ "stored": "2026-11-17T14:00:00Z"
+ },
+ {
+ "field": "end",
+ "record": "Appointment/77a36797-5b44-4f4c-9806-21affee4c890",
+ "same": true,
+ "sent": "2026-11-17T14:30:00Z",
+ "stored": "2026-11-17T14:30:00Z"
+ },
+ {
+ "field": "patient",
+ "record": "Appointment/77a36797-5b44-4f4c-9806-21affee4c890",
+ "same": true,
+ "sent": "Patient/e38fdac4-2cf1-4ef3-87d9-54cc3d908d06",
+ "stored": "Patient/e38fdac4-2cf1-4ef3-87d9-54cc3d908d06"
+ },
+ {
+ "field": "practitioner",
+ "record": "Appointment/77a36797-5b44-4f4c-9806-21affee4c890",
+ "same": true,
+ "sent": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f",
+ "stored": "Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f"
+ }
+ ],
+ "recheck": {
+ "at": 1793468479.643488,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Appointment"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}FHIR writes to http://127.0.0.1:9740. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
1 writes seen, in 1 checks (a record's create, retries and corrections are one check).
Added latency per write: median 212.4 ms, largest 212.4 ms.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 212 ms |
{
+ "after": {
+ "Patient/88883a88-d92d-4807-99a1-12dba9fe4732": {
+ "address": [
+ {
+ "city": "Springfield",
+ "line": [
+ "9 Elm Street"
+ ],
+ "postalCode": "01103",
+ "state": "MA"
+ }
+ ],
+ "birthDate": "1959-07-19",
+ "gender": "female",
+ "id": "88883a88-d92d-4807-99a1-12dba9fe4732",
+ "meta": {
+ "lastUpdated": "2026-10-31T18:06:09.883Z",
+ "versionId": "19a18b61-6837-4a96-88d5-d74d9896342c"
+ },
+ "name": [
+ {
+ "family": "Setup9969",
+ "given": [
+ "Imani"
+ ]
+ }
+ ],
+ "resourceType": "Patient",
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "413-555-9969"
+ },
+ {
+ "system": "email",
+ "value": "imani.setup9969@example.org"
+ }
+ ]
+ }
+ },
+ "before": [],
+ "fields": [
+ {
+ "field": "given",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "Imani",
+ "stored": "Imani"
+ },
+ {
+ "field": "family",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "Setup9969",
+ "stored": "Setup9969"
+ },
+ {
+ "field": "birthDate",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "1959-07-19",
+ "stored": "1959-07-19"
+ },
+ {
+ "field": "gender",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "female",
+ "stored": "female"
+ },
+ {
+ "field": "line",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "9 Elm Street",
+ "stored": "9 Elm Street"
+ },
+ {
+ "field": "city",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "Springfield",
+ "stored": "Springfield"
+ },
+ {
+ "field": "state",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "MA",
+ "stored": "MA"
+ },
+ {
+ "field": "postalCode",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "01103",
+ "stored": "01103"
+ },
+ {
+ "field": "phone",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "413-555-9969",
+ "stored": "413-555-9969"
+ },
+ {
+ "field": "email",
+ "record": "Patient/88883a88-d92d-4807-99a1-12dba9fe4732",
+ "same": true,
+ "sent": "imani.setup9969@example.org",
+ "stored": "imani.setup9969@example.org"
+ }
+ ],
+ "recheck": {
+ "at": 1793469983.4868999,
+ "reasons": [
+ "since the first check: one record was already the person"
+ ],
+ "verdict": "CONFIRMED"
+ },
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "after_matches": 1,
+ "agent_write_types": [
+ "Patient"
+ ],
+ "agent_writes": 1,
+ "before_matches": 0,
+ "other_writes": 0,
+ "outcome": "created_verified",
+ "unattributed_writes": 0,
+ "unlogged_writes": 0
+ }
+}FHIR writes to http://127.0.0.1:9743. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
42 writes seen, in 32 checks (a record's create, retries and corrections are one check).
How they landed wrong:
Added latency per write: median 25.3 ms, largest 45.0 ms.
Confirmed at first, then refuted when checked again: something changed after the write.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 41 ms |
{
+Shadow report
FHIR writes to http://127.0.0.1:9743. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
42 writes seen, in 32 checks (a record's create, retries and corrections are one check).
13Refuted1Uncertain18ConfirmedRechecks of confirmed writes: 1 refuted.
How they landed wrong:
Added latency per write: median 25.3 ms, largest 45.0 ms.
Confirmed at first, then refuted when checked again: something changed after the write.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 41 ms |
{
"after": {
"AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3": {
"clinicalStatus": {
@@ -1345,7 +1345,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
"after": {
"Patient/4b121980-4909-455e-957a-3a432d6d4e79": {
"address": [
@@ -1482,7 +1482,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 28 ms |
| PUT | /fhir/R4/Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846 | 200 | 0 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 28 ms |
| PUT | /fhir/R4/Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846 | 200 | 0 ms |
{
"after": {
"Patient/7768f5c4-277b-4ea1-9c8c-1195136ae846": {
"address": [
@@ -1622,7 +1622,7 @@
"unlogged_writes": 0,
"writes_to_record": 2
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 26 ms |
| PUT | /fhir/R4/Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e | 200 | 0 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 26 ms |
| PUT | /fhir/R4/Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e | 200 | 0 ms |
{
"after": {
"Patient/f35663e7-da89-4b6d-b3a8-f8adab52b83e": {
"address": [
@@ -1762,7 +1762,7 @@
"unlogged_writes": 0,
"writes_to_record": 2
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 504 | 36 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 504 | 36 ms |
{
"after": {},
"before": [],
"fields": [],
@@ -1788,7 +1788,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 503 | 32 ms |
| POST | /fhir/R4/Patient | 201 | 0 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 503 | 32 ms |
| POST | /fhir/R4/Patient | 201 | 0 ms |
{
"after": {
"Patient/31e5780b-ccd4-400e-84e6-9d6e823b57fd": {
"address": [
@@ -1926,7 +1926,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 36 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 36 ms |
{
"after": {
"Patient/3e5de50e-400c-4a1d-8be5-1e78dd43c9e4": {
"address": [
@@ -2065,7 +2065,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 17 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 17 ms |
{
"after": {
"AllergyIntolerance/033b2015-ebf8-43f7-84a9-317413585fc5": {
"clinicalStatus": {
@@ -2172,7 +2172,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 45 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 45 ms |
{
"after": {
"AllergyIntolerance/bb08284d-407f-46b4-a9b0-5f0c192f779d": {
"clinicalStatus": {
@@ -2278,7 +2278,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 24 ms |
| PUT | /fhir/R4/AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04 | 200 | 0 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 24 ms |
| PUT | /fhir/R4/AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04 | 200 | 0 ms |
{
"after": {
"AllergyIntolerance/355dd166-6a5a-4858-be99-101f52b48b04": {
"clinicalStatus": {
@@ -2387,7 +2387,7 @@
"unlogged_writes": 0,
"writes_to_record": 2
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 42 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 42 ms |
{
"after": {
"AllergyIntolerance/64ea78c9-0de8-450c-b773-9a23f8bbbd73": {
"clinicalStatus": {
@@ -2494,117 +2494,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 41 ms |
{
- "after": {
- "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3": {
- "clinicalStatus": {
- "coding": [
- {
- "code": "active",
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
- }
- ]
- },
- "code": {
- "coding": [
- {
- "code": "91936005",
- "system": "http://snomed.info/sct"
- }
- ]
- },
- "criticality": "high",
- "id": "f6efe421-c750-4162-a8fb-a660629b87d3",
- "meta": {
- "lastUpdated": "2026-10-31T17:54:41.735Z",
- "versionId": "95bc4c4c-b396-408f-b5d2-e6de4332c2b4"
- },
- "patient": {
- "reference": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
- },
- "resourceType": "AllergyIntolerance",
- "verificationStatus": {
- "coding": [
- {
- "code": "confirmed",
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
- }
- ]
- }
- }
- },
- "before": [],
- "fields": [
- {
- "field": "patient",
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "same": true,
- "sent": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
- "stored": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
- },
- {
- "field": "code_system",
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "same": true,
- "sent": "http://snomed.info/sct",
- "stored": "http://snomed.info/sct"
- },
- {
- "field": "code",
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "same": true,
- "sent": "91936005",
- "stored": "91936005"
- },
- {
- "field": "criticality",
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "same": true,
- "sent": "high",
- "stored": "high"
- },
- {
- "field": "clinical_status",
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "same": true,
- "sent": "active",
- "stored": "active"
- },
- {
- "field": "verification_status",
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "same": true,
- "sent": "confirmed",
- "stored": "confirmed"
- }
- ],
- "recheck": {
- "at": 1793469296.2015731,
- "reasons": [
- "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
- "since the first check: wrong or missing: patient",
- "since the first check: the created record is not the person",
- "since the first check: 1 other record(s) are now also the person",
- "since the first check: the created record does not come back from a search"
- ],
- "verdict": "REFUTED"
- },
- "replies": [
- 201
- ],
- "verifier": {
- "after_matches": 1,
- "agent_write_types": [
- "AllergyIntolerance"
- ],
- "agent_writes": 1,
- "before_matches": 0,
- "other_writes": 0,
- "outcome": "created_verified",
- "unattributed_writes": 0,
- "unlogged_writes": 0
- }
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 18 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 18 ms |
{
"after": {
"AllergyIntolerance/ea68955b-2f4e-488f-b92a-3e70f9a43d2a": {
"clinicalStatus": {
@@ -2711,7 +2601,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 38 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 38 ms |
{
"after": {
"AllergyIntolerance/dd311a99-7fe2-4b2c-bb3d-151a293a555e": {
"clinicalStatus": {
@@ -2817,7 +2707,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 27 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 27 ms |
{
"after": {
"Appointment/7f6dbbb0-9e20-46c8-83a3-84f567d1de9e": {
"end": "2026-11-17T14:30:00Z",
@@ -2905,7 +2795,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 24 ms |
| PUT | /fhir/R4/Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f | 200 | 0 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 24 ms |
| PUT | /fhir/R4/Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f | 200 | 0 ms |
{
"after": {
"Appointment/5d20f967-ab10-4ec9-93d6-922c7603070f": {
"end": "2026-11-17T14:30:00Z",
@@ -2996,7 +2886,7 @@
"unlogged_writes": 0,
"writes_to_record": 2
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| status | booked | ||
| start | 2026-11-17T14:00:00Z | ||
| end | 2026-11-17T14:30:00Z | ||
| patient | Patient/7b44ac49-b88e-45d0-95b7-08118312a47d | ||
| practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 504 | 29 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| status | booked | ||
| start | 2026-11-17T14:00:00Z | ||
| end | 2026-11-17T14:30:00Z | ||
| patient | Patient/7b44ac49-b88e-45d0-95b7-08118312a47d | ||
| practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 504 | 29 ms |
{
"after": {},
"before": [],
"fields": [],
@@ -3022,7 +2912,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 33 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 33 ms |
{
"after": {
"Appointment/2f779ce5-948c-46c2-a18f-3cef786a7cff": {
"end": "2026-11-17T14:30:00Z",
@@ -3110,7 +3000,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 18 ms |
| PUT | /fhir/R4/Appointment/b8324537-f357-4ae1-a350-2006597f71fe | 200 | 0 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 18 ms |
| PUT | /fhir/R4/Appointment/b8324537-f357-4ae1-a350-2006597f71fe | 200 | 0 ms |
{
"after": {
"Appointment/b8324537-f357-4ae1-a350-2006597f71fe": {
"end": "2026-11-17T14:30:00Z",
@@ -3201,7 +3091,7 @@
"unlogged_writes": 0,
"writes_to_record": 2
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 27 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 27 ms |
{
"after": {
"Appointment/94733b93-8a58-43f0-8cdd-d66871649c03": {
"end": "2026-11-17T14:30:00Z",
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/claude/shadow/report.json b/packages/flow/benchmark/fhir_medplum/public/results/shadow/claude/shadow/report.json
index 21f99f4a8f..2f4723a731 100644
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/claude/shadow/report.json
+++ b/packages/flow/benchmark/fhir_medplum/public/results/shadow/claude/shadow/report.json
@@ -7,9 +7,9 @@
"writes_seen": 42,
"checks": 32,
"counts": {
- "REFUTED": 12,
+ "REFUTED": 13,
"UNCERTAIN": 1,
- "CONFIRMED": 19,
+ "CONFIRMED": 18,
"PENDING": 0
},
"late_refuted": 1,
@@ -18,7 +18,8 @@
"another record changed": 4,
"saved as another record first, then corrected": 4,
"saved more than once": 3,
- "holds a value the agent didn't send": 1
+ "holds a value the agent didn't send": 1,
+ "changed after the check": 1
},
"overhead_ms": {
"held_for_baseline": {
@@ -205,7 +206,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 5,
@@ -373,7 +375,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 7,
@@ -540,7 +543,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 13,
@@ -683,7 +687,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 14,
@@ -825,7 +830,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 16,
@@ -958,7 +964,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 17,
@@ -1091,7 +1098,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 23,
@@ -1214,7 +1222,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 25,
@@ -1328,7 +1337,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 27,
@@ -1441,7 +1451,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 30,
@@ -1555,7 +1566,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 31,
@@ -1678,7 +1690,161 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
+ },
+ {
+ "id": 19,
+ "kind": "fhir",
+ "name": "AllergyIntolerance",
+ "verdict": "CONFIRMED",
+ "reasons": [
+ "created once, every value read back"
+ ],
+ "sent": {
+ "patient": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
+ "code_system": "http://snomed.info/sct",
+ "code": "91936005",
+ "criticality": "high",
+ "clinical_status": "active",
+ "verification_status": "confirmed"
+ },
+ "records": [
+ "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3"
+ ],
+ "writes": [
+ {
+ "seq": 25,
+ "method": "POST",
+ "path": "/fhir/R4/AllergyIntolerance",
+ "status": 201,
+ "held_ms": 40.4,
+ "proxy_ms": 0.3,
+ "error": ""
+ }
+ ],
+ "evidence": {
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "outcome": "created_verified",
+ "before_matches": 0,
+ "after_matches": 1,
+ "agent_writes": 1,
+ "other_writes": 0,
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ]
+ },
+ "before": [],
+ "after": {
+ "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3": {
+ "resourceType": "AllergyIntolerance",
+ "patient": {
+ "reference": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
+ },
+ "code": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "91936005"
+ }
+ ]
+ },
+ "criticality": "high",
+ "clinicalStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
+ "code": "active"
+ }
+ ]
+ },
+ "verificationStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
+ "code": "confirmed"
+ }
+ ]
+ },
+ "id": "f6efe421-c750-4162-a8fb-a660629b87d3",
+ "meta": {
+ "versionId": "95bc4c4c-b396-408f-b5d2-e6de4332c2b4",
+ "lastUpdated": "2026-10-31T17:54:41.735Z"
+ }
+ }
+ },
+ "fields": [
+ {
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "field": "patient",
+ "sent": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
+ "stored": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "field": "code_system",
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "field": "code",
+ "sent": "91936005",
+ "stored": "91936005",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "field": "criticality",
+ "sent": "high",
+ "stored": "high",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "field": "clinical_status",
+ "sent": "active",
+ "stored": "active",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
+ "field": "verification_status",
+ "sent": "confirmed",
+ "stored": "confirmed",
+ "same": true
+ }
+ ],
+ "recheck": {
+ "verdict": "REFUTED",
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ],
+ "at": 1793469296.2015731
+ }
+ },
+ "late": {
+ "verdict": "REFUTED",
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ]
+ },
+ "final": "REFUTED"
},
{
"id": 10,
@@ -1737,7 +1903,8 @@
},
"fields": []
},
- "late": null
+ "late": null,
+ "final": "UNCERTAIN"
},
{
"id": 1,
@@ -1916,7 +2083,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 2,
@@ -2107,7 +2275,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 3,
@@ -2298,7 +2467,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 6,
@@ -2365,7 +2535,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 8,
@@ -2555,7 +2726,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 9,
@@ -2736,7 +2908,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 11,
@@ -2881,7 +3054,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 12,
@@ -3025,7 +3199,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 15,
@@ -3181,7 +3356,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 18,
@@ -3326,159 +3502,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
- },
- {
- "id": 19,
- "kind": "fhir",
- "name": "AllergyIntolerance",
- "verdict": "CONFIRMED",
- "reasons": [
- "created once, every value read back"
- ],
- "sent": {
- "patient": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
- "code_system": "http://snomed.info/sct",
- "code": "91936005",
- "criticality": "high",
- "clinical_status": "active",
- "verification_status": "confirmed"
},
- "records": [
- "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3"
- ],
- "writes": [
- {
- "seq": 25,
- "method": "POST",
- "path": "/fhir/R4/AllergyIntolerance",
- "status": 201,
- "held_ms": 40.4,
- "proxy_ms": 0.3,
- "error": ""
- }
- ],
- "evidence": {
- "replies": [
- 201
- ],
- "verifier": {
- "outcome": "created_verified",
- "before_matches": 0,
- "after_matches": 1,
- "agent_writes": 1,
- "other_writes": 0,
- "unattributed_writes": 0,
- "unlogged_writes": 0,
- "agent_write_types": [
- "AllergyIntolerance"
- ]
- },
- "before": [],
- "after": {
- "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3": {
- "resourceType": "AllergyIntolerance",
- "patient": {
- "reference": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e"
- },
- "code": {
- "coding": [
- {
- "system": "http://snomed.info/sct",
- "code": "91936005"
- }
- ]
- },
- "criticality": "high",
- "clinicalStatus": {
- "coding": [
- {
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
- "code": "active"
- }
- ]
- },
- "verificationStatus": {
- "coding": [
- {
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
- "code": "confirmed"
- }
- ]
- },
- "id": "f6efe421-c750-4162-a8fb-a660629b87d3",
- "meta": {
- "versionId": "95bc4c4c-b396-408f-b5d2-e6de4332c2b4",
- "lastUpdated": "2026-10-31T17:54:41.735Z"
- }
- }
- },
- "fields": [
- {
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "field": "patient",
- "sent": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
- "stored": "Patient/0630c8ac-8d76-4cbd-87dd-2c696e2d050e",
- "same": true
- },
- {
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "field": "code_system",
- "sent": "http://snomed.info/sct",
- "stored": "http://snomed.info/sct",
- "same": true
- },
- {
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "field": "code",
- "sent": "91936005",
- "stored": "91936005",
- "same": true
- },
- {
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "field": "criticality",
- "sent": "high",
- "stored": "high",
- "same": true
- },
- {
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "field": "clinical_status",
- "sent": "active",
- "stored": "active",
- "same": true
- },
- {
- "record": "AllergyIntolerance/f6efe421-c750-4162-a8fb-a660629b87d3",
- "field": "verification_status",
- "sent": "confirmed",
- "stored": "confirmed",
- "same": true
- }
- ],
- "recheck": {
- "verdict": "REFUTED",
- "reasons": [
- "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
- "since the first check: wrong or missing: patient",
- "since the first check: the created record is not the person",
- "since the first check: 1 other record(s) are now also the person",
- "since the first check: the created record does not come back from a search"
- ],
- "at": 1793469296.2015731
- }
- },
- "late": {
- "verdict": "REFUTED",
- "reasons": [
- "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
- "since the first check: wrong or missing: patient",
- "since the first check: the created record is not the person",
- "since the first check: 1 other record(s) are now also the person",
- "since the first check: the created record does not come back from a search"
- ]
- }
+ "final": "CONFIRMED"
},
{
"id": 20,
@@ -3623,7 +3648,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 21,
@@ -3767,7 +3793,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 22,
@@ -3892,7 +3919,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 24,
@@ -4029,7 +4057,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 26,
@@ -4091,7 +4120,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 28,
@@ -4216,7 +4246,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 29,
@@ -4353,7 +4384,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 32,
@@ -4478,7 +4510,9 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
}
- ]
+ ],
+ "late_uncertain": 0
}
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.html b/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.html
index cf5b0250d7..d672464ff1 100644
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.html
+++ b/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.html
@@ -8,7 +8,7 @@
table{border-collapse:collapse;width:100%;margin:8px 0}td,th{border-bottom:1px solid var(--line);padding:4px 8px;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.item{border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin:12px 0}.diff{color:var(--bad);font-weight:600}
details{margin-top:6px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
-Shadow report
FHIR writes to http://127.0.0.1:9743. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
33 writes seen, in 33 checks (a record's create, retries and corrections are one check).
17Refuted2Uncertain14Confirmed1Refuted on recheckHow they landed wrong:
Added latency per write: median 15.2 ms, largest 37.8 ms.
Confirmed at first, then refuted when checked again: something changed after the write.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+Shadow report
FHIR writes to http://127.0.0.1:9743. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
33 writes seen, in 33 checks (a record's create, retries and corrections are one check).
18Refuted2Uncertain13ConfirmedRechecks of confirmed writes: 1 refuted.
How they landed wrong:
Added latency per write: median 15.2 ms, largest 37.8 ms.
Confirmed at first, then refuted when checked again: something changed after the write.
| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
"after": {
"AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9": {
"clinicalStatus": {
@@ -1879,7 +1879,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
"after": {
"Patient/5981c212-b3b9-4c5c-9fcf-d0e4404ab9bb": {
"address": [
@@ -2015,7 +2015,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 29 ms |
{
"after": {
"Patient/e1464f85-5c70-4098-a25d-b8278440c469": {
"address": [
@@ -2151,7 +2151,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 504 | 27 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| given | Lena | ||
| family | Okafor | ||
| birthDate | 1988-04-22 | ||
| gender | female | ||
| line | 14 Birch Lane | ||
| city | Springfield | ||
| state | MA | ||
| postalCode | 01103 | ||
| phone | 413-555-0187 | ||
| lena.okafor@example.org |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 504 | 27 ms |
{
"after": {},
"before": [],
"fields": [],
@@ -2177,7 +2177,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 25 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 10 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Patient | 201 | 25 ms |
{
"after": {
"Patient/5c6dc610-73c4-408c-9e6a-bb6ab93864ed": {
"address": [
@@ -2313,7 +2313,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
"after": {
"AllergyIntolerance/e46aa9b1-d5d2-46da-b5a3-8bdf94f799a3": {
"clinicalStatus": {
@@ -2420,7 +2420,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
"after": {
"AllergyIntolerance/54ef1ce4-7830-42ba-bd36-9d1081063880": {
"clinicalStatus": {
@@ -2527,7 +2527,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 16 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 16 ms |
{
"after": {
"AllergyIntolerance/7d28259f-ecdf-4278-bd69-e5f4c9cb1ac8": {
"clinicalStatus": {
@@ -2634,118 +2634,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
- "after": {
- "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9": {
- "clinicalStatus": {
- "coding": [
- {
- "code": "active",
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
- }
- ]
- },
- "code": {
- "coding": [
- {
- "code": "91936005",
- "display": "Allergy to penicillin",
- "system": "http://snomed.info/sct"
- }
- ]
- },
- "criticality": "high",
- "id": "e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "meta": {
- "lastUpdated": "2026-10-31T17:38:23.985Z",
- "versionId": "fb0e98cd-be83-4e5c-b194-29a4ff8bcf85"
- },
- "patient": {
- "reference": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
- },
- "resourceType": "AllergyIntolerance",
- "verificationStatus": {
- "coding": [
- {
- "code": "confirmed",
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
- }
- ]
- }
- }
- },
- "before": [],
- "fields": [
- {
- "field": "patient",
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "same": true,
- "sent": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
- "stored": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
- },
- {
- "field": "code_system",
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "same": true,
- "sent": "http://snomed.info/sct",
- "stored": "http://snomed.info/sct"
- },
- {
- "field": "code",
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "same": true,
- "sent": "91936005",
- "stored": "91936005"
- },
- {
- "field": "criticality",
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "same": true,
- "sent": "high",
- "stored": "high"
- },
- {
- "field": "clinical_status",
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "same": true,
- "sent": "active",
- "stored": "active"
- },
- {
- "field": "verification_status",
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "same": true,
- "sent": "confirmed",
- "stored": "confirmed"
- }
- ],
- "recheck": {
- "at": 1793468314.547277,
- "reasons": [
- "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
- "since the first check: wrong or missing: patient",
- "since the first check: the created record is not the person",
- "since the first check: 1 other record(s) are now also the person",
- "since the first check: the created record does not come back from a search"
- ],
- "verdict": "REFUTED"
- },
- "replies": [
- 201
- ],
- "verifier": {
- "after_matches": 1,
- "agent_write_types": [
- "AllergyIntolerance"
- ],
- "agent_writes": 1,
- "before_matches": 0,
- "other_writes": 0,
- "outcome": "created_verified",
- "unattributed_writes": 0,
- "unlogged_writes": 0
- }
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 14 ms |
{
"after": {
"AllergyIntolerance/0b86bbf6-4759-4992-a2e6-8691c44005f6": {
"clinicalStatus": {
@@ -2852,7 +2741,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 15 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 6 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/AllergyIntolerance | 201 | 15 ms |
{
"after": {
"AllergyIntolerance/4f1670ab-218c-4306-8a6f-f79c9fe582c6": {
"clinicalStatus": {
@@ -2959,7 +2848,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
"after": {
"Appointment/197dd22f-855e-4f1a-8f05-871faeb6f055": {
"end": "2026-11-17T14:30:00Z",
@@ -3047,7 +2936,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| status | booked | ||
| start | 2026-11-17T14:00:00Z | ||
| end | 2026-11-17T14:30:00Z | ||
| patient | Patient/8b929879-1320-43c8-b9a7-9a8e5ecf09b4 | ||
| practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 504 | 14 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| status | booked | ||
| start | 2026-11-17T14:00:00Z | ||
| end | 2026-11-17T14:30:00Z | ||
| patient | Patient/8b929879-1320-43c8-b9a7-9a8e5ecf09b4 | ||
| practitioner | Practitioner/d7684dce-6023-47c0-ae20-2bec49c38b1f |
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 504 | 14 ms |
{
"after": {},
"before": [],
"fields": [],
@@ -3073,7 +2962,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 15 ms |
{
"after": {
"Appointment/ec933615-1112-4693-9f19-eb920fc35511": {
"end": "2026-11-17T14:30:00Z",
@@ -3161,7 +3050,7 @@
"unattributed_writes": 0,
"unlogged_writes": 0
}
-}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 20 ms |
{
+}| Record | Field | Agent sent | Store holds now |
|---|---|---|---|
| 5 other fields hold what the agent sent (all fields are under Evidence) | |||
Before the write, matching records: none
| Write | Path | Reply | Added |
|---|---|---|---|
| POST | /fhir/R4/Appointment | 201 | 20 ms |
{
"after": {
"Appointment/77a36797-5b44-4f4c-9806-21affee4c890": {
"end": "2026-11-17T14:30:00Z",
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.json b/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.json
index 68cc1136ec..277681ccd8 100644
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.json
+++ b/packages/flow/benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.json
@@ -7,9 +7,9 @@
"writes_seen": 33,
"checks": 33,
"counts": {
- "REFUTED": 17,
+ "REFUTED": 18,
"UNCERTAIN": 2,
- "CONFIRMED": 14,
+ "CONFIRMED": 13,
"PENDING": 0
},
"late_refuted": 1,
@@ -18,7 +18,8 @@
"a value differs from what the agent sent": 9,
"another record changed": 4,
"saved more than once": 3,
- "holds a value the agent didn't send": 1
+ "holds a value the agent didn't send": 1,
+ "changed after the check": 1
},
"overhead_ms": {
"held_for_baseline": {
@@ -196,7 +197,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 4,
@@ -362,7 +364,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 5,
@@ -536,7 +539,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 6,
@@ -703,7 +707,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 8,
@@ -869,7 +874,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 14,
@@ -1004,7 +1010,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 15,
@@ -1139,7 +1146,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 16,
@@ -1272,7 +1280,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 17,
@@ -1406,7 +1415,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 18,
@@ -1540,7 +1550,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 24,
@@ -1655,7 +1666,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 25,
@@ -1768,7 +1780,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 26,
@@ -1882,7 +1895,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 28,
@@ -1995,7 +2009,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 30,
@@ -2108,7 +2123,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 31,
@@ -2222,7 +2238,8 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
},
{
"id": 32,
@@ -2337,7 +2354,162 @@
}
]
},
- "late": null
+ "late": null,
+ "final": "REFUTED"
+ },
+ {
+ "id": 20,
+ "kind": "fhir",
+ "name": "AllergyIntolerance",
+ "verdict": "CONFIRMED",
+ "reasons": [
+ "created once, every value read back"
+ ],
+ "sent": {
+ "patient": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
+ "code_system": "http://snomed.info/sct",
+ "code": "91936005",
+ "criticality": "high",
+ "clinical_status": "active",
+ "verification_status": "confirmed"
+ },
+ "records": [
+ "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9"
+ ],
+ "writes": [
+ {
+ "seq": 20,
+ "method": "POST",
+ "path": "/fhir/R4/AllergyIntolerance",
+ "status": 201,
+ "held_ms": 13.7,
+ "proxy_ms": 0.1,
+ "error": ""
+ }
+ ],
+ "evidence": {
+ "replies": [
+ 201
+ ],
+ "verifier": {
+ "outcome": "created_verified",
+ "before_matches": 0,
+ "after_matches": 1,
+ "agent_writes": 1,
+ "other_writes": 0,
+ "unattributed_writes": 0,
+ "unlogged_writes": 0,
+ "agent_write_types": [
+ "AllergyIntolerance"
+ ]
+ },
+ "before": [],
+ "after": {
+ "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9": {
+ "resourceType": "AllergyIntolerance",
+ "patient": {
+ "reference": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
+ },
+ "code": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "91936005",
+ "display": "Allergy to penicillin"
+ }
+ ]
+ },
+ "criticality": "high",
+ "clinicalStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
+ "code": "active"
+ }
+ ]
+ },
+ "verificationStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
+ "code": "confirmed"
+ }
+ ]
+ },
+ "id": "e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "meta": {
+ "versionId": "fb0e98cd-be83-4e5c-b194-29a4ff8bcf85",
+ "lastUpdated": "2026-10-31T17:38:23.985Z"
+ }
+ }
+ },
+ "fields": [
+ {
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "field": "patient",
+ "sent": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
+ "stored": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "field": "code_system",
+ "sent": "http://snomed.info/sct",
+ "stored": "http://snomed.info/sct",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "field": "code",
+ "sent": "91936005",
+ "stored": "91936005",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "field": "criticality",
+ "sent": "high",
+ "stored": "high",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "field": "clinical_status",
+ "sent": "active",
+ "stored": "active",
+ "same": true
+ },
+ {
+ "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
+ "field": "verification_status",
+ "sent": "confirmed",
+ "stored": "confirmed",
+ "same": true
+ }
+ ],
+ "recheck": {
+ "verdict": "REFUTED",
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ],
+ "at": 1793468314.547277
+ }
+ },
+ "late": {
+ "verdict": "REFUTED",
+ "reasons": [
+ "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
+ "since the first check: wrong or missing: patient",
+ "since the first check: the created record is not the person",
+ "since the first check: 1 other record(s) are now also the person",
+ "since the first check: the created record does not come back from a search"
+ ]
+ },
+ "final": "REFUTED"
},
{
"id": 9,
@@ -2390,7 +2562,8 @@
"after": {},
"fields": []
},
- "late": null
+ "late": null,
+ "final": "UNCERTAIN"
},
{
"id": 11,
@@ -2449,7 +2622,8 @@
},
"fields": []
},
- "late": null
+ "late": null,
+ "final": "UNCERTAIN"
},
{
"id": 1,
@@ -2627,7 +2801,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 2,
@@ -2805,7 +2980,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 7,
@@ -2872,7 +3048,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 10,
@@ -3050,7 +3227,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 12,
@@ -3195,7 +3373,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 13,
@@ -3340,7 +3519,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 19,
@@ -3485,160 +3665,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
- },
- {
- "id": 20,
- "kind": "fhir",
- "name": "AllergyIntolerance",
- "verdict": "CONFIRMED",
- "reasons": [
- "created once, every value read back"
- ],
- "sent": {
- "patient": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
- "code_system": "http://snomed.info/sct",
- "code": "91936005",
- "criticality": "high",
- "clinical_status": "active",
- "verification_status": "confirmed"
- },
- "records": [
- "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9"
- ],
- "writes": [
- {
- "seq": 20,
- "method": "POST",
- "path": "/fhir/R4/AllergyIntolerance",
- "status": 201,
- "held_ms": 13.7,
- "proxy_ms": 0.1,
- "error": ""
- }
- ],
- "evidence": {
- "replies": [
- 201
- ],
- "verifier": {
- "outcome": "created_verified",
- "before_matches": 0,
- "after_matches": 1,
- "agent_writes": 1,
- "other_writes": 0,
- "unattributed_writes": 0,
- "unlogged_writes": 0,
- "agent_write_types": [
- "AllergyIntolerance"
- ]
- },
- "before": [],
- "after": {
- "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9": {
- "resourceType": "AllergyIntolerance",
- "patient": {
- "reference": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b"
- },
- "code": {
- "coding": [
- {
- "system": "http://snomed.info/sct",
- "code": "91936005",
- "display": "Allergy to penicillin"
- }
- ]
- },
- "criticality": "high",
- "clinicalStatus": {
- "coding": [
- {
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
- "code": "active"
- }
- ]
- },
- "verificationStatus": {
- "coding": [
- {
- "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
- "code": "confirmed"
- }
- ]
- },
- "id": "e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "meta": {
- "versionId": "fb0e98cd-be83-4e5c-b194-29a4ff8bcf85",
- "lastUpdated": "2026-10-31T17:38:23.985Z"
- }
- }
- },
- "fields": [
- {
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "field": "patient",
- "sent": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
- "stored": "Patient/fadc5ca1-448a-4d78-8080-f7500f05784b",
- "same": true
- },
- {
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "field": "code_system",
- "sent": "http://snomed.info/sct",
- "stored": "http://snomed.info/sct",
- "same": true
- },
- {
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "field": "code",
- "sent": "91936005",
- "stored": "91936005",
- "same": true
- },
- {
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "field": "criticality",
- "sent": "high",
- "stored": "high",
- "same": true
- },
- {
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "field": "clinical_status",
- "sent": "active",
- "stored": "active",
- "same": true
- },
- {
- "record": "AllergyIntolerance/e87bd506-7bd7-485c-b1ba-7c0167d754e9",
- "field": "verification_status",
- "sent": "confirmed",
- "stored": "confirmed",
- "same": true
- }
- ],
- "recheck": {
- "verdict": "REFUTED",
- "reasons": [
- "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
- "since the first check: wrong or missing: patient",
- "since the first check: the created record is not the person",
- "since the first check: 1 other record(s) are now also the person",
- "since the first check: the created record does not come back from a search"
- ],
- "at": 1793468314.547277
- }
},
- "late": {
- "verdict": "REFUTED",
- "reasons": [
- "since the first check: 1 record(s) were already the person, and the agent wrote anyway",
- "since the first check: wrong or missing: patient",
- "since the first check: the created record is not the person",
- "since the first check: 1 other record(s) are now also the person",
- "since the first check: the created record does not come back from a search"
- ]
- }
+ "final": "CONFIRMED"
},
{
"id": 21,
@@ -3783,7 +3811,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 22,
@@ -3928,7 +3957,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 23,
@@ -4053,7 +4083,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 27,
@@ -4115,7 +4146,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 29,
@@ -4240,7 +4272,8 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
},
{
"id": 33,
@@ -4365,7 +4398,9 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
}
- ]
+ ],
+ "late_uncertain": 0
}
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.html b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.html
index 504c78b722..83bb73f1b5 100644
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.html
+++ b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.html
@@ -8,7 +8,7 @@
table{border-collapse:collapse;width:100%;margin:8px 0}td,th{border-bottom:1px solid var(--line);padding:4px 8px;text-align:left;vertical-align:top;overflow-wrap:anywhere}
.item{border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin:12px 0}.diff{color:var(--bad);font-weight:600}
details{margin-top:6px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
-Shadow report
FHIR writes to http://127.0.0.1:9740. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
1 writes seen, in 1 checks (a record's create, retries and corrections are one check).
0Refuted0Uncertain1ConfirmedAdded latency per write: median 212.4 ms, largest 212.4 ms.
Confirmed (1)
Show
CONFIRMED Patient check 1, records: Patient/88883a88-d92d-4807-99a1-12dba9fe4732- created once, every value read back
- Checked again: CONFIRMED; since the first check: one record was already the person
Record Field Agent sent Store holds now 10 other fields hold what the agent sent (all fields are under Evidence)
Before the write, matching records: none
Write Path Reply Added POST /fhir/R4/Patient 201 212 ms
Evidence
{
+Shadow report
FHIR writes to http://127.0.0.1:9740. Each write was checked against the system of record. The shadow sent each one on as the agent sent it and blocked none.
1 writes seen, in 1 checks (a record's create, retries and corrections are one check).
0Refuted0Uncertain1ConfirmedAdded latency per write: median 212.4 ms, largest 212.4 ms.
Confirmed (1)
Show
CONFIRMED Patient check 1, records: Patient/88883a88-d92d-4807-99a1-12dba9fe4732- created once, every value read back
- Checked first: CONFIRMED; checked again: CONFIRMED; since the first check: one record was already the person
Record Field Agent sent Store holds now 10 other fields hold what the agent sent (all fields are under Evidence)
Before the write, matching records: none
Write Path Reply Added POST /fhir/R4/Patient 201 212 ms
Evidence
{
"after": {
"Patient/88883a88-d92d-4807-99a1-12dba9fe4732": {
"address": [
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.json b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.json
index 1a40626526..0dac078f80 100644
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.json
+++ b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/report/report.json
@@ -203,7 +203,9 @@
"reasons": [
"since the first check: one record was already the person"
]
- }
+ },
+ "final": "CONFIRMED"
}
- ]
+ ],
+ "late_uncertain": 0
}
diff --git a/packages/flow/docs/SHADOW_MODE.md b/packages/flow/docs/SHADOW_MODE.md
index f47ea6147f..36311ea8a3 100644
--- a/packages/flow/docs/SHADOW_MODE.md
+++ b/packages/flow/docs/SHADOW_MODE.md
@@ -79,17 +79,28 @@ answered. So each `CONFIRMED` is checked again:
- `fhir`: `recheck_s` after the check (default 300 s), `verify_ensure`
reads the server again over the window since the first check, with the
- confirmed record as the one already there. It refutes when the agent's
- credential wrote anything since that no write through the shadow
- explains, or when the record is gone, no longer matches, or has a
- duplicate.
+ confirmed record as the one already there. It refutes when the record is
+ gone, is no longer the person, holds a value other than the one sent, or
+ has a duplicate, and when the agent's credential wrote anything since
+ that no other write through the shadow explains (a write to the confirmed
+ record itself never counts as explained). `--recheck-s 0` turns it off.
- `sql`: when the contract's `frame.database.recheck_after_s` is due,
- `verifier.recheck` reads the whole database again. A contract without it
- isn't rechecked.
-
-A recheck that refutes is a line of its own in the report ("Landed wrong
-after the check"), beside the first verdict, which stays as it was.
-`--until-idle` waits for the rechecks that are due.
+ `verifier.recheck` reads the whole database again. Later writes through
+ the shadow under the same contract are excused as the verifier excuses
+ them. A contract without `recheck_after_s` isn't rechecked.
+
+A recheck that doesn't confirm sets the write's final verdict: it moves to
+"Landed wrong after the check" (`REFUTED`) or "Couldn't be confirmed"
+(`UNCERTAIN`), and both verdicts are shown. The counts are of final
+verdicts. A recheck still to run is listed as not yet run; `--until-idle`
+waits for the rechecks, while Ctrl-C ends the run without them.
+
+A recheck reads a window, not one record. A change in it by the agent's
+credential that no write through the shadow explains refutes every
+`CONFIRMED` whose window holds it, not only the write it came from. If the
+agent made a later write through the shadow whose record the recheck can't
+know (a lost reply, a write under no contract), a refutation becomes
+`UNCERTAIN` instead.
## Where the contract comes from
@@ -134,6 +145,8 @@ Keep it where the system of record's data may be kept.
A write the agent makes while an episode is checked makes that episode
`UNCERTAIN`.
- A change after the recheck's read is outside it.
+- A write the agent was asked to make and never made shows nowhere: the
+ shadow sees only writes.
- The server's links (`Location`, `fullUrl`) name the server, not the
shadow. An agent that follows them goes around the shadow, and those writes
show only as unexplained changes inside other checks.
diff --git a/packages/flow/openadapt_flow/cli_shadow.py b/packages/flow/openadapt_flow/cli_shadow.py
index 6b0b1dd0c1..1fb4209976 100644
--- a/packages/flow/openadapt_flow/cli_shadow.py
+++ b/packages/flow/openadapt_flow/cli_shadow.py
@@ -71,7 +71,7 @@ def register(sub: argparse._SubParsersAction) -> None:
type=float,
default=None,
help="fhir: check each CONFIRMED write again this long after (default "
- "300); --until-idle waits for the rechecks",
+ "300; 0 turns it off); --until-idle waits for the rechecks",
)
p.set_defaults(func=cmd_shadow)
@@ -151,13 +151,23 @@ def build(cfg: dict[str, Any], out: Path) -> Any:
listen=("127.0.0.1", int(cfg.get("listen") or 9670)),
hold_ms=float(cfg.get("hold_ms", 2000)),
upstream_timeout_s=float(cfg.get("upstream_timeout_s", 300)),
- recheck_s=None
- if cfg.get("recheck_s", 300) is None
- else float(cfg.get("recheck_s", 300)),
+ recheck_s=_recheck_s(cfg.get("recheck_s", 300)),
quiet_s=float(cfg.get("quiet_s", 5)),
)
+def _recheck_s(value: Any) -> Any:
+ """``None`` or 0 turns the fhir recheck off; a negative wait is an error."""
+
+ from openadapt_flow.shadow import ShadowConfigError
+
+ if value is None or float(value) == 0:
+ return None
+ if float(value) < 0:
+ raise ShadowConfigError("recheck_s can't be negative")
+ return float(value)
+
+
def cmd_shadow(args: argparse.Namespace) -> int:
from openadapt_flow.shadow import ShadowConfigError
from openadapt_flow.shadow_report import write_report
@@ -195,10 +205,14 @@ def cmd_shadow(args: argparse.Namespace) -> int:
f"{doc['writes_seen']} writes, {doc['checks']} checks: {n['CONFIRMED']} "
f"confirmed, {n['REFUTED']} refuted, {n['UNCERTAIN']} uncertain"
+ (f", {n['PENDING']} never checked" if n["PENDING"] else "")
- + (
- f"; {doc['late_refuted']} refuted on recheck"
- if doc.get("late_refuted")
- else ""
+ + "".join(
+ f"; {doc[k]} {label}"
+ for k, label in (
+ ("late_refuted", "refuted on recheck"),
+ ("late_uncertain", "uncertain on recheck"),
+ ("rechecks_pending", "rechecks not run"),
+ )
+ if doc.get(k)
)
+ ". "
f"Report: {page}"
diff --git a/packages/flow/openadapt_flow/shadow.py b/packages/flow/openadapt_flow/shadow.py
index 7a7ab9d836..f88e4a2179 100644
--- a/packages/flow/openadapt_flow/shadow.py
+++ b/packages/flow/openadapt_flow/shadow.py
@@ -603,7 +603,14 @@ def _check_due(self) -> None:
def _schedule_recheck(self, ep: Episode) -> None:
if ep.verdict != CONFIRMED or ep.result is None:
return
- if ep.kind == "fhir" and self.recheck_s is not None and ep.recheck_from:
+ if ep.kind == "fhir" and self.recheck_s is not None:
+ if not ep.recheck_from:
+ ep.late_verdict = UNCERTAIN
+ ep.late_reasons = [
+ "the recheck couldn't be scheduled: the server's clock "
+ "couldn't be read after the check"
+ ]
+ return
ep.recheck_at = ep.checked_at + self.recheck_s
elif ep.kind == "sql" and getattr(ep.result, "recheck_due_at", None):
from datetime import datetime
@@ -625,9 +632,10 @@ def pending_rechecks(self) -> int:
)
def run_rechecks(self, *, now: bool = False, only: Optional[list] = None) -> None:
- """Check each CONFIRMED again once it is due (``now``: whatever is
- scheduled, earlier than due, as a test harness does before it resets
- the store). A late REFUTED stands beside the first verdict."""
+ """Check each CONFIRMED again once it is due. ``now`` runs whatever
+ is scheduled without waiting for ``recheck_s`` (fhir), as a test
+ harness does before it resets the store; a SQL recheck still waits
+ for the contract's due time. The first verdict stays as it was."""
with self._check_lock:
with self._lock:
@@ -643,69 +651,66 @@ def run_rechecks(self, *, now: bool = False, only: Optional[list] = None) -> Non
seq = self._seq
for ep in due:
try:
- self._recheck(ep, wait=now)
+ self._recheck(ep)
except Exception as exc: # noqa: BLE001 - fail closed
ep.late_verdict = UNCERTAIN
ep.late_reasons = [f"the recheck failed: {exc!r}"]
self._note_error(traceback.format_exc(limit=3))
with self._lock:
- if self._seq != seq and ep.late_verdict == CONFIRMED:
- ep.late_verdict = UNCERTAIN
+ if ep.late_verdict == REFUTED:
+ unknown = self._unexplained_later(ep)
+ if unknown:
+ ep.late_verdict = UNCERTAIN
+ ep.late_reasons.insert(
+ 0,
+ f"the agent made {unknown} later write(s) through "
+ "the shadow that this recheck can't tell apart "
+ "from a change to this record",
+ )
+ if self._seq != seq and ep.late_verdict != UNCERTAIN:
ep.late_reasons.insert(
- 0, "the agent wrote while this was rechecked"
+ 0,
+ "the agent wrote while this was rechecked; the "
+ f"recheck alone said {ep.late_verdict}",
)
+ ep.late_verdict = UNCERTAIN
ep.evidence["recheck"] = {
"verdict": ep.late_verdict,
"reasons": ep.late_reasons,
"at": time.time(),
}
- def _recheck(self, ep: Episode, wait: bool) -> None:
- if ep.kind == "fhir":
- from openadapt_flow.ensure_record import (
- Baseline,
- FhirReader,
- Unreadable,
- verify_ensure,
- )
+ def _later(self, ep: Episode) -> list[Episode]:
+ return [
+ o
+ for o in self.episodes
+ if o is not ep and o.writes and o.writes[0].started > ep.checked_at
+ ]
- rtype = ep.contract.resource_type
- rid = str(ep.result.record_id or "")
- with self._lock:
- # Every other write the agent sent is judged on its own.
- declared = [r for o in self.episodes if o is not ep for r in o.refs]
- reader = FhirReader(ep.contract)
- try:
- _, now = reader.fetch(f"{reader.base_url}/{rtype}/{rid}")
- except Unreadable as exc:
- ep.late_verdict = UNCERTAIN
- ep.late_reasons = [f"the confirmed record can't be read again: {exc}"]
- return
- # Since the first check, the confirmed record is the one that was
- # already there: the agent may write nothing more, and it must
- # still be the only record that is the person.
- since = Baseline(started=ep.recheck_from, matches={rid: now})
- r = verify_ensure(ep.contract, ep.params, since, declared=declared)
- ep.late_reasons = [f"since the first check: {x}" for x in r.reasons]
- if r.outcome == "found_existing":
- ep.late_verdict = CONFIRMED
- elif r.evidence.get("unreadable"):
- ep.late_verdict = UNCERTAIN
+ def _unexplained_later(self, ep: Episode) -> int:
+ """Later writes through the shadow a recheck can't excuse: in fhir,
+ a write whose record isn't known (a lost reply); in sql, a write
+ under no contract or another one, or with no result."""
+
+ n = 0
+ for o in self._later(ep):
+ if ep.kind == "fhir":
+ n += not o.refs
else:
- ep.late_verdict = REFUTED
+ n += not (o.kind == "sql" and o.contract is ep.contract and o.result)
+ return n
+
+ def _recheck(self, ep: Episode) -> None:
+ if ep.kind == "fhir":
+ self._recheck_fhir(ep)
return
from openadapt_flow.verifier import Actor, recheck
with self._lock:
later = [
o.result
- for o in self.episodes
- if o is not ep
- and o.kind == "sql"
- and o.contract is ep.contract
- and o.result is not None
- and o.writes
- and o.writes[0].started > ep.checked_at
+ for o in self._later(ep)
+ if o.kind == "sql" and o.contract is ep.contract and o.result
]
late = recheck(
ep.contract,
@@ -716,7 +721,67 @@ def _recheck(self, ep: Episode, wait: bool) -> None:
wait=True, # due by now; never refuse for a clock a second early
ledger=None,
)
- ep.late_verdict, ep.late_reasons = str(late.outcome), list(late.reasons)
+ ep.late_verdict = str(late.outcome)
+ # Shadow mode keeps no ledger, so the verifier's note about one is
+ # noise here.
+ ep.late_reasons = [r for r in late.reasons if "ledger" not in r]
+
+ def _recheck_fhir(self, ep: Episode) -> None:
+ from openadapt_flow.ensure_record import (
+ Baseline,
+ FhirReader,
+ Unreadable,
+ is_person,
+ verify_ensure,
+ wrong_fields,
+ )
+
+ contract = ep.contract
+ rid = str(ep.result.record_id or "")
+ ref = f"{contract.resource_type}/{rid}"
+ with self._lock:
+ # Every other write the agent sent is judged on its own, except
+ # one to this record.
+ declared = [
+ r for o in self.episodes if o is not ep for r in o.refs if r != ref
+ ]
+ reader = FhirReader(contract)
+ try:
+ _, now = reader.fetch(f"{reader.base_url}/{ref}")
+ except Unreadable as exc:
+ ep.late_verdict = UNCERTAIN
+ ep.late_reasons = [f"the confirmed record can't be read again: {exc}"]
+ return
+ moved: list[str] = []
+ if not isinstance(now, dict) or not is_person(contract, now, ep.params):
+ moved.append("the confirmed record is no longer the person")
+ else:
+ wrong = wrong_fields(contract, now, ep.params)
+ if wrong:
+ moved.append(
+ "the confirmed record now holds other values: " + ", ".join(wrong)
+ )
+ # Since the first check, the confirmed record is the one that was
+ # already there: the agent may write nothing more, and it must still
+ # be the only record that is the person.
+ since = Baseline(started=ep.recheck_from, matches={rid: now})
+ r = verify_ensure(contract, ep.params, since, declared=declared)
+ reasons = list(moved)
+ if r.outcome != "found_existing":
+ n = int(r.evidence.get("agent_writes") or 0)
+ if n:
+ reasons.append(
+ f"the agent's credential wrote {n} resource(s) since the check "
+ "that no write through the shadow explains"
+ )
+ reasons += list(r.reasons)
+ ep.late_reasons = [f"since the first check: {x}" for x in reasons]
+ if r.evidence.get("unreadable"):
+ ep.late_verdict = UNCERTAIN
+ elif moved or r.outcome != "found_existing":
+ ep.late_verdict = REFUTED
+ else:
+ ep.late_verdict = CONFIRMED
def _check(self, ep: Episode) -> None:
statuses = [w.status for w in ep.writes]
@@ -851,7 +916,7 @@ def _check_sql(self, ep: Episode, pending: Any) -> None:
if result.provisional:
ep.reasons.append(
f"provisional: the contract's recheck is due at {result.recheck_due_at}; "
- "run it with verifier.recheck (shadow mode doesn't run it)"
+ "shadow mode runs it then"
)
ep.evidence["recheck_due_at"] = result.recheck_due_at
ep.evidence["verifier"] = {
diff --git a/packages/flow/openadapt_flow/shadow_report.py b/packages/flow/openadapt_flow/shadow_report.py
index a9bfece427..bd11fbe9d8 100644
--- a/packages/flow/openadapt_flow/shadow_report.py
+++ b/packages/flow/openadapt_flow/shadow_report.py
@@ -5,7 +5,9 @@
import html
import json
+import re
import statistics
+import time
from pathlib import Path
from typing import Any
@@ -19,31 +21,50 @@ def _ms(values: list[float]) -> dict[str, float]:
return {"median": round(statistics.median(values), 1), "max": round(max(values), 1)}
-#: How a REFUTED write landed wrong, from the verifier's reasons (first match).
+#: How a REFUTED write landed wrong, from the verifier's reasons: the first
+#: pattern that matches, most specific first.
KINDS = (
- ("wrong or missing", "a value differs from what the agent sent"),
- ("not one", "saved more than once"),
- ("also the person", "saved more than once"),
- ("other resource", "another record changed"),
- ("outside the declared write", "another record changed"),
- ("not given by the task", "holds a value the agent didn't send"),
- ("someone else changed", "changed by someone else"),
+ (r"someone else changed", "changed by someone else"),
(
- "version in between was not the person",
+ r"version in between was not the person",
"saved as another record first, then corrected",
),
- ("after creating it", "changed after it was created"),
+ (r"created ([2-9]|\d{2,}) \S+ records, not one", "saved more than once"),
+ (r"other record\(s\) are now also the person", "saved more than once"),
+ (r"wrong or missing", "a value differs from what the agent sent"),
+ (r"not given by the task", "holds a value the agent didn't send"),
+ (r"other resource|outside the declared write", "another record changed"),
+ (r"after creating it", "changed after it was created"),
)
-def kind_of(reasons: list[str]) -> str:
+def kind_of(reasons: list[str], *, late: bool = False) -> str:
+ if late:
+ return "changed after the check"
text = " ".join(reasons)
- for needle, kind in KINDS:
- if needle in text:
+ for pattern, kind in KINDS:
+ if re.search(pattern, text):
return kind
return "other (see the reasons)"
+def _late(ep: Any) -> dict[str, Any] | None:
+ if ep.late_verdict:
+ return {"verdict": ep.late_verdict, "reasons": list(ep.late_reasons)}
+ if ep.recheck_at:
+ due = time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(ep.recheck_at))
+ return {"verdict": "PENDING", "reasons": [f"recheck due at {due}, not run"]}
+ return None
+
+
+def _final(verdict: str, late: dict[str, Any] | None) -> str:
+ """A recheck that doesn't confirm overrides the first CONFIRMED."""
+
+ if verdict == "CONFIRMED" and late and late["verdict"] in ("REFUTED", "UNCERTAIN"):
+ return str(late["verdict"])
+ return verdict
+
+
def summarize(shadow: Any) -> dict[str, Any]:
checks = []
for ep in shadow.episodes:
@@ -69,24 +90,18 @@ def summarize(shadow: Any) -> dict[str, Any]:
for w in ep.writes
],
"evidence": ep.evidence,
- "late": (
- {"verdict": ep.late_verdict, "reasons": list(ep.late_reasons)}
- if ep.late_verdict
- else (
- {"verdict": "PENDING", "reasons": ["recheck not yet due"]}
- if ep.recheck_at
- else None
- )
- ),
+ "late": _late(ep),
}
)
- counts = {
- v: sum(1 for c in checks if c["verdict"] == v) for v in (*ORDER, "PENDING")
- }
+ checks[-1]["final"] = _final(checks[-1]["verdict"], checks[-1]["late"])
+ # Counted by the final verdict: a recheck that doesn't confirm moves a
+ # write out of CONFIRMED.
+ counts = {v: sum(1 for c in checks if c["final"] == v) for v in (*ORDER, "PENDING")}
kinds: dict[str, int] = {}
for c in checks:
- if c["verdict"] == "REFUTED":
- kinds[kind_of(c["reasons"])] = kinds.get(kind_of(c["reasons"]), 0) + 1
+ if c["final"] == "REFUTED":
+ k = kind_of(c["reasons"], late=c["verdict"] != "REFUTED")
+ kinds[k] = kinds.get(k, 0) + 1
held = [w.held_ms for w in shadow.writes]
added = [w.held_ms + w.proxy_ms for w in shadow.writes]
first = min((w.started for w in shadow.writes), default=None)
@@ -104,15 +119,16 @@ def summarize(shadow: Any) -> dict[str, Any]:
"late_refuted": sum(
1 for c in checks if (c["late"] or {}).get("verdict") == "REFUTED"
),
+ "late_uncertain": sum(
+ 1 for c in checks if (c["late"] or {}).get("verdict") == "UNCERTAIN"
+ ),
"rechecks_pending": sum(
1 for c in checks if (c["late"] or {}).get("verdict") == "PENDING"
),
"refuted_by_kind": dict(sorted(kinds.items(), key=lambda kv: -kv[1])),
"overhead_ms": {"held_for_baseline": _ms(held), "added_total": _ms(added)},
"errors": list(shadow.errors),
- "items": sorted(
- checks, key=lambda c: (ORDER + ("PENDING",)).index(c["verdict"])
- ),
+ "items": sorted(checks, key=lambda c: (ORDER + ("PENDING",)).index(c["final"])),
}
@@ -166,13 +182,14 @@ def _item(c: dict[str, Any]) -> str:
late = c.get("late") or {}
if late:
reasons += (
- f"Checked again: {late['verdict']}"
+ f" Checked first: {c['verdict']}; "
+ f"checked again: {late['verdict']}"
+ "".join(f"; {html.escape(r)}" for r in late["reasons"])
+ " "
)
before = ", ".join(ev.get("before") or []) or "none"
return (
- f"{c['verdict']} "
+ f"{c['final']} "
f"{html.escape(c['name'])} check {c['id']}, "
f"records: {html.escape(', '.join(c['records']) or 'none')}"
f"{reasons}
"
@@ -202,33 +219,36 @@ def render_html(doc: dict[str, Any], setup: dict[str, Any] | None = None) -> str
if v != "PENDING" or n[v]
)
oh = doc["overhead_ms"]["added_total"]
- if doc.get("late_refuted"):
- tiles += (
- f"{doc['late_refuted']}"
- "Refuted on recheck"
+ recheck_note = ", ".join(
+ f"{doc[k]} {label}"
+ for k, label in (
+ ("late_refuted", "refuted"),
+ ("late_uncertain", "couldn't be confirmed"),
+ ("rechecks_pending", "not yet run"),
)
+ if doc.get(k)
+ )
sections = []
+ late = [
+ c for c in doc["items"] if c["final"] == "REFUTED" and c["verdict"] != "REFUTED"
+ ]
+ if late:
+ sections.append(
+ f"Landed wrong after the check ({len(late)})
"
+ "Confirmed at first, then refuted when checked again: "
+ "something changed after the write.
" + "".join(map(_item, late))
+ )
for v, title in (
("REFUTED", "Landed wrong"),
("UNCERTAIN", "Couldn't be confirmed"),
("PENDING", "Never checked (the shadow failed; see its errors)"),
):
- items = [c for c in doc["items"] if c["verdict"] == v]
+ items = [c for c in doc["items"] if c["final"] == v and c not in late]
if items:
sections.append(
f"{title} ({len(items)})
" + "".join(map(_item, items))
)
- late = [
- c for c in doc["items"] if (c.get("late") or {}).get("verdict") == "REFUTED"
- ]
- if late:
- sections.insert(
- 0,
- f"Landed wrong after the check ({len(late)})
"
- "Confirmed at first, then refuted when checked again: "
- "something changed after the write.
" + "".join(map(_item, late)),
- )
- ok = [c for c in doc["items"] if c["verdict"] == "CONFIRMED"]
+ ok = [c for c in doc["items"] if c["final"] == "CONFIRMED"]
if ok:
sections.append(
f"Confirmed ({len(ok)})
Show
"
@@ -263,6 +283,11 @@ def render_html(doc: dict[str, Any], setup: dict[str, Any] | None = None) -> str
f"{doc['writes_seen']} writes seen, in {doc['checks']} checks "
"(a record's create, retries and corrections are one check).
"
f"{tiles}"
+ + (
+ f"Rechecks of confirmed writes: {html.escape(recheck_note)}.
"
+ if recheck_note
+ else ""
+ )
+ (
"How they landed wrong:
"
+ "".join(
diff --git a/packages/flow/tests/test_shadow.py b/packages/flow/tests/test_shadow.py
index c29b3d664a..8d007e106b 100644
--- a/packages/flow/tests/test_shadow.py
+++ b/packages/flow/tests/test_shadow.py
@@ -313,3 +313,23 @@ def test_a_pinned_value_binds_without_the_body(tmp_path: Path) -> None:
sh.stop()
(item,) = sh.results()["items"]
assert item["verdict"] == "CONFIRMED" and item["sent"]["lname"] == "Quill"
+
+
+def test_a_later_write_under_no_route_makes_a_late_refutation_uncertain(
+ tmp_path: Path,
+) -> None:
+ db = _db(tmp_path)
+ app = App(db)
+ sh = _shadow(tmp_path, app, db)
+ sh.routes[0].contract.config.frame.database.recheck_after_s = 1
+ assert _post(sh.url, BODY)[0] == 201
+ sh.flush()
+ # The agent's next write goes to a path no route checks; it moves the db.
+ app.fault = "side_write"
+ assert _post(sh.url, {**BODY, "email": "z@example.test"}, "/api/other")[0] == 201
+ sh.flush()
+ sh.run_rechecks(now=True)
+ sh.stop()
+ ep = sh.episodes[0]
+ assert ep.late_verdict == "UNCERTAIN", ep.late_reasons
+ assert "can't tell apart" in ep.late_reasons[0]
diff --git a/packages/flow/tests/test_shadow_fhir.py b/packages/flow/tests/test_shadow_fhir.py
index c004f9af5f..aa9143f011 100644
--- a/packages/flow/tests/test_shadow_fhir.py
+++ b/packages/flow/tests/test_shadow_fhir.py
@@ -217,3 +217,108 @@ def test_a_confirmed_write_is_checked_again_and_a_late_change_refutes_it(
# The recheck is told every other write the agent sent, checked or not.
assert env["calls"]["verify"][-1]["declared"] == []
assert ep.late_reasons[0].startswith("since the first check: ")
+
+
+def _stored(patient: str) -> dict[str, Any]:
+ return {
+ **_allergy(patient),
+ "id": "a1",
+ "clinicalStatus": {"coding": [{"code": "active"}]},
+ "verificationStatus": {"coding": [{"code": "confirmed"}]},
+ }
+
+
+def test_the_recheck_refutes_a_confirmed_record_changed_to_another_patient(
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
+) -> None:
+ sh = env["sh"]
+ stored = {"now": _stored("Patient/p1")}
+ monkeypatch.setattr(
+ ensure_record.FhirReader,
+ "fetch",
+ lambda self, url, params=None: ({}, stored["now"]),
+ )
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
+ sh.flush()
+ (ep,) = sh.episodes
+ # Nothing moved: the recheck confirms.
+ env["calls"]["outcome"] = "found_existing"
+ sh.run_rechecks(now=True)
+ assert ep.late_verdict == "CONFIRMED", ep.late_reasons
+ # Moved to another patient: refuted, though no write of the agent's shows.
+ ep.late_verdict = ""
+ stored["now"] = _stored("Patient/p2")
+ sh.run_rechecks(now=True)
+ assert ep.late_verdict == "REFUTED"
+ assert "no longer the person" in ep.late_reasons[0]
+ assert sh.results()["counts"]["REFUTED"] == 1 # counted by the final verdict
+
+
+def test_a_later_put_to_the_confirmed_record_is_not_excused(
+ env: dict[str, Any],
+) -> None:
+ sh = env["sh"]
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
+ sh.flush()
+ _send(sh, "PUT", "/fhir/R4/AllergyIntolerance/a1", _allergy("Patient/p2"))
+ sh.flush()
+ sh.run_rechecks(now=True)
+ assert "AllergyIntolerance/a1" not in env["calls"]["verify"][-1]["declared"]
+
+
+def test_a_write_during_a_recheck_makes_it_uncertain(env: dict[str, Any]) -> None:
+ sh = env["sh"]
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
+ sh.flush()
+ env["calls"]["outcome"] = "needs_review"
+ env["calls"]["ev"] = {"agent_writes": 1}
+ env["calls"]["during"] = lambda: _send(
+ sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p9")
+ )
+ sh.run_rechecks(now=True)
+ assert sh.episodes[0].late_verdict == "UNCERTAIN"
+ assert "while this was rechecked" in sh.episodes[0].late_reasons[0]
+
+
+def test_a_later_write_with_no_known_record_makes_a_late_refutation_uncertain(
+ env: dict[str, Any],
+) -> None:
+ sh = env["sh"]
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
+ sh.flush()
+ env["fhir"].status = 504 # a later create whose reply is lost
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p2"))
+ env["calls"]["outcome"] = "needs_review"
+ env["calls"]["ev"] = {"agent_writes": 1}
+ sh.flush()
+ sh.run_rechecks(now=True)
+ assert sh.episodes[0].late_verdict == "UNCERTAIN"
+ assert "can't tell apart" in sh.episodes[0].late_reasons[0]
+
+
+def test_a_recheck_that_cant_be_scheduled_says_so(
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
+) -> None:
+ def no_clock(self: Any) -> Any:
+ raise ensure_record.Unreadable("no Date header")
+
+ monkeypatch.setattr(ensure_record.FhirReader, "server_time", no_clock)
+ _send(env["sh"], "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
+ env["sh"].flush()
+ ep = env["sh"].episodes[0]
+ assert ep.verdict == "CONFIRMED" and ep.late_verdict == "UNCERTAIN"
+ assert env["sh"].results()["counts"]["UNCERTAIN"] == 1
+
+
+def test_kinds_name_how_a_write_landed_wrong() -> None:
+ from openadapt_flow.shadow_report import kind_of
+
+ created_none = ["the agent created 0 Patient records, not one"]
+ assert kind_of(created_none + ["wrote 1 other resource(s)"]) == (
+ "another record changed"
+ )
+ assert kind_of(["the agent created 2 Patient records, not one"]) == (
+ "saved more than once"
+ )
+ both = ["wrong or missing: phone", "someone else changed the created record"]
+ assert kind_of(both) == "changed by someone else"
From 0c2425a7db82fc51e62bb0853804613db2e03027 Mon Sep 17 00:00:00 2001
From: abrichr
Date: Sat, 31 Oct 2026 14:28:26 -0400
Subject: [PATCH 09/12] Shadow mode: SQL mode on live Dolibarr (8 of 8 harms
caught, 5 of 5 correct confirmed); SQL reasons grouped by kind
---
CAPABILITIES.md | 2 +-
llms-full.txt | 2 +-
.../fhir_medplum/public/SHADOW_RESULTS.md | 27 +++++++++++++++++++
packages/flow/openadapt_flow/shadow_report.py | 2 ++
packages/flow/tests/test_shadow_fhir.py | 2 ++
5 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/CAPABILITIES.md b/CAPABILITIES.md
index c3d182d911..e9353b06de 100644
--- a/CAPABILITIES.md
+++ b/CAPABILITIES.md
@@ -275,7 +275,7 @@ improvising or retrying when something is off.
| Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends) | `openadapt-agent serve --teach`, [packages/agent](packages/agent/README.md#teach-a-new-workflow-from-your-agent) |
| Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | On main ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](packages/flow/docs/FIRST_TOOL.md) |
| Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | On main ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md) |
-| See what your own agent gets wrong, with no risk: `openadapt shadow` is a loopback pass-through proxy beside the agent. It checks each write against the system of record (FHIR through `ensure_record`; SQL through the verifier's whole-database frame), checks each `CONFIRMED` again later, and writes `report.html` and `report.json`. It never blocks, changes or resends a write; the only delay is the read before a write (at most `hold_ms`) | [#1678](https://github.com/OpenAdaptAI/OpenAdapt/pull/1678) | Real app (Medplum 5.2.8, 37 cases through a fault proxy: scripted agent 18 of 18 harms caught, 0 correct writes refuted; Claude Sonnet 5.5 9 of 9 caught, 4 correct but corrected writes refuted; 0 writes by the shadow; 15 to 25 ms median added per write; setup 76.5 s machine time, 3 decisions); SQL mode synthetic (SQLite) | `openadapt shadow`, [SHADOW_MODE.md](packages/flow/docs/SHADOW_MODE.md), [SHADOW_RESULTS.md](packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md) |
+| See what your own agent gets wrong, with no risk: `openadapt shadow` is a loopback pass-through proxy beside the agent. It checks each write against the system of record (FHIR through `ensure_record`; SQL through the verifier's whole-database frame), checks each `CONFIRMED` again later, and writes `report.html` and `report.json`. It never blocks, changes or resends a write; the only delay is the read before a write (at most `hold_ms`) | [#1678](https://github.com/OpenAdaptAI/OpenAdapt/pull/1678) | Real app (Medplum 5.2.8, 37 cases through a fault proxy: scripted agent 18 of 18 harms caught, 0 correct writes refuted; Claude Sonnet 5.5 9 of 9 caught, 4 correct but corrected writes refuted; 0 writes by the shadow; 15 to 25 ms median added per write; setup 76.5 s machine time, 3 decisions); real app, SQL mode (Dolibarr 21 on MariaDB 11.4, 13 cases: 8 of 8 harms caught, 5 of 5 correct writes confirmed, 292 ms median added); synthetic (SQLite) | `openadapt shadow`, [SHADOW_MODE.md](packages/flow/docs/SHADOW_MODE.md), [SHADOW_RESULTS.md](packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md) |
| Skill cache for framework agents: an agent in any framework does a browser task through compile-agent's harness as plain tools (`BrowserTools`); when the system of record shows exactly the task's record and the operator confirms the checks, the run is canaried, admitted and emitted as an MCP server. A repeat of the same task (instruction, record, app, contract, environment) calls that tool instead of the agent: no model calls, the program's checks and this task's record check on every run, eviction after a failed run | On main | Synthetic (MockMed, LangGraph on `claude-sonnet-5-5`, 3 trials, repeats on the same record: run 1 6 model calls and $0.022; runs 2 to 10 27/27 VERIFIED, 0 model calls, 7.8 s median); Trac 1.6: run 1 verified, not admitted | `openadapt_flow.integrations.agents.skills`, [benchmark/skill_cache](packages/flow/benchmark/skill_cache/README.md) |
| Verified write tools for agent frameworks: `verified(tool, contract=...)` wraps a Claude Agent SDK, OpenAI Agents SDK, LangGraph or CrewAI write tool in one line. The contract and any values the operator pins come from the operator, never the agent's arguments; the store is read before and after; the agent gets a receipt or a refusal, and a refused write is held instead of retried | On main | Synthetic (each framework's own agent loop with a scripted model, writing through the example app's order form over real HTTP: verified save, a save the app drops, a save it keeps twice); one real-model run per framework, opt-in | `openadapt_flow.integrations.agents`, extras `claude-agent-sdk`, `openai-agents`, `langgraph` (CrewAI: install `crewai` beside it); [AGENT_FRAMEWORKS.md](packages/flow/docs/AGENT_FRAMEWORKS.md) |
| Teach a browser write as a verified tool: with write contracts (`serve --teach-browser --contracts DIR`), the agent teaches a save once; run 1 is verified in the system of record before the `taught_` tool exists, and every call makes the write and returns a verified receipt or a refusal. Sign-in values come from the server's environment and never reach the agent or the program. Controls in named iframes are found through their frame | On main ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (the example app's sign-in and order form in headless Chromium over MCP: verified save, a save the app drops, a save it keeps twice) | `openadapt-agent serve --teach-browser --contracts`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md#teach-a-write-as-a-tool) |
diff --git a/llms-full.txt b/llms-full.txt
index 43b41f6dbc..e86b08513c 100644
--- a/llms-full.txt
+++ b/llms-full.txt
@@ -672,7 +672,7 @@ improvising or retrying when something is off.
| Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends) | `openadapt-agent serve --teach`, [packages/agent](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/agent/README.md#teach-a-new-workflow-from-your-agent) |
| Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | On main ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/FIRST_TOOL.md) |
| Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | On main ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/VERIFY_WRITES.md) |
-| See what your own agent gets wrong, with no risk: `openadapt shadow` is a loopback pass-through proxy beside the agent. It checks each write against the system of record (FHIR through `ensure_record`; SQL through the verifier's whole-database frame), checks each `CONFIRMED` again later, and writes `report.html` and `report.json`. It never blocks, changes or resends a write; the only delay is the read before a write (at most `hold_ms`) | [#1678](https://github.com/OpenAdaptAI/OpenAdapt/pull/1678) | Real app (Medplum 5.2.8, 37 cases through a fault proxy: scripted agent 18 of 18 harms caught, 0 correct writes refuted; Claude Sonnet 5.5 9 of 9 caught, 4 correct but corrected writes refuted; 0 writes by the shadow; 15 to 25 ms median added per write; setup 76.5 s machine time, 3 decisions); SQL mode synthetic (SQLite) | `openadapt shadow`, [SHADOW_MODE.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/SHADOW_MODE.md), [SHADOW_RESULTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md) |
+| See what your own agent gets wrong, with no risk: `openadapt shadow` is a loopback pass-through proxy beside the agent. It checks each write against the system of record (FHIR through `ensure_record`; SQL through the verifier's whole-database frame), checks each `CONFIRMED` again later, and writes `report.html` and `report.json`. It never blocks, changes or resends a write; the only delay is the read before a write (at most `hold_ms`) | [#1678](https://github.com/OpenAdaptAI/OpenAdapt/pull/1678) | Real app (Medplum 5.2.8, 37 cases through a fault proxy: scripted agent 18 of 18 harms caught, 0 correct writes refuted; Claude Sonnet 5.5 9 of 9 caught, 4 correct but corrected writes refuted; 0 writes by the shadow; 15 to 25 ms median added per write; setup 76.5 s machine time, 3 decisions); real app, SQL mode (Dolibarr 21 on MariaDB 11.4, 13 cases: 8 of 8 harms caught, 5 of 5 correct writes confirmed, 292 ms median added); synthetic (SQLite) | `openadapt shadow`, [SHADOW_MODE.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/SHADOW_MODE.md), [SHADOW_RESULTS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md) |
| Skill cache for framework agents: an agent in any framework does a browser task through compile-agent's harness as plain tools (`BrowserTools`); when the system of record shows exactly the task's record and the operator confirms the checks, the run is canaried, admitted and emitted as an MCP server. A repeat of the same task (instruction, record, app, contract, environment) calls that tool instead of the agent: no model calls, the program's checks and this task's record check on every run, eviction after a failed run | On main | Synthetic (MockMed, LangGraph on `claude-sonnet-5-5`, 3 trials, repeats on the same record: run 1 6 model calls and $0.022; runs 2 to 10 27/27 VERIFIED, 0 model calls, 7.8 s median); Trac 1.6: run 1 verified, not admitted | `openadapt_flow.integrations.agents.skills`, [benchmark/skill_cache](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/benchmark/skill_cache/README.md) |
| Verified write tools for agent frameworks: `verified(tool, contract=...)` wraps a Claude Agent SDK, OpenAI Agents SDK, LangGraph or CrewAI write tool in one line. The contract and any values the operator pins come from the operator, never the agent's arguments; the store is read before and after; the agent gets a receipt or a refusal, and a refused write is held instead of retried | On main | Synthetic (each framework's own agent loop with a scripted model, writing through the example app's order form over real HTTP: verified save, a save the app drops, a save it keeps twice); one real-model run per framework, opt-in | `openadapt_flow.integrations.agents`, extras `claude-agent-sdk`, `openai-agents`, `langgraph` (CrewAI: install `crewai` beside it); [AGENT_FRAMEWORKS.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/AGENT_FRAMEWORKS.md) |
| Teach a browser write as a verified tool: with write contracts (`serve --teach-browser --contracts DIR`), the agent teaches a save once; run 1 is verified in the system of record before the `taught_` tool exists, and every call makes the write and returns a verified receipt or a refusal. Sign-in values come from the server's environment and never reach the agent or the program. Controls in named iframes are found through their frame | On main ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (the example app's sign-in and order form in headless Chromium over MCP: verified save, a save the app drops, a save it keeps twice) | `openadapt-agent serve --teach-browser --contracts`, [VERIFY_WRITES.md](https://github.com/OpenAdaptAI/OpenAdapt/blob/main/packages/flow/docs/VERIFY_WRITES.md#teach-a-write-as-a-tool) |
diff --git a/packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md b/packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md
index e32d83f3c2..f6dd3860e0 100644
--- a/packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md
+++ b/packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md
@@ -107,6 +107,33 @@ registered (same email, phone and birth date, a different family name) was
created again, and the shadow reported "1 other record(s) are now also the
person". The timing task now uses a new person each run.
+## SQL mode on a live app: Dolibarr
+
+The same day, SQL mode ran on Dolibarr 21.0.4 with MariaDB 11.4.13. The
+agent created customers through Dolibarr's REST API, and the shadow checked
+each create with a `verify.yaml` that diffs the whole database. A fault proxy
+broke the writes in five ways, two cases each:
+
+- a changed value;
+- the create sent twice;
+- an edit to another customer with the agent's own key;
+- that edit 5 s after the check;
+- a lost reply (correct end state).
+
+There were also four correct creates.
+
+| | Result |
+|---|---|
+| Harms caught | 8 of 8; the 2 late edits were caught on the recheck |
+| Correct writes CONFIRMED, at the check and the recheck | 5 of 5 |
+| Agent writes equal proxy writes | yes |
+| The shadow's database accounts | SELECT only; the frame's account also has SHOW VIEW and TRIGGER, to read trigger definitions |
+| Added per write, median / largest | 292 / 321 ms |
+
+The read before a SQL write is a whole-database snapshot, so it adds more
+time than a FHIR search does. The fixture and contract are internal, so this
+run's data is kept with them rather than here.
+
## What it doesn't cover
- **Values the agent was told.** The shadow checks that the store holds
diff --git a/packages/flow/openadapt_flow/shadow_report.py b/packages/flow/openadapt_flow/shadow_report.py
index bd11fbe9d8..defeb25351 100644
--- a/packages/flow/openadapt_flow/shadow_report.py
+++ b/packages/flow/openadapt_flow/shadow_report.py
@@ -31,6 +31,8 @@ def _ms(values: list[float]) -> dict[str, float]:
),
(r"created ([2-9]|\d{2,}) \S+ records, not one", "saved more than once"),
(r"other record\(s\) are now also the person", "saved more than once"),
+ (r"observed conflicting, ([2-9]|\d{2,}) of 1 ", "saved more than once"),
+ (r"observed absent", "not saved as sent (a value differs, or nothing landed)"),
(r"wrong or missing", "a value differs from what the agent sent"),
(r"not given by the task", "holds a value the agent didn't send"),
(r"other resource|outside the declared write", "another record changed"),
diff --git a/packages/flow/tests/test_shadow_fhir.py b/packages/flow/tests/test_shadow_fhir.py
index aa9143f011..67eedb97c8 100644
--- a/packages/flow/tests/test_shadow_fhir.py
+++ b/packages/flow/tests/test_shadow_fhir.py
@@ -322,3 +322,5 @@ def test_kinds_name_how_a_write_landed_wrong() -> None:
)
both = ["wrong or missing: phone", "someone else changed the created record"]
assert kind_of(both) == "changed by someone else"
+ sql_dupe = ["record_written was refuted: observed conflicting, 2 of 1 expected"]
+ assert kind_of(sql_dupe) == "saved more than once"
From c2bc10b14fc5e5f3d6a368e8f5a8e5835bbb93ef Mon Sep 17 00:00:00 2001
From: abrichr
Date: Sat, 31 Oct 2026 14:39:10 -0400
Subject: [PATCH 10/12] Shadow mode: review round 3 (the recheck refutes a
value added to a closed record, a deleted record and a moved record whatever
else it sees; unknown later writes counted per write; pending rechecks shown
on the Confirmed tile; an unschedulable SQL recheck says so)
---
packages/flow/openadapt_flow/cli_shadow.py | 2 +-
packages/flow/openadapt_flow/shadow.py | 58 +++++++++++--
packages/flow/openadapt_flow/shadow_report.py | 11 ++-
packages/flow/tests/test_shadow.py | 14 ++++
packages/flow/tests/test_shadow_fhir.py | 84 +++++++++++++++++--
5 files changed, 148 insertions(+), 21 deletions(-)
diff --git a/packages/flow/openadapt_flow/cli_shadow.py b/packages/flow/openadapt_flow/cli_shadow.py
index 1fb4209976..57d4ea8aec 100644
--- a/packages/flow/openadapt_flow/cli_shadow.py
+++ b/packages/flow/openadapt_flow/cli_shadow.py
@@ -210,7 +210,7 @@ def cmd_shadow(args: argparse.Namespace) -> int:
for k, label in (
("late_refuted", "refuted on recheck"),
("late_uncertain", "uncertain on recheck"),
- ("rechecks_pending", "rechecks not run"),
+ ("rechecks_pending", "confirmed writes not yet rechecked"),
)
if doc.get(k)
)
diff --git a/packages/flow/openadapt_flow/shadow.py b/packages/flow/openadapt_flow/shadow.py
index f88e4a2179..74f15101f6 100644
--- a/packages/flow/openadapt_flow/shadow.py
+++ b/packages/flow/openadapt_flow/shadow.py
@@ -98,6 +98,9 @@ class Episode:
recheck_from: Any = None # fhir: the server time the recheck reads from
late_verdict: str = ""
late_reasons: list[str] = field(default_factory=list)
+ #: The recheck read the record itself and found it changed or gone (a
+ #: finding no later write of the agent's can explain away).
+ late_moved: bool = False
def _body_doc(body: bytes, content_type: str) -> Any:
@@ -615,9 +618,17 @@ def _schedule_recheck(self, ep: Episode) -> None:
elif ep.kind == "sql" and getattr(ep.result, "recheck_due_at", None):
from datetime import datetime
- due = datetime.fromisoformat(
- ep.result.recheck_due_at.replace("Z", "+00:00")
- )
+ try:
+ due = datetime.fromisoformat(
+ str(ep.result.recheck_due_at).replace("Z", "+00:00")
+ )
+ except ValueError:
+ ep.late_verdict = UNCERTAIN
+ ep.late_reasons = [
+ "the recheck couldn't be scheduled: its due time "
+ f"{ep.result.recheck_due_at!r} can't be read"
+ ]
+ return
ep.recheck_at = due.timestamp()
def pending_rechecks(self) -> int:
@@ -657,7 +668,7 @@ def run_rechecks(self, *, now: bool = False, only: Optional[list] = None) -> Non
ep.late_reasons = [f"the recheck failed: {exc!r}"]
self._note_error(traceback.format_exc(limit=3))
with self._lock:
- if ep.late_verdict == REFUTED:
+ if ep.late_verdict == REFUTED and not ep.late_moved:
unknown = self._unexplained_later(ep)
if unknown:
ep.late_verdict = UNCERTAIN
@@ -695,7 +706,13 @@ def _unexplained_later(self, ep: Episode) -> int:
n = 0
for o in self._later(ep):
if ep.kind == "fhir":
- n += not o.refs
+ # Per write: a create whose reply didn't come back may have
+ # made a record no one knows, even in an episode that has one.
+ n += sum(
+ 1
+ for w in o.writes
+ if w.status // 100 != 2 and (w.method == "POST" or not o.refs)
+ )
else:
n += not (o.kind == "sql" and o.contract is ep.contract and o.result)
return n
@@ -731,6 +748,7 @@ def _recheck_fhir(self, ep: Episode) -> None:
Baseline,
FhirReader,
Unreadable,
+ extra_elements,
is_person,
verify_ensure,
wrong_fields,
@@ -749,8 +767,14 @@ def _recheck_fhir(self, ep: Episode) -> None:
try:
_, now = reader.fetch(f"{reader.base_url}/{ref}")
except Unreadable as exc:
- ep.late_verdict = UNCERTAIN
- ep.late_reasons = [f"the confirmed record can't be read again: {exc}"]
+ gone = re.search(r"returned HTTP (404|410)\b", str(exc))
+ ep.late_moved = bool(gone)
+ ep.late_verdict = REFUTED if gone else UNCERTAIN
+ ep.late_reasons = [
+ f"since the first check: the confirmed record is gone (HTTP {gone[1]})"
+ if gone
+ else f"the confirmed record can't be read again: {exc}"
+ ]
return
moved: list[str] = []
if not isinstance(now, dict) or not is_person(contract, now, ep.params):
@@ -761,12 +785,25 @@ def _recheck_fhir(self, ep: Episode) -> None:
moved.append(
"the confirmed record now holds other values: " + ", ".join(wrong)
)
+ extra = extra_elements(contract, now, ep.params) if contract.closed else []
+ if extra:
+ moved.append(
+ "the confirmed record now holds values the agent didn't send: "
+ + ", ".join(extra)
+ )
+ ep.late_moved = bool(moved)
# Since the first check, the confirmed record is the one that was
# already there: the agent may write nothing more, and it must still
# be the only record that is the person.
since = Baseline(started=ep.recheck_from, matches={rid: now})
r = verify_ensure(contract, ep.params, since, declared=declared)
reasons = list(moved)
+ with self._lock:
+ again = any(ref in o.refs for o in self._later(ep))
+ if again and r.outcome != "found_existing":
+ reasons.append(
+ "the agent wrote to the confirmed record again after the check"
+ )
if r.outcome != "found_existing":
n = int(r.evidence.get("agent_writes") or 0)
if n:
@@ -776,9 +813,12 @@ def _recheck_fhir(self, ep: Episode) -> None:
)
reasons += list(r.reasons)
ep.late_reasons = [f"since the first check: {x}" for x in reasons]
- if r.evidence.get("unreadable"):
+ # The record read directly outranks a change feed that can't be read.
+ if moved:
+ ep.late_verdict = REFUTED
+ elif r.evidence.get("unreadable"):
ep.late_verdict = UNCERTAIN
- elif moved or r.outcome != "found_existing":
+ elif r.outcome != "found_existing":
ep.late_verdict = REFUTED
else:
ep.late_verdict = CONFIRMED
diff --git a/packages/flow/openadapt_flow/shadow_report.py b/packages/flow/openadapt_flow/shadow_report.py
index defeb25351..c230746e58 100644
--- a/packages/flow/openadapt_flow/shadow_report.py
+++ b/packages/flow/openadapt_flow/shadow_report.py
@@ -30,7 +30,7 @@ def _ms(values: list[float]) -> dict[str, float]:
"saved as another record first, then corrected",
),
(r"created ([2-9]|\d{2,}) \S+ records, not one", "saved more than once"),
- (r"other record\(s\) are now also the person", "saved more than once"),
+ (r"other record\(s\) are now also the person", "a duplicate of the record exists"),
(r"observed conflicting, ([2-9]|\d{2,}) of 1 ", "saved more than once"),
(r"observed absent", "not saved as sent (a value differs, or nothing landed)"),
(r"wrong or missing", "a value differs from what the agent sent"),
@@ -215,8 +215,15 @@ def _item(c: dict[str, Any]) -> str:
def render_html(doc: dict[str, Any], setup: dict[str, Any] | None = None) -> str:
n = doc["counts"]
+ pending = doc.get("rechecks_pending") or 0
tiles = "".join(
- f"{n[v]}{v.title()}"
+ f"{n[v]}{v.title()}"
+ + (
+ f"
{pending} not yet rechecked"
+ if v == "CONFIRMED" and pending
+ else ""
+ )
+ + ""
for v in (*ORDER, "PENDING")
if v != "PENDING" or n[v]
)
diff --git a/packages/flow/tests/test_shadow.py b/packages/flow/tests/test_shadow.py
index 8d007e106b..2c4bff6923 100644
--- a/packages/flow/tests/test_shadow.py
+++ b/packages/flow/tests/test_shadow.py
@@ -333,3 +333,17 @@ def test_a_later_write_under_no_route_makes_a_late_refutation_uncertain(
ep = sh.episodes[0]
assert ep.late_verdict == "UNCERTAIN", ep.late_reasons
assert "can't tell apart" in ep.late_reasons[0]
+
+
+def test_a_sql_recheck_that_cant_be_scheduled_says_so(tmp_path: Path) -> None:
+ db = _db(tmp_path)
+ sh = _shadow(tmp_path, App(db), db)
+
+ class Odd:
+ recheck_due_at = "not a time"
+
+ ep = shadow_mod.Episode(id=1, kind="sql", name="x", verdict="CONFIRMED")
+ ep.result = Odd()
+ sh._schedule_recheck(ep)
+ sh.stop()
+ assert ep.late_verdict == "UNCERTAIN" and "can't be read" in ep.late_reasons[0]
diff --git a/packages/flow/tests/test_shadow_fhir.py b/packages/flow/tests/test_shadow_fhir.py
index 67eedb97c8..36077a0dac 100644
--- a/packages/flow/tests/test_shadow_fhir.py
+++ b/packages/flow/tests/test_shadow_fhir.py
@@ -220,12 +220,7 @@ def test_a_confirmed_write_is_checked_again_and_a_late_change_refutes_it(
def _stored(patient: str) -> dict[str, Any]:
- return {
- **_allergy(patient),
- "id": "a1",
- "clinicalStatus": {"coding": [{"code": "active"}]},
- "verificationStatus": {"coding": [{"code": "confirmed"}]},
- }
+ return {**_allergy(patient), "id": "a1"}
def test_the_recheck_refutes_a_confirmed_record_changed_to_another_patient(
@@ -281,11 +276,10 @@ def test_a_write_during_a_recheck_makes_it_uncertain(env: dict[str, Any]) -> Non
def test_a_later_write_with_no_known_record_makes_a_late_refutation_uncertain(
- env: dict[str, Any],
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
) -> None:
sh = env["sh"]
- _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
- sh.flush()
+ _confirmed(env, monkeypatch)
env["fhir"].status = 504 # a later create whose reply is lost
_send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p2"))
env["calls"]["outcome"] = "needs_review"
@@ -320,7 +314,79 @@ def test_kinds_name_how_a_write_landed_wrong() -> None:
assert kind_of(["the agent created 2 Patient records, not one"]) == (
"saved more than once"
)
+ assert kind_of(["1 other record(s) are now also the person"]) == (
+ "a duplicate of the record exists"
+ )
both = ["wrong or missing: phone", "someone else changed the created record"]
assert kind_of(both) == "changed by someone else"
sql_dupe = ["record_written was refuted: observed conflicting, 2 of 1 expected"]
assert kind_of(sql_dupe) == "saved more than once"
+
+
+def _confirmed(env: dict[str, Any], monkeypatch: pytest.MonkeyPatch) -> dict:
+ stored = {"now": _stored("Patient/p1")}
+
+ def fetch(self: Any, url: str, params: Any = None) -> Any:
+ if isinstance(stored["now"], Exception):
+ raise stored["now"]
+ return {}, stored["now"]
+
+ monkeypatch.setattr(ensure_record.FhirReader, "fetch", fetch)
+ _send(env["sh"], "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p1"))
+ env["sh"].flush()
+ env["calls"]["outcome"] = "found_existing"
+ return stored
+
+
+def test_a_value_added_to_a_closed_record_after_the_check_refutes(
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
+) -> None:
+ stored = _confirmed(env, monkeypatch)
+ stored["now"] = {**_stored("Patient/p1"), "note": [{"text": "anaphylaxis"}]}
+ env["sh"].run_rechecks(now=True)
+ ep = env["sh"].episodes[0]
+ assert ep.late_verdict == "REFUTED" and "didn't send" in ep.late_reasons[0]
+
+
+def test_a_moved_record_stays_refuted_beside_an_unknown_later_write(
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
+) -> None:
+ stored = _confirmed(env, monkeypatch)
+ env["fhir"].status = 504
+ _send(env["sh"], "POST", "/fhir/R4/Observation", {"resourceType": "Observation"})
+ env["sh"].flush()
+ stored["now"] = _stored("Patient/p2")
+ env["calls"]["outcome"] = "needs_review"
+ env["calls"]["ev"] = {"unreadable": True} # and the change feed is flaky
+ env["sh"].run_rechecks(now=True)
+ assert env["sh"].episodes[0].late_verdict == "REFUTED"
+
+
+def test_a_deleted_record_is_refuted_and_an_unreachable_one_uncertain(
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
+) -> None:
+ stored = _confirmed(env, monkeypatch)
+ stored["now"] = ensure_record.Unreadable("GET x returned HTTP 404")
+ env["sh"].run_rechecks(now=True)
+ ep = env["sh"].episodes[0]
+ assert ep.late_verdict == "REFUTED" and "is gone (HTTP 404)" in ep.late_reasons[0]
+ ep.late_verdict = ""
+ stored["now"] = ensure_record.Unreadable("GET x returned HTTP 503")
+ env["sh"].run_rechecks(now=True)
+ assert ep.late_verdict == "UNCERTAIN"
+
+
+def test_a_lost_retry_in_a_known_episode_makes_a_late_refutation_uncertain(
+ env: dict[str, Any], monkeypatch: pytest.MonkeyPatch
+) -> None:
+ _confirmed(env, monkeypatch)
+ sh = env["sh"]
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p5"))
+ env["fhir"].status = 504
+ _send(sh, "POST", "/fhir/R4/AllergyIntolerance", _allergy("Patient/p5"))
+ env["calls"]["outcome"] = "created_verified"
+ sh.flush()
+ env["calls"]["outcome"] = "needs_review"
+ env["calls"]["ev"] = {"agent_writes": 1}
+ sh.run_rechecks(now=True, only=[sh.episodes[0]])
+ assert sh.episodes[0].late_verdict == "UNCERTAIN"
From 55131ed82aa0a70e04e468a3677b42353f9779d0 Mon Sep 17 00:00:00 2001
From: abrichr
Date: Sat, 31 Oct 2026 14:39:28 -0400
Subject: [PATCH 11/12] Shadow mode: docs for the round-3 recheck rules
---
packages/flow/docs/SHADOW_MODE.md | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/packages/flow/docs/SHADOW_MODE.md b/packages/flow/docs/SHADOW_MODE.md
index 36311ea8a3..11c706037d 100644
--- a/packages/flow/docs/SHADOW_MODE.md
+++ b/packages/flow/docs/SHADOW_MODE.md
@@ -80,8 +80,9 @@ answered. So each `CONFIRMED` is checked again:
- `fhir`: `recheck_s` after the check (default 300 s), `verify_ensure`
reads the server again over the window since the first check, with the
confirmed record as the one already there. It refutes when the record is
- gone, is no longer the person, holds a value other than the one sent, or
- has a duplicate, and when the agent's credential wrote anything since
+ gone, is no longer the person, holds a value other than the one sent (or,
+ under a closed contract, a value the agent didn't send), or has a
+ duplicate, and when the agent's credential wrote anything since
that no other write through the shadow explains (a write to the confirmed
record itself never counts as explained). `--recheck-s 0` turns it off.
- `sql`: when the contract's `frame.database.recheck_after_s` is due,
@@ -99,8 +100,9 @@ A recheck reads a window, not one record. A change in it by the agent's
credential that no write through the shadow explains refutes every
`CONFIRMED` whose window holds it, not only the write it came from. If the
agent made a later write through the shadow whose record the recheck can't
-know (a lost reply, a write under no contract), a refutation becomes
-`UNCERTAIN` instead.
+know (a lost reply, a write under no contract), a refutation that rests on
+such a change becomes `UNCERTAIN` instead. A refutation from reading the
+record itself (gone, moved, changed) stays `REFUTED`.
## Where the contract comes from
From 301c31b5e90145a9442c59583cba2869b5546a01 Mon Sep 17 00:00:00 2001
From: abrichr
Date: Sat, 31 Oct 2026 14:42:22 -0400
Subject: [PATCH 12/12] Shadow mode: register the result files in the public
artifact inventory; drop copied contracts
---
.../setup/vendor/contracts/allergy.yaml | 35 ----------------
.../setup/vendor/contracts/appointment.yaml | 29 --------------
.../setup/vendor/contracts/patient.yaml | 40 -------------------
packages/flow/public-artifacts.json | 10 +++++
4 files changed, 10 insertions(+), 104 deletions(-)
delete mode 100644 packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/allergy.yaml
delete mode 100644 packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/appointment.yaml
delete mode 100644 packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/patient.yaml
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/allergy.yaml b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/allergy.yaml
deleted file mode 100644
index 86f6f1c336..0000000000
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/allergy.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
-# Record an allergy for a patient exactly once, checked through FHIR only.
-schema_version: openadapt.ensure-record/v1
-resource_type: AllergyIntolerance
-base_url: ${BENCH_FHIR_URL}
-access_token_env: BENCH_RECORD_TOKEN
-self: ["${BENCH_AGENT_REF}"]
-
-fields:
- patient: {path: patient.reference}
- code_system: {path: code.coding.system}
- code: {path: code.coding.code}
- criticality: {path: criticality}
- clinical_status: {path: clinicalStatus.coding.code}
- verification_status: {path: verificationStatus.coding.code}
-
-identity:
- - [patient, code]
-search: {patient: patient}
-
-closed: true
-allow:
- - patient.display
- - code.text
- - code.coding.display
- - clinicalStatus.coding.system="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"
- - clinicalStatus.coding.display
- - verificationStatus.coding.system="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"
- - verificationStatus.coding.display
-
-change_feed:
- audit: {heartbeat: true}
- history: true
- history_author: false
- sweep_types: [Patient, AllergyIntolerance, Appointment, Observation, Condition, Encounter]
-settle_s: 1
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/appointment.yaml b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/appointment.yaml
deleted file mode 100644
index cb67b5602e..0000000000
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/appointment.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-# Book an appointment exactly once, checked through FHIR only.
-schema_version: openadapt.ensure-record/v1
-resource_type: Appointment
-base_url: ${BENCH_FHIR_URL}
-access_token_env: BENCH_RECORD_TOKEN
-self: ["${BENCH_AGENT_REF}"]
-
-fields:
- status: {path: status}
- start: {path: start, compare: instant}
- end: {path: end, compare: instant}
- patient: {path: "participant[actor.reference^=Patient/].actor.reference"}
- practitioner: {path: "participant[actor.reference^=Practitioner/].actor.reference"}
-
-identity:
- - [patient, start]
-search: {patient: patient}
-
-closed: true
-allow:
- - participant.status="accepted"
- - participant.actor.display
-
-change_feed:
- audit: {heartbeat: true}
- history: true
- history_author: false
- sweep_types: [Patient, AllergyIntolerance, Appointment, Observation, Condition, Encounter]
-settle_s: 1
diff --git a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/patient.yaml b/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/patient.yaml
deleted file mode 100644
index 5b1dfb5b60..0000000000
--- a/packages/flow/benchmark/fhir_medplum/public/results/shadow/setup/vendor/contracts/patient.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Register a person on Medplum exactly once, checked through FHIR only.
-# The same shape as ../../readpath/ensure_patient.yaml, with the task's
-# parameter names, and the `use` codes FHIR clients commonly add allowed.
-schema_version: openadapt.ensure-record/v1
-resource_type: Patient
-base_url: ${BENCH_FHIR_URL}
-access_token_env: BENCH_RECORD_TOKEN
-self: ["${BENCH_AGENT_REF}"]
-
-fields:
- given: {path: name.given, compare: casefold}
- family: {path: name.family, compare: casefold}
- birthDate: {path: birthDate, compare: date}
- gender: {path: gender}
- line: {path: address.line, compare: casefold}
- city: {path: address.city, compare: casefold}
- state: {path: address.state}
- postalCode: {path: address.postalCode}
- phone: {path: "telecom[system=phone].value", compare: digits}
- email: {path: "telecom[system=email].value", compare: casefold}
-
-identity:
- - [given, family, birthDate]
- - [email]
-search: {given: given, family: family, birthDate: birthdate, email: email}
-
-closed: true
-allow:
- - active=true
- - name.use="official"
- - address.use="home"
- - telecom.use="home"
- - telecom.use="mobile"
-
-change_feed:
- audit: {heartbeat: true}
- history: true
- history_author: false
- sweep_types: [Patient, AllergyIntolerance, Appointment, Observation, Condition, Encounter]
-settle_s: 1
diff --git a/packages/flow/public-artifacts.json b/packages/flow/public-artifacts.json
index 023180f5a1..9e433c47fe 100644
--- a/packages/flow/public-artifacts.json
+++ b/packages/flow/public-artifacts.json
@@ -198,6 +198,16 @@
"benchmark/fhir_medplum/public/results/corrections/main/scripted-fix/results.json",
"benchmark/fhir_medplum/public/results/corrections/main/scripted/results.json",
"benchmark/fhir_medplum/public/results/scripted/results.json",
+ "benchmark/fhir_medplum/public/results/shadow/claude/shadow-run.json",
+ "benchmark/fhir_medplum/public/results/shadow/claude/shadow/report.html",
+ "benchmark/fhir_medplum/public/results/shadow/claude/shadow/report.json",
+ "benchmark/fhir_medplum/public/results/shadow/scripted/shadow-run.json",
+ "benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.html",
+ "benchmark/fhir_medplum/public/results/shadow/scripted/shadow/report.json",
+ "benchmark/fhir_medplum/public/results/shadow/setup/report/report.html",
+ "benchmark/fhir_medplum/public/results/shadow/setup/report/report.json",
+ "benchmark/fhir_medplum/public/results/shadow/setup/setup-timing.json",
+ "benchmark/fhir_medplum/public/results/shadow/setup/vendor/shadow.yaml",
"benchmark/fhir_medplum/readpath/ensure_patient.yaml",
"benchmark/fhir_medplum/readpath/generated/channel.json",
"benchmark/fhir_medplum/readpath/generated/channels.json",