attachment
attachment

Federal State Budgetary Educational Institution of Higher Education “Kursk State Medical University” of the Ministry of Health of the Russian Federation DIARY OF INDUSTRIAL PRACTICE for acquiring professional skills and experience in professional activity “Provision of emergency and urgent medical care (physician assistant)” Student of the ___ course, Faculty of ___, Group ___, Full name of the student Practice title: Industrial practice “Provision of emergency and urgent medical care (physician assistant)” Practice base (medical institution / healthcare facility, department, department, academic chair, institution) Full name and position of the responsible staff member of the practice base. Full name and position of the supervisor of practical training. Period of practice: from ______ to ______ (year). Student work schedule. Date Working hours 29/06/2026 30/06/2026 01/07/2026 02/07/2026 03/07/2026 04/07/2026 DAY OFF 06/07/2026 07/07/2026 08/07/2026 09/07/2026 10/07/2026 11/07/2026 Signature of the responsible staff member of the practice base Seal of the practice base Sample format of a daily log for a work shift as image is uploaded Student’s signature Signature of the clinical base supervisor

analyse_media
Reading File
Running Command

mkdir -p /home/daytona/workspace/practice-diary && ls /home/daytona/workspace/pr…

Writing File

~/practice-diary/create_diary.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  AlignmentType, BorderStyle, WidthType, VerticalAlign, HeadingLevel,
  PageBreak, ShadingType
} = require('docx');
const fs = require('fs');

// ── helpers ──────────────────────────────────────────────────────────────────

function cell(text, opts = {}) {
  const {
    bold = false, center = false, shading = null, vMerge = null,
    colSpan = 1, width = null, fontSize = 20, italic = false
  } = opts;

  const borders = {
    top:    { style: BorderStyle.SINGLE, size: 6, color: '000000' },
    bottom: { style: BorderStyle.SINGLE, size: 6, color: '000000' },
    left:   { style: BorderStyle.SINGLE, size: 6, color: '000000' },
    right:  { style: BorderStyle.SINGLE, size: 6, color: '000000' },
  };

  const cellOpts = {
    children: [
      new Paragraph({
        alignment: center ? AlignmentType.CENTER : AlignmentType.LEFT,
        spacing: { before: 40, after: 40 },
        children: [
          new TextRun({
            text,
            bold,
            italic,
            size: fontSize,
            font: 'Times New Roman',
          }),
        ],
      }),
    ],
    borders,
    verticalAlign: VerticalAlign.CENTER,
    columnSpan: colSpan,
  };

  if (vMerge) cellOpts.rowSpan = vMerge;
  if (width)  cellOpts.width = { size: width, type: WidthType.DXA };
  if (shading) cellOpts.shading = { type: ShadingType.CLEAR, fill: shading };

  return new TableCell(cellOpts);
}

function emptyCell(opts = {}) { return cell('', opts); }

function para(text, opts = {}) {
  const {
    bold = false, center = false, size = 24, italic = false,
    spaceBefore = 0, spaceAfter = 120, underline = false
  } = opts;
  return new Paragraph({
    alignment: center ? AlignmentType.CENTER : AlignmentType.LEFT,
    spacing: { before: spaceBefore, after: spaceAfter },
    children: [
      new TextRun({
        text,
        bold,
        italic,
        size,
        font: 'Times New Roman',
        underline: underline ? {} : undefined,
      }),
    ],
  });
}

function hRule() {
  return new Paragraph({
    border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: '000000', space: 1 } },
    spacing: { before: 80, after: 80 },
    children: [],
  });
}

// ── Schedule table ────────────────────────────────────────────────────────────

const scheduleRows = [
  // header
  new TableRow({
    children: [
      cell('Date', { bold: true, center: true, width: 2400, shading: 'D9D9D9' }),
      cell('Working hours', { bold: true, center: true, shading: 'D9D9D9' }),
    ],
    tableHeader: true,
  }),
  ...([
    ['29/06/2026', '08:00 – 14:00'],
    ['30/06/2026', '08:00 – 14:00'],
    ['01/07/2026', '08:00 – 14:00'],
    ['02/07/2026', '08:00 – 14:00'],
    ['03/07/2026', '08:00 – 14:00'],
    ['04/07/2026', '08:00 – 14:00'],
    ['DAY OFF',    ''],
    ['06/07/2026', '08:00 – 14:00'],
    ['07/07/2026', '08:00 – 14:00'],
    ['08/07/2026', '08:00 – 14:00'],
    ['09/07/2026', '08:00 – 14:00'],
    ['10/07/2026', '08:00 – 14:00'],
    ['11/07/2026', '08:00 – 14:00'],
    ['', ''],
    ['', ''],
  ].map(([d, h]) =>
    new TableRow({
      children: [
        cell(d, { center: true, width: 2400 }),
        cell(h, { center: true }),
      ],
    })
  )),
];

const scheduleTable = new Table({
  width: { size: 100, type: WidthType.PERCENTAGE },
  rows: scheduleRows,
});

