Skip to main content

Najeeb Pre-auth as a Service

Najeeb Pre-auth as a Service is a comprehensive pre-authorization processing solution designed to streamline and automate the pre-authorization workflow for insurance companies in the Kingdom of Saudi Arabia.

Service Model

This Service enables the utilization of the AI Engine Capabilities witout having to store any sensitive data outside the Insurance Company Network as all the data submitted is processed Ephemeraly.

Service Description

Najeeb Pre-auth as a Service provides a seamless API integration that enables insurance companies to submit pre-authorization requests from their core systems and receive processed results in real-time. The service handles the entire pre-authorization lifecycle, from initial request submission to final approval or rejection, with all processing happening ephemerally through the API gateway offered by ELM.

Key Features

  • Real-time Processing: Receive instant responses to pre-authorization requests
  • Ephemeral Data Processing: All data is processed temporarily and securely through the ELM API gateway
  • Automated Validation: Built-in validation for medical codes, provider information, and patient eligibility
  • Comprehensive Coverage: Support for all types of medical procedures and services
  • KSA Compliance: Fully compliant with Saudi healthcare regulations and standards
  • Scalable Architecture: Handles high volumes of requests with reliable performance
this is a ligtweigt version of the AI engine Capabilities

Due to this, some Capabilities of the Full Version of the AI Engine will be Dropped under this request like

  • Policy and benefits validation
  • Contractual rejections Due to the lack of Price List Information
  • Patient History Checking
  • Service Frequescny checking
  • member Data Consistancy checks

How It Works

  1. Request Submission: Your core system sends pre-authorization data to the Najeeb API
  2. Processing: The request is processed through the ELM API gateway with ephemeral data handling
  3. Validation: Automated validation of medical codes, provider credentials, and patient eligibility
  4. Response: Processed result is returned to your system with approval, rejection, or additional requirements

Requirements Prior to Integration

Before integrating with Najeeb Pre-auth as a Service, ensure you have the following:

Technical Requirements

  1. API Access Credentials

    • Valid Client ID and Client Secret provided by Najeeb
    • Access to the ELM API gateway endpoint
    • Network connectivity to the Najeeb API infrastructure
  2. System Capabilities

    • Ability to make HTTPS REST API calls
    • Support for JSON request/response format
    • Error handling and retry logic implementation
    • Secure credential storage
  3. Data Requirements

    • Patient information (no personaly identifiable data is needed, insurance details)
    • encounter information (in-patient, dates, refferal ....)
    • Provider information (provider type)
    • Service details (Medical codes, procedure descriptions)
    • Diagnosis codes (ICD-10 format)

Business Requirements

  1. Insurance Company Registration

    • Valid insurance company license in KSA
    • Active provider network agreements
    • Compliance with KSA healthcare regulations
  2. Integration Agreement

    • Signed service agreement with Najeeb
    • Defined service level agreements (SLAs)
    • Support and maintenance terms
  3. Testing Environment

    • Access to sandbox/test environment for integration testing
    • Test data and scenarios prepared
    • UAT (User Acceptance Testing) plan

Data Preparation

Ensure your system can provide:

  • Patient Data: date of birth, gender, martial status, insurance policy details
  • Provider Data: type, specialties
  • Service Data: Medical procedure codes (CPT, HCPCS), descriptions, quantities
  • Diagnosis Data: ICD-10 diagnosis codes
  • Authorization Details: Requested service date, urgency level, clinical notes, dates

System Architecture

The following diagram illustrates the system architecture and data flow for Najeeb Pre-auth as a Service:

Najeeb Pre-auth System Architecture

Architecture Components

  1. Insurance Company Core System

    • Your internal system that initiates pre-authorization requests
    • Handles business logic and data preparation
    • Manages API integration and response handling
  2. ELM API Gateway

    • Provides secure API gateway services
    • Handles authentication and authorization
    • Manages routing and load balancing
    • Ensures ephemeral data processing
    • handles billing and rate limiting
  3. Najeeb Pre-auth Service

    • Core processing engine for pre-authorization requests
    • Medical code validation and mapping
    • Provider and patient eligibility verification
    • Business rule engine for approval/rejection logic
  4. External Systems

    • Provider databases
    • Medical code repositories
    • Regulatory compliance systems
    • GPU Servers "TBD"

