← Back to AAI for MerusCase

Pending Records

Two modes. Firm-wide: every copy service order across the firm, separated into PENDING and OVERDUE. Case-specific: every order on one file, with completed history. Surfaces the records you subpoenaed weeks ago, never received, and probably need before a hearing this Friday.

The order IDs, case references, and dates in this page are fictitious demonstration data. Your install runs against your real copy service orders.

On this page

What it is

At the prompt, firm-wide:

aaicase> pending records
aaicase> outstanding subpoenas
aaicase> record requests

Or case-specific:

aaicase> show records on Doe
aaicase> copy service orders for [CASE-ID]

About fifteen seconds later you have a list of every outstanding records request — sorted by how overdue they are — with the order ID, the case it belongs to, the date the records were needed by, and how many days past that date you are.

Two modes — firm-wide vs. case-specific

Firm-wideCase-specific
TriggerNo case name in the commandCase name or ID present
ShowsOverdue + pending across all open casesAll orders on one case, including completed history
CadenceWeekly — a Friday firm-management runPer-case — before any hearing or pre-trial
Sorts byDays overdue (worst first)Status (pending first), then date

The two modes share one fetch (/copyServiceOrders/index) and one set of status-ID parsing — the difference is just whether the filter is by case_file_id or across everything.

How it runs (under the hood)

The skill fetches at most two endpoints:

/copyServiceOrders/index  → every copy service order
/caseFiles/view/[CASE-ID] → case header (case-specific mode only)

Orders endpoint is required — the skill stops with an error if it fails. The case view is optional in case-specific mode; if it fails, the output uses the bare case ID for the header.

Everything lands in a per-run mktemp -d directory locked to chmod 700, deleted at the end.

The skill uses the documented status IDs (1001 Created, 1002 Submitted, 1003 Acknowledged, 1004 Complete, 1007 Canceled) and the documented record type IDs — not runtime discovery. The IDs are stable across Merus versions and live in reference/api-reference.md.

Order statuses and what they mean

Status IDStatusMeaning
1001CreatedOrder drafted but not yet submitted to the copy service vendor.
1002SubmittedSent to the vendor; awaiting acknowledgment.
1003AcknowledgedVendor received the order and is processing it.
1004CompleteRecords received. Order is done.
1007CanceledOrder was canceled (and won’t be filled).

“Pending” in this skill’s vocabulary means statuses 1001, 1002, and 1003 collectively — anything that hasn’t arrived yet and hasn’t been canceled.

Record types

Type IDRecord Type
1001Medical
1002Billing
1003Psychiatric
1004Wage
1005Employment

The skill labels each order with its record type so the attorney can scan for what’s missing without reading individual order descriptions.

Overdue detection

An order is overdue if:

The skill computes days-overdue as (now - date_needed_by) / 86400, rounds to the nearest day, and shows that number prominently in the output. Orders without a date_needed_by set are pending but not technically overdue — they show under PENDING (not yet overdue) with a note that no needed-by date was set, which itself is a flag worth fixing.

The skill does not auto-categorize orders “X days from being overdue” — orders are either overdue or not. The attorney runs the report; the line is bright.

Pre-hearing conflict detection

Records still pending the week of a hearing is one of the most common continuance triggers. The skill flags this explicitly — for any pending order on a case with an upcoming event within 14 days, the order line gets a hearing-conflict note.

This pairs with prep for hearing, which surfaces pending records as a gap flag on the courthouse brief. The two skills detect the same situation from different angles — pending records is firm-wide; prep-hearing is per-case before-court — and the attorney runs whichever fits the current moment.

The flag wording on a pre-hearing conflict:

Order [#] still pending. Hearing on case [name] in 11 days. Consider motion to compel or continuance request before the hearing date.

Firm-wide example output

RECORD REQUESTS — Firm-wide
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Total orders:   42
Pending:        14
Overdue:         5

OVERDUE (5 orders past needed-by date):

   Order [#]  | Doe, Jane v. Sample Co.       | Medical    | Needed 2026-04-12 | 45 days overdue
   Order [#]  | Roe, Maria v. Sample Inc.     | Wage       | Needed 2026-04-19 | 38 days overdue
   Order [#]  | Sample, Alex v. Sample Co.    | Medical    | Needed 2026-05-01 | 26 days overdue
   Order [#]  | Doe, Jane v. Sample Co.       | Billing    | Needed 2026-05-08 | 19 days overdue
   Order [#]  | Sample, Lee v. Sample Logist. | Employment | Needed 2026-05-13 | 14 days overdue

PENDING (9 orders, not yet overdue):

   Order [#]  | Doe, John v. Sample Foods     | Medical    | Needed 2026-06-04
   Order [#]  | Roe, Maria v. Sample Inc.     | Medical    | Needed 2026-06-12
   Order [#]  | Sample, Pat v. Sample Mfg.    | Psychiatric| Needed 2026-06-20
   Order [#]  | Doe, Jane v. Sample Co.       | Employment | Needed (none set) ← no date set
   [...]

PRE-HEARING CONFLICTS:

   ⚠ Order [#] (Medical, 45 days overdue) — hearing on Doe, Jane in
     11 days. Motion to compel or continuance.
   ⚠ Order [#] (Wage, 38 days overdue) — MSC on Roe, Maria in 5 days.
     Records may not arrive in time.

NEXT STEPS:
  1. Follow up with copy service vendor on the 5 overdue orders
  2. File motion to compel on the two pre-hearing conflicts
  3. Set needed-by date on Doe Employment order

Case-specific example output

RECORD REQUESTS — Doe, Jane v. Sample Co. (#[FILE-#])
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Total orders: 6 (3 pending, 2 complete, 1 canceled)

PENDING (3):

   Order [#]  | Medical from Dr. Sample          | Needed 2026-04-12 | OVERDUE 45d
   Order [#]  | Billing from Sample Medical Grp. | Needed 2026-05-08 | OVERDUE 19d
   Order [#]  | Employment from HR (Sample Co.)  | Needed (none set) | (no date)

COMPLETED (2):

   Order [#]  | Medical from Dr. Roe          | Completed 2026-03-22 | 47 pages received
   Order [#]  | Wage from Sample Insurance Co.| Completed 2026-02-15 | wage statement

CANCELED (1):

   Order [#]  | Wage from prior employer     | Canceled — wrong employer

FLAGS:

   ⚠ 2 orders overdue — follow up with copy service vendor
   ⚠ Hearing in 11 days; overdue medical records may not arrive
     before the hearing. Consider motion to compel.
   ⚠ Order [#] has no needed-by date set — fix in Merus

NEXT STEPS:
  1. Phone follow-up: copy service vendor on the 2 overdue orders
  2. Draft motion to compel for the Dr. Sample medical records
  3. Set needed-by date on the Employment order

Suggested actions per finding

The skill never auto-acts; it surfaces and suggests:

FindingSuggested action
Overdue orderFollow up with copy service vendor. The skill offers to create a task on the case.
Pre-hearing conflictDraft a motion to compel or request continuance. Pair with draft a letter for the demand portion.
Completed order with no linked activityRecords received but may not be filed to the case yet — check uploads via audit case.
Order with no needed-by dateFix in Merus — without a needed-by date, overdue detection can’t work.
All clear for upcoming hearing“[OK] All records received for hearing on [date]” — the good case.

Troubleshooting

“0 orders” on a firm I know subpoenas regularly

The /copyServiceOrders/index endpoint may not be enabled on the API token, or the firm may track records requests outside the Merus copy service module (a homegrown spreadsheet, a third-party copy service portal). If the endpoint returns empty, this skill can’t see what you don’t store in Merus.

Records received but still showing pending

The copy service vendor delivered the records, but no one updated the order status in Merus to 1004 Complete. Update the status; re-run the skill.

Overdue counter shows 0 days on a clearly old order

The date_needed_by field is empty. The skill can only flag overdue if a needed-by date was set. Add the date in Merus or treat the order as pending-without-date in the flags section.

Wrong record type label

The record-type IDs in the API may have shifted on some Merus versions, or your firm uses custom types. The mapping (1001 Medical, 1002 Billing, etc.) is documented and stable; if you’re seeing a mismatch, check reference/api-reference.md for the canonical IDs.

Pre-hearing conflict flag fires on a continued hearing

The flag uses the next event on the case. If a hearing was continued, the event may have been updated to the new date or left at the old date depending on the firm’s calendar discipline. The skill uses what’s in /events — verify against the Merus UI for the most current date.

Part of AAI for MerusCase — code-guarded AI case intelligence for California Workers’ Comp attorneys.