// ── Daily log entries ─────────────────────────────────────────────────────────

// Activities used in sample image – we apply them to each working day with
// slight frequency variation to reflect progression over the practice period.

// Each entry: { date, activities: [{text, freq}] }

const workingDays = [
  '29/06/2026',
  '30/06/2026',
  '01/07/2026',
  '02/07/2026',
  '03/07/2026',
  '04/07/2026',
  '06/07/2026',
  '07/07/2026',
  '08/07/2026',
  '09/07/2026',
  '10/07/2026',
  '11/07/2026',
];

// Base activity sets per day (cycle through 3 patterns)
function getActivities(dayIndex) {
  const patterns = [
    // Pattern A – orientation/first days
    [
      { text: 'Safety instructions have been reviewed. Familiarization with the structure of the ambulance station (admission unit of the inpatient emergency department).', freq: '1' },
      { text: 'Clinical examination of a newly admitted patient and completion of the medical history, with coordination of the diagnosis, examination plan, and treatment plan with the attending physician.', freq: '2' },
      { text: 'Interpretation of additional examination data (e.g., ECG).', freq: '' },
      { text: 'Participation in providing medical assistance during emergency ambulance calls.', freq: '1' },
      { text: 'Ward rounds with the head of department for supervised patients.', freq: '' },
      { text: 'Participation in clinical case review with the head of department and/or the supervisor of practical training for critically ill patients.', freq: '6' },
    ],
    // Pattern B – mid-practice
    [
      { text: 'Safety instructions have been reviewed. Familiarization with the structure of the ambulance station (admission unit of the inpatient emergency department).', freq: '2' },
      { text: 'Clinical examination of a newly admitted patient and completion of the medical history, with coordination of the diagnosis, examination plan, and treatment plan with the attending physician.', freq: '2' },
      { text: 'Interpretation of additional examination data (e.g., ECG).', freq: '' },
      { text: 'Participation in providing medical assistance during emergency ambulance calls.', freq: '2' },
      { text: 'Ward rounds with the head of department for supervised patients.', freq: '' },
      { text: 'Participation in clinical case review with the head of department and/or the supervisor of practical training for critically ill patients.', freq: '1' },
    ],
    // Pattern C – advanced practice
    [
      { text: 'Clinical examination of a newly admitted patient and completion of the medical history, with coordination of the diagnosis, examination plan, and treatment plan with the attending physician.', freq: '3' },
      { text: 'Interpretation of additional examination data (e.g., ECG).', freq: '2' },
      { text: 'Participation in providing medical assistance during emergency ambulance calls.', freq: '2' },
      { text: 'Ward rounds with the head of department for supervised patients.', freq: '1' },
      { text: 'Participation in clinical case review with the head of department and/or the supervisor of practical training for critically ill patients.', freq: '2' },
      { text: 'Performance of prescribed diagnostic and therapeutic procedures under the supervision of the attending physician.', freq: '3' },
    ],
  ];
  return patterns[dayIndex % patterns.length];
}

// Build daily log tables
function buildDailyTable(date, activities) {
  // Header row
  const headerRow = new TableRow({
    children: [
      cell('Date', { bold: true, center: true, width: 1500, shading: 'D9D9D9', fontSize: 20 }),
      cell('Content of completed work', { bold: true, center: true, shading: 'D9D9D9', fontSize: 20 }),
      cell('Frequency', { bold: true, center: true, width: 1400, shading: 'D9D9D9', fontSize: 20 }),
    ],
    tableHeader: true,
  });

  // Data rows — date cell only in first activity row, others empty
  const dataRows = activities.map((act, i) => {
    const dateText = i === 0 ? date : '';
    return new TableRow({
      children: [
        cell(dateText, { center: true, width: 1500, fontSize: 20 }),
        cell(act.text, { fontSize: 20 }),
        cell(act.freq, { center: true, width: 1400, fontSize: 20 }),
      ],
    });
  });

  // Signature rows
  const sigRow1 = new TableRow({
    children: [
      emptyCell({ width: 1500 }),
      cell('Student\'s signature', { bold: true, fontSize: 20 }),
      emptyCell({ width: 1400 }),
    ],
  });
  const sigRow2 = new TableRow({
    children: [
      emptyCell({ width: 1500 }),
      cell('Signature of the clinical base supervisor', { bold: true, fontSize: 20 }),
      emptyCell({ width: 1400 }),
    ],
  });

  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [headerRow, ...dataRows, sigRow1, sigRow2],
  });
}

// ── Cover page content ────────────────────────────────────────────────────────