Integration Guide

The Najeeb Pre-auth as a Service integration is accomplished through a single API endpoint that receives pre-authorization data from your insurance company core system and returns the processed result. All data processing is ephemeral and handled through the ELM API gateway.

Base URL

https://api.elm.sa/najeeb/v1

Authentication

All API requests require OAuth 2.0 authentication. Include the access token in the Authorization header:

Authorization: Bearer YOUR_ACCESS_TOKEN

For authentication details, please contact Najeeb support.

API Endpoint

Submit Pre-authorization Request

POST /pre-auth/process

This endpoint receives pre-authorization data from your core system, processes it ephemerally through the ELM API gateway, and returns the processed result.

Request Headers
HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
Content-TypestringYesMust be application/json
X-Request-IDstringNoUnique request identifier for tracking
Request Body Parameters

The request body is a JSON object with the following structure:

{
"authorization_number": "string",
"advanced_preauth": "boolean",
"advanced_preauth_status": "string",
"related_authorization_number": "string",
"medical_provider_type": "string",
"member_dob": "string",
"member_gender": "string",
"marital_status": "string",
"is_vip": "boolean",
"policy_start_date": "string",
"addition_date": "string",
"treatment_date": "string",
"request_date": "string",
"hcp_appointed_flag": "boolean",
"hcp_moh_flag": "boolean",
"claim_type": "string",
"claim_sub_type": "string",
"is_emergency": "boolean",
"is_maternity": "boolean",
"is_new_born": "boolean",
"is_referral": "boolean",
"diagnoses": ["object"],
"items": ["object"],
"doctor_speciality": "string",
"approval_remarks": "string",
"additional_remarks": "string",
"currency": "string",
"currency_rate": "number",
"provider_system_id": "string",
"provider_comment": "string",
"encounter_status": "string",
"encounter_start_date": "string",
"encounter_end_date": "string",
"encounter_arrival_code": "string",
"encounter_department": "string",
"encounter_death_cause": "string",
"encounter_admit_source": "string",
"encounter_length_of_stay": "string",
"encounter_admission": "string",
"encounter_discharge": "string",
"supporting_info": ["object"]
}
Parameter Details
Root Level Parameters
ParameterTypeRequiredDescriptionAccepted Values
authorization_numberstringNoPre-existing authorization number for related requestsAlphanumeric string
advanced_preauthbooleanNoFlag indicating if this is an advanced pre-authorizationtrue, false
advanced_preauth_statusstringNoStatus of advanced pre-authorizationEnum: ACCEPTED, REJECTED, PENDING
related_authorization_numberstringNoRelated authorization number for linked requestsAlphanumeric string
medical_provider_typestringYesType of medical providerEnum: CLINIC, HOSPITAL, PHARMACY, LABORATORY, RADIOLOGY
member_dobstringYesMember date of birthISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
member_genderstringYesMember genderEnum: MALE, FEMALE
marital_statusstringNoMember marital statusEnum: SINGLE, MARRIED, DIVORCED, WIDOWED
is_vipbooleanNoFlag indicating VIP member statustrue, false
policy_start_datestringYesInsurance policy start dateISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
addition_datestringYesDate when member was added to policyISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
treatment_datestringYesProposed treatment/service dateISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
request_datestringYesDate of pre-authorization requestISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
hcp_appointed_flagbooleanNoFlag indicating if HCP is appointedtrue, false
hcp_moh_flagbooleanNoFlag indicating if HCP is MOH registeredtrue, false
claim_typestringYesType of claimEnum: PROFESSIONAL, INSTITUTIONAL
claim_sub_typestringYesSub-type of claimEnum: OUT_PATIENT, IN_PATIENT, EMERGENCY
is_emergencybooleanNoFlag indicating emergency casetrue, false
is_maternitybooleanNoFlag indicating maternity casetrue, false
is_new_bornbooleanNoFlag indicating new born casetrue, false
is_referralbooleanNoFlag indicating referral casetrue, false
diagnosesarrayYesArray of diagnosis objectsMinimum 1 diagnosis required
itemsarrayYesArray of service/item objectsMinimum 1 item required
doctor_specialitystringNoDoctor's medical specialtyString (e.g., "Cardiology", "Orthopedics")
approval_remarksstringNoRemarks for approvalFree text, max 2000 characters
additional_remarksstringNoAdditional remarks or notesFree text, max 2000 characters
currencystringNoCurrency codeISO 4217 format (default: SAR)
currency_ratenumberNoCurrency exchange rateDecimal, default: 1
provider_system_idstringNoProvider system identifierAlphanumeric string
provider_commentstringNoProvider commentsFree text, max 2000 characters
encounter_statusstringNoEncounter statusEnum: active, completed, cancelled
encounter_start_datestringNoEncounter start dateISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
encounter_end_datestringNoEncounter end dateISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
encounter_arrival_codestringNoEncounter arrival codeAlphanumeric string (e.g., "A01")
encounter_departmentstringNoEncounter departmentString (e.g., "Cardiology")
encounter_death_causestringNoCause of death (if applicable)Free text
encounter_admit_sourcestringNoAdmission sourceString (e.g., "Referral", "Emergency")
encounter_length_of_staystringNoLength of stayString (e.g., "5 days")
encounter_admissionstringNoAdmission detailsFree text
encounter_dischargestringNoDischarge detailsFree text
supporting_infoarrayNoArray of supporting information objectsSee Supporting Info Object below
Diagnosis Object
ParameterTypeRequiredDescriptionAccepted Values
typestringYesType of diagnosisEnum: primary, secondary
codestringYesICD-10 diagnosis codeValid ICD-10 code format
namestringYesDiagnosis name/descriptionString, max 500 characters
Item Object
ParameterTypeRequiredDescriptionAccepted Values
claimed_quantitynumberYesQuantity of items claimedInteger, minimum 1
claimed_amountnumberYesClaimed amount per unitDecimal, minimum 0, 2 decimal places
durationstringNoDuration of treatmentString (e.g., "10 days")
admission_datestringNoAdmission date (for in-patient)ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
frequencystringNoFrequency of serviceString (e.g., "10 times", "daily")
discharge_datestringNoDischarge date (for in-patient)ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
justificationstringNoMedical justification for serviceFree text, max 2000 characters
erp_item_idstringNoERP system item identifierAlphanumeric string
service_codestringYesService code identifierAlphanumeric string
service_descriptionstringYesService descriptionString, max 500 characters
nphies_codestringNoNPHIES codeAlphanumeric string format
nphies_typestringNoNPHIES type/categoryString (e.g., "UNMAPPED CATEGORY")
service_typestringNoService type/categoryString (e.g., "UNMAPPED CATEGORY")
tooth_idstringNoTooth identifier (for dental services)Alphanumeric string (e.g., "1001")
Supporting Info Object
ParameterTypeRequiredDescriptionAccepted Values
sequence_numbernumberYesSequence number for orderingInteger, minimum 1
typestringYesType of supporting informationEnum: MEDICAL_RECORD, LAB_RESULT, IMAGING, PRESCRIPTION, OTHER
codestringNoCode identifierAlphanumeric string
valuestringNoValue or descriptionFree text
unitstringNoUnit of measurementString (e.g., "mmHg", "mg/dL")
start_datestringNoStart date of informationISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
end_datestringNoEnd date of informationISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
value_urlstringNoURL to supporting documentValid URL format
Enums

