npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fairpractice-hospice-billing

v0.1.0

Published

Hospice billing deadlines and the cap: notices of election and termination filed late, benefit periods and face-to-face encounters before the third period, the aggregate cap per cap year and the live-discharge rate.

Readme

Fairpractice Hospice Billing (fairpractice-hospice-billing)

Checks hospice billing deadlines and the cap: notices of election and of termination or revocation missing or late (with the days not covered), face-to-face encounters missing before the third and later benefit periods, the aggregate cap for the cap year, and a high live-discharge rate. Patient names are masked before results reach the model.

Fairpractice Hospice Billing never files notices of election or termination. Fairpractice Hospice Billing never submits or changes claims.

Fairpractice ver 1 · Specialty billing · MIT · Node 20 or newer · local files only · patient and staff identifiers masked before results reach the model · built on fairpractice-core

npx -y fairpractice-hospice-billing demo
npx -y fairpractice-hospice-billing mcp --root ./practice-files

What the sample data shows

Fictional data only: a made-up hospice, made-up patients. Any likeness to real people is chance.

  • census.csv. Planted:
    • H1: elected November 2, NOE filed November 10 (due November 7), so 8 days are not covered.
    • H2: elected November 6 with no NOE on file (due November 11).
    • H3: revoked November 3 with no NOTR (due November 8).
    • H4: benefit period 4 started September 7 with no face-to-face encounter in the 30 days before.
    • H5: transferred in at period 3; period 4 starts December 24, so a face-to-face is coming due.
    • Cap year October 2025 to September 2026: five new elections (H3, H4, H6, H7, H8) and 205,000 paid against an estimated 176,807.20 cap.
    • Live discharges: 2 of the 4 discharges in the last 12 months (H3, H8) were live.
  • settings.json: an example cap amount of 35,361.44 per beneficiary (check the CMS figure for your cap year), cap year 2026, routine home care at 220 a day for the late-notice dollars, and a 20% live-discharge flag. settings-typo.json misspells a setting and is refused.

A demo run

npx -y fairpractice-hospice-billing demo runs the agent on the fictional files in fixtures/ in a temporary folder. Captured output:

Fairpractice Hospice Billing demo (fictional practice, patients, staff and payers)

▶ Check notices, benefit periods and the cap year that just ended
  status: executed  decision: allow
  8 patient(s). Cap year 2026: paid 205000 of 176807.2 (115.95%). Live discharge rate 50%. 31932.8 at risk. 7 finding(s): noe_missing 1, noe_late 1, notr_missing 1, f2f_missing 1, cap_over 1, f2f_due 1, live_discharge_high 1.
    noe_missing               1980  No notice of election on file for the election of 2026-11-06; it was due 2026-11-11. 9 day(s) are at risk so far.
    noe_late                  1760  The notice of election for 2026-11-02 was filed 2026-11-10, after the 2026-11-07 due date; 8 day(s) are not covered.
    notr_missing                 0  Live discharge or revocation on 2026-11-03 has no notice of termination or revocation; it was due 2026-11-08.
    f2f_missing                  0  Benefit period 4 started 2026-09-07 with no face-to-face encounter recorded between 2026-08-08 and 2026-09-07.
    cap_over               28192.8  Cap year 2025-10-01 to 2026-09-30: Medicare paid 205000 against an estimated cap of 176807.2 (5 beneficiaries); 28192.8 over.
    f2f_due                      0  Benefit period 4 starts 2026-12-24 (in 39 days); a face-to-face encounter is needed from 2026-11-24.
    live_discharge_high          0  2 of 4 discharges in the last 12 months were live (50%), above your 20% flag.

▶ Write the administrator list
  status: executed  decision: allow
  Hospice notices and cap check written: 8 patient(s). Cap year 2026: paid 205000 of 176807.2 (115.95%). Live discharge rate 50%. 31932.8 at risk. 7 finding(s): noe_missing 1, noe_late 1, notr_missing 1, f2f_missing 1, cap_over 1, f2f_due 1, live_discharge_high 1. Files: fairpractice-out/hospice/hospice.csv, fairpractice-out/hospice/hospice.html.

▶ Agent tries to file a notice of election
  status: blocked  decision: block
  reason: Fairpractice Hospice Billing never files notices of election or termination.

Tools

| Tool | What it does | Policy | |---|---|---| | hospice_check | List missing or late NOEs and NOTRs, missing or coming face-to-face encounters, the cap position and the live-discharge rate. | runs | | hospice_write_report | Write hospice.csv (one row per item, with blank owner and decision columns) and hospice.html into out_dir (default fairpractice-out/hospice). | runs | | hospice_recall | Search this agent's own memory of the customer's setup: accepted facts (in use) and facts waiting for a person. | runs | | hospice_learn | Propose one fact about the customer's setup for this agent to remember. | runs | | hospice_accept_learning | A named person accepts or rejects a fact waiting in this agent's memory. | one named click, even in Auto (accept_learning) | | hospice_retire_memory | A named person stops an accepted fact from applying. | one named click, even in Auto (accept_learning) | | noe_submit | Fairpractice Hospice Billing never files notices of election or termination. | refused | | claim_submit | Fairpractice Hospice Billing never submits or changes claims. | refused |

Any tool name not in this table is blocked, including names a model invents. Refused tools are listed so a model can see they exist and are refused.

hospice_check arguments