const coverContent = [
  para('Federal State Budgetary Educational Institution of Higher Education', { bold: true, center: true, size: 22, spaceBefore: 0, spaceAfter: 40 }),
  para('"Kursk State Medical University"', { bold: true, center: true, size: 22, spaceAfter: 40 }),
  para('of the Ministry of Health of the Russian Federation', { bold: true, center: true, size: 22, spaceAfter: 200 }),

  para('DIARY OF INDUSTRIAL PRACTICE', { bold: true, center: true, size: 28, spaceAfter: 60 }),
  para('for acquiring professional skills and experience in professional activity', { center: true, size: 22, spaceAfter: 60 }),
  para('"Provision of emergency and urgent medical care (physician assistant)"', { bold: true, italic: true, center: true, size: 22, spaceAfter: 300 }),

  para('Student of the _____ course, Faculty of _________________________, Group ______,', { size: 22, spaceAfter: 40 }),
  para('Full name of the student: _________________________________________________________', { size: 22, spaceAfter: 200 }),

  para('Practice title: Industrial practice "Provision of emergency and urgent medical care (physician assistant)"', { size: 22, spaceAfter: 200 }),

  para('Practice base (medical institution / healthcare facility, department, department, academic chair, institution):', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 200 }),

  para('Full name and position of the responsible staff member of the practice base:', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 200 }),

  para('Full name and position of the supervisor of practical training:', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 200 }),

  para('Period of practice: from ______________ to ______________ (year _____).', { size: 22, spaceAfter: 300 }),
];

// ── Schedule section ──────────────────────────────────────────────────────────

const scheduleContent = [
  para('Student work schedule', { bold: true, center: true, size: 24, spaceAfter: 120 }),
  scheduleTable,
  para('', { spaceAfter: 80 }),
  para('Signature of the responsible staff member of the practice base: ___________________', { size: 22, spaceAfter: 40 }),
  para('Seal of the practice base', { size: 22, spaceAfter: 300 }),
];

// ── Daily log sections ────────────────────────────────────────────────────────

const dailyContent = [];
dailyContent.push(para('Daily Work Log', { bold: true, center: true, size: 26, spaceAfter: 200 }));

workingDays.forEach((date, idx) => {
  const acts = getActivities(idx);
  dailyContent.push(buildDailyTable(date, acts));
  dailyContent.push(para('', { spaceAfter: 200 }));
});

// ── Assemble document ─────────────────────────────────────────────────────────

const doc = new Document({
  styles: {
    default: {
      document: {
        run: { font: 'Times New Roman', size: 22 },
      },
    },
  },
  sections: [
    {
      properties: {
        page: {
          margin: { top: 1134, bottom: 1134, left: 1701, right: 850 }, // ~2cm/3cm margins
        },
      },
      children: [
        ...coverContent,
        new Paragraph({ children: [new PageBreak()] }),
        ...scheduleContent,
        new Paragraph({ children: [new PageBreak()] }),
        ...dailyContent,
      ],
    },
  ],
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync('/home/daytona/workspace/practice-diary/Practice_Diary_Emergency_Medicine.docx', buf);
  console.log('Done: Practice_Diary_Emergency_Medicine.docx');
});
Running Command

cd /home/daytona/workspace/practice-diary && node create_diary.js 2>&1

Running Command

ls -lh /home/daytona/workspace/practice-diary/ && python /home/daytona/workspace…

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…

Running Command

# Quick structural check - unzip and verify key XML files exist cd /tmp && rm -r…

Your Practice Diary document is ready for download:

Practice Diary Emergency Medicine

Word Document · DOCX


What's included in the document:
Page 1 - Cover Page
  • Full institutional header: Kursk State Medical University, Ministry of Health of the Russian Federation
  • Document title: "Diary of Industrial Practice – Provision of Emergency and Urgent Medical Care (Physician Assistant)"
  • Fill-in fields for: student name, course/faculty/group, practice base, responsible staff, supervisor name, and practice period
Page 2 - Student Work Schedule
  • All dates from 29/06/2026 to 11/07/2026 with working hours (08:00–14:00)
  • "DAY OFF" row for 05/07/2026
  • Two blank rows at the bottom
  • Signature line and seal space for the practice base supervisor
Pages 3+ - Daily Work Log (12 working days) Each day has its own table with 3 columns - Date | Content of completed work | Frequency - matching the exact format from your sample image, including:
  • Safety instructions / familiarization with ambulance station structure
  • Clinical examination of newly admitted patients and medical history completion
  • Interpretation of additional examination data (e.g., ECG)
  • Participation in emergency ambulance calls
  • Ward rounds with the head of department
  • Participation in clinical case review for critically ill patients
  • (Later days) Performance of prescribed diagnostic and therapeutic procedures
Activities rotate across 3 patterns to reflect natural progression during practice. Each daily table ends with Student's signature and Signature of the clinical base supervisor rows.
attachment
attachment

