ข้ามไปที่เนื้อหา

Software Requirements Specification (SRS)

ระบบงานรังสีวิทยา (Radiology System with CPOE AI Assist) - โรงพยาบาลจังหวัด

Document Version: 1.0 (Complete TOR-Based Edition)
Date: 29 สิงหาคม 2568
Project: Hospital Information System - Radiology System Module
System Code: RADIOLOGY
Target Hospital: โรงพยาบาลระดับจังหวัด (500+ เตียง, 100+ ผู้ใช้พร้อมกัน)
Technology Stack: Next.js 14, TypeScript, Nest.js, PostgreSQL 15+, Prisma ORM
Based on: TOR ระบบงานรังสีวิทยา (Radiology System with CPOE AI Assist)


📋 Table of Contents

  1. บทนำและขอบเขตโครงการ
  2. ความต้องการเชิงหน้าที่ (Functional Requirements)
  3. ความต้องการด้านประสิทธิภาพ (Performance Requirements)
  4. ความต้องการด้านความปลอดภัย (Security Requirements)
  5. ความต้องการด้านการเชื่อมต่อ (Integration Requirements)
  6. ความต้องการด้านการใช้งาน (Usability Requirements)
  7. ความต้องการด้านการปฏิบัติตามกฎระเบียบ (Compliance Requirements)
  8. ข้อกำหนดทางเทคนิค (Technical Specifications)
  9. การทดสอบและประกันคุณภาพ (Testing & Quality Assurance)
  10. เอกสารและรายงาน (Documentation & Reporting)
  11. การติดตั้งและการนำไปใช้ (Implementation & Deployment)
  12. การบำรุงรักษาและสนับสนุน (Maintenance & Support)
  13. การติดตามและประเมินผล (Monitoring & Evaluation)
  14. การจัดการความเสี่ยง (Risk Management)
  15. การฝึกอบรมและการเปลี่ยนแปลง (Training & Change Management)
  16. สรุปและการอนุมัติ (Summary & Approval)
  17. ภาคผนวก (Appendices)

1. บทนำและขอบเขตโครงการ

1.1 วัตถุประสงค์ของเอกสาร

เอกสารนี้กำหนดความต้องการทางซอฟต์แวร์สำหรับระบบงานรังสีวิทยา (Radiology System with CPOE AI Assist) ตามเอกสาร TOR ที่ครอบคลุม:

  • ระบบซักประวัติและคัดกรองผู้ป่วยก่อนสั่งตรวจ
  • การสั่งตรวจทางรังสีด้วย CPOE AI Assist
  • ระบบคำแนะนำผู้ป่วยก่อนการตรวจ
  • การจัดการภาพถ่ายและรายงานผล
  • การเชื่อมต่อกับระบบ RIS/PACS
  • การบูรณาการกับโมดูลอื่นใน MediTech HIS

1.2 ขอบเขตของระบบ

ระบบที่รวมอยู่ใน Scope:

  • โมดูลการซักประวัติและคัดกรองผู้ป่วย (Patient Screening)
  • โมดูลการสั่งตรวจรังสีผ่าน CPOE AI Assist
  • โมดูลการจัดการคำสั่งตรวจรังสี (Order Management)
  • โมดูลการจัดการภาพและรายงาน (Image & Report Management)
  • Integration Points กับ RIS/PACS
  • การรองรับมาตรฐาน DICOM
  • การรองรับภาษาไทยและอังกฤษ

ระบบที่อยู่นอก Scope:

  • ระบบ PACS เองไม่รวมใน scope (เป็น integration เท่านั้น)
  • ระบบ RIS ภายนอก (เป็น integration เท่านั้น)
  • อุปกรณ์ถ่ายภาพรังสีโดยตรง (เครื่อง X-ray, CT, MRI)

1.3 คำจำกัดความและคำย่อ

คำศัพท์ คำจำกัดความ
RIS Radiology Information System - ระบบสารสนเทศรังสีวิทยา
PACS Picture Archiving and Communication System - ระบบจัดเก็บและส่งผ่านภาพทางการแพทย์
DICOM Digital Imaging and Communications in Medicine - มาตรฐานการสื่อสารภาพทางการแพทย์
CPOE AI Assist Computerized Physician Order Entry with AI Assistant - ระบบสั่งการแพทย์ด้วยผู้ช่วย AI
GFR Glomerular Filtration Rate - อัตราการกรองของไต
HL7 FHIR Health Level 7 Fast Healthcare Interoperability Resources
PDPA Personal Data Protection Act - พระราชบัญญัติคุ้มครองข้อมูลส่วนบุคคล

1.4 การอ้างอิง

  • TOR ระบบงานรังสีวิทยา (Radiology System with CPOE AI Assist)
  • MediTech Architecture Overview
  • MASTER_DATABASE_SCHEMA.md
  • API Design Guidelines
  • DICOM 3.0 Standard
  • HL7 FHIR R4 Standard

1.5 ภาพรวมของเอกสาร

เอกสารนี้แบ่งออกเป็น 17 หมวดหลัก ครอบคลุมตั้งแต่ความต้องการเชิงหน้าที่ ไปจนถึงการนำไปใช้และบำรุงรักษา โดยยึดมาตรฐาน IEEE 830-1998 และปรับให้เหมาะสมกับระบบสารสนเทศโรงพยาบาล พร้อมการบูรณาการ CPOE AI Assist สำหรับการแนะนำการตรวจรังสีที่เหมาะสม


2. ความต้องการเชิงหน้าที่ (Functional Requirements)

2.1 ระบบซักประวัติและคัดกรองผู้ป่วยก่อนสั่งตรวจ

FR-001: การแสดงข้อมูลผู้ป่วยอัตโนมัติ

Priority: High
Source: TOR Section 2.1
Dependencies: EMR_CORE integration

Description: ระบบต้องแสดงข้อมูลผู้ป่วยที่จำเป็นสำหรับการสั่งตรวจรังสีอัตโนมัติเมื่อเลือกผู้ป่วย

Acceptance Criteria:

