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

Check List Master Data

ระบบตรวจสอบสิทธิ (Rights Validation System)


เอกสารเลขที่: SRS-1.2.15-MASTERDATA
เวอร์ชัน: 1.0
วันที่: 5 ตุลาคม 2568
ผู้จัดทำ: ทีมพัฒนาระบบ
การปรับปรุง: แยก Master Data จากระบบเวชระเบียนหลัก


📊 รายการข้อมูล Master Data สำหรับระบบตรวจสอบสิทธิ

🏥 Insurance Type Master Data (ประเภทสิทธิการรักษา)

ประเภทสิทธิหลัก (Main Insurance Types)

{
  "i### 💰 Payment & Receipt Master Data (การเงินและใบเสร็จ)

#### ประเภทการชำระเงิน (Payment Types)
```json
{
  "payment_types": [
    {
      "right_type": "UC",
      "payment_code": "FULL_COVERAGE",
      "payment_name": "ครอบคลุม 100%",
      "requires_payment": false,
      "payment_method": "DIRECT_BILLING",
      "default_amount": 0,
      "calculation_formula": "0"
    },
    {
      "right_type": "SS",
      "payment_code": "FULL_COVERAGE",
      "payment_name": "ครอบคลุม 100%",
      "requires_payment": false,
      "payment_method": "DIRECT_BILLING",
      "default_amount": 0,
      "calculation_formula": "0"
    },
    {
      "right_type": "CS",
      "payment_code": "FULL_COVERAGE",
      "payment_name": "ครอบคลุม 100%",
      "requires_payment": false,
      "payment_method": "DIRECT_BILLING",
      "default_amount": 0,
      "calculation_formula": "0"
    },
    {
      "right_type": "PR",
      "payment_code": "COPAYMENT",
      "payment_name": "จ่ายส่วนต่าง + เบิกประกัน",
      "requires_payment": true,
      "payment_method": "CASH",
      "default_amount": null,
      "calculation_formula": "total_amount * (1 - coverage_percentage/100)"
    },
    {
      "right_type": "SLF",
      "payment_code": "SELF_PAY",
      "payment_name": "ชำระเงินเอง",
      "requires_payment": true,
      "payment_method": "CASH",
      "default_amount": null,
      "calculation_formula": "total_amount"
    },
    {
      "right_type": "WC",
      "payment_code": "DEDUCTIBLE",
      "payment_name": "เบิกจ่ายตรงจากหน่วยงาน",
      "requires_payment": false,
      "payment_method": "DIRECT_BILLING",
      "default_amount": 0,
      "calculation_formula": "0"
    }
  ]
}

ประเภทใบเสร็จ (Receipt Types)

{
  "receipt_types": [
    {
      "right_type": "UC",
      "receipt_code": "GOVERNMENT",
      "receipt_name": "ใบเสร็จรับเงินราชการ",
      "receipt_template": "NHSO_RECEIPT",
      "service_charge_formula": {
        "base_rate": "DRG_RATE",
        "adjustment": "HOSPITAL_LEVEL",
        "copayment": 30
      },
      "requires_approval": false,
      "print_copies": 2
    },
    {
      "right_type": "SS",
      "receipt_code": "GOVERNMENT",
      "receipt_name": "ใบเสร็จรับเงินราชการ",
      "receipt_template": "SSO_RECEIPT",
      "service_charge_formula": {
        "base_rate": "STANDARD_RATE",
        "adjustment": "SERVICE_TYPE",
        "copayment": 0
      },
      "requires_approval": false,
      "print_copies": 2
    },
    {
      "right_type": "CS",
      "receipt_code": "GOVERNMENT",
      "receipt_name": "ใบเสร็จรับเงินราชการ",
      "receipt_template": "CGD_RECEIPT",
      "service_charge_formula": {
        "base_rate": "GOVERNMENT_RATE",
        "adjustment": "RANK_LEVEL",
        "copayment": 0
      },
      "requires_approval": false,
      "print_copies": 3
    },
    {
      "right_type": "PR",
      "receipt_code": "INSURANCE",
      "receipt_name": "ใบเสร็จประกันสุขภาพ",
      "receipt_template": "INSURANCE_RECEIPT",
      "service_charge_formula": {
        "base_rate": "STANDARD_RATE",
        "adjustment": "INSURANCE_RATE",
        "copayment": "VARIABLE"
      },
      "requires_approval": true,
      "print_copies": 3
    },
    {
      "right_type": "SLF",
      "receipt_code": "PERSONAL",
      "receipt_name": "ใบเสร็จรับเงินส่วนบุคคล",
      "receipt_template": "PERSONAL_RECEIPT",
      "service_charge_formula": {
        "base_rate": "STANDARD_RATE",
        "adjustment": "NONE",
        "copayment": "FULL_AMOUNT"
      },
      "requires_approval": false,
      "print_copies": 1
    }
  ]
}

ส่วนลดตามหมวดค่าใช้จ่าย (Discount by Expense Category)

{
  "discounts_by_category": [
    {
      "right_type": "UC",
      "discounts": [
        {
          "category": "TREATMENT",
          "category_name": "ค่าตรวจรักษา",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 30
        },
        {
          "category": "MEDICINE",
          "category_name": "ค่ายา",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "LAB",
          "category_name": "ค่าตรวจทางห้องปฏิบัติการ",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "XRAY",
          "category_name": "ค่าตรวจเอกซเรย์",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "PROCEDURE",
          "category_name": "ค่าหัตถการ",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        }
      ]
    },
    {
      "right_type": "SS",
      "discounts": [
        {
          "category": "TREATMENT",
          "category_name": "ค่าตรวจรักษา",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "MEDICINE",
          "category_name": "ค่ายา",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "LAB",
          "category_name": "ค่าตรวจทางห้องปฏิบัติการ",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "XRAY",
          "category_name": "ค่าตรวจเอกซเรย์",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        },
        {
          "category": "PROCEDURE",
          "category_name": "ค่าหัตถการ",
          "discount_type": "PERCENTAGE",
          "discount_value": 100,
          "max_discount": null,
          "min_charge": 0
        }
      ]
    },
    {
      "right_type": "PR",
      "discounts": [
        {
          "category": "TREATMENT",
          "category_name": "ค่าตรวจรักษา",
          "discount_type": "PERCENTAGE",
          "discount_value": 80,
          "max_discount": 5000,
          "min_charge": 500
        },
        {
          "category": "MEDICINE",
          "category_name": "ค่ายา",
          "discount_type": "PERCENTAGE",
          "discount_value": 80,
          "max_discount": 2000,
          "min_charge": 100
        },
        {
          "category": "LAB",
          "category_name": "ค่าตรวจทางห้องปฏิบัติการ",
          "discount_type": "PERCENTAGE",
          "discount_value": 70,
          "max_discount": 1500,
          "min_charge": 200
        },
        {
          "category": "XRAY",
          "category_name": "ค่าตรวจเอกซเรย์",
          "discount_type": "PERCENTAGE",
          "discount_value": 70,
          "max_discount": 2000,
          "min_charge": 300
        },
        {
          "category": "PROCEDURE",
          "category_name": "ค่าหัตถการ",
          "discount_type": "PERCENTAGE",
          "discount_value": 80,
          "max_discount": 10000,
          "min_charge": 1000
        }
      ]
    },
    {
      "right_type": "SLF",
      "discounts": [
        {
          "category": "ALL",
          "category_name": "ทุกหมวด",
          "discount_type": "PERCENTAGE",
          "discount_value": 0,
          "max_discount": null,
          "min_charge": null
        }
      ]
    }
  ]
}

🔗 Integration Points กับระบบอื่นsurance_types": [

{
  "code": "CS",
  "name_th": "สิทธิข้าราชการ",
  "name_en": "Civil Servant Medical Benefit",
  "category": "government",
  "coverage_percentage": 100,
  "requires_approval": false,
  "online_validation": true,
  "copayment_required": false,
  "valid_hospitals": ["all_government"],
  "is_active": true
},
{
  "code": "SS",
  "name_th": "ประกันสังคม",
  "name_en": "Social Security",
  "category": "social_security",
  "coverage_percentage": 100,
  "requires_approval": false,
  "online_validation": true,
  "copayment_required": false,
  "valid_hospitals": ["registered_hospitals"],
  "is_active": true
},
{
  "code": "UC",
  "name_th": "บัตรทอง (UC)",
  "name_en": "Universal Coverage",
  "category": "universal",
  "coverage_percentage": 100,
  "requires_approval": false,
  "online_validation": true,
  "copayment_required": false,
  "valid_hospitals": ["contracted_hospitals"],
  "is_active": true
},
{
  "code": "LGO",
  "name_th": "องค์กรปกครองส่วนท้องถิ่น",
  "name_en": "Local Government Organization",
  "category": "local_government",
  "coverage_percentage": 100,
  "requires_approval": false,
  "online_validation": true,
  "copayment_required": false,
  "valid_hospitals": ["contracted_hospitals"],
  "is_active": true
},
{
  "code": "PR",
  "name_th": "ประกันสุขภาพเอกชน",
  "name_en": "Private Insurance",
  "category": "private",
  "coverage_percentage": 80,
  "requires_approval": true,
  "online_validation": false,
  "copayment_required": true,
  "valid_hospitals": ["network_hospitals"],
  "is_active": true
},
{
  "code": "SLF",
  "name_th": "ชำระเงินเอง",
  "name_en": "Self-Pay",
  "category": "self_pay",
  "coverage_percentage": 0,
  "requires_approval": false,
  "online_validation": false,
  "copayment_required": false,
  "valid_hospitals": ["all"],
  "is_active": true
},
{
  "code": "WC",
  "name_th": "เบิกจ่ายตรงจากหน่วยงาน",
  "name_en": "Workers' Compensation",
  "category": "workers_comp",
  "coverage_percentage": 100,
  "requires_approval": true,
  "online_validation": false,
  "copayment_required": false,
  "valid_hospitals": ["approved_hospitals"],
  "is_active": true
},
{
  "code": "FRG",
  "name_th": "คนต่างด้าว",
  "name_en": "Foreign National",
  "category": "foreigner",
  "coverage_percentage": 0,
  "requires_approval": false,
  "online_validation": false,
  "copayment_required": false,
  "valid_hospitals": ["all"],
  "is_active": true
}

] } ```

ประเภทสิทธิพิเศษ (Special Rights Categories)

json { "special_rights": [ { "code": "VIP", "name_th": "บุคคลสำคัญ", "name_en": "VIP", "coverage_percentage": 100, "priority_level": 1, "requires_approval": false }, { "code": "VETERAN", "name_th": "ทหารผ่านศึก", "name_en": "War Veteran", "coverage_percentage": 100, "priority_level": 2, "requires_approval": false }, { "code": "DISABLED", "name_th": "ผู้พิการ", "name_en": "Disabled Person", "coverage_percentage": 100, "priority_level": 2, "requires_approval": false }, { "code": "ELDERLY", "name_th": "ผู้สูงอายุ", "name_en": "Elderly", "coverage_percentage": 100, "priority_level": 3, "requires_approval": false }, { "code": "MONK", "name_th": "พระภิกษุ/สามเณร", "name_en": "Monk/Novice", "coverage_percentage": 100, "priority_level": 3, "requires_approval": false } ] }

ระดับการให้บริการ (Service Levels)

{
  "service_levels": [
    {
      "level": 1,
      "code": "BASIC",
      "name_th": "บริการพื้นฐาน",
      "name_en": "Basic Service",
      "includes": ["consultation", "basic_treatment", "generic_drugs"],
      "excludes": []
    },
    {
      "level": 2,
      "code": "STANDARD",
      "name_th": "บริการมาตรฐาน",
      "name_en": "Standard Service",
      "includes": ["consultation", "standard_treatment", "brand_drugs", "lab_tests"],
      "excludes": ["cosmetic_procedures"]
    },
    {
      "level": 3,
      "code": "PREMIUM",
      "name_th": "บริการพิเศษ",
      "name_en": "Premium Service",
      "includes": ["consultation", "advanced_treatment", "brand_drugs", "all_tests", "specialist_care"],
      "excludes": []
    }
  ]
}

🔍 Rights Validation Master Data (การยืนยันสิทธิออนไลน์)

ผู้ให้บริการตรวจสอบสิทธิ (Validation Providers)

{
  "validation_providers": [
    {
      "code": "NHSO",
      "name_th": "สำนักงานหลักประกันสุขภาพแห่งชาติ",
      "name_en": "National Health Security Office",
      "endpoint": "https://ucws.nhso.go.th/ucwstokenp1/UCWSTokenP1",
      "auth_type": "token",
      "timeout_seconds": 30,
      "retry_attempts": 3,
      "supported_schemes": ["UC"],
      "is_active": true
    },
    {
      "code": "SSO",
      "name_th": "สำนักงานประกันสังคม",
      "name_en": "Social Security Office",
      "endpoint": "https://api.sso.go.th/validation",
      "auth_type": "certificate",
      "timeout_seconds": 45,
      "retry_attempts": 2,
      "supported_schemes": ["SS"],
      "is_active": true
    },
    {
      "code": "CGD",
      "name_th": "สำนักงานคณะกรรมการข้าราชการพลเรือน",
      "name_th": "Office of the Civil Service Commission",
      "endpoint": "https://api.ocsc.go.th/medical",
      "auth_type": "api_key",
      "timeout_seconds": 30,
      "retry_attempts": 3,
      "supported_schemes": ["CS"],
      "is_active": true
    },
    {
      "code": "LGO_API",
      "name_th": "API องค์กรปกครองส่วนท้องถิ่น",
      "name_en": "Local Government API",
      "endpoint": "https://api.lgo.go.th/health",
      "auth_type": "oauth",
      "timeout_seconds": 60,
      "retry_attempts": 2,
      "supported_schemes": ["LGO"],
      "is_active": true
    }
  ]
}

สถานะการตรวจสอบ (Validation Status)

{
  "validation_statuses": [
    {
      "code": "VALID",
      "name_th": "มีสิทธิ์",
      "name_en": "Valid",
      "allow_treatment": true,
      "requires_copayment": false,
      "color": "#4CAF50"
    },
    {
      "code": "EXPIRED",
      "name_th": "สิทธิ์หมดอายุ",
      "name_en": "Expired",
      "allow_treatment": false,
      "requires_copayment": true,
      "color": "#FF9800"
    },
    {
      "code": "SUSPENDED",
      "name_th": "ระงับสิทธิ์",
      "name_en": "Suspended",
      "allow_treatment": false,
      "requires_copayment": true,
      "color": "#F44336"
    },
    {
      "code": "INVALID",
      "name_th": "ไม่มีสิทธิ์",
      "name_en": "Invalid",
      "allow_treatment": false,
      "requires_copayment": true,
      "color": "#F44336"
    },
    {
      "code": "PENDING",
      "name_th": "รอตรวจสอบ",
      "name_en": "Pending Verification",
      "allow_treatment": true,
      "requires_copayment": true,
      "color": "#FFC107"
    },
    {
      "code": "ERROR",
      "name_th": "เกิดข้อผิดพลาดในระบบ",
      "name_en": "System Error",
      "allow_treatment": true,
      "requires_copayment": true,
      "color": "#9E9E9E"
    }
  ]
}

ประเภทการตรวจสอบ (Validation Types)

{
  "validation_types": [
    {
      "code": "REALTIME",
      "name_th": "ตรวจสอบแบบ Real-time",
      "name_en": "Real-time Validation",
      "response_time": "immediate",
      "accuracy": 99,
      "cost_per_query": 0.5
    },
    {
      "code": "BATCH",
      "name_th": "ตรวจสอบแบบ Batch",
      "name_en": "Batch Validation",
      "response_time": "hourly",
      "accuracy": 95,
      "cost_per_query": 0.1
    },
    {
      "code": "MANUAL",
      "name_th": "ตรวจสอบด้วยตนเอง",
      "name_en": "Manual Validation",
      "response_time": "24_hours",
      "accuracy": 100,
      "cost_per_query": 0
    },
    {
      "code": "CACHED",
      "name_th": "ใช้ข้อมูลที่เก็บไว้",
      "name_en": "Cached Validation",
      "response_time": "immediate",
      "accuracy": 90,
      "cost_per_query": 0
    }
  ]
}

📋 Coverage & Benefits Master Data

ความคุ้มครองตามประเภทการรักษา (Treatment Coverage)

{
  "treatment_coverage": [
    {
      "treatment_type": "OPD",
      "name_th": "ผู้ป่วยนอก",
      "name_en": "Outpatient",
      "coverage_by_scheme": {
        "UC": {"covered": true, "copayment": 30, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "SS": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "CS": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "LGO": {"covered": true, "copayment": 30, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "PR": {"covered": true, "copayment": 500, "limit_per_visit": 5000, "coverage_percentage": 80, "requires_referral": true},
        "WC": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": true},
        "SLF": {"covered": false, "copayment": "full", "limit_per_visit": null, "coverage_percentage": 0, "requires_referral": false},
        "FRG": {"covered": false, "copayment": "full", "limit_per_visit": null, "coverage_percentage": 0, "requires_referral": false}
      }
    },
    {
      "treatment_type": "IPD",
      "name_th": "ผู้ป่วยใน",
      "name_en": "Inpatient",
      "coverage_by_scheme": {
        "UC": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": true},
        "SS": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "CS": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "LGO": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": true},
        "PR": {"covered": true, "copayment": 2000, "limit_per_visit": 50000, "coverage_percentage": 80, "requires_referral": true},
        "WC": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": true},
        "SLF": {"covered": false, "copayment": "full", "limit_per_visit": null, "coverage_percentage": 0, "requires_referral": false},
        "FRG": {"covered": false, "copayment": "full", "limit_per_visit": null, "coverage_percentage": 0, "requires_referral": false}
      }
    },
    {
      "treatment_type": "ER",
      "name_th": "ฉุกเฉิน",
      "name_en": "Emergency",
      "coverage_by_scheme": {
        "UC": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "SS": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "CS": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "LGO": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "PR": {"covered": true, "copayment": 1000, "limit_per_visit": 10000, "coverage_percentage": 90, "requires_referral": false},
        "WC": {"covered": true, "copayment": 0, "limit_per_visit": null, "coverage_percentage": 100, "requires_referral": false},
        "SLF": {"covered": false, "copayment": "full", "limit_per_visit": null, "coverage_percentage": 0, "requires_referral": false},
        "FRG": {"covered": false, "copayment": "full", "limit_per_visit": null, "coverage_percentage": 0, "requires_referral": false}
      }
    }
  ]
}
        "CS": {"covered": true, "copayment": 0, "limit_per_visit": null},
        "PR": {"covered": true, "copayment": 0, "limit_per_visit": 50000},
        "SLF": {"covered": false, "copayment": "full", "limit_per_visit": null}
      }
    }
  ]
}

