← Knowledge library

IT & integrations

Integrate preparation and exactly-once commitment before canonical claim construction

Use the scoped supported API handoff, stable keys, timezone-aware expiry and independent readback without inventing a missing UI control.

14 min read · Source baseline f6e9f05f

Verification and applicability

Normal existing-root API commitment200/same-key200/different-key400, exact UI context and independent database records

Check your installed version, permissions and local configuration.

Before you begin

1. Read the case and exact performed-charge evidence first

GET /api/v1/facility/{facilityId}/revenue_cycle/{caseId}/ returns the case, preparation and commitment handoffs. Confirm intended facility/case/member binding, actual charge capture, package, service date, unit and source fingerprint. The observed charge is200SAR,1 each at18:58Z. Normal UI attestation is shown; no separate API editor or console is claimed by the screenshot.

After normal UI attestation the charge selector is replaced by No unattested billable charges loaded. Independent DB confirms one capture at18:58Z, quantity1 each, gross200SAR, is_late_charge unknown and the existing root actor. It does not change clinical orders or establish coverage.1234
Verify the saved performed-charge fact · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. After normal UI attestation the charge selector is replaced by No unattested billable charges loaded. Independent DB confirms one capture at18:58Z, quantity1 each, gross200SAR, is_late_charge unknown and the existing root actor. It does not change clinical orders or establish coverage.

  1. No unattested charge remains: Verify persistence independently, not just absence from a list.
  2. Estimate not presented: Attestation does not present a financial estimate.
  3. One captured charge: Charge integrity is a separate dimension.
  4. Readiness still0: No payer or tax clearance is inferred.

2. Prepare with stable event identity and explicit timezone

POST /api/v1/facility/{facilityId}/revenue_cycle/{caseId}/prepare-insured-visit/ with event_key and expires_at as a timezone-aware ISO datetime. A correction additionally supplies supersedes_id and a substantive correction_reason. The observed UI generated its event key and submitted expires_at2026-10-18T20:00:00+00:00. That historical expiry is not valid for a later operation. Normal response status is provisional_not_invoice_or_claim_clearance with id, source_sha256, amounts, service_date and exact lines. This does not authorize invoice/claim finalization.

The operator entered18Oct2026 11:00PM in browser timezone Asia/Riyadh and selected Prepare insured visit. This equals20:00UTC. The prior eligibility failures remain local validation records, not payer responses. The first incomplete IT fixture was refused for an empty benefit selector; that refusal and authorized fixture completion are retained in separate evidence.1234
Enter the approved local expiry before preparation · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. The operator entered18Oct2026 11:00PM in browser timezone Asia/Riyadh and selected Prepare insured visit. This equals20:00UTC. The prior eligibility failures remain local validation records, not payer responses. The first incomplete IT fixture was refused for an empty benefit selector; that refusal and authorized fixture completion are retained in separate evidence.

  1. Approved hold expiry: Use a timezone-aware approved instant; do not copy this expired training time into a later visit.
  2. Browser timezone: This frame explicitly shows Asia/Riyadh.
  3. Prepare insured visit: A successful result remains provisional.
  4. Local failed eligibility: Do not describe validation_failed as negative payer coverage.
Normal UI preparation saved one immutable snapshot:200gross,150allowed,30patient and120insurerSAR, one line, expiry20:00Z. It retains the explicit invoice/claim/submission disclaimer. Independent DB has empty reservation arrays: this specific example has no limit references or accumulator hold, despite generic panel language.1234
Read the persisted provisional amounts and expiry · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. Normal UI preparation saved one immutable snapshot:200gross,150allowed,30patient and120insurerSAR, one line, expiry20:00Z. It retains the explicit invoice/claim/submission disclaimer. Independent DB has empty reservation arrays: this specific example has no limit references or accumulator hold, despite generic panel language.

  1. Balanced provisional shares: 150 allowed equals30 patient plus120 insurer.
  2. Exact expiry and digest: Read the preparation expiry and evidence fingerprint.
  3. Provisional result: The toast explicitly leaves invoice and claim blocked.
  4. Riyadh timezone: The displayed11PM is20:00UTC.

3. Commit the latest unchanged preparation exactly once

POST /api/v1/facility/{facilityId}/revenue_cycle/{caseId}/commit-insured-visit/ with preparation_id and commitment_key. The observed request used preparation c74381aa-fd66-42ef-961f-f681d4905283 and stable key KB-FICTIONAL-CANONICAL-LOCAL-COMMITMENT-001. It returned200, commitment0e6694b2-fb0d-4ce2-963f-0f3ff11a96c5 and status committed_awaiting_tax_and_claim. The current UI has no commit button; its provisional preparation frame is context only, not a screenshot of the API request. Independently re-read the normal response and stored record.

Normal UI preparation saved one immutable snapshot:200gross,150allowed,30patient and120insurerSAR, one line, expiry20:00Z. It retains the explicit invoice/claim/submission disclaimer. Independent DB has empty reservation arrays: this specific example has no limit references or accumulator hold, despite generic panel language.1234
Read the persisted provisional amounts and expiry · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. Normal UI preparation saved one immutable snapshot:200gross,150allowed,30patient and120insurerSAR, one line, expiry20:00Z. It retains the explicit invoice/claim/submission disclaimer. Independent DB has empty reservation arrays: this specific example has no limit references or accumulator hold, despite generic panel language.

  1. Balanced provisional shares: 150 allowed equals30 patient plus120 insurer.
  2. Exact expiry and digest: Read the preparation expiry and evidence fingerprint.
  3. Provisional result: The toast explicitly leaves invoice and claim blocked.
  4. Riyadh timezone: The displayed11PM is20:00UTC.