Federal State Budgetary Educational Institution of Higher Education “Kursk State Medical University” of the Ministry of Health of the Russian Federation DIARY OF INDUSTRIAL PRACTICE for acquiring professional skills and experience in professional activity “Provision of emergency and urgent medical care (physician assistant)” Student of the ___ course, Faculty of ___, Group ___, Full name of the student Practice title: Industrial practice “Provision of emergency and urgent medical care (physician assistant)” Practice base (medical institution / healthcare facility, department, department, academic chair, institution) Full name and position of the responsible staff member of the practice base. Full name and position of the supervisor of practical training. Period of practice: from ______ to ______ (year). Student work schedule. Date Working hours 29/06/2026 30/06/2026 01/07/2026 02/07/2026 03/07/2026 04/07/2026 DAY OFF 06/07/2026 07/07/2026 08/07/2026 09/07/2026 10/07/2026 11/07/2026 Signature of the responsible staff member of the practice base Seal of the practice base Sample format of a daily log for a work shift as image is uploaded Student’s signature Signature of the clinical base supervisor NOTE:- every day must have two patients total 24 individuals patients

Writing File

~/practice-diary/create_diary_v2.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  AlignmentType, BorderStyle, WidthType, VerticalAlign, ShadingType, PageBreak
} = require('docx');
const fs = require('fs');

// ── helpers ──────────────────────────────────────────────────────────────────

function cell(text, opts = {}) {
  const { bold = false, center = false, shading = null, width = null, fontSize = 20, italic = false, colSpan = 1 } = opts;
  const borders = {
    top:    { style: BorderStyle.SINGLE, size: 6, color: '000000' },
    bottom: { style: BorderStyle.SINGLE, size: 6, color: '000000' },
    left:   { style: BorderStyle.SINGLE, size: 6, color: '000000' },
    right:  { style: BorderStyle.SINGLE, size: 6, color: '000000' },
  };
  const cellOpts = {
    children: [new Paragraph({
      alignment: center ? AlignmentType.CENTER : AlignmentType.LEFT,
      spacing: { before: 40, after: 40 },
      children: [new TextRun({ text, bold, italic, size: fontSize, font: 'Times New Roman' })],
    })],
    borders,
    verticalAlign: VerticalAlign.CENTER,
    columnSpan: colSpan,
  };
  if (width) cellOpts.width = { size: width, type: WidthType.DXA };
  if (shading) cellOpts.shading = { type: ShadingType.CLEAR, fill: shading };
  return new TableCell(cellOpts);
}

function emptyCell(opts = {}) { return cell('', opts); }

function para(text, opts = {}) {
  const { bold = false, center = false, size = 24, italic = false, spaceBefore = 0, spaceAfter = 120 } = opts;
  return new Paragraph({
    alignment: center ? AlignmentType.CENTER : AlignmentType.LEFT,
    spacing: { before: spaceBefore, after: spaceAfter },
    children: [new TextRun({ text, bold, italic, size, font: 'Times New Roman' })],
  });
}

// ── 24 unique patients (2 per working day) ────────────────────────────────────
// Each: { name, age, sex, complaint, diagnosis, ecg, treatment }