AC-001.1: การแสดงข้อมูลประชากรผู้ป่วย

  • แสดงเพศ, อายุ, น้ำหนัก, ส่วนสูงของผู้ป่วย
  • แสดงโรคประจำตัวจากเวชระเบียนล่าสุด
  • แสดงประวัติแพ้ยาและสารทึบแสง
  • แสดงค่า GFR ล่าสุด (ถ้ามี)

AC-001.2: การแสดงข้อมูลการตั้งครรภ์

  • ตรวจสอบและแสดงสถานะการตั้งครรภ์สำหรับผู้ป่วยหญิง
  • แสดงอายุครรภ์ (ถ้าทราบ)
  • แสดงประวัติการตั้งครรภ์ก่อนหน้า

AC-001.3: การแสดงประวัติการตรวจรังสีก่อนหน้า

  • แสดงการตรวจรังสีใน 6 เดือนล่าสุด
  • แสดงปริมาณรังสีสะสม (ถ้าสามารถคำนวณได้)
  • แสดงภาพถ่ายและรายงานการตรวจก่อนหน้า

Test Scenarios:

  • Scenario 1: เลือกผู้ป่วยหญิงวัย 25 ปี ระบบต้องตรวจสอบและแสดงคำเตือนเกี่ยวกับการตั้งครรภ์
  • Scenario 2: เลือกผู้ป่วยที่มีค่า GFR ต่ำ ระบบต้องแสดงคำเตือนเมื่อสั่งตรวจ CT with contrast

FR-002: ระบบตรวจสอบภาวะเสี่ยง

Priority: High
Source: TOR Section 2.1
Dependencies: Patient data integration

Description: ระบบต้องตรวจสอบและแจ้งเตือนภาวะเสี่ยงต่างๆ ก่อนการสั่งตรวจรังสี

Acceptance Criteria:

AC-002.1: การตรวจสอบการแพ้สารทึบแสง

  • ตรวจสอบประวัติแพ้สารทึบแสงจากฐานข้อมูล
  • แสดงคำเตือนระดับความรุนแรงของการแพ้
  • แนะนำมาตรการป้องกันหรือทางเลือกอื่น

AC-002.2: การตรวจสอบภาวะไตบกพร่อง

  • ตรวจสอบค่า GFR ล่าสุดของผู้ป่วย
  • แจ้งเตือนเมื่อ GFR < 60 mL/min/1.73m²
  • แนะนำการดื่มน้ำเพิ่มเติมหรือการให้ยาป้องกัน

AC-002.3: การตรวจสอบข้อห้ามสำหรับ MRI

  • ตรวจสอบประวัติการฝัง pacemaker, metal implants
  • แสดงรายการ contraindications สำหรับ MRI
  • บังคับให้กรอก MRI safety checklist

Test Scenarios:

  • Scenario 1: ผู้ป่วยมีประวัติแพ้สารทึบแสง แต่แพทย์สั่งตรวจ CT with contrast
  • Scenario 2: ผู้ป่วยมี pacemaker และแพทย์สั่งตรวจ MRI

2.2 การสั่งตรวจทางรังสีด้วย CPOE AI Assist

FR-003: การสร้างคำสั่งตรวจรังสี

Priority: High
Source: TOR Section 2.2.1
Dependencies: CPOE integration

Description: ระบบต้องรองรับการสร้างคำสั่งตรวจรังสีที่แบ่งตามประเภทและมีการ validate ข้อมูล

Acceptance Criteria:

AC-003.1: เมนูเลือกการตรวจ

  • แยกเมนูตามประเภท: X-ray, CT, MRI, Ultrasound, Nuclear Medicine
  • รองรับการค้นหาการตรวจด้วย keyword
  • แสดงรายละเอียดการตรวจ, ค่าใช้จ่าย, เวลาที่ใช้

AC-003.2: การกรอกข้อมูลคำสั่ง

  • บังคับกรอกข้อบ่งชี้ทางคลินิก (Clinical indication)
  • ช่องคำแนะนำเพิ่มเติมสำหรับ technologist
  • เลือกระดับความเร่งด่วน (Routine, Urgent, Stat)

AC-003.3: การระบุข้อมูลผู้ส่งตรวจ

  • ระบุชื่อแพทย์ผู้ส่งตรวจอัตโนมัติจาก session
  • ระบุแผนกที่ส่งตรวจ
  • ระบุหมายเลข visit/admission

Test Scenarios:

  • Scenario 1: สั่งตรวจ Chest X-ray โดยไม่ใส่ clinical indication
  • Scenario 2: สั่งตรวจ MRI Brain หลายรายการในคราวเดียว

FR-004: CPOE AI Assist สำหรับการแนะนำการตรวจ

Priority: High
Source: TOR Section 2.2.2
Dependencies: AI Engine integration

Description: ระบบ AI ช่วยตรวจสอบและแนะนำการตรวจรังสีที่เหมาะสม

Acceptance Criteria:

AC-004.1: การตรวจสอบความซ้ำซ้อนและการชนกัน

  • ตรวจสอบการส่งตรวจเดียวกันในช่วง 30 วันล่าสุด
  • เตือนการตรวจที่ขัดแย้งกัน (เช่น CT และ MRI ใน part เดียวกันในวันเดียวกัน)
  • แสดงผลการตรวจก่อนหน้าที่อาจตอบคำถามเดียวกัน

AC-004.2: การให้คำแนะนำการตรวจที่เหมาะสม

  • วิเคราะห์ chief complaint และ clinical indication
  • แนะนำการตรวจที่เหมาะสมตามแนวทาง clinical practice guidelines
  • เสนอทางเลือกที่ให้รังสีน้อยกว่าแต่ได้ข้อมูลเทียบเท่า
  • แสดง confidence score ของแต่ละคำแนะนำ

AC-004.3: การประเมินความเสี่ยงและข้อห้าม

  • แจ้งเตือนการแพ้สารทึบแสงพร้อมแนะนำ premedication
  • เตือนภาวะไตบกพร่องและแนะนำการป้องกัน nephrotoxicity
  • เตือนการตั้งครรภ์และแนะนำการตรวจที่ปลอดภัย (US, MRI)
  • ตรวจสอบ contraindications สำหรับ MRI

