Specialty × workflow
Insurance Verification Apps for Sleep Medicine Practices: HIPAA Rules for Apps You Build Yourself
Last reviewed: . Vendor facts checked against each vendor's own pages on the dates shown.
Short answer: A vibe-coded insurance verification app for a sleep practice can work under HIPAA if the clearinghouse, storage, e-fax and any AI model are covered by BAAs and each packet carries only the fields its recipient needs. For sleep study and CPAP authorizations, send the AHI or RDI, test type, qualifying diagnosis and ordering physician, not whole chart notes.
An insurance app in a sleep practice usually does two jobs. It checks coverage, and, when a plan asks for authorization, it builds the packet. That can happen before the test (an overnight in-lab sleep study, a home sleep test, or a titration night to set CPAP pressure) and again before therapy (a CPAP machine or an oral appliance). For the general build, start with the insurance verification tool guide and the prior authorization tool guide. For every app a sleep practice builds, see the sleep medicine HIPAA guide.
What the rules say, in their own words (checked November 15, 2026)
Checking coverage is a HIPAA transaction. HIPAA's list of standard transactions includes eligibility for a health plan (HHS (45 CFR 160.103), 45 CFR 160.103 Definitions, verified November 15, 2026), and a practice may use a business associate, such as a clearinghouse, to run it (HHS (eCFR), 45 CFR 162.923 -- Requirements for covered entities., verified November 15, 2026). (A clearinghouse is a company that relays insurance transactions between practices and plans. A business associate is any outside company that handles PHI, protected health information, for the practice.)
Prior authorization is a payment activity. HIPAA's definition of payment includes preauthorization of services (HHS (eCFR), 45 CFR 164.501 -- Definitions., verified November 15, 2026). For payment disclosures, the practice must make reasonable efforts to limit PHI to the minimum necessary (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026).
What Medicare's CPAP rule asks for. Under traditional Medicare's national coverage determination for CPAP (NCD 240.4), adults with obstructive sleep apnea qualify for an initial 12-week CPAP period with an AHI or RDI of 15 or more (CMS, Medicare National Coverage Determinations Manual, Chapter 1, Part 4 (Sections 200-310.1), verified November 15, 2026). CMS defines AHI as the average number of apnea and hypopnea episodes per hour (CMS, Medicare National Coverage Determinations Manual, Chapter 1, Part 4 (Sections 200-310.1), verified November 15, 2026). A lower score needs more documentation:
“AHI or RDI greater than or equal to 5 events and less than or equal to 14 events per hour with documented symptoms of excessive daytime sleepiness, impaired cognition, mood disorders or insomnia, or documented hypertension, ischemic heart disease, or history of stroke.”
The sleep test must also have been ordered by the patient's treating physician (CMS, Medicare National Coverage Determinations Manual, Chapter 1, Part 4 (Sections 200-310.1), verified November 15, 2026). CPAP stays covered after those 12 weeks only for patients who benefit from it during that period (CMS, Medicare National Coverage Determinations Manual, Chapter 1, Part 4 (Sections 200-310.1), verified November 15, 2026). These are Medicare national coverage criteria only. They do not say Medicare requires prior authorization. Do not assume a commercial or Medicare Advantage plan uses the same thresholds; build each plan's criteria from that plan's own policy.
Payer deadlines. CMS's 2024 prior authorization rule, CMS-0057-F, applies to impacted payers: Medicare Advantage, Medicaid and CHIP programs and plans, and qualified health plans on the federally facilitated Exchanges (Centers for Medicare & Medicaid Services (CMS), CMS Interoperability and Prior Authorization Final Rule (CMS-0057-F) | CMS fact sheet, verified November 15, 2026). Except for those Exchange plans, they must send decisions within 72 hours for expedited requests and seven calendar days for standard ones (Centers for Medicare & Medicaid Services (CMS), CMS Interoperability and Prior Authorization Final Rule (CMS-0057-F) | CMS (Fact Sheet), verified November 15, 2026). For physicians, the rule adds an Electronic Prior Authorization measure to MIPS, Medicare's Merit-based Incentive Payment System, starting with the 2027 performance period (Centers for Medicare & Medicaid Services (CMS), CMS Interoperability and Prior Authorization Final Rule (CMS-0057-F) | CMS (Fact Sheet), verified November 15, 2026).
Clearinghouse terms. If you use Stedi for eligibility checks, its BAA applies only to your HIPAA Account, not to other Stedi accounts (BAA (Stedi Business Associate Addendum, Version 1.3), verified November 15, 2026). Stedi also advises against sending requests with PHI through Postman, an API testing tool (Submit eligibility checks - API - Stedi Docs, verified November 15, 2026).
Where the data goes in a sleep prior authorization
The eligibility check is the easy part. Member ID, name and date of birth go to a clearinghouse, which returns coverage details. The packet is where a sleep practice's data gets sensitive.
The 5 to 14 problem. For a Medicare patient with an AHI of 22, one number meets the severity criterion. A patient with an AHI of 9 needs that number plus proof of a qualifying condition, and the Medicare list reaches past sleep: impaired cognition, mood disorders, hypertension, ischemic heart disease, stroke. So a tool built around a sleep score now reaches into psychiatric, cognitive and cardiac history.
Two packets leave the practice. One goes to the payer, through a portal or an e-fax service. A second goes to the CPAP supplier, the company that delivers and sets up the device. They need different things, but a simple build sends both the same template.
The loop may not close at approval. Continued Medicare coverage depends on benefit during the first 12 weeks. If your staff document that with nightly usage pulled from the CPAP maker's cloud portal, the device cloud becomes another hop. The tool then stores weeks of nightly data next to the packet, much like remote patient monitoring apps.
Other hops. Packet PDFs in file storage or a shared drive, the e-fax sent folder, and any AI model drafting a medical-necessity letter.
What this means for your app
Every storage hop needs a BAA. A company that stores PHI for you is a business associate even if it never looks at the data (HHS (Federal Register via govinfo.gov), Modifications to the HIPAA Privacy, Security, Enforcement, and Breach Notification Rules Under the HITECH Act and GINA; Other Modifications to the HIPAA Rules (Final Rule), 78 FR 5566, verified November 15, 2026). That covers the shared drive, the e-fax service and the database behind your tool. Google, for example, says customers who have not signed its BAA must not use PHI in Google Workspace (HIPAA Compliance with Google Workspace and Cloud Identity, verified November 26, 2026).
AI letter drafting is a vendor too. OpenAI requires a signed BAA before its API is used with PHI (Getting a Business Associate Agreement for the OpenAI API | OpenAI Help Center, verified November 27, 2026), and its API also needs an account set up for Modified Retention, unless OpenAI says otherwise (HIPAA eligible products and functionality | OpenAI Help Center, verified November 27, 2026). Anthropic's BAA covers its first-party API and certain other services (Anthropic, Business Associate Agreements (BAA) for Commercial Customers, verified November 27, 2026), but beta features are generally not covered unless Anthropic lists them as eligible (Anthropic, API and data retention - Claude Docs, verified November 15, 2026). See the OpenAI API page and the Anthropic API page.
Who submitted what must be traceable. HIPAA requires a unique name or number for each person using a system that holds electronic PHI (HHS (eCFR), 45 CFR 164.312 -- Technical safeguards., verified November 15, 2026). With a shared front-desk login, nobody can say who sent a packet.
How this goes wrong: the psychiatry consult in the CPAP packet
This is a hypothetical. Imagine a sleep physician who vibe codes a prior authorization helper. For the hard cases, patients with an AHI between 5 and 14, the tool searches the chart for any qualifying condition and attaches the whole note where it finds a match, so nothing gets denied for missing documentation.
For one patient the search hits the word depression in a scanned psychiatry consult. The tool attaches all of it: a past suicide attempt, family history, medications. The packet goes to the payer. Because the same template feeds the CPAP supplier, the supplier receives the consult too. Every packet is also saved to a shared drive folder on a Google Workspace account where no one ever accepted Google's BAA.
Nothing was hacked. But the payer received far more than a payment request needed, and the minimum necessary rule applies to payment. The supplier, which needed the order and the qualifying result, now holds a psychiatric history. And a storage vendor with no BAA holds every packet the tool has built. An impermissible disclosure is presumed to be a breach unless a risk assessment shows a low probability the PHI was compromised (HHS (eCFR), 45 CFR 164.402 -- Definitions., verified November 15, 2026). Counsel and the privacy officer now work through each recipient: was the disclosure permitted, and is notification owed?
The fix was never a better search. It was sending one line, the qualifying diagnosis, instead of the document it came from.
The sleep medicine additions to the insurance verification and prior authorization checklists
Run the general checklists in Building Your Own Insurance Verification Tool: The HIPAA Guide and Building Your Own Prior Authorization Tool: The HIPAA Guide first. These are the items a sleep practice adds.
- Map each criterion to one field. AHI or RDI value and test type, the qualifying diagnosis line, the ordering physician. Send the field, not the note it came from. Never auto-attach full notes, least of all behavioral health notes.
- Two templates, two contents. The payer packet carries the medical-necessity evidence. The supplier packet carries the order and the qualifying result. HIPAA counts dispensing a prescribed device as health care (HHS, 45 CFR 160.103 Definitions, verified November 15, 2026), and minimum necessary does not apply to disclosures to a provider for treatment (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026). Ask counsel how that applies to your suppliers. Either way, a short supplier template is a sound design choice.
- Record the ordering physician and the submitter. Store which treating physician ordered the sleep test and which staff member, under an individual login, submitted each request, so the packet and the audit trail match.
- Eligibility only through a covered clearinghouse account. Confirm the BAA covers the exact account and API keys your tool uses. Test with made-up member IDs, never real ones in a cloud-synced API tool.
- Per-user device-cloud logins. If staff pull 12-week CPAP usage, each uses their own login. Confirm in writing what agreement covers that cloud before your tool stores or forwards its data.
- AI drafts from fields, not charts. If a model drafts medical-necessity letters, use only an API covered by a BAA and feed it the mapped fields. A clinician reviews each letter.
- Track payer clocks. Show 72-hour and seven-day due dates for Medicare Advantage and Medicaid or CHIP requests, and plan for the MIPS Electronic Prior Authorization measure in 2027.
- Packets live in BAA-covered storage only. No personal drives, and no shared folders without a BAA.
Related sleep medicine and insurance guides
Sleep siblings: sleep questionnaire intake, where the 5 to 14 symptoms are first written down, and sleep study results delivery. Other specialties: GLP-1 prior authorization (drug coverage and weight criteria) and insurance in direct primary care.
Keep, refactor, or rebuild?
The screens, the eligibility call and the payer tracking in most sleep prior authorization tools can stay. What usually changes is the packet builder: full-note attachment gives way to mapped fields, payer and supplier templates split, and storage, e-fax and AI calls move under BAAs. If packets already went to a non-covered drive, treat that as an incident for counsel first, then refactor.
Not sure which bucket your tool falls in? The keep, refactor or rebuild guide walks through the decision.
Frequently asked questions
What does Medicare need to approve CPAP for a patient with an AHI of 5 to 14?
Under traditional Medicare's NCD, a patient with an AHI or RDI of 5 to 14 qualifies for the initial 12-week period only with documented excessive daytime sleepiness, impaired cognition, mood disorders or insomnia, or documented hypertension, ischemic heart disease or history of stroke (CMS, Medicare National Coverage Determinations Manual, Chapter 1, Part 4 (Sections 200-310.1), verified November 15, 2026). Your tool should send the qualifying line, not the full note. Other payers may use different criteria.
Is an automated insurance eligibility check covered by HIPAA?
Yes. Eligibility for a health plan is on HIPAA's list of standard transactions (HHS (45 CFR 160.103), 45 CFR 160.103 Definitions, verified November 15, 2026), and a practice may have a clearinghouse run it as a business associate (HHS (eCFR), 45 CFR 162.923 -- Requirements for covered entities., verified November 15, 2026). That clearinghouse needs a BAA covering the account your tool calls.
Can my prior auth tool send the same packet to the payer and the CPAP supplier?
It should not. The payer needs medical-necessity evidence; the supplier needs the order and the qualifying result. The payer request is a payment activity (HHS (eCFR), 45 CFR 164.501 -- Definitions., verified November 15, 2026), so the minimum necessary standard applies (HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules., verified November 15, 2026). Ask counsel how the rules apply to what you send the supplier.
Can I test my eligibility checks in Postman with a real patient's member ID?
Stedi advises against it, because Postman stores request history, including full payloads, on its cloud servers by default (Submit eligibility checks - API - Stedi Docs, verified November 15, 2026). Use made-up test data.
Can an AI model write our CPAP medical-necessity letters?
Only through a service covered by a BAA. For the OpenAI API, that means a signed BAA (Getting a Business Associate Agreement for the OpenAI API | OpenAI Help Center, verified November 27, 2026) and an account set up for Modified Retention, unless OpenAI says otherwise (HIPAA eligible products and functionality | OpenAI Help Center, verified November 27, 2026). Feed it the mapped fields, not the whole chart, and have a clinician review each letter before it goes out.
Palo Alto Health Labs Fabrica
Keep building. We make it safe.
Built a prior auth helper that already attaches chart notes to sleep study or CPAP packets? This is the conversation to have before the next packet goes out.
Fabrica moves the patient data in your vibe-coded app into an environment your practice owns, built for HIPAA compliance, with a BAA. You keep building in the tool you already use. Start with a 30-minute call about what you have built and where patient data goes today.
See how Fabrica works and book a 30-minute call
Please do not send patient information when you get in touch. The call is a conversation, not an audit or legal advice.
Sources
Every vendor statement on this page comes from the vendor's own terms, documentation or trust pages, or from the regulator, opened and read on the date shown. Vendor terms change; confirm the current version and your own signed agreement before relying on it. This page is general information, not legal advice.
- HHS (45 CFR 160.103), 45 CFR 160.103 Definitions. Checked November 15, 2026. Page dated eCFR current as of 2026-11-01.
- HHS (eCFR), 45 CFR 162.923 -- Requirements for covered entities.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-01.
- HHS (eCFR), 45 CFR 164.501 -- Definitions.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-01.
- HHS (eCFR), 45 CFR 164.502 -- Uses and disclosures of protected health information: General rules.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- CMS, Medicare National Coverage Determinations Manual, Chapter 1, Part 4 (Sections 200-310.1). Checked November 15, 2026. Page dated PDF fetched 2026-11-15.
- Centers for Medicare & Medicaid Services (CMS), CMS Interoperability and Prior Authorization Final Rule (CMS-0057-F) | CMS fact sheet. Checked November 15, 2026. Page dated Fact sheet dated Jan 17, 2024.
- BAA (Stedi Business Associate Addendum, Version 1.3). Checked November 15, 2026. Page dated Effective April 14, 2025.
- Submit eligibility checks - API - Stedi Docs. Checked November 15, 2026.
- HHS (Federal Register via govinfo.gov), Modifications to the HIPAA Privacy, Security, Enforcement, and Breach Notification Rules Under the HITECH Act and GINA; Other Modifications to the HIPAA Rules (Final Rule), 78 FR 5566. Checked November 15, 2026. Page dated 2013-01-25.
- HIPAA Compliance with Google Workspace and Cloud Identity. Checked November 26, 2026. Page dated Last updated 2026-11-10 UTC.
- Getting a Business Associate Agreement for the OpenAI API | OpenAI Help Center. Checked November 27, 2026. Page dated Updated: 13 days ago (relative date as displayed on 2026-11-15, i.e. ~2026-11-02).
- HIPAA eligible products and functionality | OpenAI Help Center. Checked November 27, 2026. Page dated Updated: 5 days ago (relative date as displayed on 2026-11-15, i.e. ~2026-11-10).
- Anthropic, Business Associate Agreements (BAA) for Commercial Customers. Checked November 27, 2026.
- Anthropic, API and data retention - Claude Docs. Checked November 15, 2026.
- HHS (eCFR), 45 CFR 164.312 -- Technical safeguards.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- HHS (eCFR), 45 CFR 164.402 -- Definitions.. Checked November 15, 2026. Page dated eCFR text current as of 2026-11-12 (Title 45 up to date as of 2026-11-12).
- HHS, 45 CFR 160.103 Definitions. Checked November 15, 2026. Page dated eCFR current as of 2026-11-01.