nbrain-saudi-nphies-fhir
nbrain-saudi-nphies-fhir — Saudi CHI NPHIES HL7 FHIR R4 Claim & Clinical Validator + MCP Server
Engineered by Eng. Nadeem Mohamed Badr El-Din at NBrain (منظومة إن برين — nbra.in).
nbrain-saudi-nphies-fhir bridges Clinical Medical AI and Saudi Government Compliance by providing a fast, zero-dependency offline validator, synthetic test-bundle generator, and Model Context Protocol (MCP) server for Saudi Arabia's National Platform for Health and Insurance Exchange Services (نفيس — NPHIES, Council of Health Insurance CHI):
HL7 FHIR R4 (
4.0.1) Message Bundle Conformance: VerifiesBundle.type == "message",entry[0]asksa-message-header, NPHIESksa-message-eventscoding (claim-request,priorauth-request,eligibility-request), and mandatorynphies.saStructureDefinitionprofile URLs (ksa-institutional-claim,ksa-oral-claim,ksa-professional-claim,ksa-vision-claim).Saudi National ID (
1XXXXXXXXX) & Iqama (2XXXXXXXXX) Luhn Checksum Validator: Exact 10-digit Saudi Civil/Residency Modulo-10 validation.Clinical Radiology, ICD-10-AM & Dental FDI (
11–48/51–85) Coding Checks: Catches missingICD-10-AMdiagnoses, invalid dental FDI tooth numbers onoral-claimbundles, and missingPatient/Organization/Coveragereferences before NPHIES sandbox submission.Zero-Drift
Decimal(SAR) Claim Line Reconciliation: Audits everyClaim.item(quantity × unitPrice × factor + tax == net) againstClaim.total.valueto prevent financial rejection errors (BV-00142).
Try Live in Browser (Zero Signup)
Related MCP server: Claims Quality MCP Server
Run Tests
PYTHONPATH=src python -m unittest discover -s tests -vTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Validate ZUGFeRD, Factur-X, and XRechnung XML invoices (EN 16931, BR-DE) and German Leitweg-IDs.
Ferramentas para validar documentos TISS e consultar TUSS, operadoras e dados da ANS.
Validates Luhn, IBAN, ISBN, EAN/UPC, SWIFT/BIC, and EU VAT checksums and formats.
Validate Peppol UBL, XRechnung, CII and Factur-X/ZUGFeRD e-invoices against EN16931 rules.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables progressive discovery and management of FHIR healthcare resources through intent-based grouping, with support for creating/validating resources, converting between formats, and transforming medical PDFs to FHIR DocumentReference resources.-
- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI clients to validate healthcare claims data quality by running completeness, integrity, and temporal checks on CSV files via five callable tools, including profiling and full scans.-
- AlicenseNot gradedqualityDmaintenanceEnables healthcare systems to parse HL7 v2 messages, convert them to FHIR R4 Bundles, validate FHIR resources, and detect/govern PHI with HIPAA, EU MDR, and GDPR compliance evidence for AI governance.MIT
- AlicenseAqualityBmaintenanceEnables developers to diagnose why FSE 2.0 CDA2 documents are rejected by validating locally, explaining schematron/XSD errors, looking up code systems, and generating synthetic sample documents.415 npmMIT