مطالبات التأمين
NPHIES — CCHI · المرحلة 1
الحالة الحالية:
Mock (development)
فحص أهلية التغطية + تقديم مطالبات الجلسات تلقائياً لشركات التأمين الصحي.
المواصفات
| Contract | App\Integrations\Contracts\InsuranceClaims |
|---|---|
| Mock adapter | App\Integrations\Mock\MockNphies |
| Production adapter (مخطط) | App\Integrations\Production\NphiesAdapter |
| Driver key | config('sakeenah.integrations.insurance.driver') |
| الوثائق الرسمية | https://nphies.sa/integration |
الميزات المعتمدة عليه
insurance_billingeligibility_check
الاستخدام في الـ Code
use App\Integrations\Contracts\InsuranceClaims;
class MyController {
public function __construct(
private readonly InsuranceClaims $service,
) {}
public function action() {
// $this->service يتحقن تلقائياً (mock أو production)
// حسب config('sakeenah.integrations.insurance.driver')
}
}
لرفع التكامل إلى Production
-
اطلب credentials من الموزود الرسمي
تواصل مع: NPHIES — CCHI -
ابنِ Production Adapter
// app/Integrations/Production/NphiesAdapter.php namespace App\Integrations\Production; use App\Integrations\Contracts\InsuranceClaims; use Illuminate\Support\Facades\Http; class NphiesAdapter implements InsuranceClaims { public function __construct( private string $apiKey = config('sakeenah.integrations.insurance.api_key'), ) {} // Implement all interface methods using real HTTP calls // Use Laravel's Http::withToken($this->apiKey)->post(...) } -
ضع credentials في .env
INSURANCE_DRIVER=production INSURANCE_API_KEY=your_real_key_here - اختبر — كتب feature test يستخدم mock أولاً، ثم integration test على staging
-
أعد تشغيل —
php artisan config:clear
موافقات + Compliance
- تحقق من شروط الموزود الرسمي (في الـ docs URL أعلاه)
- وثّق DPA (Data Processing Agreement) موقّع
- أضف الموزود إلى قائمة الـ subprocessors المنشورة للمستخدمين
- إذا الموزود يخزّن PHI، تأكد أنه ضمن السعودية (data residency)