دليل المعالجين المعتمدين

SCFHS (الهيئة السعودية للتخصصات الصحية) · المرحلة 2

الحالة الحالية: Mock (development) التحقق من تراخيص المعالجين + مطابقة المرضى بالمختصين المناسبين.

المواصفات

ContractApp\Integrations\Contracts\TherapistDirectory
Mock adapterApp\Integrations\Mock\MockTherapistDirectory
Production adapter (مخطط)App\Integrations\Production\ScfhsAdapter
Driver keyconfig('sakeenah.integrations.therapist_directory.driver')
الوثائق الرسميةhttps://scfhs.org.sa

الميزات المعتمدة عليه

الاستخدام في الـ Code

use App\Integrations\Contracts\TherapistDirectory;

class MyController {
    public function __construct(
        private readonly TherapistDirectory $service,
    ) {}

    public function action() {
        // $this->service يتحقن تلقائياً (mock أو production)
        // حسب config('sakeenah.integrations.therapist_directory.driver')
    }
}

لرفع التكامل إلى Production

  1. اطلب credentials من الموزود الرسمي
    تواصل مع: SCFHS (الهيئة السعودية للتخصصات الصحية)
  2. ابنِ Production Adapter
    // app/Integrations/Production/ScfhsAdapter.php
    namespace App\Integrations\Production;
    
    use App\Integrations\Contracts\TherapistDirectory;
    use Illuminate\Support\Facades\Http;
    
    class ScfhsAdapter implements TherapistDirectory {
        public function __construct(
            private string $apiKey = config('sakeenah.integrations.therapist_directory.api_key'),
        ) {}
    
        // Implement all interface methods using real HTTP calls
        // Use Laravel's Http::withToken($this->apiKey)->post(...)
    }
  3. ضع credentials في .env
    THERAPIST_DIRECTORY_DRIVER=production
    THERAPIST_DIRECTORY_API_KEY=your_real_key_here
  4. اختبر — كتب feature test يستخدم mock أولاً، ثم integration test على staging
  5. أعد تشغيلphp artisan config:clear

موافقات + Compliance

المتعلق