const patients = [
  // Day 1 – 29/06/2026
  {
    name: 'Ivanov Dmitry Alekseyevich', age: 58, sex: 'Male',
    complaint: 'Pressing chest pain radiating to the left arm, onset 40 minutes ago',
    diagnosis: 'Acute myocardial infarction (STEMI), anterior wall',
    ecg: 'ST-segment elevation in V1-V4, reciprocal changes in II, III, aVF',
    treatment: 'Aspirin 325 mg, clopidogrel 300 mg, heparin 5000 IU IV; urgent PCI referral'
  },
  {
    name: 'Petrova Natalya Ivanovna', age: 72, sex: 'Female',
    complaint: 'Sudden onset left-sided weakness and slurred speech for 1 hour',
    diagnosis: 'Acute ischemic stroke (left MCA territory)',
    ecg: 'Atrial fibrillation with controlled ventricular rate',
    treatment: 'IV thrombolysis with alteplase 0.9 mg/kg; neurological monitoring'
  },
  // Day 2 – 30/06/2026
  {
    name: 'Sidorov Gennady Petrovich', age: 45, sex: 'Male',
    complaint: 'Severe dyspnea, productive cough with rust-colored sputum, fever 39.2°C',
    diagnosis: 'Community-acquired pneumonia, right lower lobe, severe',
    ecg: 'Sinus tachycardia, HR 112 bpm',
    treatment: 'Ceftriaxone 2 g IV + azithromycin 500 mg, O₂ therapy, IV fluids'
  },
  {
    name: 'Kuznetsova Olga Mikhailovna', age: 34, sex: 'Female',
    complaint: 'Acute severe headache ("thunderclap"), nausea, neck stiffness',
    diagnosis: 'Subarachnoid hemorrhage (Hunt-Hess grade II)',
    ecg: 'Sinus rhythm, diffuse T-wave inversions',
    treatment: 'Urgent CT, neurosurgical consultation, nimodipine 60 mg q4h, analgesics'
  },
  // Day 3 – 01/07/2026
  {
    name: 'Morozov Andrey Nikolayevich', age: 62, sex: 'Male',
    complaint: 'Sudden tearing chest and back pain, diaphoresis',
    diagnosis: 'Type B aortic dissection',
    ecg: 'Sinus tachycardia; no specific ischemic changes',
    treatment: 'IV labetalol for BP control (target SBP 100–120 mmHg), urgent CT angiography, vascular surgery consult'
  },
  {
    name: 'Sokolova Tatyana Vasilyevna', age: 29, sex: 'Female',
    complaint: 'Severe right lower quadrant pain, nausea, vomiting, low-grade fever 37.8°C',
    diagnosis: 'Acute appendicitis (perforated)',
    ecg: 'Sinus rhythm, HR 98 bpm, normal',
    treatment: 'Emergency surgical consultation, IV cefazolin + metronidazole, NPO, IV fluids'
  },
  // Day 4 – 02/07/2026
  {
    name: 'Volkov Igor Stepanovich', age: 78, sex: 'Male',
    complaint: 'Syncope, pallor, melena for 2 days',
    diagnosis: 'Upper gastrointestinal hemorrhage (peptic ulcer Forrest Ia)',
    ecg: 'Sinus tachycardia HR 118, nonspecific ST depression',
    treatment: 'IV pantoprazole 80 mg bolus then 8 mg/h, blood transfusion, urgent endoscopy'
  },
  {
    name: 'Lebedeva Irina Vladimirovna', age: 41, sex: 'Female',
    complaint: 'Palpitations, dizziness, near-syncope; HR 180 bpm on arrival',
    diagnosis: 'Paroxysmal supraventricular tachycardia (AVNRT)',
    ecg: 'Narrow-complex tachycardia 185 bpm, no P waves visible',
    treatment: 'Valsalva maneuver (modified); IV adenosine 6 mg → 12 mg; converted to sinus rhythm'
  },
  // Day 5 – 03/07/2026
  {
    name: 'Korolev Sergey Dmitrievich', age: 55, sex: 'Male',
    complaint: 'Progressive dyspnea, bilateral leg edema, orthopnea for 3 days',
    diagnosis: 'Acute decompensated heart failure (EF 25%)',
    ecg: 'LBBB, HR 96 bpm, left axis deviation',
    treatment: 'IV furosemide 80 mg, oxygen, CPAP; echocardiography ordered'
  },
  {
    name: 'Novikova Anastasia Sergeyevna', age: 22, sex: 'Female',
    complaint: 'Sudden onset dyspnea, pleuritic chest pain, leg swelling after long flight',
    diagnosis: 'Acute pulmonary embolism (intermediate-high risk)',
    ecg: 'S1Q3T3 pattern, sinus tachycardia 110 bpm',
    treatment: 'IV unfractionated heparin bolus 80 U/kg, CT pulmonary angiography, O₂ therapy'
  },
  // Day 6 – 04/07/2026
  {
    name: 'Tikhonov Pavel Alexandrovich', age: 67, sex: 'Male',
    complaint: 'Confusion, fever 40.1°C, productive cough, hypotension BP 85/50',
    diagnosis: 'Septic shock secondary to aspiration pneumonia',
    ecg: 'Sinus tachycardia 130 bpm, diffuse ST changes',
    treatment: 'Bundle protocol: IV fluids 30 mL/kg, norepinephrine, meropenem + vancomycin; ICU admission'
  },
  {
    name: 'Stepanova Maria Fyodorovna', age: 48, sex: 'Female',
    complaint: 'Sudden onset severe headache, facial drooping, right arm weakness',
    diagnosis: 'Acute ischemic stroke (right MCA territory, NIHSS 14)',
    ecg: 'Sinus rhythm, normal',
    treatment: 'IV alteplase within thrombolytic window; mechanical thrombectomy evaluation'
  },
  // Day 7 – 06/07/2026
  {
    name: 'Fedorov Alexei Yuryevich', age: 38, sex: 'Male',
    complaint: 'Acute colicky flank pain radiating to groin, hematuria',
    diagnosis: 'Urolithiasis – right ureteric colic (8 mm stone)',
    ecg: 'Sinus rhythm, HR 88 bpm, normal',
    treatment: 'IV ketorolac 30 mg, IV morphine 4 mg, IV fluids; urology consultation, CT urogram'
  },
  {
    name: 'Makarova Elena Borisovna', age: 53, sex: 'Female',
    complaint: 'Dysarthria, facial numbness, ataxia, nausea; sudden onset',
    diagnosis: 'Posterior circulation TIA / cerebellar stroke (NIHSS 6)',
    ecg: 'AF with rapid ventricular response 115 bpm',
    treatment: 'DAPT (aspirin + clopidogrel), anticoagulation, urgent MRI brain, neurology consult'
  },
  // Day 8 – 07/07/2026
  {
    name: 'Zaytsev Viktor Nikolayevich', age: 70, sex: 'Male',
    complaint: 'Bradycardia HR 32 bpm, presyncope, fatigue, BP 80/50',
    diagnosis: 'Complete heart block (third-degree AV block)',
    ecg: 'Complete AV dissociation, ventricular escape rhythm at 30 bpm',
    treatment: 'IV atropine 0.5 mg (×2), transcutaneous pacing; cardiology & permanent pacemaker consult'
  },
  {
    name: 'Smirnova Galina Alekseyevna', age: 31, sex: 'Female',
    complaint: 'Severe abdominal pain, amenorrhea ×8 weeks, BP 85/50, HR 120',
    diagnosis: 'Ruptured ectopic pregnancy',
    ecg: 'Sinus tachycardia 122 bpm',
    treatment: 'Emergency surgical consultation, type & crossmatch, IV fluids, urgent laparotomy'
  },
  // Day 9 – 08/07/2026
  {
    name: 'Borisov Konstantin Ilyich', age: 60, sex: 'Male',
    complaint: 'Sudden onset flaccid paraplegia, urinary retention after coughing',
    diagnosis: 'Acute cord compression – thoracic disc herniation T10-T11',
    ecg: 'Sinus bradycardia 56 bpm (neurogenic)',
    treatment: 'High-dose dexamethasone, urgent MRI spine, neurosurgical emergency consult'
  },
  {
    name: 'Popova Zhanna Romanovna', age: 19, sex: 'Female',
    complaint: 'Severe vomiting, polyuria, deep rapid breathing (Kussmaul), confusion',
    diagnosis: 'Diabetic ketoacidosis (glucose 28 mmol/L, pH 7.15)',
    ecg: 'Peaked T-waves (hyperkalemia), sinus tachycardia',
    treatment: 'IV normal saline 1 L/h × 2 h; insulin infusion 0.1 U/kg/h; K⁺ replacement; glucose monitoring'
  },
  // Day 10 – 09/07/2026
  {
    name: 'Nikitin Evgeny Pavlovich', age: 74, sex: 'Male',
    complaint: 'Hemoptysis ×500 mL, weight loss 8 kg in 3 months, smoker 40 pack-years',
    diagnosis: 'Massive hemoptysis – suspected central lung carcinoma',
    ecg: 'Sinus rhythm, right axis deviation, P pulmonale',
    treatment: 'Patient positioned affected side down; IV tranexamic acid; bronchoscopy; oncology referral'
  },
  {
    name: 'Fomina Yekaterina Dmitrievna', age: 27, sex: 'Female',
    complaint: 'Diffuse urticaria, stridor, facial angioedema, BP 70/40 minutes after antibiotic injection',
    diagnosis: 'Anaphylactic shock',
    ecg: 'Sinus tachycardia 140 bpm',
    treatment: 'IM epinephrine 0.5 mg, IV methylprednisolone, IV diphenhydramine, IV fluids, O₂'
  },
  // Day 11 – 10/07/2026
  {
    name: 'Grigoryev Mikhail Semyonovich', age: 66, sex: 'Male',
    complaint: 'Acute right leg pain, pallor, pulselessness, paresthesia, cold below knee',
    diagnosis: 'Acute lower limb ischemia – arterial embolism right popliteal artery',
    ecg: 'Atrial fibrillation, HR 88 bpm',
    treatment: 'IV heparin 5000 IU bolus, urgent vascular surgery consult, Doppler US, embolectomy'
  },
  {
    name: 'Yakovleva Svetlana Mikhailovna', age: 44, sex: 'Female',
    complaint: 'High fever 39.8°C, rigors, right flank pain, dysuria, vomiting',
    diagnosis: 'Acute pyelonephritis with urosepsis',
    ecg: 'Sinus tachycardia 116 bpm',
    treatment: 'IV ceftriaxone 2 g, IV fluids, analgesics; renal US; urology consult for obstructive cause'
  },
  // Day 12 – 11/07/2026
  {
    name: 'Sorokin Nikolai Grigoryevich', age: 82, sex: 'Male',
    complaint: 'Sudden painless loss of vision in right eye, RAPD present',
    diagnosis: 'Central retinal artery occlusion (right eye)',
    ecg: 'AF with HR 74 bpm',
    treatment: 'Urgent ophthalmology consult; ocular massage; systemic anticoagulation; workup for embolic source'
  },
  {
    name: 'Belyaeva Oksana Viktorovna', age: 36, sex: 'Female',
    complaint: 'Tonic-clonic seizure lasting 8 minutes, post-ictal confusion, no prior history',
    diagnosis: 'Status epilepticus (first unprovoked seizure)',
    ecg: 'Sinus rhythm, normal; QTc 440 ms',
    treatment: 'IV lorazepam 4 mg; if no response, IV levetiracetam 1000 mg; urgent MRI brain; neurology'
  },
];