Advanced Pre-auth Status Enum:

  • ACCEPTED - Advanced pre-authorization accepted
  • REJECTED - Advanced pre-authorization rejected
  • PENDING - Advanced pre-authorization pending

Medical Provider Type Enum:

  • CLINIC - Clinic
  • HOSPITAL - Hospital
  • PHARMACY - Pharmacy
  • LABORATORY - Laboratory
  • RADIOLOGY - Radiology center

Member Gender Enum:

  • MALE - Male
  • FEMALE - Female

Marital Status Enum:

  • SINGLE - Single
  • MARRIED - Married
  • DIVORCED - Divorced
  • WIDOWED - Widowed

Claim Type Enum:

  • PROFESSIONAL - Professional services
  • INSTITUTIONAL - Institutional services

Claim Sub Type Enum:

  • OUT_PATIENT - Outpatient services
  • IN_PATIENT - Inpatient services
  • EMERGENCY - Emergency services

Diagnosis Type Enum:

  • primary - Primary diagnosis
  • secondary - Secondary diagnosis

Encounter Status Enum:

  • active - Active encounter
  • completed - Completed encounter
  • cancelled - Cancelled encounter

Supporting Info Type Enum:

  • MEDICAL_RECORD - Medical record
  • LAB_RESULT - Laboratory result
  • IMAGING - Imaging study
  • PRESCRIPTION - Prescription
  • OTHER - Other supporting information