ข้อจำกัดการใช้สิทธิ์ (Rights Limitations)

{
  "rights_limitations": [
    {
      "scheme": "UC",
      "limitations": [
        {"type": "hospital_restriction", "description": "ต้องรักษาที่โรงพยาบาลที่ลงทะเบียน"},
        {"type": "referral_required", "description": "ต้องมีใบส่งตัวสำหรับแพทย์เฉพาะทาง"},
        {"type": "drug_formulary", "description": "ใช้ได้เฉพาะยาในบัญชียาหลักแห่งชาติ"}
      ]
    },
    {
      "scheme": "SS",
      "limitations": [
        {"type": "network_hospital", "description": "รักษาได้เฉพาะโรงพยาบาลในเครือข่าย"},
        {"type": "work_related", "description": "ไม่คุ้มครองการบาดเจ็บจากการทำงาน"}
      ]
    },
    {
      "scheme": "PR",
      "limitations": [
        {"type": "pre_existing", "description": "ไม่คุ้มครองโรคที่มีอยู่ก่อน"},
        {"type": "waiting_period", "description": "มีระยะเวลารอคอย"},
        {"type": "annual_limit", "description": "มีขีดจำกัดค่าใช้จ่ายต่อปี"}
      ]
    }
  ]
}

🏥 Hospital Network Master Data

