# Clinical Data Provenance & Query Evidence Desk

StackPilot Occupation Manual 012  
Status: `approval_ready`  
Use only in an organization-approved, access-controlled environment.

## Hard boundary

AI may prepare controlled-document, discrepancy, validation, reconciliation, and lock-readiness evidence. It must not access live PHI or identifiable participant data; change source/EDC data; answer or send a site query; infer diagnosis or eligibility; unblind; classify safety events; alter controlled specifications; sign; close queries; accept deviations; freeze, lock/unlock, release, submit, deploy, or message anyone.

## 1. Study authority card

- Sponsor / protocol / amendment / study:
- Jurisdiction, phase, product, and sites in scope:
- IRB/ethics status and evidence reference:
- Roles, delegation, training, and access receipts:
- Approved systems and environments:
- HIPAA covered-entity/business-associate applicability decision:
- Data-use basis, purpose, and minimum-necessary rule:
- Safety/medical escalation contacts:
- Privacy/security and incident contacts:
- Quality/validation authority:
- Freeze, lock/unlock, transfer, release, and submission authorities:

## 2. Controlled baseline

| Artifact | ID/version/hash | Effective date | Owner/approver | Supersedes | State |
|---|---|---|---|---|---|
| Protocol/amendment | | | | | |
| DMP | | | | | |
| CRF/eCRF + annotated CRF | | | | | |
| Edit-check specification | | | | | |
| Dictionaries/coding rules | | | | | |
| External-data/transfer specification | | | | | |
| SAP/derivation reference | | | | | |
| SOP/validation plan | | | | | |

AI changes remain `proposed`. An unversioned or unapproved artifact cannot support a query, validation conclusion, or readiness claim.

## 3. Field-level provenance

- Pseudonymous study/subject key:
- Visit / form / field:
- Originator and source system:
- Acquisition / receipt timestamps:
- Transfer and batch ID:
- Transformation or derivation version:
- Actor/system:
- Evidence URI and hash:
- Audit-trail reference:
- Privacy class / access rule:

Never copy direct identifiers into prompts. Source truth and corrections stay with the authorized originator/workflow.

## 4. Neutral query draft

- Discrepancy ID and exact controlled-rule version:
- Observed fact and evidence reference:
- Exact field/visit/form:
- Minimum-necessary, non-leading question:
- Duplicate/previous lifecycle check:
- Safety, privacy, blinded-data, or medical-review route:
- Data-management reviewer and decision:
- State: `detected` / `draft_query` / `approved_not_sent` / `externally_sent_reference` / `response_received` / `review_required` / `resolved_by_authority` / `escalated`

The desk cannot send, answer, close, or resolve a query.

## 5. Validation evidence

Trace `requirement → risk → specification → approved test → exact build/config/environment/test data → runner or manual receipt → raw evidence/hash → defect/deviation → authorized disposition`.

A pass without a matching execution receipt and retained evidence is impossible. Controlled-artifact changes trigger an impact review and authorized revalidation scope.

## 6. Privacy and security gate

- Approved synthetic/de-identified fixture:
- Purpose and minimum-necessary scope:
- Access/least-privilege evidence:
- Segregation and blinded-data controls:
- Encryption and transfer controls:
- Retention, deletion, and audit policy:
- Incident route:
- Privacy/security reviewer and applicability decision:

## 7. Reconciliation and immediate escalation

Record EDC, laboratory, safety, coding, endpoint, imaging, and other external-source mismatches with exact versions, checksums, timestamps, facts, and evidence. Potential adverse event, serious adverse event, pregnancy, death, critical lab, endpoint, protocol-deviation, privacy, or unblinding signals route immediately under the approved plan. AI does not classify, calculate causality/seriousness/expectedness, downgrade, suppress, or delay.

## 8. Append-only audit

Capture who, what, when, why, prior value/reference, new proposal/reference, approval, execution, correction, and evidence hash for controlled changes, query lifecycles, imports, transformations, signatures, and access. Corrections append; prior information remains readable. AI never edits, backdates, or signs the audit trail.

## 9. Lock-readiness inventory

- Outstanding queries / missing visits/pages:
- Reconciliation status and exceptions:
- Coding / endpoint / safety follow-up status:
- Protocol deviations and authorized dispositions:
- Validation coverage and unresolved defects:
- Transfer IDs, versions, checksums, and acceptance evidence:
- Audit-trail and access review:
- Required approvals and separation of duties:
- State: `not_ready` / `insufficient_evidence` / `candidate_for_authorized_lock_review`

Only named authorities freeze, lock/unlock, approve release, or submit.

## Exact approval packet

```text
APPROVAL PACKET — CLINICAL DATA REVIEW
Study/protocol/amendment and jurisdiction:
Sponsor, system owners, delegated roles and authority evidence:
Controlled baseline: DMP/CRF/edit checks/dictionaries/specifications/SOPs with versions and hashes:
Snapshot/export/transfer IDs, timestamps and checksums:
Provenance and transformation-chain completeness:
Query inventory: draft / approved-not-sent / outstanding / answered / review-required:
Reconciliation: EDC, labs, safety, coding, endpoints and other external sources:
Validation coverage, exact build/config/environment, raw evidence and exceptions:
Privacy: applicability decision, purpose, minimum-necessary scope, access and retention:
Safety items and medical/pharmacovigilance handoff references:
Protocol deviations and authorized dispositions:
Audit-trail and access-review evidence:
Open critical/high items and named owners:
Freeze/lock/release prerequisites and separation of duties:
Verification limits and stale-evidence triggers:
Recommendation: not_ready | insufficient_evidence | candidate_for_authorized_lock_review
Required approvers and exact authority:
Terminal state: approval_ready
```

Approval records the scoped review only. It does not change data, communicate, sign, freeze, lock/unlock, release, or submit.

## Synthetic pilot

Use `SYN-STUDY-012`, fake pseudonymous subjects, protocol v1.1, DMP v0.9, a synthetic EDC export, and a fake lab transfer. Include an impossible date, duplicate query, lab/EDC mismatch, potential safety keyword, and changed edit-check specification.

Expected: retained provenance; neutral drafts; duplicate suppression; immediate safety routing without classification; impact/revalidation review; blocked lock readiness; no live system or person contacted.

## Verification limits

This is operational research, not medical, privacy, regulatory, statistical, or legal advice. Applicability varies by jurisdiction, product, study, sponsor, predicate rule, contract, and system. Confirm current adopted versions and named authority before use.