Example Request
curl -X POST "https://api.elm.sa/najeeb/v1/pre-auth/process" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Request-ID: req-123456789" \
-d '{
"authorization_number": "AU-12345",
"advanced_preauth": false,
"advanced_preauth_status": "ACCEPTED",
"related_authorization_number": "AU-12344",
"medical_provider_type": "CLINIC",
"member_dob": "1990-01-15T00:00:00.000Z",
"member_gender": "MALE",
"marital_status": "SINGLE",
"is_vip": false,
"policy_start_date": "2024-01-01T00:00:00.000Z",
"addition_date": "2024-01-01T00:00:00.000Z",
"treatment_date": "2024-02-15T10:00:00.000Z",
"request_date": "2024-01-16T10:04:20.346Z",
"hcp_appointed_flag": false,
"hcp_moh_flag": true,
"claim_type": "PROFESSIONAL",
"claim_sub_type": "OUT_PATIENT",
"is_emergency": false,
"is_maternity": false,
"is_new_born": false,
"is_referral": false,
"diagnoses": [
{
"type": "primary",
"code": "E40",
"name": "Kwashiorkor"
},
{
"type": "secondary",
"code": "Z24",
"name": "Need for immunisation against certain single viral diseases"
}
],
"items": [
{
"claimed_quantity": 1,
"claimed_amount": 100,
"duration": "10 days",
"admission_date": "2024-02-15T08:00:00.000Z",
"frequency": "10 times",
"discharge_date": "2024-02-25T18:00:00.000Z",
"justification": "Patient requires pharmacological stress echocardiography for cardiac assessment",
"erp_item_id": "16562",
"service_code": "FMCARS0008",
"service_description": "Pharmacological Stress Echocardiography",
"nphies_code": "55113-00-00",
"nphies_type": "UNMAPPED CATEGORY",
"service_type": "UNMAPPED CATEGORY",
"tooth_id": null
}
],
"doctor_speciality": "Cardiology",
"approval_remarks": "This is a test approval request",
"additional_remarks": "Patient has been experiencing chest pain and requires cardiac evaluation",
"currency": "SAR",
"currency_rate": 1,
"provider_system_id": "Provider System ID",
"provider_comment": "Provider Comment",
"encounter_status": "active",
"encounter_start_date": "2024-02-15T08:00:00.000Z",
"encounter_end_date": "2024-02-15T12:00:00.000Z",
"encounter_arrival_code": "A01",
"encounter_department": "Cardiology",
"encounter_death_cause": null,
"encounter_admit_source": "Referral",
"encounter_length_of_stay": "4 hours",
"encounter_admission": "Patient admitted for cardiac evaluation",
"encounter_discharge": "Patient discharged after successful evaluation",
"supporting_info": [
{
"sequence_number": 1,
"type": "MEDICAL_RECORD",
"code": "MR001",
"value": "Blood pressure reading: 120/80 mmHg",
"unit": "mmHg",
"start_date": "2024-01-01T00:00:00.000Z",
"end_date": "2024-12-31T23:59:59.000Z",
"value_url": "https://example.com/document.pdf"
}
]
}'

