Completeness and clinical review
Two bars that must remain separate
Section titled “Two bars that must remain separate”BiobadamexAI distinguishes registry-enforced fields from the team’s disease-specific clinical documentation bar. Every report must name the bar. Calling the clinical bar a registry standard would attribute an internal rule to BIOBADAMEX.
Disease-specific completeness
Section titled “Disease-specific completeness”requiredFieldsFor(record) selects the variant before calculating missing fields:
- Rheumatoid arthritis uses confirmed components for that variant.
- Spondyloarthritis excludes TJC28, SJC28, and DAS-28 and does not invent BASDAI or ASDAS.
- Vasculitis may require BVAS under the confirmed rule.
- SLE and systemic sclerosis retain candidate instruments without choosing one while clinical ambiguity remains.
- Sjögren and unknown variant remain conservative.
Some historical comments in extraction.ts still describe a flat bar. Executable code calls requiredFieldsFor(record), and this documentation follows the tested implementation.
Draft and provenance
Section titled “Draft and provenance”Each draft has a correctable record, immutable agentRecord, reconciled DAS-28, missing fields, encrypted source, model, prompt fingerprint, ownership, reviewer, and submission state. The operational view reduces agent-human differences to counts and does not return clinical values.
Review
Section titled “Review”The clinician can view source, review disease-specific rows, correct allowed fields, recompute DAS-28 and missing fields, review biologic episodes, then approve or reject. Corrections modify record, never agentRecord, and create audit entries.
What blocks each step
Section titled “What blocks each step”| Step | UI | Backend |
|---|---|---|
| Approve | Requires confirmations, diagnosis, and episodes | Requires ownership and review_pending; does not receive UI ticks |
| Correct | Defined fields only | Validates path, tri-state, ownership, and state; recomputes |
| Reject | Explicit action | Requires ownership and review_pending |
| Submit | Confirmation drawer | Requires owner, approved, no missing required fields, flag, and valid payload |
The approval checklist is mainly client-side. The approval endpoint does not revalidate its ticks. The submission endpoint rechecks conditions that protect the external mutation.
The UI action says “Approve and send to registry,” but the endpoint only changes state to approved. Submission happens later from the terminal-state screen. The copy must not be read as an immediate external mutation.
Not performed is also a client-side waiver: it unlocks approval but does not change unknown, clear missingRequired, or create audit evidence. Later submission therefore remains blocked.
Undocumented comorbidities
Section titled “Undocumented comorbidities”If any remain unknown, the drawer and backend require explicit confirmation before converting only those comorbidities to false. Dates, activity, treatments, and other unknowns stay unchanged. The normalization is persisted and audited.
The preview is complete for the internal typed record, not every external form control. It may show indices or requested/current episodes the worker does not submit; the worker sends only previous episodes to the prior-treatment grid.
Interruption learning
Section titled “Interruption learning”Feedback records acted or dismissed. Disagreement is a dismissal reason, not a third state. Draft, prompt, and actor are upserted rather than duplicated. This ledger measures useful interruptions; it does not authorize submission.