| Argument | What it is | |---|---| | patients (required) | Hospice census under --root: patient, election date, NOE filed, discharge date and reason, NOTR filed, starting benefit period, face-to-face dates, Medicare paid in the cap year, cap share | | settings | Optional settings JSON: cap_amount, cap_year, cap_warn_pct, daily_rate, noe_days, notr_days, f2f_window, warn_days, live_discharge_pct | | as_of | Date to measure deadlines and ages from (YYYY-MM-DD); default today | | status | Only items with this status | | limit | Most items to return to the model (the report file always has all of them) |

Columns it reads

Tables can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. Columns are matched by the names below (any case and punctuation), and by their usual names in German, French, Spanish, Portuguese, Italian, Japanese, Chinese and Korean. Dates become YYYY-MM-DD. Columns marked masked hold patient or staff identifiers.

The PointClickCare, MatrixCare and American HealthTech style names were written from public help pages and general knowledge, not checked against real exports. Run npx fairpractice-hospice-billing inspect <file> (column names and shapes only, never values) and name any column it misses in remedy-sources.json.

Hospice patients (patients)

| Column | Type | Read from | |---|---|---| | patient_id | text (masked) | Patient ID, Patient #, Patient Number, MRN, Medical Record Number, Chart #, Chart Number, Account # | | patient_name | text (masked) | Patient, Patient Name, Name, Client, Client Name, Member, Member Name, Beneficiary | | election (required) | date | Election Date, Election, Admission Date, Admit Date, Admitted, Start of Care, SOC | | noe_filed | date | NOE Filed, NOE Date, NOE Accepted, NOE Submitted, Notice of Election Filed | | discharge | date | Discharge Date, Discharge, Discharged, Revocation Date, End Date, Date of Death | | discharge_reason | text | Discharge Reason, Reason, Discharge Type, Disposition | | notr_filed | date | NOTR Filed, NOTR Date, NOTR Submitted, Notice of Termination Filed | | starting_period | number | Starting Period, Benefit Period, First Period, Period at Admission | | f2f | text | F2F Dates, F2F, Face to Face, Face-to-Face Dates, F2F Encounter | | cap_paid | amount | Cap Year Paid, Medicare Paid, Paid, Payments | | cap_share | number | Cap Share, Beneficiary Share, Proportional Share, Beneficiary Count |

Settings file (hospice_settings)

A small JSON file you pass by path. A misspelled setting is refused by name rather than ignored, so a typo never silently changes a check.

| Setting | What it does | |---|---| | cap_amount | Per-beneficiary cap amount for the cap year (CMS publishes it each year); no cap check without it | | cap_year | Cap year to check, named by the year it ends (2026 = October 1 2025 to September 30 2026); default the one holding as_of | | cap_warn_pct | Percent of the cap at which to warn; default 90 | | daily_rate | Routine home care daily rate, for dollars on late notices; default 0 | | noe_days | Calendar days to file the NOE; default 5 | | notr_days | Calendar days to file the NOTR; default 5 | | f2f_window | Days before a period starts that a face-to-face may happen; default 30 | | warn_days | Days ahead to list face-to-face encounters coming due; default 45 | | live_discharge_pct | Live discharge rate over 12 months to flag; default 20 |

Memory

hospice_learn only proposes a fact; nothing changes until a named person accepts it with hospice_accept_learning, which is one click even in Auto. Facts live in a hash-chained file under .remedy/memory/; if the chain does not verify, no fact is used. Credentials, personal identifiers and text that reads like instructions to an AI are refused.

| Kind | What an accepted fact does | |---|---|

Install

Node 20 or newer. No other runtime dependencies besides fairpractice-core and fairclaim-core.

{
  "mcpServers": {
    "fairpractice-hospice-billing": {
      "command": "npx",
      "args": [
        "-y",
        "fairpractice-hospice-billing",
        "mcp",
        "--root",
        "/path/to/practice-files"
      ]
    }
  }
}

Claude Code: claude mcp add fairpractice-hospice-billing -- npx -y fairpractice-hospice-billing mcp --root ., or use the plugin files in this folder.

CLI

fairpractice-hospice-billing tools                 # every tool, its policy and arguments
fairpractice-hospice-billing sources               # the columns each input is read from
fairpractice-hospice-billing inspect <file>        # how a file would be read (names and shapes, never values)
fairpractice-hospice-billing call hospice_check '{"patients":"<patients>"}'
fairpractice-hospice-billing eval                  # the private eval cases on the fictional fixtures
fairpractice-hospice-billing demo

Patient and staff data

Results go to an AI model, so identifiers are masked before they leave the agent: patient and staff names become stable pseudonyms such as PT-3f9a1c2e, record and account numbers become MRN-… or ACCT-…, and e-mails and phone numbers are removed, also inside free text. Report files written to disk keep real names because staff work from them: keep them in a folder only your staff can open. The shared tests check that no fictional identifier from the fixtures reaches any eval result, and the hostile-input check plants spreadsheet formulas, HTML and AI-aimed instructions in the data. This keeps PHI away from the model; it is not a HIPAA compliance determination. Your business associate agreements, access controls and policies still apply.

Limits

  • Reads only the files you give it. It does not log in to an EHR, practice-management system, payer portal, clearinghouse, state system, HR or payroll system, or bank.
  • Payer, Medicare, Medicaid, state and federal rules are summarised from public material as of 2026, and the numbers are settings you supply; a billing, compliance or legal professional checks them before you rely on them.
  • Not legal, billing, coding, tax, clinical or HIPAA advice. It does not diagnose or recommend care. A person decides what to bill, pay, report, file or send.
  • Every call is written to a hash-chained audit log under .remedy/ in the root. No network calls, no telemetry, no credentials. The bundled data is fictional.