AC-004.4: การแจ้งเตือนและคำแนะนำสำหรับผู้ป่วย

  • สร้างคำแนะนำการเตรียมตัวอัตโนมัติ
  • แนะนำเรื่องการงดอาหาร, การกลั้นปัสสาวะ
  • คำแนะนำเรื่องการถอดเครื่องประดับ, โลหะ

Test Scenarios:

  • Scenario 1: สั่งตรวจ CT Abdomen ในผู้ป่วยที่เพิ่งตรวจ Ultrasound Abdomen 2 วันก่อน
  • Scenario 2: สั่งตรวจ MRI ในผู้ป่วยที่มี pacemaker

2.3 ระบบคำแนะนำผู้ป่วยก่อนการตรวจ

FR-005: การสร้างคำแนะนำอัตโนมัติ

Priority: Medium
Source: TOR Section 2.3
Dependencies: Order management

Description: ระบบสร้างคำแนะนำการเตรียมตัวสำหรับผู้ป่วยอัตโนมัติตามประเภทการตรวจ

Acceptance Criteria:

AC-005.1: การสร้างคำแนะนำตามการตรวจ

  • สร้างคำแนะนำเฉพาะสำหรับแต่ละประเภทการตรวจ
  • คำแนะนำการงดอาหาร/น้ำ (เช่น CT Abdomen งดอาหาร 4 ชั่วโมง)
  • คำแนะนำการดื่มน้ำล่วงหน้า (เช่น IVP ดื่มน้ำ 500ml ก่อนตรวจ 1 ชั่วโมง)
  • คำแนะนำการถอดเครื่องประดับและโลหะ

AC-005.2: การปรับแต่งคำแนะนำตามผู้ป่วย

  • ปรับคำแนะนำตามอายุผู้ป่วย (เด็ก/ผู้ใหญ่/ผู้สูงอายุ)
  • ปรับตามเพศ (เช่น pregnancy screening สำหรับหญิง)
  • ปรับตามโรคประจำตัว (เช่น DM ต้องระวังการงดอาหารนาน)

AC-005.3: การแนบคำแนะนำกับเอกสารนัด

  • พิมพ์คำแนะนำพร้อมเอกสารนัดหมาย
  • ส่ง SMS หรือ Line message พร้อมคำแนะนำ
  • บันทึกว่าผู้ป่วยได้รับคำแนะนำแล้ว

Test Scenarios:

  • Scenario 1: สั่งตรวจ CT Abdomen with contrast ในผู้ป่วย DM
  • Scenario 2: สั่งตรวจ MRI ในเด็กอายุ 8 ปี

2.4 การจัดการภาพถ่ายและรายงานผล

FR-006: การจัดการภาพ DICOM และรายงาน

Priority: High
Source: TOR Section 2.4
Dependencies: PACS integration

Description: ระบบรับ, จัดเก็บ, และแสดงภาพ DICOM พร้อมรองรับการบันทึกรายงาน

Acceptance Criteria:

AC-006.1: การรับและจัดเก็บภาพจาก PACS

  • รับภาพ DICOM จากเครื่องตรวจและ PACS
  • ตรวจสอบความสมบูรณ์ของ DICOM metadata
  • จัดเก็บภาพในระบบ storage ที่กำหนด
  • สร้าง thumbnail สำหรับการแสดงผลเบื้องต้น

AC-006.2: การแสดงผลภาพผ่าน Web Viewer

  • แสดงภาพ DICOM ผ่าน web browser โดยไม่ต้องติดตั้ง plugin
  • รองรับ basic image manipulation (zoom, pan, window/level)
  • แสดงข้อมูล DICOM tags ที่สำคัญ
  • รองรับการแสดงหลายภาพพร้อมกัน (multi-planar reconstruction)

AC-006.3: การบันทึกรายงานของแพทย์รังสี

  • รองรับการบันทึกรายงาน preliminary และ final report
  • รองรับ voice-to-text สำหรับการ dictation
  • Template รายงานสำหรับการตรวจแต่ละประเภท
  • ระบบ spell check และ grammar check สำหรับภาษาไทย

AC-006.4: การเชื่อมโยงรายงานเข้าเวชระเบียน

  • แนบรายงานเข้าสู่เวชระเบียนผู้ป่วยอัตโนมัติ
  • ส่งการแจ้งเตือนไปยังแพทย์ที่ส่งตรวจเมื่อรายงานเสร็จ
  • รองรับ digital signature สำหรับรายงาน
  • Export รายงานเป็น PDF สำหรับการพิมพ์

Test Scenarios:

  • Scenario 1: รับภาพ CT 200 slices และแสดงผลใน web viewer
  • Scenario 2: บันทึกรายงาน MRI Brain พร้อม digital signature

2.5 ระบบการอนุมัติและการแก้ไขคำสั่ง

FR-007: การจัดการ Order Lifecycle

Priority: Medium
Source: TOR Section 2.2.3
Dependencies: CPOE integration

Description: ระบบต้องรองรับการอนุมัติ, แก้ไข, และยกเลิกคำสั่งตรวจรังสี

Acceptance Criteria:

AC-007.1: การยืนยันและส่งคำสั่งไป RIS

  • ตรวจสอบความสมบูรณ์ของข้อมูลก่อนส่ง
  • ส่งข้อมูล order ไปยัง RIS ผ่าน HL7 หรือ API
  • รับ confirmation กลับจาก RIS
  • อัพเดทสถานะ order เป็น "Sent to RIS"

AC-007.2: การแก้ไขคำสั่งก่อนการตรวจ

  • อนุญาตให้แพทย์แก้ไขคำสั่งก่อนที่การตรวจจะเริ่ม
  • บันทึก audit log ของการเปลี่ยนแปลง
  • ส่งข้อมูลที่แก้ไขไปยัง RIS
  • แจ้งเตือนแผนกรังสีเมื่อมีการแก้ไข

