@wonsukchoi/crondex 0.20.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -30
- package/catalog.json +3052 -81
- package/jobs/ecommerce/affiliate-commission-payout-check.yaml +38 -0
- package/jobs/ecommerce/back-in-stock-notification-backlog-check.yaml +30 -0
- package/jobs/ecommerce/bundle-component-stock-mismatch-check.yaml +37 -0
- package/jobs/ecommerce/chargeback-fraud-risk-order-review.yaml +43 -0
- package/jobs/ecommerce/competitor-price-watch.yaml +60 -0
- package/jobs/ecommerce/economic-nexus-threshold-check.yaml +43 -0
- package/jobs/ecommerce/failed-payment-dunning-check.yaml +35 -0
- package/jobs/ecommerce/marketplace-listing-sync-drift-check.yaml +48 -0
- package/jobs/ecommerce/product-feed-health-check.yaml +35 -0
- package/jobs/ecommerce/purchase-order-overdue-check.yaml +32 -0
- package/jobs/ecommerce/storefront-ssl-domain-expiry-check.yaml +46 -0
- package/jobs/ecommerce/vip-tier-reclassification-check.yaml +55 -0
- package/jobs/ecommerce/wishlist-abandonment-check.yaml +37 -0
- package/jobs/fieldservice/maintenance-contract-renewal-check.yaml +36 -0
- package/jobs/fieldservice/parts-low-stock-reorder-check.yaml +29 -0
- package/jobs/fieldservice/tech-eta-no-show-check.yaml +32 -0
- package/jobs/fieldservice/tech-license-renewal-check.yaml +36 -0
- package/jobs/fieldservice/unpaid-invoice-aging-check.yaml +35 -0
- package/jobs/fieldservice/unresolved-callback-tracker.yaml +35 -0
- package/jobs/fieldservice/warranty-claim-expiry-check.yaml +35 -0
- package/jobs/finance/accounts-payable-aging-check.yaml +40 -0
- package/jobs/finance/bank-statement-reconciliation-check.yaml +40 -0
- package/jobs/finance/budget-vs-actual-variance-report.yaml +38 -0
- package/jobs/finance/contractor-1099-threshold-tracker.yaml +43 -0
- package/jobs/finance/credit-utilization-watch.yaml +40 -0
- package/jobs/finance/duplicate-payment-detection.yaml +43 -0
- package/jobs/finance/expense-report-compliance-check.yaml +46 -0
- package/jobs/finance/late-fee-interest-risk-check.yaml +43 -0
- package/jobs/finance/loan-covenant-compliance-check.yaml +37 -0
- package/jobs/finance/month-end-close-checklist-tracker.yaml +39 -0
- package/jobs/finance/multi-account-cash-position-rollup.yaml +45 -0
- package/jobs/finance/petty-cash-float-reconciliation.yaml +43 -0
- package/jobs/finance/quarterly-estimated-tax-calculator.yaml +66 -0
- package/jobs/finance/vendor-early-pay-discount-tracker.yaml +45 -0
- package/jobs/healthcare/appointment-slot-utilization-check.yaml +56 -0
- package/jobs/healthcare/claims-denial-resubmission-check.yaml +43 -0
- package/jobs/healthcare/clinical-supply-low-stock-check.yaml +30 -0
- package/jobs/healthcare/controlled-substance-inventory-reconciliation.yaml +42 -0
- package/jobs/healthcare/hipaa-access-log-audit.yaml +74 -0
- package/jobs/healthcare/patient-balance-collections-aging-check.yaml +41 -0
- package/jobs/healthcare/patient-immunization-schedule-check.yaml +41 -0
- package/jobs/healthcare/patient-portal-message-backlog-check.yaml +39 -0
- package/jobs/healthcare/patient-satisfaction-survey-tracking.yaml +59 -0
- package/jobs/healthcare/prescription-refill-request-backlog-check.yaml +38 -0
- package/jobs/healthcare/prior-authorization-expiry-check.yaml +53 -0
- package/jobs/healthcare/staff-cme-credit-tracking.yaml +41 -0
- package/jobs/healthcare/telehealth-session-issue-check.yaml +51 -0
- package/jobs/hr/aca-fte-threshold-monitor.yaml +44 -0
- package/jobs/hr/cobra-notification-deadline-tracker.yaml +47 -0
- package/jobs/hr/compliance-training-completion-check.yaml +41 -0
- package/jobs/hr/eeo1-filing-deadline-reminder.yaml +37 -0
- package/jobs/hr/handbook-acknowledgment-tracking.yaml +34 -0
- package/jobs/hr/headcount-budget-variance-check.yaml +37 -0
- package/jobs/hr/leave-of-absence-return-tracker.yaml +42 -0
- package/jobs/hr/org-chart-manager-drift-check.yaml +40 -0
- package/jobs/hr/pay-equity-band-outlier-check.yaml +58 -0
- package/jobs/hr/pto-year-end-use-it-or-lose-it-check.yaml +49 -0
- package/jobs/hr/retirement-plan-enrollment-deadline-check.yaml +40 -0
- package/jobs/hr/workers-comp-claim-status-check.yaml +42 -0
- package/jobs/legal/conflict-of-interest-check-tracker.yaml +38 -0
- package/jobs/legal/corporate-minute-book-completeness-check.yaml +31 -0
- package/jobs/legal/data-privacy-request-deadline-tracker.yaml +61 -0
- package/jobs/legal/entity-authority-document-expiry-check.yaml +37 -0
- package/jobs/legal/legal-document-retention-purge-review.yaml +39 -0
- package/jobs/legal/litigation-hold-acknowledgment-tracker.yaml +40 -0
- package/jobs/legal/non-compete-expiry-tracker.yaml +37 -0
- package/jobs/legal/outside-counsel-invoice-budget-check.yaml +37 -0
- package/jobs/legal/settlement-payment-schedule-tracker.yaml +34 -0
- package/jobs/legal/timekeeper-billable-hours-compliance-check.yaml +39 -0
- package/jobs/legal/trademark-infringement-watch.yaml +43 -0
- package/jobs/legal/vendor-coi-expiry-tracker.yaml +37 -0
- package/jobs/publishing/arc-review-copy-followup.yaml +35 -0
- package/jobs/publishing/isbn-registration-tracker.yaml +35 -0
- package/jobs/publishing/manuscript-deadline-tracker.yaml +34 -0
- package/jobs/publishing/permissions-clearance-tracker.yaml +36 -0
- package/jobs/publishing/print-run-reorder-threshold-check.yaml +32 -0
- package/jobs/publishing/rights-license-expiry-check.yaml +35 -0
- package/jobs/publishing/royalty-statement-due-check.yaml +33 -0
- package/jobs/realestate/capital-reserve-fund-threshold-check.yaml +32 -0
- package/jobs/realestate/eviction-notice-deadline-tracker.yaml +37 -0
- package/jobs/realestate/landlord-insurance-claim-status-check.yaml +35 -0
- package/jobs/realestate/lease-renewal-offer-window-check.yaml +35 -0
- package/jobs/realestate/maintenance-request-sla-check.yaml +39 -0
- package/jobs/realestate/move-in-move-out-inspection-tracker.yaml +35 -0
- package/jobs/realestate/rent-increase-notice-deadline-check.yaml +54 -0
- package/jobs/realestate/rent-roll-vacancy-loss-report.yaml +32 -0
- package/jobs/realestate/rental-license-renewal-check.yaml +35 -0
- package/jobs/realestate/security-deposit-return-deadline-check.yaml +38 -0
- package/jobs/realestate/tenant-application-review-backlog-check.yaml +35 -0
- package/jobs/realestate/tenant-renters-insurance-compliance-check.yaml +35 -0
- package/jobs/realestate/utility-billback-reconciliation-check.yaml +41 -0
- package/jobs/sales/champion-departure-watch.yaml +44 -0
- package/jobs/sales/closed-lost-reason-audit.yaml +42 -0
- package/jobs/sales/commission-payout-tracker.yaml +32 -0
- package/jobs/sales/contract-renewal-opportunity-tracker.yaml +28 -0
- package/jobs/sales/discount-approval-pending-check.yaml +31 -0
- package/jobs/sales/forecast-submission-compliance-check.yaml +42 -0
- package/jobs/sales/multi-year-renewal-escalation-tracker.yaml +31 -0
- package/jobs/sales/pipeline-hygiene-audit.yaml +26 -0
- package/jobs/sales/poc-trial-conversion-tracker.yaml +29 -0
- package/jobs/sales/referral-followup-tracker.yaml +40 -0
- package/jobs/sales/territory-coverage-gap-check.yaml +43 -0
- package/jobs/spa/appointment-no-show-tracker.yaml +46 -0
- package/jobs/spa/gift-card-expiry-check.yaml +35 -0
- package/jobs/spa/license-renewal-tracker.yaml +35 -0
- package/jobs/spa/membership-unused-session-expiry-check.yaml +35 -0
- package/jobs/spa/product-chemical-expiry-check.yaml +35 -0
- package/jobs/spa/retail-product-low-stock-check.yaml +26 -0
- package/jobs/spa/safety-inspection-due-reminder.yaml +33 -0
- package/jobs/telecom/circuit-outage-detection.yaml +38 -0
- package/jobs/telecom/circuit-provisioning-order-aging.yaml +36 -0
- package/jobs/telecom/cpe-firmware-update-tracker.yaml +45 -0
- package/jobs/telecom/link-capacity-threshold-alert.yaml +37 -0
- package/jobs/telecom/peering-transit-contract-renewal-check.yaml +36 -0
- package/jobs/telecom/service-ticket-churn-risk-review.yaml +56 -0
- package/jobs/telecom/sla-uptime-breach-tracker.yaml +36 -0
- package/lib/category-descriptions.js +4 -0
- package/lib/duplicates-allowlist.js +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
id: quarterly-estimated-tax-calculator
|
|
2
|
+
version: 1
|
|
3
|
+
name: Quarterly Estimated Tax Calculator
|
|
4
|
+
description: >
|
|
5
|
+
Calculates a suggested quarterly estimated tax payment from your
|
|
6
|
+
logged year-to-date income and a target tax rate, and warns as the
|
|
7
|
+
next IRS-style quarterly due date approaches. Use this if you're
|
|
8
|
+
self-employed or have untaxed income and want the actual dollar
|
|
9
|
+
amount worked out, not just a bare date reminder (see
|
|
10
|
+
tax-deadline-reminder for a generic multi-jurisdiction deadline list).
|
|
11
|
+
category: finance
|
|
12
|
+
tags: [tax, estimated-tax, quarterly, finance]
|
|
13
|
+
schedule: "0 9 * * *"
|
|
14
|
+
timezone: "UTC"
|
|
15
|
+
runner: shell
|
|
16
|
+
command: >
|
|
17
|
+
income_file={{income_ytd_csv}}; rate={{effective_tax_rate_pct}}; warn_days={{warn_days}};
|
|
18
|
+
[ -f "$income_file" ] || { echo "ERROR: $income_file not found"; exit 1; };
|
|
19
|
+
year=$(date +%Y);
|
|
20
|
+
ytd_income=$(awk -F, -v y="$year" 'NR>1 && $1 ~ "^"y"-" {sum+=$2} END{printf "%.2f", sum+0}' "$income_file");
|
|
21
|
+
owed=$(awk -v i="$ytd_income" -v r="$rate" 'BEGIN{printf "%.2f", i*(r/100)}');
|
|
22
|
+
echo "YTD income: \$$ytd_income | estimated tax owed so far ($rate%): \$$owed";
|
|
23
|
+
today=$(date +%s);
|
|
24
|
+
next_due="";
|
|
25
|
+
for d in {{q1_date}} {{q2_date}} {{q3_date}} {{q4_date}}; do
|
|
26
|
+
d_epoch=$(date -j -f %Y-%m-%d "$d" +%s 2>/dev/null || date -d "$d" +%s);
|
|
27
|
+
if [ "$d_epoch" -ge "$today" ]; then next_due="$d"; next_epoch="$d_epoch"; break; fi;
|
|
28
|
+
done;
|
|
29
|
+
if [ -n "$next_due" ]; then
|
|
30
|
+
days_left=$(( (next_epoch-today)/86400 ));
|
|
31
|
+
if [ "$days_left" -le "$warn_days" ]; then
|
|
32
|
+
echo "REMINDER: next estimated payment due $next_due (in $days_left day(s)) — suggested payment ~\$$owed based on YTD income";
|
|
33
|
+
else
|
|
34
|
+
echo "Next estimated payment due $next_due (in $days_left day(s))";
|
|
35
|
+
fi;
|
|
36
|
+
else
|
|
37
|
+
echo "No remaining estimated tax due dates configured for this year.";
|
|
38
|
+
fi
|
|
39
|
+
variables:
|
|
40
|
+
income_ytd_csv:
|
|
41
|
+
default: "./income-log.csv"
|
|
42
|
+
description: "CSV with header \"date,amount\" (date YYYY-MM-DD) — one row per income event, self-employment or 1099 income."
|
|
43
|
+
effective_tax_rate_pct:
|
|
44
|
+
default: 25
|
|
45
|
+
description: Combined effective rate (federal + self-employment + state, as applicable) to apply to YTD income for an estimate.
|
|
46
|
+
q1_date:
|
|
47
|
+
default: "2026-04-15"
|
|
48
|
+
description: Q1 estimated payment due date for the current tax year.
|
|
49
|
+
q2_date:
|
|
50
|
+
default: "2026-06-15"
|
|
51
|
+
description: Q2 estimated payment due date.
|
|
52
|
+
q3_date:
|
|
53
|
+
default: "2026-09-15"
|
|
54
|
+
description: Q3 estimated payment due date.
|
|
55
|
+
q4_date:
|
|
56
|
+
default: "2027-01-15"
|
|
57
|
+
description: Q4 estimated payment due date.
|
|
58
|
+
warn_days:
|
|
59
|
+
default: 14
|
|
60
|
+
description: Days before the next due date to start showing the reminder line.
|
|
61
|
+
compatible_agents: [generic, claude, codex]
|
|
62
|
+
notes: >
|
|
63
|
+
Zero-token, rough estimate only — not tax advice; confirm your actual
|
|
64
|
+
liability and safe-harbor rules with a tax professional. Default due
|
|
65
|
+
dates follow the typical US federal quarterly schedule; adjust for
|
|
66
|
+
your jurisdiction and update dates yearly.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
id: vendor-early-pay-discount-tracker
|
|
2
|
+
version: 1
|
|
3
|
+
name: Vendor Early-Pay Discount Tracker
|
|
4
|
+
description: >
|
|
5
|
+
Flags vendor invoices with an early-payment discount (like "2/10 net
|
|
6
|
+
30") whose discount window is about to close. Use this if you've ever
|
|
7
|
+
paid a bill on the regular due date and only afterward realized you
|
|
8
|
+
could've saved a couple percent by paying ten days earlier.
|
|
9
|
+
category: finance
|
|
10
|
+
tags: [accounts-payable, discounts, vendor-terms, finance]
|
|
11
|
+
schedule: "0 8 * * *"
|
|
12
|
+
timezone: "UTC"
|
|
13
|
+
runner: shell
|
|
14
|
+
command: >
|
|
15
|
+
file={{payables_terms_file}}; warn_days={{warn_days}};
|
|
16
|
+
[ -f "$file" ] || { echo "ERROR: $file not found"; exit 1; };
|
|
17
|
+
today=$(date +%s);
|
|
18
|
+
tail -n +2 "$file" | while IFS=, read -r vendor amount invoice_date discount_pct discount_days paid; do
|
|
19
|
+
[ "$paid" = "yes" ] && continue;
|
|
20
|
+
[ -z "$discount_days" ] && continue;
|
|
21
|
+
inv_epoch=$(date -j -f %Y-%m-%d "$invoice_date" +%s 2>/dev/null || date -d "$invoice_date" +%s);
|
|
22
|
+
window_epoch=$(( inv_epoch + discount_days*86400 ));
|
|
23
|
+
days_left=$(( (window_epoch-today)/86400 ));
|
|
24
|
+
if [ "$days_left" -ge 0 ] && [ "$days_left" -le "$warn_days" ]; then
|
|
25
|
+
savings=$(awk -v a="$amount" -v p="$discount_pct" 'BEGIN{printf "%.2f", a*(p/100)}');
|
|
26
|
+
echo "DISCOUNT WINDOW CLOSING: $vendor invoice \$$amount — pay within $days_left day(s) to save \$$savings ($discount_pct% discount)";
|
|
27
|
+
fi;
|
|
28
|
+
done
|
|
29
|
+
variables:
|
|
30
|
+
payables_terms_file:
|
|
31
|
+
default: "./vendor-payment-terms.csv"
|
|
32
|
+
description: >
|
|
33
|
+
CSV with header
|
|
34
|
+
"vendor,amount,invoice_date,discount_pct,discount_days,paid"
|
|
35
|
+
(invoice_date is YYYY-MM-DD; discount_days is how many days from
|
|
36
|
+
invoice_date the early-pay discount applies, e.g. 10 for "2/10 net
|
|
37
|
+
30"; leave discount_pct/discount_days blank if no early-pay term
|
|
38
|
+
exists).
|
|
39
|
+
warn_days:
|
|
40
|
+
default: 3
|
|
41
|
+
description: Start warning this many days before the discount window closes.
|
|
42
|
+
compatible_agents: [generic, claude, codex]
|
|
43
|
+
notes: >
|
|
44
|
+
Zero-token. You maintain vendor-payment-terms.csv from vendor
|
|
45
|
+
invoices/contracts — this doesn't parse invoice terms automatically.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
id: appointment-slot-utilization-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Appointment Slot Utilization and Schedule Gap Check
|
|
4
|
+
description: >
|
|
5
|
+
Computes daily/weekly appointment slot utilization from the schedule and
|
|
6
|
+
flags days running well under capacity, then suggests what to do about
|
|
7
|
+
the gaps. Use this if provider schedules have ever had large unbooked
|
|
8
|
+
gaps that nobody noticed until the day arrived nearly empty, wasting
|
|
9
|
+
billable capacity that a recall push or same-day-opening alert could
|
|
10
|
+
have filled.
|
|
11
|
+
category: healthcare
|
|
12
|
+
tags: [healthcare, scheduling, utilization, operations, capacity]
|
|
13
|
+
schedule: "0 16 * * 5"
|
|
14
|
+
timezone: "America/New_York"
|
|
15
|
+
runner: hybrid
|
|
16
|
+
command: >
|
|
17
|
+
awk -F',' -v threshold="{{low_utilization_threshold_pct}}" '
|
|
18
|
+
NR==1 {next}
|
|
19
|
+
{
|
|
20
|
+
total += $2; booked += $3;
|
|
21
|
+
pct = ($2 > 0) ? ($3 / $2 * 100) : 0;
|
|
22
|
+
if (pct < threshold) {
|
|
23
|
+
printf "LOW UTILIZATION: %s — %d/%d slots booked (%.1f%%)\n", $1, $3, $2, pct;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
END {
|
|
27
|
+
overall = (total > 0) ? (booked / total * 100) : 0;
|
|
28
|
+
printf "WEEK OVERALL: %d/%d slots booked (%.1f%%)\n", booked, total, overall;
|
|
29
|
+
}
|
|
30
|
+
' "{{schedule_utilization_csv_path}}"
|
|
31
|
+
prompt: |
|
|
32
|
+
Look at the low-utilization days and overall weekly rate flagged above
|
|
33
|
+
(from {{schedule_utilization_csv_path}}).
|
|
34
|
+
1. Note which specific days/providers are consistently under
|
|
35
|
+
{{low_utilization_threshold_pct}}% booked versus a one-off dip.
|
|
36
|
+
2. For consistently low days, suggest a concrete fix: a targeted recall
|
|
37
|
+
push (see patient-recall-reminder) for that provider's open slots, a
|
|
38
|
+
schedule consolidation (fewer open days, more density), or a same-day
|
|
39
|
+
opening alert to a waitlist — whichever fits the pattern.
|
|
40
|
+
3. Keep it to a short, actionable list — this is a capacity-planning
|
|
41
|
+
nudge, not a full operations review.
|
|
42
|
+
variables:
|
|
43
|
+
schedule_utilization_csv_path:
|
|
44
|
+
default: "./schedule-utilization.csv"
|
|
45
|
+
description: "Path to a CSV with columns: date_or_provider_day,total_slots,booked_slots."
|
|
46
|
+
low_utilization_threshold_pct:
|
|
47
|
+
default: 70
|
|
48
|
+
description: Utilization percentage below which a day is flagged as under capacity.
|
|
49
|
+
compatible_agents: [claude, codex, hermes, openclaw, generic]
|
|
50
|
+
script_note: >
|
|
51
|
+
The command gives you the per-day and weekly utilization percentages for free.
|
|
52
|
+
Only the prompt pass distinguishes a one-off dip from a real pattern and
|
|
53
|
+
recommends a specific fix — that judgment call is what the LLM pass adds.
|
|
54
|
+
notes: >
|
|
55
|
+
Assumes an already-exported CSV from your scheduling/practice-management system.
|
|
56
|
+
Read-only analysis — it doesn't rebook anyone or change the schedule itself.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
id: claims-denial-resubmission-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Claims Denial Resubmission Check
|
|
4
|
+
description: >
|
|
5
|
+
Checks denied insurance claims against their payer resubmission or appeal
|
|
6
|
+
deadline and flags anything still open as the deadline approaches or has
|
|
7
|
+
already passed. Use this if a denied claim has ever quietly aged past the
|
|
8
|
+
window to resubmit or appeal it, turning recoverable revenue into a
|
|
9
|
+
write-off nobody meant to take.
|
|
10
|
+
category: healthcare
|
|
11
|
+
tags: [healthcare, billing, claims, denials, revenue-cycle]
|
|
12
|
+
schedule: "0 8 * * 1-5"
|
|
13
|
+
timezone: "America/New_York"
|
|
14
|
+
runner: shell
|
|
15
|
+
command: >
|
|
16
|
+
today=$(date +%s);
|
|
17
|
+
awk -F',' -v today="$today" -v warn_days="{{warn_days_before_deadline}}" '
|
|
18
|
+
NR==1 {next}
|
|
19
|
+
$6 != "open" {next}
|
|
20
|
+
{
|
|
21
|
+
cmd = "date -d \"" $5 "\" +%s 2>/dev/null || date -j -f %Y-%m-%d \"" $5 "\" +%s 2>/dev/null";
|
|
22
|
+
cmd | getline deadline_epoch; close(cmd);
|
|
23
|
+
diff_days = (deadline_epoch - today) / 86400;
|
|
24
|
+
if (diff_days < 0) {
|
|
25
|
+
printf "PAST DEADLINE: %s — claim %s (%s) resubmission deadline was %s (%d days ago)\n", $1, $2, $3, $5, -diff_days;
|
|
26
|
+
} else if (diff_days <= warn_days) {
|
|
27
|
+
printf "RESUBMIT SOON: %s — claim %s (%s) deadline %s (%d days left)\n", $1, $2, $3, $5, diff_days;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
' "{{denied_claims_csv_path}}"
|
|
31
|
+
variables:
|
|
32
|
+
denied_claims_csv_path:
|
|
33
|
+
default: "./denied-claims.csv"
|
|
34
|
+
description: "Path to a CSV with columns: patient_name,claim_number,payer,denial_date (YYYY-MM-DD),resubmission_deadline (YYYY-MM-DD),status (open/resubmitted/appealed/written-off)."
|
|
35
|
+
warn_days_before_deadline:
|
|
36
|
+
default: 7
|
|
37
|
+
description: How many days before the resubmission/appeal deadline to start warning.
|
|
38
|
+
compatible_agents: [generic, claude, codex]
|
|
39
|
+
notes: >
|
|
40
|
+
Assumes an already-exported CSV from your billing/clearinghouse system rather than
|
|
41
|
+
live PHI system access. Distinct from insurance-eligibility-verification-check
|
|
42
|
+
(pre-visit) and prior-authorization-expiry-check (treatment approval) — this is
|
|
43
|
+
post-visit claims that already got denied.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
id: clinical-supply-low-stock-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Clinical Supply and PPE Low-Stock Check
|
|
4
|
+
description: >
|
|
5
|
+
Scans clinical supply and PPE inventory (gloves, masks, gowns, syringes,
|
|
6
|
+
exam table paper, sanitizer) against reorder thresholds and flags what's
|
|
7
|
+
running low. Use this if a clinic has ever discovered it was out of
|
|
8
|
+
gloves or exam paper mid-morning because nobody was watching stock levels
|
|
9
|
+
between deliveries.
|
|
10
|
+
category: healthcare
|
|
11
|
+
tags: [healthcare, inventory, supplies, ppe, operations]
|
|
12
|
+
schedule: "0 7 * * 1,4"
|
|
13
|
+
timezone: "America/New_York"
|
|
14
|
+
runner: shell
|
|
15
|
+
command: >
|
|
16
|
+
awk -F',' '
|
|
17
|
+
NR==1 {next}
|
|
18
|
+
($3 + 0) <= ($4 + 0) {
|
|
19
|
+
printf "LOW STOCK: %s (%s) — %d on hand, reorder threshold %d\n", $1, $2, $3, $4;
|
|
20
|
+
}
|
|
21
|
+
' "{{supply_inventory_csv_path}}"
|
|
22
|
+
variables:
|
|
23
|
+
supply_inventory_csv_path:
|
|
24
|
+
default: "./clinical-supply-inventory.csv"
|
|
25
|
+
description: "Path to a CSV with columns: item_name,category,current_qty,reorder_threshold."
|
|
26
|
+
compatible_agents: [generic, claude, codex]
|
|
27
|
+
notes: >
|
|
28
|
+
Zero-token, read-only check. Assumes a maintained inventory export (manual count
|
|
29
|
+
or supply-management software) — this is the "did anyone check the shelf" backstop,
|
|
30
|
+
it doesn't place the reorder itself.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
id: controlled-substance-inventory-reconciliation
|
|
2
|
+
version: 1
|
|
3
|
+
name: Controlled Substance Inventory Reconciliation
|
|
4
|
+
description: >
|
|
5
|
+
Reviews the practice's controlled-substance dispensing/administration log
|
|
6
|
+
(e.g. in-office injectable opioids, ketamine, testosterone, Schedule II-V
|
|
7
|
+
medications kept on site) for gaps or unreconciled counts. Use this if a
|
|
8
|
+
discrepancy in a controlled-drug count has ever gone unnoticed for weeks
|
|
9
|
+
in a human practice instead of being caught same-day — this covers a
|
|
10
|
+
clinic's own in-office stock, the same DEA-style pattern as
|
|
11
|
+
jobs/veterinary/controlled-substance-log-audit.yaml but for a human
|
|
12
|
+
medical/dental practice rather than an animal clinic, so both are kept as
|
|
13
|
+
separate jobs.
|
|
14
|
+
category: healthcare
|
|
15
|
+
tags: [healthcare, controlled-substances, compliance, audit, dea]
|
|
16
|
+
schedule: "0 20 * * *"
|
|
17
|
+
timezone: "America/New_York"
|
|
18
|
+
runner: agent-prompt
|
|
19
|
+
prompt: |
|
|
20
|
+
Read today's controlled-substance log from {{log_source}} for
|
|
21
|
+
{{substances_tracked}}.
|
|
22
|
+
1. Check that every entry has a matching patient/encounter reference —
|
|
23
|
+
flag any entry missing one.
|
|
24
|
+
2. Compare the running balance against the last physical count on record;
|
|
25
|
+
flag any mismatch.
|
|
26
|
+
3. Flag any day with zero entries logged if the practice was open and
|
|
27
|
+
controlled substances are known to be in regular use — a suspiciously
|
|
28
|
+
quiet log is itself worth a second look.
|
|
29
|
+
4. If everything reconciles, say so in one line.
|
|
30
|
+
variables:
|
|
31
|
+
log_source:
|
|
32
|
+
default: "your controlled-substance log (paper log photographed/transcribed, or e-log system)"
|
|
33
|
+
description: Where the controlled-substance usage log is recorded.
|
|
34
|
+
substances_tracked:
|
|
35
|
+
default: "injectable opioids, ketamine, and other Schedule II-V substances kept on site"
|
|
36
|
+
description: Which substances this log covers.
|
|
37
|
+
compatible_agents: [claude, codex, hermes, openclaw, generic]
|
|
38
|
+
notes: >
|
|
39
|
+
Read-only reconciliation check — does not replace your practice's actual
|
|
40
|
+
DEA-compliant logging system, and any discrepancy found should go through your
|
|
41
|
+
normal reporting/investigation process. Assumes an already-exported or
|
|
42
|
+
transcribed log rather than live PHI system access.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
id: hipaa-access-log-audit
|
|
2
|
+
version: 1
|
|
3
|
+
name: HIPAA Chart Access Log Audit
|
|
4
|
+
description: >
|
|
5
|
+
Scans the EHR's chart-access log for high-volume, off-hours, or otherwise
|
|
6
|
+
unusual access patterns and has an agent judge which are worth a closer
|
|
7
|
+
look. Use this if unauthorized or curious chart access (a coworker's
|
|
8
|
+
family member, a local celebrity, an ex-spouse) has ever gone unnoticed
|
|
9
|
+
because nobody was reviewing the access log until an audit or complaint
|
|
10
|
+
forced it.
|
|
11
|
+
category: healthcare
|
|
12
|
+
tags: [healthcare, hipaa, compliance, audit, security]
|
|
13
|
+
schedule: "0 7 * * 1"
|
|
14
|
+
timezone: "America/New_York"
|
|
15
|
+
runner: hybrid
|
|
16
|
+
command: >
|
|
17
|
+
awk -F',' -v threshold="{{daily_access_threshold}}" -v off_start="{{off_hours_start}}" -v off_end="{{off_hours_end}}" '
|
|
18
|
+
NR==1 {next}
|
|
19
|
+
{
|
|
20
|
+
day = substr($3,1,10); hour = substr($3,12,2) + 0;
|
|
21
|
+
key = $1 SUBSEP day;
|
|
22
|
+
count[key]++;
|
|
23
|
+
staffname[key] = $1; dayval[key] = day;
|
|
24
|
+
if (hour >= off_start || hour < off_end) {
|
|
25
|
+
printf "OFF-HOURS ACCESS: %s accessed %s at %s (action: %s)\n", $1, $2, $3, $4;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
END {
|
|
29
|
+
for (k in count) {
|
|
30
|
+
if (count[k] > threshold) {
|
|
31
|
+
printf "HIGH-VOLUME ACCESS: %s accessed %d distinct log entries on %s (threshold %d)\n", staffname[k], count[k], dayval[k], threshold;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
' "{{access_log_csv_path}}"
|
|
36
|
+
prompt: |
|
|
37
|
+
Run the flagged entries from the access-log scan above (high-volume days
|
|
38
|
+
and off-hours access events) through a closer read.
|
|
39
|
+
1. For each flagged staff member/day, look at which patient records were
|
|
40
|
+
touched and whether the access pattern looks consistent with normal
|
|
41
|
+
clinical or front-desk duties for that role (e.g. a nurse pulling
|
|
42
|
+
charts for today's patient panel) versus inconsistent with it (e.g.
|
|
43
|
+
access to a patient not on that staff member's schedule, repeated
|
|
44
|
+
access to the same non-assigned patient, or a name match suggesting a
|
|
45
|
+
coworker, family member, or public figure).
|
|
46
|
+
2. Rank flags from "likely benign, no action" to "recommend compliance
|
|
47
|
+
officer review."
|
|
48
|
+
3. Do not name a possible relationship as fact — describe the pattern
|
|
49
|
+
observed and let a human confirm it.
|
|
50
|
+
4. If nothing stands out beyond routine volume, say so in one line.
|
|
51
|
+
variables:
|
|
52
|
+
access_log_csv_path:
|
|
53
|
+
default: "./chart-access-log.csv"
|
|
54
|
+
description: "Path to a CSV with columns: staff_name,patient_name,access_timestamp (YYYY-MM-DD HH:MM),action (view/edit/print)."
|
|
55
|
+
daily_access_threshold:
|
|
56
|
+
default: 40
|
|
57
|
+
description: Number of chart access events by one staff member in one day that triggers a high-volume flag.
|
|
58
|
+
off_hours_start:
|
|
59
|
+
default: 20
|
|
60
|
+
description: Hour (0-23, local clinic time) after which access counts as off-hours.
|
|
61
|
+
off_hours_end:
|
|
62
|
+
default: 6
|
|
63
|
+
description: Hour (0-23) before which access still counts as off-hours.
|
|
64
|
+
compatible_agents: [claude, codex, hermes, openclaw, generic]
|
|
65
|
+
script_note: >
|
|
66
|
+
The command gives you the raw high-volume and off-hours flags for free, purely
|
|
67
|
+
from counts and timestamps. Only the prompt pass can judge whether a flagged
|
|
68
|
+
pattern looks like inappropriate snooping versus legitimate clinical coverage —
|
|
69
|
+
that judgment call is what the LLM pass adds.
|
|
70
|
+
notes: >
|
|
71
|
+
Assumes an already-exported, de-identified-where-possible access log rather than
|
|
72
|
+
live EHR/PHI system access — export staff name, patient identifier, timestamp,
|
|
73
|
+
and action only. Any confirmed concern should go through your practice's actual
|
|
74
|
+
HIPAA compliance/privacy officer process, not this job.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: patient-balance-collections-aging-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Overdue Patient Balance Aging Check
|
|
4
|
+
description: >
|
|
5
|
+
Buckets outstanding self-pay patient balances by how long they've been
|
|
6
|
+
unpaid (30/60/90+ days) and flags the oldest ones for collections
|
|
7
|
+
follow-up. Use this if patient balances have ever quietly aged past the
|
|
8
|
+
point of easy recovery because nobody was reviewing accounts receivable
|
|
9
|
+
by age, only by total dollar amount.
|
|
10
|
+
category: healthcare
|
|
11
|
+
tags: [healthcare, billing, collections, accounts-receivable, patients]
|
|
12
|
+
schedule: "0 8 1,15 * *"
|
|
13
|
+
timezone: "America/New_York"
|
|
14
|
+
runner: shell
|
|
15
|
+
command: >
|
|
16
|
+
today=$(date +%s);
|
|
17
|
+
awk -F',' -v today="$today" -v flag_days="{{flag_after_days}}" '
|
|
18
|
+
NR==1 {next}
|
|
19
|
+
{
|
|
20
|
+
cmd = "date -d \"" $3 "\" +%s 2>/dev/null || date -j -f %Y-%m-%d \"" $3 "\" +%s 2>/dev/null";
|
|
21
|
+
cmd | getline invoice_epoch; close(cmd);
|
|
22
|
+
age_days = (today - invoice_epoch) / 86400;
|
|
23
|
+
bucket = (age_days < 30) ? "current" : (age_days < 60) ? "30-59" : (age_days < 90) ? "60-89" : "90+";
|
|
24
|
+
if (age_days >= flag_days) {
|
|
25
|
+
printf "OVERDUE BALANCE: %s — $%s, invoiced %s (%d days, bucket %s)\n", $1, $2, $3, age_days, bucket;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
' "{{patient_balances_csv_path}}"
|
|
29
|
+
variables:
|
|
30
|
+
patient_balances_csv_path:
|
|
31
|
+
default: "./patient-balances.csv"
|
|
32
|
+
description: "Path to a CSV with columns: patient_name,balance_amount,invoice_date (YYYY-MM-DD)."
|
|
33
|
+
flag_after_days:
|
|
34
|
+
default: 60
|
|
35
|
+
description: Days since invoicing before an unpaid balance is flagged for collections follow-up.
|
|
36
|
+
compatible_agents: [generic, claude, codex]
|
|
37
|
+
notes: >
|
|
38
|
+
Assumes an already-exported CSV from your billing/practice-management system
|
|
39
|
+
rather than live PHI system access. Read-only aging report — actual collections
|
|
40
|
+
outreach should follow your practice's billing/compliance policy (e.g. FDCPA-style
|
|
41
|
+
notice requirements where applicable).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: patient-immunization-schedule-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Patient Immunization Schedule Check
|
|
4
|
+
description: >
|
|
5
|
+
Checks which patients are due or overdue for a scheduled immunization and
|
|
6
|
+
lists them for outreach. Use this if a patient (child or adult) has ever
|
|
7
|
+
fallen behind on a vaccine series because nobody was tracking due dates
|
|
8
|
+
against the immunization schedule between visits — this is for human
|
|
9
|
+
patients, distinct from jobs/veterinary/pet-vaccine-due-reminder.yaml
|
|
10
|
+
which tracks pet vaccines at an animal clinic.
|
|
11
|
+
category: healthcare
|
|
12
|
+
tags: [healthcare, immunization, vaccine, patients, preventive-care]
|
|
13
|
+
schedule: "0 8 * * *"
|
|
14
|
+
timezone: "America/New_York"
|
|
15
|
+
runner: shell
|
|
16
|
+
command: >
|
|
17
|
+
awk -F',' -v days="{{warn_days_before}}" '
|
|
18
|
+
NR==1 {next}
|
|
19
|
+
{
|
|
20
|
+
cmd = "date -d \"" $3 "\" +%s 2>/dev/null || date -j -f %Y-%m-%d \"" $3 "\" +%s 2>/dev/null";
|
|
21
|
+
cmd | getline due_epoch; close(cmd);
|
|
22
|
+
"date +%s" | getline now_epoch; close("date +%s");
|
|
23
|
+
diff_days = (due_epoch - now_epoch) / 86400;
|
|
24
|
+
if (diff_days <= days) {
|
|
25
|
+
printf "IMMUNIZATION DUE: %s — %s due %s (%d days)\n", $1, $4, $3, diff_days;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
' "{{patients_csv_path}}"
|
|
29
|
+
variables:
|
|
30
|
+
patients_csv_path:
|
|
31
|
+
default: "./patient-immunizations.csv"
|
|
32
|
+
description: "Path to a CSV with columns: patient_name,date_of_birth,due_date (YYYY-MM-DD),vaccine_name."
|
|
33
|
+
warn_days_before:
|
|
34
|
+
default: 21
|
|
35
|
+
description: How many days before (or past) the due date to start listing.
|
|
36
|
+
compatible_agents: [generic, claude, codex]
|
|
37
|
+
notes: >
|
|
38
|
+
Assumes an already-exported CSV from your EHR/immunization registry rather than
|
|
39
|
+
live PHI system access. Read-only backstop check — cross-verify against your
|
|
40
|
+
state immunization registry before contacting patients, since due dates can shift
|
|
41
|
+
based on catch-up schedules.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
id: patient-portal-message-backlog-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Patient Portal Message Backlog Check
|
|
4
|
+
description: >
|
|
5
|
+
Checks unanswered patient portal messages against a response-time SLA and
|
|
6
|
+
flags anything overdue. Use this if a patient message has ever sat
|
|
7
|
+
unanswered in the portal inbox for days because it scrolled off the top
|
|
8
|
+
of a busy staff member's queue and nobody was tracking age.
|
|
9
|
+
category: healthcare
|
|
10
|
+
tags: [healthcare, patient-portal, messaging, sla, patients]
|
|
11
|
+
schedule: "0 */2 * * 1-6"
|
|
12
|
+
timezone: "America/New_York"
|
|
13
|
+
runner: shell
|
|
14
|
+
command: >
|
|
15
|
+
now=$(date +%s);
|
|
16
|
+
awk -F',' -v now="$now" -v sla="{{sla_hours}}" '
|
|
17
|
+
NR==1 {next}
|
|
18
|
+
$4 == "unanswered" {
|
|
19
|
+
cmd = "date -d \"" $2 "\" +%s 2>/dev/null || date -j -f \"%Y-%m-%d %H:%M\" \"" $2 "\" +%s 2>/dev/null";
|
|
20
|
+
cmd | getline received_epoch; close(cmd);
|
|
21
|
+
age_hours = (now - received_epoch) / 3600;
|
|
22
|
+
if (age_hours >= sla) {
|
|
23
|
+
printf "OVERDUE MESSAGE: %s — \"%s\" received %s (%d hrs ago, unanswered)\n", $1, $3, $2, age_hours;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
' "{{portal_messages_csv_path}}"
|
|
27
|
+
variables:
|
|
28
|
+
portal_messages_csv_path:
|
|
29
|
+
default: "./portal-messages.csv"
|
|
30
|
+
description: "Path to a CSV with columns: patient_name,received_at (YYYY-MM-DD HH:MM),subject,status (unanswered/answered)."
|
|
31
|
+
sla_hours:
|
|
32
|
+
default: 24
|
|
33
|
+
description: Hours a message can go unanswered before it's flagged overdue.
|
|
34
|
+
compatible_agents: [generic, claude, codex]
|
|
35
|
+
notes: >
|
|
36
|
+
Assumes an already-exported CSV from your patient portal/EHR messaging module
|
|
37
|
+
rather than live access to message content — export subject lines only if full
|
|
38
|
+
message bodies raise PHI-export concerns for your practice. Read-only — does not
|
|
39
|
+
reply to patients.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
id: patient-satisfaction-survey-tracking
|
|
2
|
+
version: 1
|
|
3
|
+
name: Patient Satisfaction Survey Response Tracking
|
|
4
|
+
description: >
|
|
5
|
+
Tallies patient satisfaction survey response rates and surfaces low
|
|
6
|
+
scores with comments for follow-up. Use this if low-scoring survey
|
|
7
|
+
responses have ever sat unread in an inbox, or a slipping response rate
|
|
8
|
+
went unnoticed for months — distinct from generic online reviews, this
|
|
9
|
+
tracks a practice's own post-visit survey instrument.
|
|
10
|
+
category: healthcare
|
|
11
|
+
tags: [healthcare, patient-satisfaction, survey, feedback, patients]
|
|
12
|
+
schedule: "0 9 * * 1"
|
|
13
|
+
timezone: "America/New_York"
|
|
14
|
+
runner: hybrid
|
|
15
|
+
command: >
|
|
16
|
+
awk -F',' -v low="{{low_score_threshold}}" '
|
|
17
|
+
NR==1 {next}
|
|
18
|
+
{ sent++; }
|
|
19
|
+
$3 != "" { responded++; }
|
|
20
|
+
($3 != "" && $4 != "" && ($4+0) <= low) {
|
|
21
|
+
printf "LOW SCORE: %s — score %s: \"%s\" (responded %s)\n", $1, $4, $5, $3;
|
|
22
|
+
}
|
|
23
|
+
END {
|
|
24
|
+
rate = (sent > 0) ? (responded / sent * 100) : 0;
|
|
25
|
+
printf "RESPONSE RATE: %d/%d sent (%.1f%%)\n", responded, sent, rate;
|
|
26
|
+
}
|
|
27
|
+
' "{{survey_csv_path}}"
|
|
28
|
+
prompt: |
|
|
29
|
+
Look at the low-score rows and comments flagged by the tally above (from
|
|
30
|
+
{{survey_csv_path}}).
|
|
31
|
+
1. Group the comments into common themes (e.g. wait time, billing
|
|
32
|
+
confusion, communication, front-desk experience).
|
|
33
|
+
2. For each theme, note how many respondents mentioned it and give one
|
|
34
|
+
representative quote.
|
|
35
|
+
3. For any response that names a specific, addressable problem, draft a
|
|
36
|
+
short, warm outreach note to that patient acknowledging the feedback —
|
|
37
|
+
draft-only, for staff to review before sending.
|
|
38
|
+
4. If the response rate this run is notably lower than
|
|
39
|
+
{{expected_response_rate}}%, flag that as worth investigating
|
|
40
|
+
separately from the score themes.
|
|
41
|
+
variables:
|
|
42
|
+
survey_csv_path:
|
|
43
|
+
default: "./patient-satisfaction-surveys.csv"
|
|
44
|
+
description: "Path to a CSV with columns: patient_name,visit_date,response_date (blank if no response),score (1-5, blank if no response),comment."
|
|
45
|
+
low_score_threshold:
|
|
46
|
+
default: 3
|
|
47
|
+
description: Scores at or below this value are flagged as low.
|
|
48
|
+
expected_response_rate:
|
|
49
|
+
default: 25
|
|
50
|
+
description: Expected survey response rate (%) — used only as a reference point for flagging an unusually low run.
|
|
51
|
+
compatible_agents: [claude, codex, hermes, openclaw, generic]
|
|
52
|
+
script_note: >
|
|
53
|
+
The command gives you the response rate and raw low-score rows for free. Only the
|
|
54
|
+
prompt pass groups comments into themes and drafts a tactful outreach note to an
|
|
55
|
+
unhappy patient — that synthesis is what the LLM pass adds.
|
|
56
|
+
notes: >
|
|
57
|
+
Assumes an already-exported CSV from your survey tool (e.g. post-visit SMS/email
|
|
58
|
+
survey) rather than live PHI system access. Outreach drafts must be reviewed by
|
|
59
|
+
staff before sending.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
id: prescription-refill-request-backlog-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Prescription Refill Request Backlog Check
|
|
4
|
+
description: >
|
|
5
|
+
Checks pending prescription refill requests against how long they've been
|
|
6
|
+
waiting and flags anything past a reasonable turnaround. Use this if a
|
|
7
|
+
refill request has ever sat in a queue long enough that a patient ran out
|
|
8
|
+
of a maintenance medication before the practice got to it.
|
|
9
|
+
category: healthcare
|
|
10
|
+
tags: [healthcare, prescriptions, refills, patients, medication]
|
|
11
|
+
schedule: "0 9,15 * * 1-5"
|
|
12
|
+
timezone: "America/New_York"
|
|
13
|
+
runner: shell
|
|
14
|
+
command: >
|
|
15
|
+
today=$(date +%s);
|
|
16
|
+
awk -F',' -v today="$today" -v hours="{{escalate_after_hours}}" '
|
|
17
|
+
NR==1 {next}
|
|
18
|
+
$4 == "pending" {
|
|
19
|
+
cmd = "date -d \"" $3 "\" +%s 2>/dev/null || date -j -f %Y-%m-%d \"" $3 "\" +%s 2>/dev/null";
|
|
20
|
+
cmd | getline requested_epoch; close(cmd);
|
|
21
|
+
age_hours = (today - requested_epoch) / 3600;
|
|
22
|
+
if (age_hours >= hours) {
|
|
23
|
+
printf "REFILL PENDING: %s — %s requested %s (%d hrs ago)\n", $1, $2, $3, age_hours;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
' "{{refill_requests_csv_path}}"
|
|
27
|
+
variables:
|
|
28
|
+
refill_requests_csv_path:
|
|
29
|
+
default: "./refill-requests.csv"
|
|
30
|
+
description: "Path to a CSV with columns: patient_name,medication,requested_date (YYYY-MM-DD),status (pending/approved/denied)."
|
|
31
|
+
escalate_after_hours:
|
|
32
|
+
default: 48
|
|
33
|
+
description: Hours a refill request can sit pending before it's flagged.
|
|
34
|
+
compatible_agents: [generic, claude, codex]
|
|
35
|
+
notes: >
|
|
36
|
+
Assumes an already-exported CSV from your e-prescribing/EHR system rather than
|
|
37
|
+
live PHI system access. Read-only triage — actual approval/denial of a refill is a
|
|
38
|
+
clinical decision made by the prescriber, not this job.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
id: prior-authorization-expiry-check
|
|
2
|
+
version: 1
|
|
3
|
+
name: Prior Authorization Expiry Check
|
|
4
|
+
description: >
|
|
5
|
+
Checks treatment-specific prior-authorization requests for approvals about
|
|
6
|
+
to expire before the procedure happens, and for requests still stuck
|
|
7
|
+
awaiting payer response. Use this if a procedure has ever been delayed or
|
|
8
|
+
denied because the prior auth expired, or the payer never responded and
|
|
9
|
+
nobody was tracking it — distinct from insurance-eligibility-verification-check,
|
|
10
|
+
which covers general visit eligibility rather than a specific treatment's
|
|
11
|
+
authorization.
|
|
12
|
+
category: healthcare
|
|
13
|
+
tags: [healthcare, prior-authorization, billing, insurance, compliance]
|
|
14
|
+
schedule: "0 9 * * 1-5"
|
|
15
|
+
timezone: "America/New_York"
|
|
16
|
+
runner: shell
|
|
17
|
+
command: >
|
|
18
|
+
today=$(date +%s);
|
|
19
|
+
awk -F',' -v today="$today" -v warn_days="{{warn_days_before_expiry}}" -v stale_days="{{pending_stale_days}}" '
|
|
20
|
+
NR==1 {next}
|
|
21
|
+
{
|
|
22
|
+
if ($4 == "approved" && $6 != "") {
|
|
23
|
+
cmd = "date -d \"" $6 "\" +%s 2>/dev/null || date -j -f %Y-%m-%d \"" $6 "\" +%s 2>/dev/null";
|
|
24
|
+
cmd | getline expiry_epoch; close(cmd);
|
|
25
|
+
diff_days = (expiry_epoch - today) / 86400;
|
|
26
|
+
if (diff_days <= warn_days) {
|
|
27
|
+
printf "AUTH EXPIRING: %s — %s (%s) expires %s (%d days)\n", $1, $2, $3, $6, diff_days;
|
|
28
|
+
}
|
|
29
|
+
} else if ($4 == "pending") {
|
|
30
|
+
cmd = "date -d \"" $5 "\" +%s 2>/dev/null || date -j -f %Y-%m-%d \"" $5 "\" +%s 2>/dev/null";
|
|
31
|
+
cmd | getline submitted_epoch; close(cmd);
|
|
32
|
+
pending_days = (today - submitted_epoch) / 86400;
|
|
33
|
+
if (pending_days >= stale_days) {
|
|
34
|
+
printf "AUTH STUCK PENDING: %s — %s (%s) submitted %s (%d days, no payer decision)\n", $1, $2, $3, $5, pending_days;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
' "{{prior_auth_csv_path}}"
|
|
39
|
+
variables:
|
|
40
|
+
prior_auth_csv_path:
|
|
41
|
+
default: "./prior-authorizations.csv"
|
|
42
|
+
description: "Path to a CSV with columns: patient_name,procedure,payer,status (pending/approved/denied),submitted_date (YYYY-MM-DD),auth_expiry_date (YYYY-MM-DD, blank if still pending)."
|
|
43
|
+
warn_days_before_expiry:
|
|
44
|
+
default: 14
|
|
45
|
+
description: How many days before an approved auth expires to start warning.
|
|
46
|
+
pending_stale_days:
|
|
47
|
+
default: 10
|
|
48
|
+
description: Days a request can sit pending with no payer decision before it's flagged as stuck.
|
|
49
|
+
compatible_agents: [generic, claude, codex]
|
|
50
|
+
notes: >
|
|
51
|
+
Assumes an already-exported CSV from your billing/prior-auth tracking system rather
|
|
52
|
+
than live EHR or payer-portal access. Read-only — this flags what needs a call to
|
|
53
|
+
the payer, it doesn't submit or chase the request itself.
|