v2.0.0-stable

WCare System Architecture

Tài liệu chi tiết về kiến trúc hệ thống, luồng dữ liệu và các biện pháp bảo mật được áp dụng trong WCare Health Platform.

1. Overview

WCare được thiết kế theo mô hình Event-Driven Architecture để đảm bảo khả năng xử lý thời gian thực cho hàng triệu kết nối đồng thời (IoT Devices, App Clients).

// System Stack const Stack = { Frontend: "Next.js 15 + Tailwind CSS", Backend: "Node.js (Edge Runtime) + Prisma", Database: "PostgreSQL (Supabase) + Redis", AI: "TensorFlow Lite + Custom Core Engine", Security: "AES-256-GCM + RSA-4096" }

1.1 System Requirements

Mobile Client

  • iOS 13.0+ / Android 8.0+
  • Minimum 2GB RAM
  • Biometric HW (Optional)

Web Browser

  • Chrome 90+ / Safari 14+
  • Firefox / Edge Latest
  • Local Storage Enabled

1.2 Installation

Triển khai môi trường phát triển cục bộ (Development Environment Setup).

$ git clone https://github.com/wmtan/wcare.git
$ pnpm install
$ pnpm dev

2. Data Schema

2.1 User Profile Schema

Cấu trúc dữ liệu người dùng được thiết kế để tuân thủ các quy định về quyền riêng tư dữ liệu (GDPR/HIPAA).

model User { id String @id @default(cuid()) email String @unique name String? gender String? role Role @default(USER) isPrivate Boolean @default(true) encryptedSalt String // Used for Client-Side Decryption createdAt DateTime @default(now()) }

2.2 Medical Record Object

Dữ liệu hồ sơ y tế được lưu trữ dưới dạng mã hóa. Chỉ Client sở hữu khóa mới có thể giải mã.

Encrypted Block
Secure Persistence

3. Security

3.1 Zero-Knowledge Encryption

WCare áp dụng kiến trúc Zero-Knowledge. Hệ thống không bao giờ biết mật khẩu hoặc dữ liệu y tế thô của bạn.

  • PBKDF2 Derivation: Phái sinh khóa từ mật khẩu người dùng với 100,000+ iterations.
  • AES-256-GCM: Mã hóa dữ liệu đối xứng với xác thực tính toàn vẹn.

3.2 Access Control (RBAC)

Hệ thống phân quyền dựa trên vai trò để đảm bảo nguyên lý Least Privilege.

RoleData AccessSystem Actions
UserOwn Data OnlyRead/Write/Delete
DoctorShared Patient DataRead/Comment
AdminMetadata/LogsUser Management

4. Deployment

4.1 21-Day Go-Live Roadmap

Quy trình triển khai chuẩn cho các tổ chức y tế quy mô lớn.

Week 1
Data Mapping & Security Audit
Week 2
ETL Pipeline & SSO Integration
Week 3
Staff Training & Production Launch

4.2 Service Level Agreement (SLA)

WCare cam kết Uptime 99.95% cho các khách hàng Enterprise với hỗ trợ kỹ thuật 24/7/365.

Critical Issue (P1)< 15 mins
High Impact (P2)< 1 hour
General Support (P3)< 4 hours

5. Integration

5.1 HL7 / FHIR Bridge

Kết nối WCare với hệ thống HIS/EMR hiện tại của bệnh viện thông qua chuẩn FHIR R4.

GET /fhir/Patient/123/$everything Header: Authorization Bearer <token> Accept: application/fhir+json

5.2 IoT Device Ingestion

Support for MQTT and Webhooks for real-time telemetry from medical devices.

Apple HealthKitGoogle FitGarminOmronWithings

6. Success

6.1 Care Team Playbook

Template hội thoại và quy trình xử lý hỗ trợ bệnh nhân từ xa.

6.2 NPS & Patient Satisfaction

Hệ thống khảo sát tự động sau mỗi phiên tư vấn để đảm bảo chất lượng phục vụ.