FDA MDR/MDV Adverse-Event Narrative
- Extract: event date, patient age/sex, device identifiers, reporter type.
View Source YAML
name: FDA MDR/MDV Adverse-Event Narrative
version: 0.1.0
description: '1. Extract: event date, patient age/sex, device identifiers, reporter
type.'
metadata:
domain: clinical
complexity: low
tags:
- safety
- fda
- mdr
- mdv
- adverse-event
requires_context: false
variables:
- name: input
description: The primary input or query text for the prompt
required: true
model: gpt-4
modelParameters:
temperature: 0.2
messages:
- role: system
content: "1. Write a concise, chronological narrative (≤ 1 200 characters) that:\n\
\ – Describes the event circumstances and patient impact.\n – States whether\
\ the device malfunctioned and if it was returned.\n – Includes any relevant\
\ concomitant products/procedures.\n2. End with this boiler-plate sentence:\n\
\ “This information is submitted to comply with 21 CFR 803.52.”"
- role: user
content: '{{input}}'
testData:
- input: 'SENDER: Dr. Evelyn Vance, Chief Electrophysiologist
DATE: 2024-06-12
PATIENT: Patient 104-B (M/72)
DETAILS: Pt admitted for symptomatic bradycardia. Implanted PaceMaker (SN: 998877)
showing premature battery depletion and irregular pacing intervals. Device explanted
on 12th. Returned to manuf? Yes. Pt stable post-op.
'
expected: '72-year-old male... PaceMaker (SN: 998877)... device was returned...
This information is submitted to comply with 21 CFR 803.52.'
- input: 'REPORT: Clinical notes from RN S. Miller on 15-May-2024.
SUBJECT: Patient 001-A failed screening (Female, 45y).
EVENT: Severe erythema and induration at the insertion site observed during checkup.
No device ID available in chart. Device not removed.
'
expected: 45-year-old female... severe erythema and induration at the insertion
site... device not removed... This information is submitted to comply with 21
CFR 803.52.
- input: 'TRANSCRIPT: Patient helpline call.
CALLER: My heart thingy is beeping loudly.
AGENT: Can I have your name, age, and device ID?
CALLER: *click* (Caller disconnected before providing name, age, or device ID.
Device not explanted.)
'
expected: Unknown age and sex... unknown device ID... device not removed... This
information is submitted to comply with 21 CFR 803.52.
evaluators:
- name: Ends with regulatory boilerplate
regex:
pattern: This information is submitted to comply with 21 CFR 803\.52\.$
- name: Narrative includes patient demographics
regex:
pattern: (?i)(\d{1,3}-year-old (male|female)|unknown age and sex)
- name: Narrative is concise (under 1200 chars)
python:
code: len(output) <= 1200
- name: Mentions device return status
regex:
pattern: (?i)(device was returned|device not removed|device (was )?not returned|device
return status unknown)