โรงพยาบาลในเครือข่าย (Network Hospitals)

{
  "network_hospitals": [
    {
      "hospital_code": "13796",
      "name_th": "โรงพยาบาลค่ายธนรัชน์",
      "name_en": "Thanarat Camp Hospital",
      "province": "กาญจนบุรี",
      "level": "F2",
      "supported_schemes": ["CS", "UC", "SS", "LGO"],
      "is_main_contractor": true,
      "contract_start": "2024-01-01",
      "contract_end": "2026-12-31"
    }
  ]
}

🔗 Integration Points กับระบบอื่น

API Endpoints สำหรับการเชื่อมต่อ

{
  "api_endpoints": [
    {
      "system": "ระบบเวชระเบียนหลัก (1.2.1)",
      "endpoint": "/api/patient-rights",
      "method": "GET",
      "description": "ดึงข้อมูลสิทธิ์ของผู้ป่วย"
    },
    {
      "system": "ระบบห้องตรวจ (1.2.3)",
      "endpoint": "/api/validate-treatment",
      "method": "POST",
      "description": "ตรวจสอบสิทธิ์ก่อนการรักษา"
    },
    {
      "system": "ระบบเภสัชกรรม (1.2.13)",
      "endpoint": "/api/drug-coverage",
      "method": "GET",
      "description": "ตรวจสอบสิทธิ์การใช้ยา"
    },
    {
      "system": "ระบบการเงิน (1.2.14)",
      "endpoint": "/api/billing-rights",
      "method": "POST",
      "description": "ส่งข้อมูลสิทธิ์สำหรับการเก็บเงิน"
    }
  ]
}

