1. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work. 2. Validate that the request matches the documented scope and stop early if the task would require unsupported as.
33
Quality
17%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./scientific-skills/Academic Writing/adverse-event-narrative/SKILL.mdscripts/main.py.references/ for task-specific guidance.Python: 3.10+. Repository baseline for current packaged skills.Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.cd "20260318/scientific-skills/Academic Writing/adverse-event-narrative"
python -m py_compile scripts/main.py
python scripts/main.py --helpExample run plan:
CONFIG block or documented parameters if the script uses fixed settings.python scripts/main.py with the validated inputs.See ## Workflow above for related details.
scripts/main.py.references/ contains supporting rules, prompts, or checklists.Use this command to verify that the packaged script entry point can be parsed before deeper execution.
python -m py_compile scripts/main.pyUse these concrete commands for validation. They are intentionally self-contained and avoid placeholder paths.
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --help
python scripts/main.py --validate-only --helpRegulatory-grade narrative generation tool that transforms adverse event case data into CIOMS-compliant ICSR narratives suitable for submission to FDA, EMA, and other health authorities.
Key Capabilities:
Generate standardized sections per CIOMS guidelines:
from scripts.narrative_generator import NarrativeGenerator
generator = NarrativeGenerator()
# Generate complete narrative
narrative = generator.generate(
case_data=case_json,
format="cioms_i", # or "ich_e2b", "fda_medwatch"
include_meddra=True
)
narrative.save("ICSR_2024_001_narrative.txt")Standard Sections:
Reconstruct timeline and assess temporal plausibility:
# Analyze temporal relationships
timeline = generator.analyze_timeline(
drug_start="2024-01-15",
drug_stop="2024-02-01",
ae_onset="2024-01-28",
dechallenge_date="2024-02-01",
rechallenge_date=None
)
# Output shows temporal assessment
# "AE onset 13 days after drug initiation, positive dechallenge within 24h"Assessments Generated:
Structure causality assessment per WHO-UMC criteria:
# Generate causality section
causality = generator.assess_causality(
case_data=case,
criteria="who_umc", # or "naranjo", "cochrane"
include_rationale=True
)
# Output structured assessment with points for each criterionWHO-UMC Categories:
Generate narratives for different regulatory contexts:
# FDA MedWatch Form 3500A
fda_narrative = generator.generate(
case_data=case,
format="fda_medwatch",
max_length=2000 # Character limit
)
# EMA E2B(R3) electronic format
ema_narrative = generator.generate(
case_data=case,
format="ich_e2b",
version="R3"
)
# CIOMS I paper format
cioms_narrative = generator.generate(
case_data=case,
format="cioms_i"
)Pre-Generation:
Narrative Content:
Post-Generation:
Completeness Issues:
❌ Missing dechallenge information → Cannot assess causality
❌ Vague temporal information → "Recently started" vs. specific dates
❌ Incomplete concomitant medication list → Alternative causes missed
Medical Accuracy Issues:
❌ Incorrect MedDRA coding → Wrong medical concept
❌ Confusing correlation with causation → Temporal = causal
❌ Omitting alternative diagnoses → Biased toward drug causation
Regulatory Issues:
❌ Opinion in narrative body → "Clearly caused by drug"
❌ Patient identifiers → HIPAA/privacy violation
❌ Abbreviations not defined → Assumes reader knowledge
Available in references/ directory:
cioms_i_guidelines.pdf - CIOMS I international reporting standardsich_e2b_specifications.md - ICH E2B(R3) electronic format detailsmeddra_coding_guide.md - MedDRA terminology and coding principleswho_umc_causality.md - WHO causality assessment criteriafda_medwatch_guide.md - FDA Form 3500A instructionsgvp_module_vi.md - EU Good Pharmacovigilance Practicesnarrative_templates.md - Example narratives by case typeLocated in scripts/ directory:
main.py - CLI interface for narrative generationnarrative_generator.py - Core narrative composition enginetemporal_analyzer.py - Timeline reconstruction and analysiscausality_assessor.py - Causality evaluation supportmeddra_integrator.py - Medical terminology and codingvalidator.py - Completeness and quality checksformat_converter.py - Convert between CIOMS, E2B, MedWatch formatsbatch_processor.py - Multi-case narrative generation⚠️ CRITICAL: This tool generates draft narratives for efficiency. All adverse event narratives require review by qualified drug safety physicians before regulatory submission. Causality assessment must be performed by healthcare professionals with access to complete medical records.
Every final response should make these items explicit when they are relevant:
scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.This skill accepts requests that match the documented purpose of adverse-event-narrative and include enough context to complete the workflow safely.
Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:
adverse-event-narrativeonly handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.
Use the following fixed structure for non-trivial requests:
If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.
4a48721
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.