const workingDays = [
  '29/06/2026','30/06/2026','01/07/2026','02/07/2026',
  '03/07/2026','04/07/2026','06/07/2026','07/07/2026',
  '08/07/2026','09/07/2026','10/07/2026','11/07/2026',
];

// ── Build patient sub-rows ────────────────────────────────────────────────────
// For each day we generate rows for Patient 1, then activities, then Patient 2, then activities

function patientRows(p, showDate, dateStr) {
  const rows = [];

  // Patient header row
  rows.push(new TableRow({
    children: [
      cell(showDate ? dateStr : '', { center: true, width: 1500, fontSize: 20, shading: 'EAF4FF' }),
      cell(`PATIENT: ${p.name}, ${p.age} y.o., ${p.sex} | Chief complaint: ${p.complaint}`,
        { bold: true, fontSize: 20, shading: 'EAF4FF' }),
      cell('', { width: 1400, fontSize: 20, shading: 'EAF4FF' }),
    ],
  }));

  // Activity rows for this patient
  const activities = [
    { text: 'Safety instructions reviewed. Familiarization with the structure of the ambulance station (admission unit of the inpatient emergency department).', freq: '1' },
    { text: `Clinical examination of newly admitted patient: ${p.name}. Diagnosis established: ${p.diagnosis}. Coordination of diagnosis, examination plan, and treatment plan with the attending physician.`, freq: '1' },
    { text: `Interpretation of additional examination data – ECG findings: ${p.ecg}.`, freq: '1' },
    { text: 'Participation in providing medical assistance during emergency ambulance calls.', freq: '1' },
    { text: 'Ward rounds with the head of department for supervised patients.', freq: '1' },
    { text: `Clinical case review with head of department for patient ${p.name}: ${p.diagnosis}. Treatment applied: ${p.treatment}.`, freq: '1' },
  ];

  activities.forEach(a => {
    rows.push(new TableRow({
      children: [
        emptyCell({ width: 1500 }),
        cell(a.text, { fontSize: 20 }),
        cell(a.freq, { center: true, width: 1400, fontSize: 20 }),
      ],
    }));
  });

  return rows;
}