Response

Success Response

The API returns a processed result with approval, rejection, or conditional approval status.

Response Structure
{
"request_id": "string",
"authorization_number": "string",
"status": "string",
"decision_date": "string",
"approved_services": [
{
"code": "string",
"description": "string",
"quantity": "number",
"approved_quantity": "number",
"approved_cost": "number",
"coverage_percentage": "number"
}
],
"rejected_services": [
{
"code": "string",
"description": "string",
"rejection_reason": "string"
}
],
"conditions": [
{
"type": "string",
"description": "string",
"required_action": "string"
}
],
"authorization_valid_until": "string",
"notes": "string",
"processing_time_ms": "number"
}
Response Fields
FieldTypeDescription
request_idstringThe original request ID
authorization_numberstringUnique authorization number if approved
statusstringProcessing status (see Status Enum below)
decision_datestringDate and time of decision (ISO 8601)
approved_servicesarrayArray of approved service objects
rejected_servicesarrayArray of rejected service objects
conditionsarrayArray of conditions or requirements
authorization_valid_untilstringExpiration date of authorization (ISO 8601)
notesstringAdditional notes or comments
processing_time_msnumberProcessing time in milliseconds
Status Enum
  • approved - Request fully approved
  • partially_approved - Some services approved, others rejected
  • rejected - Request rejected
  • pending_review - Requires manual review
  • requires_additional_info - Additional information needed
Example Success Response
{
"request_id": "req-123456789",
"authorization_number": "AUTH-2024-001234",
"status": "approved",
"decision_date": "2024-01-16T10:30:00Z",
"approved_services": [
{
"code": "CPT-27447",
"description": "Total knee arthroplasty",
"quantity": 1,
"approved_quantity": 1,
"approved_cost": 50000.00,
"coverage_percentage": 80
}
],
"rejected_services": [],
"conditions": [
{
"type": "provider_verification",
"description": "Provider must verify patient identity before procedure",
"required_action": "Verify patient ID at time of service"
}
],
"authorization_valid_until": "2024-03-15T23:59:59Z",
"notes": "Authorization approved. Patient must present valid ID at time of service.",
"processing_time_ms": 1250
}

Error Responses

Error Response Structure

{
"error": {
"code": "string",
"message": "string",
"details": {
"field": "string",
"reason": "string",
"accepted_values": ["string"]
}
},
"request_id": "string",
"timestamp": "string"
}

Error Codes

Error CodeHTTP StatusDescriptionResolution
INVALID_REQUEST400Request validation failedCheck request parameters and format
MISSING_REQUIRED_FIELD400Required field is missingInclude all required fields
INVALID_FIELD_VALUE400Field value is invalidCheck accepted values and enums
INVALID_DATE_FORMAT400Date format is invalidUse ISO 8601 format with timezone (YYYY-MM-DDTHH:mm:ss.sssZ)
INVALID_SERVICE_CODE400Service code is invalid or not recognizedVerify service code format
INVALID_DIAGNOSIS_CODE400Diagnosis code is invalidUse valid ICD-10 format
INVALID_ENUM_VALUE400Enum value is not acceptedCheck enum values in documentation
INVALID_NPHIES_CODE400NPHIES code format is invalidVerify NPHIES code format
MISSING_DIAGNOSIS400At least one diagnosis is requiredInclude at least one primary diagnosis
MISSING_ITEMS400At least one item is requiredInclude at least one item in items array
INVALID_DIAGNOSIS_TYPE400Diagnosis type must be 'primary' or 'secondary'Use valid diagnosis type
UNAUTHORIZED401Authentication failedVerify access token
FORBIDDEN403Insufficient permissionsContact support for access
PROVIDER_NOT_FOUND404Provider not found or inactiveVerify provider information
POLICY_EXPIRED422Insurance policy has expiredVerify policy dates
POLICY_NOT_ACTIVE422Insurance policy is not activeCheck policy start date
SERVICE_NOT_COVERED422Service is not covered under policyReview policy coverage
INVALID_ENCOUNTER_STATUS422Encounter status is invalidUse valid encounter status
RATE_LIMIT_EXCEEDED429Too many requestsImplement rate limiting
INTERNAL_ERROR500Internal server errorRetry request or contact support
SERVICE_UNAVAILABLE503Service temporarily unavailableRetry after delay
Example Error Responses