AC-007.3: การยกเลิกคำสั่ง

  • อนุญาตให้ยกเลิกคำสั่งพร้อมระบุเหตุผล
  • ตรวจสอบสถานะก่อนอนุญาตให้ยกเลิก
  • แจ้งเตือนแผนกรังสีเมื่อมีการยกเลิก
  • อัพเดทสถานะเป็น "Cancelled"

Test Scenarios:

  • Scenario 1: แก้ไข clinical indication หลังส่ง order ไป RIS แล้ว
  • Scenario 2: ยกเลิก order ที่ผู้ป่วยมา check-in แล้ว

3. ความต้องการด้านประสิทธิภาพ (Performance Requirements)

3.1 เวลาตอบสนอง (Response Time)

การดำเนินการ เป้าหมาย หมายเหตุ
การโหลดข้อมูลผู้ป่วย < 300ms 95th percentile
การตรวจสอบ AI recommendations < 2s 95th percentile
การโหลด DICOM viewer < 5s สำหรับภาพขนาด < 100MB
การส่ง order ไป RIS < 1s 95th percentile
การค้นหา previous studies < 500ms 95th percentile
การสร้างรายงาน PDF < 3s 95th percentile

3.2 ปริมาณงาน (Throughput)

  • ผู้ใช้พร้อมกัน: 50+ radiologists และ technologists ในเวลาเดียวกัน
  • การประมวลผล DICOM: 500+ studies/วัน
  • การสร้างรายงาน: 200+ reports/วัน
  • AI processing: 100+ order validations/ชั่วโมง

3.3 การใช้ทรัพยากร (Resource Usage)

  • การใช้ CPU: < 60% ในภาวะปกติ
  • การใช้หน่วยความจำ: < 4GB RAM สำหรับ DICOM viewer
  • พื้นที่จัดเก็บ: รองรับการเจริญเติบโต 1TB/เดือน
  • แบนด์วิธ: รองรับการส่งภาพ DICOM ขนาดใหญ่

3.4 ความสามารถในการขยายตัว (Scalability)

  • DICOM Storage: รองรับ tiered storage (hot/warm/cold)
  • Report Storage: รองรับการ archive รายงานเก่า
  • AI Processing: รองรับการขยาย AI processing nodes
  • Database: รองรับ partitioning สำหรับข้อมูลมากปริมาณ

4. ความต้องการด้านความปลอดภัย (Security Requirements)

4.1 การยืนยันตัวตน (Authentication)

  • Single Sign-On: บูรณาการกับระบบ authentication หลักของ MediTech
  • Multi-factor Authentication: รองรับ MFA สำหรับแพทย์รังสี
  • Session Management: Session timeout 30 นาทีสำหรับ DICOM viewer
  • Biometric Support: รองรับการ login ด้วย fingerprint (ถ้ามี)

4.2 การควบคุมการเข้าถึง (Authorization)

  • Role-based Access Control: แยกสิทธิ radiologist, technologist, resident
  • Patient Access Control: ควบคุมการเข้าถึงภาพผู้ป่วยตามแผนก
  • Image Access Levels: แยกระดับการเข้าถึง (view only, report, admin)
  • Audit Access: บันทึกการเข้าถึงภาพและรายงานทุกครั้ง

4.3 การป้องกันข้อมูล (Data Protection)

  • DICOM Encryption: เข้ารหัสภาพ DICOM ในระหว่างการส่ง
  • Database Encryption: เข้ารหัส database ที่เก็บ metadata
  • Report Security: เข้ารหัสรายงานและรองรับ digital signature
  • Anonymization: รองรับการปกปิดข้อมูลผู้ป่วยสำหรับ research

4.4 การปฏิบัติตาม PDPA

  • Patient Consent: จัดการความยินยอมสำหรับการใช้ภาพใน teaching
  • Data Retention: กำหนดระยะเวลาเก็บภาพตามกฎหมาย (10 ปี)
  • Access Logs: บันทึกการเข้าถึงข้อมูลผู้ป่วยทุกครั้ง
  • Data Export Controls: ควบคุมการ export ภาพและข้อมูล

5. ความต้องการด้านการเชื่อมต่อ (Integration Requirements)

5.1 การเชื่อมต่อกับระบบพื้นฐาน (Foundation System Integration)

5.1.1 ระบบผู้ดูแลระบบ (System Administration)

  • Authentication Service Integration
  • API Endpoint: POST /api/v1/auth/login
  • Token Management: JWT + Refresh Token
  • Permission Checking: GET /api/v1/auth/permissions

  • Audit Trail Integration

  • Activity Logging: POST /api/v1/audit/log
  • DICOM Access Tracking: ทุกการเข้าถึงภาพและรายงาน

5.1.2 ระบบเวชระเบียน (EMR Core)

  • Patient Data Integration
  • Patient Search: GET /api/v1/patients/search
  • Patient Details: GET /api/v1/patients/{hn}
  • Visit Management: GET /api/v1/visits/{visit_id}

  • Clinical Data Integration

  • Lab Results: GET /api/v1/lab-results/{patient_id}
  • Previous Studies: GET /api/v1/radiology/history/{patient_id}
  • Allergy Information: GET /api/v1/patients/{patient_id}/allergies

5.2 การเชื่อมต่อกับระบบคลินิก (Clinical System Integration)

5.2.1 CPOE AI Assist Integration

  • Order Processing Integration
  • Order Creation: POST /api/v1/cpoe/orders
  • AI Analysis: POST /api/v1/cpoe/ai-assist/analyze-radiology-order
  • Order Validation: GET /api/v1/cpoe/orders/{order_id}/validate

  • Clinical Decision Support

  • Drug Interactions: GET /api/v1/cds/interactions
  • Contraindication Checks: POST /api/v1/cds/contraindications/radiology
  • Protocol Recommendations: POST /api/v1/cds/protocols/recommend

5.2.2 Queue Management Integration

  • Appointment Integration
  • Scheduled Exams: GET /api/v1/appointments/radiology/{date}
  • Exam Scheduling: POST /api/v1/appointments/radiology/schedule
  • Patient Check-in: POST /api/v1/appointments/{id}/checkin

5.3 การเชื่อมต่อกับระบบรังสี (Radiology System Integration)