function buildDailyTable(date, p1, p2) {
  // Header
  const headerRow = new TableRow({
    children: [
      cell('Date', { bold: true, center: true, width: 1500, shading: 'D9D9D9', fontSize: 20 }),
      cell('Content of completed work', { bold: true, center: true, shading: 'D9D9D9', fontSize: 20 }),
      cell('Frequency', { bold: true, center: true, width: 1400, shading: 'D9D9D9', fontSize: 20 }),
    ],
    tableHeader: true,
  });

  const p1Rows = patientRows(p1, true, date);
  const p2Rows = patientRows(p2, false, '');

  // Signature rows
  const sigRow1 = new TableRow({
    children: [
      emptyCell({ width: 1500 }),
      cell("Student's signature", { bold: true, fontSize: 20 }),
      emptyCell({ width: 1400 }),
    ],
  });
  const sigRow2 = new TableRow({
    children: [
      emptyCell({ width: 1500 }),
      cell('Signature of the clinical base supervisor', { bold: true, fontSize: 20 }),
      emptyCell({ width: 1400 }),
    ],
  });

  return new Table({
    width: { size: 100, type: WidthType.PERCENTAGE },
    rows: [headerRow, ...p1Rows, ...p2Rows, sigRow1, sigRow2],
  });
}

// ── Cover page ────────────────────────────────────────────────────────────────
const coverContent = [
  para('Federal State Budgetary Educational Institution of Higher Education', { bold: true, center: true, size: 22, spaceAfter: 40 }),
  para('"Kursk State Medical University"', { bold: true, center: true, size: 22, spaceAfter: 40 }),
  para('of the Ministry of Health of the Russian Federation', { bold: true, center: true, size: 22, spaceAfter: 200 }),
  para('DIARY OF INDUSTRIAL PRACTICE', { bold: true, center: true, size: 28, spaceAfter: 60 }),
  para('for acquiring professional skills and experience in professional activity', { center: true, size: 22, spaceAfter: 60 }),
  para('"Provision of emergency and urgent medical care (physician assistant)"', { bold: true, italic: true, center: true, size: 22, spaceAfter: 300 }),
  para('Student of the _____ course, Faculty of _________________________, Group ______,', { size: 22, spaceAfter: 40 }),
  para('Full name of the student: _________________________________________________________', { size: 22, spaceAfter: 200 }),
  para('Practice title: Industrial practice "Provision of emergency and urgent medical care (physician assistant)"', { size: 22, spaceAfter: 200 }),
  para('Practice base (medical institution / healthcare facility, department, academic chair, institution):', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 200 }),
  para('Full name and position of the responsible staff member of the practice base:', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 200 }),
  para('Full name and position of the supervisor of practical training:', { size: 22, spaceAfter: 40 }),
  para('______________________________________________________________________________', { size: 22, spaceAfter: 200 }),
  para('Period of practice: from ______________ to ______________ (year _____).',{ size: 22, spaceAfter: 300 }),
];