Invalid Enum Value:

{
"error": {
"code": "INVALID_ENUM_VALUE",
"message": "Invalid medical provider type value",
"details": {
"field": "medical_provider_type",
"reason": "Value must be one of: CLINIC, HOSPITAL, PHARMACY, LABORATORY, RADIOLOGY",
"accepted_values": ["CLINIC", "HOSPITAL", "PHARMACY", "LABORATORY", "RADIOLOGY"]
}
},
"request_id": "req-123456789",
"timestamp": "2024-01-16T10:30:00Z"
}

Missing Required Field:

{
"error": {
"code": "MISSING_REQUIRED_FIELD",
"message": "Required field is missing",
"details": {
"field": "medical_provider_type",
"reason": "Medical provider type is required"
}
},
"request_id": "req-123456789",
"timestamp": "2024-01-16T10:30:00Z"
}

Invalid Date Format:

{
"error": {
"code": "INVALID_DATE_FORMAT",
"message": "Date format is invalid",
"details": {
"field": "member_dob",
"reason": "Date must be in ISO 8601 format with timezone (YYYY-MM-DDTHH:mm:ss.sssZ)",
"accepted_values": ["ISO 8601 format: 2024-01-15T10:04:20.346Z"]
}
},
"request_id": "req-123456789",
"timestamp": "2024-01-16T10:30:00Z"
}

Missing Diagnosis:

{
"error": {
"code": "MISSING_REQUIRED_FIELD",
"message": "At least one diagnosis is required",
"details": {
"field": "diagnoses",
"reason": "Diagnoses array must contain at least one diagnosis object with type 'primary'"
}
},
"request_id": "req-123456789",
"timestamp": "2024-01-16T10:30:00Z"
}

Missing Items:

{
"error": {
"code": "MISSING_REQUIRED_FIELD",
"message": "At least one item is required",
"details": {
"field": "items",
"reason": "Items array must contain at least one item object"
}
},
"request_id": "req-123456789",
"timestamp": "2024-01-16T10:30:00Z"
}

Data Processing

All data processing is ephemeral, meaning:

  • Data is processed temporarily through the ELM API gateway
  • No persistent storage of request data (except for audit logs)
  • Results are returned immediately after processing
  • Data is securely handled and encrypted in transit
  • Compliance with KSA data protection regulations

Rate Limits

  • Standard Tier: 100 requests per minute
  • Enterprise Tier: Custom limits based on agreement

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 99
X-RateLimit-Reset: 1642248000

Best Practices

  1. Date Formats: Use ISO 8601 format with timezone for all date fields (e.g., 2024-01-15T10:04:20.346Z)
  2. Diagnoses: Include at least one primary diagnosis; secondary diagnoses are optional but recommended
  3. Items: Ensure all required item fields are provided, especially service_code and service_description
  4. Error Handling: Implement retry logic with exponential backoff for transient errors
  5. Validation: Validate data before sending requests to avoid unnecessary API calls
  6. Caching: Cache authorization results when appropriate to reduce API calls
  7. Monitoring: Monitor response times and error rates
  8. Logging: Log all requests and responses for audit and debugging purposes
  9. Supporting Info: Include relevant supporting information (medical records, lab results) when available to improve approval chances

Next Steps