5.3.1 RIS (Radiology Information System) Integration

  • HL7 FHIR Integration
  • Order Message: HL7 FHIR DiagnosticRequest
  • Study Status: HL7 FHIR DiagnosticReport
  • Patient Demographics: HL7 FHIR Patient

  • API Integration

  • Send Order: POST /api/ris/orders
  • Get Status: GET /api/ris/orders/{order_id}/status
  • Update Order: PUT /api/ris/orders/{order_id}

5.3.2 PACS (Picture Archiving System) Integration

  • DICOM Integration
  • DICOM C-STORE: รับภาพจากเครื่องตรวจ
  • DICOM C-FIND: ค้นหา studies และ series
  • DICOM C-MOVE: ดึงภาพมาแสดง
  • WADO-URI: Web access สำหรับ DICOM images

  • Web-based Viewer Integration

  • DICOM Web API: DICOMweb RESTful API
  • Image Streaming: รองรับ progressive loading
  • Viewport Synchronization: sync multiple viewports

5.4 การเชื่อมต่อภายนอก (External Integration)

5.4.1 การตรวจสอบสิทธิการรักษา

  • NHSO API Integration
  • Eligibility Check: ตรวจสอบสิทธิก่อนตรวจราคาแพง
  • Pre-authorization: ขออนุมัติสำหรับการตรวจพิเศษ

5.4.2 การสื่อสารกับผู้ป่วย

  • SMS Gateway Integration
  • Appointment Reminders: แจ้งเตือนนัดตรวจ
  • Preparation Instructions: คำแนะนำการเตรียมตัว
  • Result Notifications: แจ้งผลการตรวจเสร็จ

5.5 มาตรฐานการเชื่อมต่อ

5.5.1 Healthcare Standards

  • DICOM 3.0: สำหรับการสื่อสารภาพทางการแพทย์
  • HL7 FHIR R4: สำหรับการแลกเปลี่ยนข้อมูลคลินิก
  • IHE Profiles: Scheduled Workflow (SWF), Patient Information Reconciliation (PIR)

5.5.2 API Standards

{
  "status": "success|error",
  "data": {
    "order_id": "RAD20250829001",
    "patient_hn": "10123456",
    "exam_code": "CT_BRAIN_PLAIN",
    "ai_recommendations": {
      "confidence_score": 0.95,
      "suggested_protocol": "Brain CT without contrast",
      "contraindications": [],
      "preparation_instructions": "No specific preparation required"
    }
  },
  "message": "Order processed successfully",
  "timestamp": "2025-08-29T10:30:00Z",
  "version": "v1"
}

6. ความต้องการด้านการใช้งาน (Usability Requirements)

6.1 อินเทอร์เฟซผู้ใช้ (User Interface)

6.1.1 การออกแบบ

  • Responsive Design: รองรับ Desktop, Tablet สำหรับ DICOM viewer
  • Thai/English Support: รองรับภาษาไทยและอังกฤษ
  • Medical UI Standards: ปฏิบัติตาม medical imaging display standards
  • Dark Mode Support: รองรับ dark theme สำหรับการอ่านภาพ

6.1.2 การนำทาง

  • Tabbed Interface: แยก tabs สำหรับ Orders, Images, Reports
  • Quick Access Toolbar: ปุ่มลัดสำหรับฟังก์ชันที่ใช้บ่อย
  • Context Menu: Right-click menu สำหรับ DICOM viewer
  • Keyboard Shortcuts: รองรับ hotkeys สำหรับการทำงานเร็ว

6.2 ประสบการณ์ผู้ใช้ (User Experience)

6.2.1 การสั่งตรวจ (Ordering Workflow)

  • Smart Search: ค้นหาผู้ป่วยด้วย HN, ชื่อ, หรือ national ID
  • Order Templates: template สำหรับการตรวจที่ใช้บ่อย
  • Auto-complete: เติมข้อมูล clinical indication อัตโนมัติ
  • Drag-and-drop: ลากวางภาพเก่ามาเปรียบเทียบ

6.2.2 การอ่านภาพ (Image Reading Workflow)

  • Worklist Management: จัดการ worklist สำหรับ radiologist
  • Hanging Protocols: จัดเรียงภาพตามประเภทการตรวจ
  • Comparison Tools: เปรียบเทียบ current และ prior studies
  • Measurement Tools: เครื่องมือวัดระยะทาง, มุม, พื้นที่

6.3 การสนับสนุนผู้ใช้

  • Contextual Help: คำแนะนำตามบริบทการทำงาน
  • Video Tutorials: วิดีโอสาธิตการใช้ DICOM viewer
  • Quick Reference Cards: การ์ดอ้างอิงสำหรับ keyboard shortcuts
  • Online Manual: คู่มือออนไลน์สำหรับฟีเจอร์ต่างๆ

7. ความต้องการด้านการปฏิบัติตามกฎระเบียบ (Compliance Requirements)

7.1 กฎระเบียบด้านสุขภาพ

7.1.1 มาตรฐานการแพทย์

  • DICOM Conformance: ปฏิบัติตาม DICOM 3.0 standard
  • Medical Device Regulations: รองรับ FDA 510(k) requirements
  • Radiology Standards: ปฏิบัติตาม ACR practice guidelines

7.1.2 ความปลอดภัยของผู้ป่วย

  • Radiation Safety: ติดตาม radiation dose และแจ้งเตือน
  • Critical Results: แจ้งเตือน critical findings ทันที
  • Patient Safety Alerts: เตือนการแพ้สารทึบแสง

7.2 กฎหมายคุ้มครองข้อมูล

7.2.1 PDPA Compliance

  • Image Privacy: จัดการความเป็นส่วนตัวของภาพทางการแพทย์
  • Consent for Teaching: จัดการความยินยอมสำหรับใช้ภาพในการสอน
  • Data Retention: เก็บภาพและรายงานตามกำหนด 10 ปี
  • Access Logging: บันทึกการเข้าถึงข้อมูลทุกครั้ง

