Skip to content

LIS Reports (تقارير المختبر)

The LIS Reports module provides six analytical endpoints covering laboratory workload, turnaround times, test volumes, revenue, quality control performance, and abnormal result rates.

API Endpoints

MethodEndpointDescriptionPermission
GET/api/lis/reports/workloadWorkload summary by section/technicianlis.reports.view
GET/api/lis/reports/turnaround-timeAverage TAT per investigation/sectionlis.reports.view
GET/api/lis/reports/test-volumeDaily test volume with breakdownlis.reports.view
GET/api/lis/reports/revenueRevenue summary from invoiceslis.reports.view
GET/api/lis/reports/qc-summaryQC pass/fail rateslis.reports.view
GET/api/lis/reports/abnormalsAbnormal result rates and top testslis.reports.view

Common Query Parameters

All report endpoints accept these required parameters:

ParameterTypeRequiredDescription
fromdate (Y-m-d)yesReport start date
todate (Y-m-d)yesReport end date
branch_idintegernoFilter by branch (except QC summary)

Report Descriptions

Workload Summary

Returns test workload breakdown by lab section and technician for the given period.

bash
curl -G /api/lis/reports/workload \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-02-01" \
  -d "to=2026-02-28" \
  -d "branch_id=1"
dart
final response = await dio.get('/api/lis/reports/workload', queryParameters: {
  'from': '2026-02-01',
  'to': '2026-02-28',
  'branch_id': 1,
});

Turnaround Time

Returns average turnaround time per investigation and section, comparing actual TAT against the configured target (tat_hours).

bash
curl -G /api/lis/reports/turnaround-time \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-02-01" \
  -d "to=2026-02-28"
dart
final response = await dio.get('/api/lis/reports/turnaround-time', queryParameters: {
  'from': '2026-02-01',
  'to': '2026-02-28',
});

Test Volume

Returns daily test volume with breakdown by request source (walk_in, in_patient, emergency, external) and priority (routine, urgent, stat).

bash
curl -G /api/lis/reports/test-volume \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-02-01" \
  -d "to=2026-02-28"
dart
final response = await dio.get('/api/lis/reports/test-volume', queryParameters: {
  'from': '2026-02-01',
  'to': '2026-02-28',
});

Revenue Summary

Returns lab revenue from invoices with daily breakdown, including subtotals, discounts, insurance amounts, and patient amounts.

bash
curl -G /api/lis/reports/revenue \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-02-01" \
  -d "to=2026-02-28" \
  -d "branch_id=1"
dart
final response = await dio.get('/api/lis/reports/revenue', queryParameters: {
  'from': '2026-02-01',
  'to': '2026-02-28',
  'branch_id': 1,
});

QC Summary

Returns quality control pass/fail/warning rates per investigation for the given period.

bash
curl -G /api/lis/reports/qc-summary \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-02-01" \
  -d "to=2026-02-28"
dart
final response = await dio.get('/api/lis/reports/qc-summary', queryParameters: {
  'from': '2026-02-01',
  'to': '2026-02-28',
});

Abnormal Results

Returns abnormal result rates and the top investigations with the highest abnormal percentages.

bash
curl -G /api/lis/reports/abnormals \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-02-01" \
  -d "to=2026-02-28" \
  -d "branch_id=1"
dart
final response = await dio.get('/api/lis/reports/abnormals', queryParameters: {
  'from': '2026-02-01',
  'to': '2026-02-28',
  'branch_id': 1,
});

Financial Reports

Three additional financial report endpoints for deeper analytics on commissions, insurance, and external lab financials.

MethodEndpointDescriptionPermission
GET/api/lis/reports/doctor-commissionsDoctor commission analyticslis.reports.doctor-commissions
GET/api/lis/reports/insurance-claimsInsurance claims analyticslis.reports.insurance-claims
GET/api/lis/reports/external-labs-financialExternal lab financial analyticslis.reports.external-labs-financial

Doctor Commissions Report

Returns commission data grouped by doctor, month, or test.

ParameterTypeRequiredDescription
fromdateyesStart date
todateyesEnd date
group_bystringnodoctor (default), month, test
doctor_idintegernoFilter by doctor
statusstringnoFilter by commission status
bash
curl -G /api/lis/reports/doctor-commissions \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-01-01" \
  -d "to=2026-03-31" \
  -d "group_by=doctor"
dart
final response = await dio.get('/api/lis/reports/doctor-commissions', queryParameters: {
  'from': '2026-01-01',
  'to': '2026-03-31',
  'group_by': 'doctor',
});

Insurance Claims Report

Returns insurance claim data grouped by company, month, or patient.

ParameterTypeRequiredDescription
fromdateyesStart date
todateyesEnd date
group_bystringnocompany (default), month, patient
contract_idintegernoFilter by insurance contract
statusstringnoFilter by invoice status
bash
curl -G /api/lis/reports/insurance-claims \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-01-01" \
  -d "to=2026-03-31" \
  -d "group_by=company"
dart
final response = await dio.get('/api/lis/reports/insurance-claims', queryParameters: {
  'from': '2026-01-01',
  'to': '2026-03-31',
  'group_by': 'company',
});

External Labs Financial Report

Returns external lab financial data grouped by lab, month, or test.

ParameterTypeRequiredDescription
fromdateyesStart date
todateyesEnd date
group_bystringnolab (default), month, test
external_lab_idintegernoFilter by external lab
directionstringnooutbound or inbound
bash
curl -G /api/lis/reports/external-labs-financial \
  -H "Authorization: Bearer {token}" \
  -d "from=2026-01-01" \
  -d "to=2026-03-31" \
  -d "group_by=lab"
dart
final response = await dio.get('/api/lis/reports/external-labs-financial', queryParameters: {
  'from': '2026-01-01',
  'to': '2026-03-31',
  'group_by': 'lab',
});

Business Rules

  1. Date range required -- All reports require from and to dates. to must be on or after from.
  2. Company scoping -- Reports are automatically scoped to the authenticated user's company.
  3. Branch filter -- All reports except QC summary support optional branch filtering.
  4. TAT calculation -- Turnaround time is measured from requested_at on the lab request to released_at on the result.
  5. QC rates -- Pass/warning/fail percentages are calculated from lab_qc_results grouped by investigation.

Moon ERP API Documentation