Report-type routing
Keeps CARE 2013, CONSORT 2025, SPIRIT 2025, ICH E3/E3 Q&A, and aggregate-safety routes distinct.
Verified facts → structured drafts → deterministic checks → qualified review
Clinical Reports organizes verified, authorized synthetic, de-identified, or aggregate facts while keeping missing data, conflicts, and pending review visible. It is not an AI doctor and does not make professional decisions.
Missing input stays missing/BLOCKED. The structural state changes only after an already verified fact is explicitly linked. A successful result still does not authorize clinical use, signature, filing, or submission.
These capabilities come only from the current repository SKILL.md, scripts, assets, and references, with a strict separation between structural support, deterministic checks, and decisions reserved for qualified professionals.
Keeps CARE 2013, CONSORT 2025, SPIRIT 2025, ICH E3/E3 Q&A, and aggregate-safety routes distinct.
The generator copies fixed JSON/CSV assets only—no interpolation, clinical completion, or default overwrite.
Checks keys, statuses, and source-fact references for CARE, ICH E3, CONSORT 2025, and SPIRIT 2025.
Checks local locators, SHA-256 metadata, claim links, dates, units, n/N percentages, and totals without choosing an authoritative source.
Accepts aggregate rows plus sidecar metadata; rejects patient/subject/case identifiers, narratives, and onset dates.
Terminology checks schema/syntax or exact local-dictionary matches; de-identification checks process documentation. Radiology, pathology, and lab assets are field-map scaffolds.
Unsupported content remains missing. The scripts do not open patient narratives, call external models, or make clinical or regulatory decisions.
Synthetic, de-identified, or aggregate facts with explicit purpose, authority, and minimum necessary scope.
Stop when boundaries are unmet; real PHI never enters examples, logs, or external services.
Local locator, field path, value hash, and verifier role/date.
Choose CARE, CONSORT, SPIRIT, ICH E3, or aggregate route by artifact.
Templates begin BLOCKED with missing/null fields; no automatic completion.
Structure, references, schema, arithmetic, and process documentation.
Qualified clinical, statistical, safety, privacy/legal, QA, regulatory, or author review.
Three Chinese runs and three English runs were executed and retained separately. Deterministic tools can return matching states for matching schemas; each language has its own prompt, input, commands, artifacts, and logs.
Cover the CARE structure only with verified synthetic source-fact IDs; unsupported items remain missing.
{
"allowed_data_class": "synthetic",
"verified_items": [
"care_items.title",
"care_items.key_words",
"care_items.abstract",
"care_items.introduction",
"care_items.clinical_findings",
"care_items.timeline",
"care_items.discussion"
],
"unsupported_items_remain_missing": [
"patient_information",
"diagnostic_assessment",
"therapeutic_intervention",
"follow_up_and_outcomes",
"patient_perspective",
"informed_consent"
],
"contains_phi": false,
"draft_warning": "DRAFT — NOT FOR CLINICAL USE, SIGNATURE, FILING, OR SUBMISSION. Populate only from verified authorized source records. Qualified review and sign-off are required."
}python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/generate_report_template.py --type case-report --output generated-template.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/provenance_validator.py provenance-manifest.json -o provenance-validation.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/check_deidentification.py deidentification-process.json -o deidentification-validation.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/validate_case_report.py populated-case-report.json -o care-validation.json
{
"draft_status": "BLOCKED_INCOMPLETE_DRAFT_NOT_FOR_CLINICAL_USE_OR_SUBMISSION",
"verified_present": [
"abstract",
"clinical_findings",
"discussion",
"introduction",
"key_words",
"timeline",
"title"
],
"unsupported_or_blocking": [
"care_items.patient_information is missing",
"care_items.diagnostic_assessment is missing",
"care_items.therapeutic_intervention is missing",
"care_items.follow_up_and_outcomes is missing",
"care_items.patient_perspective is missing",
"care_items.informed_consent is missing",
"privacy.deidentification_process_record must be a string",
"privacy.publication_consent_record must be a string",
"privacy.reidentification_risk_reviewed must be true"
]
}{
"care": "BLOCKED",
"provenance": "TRACEABILITY_COMPLETE_REVIEW_REQUIRED",
"deidentification_process": "PROCESS_DOCUMENTED_REVIEW_REQUIRED",
"review_required": true,
"authorizes_clinical_use_or_submission": false
}CARE remains BLOCKED: six CARE items are missing and privacy/publication gates remain incomplete—the intended fail-closed behavior.
Structural coverage for aggregate trial metadata: missing → link an existing verified fact → validation state changes.
{
"allowed_data_class": "aggregate",
"route": "ICH E3 Step 4 1995-11-30 with Q&A R1 2012-07-06",
"before": "safety_evaluation remains missing",
"after": "only pre-existing verified fact-case02-12 is linked",
"contains_participant_level_data": false,
"draft_warning": "DRAFT — NOT FOR CLINICAL USE, SIGNATURE, FILING, OR SUBMISSION. Populate only from verified authorized source records. Qualified review and sign-off are required."
}python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/generate_report_template.py --type csr --output generated-template.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/provenance_validator.py provenance-manifest.json -o provenance-validation.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/validate_trial_report.py csr-before.json -o validation-before.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/validate_trial_report.py csr-after.json -o validation-after.json
{
"before": {
"safety_evaluation": "missing"
},
"verified_change": "fact-case02-12 -> sections.safety_evaluation",
"after": {
"safety_evaluation": "verified_present"
},
"draft_status": "BLOCKED_INCOMPLETE_DRAFT_NOT_FOR_FILING_OR_SUBMISSION"
}{
"before": {
"status": "BLOCKED",
"errors": [
"sections.safety_evaluation is missing"
]
},
"after": {
"status": "STRUCTURE_COMPLETE_REVIEW_REQUIRED",
"errors": [],
"warnings": [
"review.medical_review remains required",
"review.statistical_review remains required",
"review.safety_review remains required",
"review.privacy_legal_review remains required",
"review.quality_review remains required",
"review.regulatory_review remains required"
]
},
"review_required": true,
"authorizes_clinical_use_or_submission": false
}Only the pre-defined verified fact-case02-12 was added—nothing inferred. The result is STRUCTURE_COMPLETE_REVIEW_REQUIRED, not submission readiness.
Format synthetic aggregate counts as review-only Markdown and check arithmetic, provenance, terminology syntax, and data-handling process.
analysis_set,treatment_group,meddra_version,system_organ_class,preferred_term,subjects_affected,event_count,denominator
Synthetic Safety Set,Control,29.0,Synthetic SOC A,Synthetic event alpha,4,5,40
Synthetic Safety Set,Intervention,29.0,Synthetic SOC A,Synthetic event alpha,5,7,42
Synthetic Safety Set,Control,29.0,Synthetic SOC A,Synthetic event beta,2,2,40
Synthetic Safety Set,Intervention,29.0,Synthetic SOC A,Synthetic event beta,3,3,42
Synthetic Safety Set,Control,29.0,Synthetic SOC B,Synthetic event gamma,1,1,40
{
"allowed_data_class": "aggregate",
"row_count": 5,
"contains_identifiers": false,
"contains_narratives": false,
"individual_case_decision": "prohibited",
"draft_warning": "DRAFT — NOT FOR CLINICAL USE, SIGNATURE, FILING, OR SUBMISSION. Populate only from verified authorized source records. Qualified review and sign-off are required."
}python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/generate_report_template.py --type safety-aggregate --output generated-template.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/provenance_validator.py provenance-manifest.json -o provenance-validation.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/format_adverse_events.py aggregate-ae.csv --metadata aggregate-metadata.json --expected-meddra-version 29.0 --output aggregate-ae-table.md python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/terminology_validator.py terminology-manifest.json -o terminology-validation.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/check_deidentification.py deidentification-process.json -o deidentification-validation.json python3 /workspace/scratch/5f7e5f75d1ec/clinical-reports/scripts/consistency_checker.py consistency-manifest.json -o consistency-validation.json
# Draft aggregate adverse-event table > DRAFT — aggregate display only. Not an ICSR, reportability decision, clinical interpretation, filing, or submission. Qualified safety and statistical review is required. - Analysis set: Synthetic Safety Set - MedDRA version(s), as supplied and not terminology-validated: 29.0 - MedDRA language, as supplied: English - Counting rule, as supplied: Subjects counted once per supplied preferred term; events shown separately - Threshold rule, as supplied: All supplied aggregate rows displayed; missing cells remain em dash - Missing group/term cells are shown as an em dash and are not assumed to be zero. - Subjects and events are distinct; event counts may exceed subject counts. | System organ class | Preferred term | Control: subjects n/N (%) | Control: events | Intervention: subjects n/N (%) | Intervention: events | | --- | --- | --- | --- | --- | --- | | Synthetic SOC A | Synthetic event alpha | 4/40 (10.0%) | 5 | 5/42 (11.9%) | 7 | | Synthetic SOC A | Synthetic event beta | 2/40 (5.0%) | 2 | 3/42 (7.1%) | 3 | | Synthetic SOC B | Synthetic event gamma | 1/40 (2.5%) | 1 | — | — | Denominators by treatment group: Control N=40; Intervention N=42. No MedDRA semantic validation, deduplication, inference, causal assessment, or between-group testing was performed.
{
"formatter_exit_code": 0,
"provenance": "TRACEABILITY_COMPLETE_REVIEW_REQUIRED",
"consistency": "CONSISTENT_WITHIN_DECLARED_TOLERANCES_REVIEW_REQUIRED",
"terminology": "SCHEMA_VALID_SYNTAX_ONLY_REVIEW_REQUIRED",
"deidentification_process": "PROCESS_DOCUMENTED_REVIEW_REQUIRED",
"review_required": true
}The table shows subjects, events, and denominators only; missing combinations use an em dash. No MedDRA semantic validation, case assessment, causality, or between-group inference was performed.
These are operational boundaries proven by the current repository—not claims of compliance or clinical validity.
For clinical researchers, medical writers, trial reporting teams, aggregate safety reporting teams, regulatory documentation, and QA/review workflows. Organize verified facts into reviewable structures—without generating new medical conclusions.