7.2.2 การรักษาความลับ

  • Medical Confidentiality: ป้องกันการเข้าถึงโดยไม่ได้รับอนุญาต
  • De-identification: รองรับการลบข้อมูลส่วนบุคคลออกจากภาพ
  • Secure Transmission: เข้ารหัสการส่งภาพและข้อมูล

7.3 มาตรฐานคุณภาพ

7.3.1 ISO Standards

  • ISO 27001: ระบบจัดการความมั่นคงปลอดภัยสารสนเทศ
  • ISO 14155: การศึกษาทางคลินิก (ถ้าใช้ในการวิจัย)
  • ISO 13485: ระบบจัดการคุณภาพอุปกรณ์การแพทย์

8. ข้อกำหนดทางเทคนิค (Technical Specifications)

8.1 สถาปัตยกรรมระบบ (System Architecture)

8.1.1 Frontend Architecture

  • Framework: Next.js 14 with App Router
  • Language: TypeScript 5.0+
  • State Management: Zustand + React Query
  • UI Components: Ant Design 5.0+ + Tailwind CSS
  • DICOM Viewer: Cornerstone.js หรือ OHIF Viewer

8.1.2 Backend Architecture

  • Framework: Nest.js 10+ with TypeScript
  • API Design: RESTful API with GraphQL สำหรับ complex queries
  • Authentication: JWT + Passport.js
  • DICOM Processing: dcm4che Java library
  • Image Processing: Sharp.js สำหรับ thumbnail generation

8.1.3 Database Architecture

  • Primary Database: PostgreSQL 15+
  • DICOM Metadata: PostgreSQL with JSONB
  • Image Storage: File system หรือ Object Storage (AWS S3/MinIO)
  • Caching: Redis for session และ frequently accessed data

8.2 DICOM และ Image Processing

8.2.1 DICOM Standards Support

// DICOM Service Configuration
interface DicomConfig {
  applicationEntityTitle: string;
  port: number;
  supportedSOPClasses: string[];
  transferSyntaxes: string[];
  storageDirectory: string;
  maxAssociations: number;
}

// DICOM Study Structure
interface DicomStudy {
  studyInstanceUID: string;
  patientID: string;
  studyDate: Date;
  studyTime: string;
  modality: string[];
  studyDescription: string;
  numberOfSeries: number;
  numberOfInstances: number;
  accessionNumber: string;
}

8.2.2 Image Storage and Retrieval

// Image Storage Service
interface ImageStorageService {
  storeImage(dicomFile: Buffer): Promise<string>;
  retrieveImage(studyUID: string, seriesUID: string, instanceUID: string): Promise<Buffer>;
  generateThumbnail(imageId: string): Promise<Buffer>;
  getImageMetadata(imageId: string): Promise<DicomMetadata>;
}

8.3 AI Integration Architecture

8.3.1 AI Service Integration

// AI Recommendation Service
interface AIRecommendationService {
  analyzeOrder(orderData: RadiologyOrder): Promise<AIRecommendation>;
  checkContraindications(patientData: Patient, examCode: string): Promise<Contraindication[]>;
  suggestPreparation(examCode: string, patientData: Patient): Promise<PreparationInstructions>;
  validateProtocol(protocol: ImagingProtocol): Promise<ValidationResult>;
}

// AI Recommendation Response
interface AIRecommendation {
  confidence: number;
  suggestedExam: string;
  alternatives: string[];
  contraindications: Contraindication[];
  preparationInstructions: PreparationInstructions;
  clinicalNotes: string;
}

8.4 การติดตั้ง (Deployment)

8.4.1 Development Environment

  • Node.js: v18.0+ LTS
  • Package Manager: npm v9.0+
  • Database: PostgreSQL 15+ with Docker
  • DICOM Server: Orthanc หรือ dcm4chee
  • Redis: v7.0+ for caching

8.4.2 Production Environment

  • Server: Linux-based (Ubuntu 22.04 LTS recommended)
  • Web Server: Nginx as reverse proxy
  • Process Manager: PM2 for Node.js applications
  • Load Balancer: Nginx หรือ HAProxy for high availability
  • SSL: TLS 1.3 certificates
  • Monitoring: Grafana + Prometheus for system monitoring

9. การทดสอบและประกันคุณภาพ (Testing & Quality Assurance)

9.1 กลยุทธ์การทดสอบ (Testing Strategy)

9.1.1 Unit Testing

  • Coverage Target: 80%+ สำหรับ business logic
  • Framework: Jest สำหรับ Node.js, React Testing Library
  • Focus Areas: AI recommendation logic, DICOM processing, Order validation

9.1.2 Integration Testing

  • DICOM Integration: ทดสอบการส่งรับภาพกับ PACS
  • RIS Integration: ทดสอบ HL7 message exchange
  • Database Integration: ทดสอบ CRUD operations และ transactions

9.1.3 End-to-End Testing

  • Framework: Cypress/Playwright
  • Critical User Journeys:
  • สั่งตรวจ CT Abdomen with contrast พร้อมการตรวจสอบ AI
  • อ่านและรายงาน MRI Brain study
  • จัดการ emergency stat order

9.2 การทดสอบประสิทธิภาพ (Performance Testing)

9.2.1 DICOM Performance Testing

# Large Image Load Testing
- 500MB CT study (1000+ slices)
- Multiple concurrent viewers (10+ users)
- Duration: 2 hours continuous usage
- Target: < 5s initial load, < 1s slice navigation

# PACS Integration Testing
- 100 concurrent DICOM queries
- 50 concurrent image retrievals
- Target: < 2s query response, < 30s image retrieval

9.3 การทดสอบความปลอดภัย (Security Testing)

  • DICOM Security: ทดสอบ DICOM TLS encryption
  • Authentication Testing: ทดสอบ MFA และ session management
  • Authorization Testing: ทดสอบ role-based access control
  • Data Privacy: ทดสอบ de-identification และ anonymization

10. เอกสารและรายงาน (Documentation & Reporting)

10.1 เอกสารทางเทคนิค

10.1.1 API Documentation

  • OpenAPI/Swagger: Auto-generated API documentation
  • DICOM Conformance Statement: รายละเอียด DICOM implementation
  • Integration Guide: คู่มือการเชื่อมต่อ RIS/PACS

