Epilepsy Website Logo Tests and Investigation People sometimes think that imaging tests such as an EEG, CT scan or an MRI will determine that they have had a seizure. However, information from tests alone can’t always confirm that a seizure has occurred, or that the person has epilepsy. An EEG examines electrical activity in the brain. However, electrical changes are often only seen during a seizure. This means that when an EEG comes back normal, it could simply indicate that seizure activity was not occurring when the test was taken – it doesn’t mean that a seizure has not occurred at another time. An abnormal EEG can suggest that a person is more likely to have seizures which can be helpful to the doctor during the diagnosis period. However, an EEG can be abnormal for a variety of reasons unrelated to seizures. MRI and CT scans show how a person’s brain is structured and, sometimes, a possible cause for seizure activity can be seen on a scan. This may be small changes in how the brain tissue developed, blood vessel changes, or changes as a result of a tumour or traumatic brain injury. But, just like an EEG, the scans can show up as being normal in people who have had a witnessed or suspected seizure. It is also possible for a person to have an ‘abnormal’ CT or MRI and not have a diagnosis of epilepsy. Additional tests such as SPECT (single-photon emission computed tomography) and PET (positron emission tomography) scans may also be recommended. A PET scan provides information about how an organ or system in the body is working, and a SPECT scan shows how blood flows to tissues and organs – both scan can assist helping to identify seizure onset zones in the brain. However, not everyone will need to undergo these tests, and sometimes they are only used as part of pre-surgical evaluation. Often, people who are being assessed for epilepsy undergo a number of diagnostic tests. We have listed some of the most common tests below, but not all people will need to have all of these tests. Blood tests Blood tests are usually ordered as this can check the overall health of a person. Sometimes blood tests are ordered after a person has been diagnosed with epilepsy and they are receiving treatment. This may be for the doctor to keep an eye on the person’s general health, as well as their medication levels. Electroencephalogram (EEG) An EEG records electrical signals from the brain. Small discs, called electrodes, are placed on a person’s scalp using glue (which can be washed out!). The electrodes pick up the “brain waves” and the electrical activity is recorded by the EEG machine. The electrodes pick up electrical activity, but don’t give out electricity. It is a simple and painless test that does not involve needles and does not give electrical shocks. An EEG usually takes about an hour. For the best results, a person’s hair must be clean and dry, with no products (hairspray, gel or oil). During an EEG, patients are often asked to open and close their eyes, breathe deeply and look at flashing lights. Sometimes the doctor will request a ‘sleep-deprived’ EEG. This means the person will be asked to have fewer hours sleep the night before the test. A sleep deprived EEG is often ordered by the doctor if the person’s routine EEG was reported as normal. A person who is sleep deprived is more likely to have abnormal electrical activity recorded during the EEG that can help determine if the person has developed epilepsy. EEG/Video Monitoring Sometimes it is useful to perform an EEG over an extended period of time while a person is being monitored by a video camera. If an event is recorded, this allows the doctors to match the electrical activity recorded by the EEG with what the seizure looks like in real life. Ambulatory EEG (AEEG) Ambulatory electroencephalography (AEEG) monitoring is a new technology that allows prolonged electroencephalographic (EEG) recording. It is generally prescribed by a neurologist. However, it may be prescribed by other health professionals in certain circumstances. The test can last for up to several days, and may take place in the person’s home or a medical setting. Computed Tomography (CT) Scan This test looks for abnormalities or damage to the brain. During a CT scan the patient lies on a table which allows their head to be scanned by the CT scanner. Sometimes a special dye is injected into the arm to enhance image quality. CT scans are not suitable for women who are pregnant, as the x-rays could affect an unborn baby. Magnetic Resonance Imaging (MRI) Scan A MRI scan usually provides more detailed images of the brain than a CT scan. Before a MRI, the person is required to remove any metal objects such as jewellery, hearing aids, or hair clips. People who have a pacemaker or any other surgical implant containing metal may not be able to have an MRI scan, although some newer MRI machines can now be safely used by those with implanted devices – just speak to your doctor if you have any concerns about this. During a MRI scan, a person lies very still on a table inside a tunnel-shaped scanner. A handheld remote is given to hold, so the person can let the technician know if they are feeling uncomfortable or unwell during the scan. The technician will speak to the person and check they are OK. The scanner makes loud noises, so before it starts people are also given earplugs to wear or headphones to listen to music. Functional Magnetic Resonance Imaging (fMRI) Scan A fMRI is used to find out which parts of the person’s brain are affected by seizures, and what happens to their brain when a seizure occurs. This scan looks at how the brain is working, by looking at changes in blood flow while a person is performing different tasks. This may include reading specific words or passages, or looking at different objects and naming them. When people are being considered for surgery, a fMRI is often used to help doctors understand the possible effects of operating on parts of the brain. You can read more about epilepsy surgery and assessment here. Electrocardiogram (ECG) An ECG is used to record the heart’s electrical activity. Small metal tabs (called electrodes) are fixed to the skin on the arms, legs and chest with sticky paper. These electrodes pick up the electrical signals from the heart. Having an ECG does not hurt. An ECG will help to find out if the person has a heart condition, or is experiencing fainting (which can look like a seizure). Single-photon emission computed tomography (SPECT) Scan A SPECT scan measures blood flow in the brain. A safe, short-lived radioactive substance is injected into the arm of a person while they are having a seizure. A SPECT scan is only conducted during admission to an Epilepsy Monitoring Unit in a hospital, and is performed by specially trained healthcare staff (such as nurses). SPECT scans can assist doctors to better understand which region/s in the brain a seizure is coming from. Not all people who have epilepsy will necessarily need a SPECT scan, and it is often used as part of clinical neurosurgical evaluation. You can read more about epilepsy surgery and assessment here. SPECT scans are not suitable for women who are pregnant as the radioactive substance can affect an unborn baby. Positron Emission Tomography (PET) Scan A PET scan test shows the energy usage of a person’s brain. Like a SPECT scan, the person is injected with a safe, short-lived radioactive substance into the bloodstream. Once it has been absorbed, a scan is performed soon afterwards. Sometimes the test can take a couple of hours, so it is a good idea to wear comfortable clothing. The person usually needs to go without food and drink (fast) before the PET scan is performed. PET scans can assist doctors to better understand which region/s in the brain a seizure is coming from. Not all people who have epilepsy will necessarily need a PET scan, and it is often used as part of pre-surgical evaluation. You can read more about epilepsy surgery and assessment here. PET scans are not suitable for women who are pregnant as the radioactive substance can affect an unborn baby. Make presentation ppt for the investigation of epilepsy and seizure make ppt for presentation
ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/epil…
~/epilepsy-ppt/create_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Epilepsy: Tests and Investigations";
pres.author = "Epilepsy Education";
// ─── COLOR PALETTE ────────────────────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy – title / section headers
const MID_BG = "1B3A5C"; // medium navy – accent boxes
const LIGHT_BG = "EAF1FB"; // pale blue – content slides background
const ACCENT = "2A9D8F"; // teal – headings on light slides
const ACCENT2 = "E76F51"; // coral – highlights
const WHITE = "FFFFFF";
const DARK_TEXT = "0D1B2A";
const BODY_TEXT = "1E3A52";
// ─── HELPERS ──────────────────────────────────────────────────────────────────
function addSlideBackground(slide, color) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: "100%",
fill: { color },
line: { color, width: 0 }
});
}
function accentBar(slide, color = ACCENT) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.12, h: "100%",
fill: { color },
line: { color, width: 0 }
});
}
function topBanner(slide, color = MID_BG, h = 1.1) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h,
fill: { color },
line: { color, width: 0 }
});
}
function bottomBar(slide, color = ACCENT) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 5.35, w: "100%", h: 0.275,
fill: { color },
line: { color, width: 0 }
});
}
function infoBox(slide, x, y, w, h, fillColor, borderColor = null) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
rectRadius: 0.12,
fill: { color: fillColor },
line: { color: borderColor || fillColor, width: borderColor ? 1.5 : 0 }
});
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE SLIDE
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, DARK_BG);
// decorative teal diagonal band
s.addShape(pres.ShapeType.rect, {
x: 6.5, y: 0, w: 3.6, h: 5.625,
fill: { color: MID_BG },
line: { color: MID_BG, width: 0 }
});
s.addShape(pres.ShapeType.rect, {
x: 8.2, y: 0, w: 1.8, h: 5.625,
fill: { color: ACCENT, transparency: 55 },
line: { color: ACCENT, width: 0 }
});
// Epilepsy logo pill shape
infoBox(s, 0.45, 0.4, 2.4, 0.55, ACCENT);
s.addText("EPILEPSY WEBSITE", {
x: 0.45, y: 0.4, w: 2.4, h: 0.55,
fontSize: 9, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
s.addText("Tests &", {
x: 0.45, y: 1.25, w: 6, h: 0.85,
fontSize: 60, bold: true, color: WHITE, align: "left", valign: "top", margin: 0
});
s.addText("Investigations", {
x: 0.45, y: 2.0, w: 6, h: 0.85,
fontSize: 60, bold: true, color: ACCENT, align: "left", valign: "top", margin: 0
});
s.addText("for Epilepsy & Seizures", {
x: 0.45, y: 2.9, w: 6.2, h: 0.55,
fontSize: 22, bold: false, color: "A8C8E8", align: "left", valign: "top", margin: 0
});
s.addShape(pres.ShapeType.line, {
x: 0.45, y: 3.6, w: 5.5, h: 0,
line: { color: ACCENT2, width: 2 }
});
s.addText("A comprehensive guide to diagnostic testing", {
x: 0.45, y: 3.75, w: 6, h: 0.4,
fontSize: 13, italic: true, color: "7AADC8", align: "left", valign: "top", margin: 0
});
bottomBar(s, ACCENT2);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 – OVERVIEW / KEY POINT
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT);
topBanner(s, MID_BG, 1.05);
s.addText("Overview", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 28, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
// Key message box
infoBox(s, 0.25, 1.2, 9.5, 1.1, MID_BG);
s.addText([
{ text: "Important: ", options: { bold: true, color: ACCENT2 } },
{ text: "Imaging and electrical tests alone CANNOT always confirm that a seizure has occurred or that a person has epilepsy. Diagnosis relies on clinical history combined with test results.", options: { color: WHITE } }
], {
x: 0.35, y: 1.22, w: 9.3, h: 1.06,
fontSize: 13.5, valign: "middle", margin: 8
});
// 3 summary boxes
const boxes = [
{ title: "Tests are supportive", body: "They support – not replace – clinical judgement and patient history.", x: 0.25 },
{ title: "Normal ≠ No seizure", body: "A normal EEG, MRI, or CT does not rule out that a seizure has occurred.", x: 3.55 },
{ title: "Abnormal ≠ Epilepsy", body: "An abnormal result does not automatically mean an epilepsy diagnosis.", x: 6.85 },
];
boxes.forEach(b => {
infoBox(s, b.x, 2.5, 3.0, 2.6, WHITE, ACCENT);
s.addText(b.title, {
x: b.x + 0.12, y: 2.6, w: 2.76, h: 0.5,
fontSize: 12, bold: true, color: ACCENT, valign: "top", margin: 0
});
s.addShape(pres.ShapeType.line, {
x: b.x + 0.12, y: 3.12, w: 2.6, h: 0,
line: { color: ACCENT, width: 1 }
});
s.addText(b.body, {
x: b.x + 0.12, y: 3.2, w: 2.76, h: 1.7,
fontSize: 11.5, color: BODY_TEXT, valign: "top", margin: 0
});
});
bottomBar(s, ACCENT);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 – TYPES OF TESTS (visual grid)
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, DARK_BG);
topBanner(s, MID_BG, 1.05);
s.addText("Types of Diagnostic Tests", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 28, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const tests = [
{ label: "Blood Tests", icon: "🩸", color: "1A5276" },
{ label: "EEG", icon: "🧠", color: "117A65" },
{ label: "EEG/Video", icon: "📹", color: "6E2F9A" },
{ label: "Ambulatory EEG", icon: "📡", color: "1A5276" },
{ label: "CT Scan", icon: "🖥️", color: "117A65" },
{ label: "MRI Scan", icon: "🧲", color: "6E2F9A" },
{ label: "fMRI Scan", icon: "⚡", color: "1A5276" },
{ label: "ECG", icon: "❤️", color: "117A65" },
{ label: "SPECT Scan", icon: "☢️", color: "6E2F9A" },
{ label: "PET Scan", icon: "🔬", color: "1A5276" },
];
tests.forEach((t, i) => {
const col = i % 5;
const row = Math.floor(i / 5);
const x = 0.2 + col * 1.93;
const y = 1.3 + row * 1.9;
infoBox(s, x, y, 1.72, 1.65, t.color);
s.addText(t.icon, {
x, y: y + 0.18, w: 1.72, h: 0.65,
fontSize: 26, align: "center", valign: "middle", margin: 0
});
s.addText(t.label, {
x, y: y + 0.9, w: 1.72, h: 0.65,
fontSize: 10.5, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
});
bottomBar(s, ACCENT2);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 – BLOOD TESTS
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT2);
topBanner(s, MID_BG, 1.05);
s.addText("🩸 Blood Tests", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 26, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const points = [
"Check the overall health of a person following a suspected seizure.",
"Can identify metabolic causes of seizures (e.g. low sodium, glucose, calcium).",
"Also ordered after an epilepsy diagnosis to monitor general health during treatment.",
"May be used to monitor anti-epileptic drug (AED) levels in the bloodstream.",
"Help the doctor to adjust medication doses appropriately.",
];
points.forEach((pt, i) => {
infoBox(s, 0.25, 1.25 + i * 0.82, 9.5, 0.68, i % 2 === 0 ? WHITE : "D6EAF8", ACCENT);
s.addText([
{ text: `${i + 1}. `, options: { bold: true, color: ACCENT } },
{ text: pt, options: { color: BODY_TEXT } }
], {
x: 0.35, y: 1.27 + i * 0.82, w: 9.3, h: 0.64,
fontSize: 13, valign: "middle", margin: 0
});
});
bottomBar(s, ACCENT2);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 – EEG
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT);
topBanner(s, MID_BG, 1.05);
s.addText("🧠 Electroencephalogram (EEG)", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 24, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
// Left column – how it works
infoBox(s, 0.2, 1.15, 4.55, 4.1, WHITE, ACCENT);
s.addText("How It Works", {
x: 0.3, y: 1.22, w: 4.35, h: 0.45,
fontSize: 14, bold: true, color: ACCENT, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 0.3, y: 1.68, w: 4.2, h: 0, line: { color: ACCENT, width: 1 } });
const howPoints = [
"Small disc electrodes placed on the scalp using washable glue",
"Records 'brain waves' – electrical activity from the brain",
"Painless – no needles, no electrical shocks",
"Usually takes about 1 hour",
"Hair must be clean, dry & free of products beforehand",
];
howPoints.forEach((pt, i) => {
s.addText([
{ text: "• ", options: { bold: true, color: ACCENT } },
{ text: pt, options: { color: BODY_TEXT } }
], {
x: 0.3, y: 1.8 + i * 0.65, w: 4.3, h: 0.6,
fontSize: 12, valign: "top", margin: 0
});
});
// Right column – during test + important note
infoBox(s, 5.0, 1.15, 4.75, 2.0, WHITE, ACCENT);
s.addText("During the Test", {
x: 5.1, y: 1.22, w: 4.55, h: 0.42,
fontSize: 14, bold: true, color: ACCENT, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 5.1, y: 1.64, w: 4.4, h: 0, line: { color: ACCENT, width: 1 } });
const duringPoints = ["Open & close eyes", "Breathe deeply", "Look at flashing lights"];
duringPoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 5.1, y: 1.72 + i * 0.44, w: 4.5, h: 0.4,
fontSize: 12, color: BODY_TEXT, valign: "top", margin: 0
});
});
infoBox(s, 5.0, 3.3, 4.75, 2.0, MID_BG);
s.addText("⚠️ Sleep-Deprived EEG", {
x: 5.1, y: 3.38, w: 4.55, h: 0.42,
fontSize: 13, bold: true, color: ACCENT2, margin: 0
});
s.addText("Ordered when a routine EEG is normal. Fewer hours of sleep the night before increases the likelihood of detecting abnormal electrical activity.", {
x: 5.1, y: 3.82, w: 4.55, h: 1.35,
fontSize: 11.5, color: WHITE, valign: "top", margin: 0
});
bottomBar(s, ACCENT);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 – EEG LIMITATIONS + EEG/VIDEO & AMBULATORY EEG
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT);
topBanner(s, MID_BG, 1.05);
s.addText("EEG – Limitations, Video & Ambulatory Monitoring", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
// Limitations
infoBox(s, 0.2, 1.15, 4.6, 2.2, "FDEBD0", ACCENT2);
s.addText("⚠️ EEG Limitations", {
x: 0.35, y: 1.22, w: 4.35, h: 0.42,
fontSize: 14, bold: true, color: ACCENT2, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 0.35, y: 1.64, w: 4.2, h: 0, line: { color: ACCENT2, width: 1 } });
const limPoints = [
"Normal EEG ≠ no seizure ever occurred",
"Electrical changes only seen DURING a seizure",
"Abnormal EEG can have non-epileptic causes",
"Must be interpreted alongside clinical history",
];
limPoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 0.35, y: 1.75 + i * 0.38, w: 4.3, h: 0.36,
fontSize: 11.5, color: BODY_TEXT, valign: "top", margin: 0
});
});
// EEG/Video
infoBox(s, 5.05, 1.15, 4.7, 2.2, WHITE, ACCENT);
s.addText("📹 EEG / Video Monitoring", {
x: 5.18, y: 1.22, w: 4.5, h: 0.42,
fontSize: 14, bold: true, color: ACCENT, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 5.18, y: 1.64, w: 4.35, h: 0, line: { color: ACCENT, width: 1 } });
s.addText("Extended EEG alongside continuous video recording. Allows doctors to correlate electrical brain activity with the physical appearance of a seizure in real time – helping confirm the diagnosis.", {
x: 5.18, y: 1.74, w: 4.5, h: 1.5,
fontSize: 11.5, color: BODY_TEXT, valign: "top", margin: 0
});
// Ambulatory EEG
infoBox(s, 0.2, 3.5, 9.55, 1.8, MID_BG);
s.addText("📡 Ambulatory EEG (AEEG)", {
x: 0.35, y: 3.57, w: 4.5, h: 0.42,
fontSize: 14, bold: true, color: ACCENT2, margin: 0
});
s.addText([
{ text: "A newer technology enabling prolonged EEG recording (up to several days) in the person's home or a medical setting. Generally prescribed by a neurologist. Useful when short-term in-clinic EEGs have not captured an event.", options: { color: WHITE } }
], {
x: 0.35, y: 4.05, w: 9.3, h: 1.1,
fontSize: 12, valign: "top", margin: 0
});
bottomBar(s, ACCENT);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 – CT SCAN
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, "6E2F9A");
topBanner(s, MID_BG, 1.05);
s.addText("🖥️ Computed Tomography (CT) Scan", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 24, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const rows = [
{ label: "Purpose", text: "Detects abnormalities or structural damage in the brain that could cause seizures." },
{ label: "Procedure", text: "Patient lies on a table; head is scanned by the CT scanner. A special dye may be injected into the arm to enhance image quality." },
{ label: "What it can show", text: "Changes in brain tissue development, blood vessel abnormalities, tumours, or damage from traumatic brain injury (TBI)." },
{ label: "Limitations", text: "Can appear normal even when a person has had a witnessed seizure. An abnormal CT does not automatically mean epilepsy." },
{ label: "Contraindications", text: "Not suitable for pregnant women – X-rays may affect an unborn baby." },
];
rows.forEach((r, i) => {
const y = 1.25 + i * 0.82;
infoBox(s, 0.2, y, 2.3, 0.68, MID_BG);
s.addText(r.label, {
x: 0.25, y, w: 2.2, h: 0.68,
fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
infoBox(s, 2.6, y, 7.15, 0.68, i % 2 === 0 ? WHITE : "EBF5FB", ACCENT);
s.addText(r.text, {
x: 2.7, y, w: 7.05, h: 0.68,
fontSize: 12, color: BODY_TEXT, valign: "middle", margin: 0
});
});
bottomBar(s, "6E2F9A");
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 – MRI SCAN
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT);
topBanner(s, MID_BG, 1.05);
s.addText("🧲 Magnetic Resonance Imaging (MRI) Scan", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 23, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
// Left panel
infoBox(s, 0.2, 1.18, 4.6, 4.1, WHITE, ACCENT);
s.addText("Key Facts", {
x: 0.35, y: 1.25, w: 4.3, h: 0.42,
fontSize: 14, bold: true, color: ACCENT, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 0.35, y: 1.68, w: 4.2, h: 0, line: { color: ACCENT, width: 1 } });
const mriPoints = [
"Provides more detailed brain images than a CT scan",
"Person lies still inside a tunnel-shaped scanner",
"Loud noise – earplugs or headphones provided",
"Handheld remote to alert technician if unwell",
"Technician monitors and communicates throughout",
];
mriPoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 0.35, y: 1.78 + i * 0.68, w: 4.3, h: 0.64,
fontSize: 12, color: BODY_TEXT, valign: "top", margin: 0
});
});
// Right panel top – before scan
infoBox(s, 5.0, 1.18, 4.75, 2.0, "EBF5FB", ACCENT);
s.addText("Before the Scan", {
x: 5.12, y: 1.25, w: 4.55, h: 0.4,
fontSize: 13, bold: true, color: ACCENT, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 5.12, y: 1.65, w: 4.4, h: 0, line: { color: ACCENT, width: 1 } });
const beforePoints = ["Remove all metal objects (jewellery, hearing aids, hair clips)", "Inform staff of any pacemaker or metal implants", "Some newer MRI machines are safe for implanted devices – check with your doctor"];
beforePoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 5.12, y: 1.72 + i * 0.46, w: 4.55, h: 0.42,
fontSize: 11, color: BODY_TEXT, valign: "top", margin: 0
});
});
// Right panel bottom – limitations
infoBox(s, 5.0, 3.32, 4.75, 2.0, "FDEBD0", ACCENT2);
s.addText("⚠️ Important Limitations", {
x: 5.12, y: 3.38, w: 4.55, h: 0.4,
fontSize: 13, bold: true, color: ACCENT2, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 5.12, y: 3.78, w: 4.4, h: 0, line: { color: ACCENT2, width: 1 } });
s.addText("• Can be normal in people who have had a verified seizure\n• An abnormal MRI does not confirm epilepsy\n• Must be interpreted alongside clinical history", {
x: 5.12, y: 3.88, w: 4.55, h: 1.3,
fontSize: 11.5, color: BODY_TEXT, valign: "top", margin: 0
});
bottomBar(s, ACCENT);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 – fMRI & ECG
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT);
topBanner(s, MID_BG, 1.05);
s.addText("fMRI & Electrocardiogram (ECG)", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 24, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
// fMRI left
infoBox(s, 0.2, 1.18, 4.6, 4.1, WHITE, ACCENT);
s.addText("⚡ Functional MRI (fMRI)", {
x: 0.35, y: 1.25, w: 4.3, h: 0.42,
fontSize: 14, bold: true, color: ACCENT, margin: 0
});
s.addShape(pres.ShapeType.line, { x: 0.35, y: 1.68, w: 4.2, h: 0, line: { color: ACCENT, width: 1 } });
const fmriPoints = [
"Shows which parts of the brain are affected by seizures",
"Measures changes in blood flow while performing tasks",
"Tasks may include reading, naming objects",
"Helps understand brain function before surgery",
"Used in pre-surgical evaluation to predict surgical impact",
];
fmriPoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 0.35, y: 1.78 + i * 0.68, w: 4.3, h: 0.64,
fontSize: 12, color: BODY_TEXT, valign: "top", margin: 0
});
});
// ECG right
infoBox(s, 5.0, 1.18, 4.75, 4.1, "FEF9E7", "E67E22");
s.addText("❤️ Electrocardiogram (ECG)", {
x: 5.12, y: 1.25, w: 4.55, h: 0.42,
fontSize: 14, bold: true, color: "E67E22", margin: 0
});
s.addShape(pres.ShapeType.line, { x: 5.12, y: 1.68, w: 4.4, h: 0, line: { color: "E67E22", width: 1 } });
const ecgPoints = [
"Records the heart's electrical activity",
"Small metal tab electrodes attached to arms, legs and chest",
"Completely painless procedure",
"Identifies heart conditions that may mimic seizures",
"Helps distinguish epileptic seizures from cardiac syncope (fainting)",
"Important: fainting episodes can be mistaken for seizures",
];
ecgPoints.forEach((pt, i) => {
s.addText("• " + pt, {
x: 5.12, y: 1.78 + i * 0.57, w: 4.55, h: 0.54,
fontSize: 11.5, color: BODY_TEXT, valign: "top", margin: 0
});
});
bottomBar(s, ACCENT);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 – SPECT SCAN
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, "117A65");
topBanner(s, MID_BG, 1.05);
s.addText("☢️ SPECT Scan (Single-Photon Emission CT)", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const rows = [
{ label: "Purpose", text: "Measures blood flow in the brain to identify seizure onset zones." },
{ label: "Procedure", text: "A safe, short-lived radioactive substance is injected into the arm during a seizure. Only conducted during admission to an Epilepsy Monitoring Unit (EMU) by specially trained staff." },
{ label: "Who needs it?", text: "Not everyone with epilepsy. Primarily used as part of clinical neurosurgical evaluation." },
{ label: "Contraindications", text: "Not suitable for pregnant women – the radioactive substance may harm an unborn baby." },
{ label: "Limitation", text: "Only useful when the injection can be given during an active seizure event." },
];
rows.forEach((r, i) => {
const y = 1.25 + i * 0.82;
infoBox(s, 0.2, y, 2.3, 0.68, "117A65");
s.addText(r.label, {
x: 0.25, y, w: 2.2, h: 0.68,
fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
infoBox(s, 2.6, y, 7.15, 0.68, i % 2 === 0 ? WHITE : "D5F5E3", "117A65");
s.addText(r.text, {
x: 2.7, y, w: 7.05, h: 0.68,
fontSize: 12, color: BODY_TEXT, valign: "middle", margin: 0
});
});
bottomBar(s, "117A65");
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 – PET SCAN
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, "6E2F9A");
topBanner(s, MID_BG, 1.05);
s.addText("🔬 PET Scan (Positron Emission Tomography)", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 22, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const rows = [
{ label: "Purpose", text: "Shows energy (metabolic) usage of the brain to identify seizure onset zones." },
{ label: "Procedure", text: "A safe, short-lived radioactive substance is injected into the bloodstream. A scan is performed shortly after absorption. The test can take a couple of hours." },
{ label: "Preparation", text: "Wear comfortable clothing. Fast (no food or drink) before the scan." },
{ label: "Who needs it?", text: "Not everyone. Often used as part of pre-surgical evaluation when other tests are inconclusive." },
{ label: "Contraindications", text: "Not suitable for pregnant women – the radioactive substance may harm an unborn baby." },
];
rows.forEach((r, i) => {
const y = 1.25 + i * 0.82;
infoBox(s, 0.2, y, 2.3, 0.68, "6E2F9A");
s.addText(r.label, {
x: 0.25, y, w: 2.2, h: 0.68,
fontSize: 12, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
infoBox(s, 2.6, y, 7.15, 0.68, i % 2 === 0 ? WHITE : "F5EEF8", "6E2F9A");
s.addText(r.text, {
x: 2.7, y, w: 7.05, h: 0.68,
fontSize: 12, color: BODY_TEXT, valign: "middle", margin: 0
});
});
bottomBar(s, "6E2F9A");
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 – SPECT vs PET COMPARISON
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, DARK_BG);
topBanner(s, MID_BG, 1.05);
s.addText("SPECT vs PET – At a Glance", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 26, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const headers = ["Feature", "SPECT Scan", "PET Scan"];
const rows2 = [
["Measures", "Blood flow in the brain", "Metabolic (energy) activity in the brain"],
["Timing", "Injected during active seizure", "Injected between or without seizures"],
["Setting", "Epilepsy Monitoring Unit only", "Hospital / outpatient radiology"],
["Duration", "Relatively quick", "Can take a couple of hours"],
["Preparation", "None specific", "Fast beforehand; wear comfortable clothing"],
["Use", "Neurosurgical evaluation", "Pre-surgical evaluation"],
["Pregnancy safe?","No", "No"],
];
const colW = [2.2, 3.5, 3.5];
const colX = [0.2, 2.5, 6.1];
// Header row
headers.forEach((h, c) => {
infoBox(s, colX[c], 1.15, colW[c], 0.52, ACCENT);
s.addText(h, {
x: colX[c] + 0.05, y: 1.15, w: colW[c] - 0.1, h: 0.52,
fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
});
rows2.forEach((row, ri) => {
const y = 1.75 + ri * 0.52;
const bg = ri % 2 === 0 ? "1B3A5C" : "243F5E";
row.forEach((cell, ci) => {
infoBox(s, colX[ci], y, colW[ci], 0.5, bg);
s.addText(cell, {
x: colX[ci] + 0.07, y, w: colW[ci] - 0.14, h: 0.5,
fontSize: 11, color: ci === 0 ? ACCENT : WHITE, bold: ci === 0,
align: ci === 0 ? "center" : "left", valign: "middle", margin: 0
});
});
});
bottomBar(s, ACCENT2);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 – DIAGNOSTIC PATHWAY SUMMARY
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, LIGHT_BG);
accentBar(s, ACCENT2);
topBanner(s, MID_BG, 1.05);
s.addText("Epilepsy Diagnostic Pathway", {
x: 0.25, y: 0.18, w: 9.5, h: 0.7,
fontSize: 26, bold: true, color: WHITE, align: "left", valign: "middle", margin: 0
});
const steps = [
{ n: "1", title: "Clinical History", body: "Detailed account of the event from the patient and witnesses", color: ACCENT },
{ n: "2", title: "Blood Tests", body: "Assess general health and rule out metabolic causes", color: "117A65" },
{ n: "3", title: "ECG", body: "Rule out cardiac causes (syncope mimicking seizures)", color: "E67E22" },
{ n: "4", title: "EEG", body: "Detect abnormal electrical brain activity", color: ACCENT },
{ n: "5", title: "CT / MRI Scan", body: "Identify structural brain abnormalities", color: "6E2F9A" },
{ n: "6", title: "fMRI / SPECT / PET", body: "Advanced imaging for pre-surgical evaluation", color: ACCENT2 },
];
steps.forEach((st, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const x = 0.2 + col * 3.27;
const y = 1.25 + row * 2.0;
infoBox(s, x, y, 3.05, 1.72, WHITE, st.color);
infoBox(s, x, y, 3.05, 0.5, st.color);
s.addText(`${st.n}. ${st.title}`, {
x: x + 0.1, y, w: 2.9, h: 0.5,
fontSize: 12.5, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
});
s.addText(st.body, {
x: x + 0.1, y: y + 0.58, w: 2.9, h: 1.05,
fontSize: 12, color: BODY_TEXT, align: "center", valign: "top", margin: 0
});
});
// Arrow between rows
s.addShape(pres.ShapeType.line, {
x: 4.75, y: 3.27, w: 0, h: 0.34,
line: { color: DARK_TEXT, width: 1.5, endArrowType: "open" }
});
bottomBar(s, ACCENT2);
}
// ═══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 – CLOSING SLIDE
// ═══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
addSlideBackground(s, DARK_BG);
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: "100%", h: 5.625,
fill: { color: MID_BG, transparency: 30 },
line: { color: MID_BG, width: 0 }
});
// Teal accent top and bottom
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: "100%", h: 0.18, fill: { color: ACCENT }, line: { color: ACCENT, width: 0 } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 5.45, w: "100%", h: 0.175, fill: { color: ACCENT2 }, line: { color: ACCENT2, width: 0 } });
s.addText("Key Takeaways", {
x: 0.5, y: 0.45, w: 9, h: 0.6,
fontSize: 30, bold: true, color: ACCENT, align: "center", margin: 0
});
const takeaways = [
"No single test confirms epilepsy – diagnosis requires the full clinical picture.",
"A normal test does NOT rule out a prior seizure.",
"An abnormal test does NOT automatically mean epilepsy.",
"Advanced scans (SPECT, PET, fMRI) are reserved for pre-surgical evaluation.",
"Pregnant women should avoid CT, SPECT, and PET scans.",
"Always discuss test results with your neurologist or treating physician.",
];
takeaways.forEach((t, i) => {
infoBox(s, 0.5, 1.22 + i * 0.68, 9, 0.6, i % 2 === 0 ? "1A3A54" : "173249");
s.addText([
{ text: "✓ ", options: { bold: true, color: ACCENT } },
{ text: t, options: { color: WHITE } }
], {
x: 0.65, y: 1.25 + i * 0.68, w: 8.7, h: 0.55,
fontSize: 12.5, valign: "middle", margin: 0
});
});
}
// ─── WRITE FILE ────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/epilepsy-ppt/Epilepsy_Tests_and_Investigations.pptx" })
.then(() => console.log("✅ Presentation saved successfully."))
.catch(err => console.error("❌ Error:", err));
cd /home/daytona/workspace/epilepsy-ppt && node create_ppt.js
ls -lh /home/daytona/workspace/epilepsy-ppt/Epilepsy_Tests_and_Investigations.pp…
Epilepsy Tests and Investigations
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - "Tests & Investigations for Epilepsy & Seizures" |
| 2 | Overview - Why tests alone can't confirm epilepsy; key principles |
| 3 | Types of Tests - Visual icon grid of all 10 test types |
| 4 | Blood Tests - Purpose, health monitoring, medication levels |
| 5 | EEG - How it works, procedure, sleep-deprived EEG |
| 6 | EEG Limitations + Video & Ambulatory EEG |
| 7 | CT Scan - Purpose, procedure, limitations, contraindications |
| 8 | MRI Scan - Key facts, preparation, limitations |
| 9 | fMRI & ECG - Side by side comparison |
| 10 | SPECT Scan - Blood flow imaging, surgical evaluation |
| 11 | PET Scan - Metabolic imaging, pre-surgical use |
| 12 | SPECT vs PET Comparison Table |
| 13 | Diagnostic Pathway - Step-by-step 6-stage flowchart |
| 14 | Key Takeaways - 6 closing points for the audience |