// ── Schedule table ────────────────────────────────────────────────────────────
const scheduleRows = [
  new TableRow({
    children: [
      cell('Date', { bold: true, center: true, width: 2400, shading: 'D9D9D9' }),
      cell('Working hours', { bold: true, center: true, shading: 'D9D9D9' }),
    ],
    tableHeader: true,
  }),
  ...([
    ['29/06/2026','08:00 – 14:00'],['30/06/2026','08:00 – 14:00'],['01/07/2026','08:00 – 14:00'],
    ['02/07/2026','08:00 – 14:00'],['03/07/2026','08:00 – 14:00'],['04/07/2026','08:00 – 14:00'],
    ['DAY OFF',''],['06/07/2026','08:00 – 14:00'],['07/07/2026','08:00 – 14:00'],
    ['08/07/2026','08:00 – 14:00'],['09/07/2026','08:00 – 14:00'],['10/07/2026','08:00 – 14:00'],
    ['11/07/2026','08:00 – 14:00'],['',''],['',''],
  ].map(([d, h]) => new TableRow({
    children: [
      cell(d, { center: true, width: 2400 }),
      cell(h, { center: true }),
    ],
  }))),
];

const scheduleTable = new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, rows: scheduleRows });

const scheduleContent = [
  para('Student work schedule', { bold: true, center: true, size: 24, spaceAfter: 120 }),
  scheduleTable,
  para('', { spaceAfter: 80 }),
  para('Signature of the responsible staff member of the practice base: ___________________', { size: 22, spaceAfter: 40 }),
  para('Seal of the practice base', { size: 22, spaceAfter: 300 }),
];

// ── Assemble daily content ────────────────────────────────────────────────────
const dailyContent = [
  para('Daily Work Log', { bold: true, center: true, size: 26, spaceAfter: 200 }),
];

workingDays.forEach((date, idx) => {
  const p1 = patients[idx * 2];
  const p2 = patients[idx * 2 + 1];
  dailyContent.push(buildDailyTable(date, p1, p2));
  dailyContent.push(para('', { spaceAfter: 200 }));
});

// ── Document ──────────────────────────────────────────────────────────────────
const doc = new Document({
  styles: {
    default: {
      document: { run: { font: 'Times New Roman', size: 22 } },
    },
  },
  sections: [{
    properties: {
      page: { margin: { top: 1134, bottom: 1134, left: 1701, right: 850 } },
    },
    children: [
      ...coverContent,
      new Paragraph({ children: [new PageBreak()] }),
      ...scheduleContent,
      new Paragraph({ children: [new PageBreak()] }),
      ...dailyContent,
    ],
  }],
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync('/home/daytona/workspace/practice-diary/Practice_Diary_24Patients.docx', buf);
  console.log('Done: Practice_Diary_24Patients.docx');
});
Running Command

cd /home/daytona/workspace/practice-diary && node create_diary_v2.js 2>&1

Running Command

ls -lh /home/daytona/workspace/practice-diary/Practice_Diary_24Patients.docx && …

Running Command

grep -o 'PATIENT: [^|]*' /tmp/v2check/word/document.xml | head -30

Your updated Practice Diary with 24 unique patients (2 per day) is ready:

Practice Diary 24Patients

Word Document · DOCX


All 24 individual patients across 12 working days:
DayDatePatient 1Patient 2
129/06Ivanov D.A., 58 M - STEMI (anterior)Petrova N.I., 72 F - Acute ischemic stroke
230/06Sidorov G.P., 45 M - Severe pneumoniaKuznetsova O.M., 34 F - Subarachnoid hemorrhage
301/07Morozov A.N., 62 M - Type B aortic dissectionSokolova T.V., 29 F - Perforated appendicitis
402/07Volkov I.S., 78 M - Upper GI hemorrhageLebedeva I.V., 41 F - AVNRT (SVT)
503/07Korolev S.D., 55 M - Acute decompensated HFNovikova A.S., 22 F - Pulmonary embolism
604/07Tikhonov P.A., 67 M - Septic shockStepanova M.F., 48 F - Acute ischemic stroke
706/07Fedorov A.Y., 38 M - Ureteric colicMakarova E.B., 53 F - Posterior circulation TIA
807/07Zaytsev V.N., 70 M - Complete heart blockSmirnova G.A., 31 F - Ruptured ectopic pregnancy
908/07Borisov K.I., 60 M - Acute cord compressionPopova Zh.R., 19 F - Diabetic ketoacidosis
1009/07Nikitin E.P., 74 M - Massive hemoptysisFomina Y.D., 27 F - Anaphylactic shock
1110/07Grigoryev M.S., 66 M - Acute limb ischemiaYakovleva S.M., 44 F - Pyelonephritis/urosepsis
1211/07Sorokin N.G., 82 M - Central retinal artery occlusionBelyaeva O.V., 36 F - Status epilepticus
Each patient entry includes: name, age, sex, chief complaint, established diagnosis, ECG findings, and treatment applied - all integrated into the standard 3-column log table matching the sample format exactly.
This is a shared conversation. Sign in to Orris to start your own chat.