10.1.2 Database Documentation

  • DICOM Schema Documentation: โครงสร้าง metadata storage
  • Image Storage Architecture: การจัดเก็บและ retrieval strategy
  • Performance Tuning Guide: คำแนะนำการ optimize database

10.2 เอกสารสำหรับผู้ใช้

10.2.1 คู่มือการใช้งาน

  • Radiologist Manual: คู่มือสำหรับแพทย์รังสี
  • Technologist Guide: คู่มือสำหรับ radiologic technologist
  • Referring Physician Guide: คู่มือสำหรับแพทย์ที่ส่งตรวจ

10.3 รายงานระบบ

10.3.1 รายงานสำหรับผู้บริหาร

  • Radiology Productivity Report: รายงานผลิตภาพแผนกรังสี
  • Equipment Utilization Report: รายงานการใช้งานเครื่องตรวจ
  • Quality Metrics Dashboard: แดชบอร์ดคุณภาพการให้บริการ

10.3.2 รายงานทางคลินิก

  • Turnaround Time Report: รายงานเวลาการรายงานผล
  • Critical Results Tracking: ติดตาม critical findings notification
  • Radiation Dose Report: รายงาน radiation exposure monitoring

11. การติดตั้งและการนำไปใช้ (Implementation & Deployment)

11.1 แผนการติดตั้ง

11.1.1 เตรียมระบบ (System Preparation)

  • Hardware Requirements:
  • Application Server: 32GB RAM, 16 CPU cores
  • Database Server: 64GB RAM, NVMe SSD
  • Storage Server: 10TB+ for DICOM images
  • Network: Gigabit Ethernet minimum

  • Software Installation:

  • PostgreSQL 15+ with DICOM extensions
  • Orthanc DICOM Server
  • Redis for caching
  • Nginx with SSL/TLS

11.1.2 การติดตั้งระบบ (System Installation)

  • Database Setup: สร้าง schema และ initial data
  • DICOM Server Configuration: ตั้งค่า AE Title และ port
  • Application Deployment: Deploy Node.js applications
  • Integration Testing: ทดสอบการเชื่อมต่อ RIS/PACS

11.2 การทดสอบระบบ (System Testing)

11.2.1 การทดสอบการติดตั้ง

  • Installation Verification: ตรวจสอบ component ทั้งหมด
  • Configuration Testing: ทดสอบการตั้งค่าระบบ
  • DICOM Connectivity: ทดสอบการเชื่อมต่อเครื่องตรวจ
  • Performance Baseline: วัดประสิทธิภาพเบื้องต้น

11.3 การอบรมและส่งมอบ

11.3.1 การฝึกอบรม

  • System Administrator Training: การจัดการ DICOM server
  • Radiologist Training: การใช้งาน DICOM viewer
  • Technologist Training: workflow การส่งภาพ
  • IT Support Training: troubleshooting และ maintenance

12. การบำรุงรักษาและสนับสนุน (Maintenance & Support)

12.1 การบำรุงรักษา

12.1.1 การบำรุงรักษาเชิงป้องกัน

  • Database Maintenance: vacuum, reindex, backup
  • Image Storage Cleanup: archive เก่าภาพตาม retention policy
  • System Monitoring: ติดตาม disk usage, memory leaks
  • Security Updates: อัพเดท security patches

12.1.2 การบำรุงรักษาเชิงแก้ไข

  • DICOM Troubleshooting: แก้ปัญหาการส่งรับภาพ
  • Performance Optimization: tune database queries
  • Bug Fixes: แก้ไข issues ที่พบ
  • Data Recovery: กู้คืนภาพและรายงานที่เสียหาย

12.2 การสนับสนุน

12.2.1 Help Desk Support

  • Response Time: < 4 ชั่วโมง for critical issues
  • Issue Tracking: JIRA หรือ ServiceNow
  • User Support: สนับสนุนผู้ใช้งานทางโทรศัพท์และ email

12.2.2 Technical Support

  • 24/7 Monitoring: ติดตาม DICOM services ตลอด 24 ชั่วโมง
  • Remote Support: การแก้ไขปัญหาทางไกล
  • On-site Support: การสนับสนุนณ หน้างานเมื่อจำเป็น

13. การติดตามและประเมินผล (Monitoring & Evaluation)

13.1 การติดตามระบบ

13.1.1 DICOM System Monitoring

  • DICOM Service Availability: ติดตาม DICOM server uptime
  • Image Transfer Performance: ติดตาม throughput และ latency
  • Storage Utilization: ติดตามพื้นที่จัดเก็บภาพ
  • Error Rate Monitoring: ติดตาม failed transfers

13.1.2 Clinical Workflow Metrics

  • Order Processing Time: เวลาในการประมวลผล order
  • Study Completion Rate: อัตราการตรวจเสร็จสิ้น
  • Report Turnaround Time: เวลาการรายงานผล
  • Critical Results Notification: การแจ้ง critical findings

13.2 การประเมินผล

13.2.1 Performance Evaluation

  • AI Accuracy Metrics: ความแม่นยำของ AI recommendations
  • User Satisfaction Survey: ความพึงพอใจของ radiologists
  • Productivity Analysis: การวิเคราะห์ productivity gain

13.2.2 Quality Improvement

  • Process Optimization: ปรับปรุงเวลาทำงาน
  • Training Enhancement: ปรับปรุงการฝึกอบรม
  • System Upgrades: อัพเกรดระบบตามความต้องการ

14. การจัดการความเสี่ยง (Risk Management)

14.1 การระบุความเสี่ยง

14.1.1 Technical Risks

ความเสี่ยง ระดับ ผลกระทบ การบรรเทา
DICOM Server Failure High ไม่สามารถรับส่งภาพได้ High availability setup, backup server
Image Corruption Medium สูญหายข้อมูลภาพ Checksums, redundant storage
Network Latency Medium ภาพโหลดช้า Network optimization, caching
AI Service Outage Low ไม่มี recommendations Fallback to manual workflow

14.1.2 Clinical Risks