4. Preserve idempotency and investigate ambiguous results

Same preparation and same commitment key returned the same commitment ID and timestamp. A second different key was refused400: visit preparation is already committed under another key. On ambiguous timeout inspect persisted case/commitment identity before any retry; do not generate a new key to force a second commitment. Source requires the latest reproducible unchanged preparation and refuses invalid reservations/expiry. These timeout, stale, correction and actual accumulator-reservation branches are separate tests, not claimed as executed here.

Normal UI preparation saved one immutable snapshot:200gross,150allowed,30patient and120insurerSAR, one line, expiry20:00Z. It retains the explicit invoice/claim/submission disclaimer. Independent DB has empty reservation arrays: this specific example has no limit references or accumulator hold, despite generic panel language.1234
Read the persisted provisional amounts and expiry · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. Normal UI preparation saved one immutable snapshot:200gross,150allowed,30patient and120insurerSAR, one line, expiry20:00Z. It retains the explicit invoice/claim/submission disclaimer. Independent DB has empty reservation arrays: this specific example has no limit references or accumulator hold, despite generic panel language.

  1. Balanced provisional shares: 150 allowed equals30 patient plus120 insurer.
  2. Exact expiry and digest: Read the preparation expiry and evidence fingerprint.
  3. Provisional result: The toast explicitly leaves invoice and claim blocked.
  4. Riyadh timezone: The displayed11PM is20:00UTC.

5. Build separately and preserve the resulting tax-pending state

Normal UI Build claim then saved one150SAR initial claim and one line tied to the immutable commitment. Construction does not supply legal tax determination, actual eligibility or licensed SBS coding. Read all eight clean-claim edits, submitted_atNULL and current processing/adjudication distinctions; no endpoint call was made to external transport.

One current claim MRCM-13F98CE7-01 contains one150SAR line with draft_tax_pending and8 clean-claim edits. The panel above still shows estimate Not Presented and eligibility Failed/authorization Not Requested. This is local construction only; claim submitted_at independently remainsNULL.1234
Verify the created draft and count its edits · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. One current claim MRCM-13F98CE7-01 contains one150SAR line with draft_tax_pending and8 clean-claim edits. The panel above still shows estimate Not Presented and eligibility Failed/authorization Not Requested. This is local construction only; claim submitted_at independently remainsNULL.

  1. Exact claim identity: Open this exact claim, not an older fixture.
  2. Draft tax pending: This is not ready, queued, accepted or adjudicated.
  3. Eight clean-claim edits: Investigate each edit in the workbench.
  4. Eligibility and authorization: Failure and not-requested remain distinct facts.
All eight persisted clean-claim edits are visible. One line retains the ownURN KB-CONSULT code, original gross200SAR, quantity1 each at09:58PM, allowed150 and patient30 in legacy columns. UI benefit decision says no determination, authorization unresolved and tax determination required. Attachment green badge means0 required/0 supplied, not that a complete real payer document set was reviewed.123456
Inspect all eight edits and the original line facts · 2026-10-18Recorded baseline screen · 1728 × 921
Capture details

Actual current MANSOQ isolated fictional training, original wide Chrome capture. All eight persisted clean-claim edits are visible. One line retains the ownURN KB-CONSULT code, original gross200SAR, quantity1 each at09:58PM, allowed150 and patient30 in legacy columns. UI benefit decision says no determination, authorization unresolved and tax determination required. Attachment green badge means0 required/0 supplied, not that a complete real payer document set was reviewed.

  1. SBS-first required: Local ownURN must not be relabeled as licensed SBS.
  2. Zero attachments required: Read the count; the green label is not evidence of uploaded documents.
  3. Own local vocabulary: KB-CONSULT remains explicitly fictional.
  4. Original gross200: Keep original charge distinct from allowed150.
  5. No determination shown: The read model does not expose a resolved benefit determination here.
  6. Tax determination required: No legal tax decision was fabricated.

Independent invariants verified

Direct read-only stored-record inspection confirms performed capture f048e7b9-2358-4b09-b9c8-be411d735378, preparation c74381aa-fd66-42ef-961f-f681d4905283, commitment0e6694b2-fb0d-4ce2-963f-0f3ff11a96c5 and claim0bb58a4a-74b4-4f65-9ba3-d0d183d89e09. Exactly one of each exists for this example; preparation shares balance150=30+120, reservation arrays are empty, claim has one150SAR ownURN line, eight edits and submitted_atNULL. The authored retained source v2 SHA256 is b855c13ca80ed412ba5192b15917023fe5b44e041d7bdd85f545990010d4bd5e. The financial input fingerprint0935de3a90667b52331ad5922f5e8c28bd6fc151b76a2ebf06d50c67aa9ca670 is a different identity and must not be confused with that source-file hash.

Source evidence

References are pinned to the private MANSOQ source repository. Repository access is required to open these links.