Dev.to Security ๐Ÿ” Cybersecurity ๐Ÿ‘ 0 ๐Ÿ“– 4 min read

The New HIPAA Access Deadline Is 15 Days. Here Is a TypeScript Tracker for It

If you build healthcare software for US clients, a deadline in your system just got cut in half. HHS finalized HIPAA Privacy Rule amendments on 16 November 2026. Among other things, covered entities now have 15 calendar

The New HIPAA Access Deadline Is 15 Days. Here Is a TypeScript Tracker for It

If you build healthcare software for US clients, a deadline in your system just got cut in half.

HHS finalized HIPAA Privacy Rule amendments on 16 November 2026. Among other things, covered entities now have 15 calendar days (down from 30) to respond to a patient's right-of-access request, with one limited extension. Per K&L Gates' analysis, compliance is due around 17 July 2027.

Lawyers will handle the policy. But somebody has to build the workflow that makes "15 days" actually happen. That is usually us.

This post walks through two small, practical pieces for HIPAA compliant app development:

  1. A typed access-request tracker with due dates, an extension rule and escalation.
  2. A log redactor so PHI never ends up in your log pipeline.

Not legal advice. Exact timelines and extension rules should come from your client's counsel. The code shows the pattern, not a compliance guarantee.

1. Model the request as a state machine

Emails and spreadsheets lose clocks. A state machine does not.

// access-request.ts
export type AccessState =
  | "received"
  | "identity_verified"
  | "in_progress"
  | "extended"
  | "fulfilled"
  | "denied";

export interface AccessRequest {
  id: string;
  patientId: string;          // internal ID only, never a name or MRN in logs
  receivedAt: Date;
  state: AccessState;
  extensionNoticeSentAt?: Date;
  history: { at: Date; from: AccessState; to: AccessState; actor: string }[];
}

const ALLOWED: Record<AccessState, AccessState[]> = {
  received: ["identity_verified", "denied"],
  identity_verified: ["in_progress", "denied"],
  in_progress: ["extended", "fulfilled", "denied"],
  extended: ["fulfilled", "denied"],
  fulfilled: [],
  denied: [],
};

export function transition(
  req: AccessRequest,
  to: AccessState,
  actor: string,
  now = new Date()
): AccessRequest {
  if (!ALLOWED[req.state].includes(to)) {
    throw new Error(`Illegal transition ${req.state} -> ${to}`);
  }
  if (to === "extended" && !req.extensionNoticeSentAt) {
    throw new Error("Send the written extension notice before extending");
  }
  return {
    ...req,
    state: to,
    history: [...req.history, { at: now, from: req.state, to, actor }],
  };
}

The history array is your audit trail. Persist it append-only (for example an insert-only table) so nobody can quietly rewrite when a request was received.

2. Compute the due date, in calendar days

The new rule counts calendar days, not business days. Keep the numbers in config, because counsel may interpret extensions for your client differently.

// deadlines.ts
export const POLICY = {
  initialDays: 15,     // Privacy Rule 2026 right-of-access window
  extensionDays: 15,   // confirm with counsel for your client
  warnAtDay: 10,
  escalateAtDay: 13,
};

const DAY_MS = 24 * 60 * 60 * 1000;

export function dueDate(req: AccessRequest): Date {
  const base = req.receivedAt.getTime() + POLICY.initialDays * DAY_MS;
  return req.state === "extended"
    ? new Date(base + POLICY.extensionDays * DAY_MS)
    : new Date(base);
}

export function daysElapsed(req: AccessRequest, now = new Date()): number {
  return Math.floor((now.getTime() - req.receivedAt.getTime()) / DAY_MS);
}

export type Alert = "ok" | "warn" | "escalate" | "overdue";

export function alertLevel(req: AccessRequest, now = new Date()): Alert {
  if (req.state === "fulfilled" || req.state === "denied") return "ok";
  if (now > dueDate(req)) return "overdue";
  if (req.state === "extended") return "warn";
  const d = daysElapsed(req, now);
  if (d >= POLICY.escalateAtDay) return "escalate";
  if (d >= POLICY.warnAtDay) return "warn";
  return "ok";
}

Run alertLevel from a daily cron or queue worker and route escalate and overdue to a named owner, not a shared channel nobody reads.

HIPAA right-of-access request state machine for healthcare app development: received, identity verified, in progress, extended, fulfilled, denied

3. A quick test so the clock never regresses

// deadlines.test.ts
import { alertLevel } from "./deadlines";

const base = {
  id: "r1",
  patientId: "p_123",
  receivedAt: new Date("2027-08-01T00:00:00Z"),
  state: "in_progress" as const,
  history: [],
};

test("escalates on day 13", () => {
  expect(alertLevel(base, new Date("2027-08-14T09:00:00Z"))).toBe("escalate");
});

test("overdue after 15 calendar days", () => {
  expect(alertLevel(base, new Date("2027-08-16T01:00:00Z"))).toBe("overdue");
});

4. Keep PHI out of your logs

The tracker is useless if your logs leak the data it protects. Side channels (logs, crash reports, analytics) are where health apps most often leak.

// redact.ts
const PHI_KEYS = new Set([
  "name", "firstName", "lastName", "dob", "dateOfBirth", "email",
  "phone", "address", "ssn", "mrn", "diagnosis", "notes", "labResults",
]);

export function redact(value: unknown): unknown {
  if (Array.isArray(value)) return value.map(redact);
  if (value && typeof value === "object") {
    return Object.fromEntries(
      Object.entries(value as Record<string, unknown>).map(([k, v]) =>
        PHI_KEYS.has(k) ? [k, "[REDACTED]"] : [k, redact(v)]
      )
    );
  }
  return value;
}

// usage with any logger
logger.info("access_request.updated", redact({ id, state, patient }));

An allowlist (log only known-safe keys) is stricter than this denylist. Start with the denylist if you are retrofitting, then move to an allowlist.

5. What else belongs on the checklist

Code is one layer. For a production health app, also plan for:

  • Business associate agreements with every vendor that touches PHI (cloud, email, SMS, AI APIs). Per K&L Gates, BAAs must reflect the new rule by 18 January 2028 at the latest.
  • Personal health app connections. The rule now defines "personal health application." Patient-facing APIs (often FHIR with OAuth scopes) need scoped, revocable consent records. Good API development practice makes this much easier.
  • HIPAA Security Rule update readiness. The overhaul, now projected for July 2027, proposes encryption, MFA, annual penetration tests and tested incident response plans. Build them in now.
  • Mobile clients. If you ship on iOS and Android, keep PHI out of push notification text and crash reports. Experienced React Native developers will already treat those as data flows.

Developer checklist for HIPAA compliant app development: audit trail, calendar-day deadlines, log redaction, BAAs, app consent, Security Rule readiness

Wrap up

A legal deadline only works if the system enforces it. A small state machine, a config-driven clock, two tests and a log redactor cover a surprising amount of ground before July 2027.

How does your team track regulatory deadlines today: in code, in a ticketing tool, or in someone's head? Drop it in the comments.

At Webshark (ISO 27001 and CMMI Level 3 certified), we build mobile apps, SaaS and AI products for clients across 18+ countries, and we run Webshark Health, a Gen-AI personal health records app on iOS and Android. https://www.webshark.tech/

This post was written with AI and published by the author.

๐Ÿ“ฐ Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.