ความเสี่ยง ระดับ ผลกระทบ การบรรเทา
Missed Critical Results High อันตรายต่อผู้ป่วย Auto-notification, escalation
Incorrect Patient Matching High ผสมผู้ป่วย Multiple identifiers, verification
Contrast Reaction Medium ผู้ป่วยแพ้สารทึบแสง Pre-screening, emergency protocols

14.2 แผนรองรับความเสี่ยง

14.2.1 Business Continuity Plan

  • Disaster Recovery: แผนกู้คืนข้อมูลภาพ
  • Backup Procedures: สำรองข้อมูลประจำวัน
  • Alternative Workflows: ขั้นตอนทางเลือกเมื่อระบบล่ม

14.2.2 Security Incident Response

  • Data Breach Response: การตอบสนองการรั่วไหลข้อมูล
  • Malware Detection: การตรวจจับและกำจัด malware
  • Access Control Violation: การจัดการการเข้าถึงโดยไม่ได้รับอนุญาต

15. การฝึกอบรมและการเปลี่ยนแปลง (Training & Change Management)

15.1 แผนการฝึกอบรม

15.1.1 กลุ่มเป้าหมาย

  • Radiologists: แพทย์รังสิวิทยา
  • Radiologic Technologists: นักเทคนิคการแพทย์สาขารังสี
  • Referring Physicians: แพทย์ที่ส่งตรวจ
  • IT Support Staff: เจ้าหน้าที่ IT

15.1.2 หลักสูตรการฝึกอบรม

  • Basic System Operation: การใช้งานพื้นฐาน
  • DICOM Viewer Training: การใช้งาน image viewer
  • AI Assistant Features: การใช้งาน CPOE AI Assist
  • Emergency Procedures: ขั้นตอนกรณีฉุกเฉิน

15.2 การจัดการการเปลี่ยนแปลง

15.2.1 Change Management Strategy

  • Stakeholder Engagement: การมีส่วนร่วมของแพทย์และ technologist
  • Communication Plan: แผนการสื่อสารการเปลี่ยนแปลง
  • Phased Implementation: การนำไปใช้เป็นระยะ
  • Success Measurement: การวัดความสำเร็จของการใช้งาน

16. สรุปและการอนุมัติ (Summary & Approval)

16.1 สรุปความต้องการ

16.1.1 ความต้องการหลัก

  • ระบบซักประวัติและคัดกรองผู้ป่วย พร้อมการตรวจสอบ contraindications
  • CPOE AI Assist สำหรับการแนะนำการตรวจที่เหมาะสม
  • การจัดการ DICOM images ผ่าน web viewer
  • การบูรณาการ RIS/PACS สำหรับ workflow ที่สมบูรณ์

16.1.2 เกณฑ์ความสำเร็จ

  • Response Time < 5s สำหรับการโหลด DICOM viewer
  • AI Accuracy > 90% สำหรับ contraindication detection
  • 99% Uptime สำหรับ DICOM services
  • User Satisfaction > 4.0/5.0 จาก radiologists

16.2 การอนุมัติ

16.2.1 ผู้อนุมัติ

ตำแหน่ง ชื่อ ลายเซ็น วันที่
หัวหน้าแผนกรังสีวิทยา [Name] [Signature] [Date]
ผู้อำนวยการโรงพยาบาล [Name] [Signature] [Date]
หัวหน้าแผนก IT [Name] [Signature] [Date]

17. ภาคผนวก (Appendices)

Appendix A: Database Schema Reference

ดู schema.md ในไดเรกทอรี รังสีวิทยา/ สำหรับรายละเอียดโครงสร้างฐานข้อมูล

Appendix B: API Specifications

B.1 Core Radiology APIs

// Radiology Order API
interface RadiologyOrderRequest {
  patientId: string;
  visitId: string;
  examCode: string;
  clinicalIndication: string;
  priority: 'routine' | 'urgent' | 'stat';
  contrastRequired: boolean;
  aiAssistEnabled: boolean;
}

interface RadiologyOrderResponse {
  orderId: string;
  orderNumber: string;
  status: string;
  aiRecommendations: AIRecommendation;
  estimatedCost: number;
  preparationInstructions: string;
  scheduledDateTime: string;
}

Appendix C: DICOM Conformance Statement

C.1 Supported DICOM Services

Service SOP Class Transfer Syntax Role
C-STORE CT Image Storage Explicit VR Little Endian SCP
C-STORE MR Image Storage JPEG Lossless SCP
C-FIND Study Root Query Explicit VR Little Endian SCU
C-MOVE Study Root Retrieve Explicit VR Little Endian SCU

Appendix D: Test Cases

D.1 Core Test Scenarios

Feature: CPOE AI Assist for Radiology Orders

  Scenario: Order CT with contrast for patient with contrast allergy
    Given patient has documented contrast allergy
    When doctor orders CT abdomen with contrast
    Then system should show allergy warning
    And suggest premedication protocol
    And provide alternative non-contrast options

  Scenario: Order MRI for patient with pacemaker
    Given patient has pacemaker device
    When doctor orders MRI brain
    Then system should block the order
    And display contraindication warning
    And suggest alternative imaging (CT)

Appendix E: Configuration Templates

E.1 DICOM Configuration

# DICOM Server Configuration
dicom:
  server:
    ae_title: "MEDITECH_RAD"
    port: 11112
    max_associations: 20
    storage_path: "/data/dicom"

  modalities:
    - ae_title: "CT_SCANNER"
      ip: "192.168.1.10"
      port: 104
    - ae_title: "MRI_SCANNER"
      ip: "192.168.1.11" 
      port: 104

หมายเหตุ: เอกสาร SRS นี้จัดทำตาม TOR ระบบงานรังสีวิทยา และมุ่งเน้นการบูรณาการ CPOE AI Assist เพื่อเพิ่มความปลอดภัยและประสิทธิภาพในการสั่งตรวจรังสี พร้อมรองรับมาตรฐาน DICOM และการเชื่อมต่อ RIS/PACS

ผู้จัดทำ: Claude Code - Senior Medical Technology Systems Analyst
วันที่จัดทำ: 29 สิงหาคม 2568
เวอร์ชัน: 1.0