Software Requirements Specification (SRS)
ระบบผู้ดูแลระบบ (System Administrator Management System)
เวอร์ชัน: 1.0
วันที่: 7 ตุลาคม 2568
การปรับปรุง: ใหม่ - เน้น User Management ตามแนวทาง AWS IAM
สารบัญ
- บทนำ
- คำอธิบายโดยรวม
- ความต้องการเฉพาะ
- ความต้องการภายนอก
- คุณลักษณะของระบบ
- ความต้องการที่ไม่ใช่ฟังก์ชัน
- การเชื่อมโยงกับระบบอื่น
1. บทนำ
1.1 วัตถุประสงค์
เอกสารนี้มีวัตถุประสงค์เพื่อกำหนดความต้องการซอฟต์แวร์สำหรับระบบผู้ดูแลระบบ (System Administrator Management System) ของโรงพยาบาลค่ายธนรัชน์ ซึ่งจะทำหน้าที่เป็นศูนย์กลางในการจัดการระบบ การควบคุมสิทธิ์ผู้ใช้งาน และการตั้งค่าระบบทั้งหมด โดยใช้แนวทาง Identity and Access Management (IAM) ที่เป็นมาตรฐานสากล
1.2 ขอบเขต (Scope)
ระบบผู้ดูแลระบบจะดำเนินการ: - ✅ การจัดการผู้ใช้งานและกลุ่มผู้ใช้ (User & Group Management) ตามแนวทาง AWS IAM - ✅ การควบคุมสิทธิ์และนโยบายการเข้าถึง (Access Control & Policy Management) - ✅ การตั้งค่าเริ่มต้นและพารามิเตอร์ระบบ (System Configuration) - ✅ การจัดการฐานข้อมูลและการสำรองข้อมูล (Database Management) - ✅ การจัดการรายงานและเทมเพลต (Report Management) - ✅ ระบบการสื่อสารและแจ้งเตือน (Communication System) - ✅ การตรวจสอบผู้ใช้งานออนไลน์และ Audit Logs (User Monitoring & Audit) - ✅ การตั้งค่าข้อมูลพื้นฐานและ Master Data (Master Data Management)
1.2.1 🚫 Out of Scope
- ❌ การจัดการข้อมูลผู้ป่วยโดยตรง → ระบบเวชระเบียน (1.2.1)
- ❌ การดำเนินการทางการแพทย์ → ระบบต่างๆ ตามสาขา
- ❌ การบริหารจัดการบุคลากรและเงินเดือน → ระบบ HR (นอกขอบเขต HIS)
1.3 คำจำกัดความ และตัวย่อ
| คำศัพท์ | คำอธิบาย |
|---|---|
| IAM | Identity and Access Management - การจัดการตัวตนและการเข้าถึง |
| RBAC | Role-Based Access Control - การควบคุมการเข้าถึงตามบทบาท |
| ABAC | Attribute-Based Access Control - การควบคุมการเข้าถึงตามคุณลักษณะ |
| Policy | นโยบายการเข้าถึง - กฎเกณฑ์การอนุญาตให้เข้าถึงทรัพยากร |
| Principal | ตัวประธาน - ผู้ใช้, กลุ่ม, หรือบทบาทที่ขอเข้าถึงทรัพยากร |
| Resource | ทรัพยากร - เมนู, ฟังก์ชัน, ข้อมูล ที่ต้องการควบคุมการเข้าถึง |
| Action | การกระทำ - สิ่งที่ Principal สามารถทำได้กับ Resource |
| Session | เซสชั่น - ช่วงเวลาการใช้งานของผู้ใช้ |
| MFA | Multi-Factor Authentication - การยืนยันตัวตนหลายปัจจัย |
| SSO | Single Sign-On - การล็อกอินครั้งเดียวใช้ได้หลายระบบ |
| Audit Trail | บันทึกการตรวจสอบ - ประวัติการดำเนินการทั้งหมด |
| GDPR | General Data Protection Regulation - กฎหมายคุ้มครองข้อมูล |
| PDPA | Personal Data Protection Act - พระราชบัญญัติคุ้มครองข้อมูลส่วนบุคคล |
1.4 เอกสารอ้างอิง
- TOR ระบบผู้ดูแลระบบ โรงพยาบาลค่ายธนรัชน์
- Detail TOR ระบบผู้ดูแลระบบ
- AWS IAM User Guide และ Best Practices
- NIST Cybersecurity Framework
- มาตรฐาน ISO 27001 - Information Security Management
- พระราชบัญญัติคุ้มครองข้อมูลส่วนบุคคล พ.ศ. 2562
1.5 ภาพรวมของเอกสาร
เอกสารนี้แบ่งออกเป็น 7 ส่วนหลัก โดยครอบคลุมตั้งแต่บทนำ คำอธิบายโดยรวมของระบบ ความต้องการเฉพาะของแต่ละฟังก์ชัน ความต้องการภายนอก คุณลักษณะของระบบ ความต้องการที่ไม่ใช่ฟังก์ชัน และการเชื่อมโยงกับระบบอื่น
2. คำอธิบายโดยรวม
2.1 มุมมองของผลิตภัณฑ์
ระบบผู้ดูแลระบบเป็นส่วนหนึ่งของระบบสารสนเทศโรงพยาบาล (HIS) ที่ทำหน้าที่เป็นศูนย์กลางการควบคุมและจัดการระบบทั้งหมด โดยจะเชื่อมโยงและควบคุมระบบย่อยต่างๆ ดังนี้:
graph TD
ADMIN["🔧 ระบบผู้ดูแลระบบ<br/>System Admin"]
ADMIN --> MR["📋 ระบบเวชระเบียน"]
ADMIN --> HIST["🩺 ระบบซักประวัติ"]
ADMIN --> EXAM["🏥 ระบบห้องตรวจแพทย์"]
ADMIN --> EMERG["🚨 ระบบห้องฉุกเฉิน"]
ADMIN --> PHARM["💊 ระบบเภสัชกรรม"]
ADMIN --> FIN["💰 ระบบการเงิน"]
ADMIN --> INSUR["🆔 ระบบตรวจสอบสิทธิ"]
ADMIN --> LAB["🔬 ระบบชันสูตร"]
ADMIN --> RAD["🩻 ระบบรังสีวิทยา"]
style ADMIN fill:#ff6b35,stroke:#d63447,stroke-width:3px
style MR fill:#4ecdc4,stroke:#26a69a
style HIST fill:#4ecdc4,stroke:#26a69a
style EXAM fill:#4ecdc4,stroke:#26a69a
style EMERG fill:#4ecdc4,stroke:#26a69a
style PHARM fill:#4ecdc4,stroke:#26a69a
style FIN fill:#4ecdc4,stroke:#26a69a
style INSUR fill:#4ecdc4,stroke:#26a69a
style LAB fill:#4ecdc4,stroke:#26a69a
style RAD fill:#4ecdc4,stroke:#26a69a
2.2 ฟังก์ชันของผลิตภัณฑ์
ระบบจะประกอบด้วยฟังก์ชันหลักดังนี้:
2.2.1 กลุ่มฟังก์ชัน Identity and Access Management (IAM)
- User Management - จัดการบัญชีผู้ใช้และข้อมูลส่วนตัว
- Group Management - จัดการกลุ่มผู้ใช้และการจัดหมวดหมู่
- Role Management - จัดการบทบาท (Role) และหน้าที่ความรับผิดชอบ
- Policy Management - จัดการนโยบายการเข้าถึง (Access Policy)
- Permission Management - จัดการสิทธิ์การเข้าถึงแบบละเอียด
- Authentication & Authorization - ยืนยันตัวตนและอนุญาตการเข้าถึง
2.2.2 กลุ่มฟังก์ชัน System Configuration
- System Settings - ตั้งค่าพารามิเตอร์และการทำงานของระบบ
- Database Configuration - ตั้งค่าฐานข้อมูล MySQL/PostgreSQL
- Master Data Management - จัดการข้อมูลพื้นฐานของระบบ
- Backup & Recovery - การสำรองและกู้คืนข้อมูล
2.2.3 กลุ่มฟังก์ชัน Communication & Monitoring
- News & Announcements - ระบบประกาศข่าวและการสื่อสาร
- Alert & Notification - ระบบแจ้งเตือนและการส่งข้อความ
- User Session Monitoring - ติดตามผู้ใช้งานออนไลน์
- Audit Trail & Logging - บันทึกและตรวจสอบการใช้งาน
2.2.4 กลุ่มฟังก์ชัน Reporting & Analytics
- Report Management - จัดการรายงานและเทมเพลต
- Data Export - ส่งออกข้อมูลในรูปแบบต่างๆ
- System Analytics - วิเคราะห์การใช้งานระบบ
2.3 คลาสผู้ใช้และลักษณะเฉพาะ
2.3.1 Super Administrator (ผู้ดูแลระบบระดับสูงสุด)
- ลักษณะ: มีสิทธิ์สูงสุดในการจัดการระบบทั้งหมด
- หน้าที่:
- จัดการผู้ดูแลระบบคนอื่นๆ
- ตั้งค่าระบบในระดับ Global
- จัดการฐานข้อมูลและการสำรอง
- อนุมัติการเปลี่ยนแปลงสำคัญ
- ข้อจำกัด: จำกัดจำนวนไม่เกิน 2-3 คน
2.3.2 System Administrator (ผู้ดูแลระบบทั่วไป)
- ลักษณะ: ผู้ดูแลระบบในด้านต่างๆ เฉพาะทาง
- หน้าที่:
- จัดการผู้ใช้งานและสิทธิ์
- ตั้งค่าระบบในหน่วยงานที่รับผิดชอบ
- จัดการรายงานและข้อมูล
- แก้ไขปัญหาการใช้งาน
- ประเภท: แบ่งตามสาขาความเชี่ยวชาญ (IT, การแพทย์, การเงิน)
2.3.3 Department Administrator (ผู้ดูแลระบบระดับแผนก)
- ลักษณะ: ผู้ดูแลระบบเฉพาะแผนกหรือหน่วยงาน
- หน้าที่:
- จัดการผู้ใช้งานในแผนก
- ตั้งค่าการทำงานเฉพาะแผนก
- ดูแลข้อมูลและรายงานของแผนก
- ข้อจำกัด: สิทธิ์จำกัดเฉพาะแผนกที่รับผิดชอบ
2.3.4 Security Administrator (ผู้ดูแลระบบด้านความปลอดภัย)
- ลักษณะ: ผู้เชี่ยวชาญด้านความปลอดภัยระบบ
- หน้าที่:
- ตรวจสอบ Audit Logs
- จัดการนโยบายความปลอดภัย
- ตรวจสอบการเข้าถึงผิดปกติ
- จัดการกับเหตุการณ์ความปลอดภัย
2.4 สภาพแวดล้อมการดำเนินงาน
2.4.1 สภาพแวดล้อมฮาร์ดแวร์
- เซิร์ฟเวอร์: Windows Server 2019+ หรือ Linux (CentOS/Ubuntu)
- ฐานข้อมูล: MySQL 8.0+ หรือ PostgreSQL 13+
- หน่วยความจำ: RAM ขั้นต่ำ 16 GB, แนะนำ 32 GB+
- พื้นที่จัดเก็บ: SSD ขั้นต่ำ 500 GB สำหรับระบบ, 2+ TB สำหรับข้อมูล
- เครือข่าย: Gigabit Ethernet, เชื่อมต่อ Internet สำหรับ updates
2.4.2 สภาพแวดล้อมซอฟต์แวร์
- เว็บเซิร์ฟเวอร์: Apache 2.4+ หรือ Nginx 1.18+
- ภาษาโปรแกรม: PHP 8.0+, Python 3.8+, หรือ Java 11+
- เว็บเบราว์เซอร์: Chrome 90+, Firefox 85+, Edge 90+
- SSL/TLS: ใบรับรอง SSL สำหรับการเข้ารหัสการสื่อสาร
2.4.3 การรักษาความปลอดภัย
- Firewall: การป้องกันระดับเครือข่าย
- Antivirus: ซอฟต์แวร์ป้องกันไวรัสระดับเซิร์ฟเวอร์
- Backup System: ระบบสำรองข้อมูลอัตโนมัติ
- Monitoring Tools: เครื่องมือตรวจสอบระบบ 24/7
2.5 ข้อจำกัดในการออกแบบและการดำเนินงาน
2.5.1 ข้อจำกัดด้านประสิทธิภาพ
- ระบบต้องทำงานได้ 24/7 โดยมี uptime ไม่น้อยกว่า 99.9%
- เวลาตอบสนองสำหรับการ login ไม่เกิน 2 วินาทีสำหรับผู้ใช้งานพร้อมกัน 500 คน
- การโหลดหน้าเว็บต้องไม่เกิน 3 วินาที
- การสำรองข้อมูลต้องทำงานโดยไม่กระทบต่อการใช้งาน
2.5.2 ข้อจำกัดด้านความปลอดภัย
- ปฏิบัติตาม PDPA และกฎหมายคุ้มครองข้อมูลส่วนบุคคล
- รองรับ Multi-Factor Authentication (MFA)
- เก็บ Audit Logs ไม่น้อยกว่า 3 ปี
- การเข้ารหัสข้อมูลสำคัญด้วย AES-256
2.5.3 ข้อจำกัดด้านการใช้งาน
- รองรับภาษาไทยและอังกฤษ
- การออกแบบต้องเป็น Responsive Design
- รองรับการใช้งานบนอุปกรณ์มือถือ (Tablet)
- Interface ต้องใช้งานง่ายและเข้าใจได้
2.6 สมมติฐานและการพึ่งพาอาศัย
2.6.1 สมมติฐาน
- ผู้ดูแลระบบมีความรู้เบื้องต้นด้าน IT และฐานข้อมูล
- มีการฝึกอบรมเฉพาะด้านก่อนใช้งานระบบ
- มีทีม IT Support สำหรับการแก้ไขปัญหาเร่งด่วน
- มีระบบสำรองไฟฟ้า (UPS) และ Generator
2.6.2 การพึ่งพาอาศัย
- ระบบต้องเชื่อมต่อกับ Active Directory (หากมี)
- ต้องมี Internet connection สำหรับ software updates
- ต้องมีระบบ Email Server สำหรับการส่งแจ้งเตือน
- ต้องมีระบบ Backup storage (NAS หรือ Cloud)
3. ความต้องการเฉพาะ
3.1 กลุ่มฟังก์ชัน Identity and Access Management (IAM)
3.1.1 User Management (การจัดการผู้ใช้งาน)
คำอธิบาย: ระบบต้องจัดการผู้ใช้งานแบบครอบคลุม โดยใช้หลักการของ AWS IAM
3.1.1.1 การสร้างบัญชีผู้ใช้
Input: - ข้อมูลพื้นฐาน: Username (unique), Display Name, Email, โทรศัพท์ - ข้อมูลตำแหน่งงาน: แผนก, ตำแหน่ง, หน่วยงาน, รหัสพนักงาน - การตั้งค่าบัญชี: สถานะ (Active/Inactive), วันหมดอายุ, การบังคับเปลี่ยนรหัสผ่าน - MFA Settings: การเปิดใช้ Multi-Factor Authentication
Process:
- ตรวจสอบความซ้ำซ้อนของ Username และ Email
- สร้าง User ARN (Amazon Resource Name) format: arn:hospital:iam::user/[username]
- กำหนด User ID ภายในระบบ (UUID format)
- ส่ง Welcome Email พร้อม Temporary Password
- บันทึก Audit Log การสร้างบัญชี
Output: - User Account ที่สร้างเสร็จ - Temporary Credentials - User ARN และ User ID - Access Key และ Secret Key (สำหรับ API access)
3.1.1.2 การจัดการรหัสผ่านและความปลอดภัย
คำอธิบาย: ระบบรหัสผ่านที่เป็นไปตามมาตรฐานความปลอดภัย
ความต้องการรหัสผ่าน: - ความยาวขั้นต่ำ 12 ตัวอักษร - ประกอบด้วยตัวพิมพ์ใหญ่, พิมพ์เล็ก, ตัวเลข, และอักขระพิเศษ - ไม่ใช้รหัสผ่านเก่า 12 รุ่นล่าสุด - หมดอายุทุก 90 วัน - ป้องกัน Password Brute Force Attack
Multi-Factor Authentication (MFA): - รองรับ TOTP (Time-based One-Time Password) - รองรับ SMS OTP - รองรับ Hardware Security Keys (FIDO2) - Backup Codes สำหรับกรณีฉุกเฉิน
3.1.1.3 การจัดการ Session และ Access Tokens
Session Management: - Session Timeout: 8 ชั่วโมง (เวลาทำงาน), 30 นาที (เวลาไม่ทำงาน) - Concurrent Session Limit: 3 sessions ต่อผู้ใช้ - Session Monitoring และ Force Logout - Remember Me option (ระยะเวลา 30 วัน)
Access Tokens: - JWT (JSON Web Tokens) สำหรับ API access - Token Expiry: 1 ชั่วโมง - Refresh Token: 30 วัน - Token Revocation และ Blacklist
3.1.2 Group Management (การจัดการกลุ่มผู้ใช้)
คำอธิบาย: จัดการกลุ่มผู้ใช้ตามหน้าที่และแผนกงาน
3.1.2.1 การสร้างและจัดการกลุ่ม
ประเภทกลุ่มหลัก:
📋 Medical Groups (กลุ่มทางการแพทย์)
├── Doctors (แพทย์)
│ ├── Emergency_Doctors (แพทย์ฉุกเฉิน)
│ ├── Specialist_Doctors (แพทย์เฉพาะทาง)
│ └── General_Practitioners (แพทย์ทั่วไป)
├── Nurses (พยาบาล)
│ ├── Head_Nurses (หัวหน้าพยาบาล)
│ ├── Staff_Nurses (พยาบาลวิชาชีพ)
│ └── Nursing_Assistants (ผู้ช่วยพยาบาล)
└── Medical_Technicians (นักเทคนิคการแพทย์)
🏥 Administrative Groups (กลุ่มบริหาร)
├── Finance_Staff (เจ้าหน้าที่การเงิน)
├── Registration_Staff (เจ้าหน้าที่ลงทะเบียน)
├── Medical_Records (เจ้าหน้าที่เวชระเบียน)
└── IT_Support (เจ้าหน้าที่ IT)
🔧 System Groups (กลุ่มระบบ)
├── Super_Administrators
├── System_Administrators
├── Department_Administrators
└── Security_Administrators
การจัดการกลุ่ม:
- Group ARN: arn:hospital:iam::group/[groupname]
- Nested Groups (กลุ่มย่อย)
- Group Policies (นโยบายระดับกลุ่ม)
- Group Membership Management
3.1.3 Role Management (การจัดการบทบาท)
คำอธิบาย: จัดการบทบาท (Role) และการมอบหมายสิทธิ์แบบชั่วคราว
3.1.3.1 การออกแบบ Role Structure
Role Categories:
Clinical_Roles:
- Emergency_Physician_Role
- Ward_Physician_Role
- Specialist_Consultant_Role
- Charge_Nurse_Role
- Staff_Nurse_Role
Administrative_Roles:
- Department_Manager_Role
- Finance_Officer_Role
- Registration_Officer_Role
- Medical_Records_Officer_Role
Technical_Roles:
- Database_Administrator_Role
- Security_Officer_Role
- Report_Manager_Role
- Backup_Operator_Role
Role Attributes:
- Role ARN: arn:hospital:iam::role/[rolename]
- Trust Policy: กำหนดใครสามารถ assume role ได้
- Permission Boundary: ขีดจำกัดสิทธิ์สูงสุด
- Max Session Duration: ระยะเวลาการใช้ role
- External ID: สำหรับการยืนยันตัวตนเพิ่มเติม
3.1.3.2 Role Assumption และ Switching
การเปลี่ยน Role: - Temporary Role Switching (Switch Role) - Cross-Department Role Access - Emergency Role Elevation - Role Session Monitoring
3.1.4 Policy Management (การจัดการนโยบาย)
คำอธิบาย: ระบบนโยบายการเข้าถึงแบบละเอียด ใช้ JSON format คล้าย AWS IAM
3.1.4.1 Policy Structure
Policy Document Example:
{
"Version": "2024-10-07",
"Statement": [
{
"Sid": "AllowReadPatientRecords",
"Effect": "Allow",
"Action": [
"medical-records:ReadPatient",
"medical-records:ViewHistory"
],
"Resource": [
"arn:hospital:medical-records:*:patient/*"
],
"Condition": {
"StringEquals": {
"medical-records:Department": "${aws:RequestedUser.Department}"
},
"DateGreaterThan": {
"aws:CurrentTime": "2024-01-01T00:00:00Z"
}
}
}
]
}
Policy Types: - AWS Managed Policies: นโยบายมาตรฐานของระบบ - Customer Managed Policies: นโยบายที่ผู้ดูแลระบบสร้าง - Inline Policies: นโยบายที่แนบโดยตรงกับ User/Group/Role
3.1.4.2 Permission Evaluation Logic
การประเมินสิทธิ์:
1. Explicit Deny → ปฏิเสธทันที
2. Organizations SCPs → ตรวจสอบข้อจำกัดองค์กร
3. Resource-based policies → ตรวจสอบนโยบายของทรัพยากร
4. IAM permissions boundary → ตรวจสอบขอบเขตสิทธิ์
5. Session policies → ตรวจสอบนโยบาย session
6. Identity-based policies → ตรวจสอบนโยบายของ user/group/role
7. Default Deny → ปฏิเสธหากไม่มีการอนุญาตชัดเจน
3.1.5 Advanced Access Control Features
3.1.5.1 Attribute-Based Access Control (ABAC)
คำอธิบาย: การควบคุมการเข้าถึงตามคุณลักษณะของผู้ใช้, ทรัพยากร, และสภาพแวดล้อม
User Attributes: - Department, Position, Level, Certification - Working Hours, Location, Device Type - Security Clearance, Training Status
Resource Attributes: - Data Classification (Public, Internal, Confidential, Restricted) - Patient Department, Doctor Assignment - Record Type, Creation Date, Modification History
Environment Attributes: - Time of Access, IP Address, Network Location - Risk Score, Anomaly Detection Result
3.1.5.2 Just-In-Time (JIT) Access
Temporary Privilege Escalation: - Request → Approval → Time-Limited Access → Automatic Revocation - Emergency Access Procedures - Access Request Workflow - Automatic Audit Trail
3.1.5.3 Zero Trust Architecture
Principles: - Never Trust, Always Verify - Verify Explicitly (User, Device, Location, Application) - Use Least Privilege Access - Assume Breach (Continuous Monitoring)
3.2 กลุ่มฟังก์ชัน System Configuration
3.2.1 System Settings (การตั้งค่าระบบ)
คำอธิบาย: จัดการการตั้งค่าพื้นฐานและพารามิเตอร์ของระบบทั้งหมด
3.2.1.1 Hospital Information Settings
Input: - ข้อมูลโรงพยาบาล: ชื่อ, ที่อยู่, เบอร์โทรศัพท์, เบอร์แฟกซ์, อีเมล - Logo และตราสัญลักษณ์: รูปภาพ, ขนาด, ตำแหน่งการแสดงผล - เลขที่ใบอนุญาต: เลขที่ใบอนุญาตประกอบโรงพยาบาล, วันหมดอายุ - รหัสสถานพยาบาล: รหัส 5 หลักของกระทรวงสาธารณสุข
3.2.1.2 Date, Time & Localization Settings
การตั้งค่าวันเวลา: - Time Zone: Asia/Bangkok (UTC+7) - Date Format: DD/MM/YYYY (Thai), MM/DD/YYYY (International) - Time Format: 24-hour หรือ 12-hour - Working Hours: กำหนดเวลาทำงานปกติ
การตั้งค่าภาษา: - Primary Language: ภาษาไทย - Secondary Language: ภาษาอังกฤษ - RTL Support: ไม่จำเป็น (สำหรับอนาคต) - Number Format: 1,234.56 (Thai), 1234.56 (International)
3.2.1.3 Security & Privacy Settings
Password Policies:
Password_Requirements:
min_length: 12
require_uppercase: true
require_lowercase: true
require_numbers: true
require_special_chars: true
password_history: 12
max_age_days: 90
complexity_score: 3
Session_Settings:
timeout_minutes: 30
max_concurrent_sessions: 3
require_mfa: true
remember_me_days: 30
Account_Security:
max_login_attempts: 5
lockout_duration_minutes: 30
require_email_verification: true
require_phone_verification: false
3.2.2 HN/VN/AN Number Configuration
คำอธิบาย: ตั้งค่ารูปแบบและการสร้างหมายเลขต่างๆ ในระบบ
3.2.2.1 HN (Hospital Number) Settings
รูปแบบ HN:
HN_Format:
prefix: "TN" # รหัสโรงพยาบาล
format: "TN{YYYYMM}{NNNNNN}"
length: 12
auto_generate: true
starting_number: 1
reset_annual: false
check_digit: false
Examples:
- "TN20241000001" # ตุลาคม 2024, คนที่ 1
- "TN20241000002" # ตุลาคม 2024, คนที่ 2
3.2.2.2 VN (Visit Number) Settings
VN_Format:
format: "V{YYYYMMDD}{NNNN}"
length: 12
reset_daily: true
department_prefix: false
Examples:
- "V202410070001" # 7 ต.ค. 2024, visit ที่ 1
- "V202410070002" # 7 ต.ค. 2024, visit ที่ 2
3.2.2.3 AN (Admission Number) Settings
AN_Format:
format: "A{YYYY}{NNNNNN}"
length: 10
reset_annual: true
ward_specific: false
Examples:
- "A2024000001" # ปี 2024, admit ที่ 1
- "A2024000002" # ปี 2024, admit ที่ 2
3.2.3 Database Configuration
คำอธิบาย: การตั้งค่าและจัดการฐานข้อมูล MySQL และ PostgreSQL
3.2.3.1 MySQL Configuration
Connection Settings:
MySQL_Config:
host: "localhost"
port: 3306
database: "meditech_hospital"
charset: "utf8mb4"
collation: "utf8mb4_unicode_ci"
timezone: "+07:00"
Connection_Pool:
min_connections: 10
max_connections: 100
idle_timeout: 300
max_lifetime: 3600
Performance_Settings:
query_cache_size: "256M"
innodb_buffer_pool_size: "2G"
max_allowed_packet: "64M"
wait_timeout: 28800
Backup Settings: - Automatic Backup: Daily at 02:00 AM - Backup Retention: 30 days local, 90 days remote - Backup Compression: gzip - Backup Encryption: AES-256
3.2.3.2 PostgreSQL Configuration
PostgreSQL_Config:
host: "localhost"
port: 5432
database: "meditech_hospital"
encoding: "UTF8"
timezone: "Asia/Bangkok"
Connection_Pool:
min_connections: 10
max_connections: 100
idle_timeout: 300
Performance_Settings:
shared_buffers: "2GB"
effective_cache_size: "6GB"
work_mem: "16MB"
maintenance_work_mem: "512MB"
3.2.4 Master Data Management
คำอธิบาย: จัดการข้อมูลพื้นฐานและข้อมูลมาตรฐานของระบบ
3.2.4.1 Geographic Data
ข้อมูลภูมิศาสตร์: - จังหวัด/อำเภอ/ตำบล: ข้อมูลตามกรมการปกครอง - รหัสไปรษณีย์: การเชื่อมโยงกับตำบล - พิกัดภูมิศาสตร์: Latitude/Longitude (สำหรับการนำทาง)
3.2.4.2 Medical Standards Data
ICD-10 และ ICD-9-CM: - รหัสโรคมาตรฐาน ICD-10-TM (Thai Modification) - รหัสหัตถการ ICD-9-CM - Drug Database (TMT, GPO) - Lab Test Codes (LOINC)
3.2.4.3 Organizational Data
ข้อมูลองค์กร:
Departments:
- code: "OPD"
name: "แผนกผู้ป่วยนอก"
type: "Clinical"
active: true
- code: "IPD"
name: "แผนกผู้ป่วยใน"
type: "Clinical"
active: true
- code: "ER"
name: "แผนกฉุกเฉิน"
type: "Clinical"
active: true
Positions:
- code: "DOC"
name: "แพทย์"
level: "Professional"
- code: "NURSE"
name: "พยาบาลวิชาชีพ"
level: "Professional"
3.3 กลุ่มฟังก์ชัน Communication & Monitoring
3.3.1 News & Announcements System
คำอธิบาย: ระบบประกาศข่าวและการสื่อสารภายในองค์กร
3.3.1.1 News Management
Input: - หัวข้อข่าว: Title, Subtitle (optional) - เนื้อหา: Rich Text Editor รองรับ HTML, Image, Link - ประเภทข่าว: Information, Warning, Critical, Emergency - กลุ่มเป้าหมาย: ทั้งหมด, เฉพาะแผนก, เฉพาะตำแหน่ง - วันที่: เริ่มต้น, สิ้นสุด, เผยแพร่ - สถานะ: Draft, Published, Archived
Process: - Approval Workflow (สำหรับข่าวสำคัญ) - Automatic Notification - View Tracking และ Read Receipt - Search และ Archive
3.3.1.2 Alert & Notification System
ประเภทการแจ้งเตือน:
Alert_Types:
Medical_Alerts:
- Critical_Lab_Results
- Drug_Interaction_Warning
- Patient_Allergy_Alert
- Appointment_Reminder
System_Alerts:
- System_Maintenance
- Database_Error
- Security_Breach
- Backup_Failure
Business_Alerts:
- Payment_Overdue
- Insurance_Expiry
- License_Renewal
- Staff_Schedule_Change
Delivery Channels: - In-App Notification (Real-time) - Email Notification - SMS Alert (สำหรับกรณีฉุกเฉิน) - Desktop Push Notification
3.3.2 User Session Monitoring
คำอธิบาย: การติดตามและจัดการผู้ใช้งานออนไลน์
3.3.2.1 Active User Tracking
Real-time Monitoring:
Session_Information:
user_id: "user123"
username: "doctor.smith"
display_name: "นพ.สมิธ ใจดี"
login_time: "2024-10-07T08:30:00+07:00"
last_activity: "2024-10-07T14:15:30+07:00"
ip_address: "192.168.1.100"
user_agent: "Chrome/118.0 on Windows 10"
location: "ห้องตรวจ 201"
current_module: "ระบบเวชระเบียน"
session_id: "sess_abc123def456"
idle_time_minutes: 5
3.3.2.2 Session Management Actions
การจัดการ Session: - View Active Sessions - Force Logout (ทั้งหมดหรือรายบุคคล) - Send Message to User - Broadcast Message to All Users - Session Time Extension - Idle Timeout Warning
3.3.3 Audit Trail & Logging
คำอธิบาย: บันทึกและตรวจสอบการใช้งานระบบ
3.3.3.1 Audit Log Categories
Security_Logs:
- Login_Success
- Login_Failed
- Logout
- Password_Change
- Account_Locked
- Permission_Change
- Role_Assignment
Data_Access_Logs:
- Record_View
- Record_Create
- Record_Update
- Record_Delete
- Report_Generate
- Data_Export
System_Logs:
- Configuration_Change
- System_Start_Stop
- Database_Connect
- Error_Exception
- Performance_Issue
3.3.3.2 Log Format & Storage
Log Structure:
{
"timestamp": "2024-10-07T14:30:00+07:00",
"log_level": "INFO|WARN|ERROR|CRITICAL",
"event_type": "USER_LOGIN",
"user_id": "user123",
"session_id": "sess_abc123",
"ip_address": "192.168.1.100",
"resource": "arn:hospital:medical-records:patient:12345",
"action": "READ",
"result": "SUCCESS|DENIED|ERROR",
"details": {
"patient_id": "TN20241000123",
"department": "OPD",
"reason": "Medical_Consultation"
},
"risk_score": 2.5
}
3.4 กลุ่มฟังก์ชัน Reporting & Analytics
3.4.1 Report Management System
คำอธิบาย: จัดการรายงานและเทมเพลตรายงาน
3.4.1.1 Report Designer
Visual Report Builder: - Drag & Drop Interface - Data Source Selection (Tables, Views, APIs) - Field Mapping และ Transformation - Grouping, Sorting, Filtering - Chart และ Graph Integration - Formula และ Calculated Fields
Report Elements:
Report_Components:
Headers_Footers:
- Hospital_Logo
- Report_Title
- Generated_DateTime
- Page_Numbers
Data_Sections:
- Table_Grid
- Chart_Graph
- Summary_Box
- KPI_Cards
Formatting:
- Font_Style_Size
- Colors_Themes
- Borders_Lines
- Conditional_Formatting
3.4.1.2 Standard Reports Library
Pre-built Reports:
Clinical_Reports:
- Patient_Census_Report
- Daily_Admission_Discharge
- Diagnosis_Statistics
- Treatment_Outcome_Summary
Financial_Reports:
- Revenue_Summary
- Department_Billing
- Insurance_Claims_Status
- Outstanding_Payments
Administrative_Reports:
- Staff_Attendance
- System_Usage_Statistics
- Performance_Metrics
- Compliance_Reports
3.4.1.3 Data Export Options
Export Formats: - PDF (สำหรับการพิมพ์) - Excel (XLSX) - สำหรับการวิเคราะห์ - CSV - สำหรับ Data Import/Export - XML/JSON - สำหรับ API Integration - Word (DOCX) - สำหรับการจัดทำเอกสาร
Export Controls: - Data Masking สำหรับข้อมูลละเอียดอ่อน - Watermark และ Digital Signature - Audit Trail การส่งออกข้อมูล - Permission-based Export Restrictions
4. ความต้องการภายนอก
4.1 User Interfaces (ส่วนติดต่อผู้ใช้)
4.1.1 Web-based Administrative Console
คำอธิบาย: หน้าเว็บสำหรับการจัดการระบบ
หน้าจอหลัก (Dashboard):
Dashboard_Layout:
Header:
- Hospital_Logo
- User_Profile_Menu
- Notification_Center
- Global_Search
- Language_Selector
Sidebar_Navigation:
- IAM_Management
- System_Settings
- Database_Management
- Reports_Analytics
- Communication_Tools
- Monitoring_Logs
Main_Content:
- Overview_Cards (Users, Active Sessions, Alerts)
- Quick_Actions_Panel
- Recent_Activities_Feed
- System_Health_Status
- Usage_Statistics_Charts
Responsive Design: - Desktop (1920x1080+) - Full functionality - Tablet (768x1024) - Essential functions only - Mobile (375x667+) - Emergency access และ notifications
4.1.2 User Management Interface
การออกแบบหน้าจอ IAM:
User List View:
User_Management_Screen:
Filters_Search:
- Quick_Search_Box
- Department_Filter
- Status_Filter (Active/Inactive/Locked)
- Role_Filter
- Last_Login_Filter
User_Table:
Columns:
- Profile_Picture
- Full_Name
- Username
- Department
- Role
- Last_Login
- Status
- Actions (Edit/Disable/Reset Password)
Bulk_Actions:
- Export_User_List
- Bulk_Status_Change
- Send_Mass_Message
- Generate_Access_Report
User Detail View (ตามแนวทาง AWS IAM Console):
User_Detail_Tabs:
Summary:
- Basic_Information
- Current_Permissions_Summary
- Recent_Activity
- Access_Keys_Status
Permissions:
- Direct_Policies
- Group_Memberships
- Role_Assignments
- Permission_Boundary
- Access_Analyzer_Findings
Groups:
- Current_Group_Memberships
- Available_Groups_to_Join
- Group_Permissions_Preview
Security_Credentials:
- Password_Status
- MFA_Devices
- Access_Keys
- SSH_Keys
Access_Advisor:
- Services_Last_Accessed
- Unused_Permissions
- Recommendations
4.1.3 Policy Editor Interface
Visual Policy Editor: - JSON Editor with syntax highlighting - Visual Policy Builder (drag-and-drop) - Policy Simulator และ Testing Tools - Policy Version Control และ Rollback - Policy Impact Analysis
4.2 Hardware Interfaces (ส่วนติดต่อฮาร์ดแวร์)
4.2.1 Biometric Integration
การเชื่อมต่ออุปกรณ์ Biometric:
Supported_Devices:
Fingerprint_Scanners:
- Digital_Persona_4500
- Suprema_BioMini_Slim
- Generic_USB_Scanners
Face_Recognition:
- IP_Cameras_with_Face_Detection
- USB_Cameras_with_AI_Module
Card_Readers:
- RFID_Card_Readers
- Smart_Card_Readers
- Proximity_Card_Readers
Integration Requirements: - SDK Integration สำหรับการอ่านข้อมูล - Real-time Processing - Template Storage และ Matching - Backup Authentication Methods
4.2.2 Network Infrastructure
Server Requirements:
Server_Specifications:
Minimum_Requirements:
CPU: "Intel Xeon E-2224 (4 cores) or AMD equivalent"
RAM: "16 GB DDR4"
Storage: "500 GB SSD + 2 TB HDD"
Network: "Gigabit Ethernet"
Recommended_Requirements:
CPU: "Intel Xeon Silver 4214 (12 cores) or AMD equivalent"
RAM: "64 GB DDR4"
Storage: "1 TB NVMe SSD + 8 TB HDD RAID"
Network: "10 Gigabit Ethernet"
High_Availability:
Load_Balancer: "Required for production"
Failover_Server: "Hot standby recommended"
Database_Replication: "Master-slave setup"
4.3 Software Interfaces (ส่วนติดต่อซอฟต์แวร์)
4.3.1 Database Interfaces
Primary Database Connection:
MySQL_Interface:
Connection_Method: "MySQL Connector/J 8.0+"
Transaction_Support: "ACID compliance"
Connection_Pooling: "HikariCP or equivalent"
SSL_Encryption: "Required for production"
PostgreSQL_Interface:
Connection_Method: "PostgreSQL JDBC Driver 42.5+"
Extension_Support: "uuid-ossp, pgcrypto"
Full_Text_Search: "Built-in FTS support"
JSON_Support: "Native JSON data type"
4.3.2 External System Integration
HIS Integration APIs:
Medical_Records_System:
Protocol: "REST API"
Authentication: "JWT Bearer Token"
Endpoints:
- "/api/v1/patients/{id}/permissions"
- "/api/v1/users/{id}/medical-access"
Pharmacy_System:
Protocol: "REST API"
Integration_Points:
- Drug_Prescription_Rights
- Narcotic_Drug_Permissions
- Inventory_Access_Control
Financial_System:
Protocol: "SOAP/REST API"
Integration_Points:
- Billing_Access_Rights
- Payment_Processing_Permissions
- Financial_Report_Access
4.3.3 Third-party Service Integration
Email Service:
SMTP_Configuration:
Supported_Providers:
- Microsoft_Exchange_Server
- Gmail_SMTP
- Amazon_SES
- Local_SMTP_Server
Requirements:
- TLS_Encryption
- Authentication_Support
- HTML_Email_Support
- Attachment_Support
SMS Gateway:
SMS_Providers:
- Infobip
- Twilio
- ThaiSMS
- Local_SMS_Gateway
Requirements:
- API_Integration
- Delivery_Receipt
- Unicode_Support (Thai)
- Rate_Limiting
4.4 Communication Interfaces (ส่วนติดต่อการสื่อสาร)
4.4.1 Network Protocols
Supported Protocols:
Application_Layer:
- HTTPS (TLS 1.3)
- WebSocket (WSS)
- SMTP (STARTTLS)
- LDAP over TLS
Transport_Layer:
- TCP for reliable communication
- UDP for real-time notifications
Network_Layer:
- IPv4 (primary)
- IPv6 (future support)
4.4.2 API Gateway Integration
RESTful API Design:
API_Specifications:
Base_URL: "https://hospital.local/api/v1"
Authentication: "OAuth 2.0 + JWT"
Rate_Limiting: "1000 requests/hour per user"
Endpoints_Categories:
User_Management:
- "GET /users"
- "POST /users"
- "PUT /users/{id}"
- "DELETE /users/{id}"
Group_Management:
- "GET /groups"
- "POST /groups"
- "PUT /groups/{id}/members"
Policy_Management:
- "GET /policies"
- "POST /policies"
- "PUT /policies/{id}"
- "POST /policies/{id}/simulate"
4.4.3 Real-time Communication
WebSocket Integration:
Real_Time_Features:
Live_Notifications:
- New_User_Registration
- Policy_Changes
- Security_Alerts
- System_Status_Updates
Live_Monitoring:
- Active_User_Sessions
- System_Performance_Metrics
- Database_Connection_Status
- Error_Rate_Monitoring
---
## 5. คุณลักษณะของระบบ
### 5.1 Security Features (คุณลักษณะด้านความปลอดภัย)
#### 5.1.1 Advanced Authentication
**Multi-Factor Authentication (MFA)**:
```yaml
MFA_Options:
TOTP_Authenticators:
- Google_Authenticator
- Microsoft_Authenticator
- Authy
- Custom_Hospital_App
Hardware_Tokens:
- YubiKey_FIDO2
- RSA_SecurID
- Smart_Cards
Biometric_Options:
- Fingerprint_Scanner
- Face_Recognition
- Voice_Recognition
Backup_Methods:
- Recovery_Codes (10 single-use codes)
- SMS_Fallback (emergency only)
- Security_Questions
Single Sign-On (SSO):
SSO_Protocols:
- SAML_2.0
- OAuth_2.0_OpenID_Connect
- Active_Directory_Integration
- LDAP_Authentication
SSO_Features:
- Cross_Domain_Authentication
- Automatic_Token_Refresh
- Session_Federation
- Logout_Propagation
5.1.2 Data Protection & Encryption
Data Encryption:
Encryption_Standards:
Data_at_Rest:
- Database: "AES-256 Transparent Data Encryption"
- Files: "AES-256-GCM"
- Backups: "AES-256 + RSA-4096"
Data_in_Transit:
- Web_Traffic: "TLS 1.3"
- Database_Connections: "TLS 1.2+"
- API_Calls: "HTTPS + Certificate Pinning"
Key_Management:
- Hardware_Security_Module (HSM)
- Key_Rotation_Policy (Annual)
- Escrow_and_Recovery_Procedures
Data Masking & Anonymization: - PII Data Masking สำหรับ non-production environments - Dynamic Data Masking ตาม user permissions - Anonymization สำหรับ analytics และ reporting - Right to be Forgotten (GDPR compliance)
5.1.3 Security Monitoring & Incident Response
Security Information and Event Management (SIEM):
Security_Monitoring:
Real_Time_Alerts:
- Failed_Login_Attempts
- Privilege_Escalation_Attempts
- Unusual_Access_Patterns
- Data_Exfiltration_Attempts
Threat_Detection:
- Brute_Force_Attack_Detection
- SQL_Injection_Attempts
- Cross_Site_Scripting (XSS)
- Session_Hijacking_Attempts
Incident_Response:
- Automatic_Account_Lockout
- Admin_Notification_System
- Forensic_Log_Collection
- Emergency_System_Isolation
5.2 Performance & Scalability (ประสิทธิภาพและการขยายตัว)
5.2.1 System Performance Requirements
Response Time Targets:
Performance_Metrics:
Login_Authentication:
- Target: "< 2 seconds"
- Maximum: "< 5 seconds"
Page_Load_Times:
- Dashboard: "< 3 seconds"
- User_Management: "< 2 seconds"
- Reports: "< 10 seconds"
API_Response_Times:
- CRUD_Operations: "< 500ms"
- Search_Queries: "< 1 second"
- Report_Generation: "< 30 seconds"
Database_Operations:
- Simple_Queries: "< 100ms"
- Complex_Queries: "< 2 seconds"
- Bulk_Operations: "< 30 seconds"
5.2.2 Scalability Architecture
Horizontal Scaling:
Load_Balancing:
Web_Servers:
- Minimum: 2 servers
- Auto_Scaling: "Based on CPU/Memory usage"
- Load_Distribution: "Round-robin with health checks"
Application_Servers:
- Stateless_Design: "For easy scaling"
- Container_Support: "Docker/Kubernetes ready"
- Microservices_Architecture: "Modular scaling"
Database_Scaling:
- Read_Replicas: "3 read-only replicas"
- Sharding_Support: "Horizontal partitioning"
- Connection_Pooling: "Efficient resource usage"
5.2.3 Caching Strategy
Multi-Level Caching:
Caching_Layers:
Browser_Cache:
- Static_Resources: "30 days"
- API_Responses: "5 minutes"
CDN_Cache:
- Images_CSS_JS: "30 days"
- API_Responses: "1 hour"
Application_Cache:
- User_Sessions: "Redis/Memcached"
- Database_Query_Results: "1 hour"
- Permission_Cache: "30 minutes"
Database_Cache:
- Query_Result_Cache: "Automatic"
- Index_Cache: "In-memory"
5.3 Reliability & Availability (ความน่าเชื่อถือและความพร้อมใช้งาน)
5.3.1 High Availability Architecture
Uptime Requirements:
Availability_Targets:
System_Uptime: "99.9% (8.77 hours downtime/year)"
Planned_Maintenance: "< 4 hours/month"
Unplanned_Downtime: "< 2 hours/month"
Recovery_Objectives:
RTO (Recovery Time Objective): "< 4 hours"
RPO (Recovery Point Objective): "< 15 minutes"
Failover_Strategy:
Automatic_Failover: "< 5 minutes"
Manual_Failover: "< 30 minutes"
Failback_Time: "< 2 hours"
5.3.2 Backup & Disaster Recovery
Backup Strategy:
Backup_Types:
Full_Backup:
- Frequency: "Weekly (Sunday 2 AM)"
- Retention: "6 months"
- Storage: "On-site + Off-site"
Incremental_Backup:
- Frequency: "Daily (2 AM)"
- Retention: "30 days"
- Storage: "On-site SAN"
Transaction_Log_Backup:
- Frequency: "Every 15 minutes"
- Retention: "7 days"
- Storage: "High-speed SSD"
Configuration_Backup:
- Frequency: "After each change"
- Retention: "1 year"
- Version_Control: "Git repository"
5.3.3 Error Handling & Recovery
Error Management:
Error_Categories:
User_Errors:
- Validation_Messages: "Clear and actionable"
- Form_Error_Highlighting
- Suggested_Corrections
System_Errors:
- Graceful_Degradation
- Retry_Mechanisms
- Fallback_Procedures
Critical_Errors:
- Automatic_Error_Reporting
- Admin_Notifications
- System_Isolation_if_Required
5.4 Usability & User Experience (การใช้งานและประสบการณ์ผู้ใช้)
5.4.1 User Interface Design Principles
Design Standards:
UI_Guidelines:
Visual_Design:
- Consistent_Color_Scheme
- Hospital_Branding_Integration
- Accessible_Color_Contrast (WCAG 2.1 AA)
- Responsive_Layout
Navigation:
- Intuitive_Menu_Structure
- Breadcrumb_Navigation
- Quick_Access_Shortcuts
- Search_Functionality
Form_Design:
- Clear_Field_Labels
- Inline_Validation
- Progress_Indicators
- Auto_Save_Functionality
5.4.2 Accessibility Features
WCAG 2.1 Compliance:
Accessibility_Features:
Visual_Accessibility:
- High_Contrast_Mode
- Font_Size_Adjustment
- Color_Blind_Friendly_Design
- Screen_Reader_Support
Motor_Accessibility:
- Keyboard_Navigation
- Large_Click_Targets
- Timeout_Extensions
- Voice_Control_Support
Cognitive_Accessibility:
- Simple_Language
- Consistent_Navigation
- Error_Prevention
- Help_Documentation
5.4.3 Multi-language Support
Internationalization (i18n):
Language_Support:
Primary_Languages:
- Thai (th-TH)
- English (en-US)
Localization_Features:
- Right_to_Left_Text (future)
- Date_Time_Formats
- Number_Formats
- Currency_Formats
Content_Management:
- Translation_Management_System
- Dynamic_Language_Switching
- Context_Aware_Translations
5.5 Monitoring & Analytics (การตรวจสอบและการวิเคราะห์)
5.5.1 System Monitoring
Infrastructure Monitoring:
Monitoring_Metrics:
Server_Health:
- CPU_Usage
- Memory_Utilization
- Disk_Space
- Network_Bandwidth
Application_Health:
- Response_Times
- Error_Rates
- Active_Users
- Session_Duration
Database_Health:
- Query_Performance
- Connection_Pool_Usage
- Lock_Contention
- Replication_Lag
5.5.2 Business Intelligence & Analytics
Usage Analytics:
Analytics_Dashboards:
User_Analytics:
- Login_Patterns
- Feature_Usage_Statistics
- User_Journey_Analysis
- Adoption_Rates
Security_Analytics:
- Failed_Login_Attempts
- Permission_Usage_Patterns
- Anomaly_Detection
- Risk_Scoring
Performance_Analytics:
- System_Performance_Trends
- User_Satisfaction_Metrics
- Error_Rate_Analysis
- Capacity_Planning_Data
---
## 6. ความต้องการที่ไม่ใช่ฟังก์ชัน
### 6.1 Performance Requirements (ความต้องการด้านประสิทธิภาพ)
#### 6.1.1 Response Time Requirements
```yaml
Response_Time_SLAs:
Critical_Operations:
- Emergency_Account_Lockout: "< 1 second"
- Login_Authentication: "< 2 seconds"
- Permission_Check: "< 100ms"
Standard_Operations:
- Page_Loading: "< 3 seconds"
- Form_Submission: "< 2 seconds"
- Search_Results: "< 1 second"
Batch_Operations:
- User_Import: "< 5 minutes for 1000 users"
- Report_Generation: "< 30 seconds"
- Data_Export: "< 2 minutes for 10MB"
6.1.2 Throughput Requirements
Concurrent_User_Support:
Peak_Hours (8AM-5PM):
- Active_Users: "500 concurrent"
- Login_Rate: "50 logins/minute"
- API_Requests: "10,000 requests/minute"
Off_Peak_Hours:
- Active_Users: "100 concurrent"
- Maintenance_Operations: "Full system access"
Emergency_Situations:
- Burst_Capacity: "1000 concurrent users"
- Auto_Scaling: "Automatic resource allocation"
6.2 Reliability & Availability (ความน่าเชื่อถือและความพร้อมใช้งาน)
6.2.1 Availability Requirements
Uptime_Commitments:
Business_Hours (7AM-7PM):
- Availability: "99.95%"
- Max_Downtime: "< 3 minutes/day"
After_Hours (7PM-7AM):
- Availability: "99.5%"
- Planned_Maintenance: "Allowed"
Emergency_Response:
- 24x7_Availability: "Critical functions only"
- Emergency_Access: "Always available"
6.2.2 Fault Tolerance
Fault_Tolerance_Levels:
Single_Points_of_Failure:
- Eliminated: "Database, Web servers, Load balancers"
- Redundancy: "N+1 configuration minimum"
Graceful_Degradation:
- Core_Functions: "Must remain operational"
- Optional_Features: "Can be disabled"
- User_Notification: "Clear status messages"
6.3 Security Requirements (ความต้องการด้านความปลอดภัย)
6.3.1 Access Control Requirements
Security_Standards:
Compliance_Requirements:
- PDPA_Compliance: "Full compliance required"
- ISO_27001: "Recommended practices"
- NIST_Cybersecurity_Framework: "Core functions"
Data_Classification:
- Public: "No restrictions"
- Internal: "Employee access only"
- Confidential: "Need-to-know basis"
- Restricted: "Explicit approval required"
6.3.2 Audit & Compliance
Audit_Requirements:
Log_Retention:
- Security_Logs: "7 years"
- Access_Logs: "3 years"
- System_Logs: "1 year"
Audit_Trail_Completeness:
- Who: "User identification"
- What: "Action performed"
- When: "Timestamp (sub-second precision)"
- Where: "Source location (IP, device)"
- Why: "Business justification"
Compliance_Reporting:
- Monthly_Security_Reports
- Quarterly_Compliance_Assessment
- Annual_Security_Audit
6.4 Scalability Requirements (ความต้องการด้านการขยายตัว)
6.4.1 Growth Planning
Scalability_Targets:
User_Growth:
- Year_1: "1,000 users"
- Year_3: "2,500 users"
- Year_5: "5,000 users"
Data_Growth:
- Database_Size: "50GB/year growth"
- Log_Data: "10GB/month growth"
- Backup_Storage: "500GB/year growth"
Performance_Scaling:
- Linear_Performance: "With horizontal scaling"
- No_Performance_Degradation: "Up to 5x current load"
6.5 Usability Requirements (ความต้องการด้านการใช้งาน)
6.5.1 User Experience Standards
UX_Requirements:
Learning_Curve:
- New_Admin_Training: "< 4 hours"
- Basic_Operations: "< 30 minutes to learn"
- Advanced_Features: "< 2 hours with documentation"
Error_Prevention:
- Confirmation_Dialogs: "For destructive actions"
- Input_Validation: "Real-time feedback"
- Undo_Functionality: "Where applicable"
Help_System:
- Context_Sensitive_Help
- Video_Tutorials
- Interactive_Guides
- 24x7_Support_Documentation
6.6 Compatibility Requirements (ความต้องการด้านความเข้ากันได้)
6.6.1 Browser Compatibility
Supported_Browsers:
Desktop_Browsers:
- Chrome: "90+ (recommended)"
- Firefox: "85+"
- Edge: "90+"
- Safari: "14+ (limited support)"
Mobile_Browsers:
- Chrome_Mobile: "90+"
- Safari_Mobile: "14+"
- Samsung_Internet: "14+"
Legacy_Support:
- IE_11: "Basic functionality only"
- Gradual_Phase_Out: "2025"
6.6.2 Operating System Compatibility
Server_OS_Support:
Primary_Support:
- Windows_Server: "2019, 2022"
- Ubuntu_Server: "20.04 LTS, 22.04 LTS"
- CentOS/RHEL: "8, 9"
Client_OS_Support:
- Windows: "10, 11"
- macOS: "11+"
- Linux: "Major distributions"
- Mobile_OS: "iOS 14+, Android 10+"
7. การเชื่อมโยงกับระบบอื่น
7.1 HIS System Integration
7.1.1 Core Medical Systems
ระบบเวชระเบียน (1.2.1):
Integration_Points:
User_Authentication:
- SSO_Integration: "Single sign-on for medical staff"
- Permission_Sync: "Real-time permission updates"
Data_Access_Control:
- Patient_Record_Access: "Role-based access control"
- Medical_History_Permissions: "Department-specific access"
API_Endpoints:
- "/api/v1/medical-records/access-check"
- "/api/v1/users/{id}/medical-permissions"
ระบบซักประวัติ (1.2.2):
Integration_Requirements:
Permission_Management:
- History_Taking_Rights: "Nurse and above"
- Sensitive_Information_Access: "Doctor only"
Audit_Integration:
- History_Access_Logging
- Modification_Tracking
ระบบห้องตรวจแพทย์ (1.2.3):
Integration_Features:
Doctor_Assignment:
- Room_Access_Permissions
- Schedule_Based_Access
Equipment_Access:
- Medical_Device_Permissions
- Maintenance_Access_Rights
7.1.2 Financial & Administrative Systems
ระบบการเงิน (1.2.14):
Financial_Integration:
Access_Control:
- Billing_Access_Rights
- Payment_Processing_Permissions
- Financial_Report_Access
Compliance:
- Segregation_of_Duties
- Financial_Audit_Trail
- Anti_Fraud_Measures
ระบบตรวจสอบสิทธิ (1.2.15):
Insurance_Integration:
Permission_Sync:
- Insurance_Verification_Rights
- Claims_Processing_Access
Data_Sharing:
- Patient_Eligibility_Check
- Coverage_Information_Access
7.2 External System Integration
7.2.1 Government Systems
กระทรวงสาธารณสุข:
MOPH_Integration:
Data_Reporting:
- 43_Files_Submission
- Disease_Surveillance_Reporting
- Healthcare_Quality_Indicators
Access_Control:
- Authorized_Personnel_Only
- Government_Audit_Access
- Data_Protection_Compliance
สำนักงานหลักประกันสุขภาพแห่งชาติ (NHSO):
NHSO_Integration:
e_Claim_System:
- Claims_Submission_Rights
- Reimbursement_Access
- Quality_Assurance_Reporting
7.2.2 Third-party Services
External Audit Services:
Audit_Integration:
Access_Provision:
- Read_Only_Audit_Accounts
- Specific_Data_Access
- Time_Limited_Access
Compliance_Reporting:
- ISO_27001_Audit_Support
- PDPA_Compliance_Verification
- Healthcare_Standards_Audit
7.3 API Integration Architecture
7.3.1 REST API Design
API Versioning Strategy:
Versioning_Approach:
URL_Versioning: "/api/v1/, /api/v2/"
Header_Versioning: "Accept: application/vnd.hospital.v1+json"
Backward_Compatibility: "Minimum 2 versions"
Deprecation_Policy: "6 months notice"
Authentication & Authorization:
API_Security:
Authentication:
- OAuth_2.0_Bearer_Tokens
- API_Key_Authentication
- Mutual_TLS_for_Critical_APIs
Rate_Limiting:
- Per_User_Limits: "1000 requests/hour"
- Per_Application_Limits: "10000 requests/hour"
- Burst_Limits: "100 requests/minute"
7.3.2 Real-time Integration
WebSocket Connections:
Real_Time_Features:
User_Status_Updates:
- Login_Logout_Events
- Permission_Changes
- Account_Status_Changes
System_Notifications:
- Security_Alerts
- System_Maintenance_Notices
- Emergency_Broadcasts
7.4 Data Integration & ETL
7.4.1 Data Synchronization
Master Data Sync:
Sync_Processes:
User_Data_Sync:
- HR_System_Integration
- Active_Directory_Sync
- Department_Changes
Organizational_Data:
- Department_Structure_Updates
- Position_Changes
- Reporting_Structure_Updates
7.4.2 Data Migration Support
System Upgrade Paths:
Migration_Support:
Legacy_System_Import:
- User_Account_Migration
- Permission_Mapping
- Historical_Data_Preservation
Data_Validation:
- Integrity_Checks
- Duplicate_Detection
- Error_Reporting
ภาคผนวก
ภาคผนวก A: IAM Architecture Diagram
graph TB
subgraph "Identity Layer"
USERS["👥 Users"]
GROUPS["👥 Groups"]
ROLES["🎭 Roles"]
end
subgraph "Policy Layer"
POLICIES["📋 Policies"]
PERMISSIONS["🔐 Permissions"]
CONDITIONS["⚖️ Conditions"]
end
subgraph "Authentication Layer"
MFA["🔒 Multi-Factor Auth"]
SSO["🎫 Single Sign-On"]
SESSIONS["💳 Sessions"]
end
subgraph "Authorization Engine"
PEP["📊 Policy Enforcement Point"]
PDP["🧠 Policy Decision Point"]
PIP["📝 Policy Information Point"]
end
subgraph "Resources"
MEDICAL["🏥 Medical Systems"]
FINANCIAL["💰 Financial Systems"]
ADMIN["⚙️ Admin Systems"]
end
USERS --> GROUPS
USERS --> ROLES
GROUPS --> POLICIES
ROLES --> POLICIES
POLICIES --> PERMISSIONS
PERMISSIONS --> CONDITIONS
USERS --> MFA
MFA --> SSO
SSO --> SESSIONS
SESSIONS --> PEP
PEP --> PDP
PDP --> PIP
PDP --> POLICIES
PEP --> MEDICAL
PEP --> FINANCIAL
PEP --> ADMIN
style USERS fill:#e3f2fd
style MFA fill:#ffebee
style PDP fill:#e8f5e8
style MEDICAL fill:#fff3e0
ภาคผนวก B: Security Architecture
graph TD
subgraph "Perimeter Security"
FW["🔥 Firewall"]
WAF["🛡️ Web Application Firewall"]
LB["⚖️ Load Balancer"]
end
subgraph "Application Security"
AUTH["🔐 Authentication"]
AUTHZ["🎯 Authorization"]
ENCRYPT["🔒 Encryption"]
end
subgraph "Data Security"
TDE["💾 Transparent Data Encryption"]
BACKUP["💿 Encrypted Backups"]
AUDIT["📊 Audit Logs"]
end
subgraph "Monitoring & Response"
SIEM["🚨 SIEM"]
IDS["🔍 Intrusion Detection"]
RESPONSE["⚡ Incident Response"]
end
FW --> WAF
WAF --> LB
LB --> AUTH
AUTH --> AUTHZ
AUTHZ --> ENCRYPT
ENCRYPT --> TDE
TDE --> BACKUP
BACKUP --> AUDIT
AUDIT --> SIEM
SIEM --> IDS
IDS --> RESPONSE
style FW fill:#ffebee
style AUTH fill:#e8f5e8
style TDE fill:#e3f2fd
style SIEM fill:#fff3e0
เอกสารนี้จัดทำขึ้นเพื่อใช้ในการพัฒนาระบบผู้ดูแลระบบ (System Administrator Management System) สำหรับโรงพยาบาลค่ายธนรัชน์ โดยเน้นความปลอดภัยและการจัดการสิทธิ์ตามมาตรฐานสากล และต้องได้รับการอนุมัติจากผู้มีอำนาจก่อนนำไปใช้ในการพัฒนาระบบ ```