Error Codes สำหรับการตรวจสอบสิทธิ์

{
  "error_codes": [
    {"code": "RV001", "message_th": "ไม่พบข้อมูลสิทธิ์", "message_en": "Rights not found", "severity": "error"},
    {"code": "RV002", "message_th": "สิทธิ์หมดอายุ", "message_en": "Rights expired", "severity": "warning"},
    {"code": "RV003", "message_th": "ไม่สามารถเชื่อมต่อระบบตรวจสอบได้", "message_en": "Cannot connect to validation system", "severity": "error"},
    {"code": "RV004", "message_th": "ข้อมูลไม่ครบถ้วน", "message_en": "Incomplete data", "severity": "warning"},
    {"code": "RV005", "message_th": "โรงพยาบาลไม่อยู่ในเครือข่าย", "message_en": "Hospital not in network", "severity": "error"},
    {"code": "RV006", "message_th": "เกินขีดจำกัดการใช้สิทธิ์", "message_en": "Rights limit exceeded", "severity": "warning"}
  ]
}

📋 Check List การติดตั้ง

Initial Setup

  • นำเข้า Master Data ทั้งหมดลงในฐานข้อมูล
  • ตั้งค่า API Integration กับ NHSO, SSO, CGD
  • ติดตั้ง SSL Certificates สำหรับการเชื่อมต่อ
  • สร้าง Database Tables สำหรับ Caching
  • ทดสอบการเชื่อมต่อกับระบบภายนอก

Validation Configuration

  • ตั้งค่า Timeout และ Retry Logic
  • กำหนด Cache Expiration Time
  • สร้าง Error Handling และ Logging
  • ทดสอบ Fallback Mechanism
  • Validate Response Format จากแต่ละ Provider

Security & Compliance

  • เข้ารหัสการเชื่อมต่อ (TLS 1.2+)
  • จัดการ API Keys และ Certificates
  • Implement Rate Limiting
  • ตั้งค่า Audit Trail
  • ตรวจสอบ PDPA Compliance

Performance Optimization

  • Implement Caching Strategy
  • Optimize Database Queries
  • Setup Load Balancing
  • Monitor API Response Times
  • Create Performance Dashboards

หมายเหตุ: เอกสารนี้จัดทำขึ้นเพื่อใช้ในการพัฒนาระบบตรวจสอบสิทธิ และต้องได้รับการอนุมัติจากฝ่ายบริหารก่อนนำไปใช้งาน