Patient responsibility breakdown
BodyEach claim line goes from billed charge to allowed amount, and the gap is printed as the provider's write-off, never as owed, unless the line is out of network and not protected by the No Surprises Act, when it is a balance bill. Copay, deductible and coinsurance are taken in the plan's own order: copay before or after the deductible, counting toward it or not. Coinsurance is on what is left after both, not on the allowed amount. The deductible and out-of-pocket balances carry from line to line in date order, cost share stops at the out-of-pocket maximum, and later covered lines say the plan pays 100%. Non-covered charges and balance bills come after the cap because they never count toward it. Everything is in integer cents, with coinsurance rounded once per line, so the totals are the sum of the printed rows. A denied line is not billed. All of it is one deriver.
npx dxcl add patient-responsibility-breakdown Preview data
the JSON this preview was built with{
"patientResponsibility": {
"currency": "USD",
"plan": {
"deductibleRemainingMinor": 285000,
"oopRemainingMinor": 912500,
"coinsuranceRate": 0.3,
"copayAppliesBeforeDeductible": true,
"copayCountsTowardDeductible": false
},
"lines": [
{
"serviceDate": "2026-09-02",
"code": "99215",
"description": "Office visit, established patient, high complexity, with extended review of outside imaging",
"billedMinor": 48500,
"allowedMinor": 21437,
"copayMinor": 6500,
"copayOnly": true,
"network": "in",
"covered": true
},
{
"serviceDate": "2026-09-14",
"code": "27447",
"description": "Total knee arthroplasty, right knee, including surgeon's intraoperative and post-operative care",
"billedMinor": 7845000,
"allowedMinor": 3196428,
"network": "in",
"covered": true
},
{
"serviceDate": "2026-09-14",
"code": "0120",
"description": "Inpatient surgical admission, semi-private room and board, four days, with operating and recovery room",
"billedMinor": 24875000,
"allowedMinor": 9641237,
"network": "in",
"covered": true
},
{
"serviceDate": "2026-09-15",
"code": "01402",
"description": "Anesthesia for knee arthroplasty by an out-of-network anesthesiologist at an in-network hospital",
"billedMinor": 1265000,
"allowedMinor": 412850,
"network": "out",
"nsaProtected": true,
"covered": true
},
{
"serviceDate": "2026-10-06",
"code": "97110",
"description": "Therapeutic exercise, eight 15-minute units, outpatient physical therapy at an out-of-network clinic",
"billedMinor": 192000,
"allowedMinor": 84000,
"network": "out",
"nsaProtected": false,
"covered": true
},
{
"serviceDate": "2026-10-20",
"code": "S9451",
"description": "Exercise classes by a non-physician provider, not a covered benefit under this plan",
"billedMinor": 36000,
"covered": false
}
]
}
} Rendered preview
each arrangement, rendered on its ownarrangement="table" default arrangement="stacked" Resolved nodes
what a renderer receives — 1 nodespatient-responsibility section The files
what installing writes; the selected file is the componentnodes/patient-responsibility-breakdown.node.tsx import { arrange, type Nodes, Paragraph, Section, useDeriver, useState } from "docxcelerate/template";
import type { PatientResponsibilityBreakdownLines } from "../arrangements/patient-responsibility-breakdown/lines.ts";
import { stacked } from "../arrangements/patient-responsibility-breakdown/stacked.arrangement.tsx";
import { table } from "../arrangements/patient-responsibility-breakdown/table.arrangement.tsx";
import patientResponsibilityBreakdown from "../derivers/patient-responsibility-breakdown.deriver.ts";
/**
* A statement section that takes each claim line from billed charge to allowed
* amount to what the patient owes, and shows the deductible, copay and
* coinsurance on each line and the balances left after the last one.
*
* Decisions already made for you:
*
* - Write-offs are not owed. The gap between billed and allowed is the
* provider's write-off and is never shown as owed. The one exception is an
* out-of-network line the No Surprises Act does not protect: there the gap is
* a balance bill.
* - Plan order is followed. Copay comes before or after the deductible, and
* counts toward it or not, as the plan says.
* - Coinsurance is on the remainder: what is left after the deductible and
* copay, not the allowed amount.
* - One cap across the statement. Deductible and out-of-pocket balances carry
* from line to line in service-date order. Cost share stops at the
* out-of-pocket maximum, and later covered lines say the plan pays 100%.
* - Some charges sit outside the cap. Non-covered charges and balance bills are
* added after it and never count toward the deductible or the maximum.
* - Totals add up exactly. All arithmetic is in integer cents and each line's
* coinsurance is rounded once, half up, so the total is the sum of the
* printed lines and never drifts by a cent from the rows.
* - Missing fields fall on the side that never overstates what the patient
* owes: a missing `covered` means covered, a missing `network` means in
* network, a missing `nsaProtected` means protected.
* - Denials are not billed. A covered line the plan allowed nothing for is not
* billed to the patient.
*
* All of it is decided in one deriver, because every step is arithmetic,
* sorting or comparison on request data, and publishing refuses all of those.
* The node computes nothing: it reads the result and branches on it, with every
* test written inline so a publish build keeps each arm.
*
* Arrangement: where the lines sit is a separate choice from what they say,
* made with the `arrangement` prop. This file decides every line; each
* arrangement, in `arrangements/patient-responsibility-breakdown/`, only
* places them, so both print the same lines under the same conditions.
*
* The rows are a published loop over the deriver's rows (`.map()` over derived
* data resolves by scope), so there is no row limit.
*
* Installed by `dxcl add patient-responsibility-breakdown`, which also installs its deriver.
*/
/** What this component reads. Add these fields to your document data type. */
export interface PatientResponsibilityData {
patientResponsibility: {
/**
* ISO 4217 code the amounts are in. It also sets how many minor units
* make one major unit. Missing means "USD". Throws when `Intl` does not
* know the code.
*/
currency?: string;
/**
* Where the patient's plan stood before the first line on this statement:
* the accumulators from the payer's latest EOB, for the plan year these
* services fall in.
*/
plan: {
/**
* Deductible still to meet before the first line, in integer minor
* units (50000 is $500.00). 0 means already met. Required: throws when
* it is missing, negative or not an integer.
*/
deductibleRemainingMinor: number;
/**
* Out-of-pocket maximum still to meet before the first line, in integer
* minor units. 0 means already met: every covered line prints "plan
* pays 100%". Required: throws when it is missing, negative or not an
* integer.
*/
oopRemainingMinor: number;
/**
* The patient's coinsurance as a fraction: 0.2 is 20%. It is rounded to
* the nearest basis point (0.01%) before use, so the arithmetic stays in
* integers. Required: throws when it is missing, not finite, below 0 or
* above 1.
*/
coinsuranceRate: number;
/**
* True: the copay is taken first and the deductible applies to what is
* left. False: the deductible is taken first and the copay applies to
* what is left after it. Missing means true, the common design.
* Ignored on `copayOnly` lines.
*/
copayAppliesBeforeDeductible?: boolean;
/**
* True: a copay paid also reduces the deductible remaining, from the
* moment it is taken. With copay first, that lowers the same line's
* deductible portion. With deductible first, it affects only later
* lines. Missing means false, the ACA-typical design.
*/
copayCountsTowardDeductible?: boolean;
};
/**
* One entry per claim line, in any order. They are sorted by
* `serviceDate`, with ties kept in input order, and printed in that order,
* because the running balances are only true in that order. Missing or
* empty means there is nothing to show, and the component prints nothing.
*/
lines?: Array<{
/**
* Date of service, ISO 8601. Anything after the tenth character is
* ignored. Required: throws when it is missing or not YYYY-MM-DD.
*/
serviceDate: string;
/**
* What the service was, as it should be printed. Required: throws when
* it is missing or blank.
*/
description: string;
/**
* Procedure or revenue code (CPT, HCPCS, revenue code), printed beside
* the date. Missing or empty prints the date alone.
*/
code?: string;
/**
* The provider's charge, in integer minor units. Required: throws when
* it is missing, negative or not an integer.
*/
billedMinor: number;
/**
* What the plan allowed, in integer minor units. Required on a covered
* line: throws when it is missing, negative, not an integer, or above
* `billedMinor`. 0 on a covered line with a non-zero charge is a denial.
* Ignored when `covered` is false.
*/
allowedMinor?: number;
/**
* The plan's copay for this service, in integer minor units. Missing
* means 0. Never charged above what is left of the allowed amount.
* Throws when it is negative or not an integer.
*/
copayMinor?: number;
/**
* True when the plan pays everything after the copay on this service
* (the usual office-visit design): no deductible and no coinsurance on
* this line. Missing means false.
*/
copayOnly?: boolean;
/**
* Whether the plan covers this service at all. False: the whole billed
* charge is the patient's, outside the deductible and the out-of-pocket
* maximum. Missing means true, because billing a full charge on a guess
* is the worse mistake.
*/
covered?: boolean;
/**
* Whether the provider is in the plan's network. Missing means "in".
* Throws on any other value.
*/
network?: "in" | "out";
/**
* Out-of-network lines only: whether the No Surprises Act protects this
* service (emergency care, an out-of-network clinician at an in-network
* facility without consent, air ambulance). Protected: in-network cost
* sharing and no balance bill. Missing means true, because balance
* billing a protected service is unlawful. Ignored on in-network lines.
*/
nsaProtected?: boolean;
}>;
};
}
/**
* Where the lines sit.
*
* - `table`: one row per claim line, the amounts in columns. The default.
* - `stacked`: one labelled block per claim line, down the text column.
*/
export type PatientResponsibilityBreakdownArrangement = "table" | "stacked";
/** Props for {@linkcode PatientResponsibilityBreakdown}. */
export interface PatientResponsibilityBreakdownProps {
/** Where the lines sit. Defaults to `"table"`. */
arrangement?: PatientResponsibilityBreakdownArrangement;
}
/**
* Prints what the patient owes on each claim line, then what is written off,
* what sits outside the cap and what is still to meet. Prints nothing when
* there are no lines.
*/
export const PatientResponsibilityBreakdown: Nodes<PatientResponsibilityBreakdownProps> = async (
{ arrangement },
) => {
const [patientResponsibility] = useState((data: PatientResponsibilityData) => data.patientResponsibility);
const p = await useDeriver(patientResponsibilityBreakdown, [patientResponsibility]);
const lines: PatientResponsibilityBreakdownLines = { rows: p.rows, total: p.total };
return (
<>
{p.outcome !== "none" && (
<Section id="patient-responsibility" title="Your share of the cost">
{p.outcome === "owes" && (
<Paragraph id="patient-responsibility-owes">You owe {p.total.youOwe} for the services below.</Paragraph>
)}
{p.outcome === "nothing-owed" && (
<Paragraph id="patient-responsibility-nothing-owed">You owe nothing for the services below.</Paragraph>
)}
{arrange(arrangement, { table: () => table(lines), stacked: () => stacked(lines) })}
{p.hasAdjustment && (
<Paragraph id="patient-responsibility-adjustment">
{p.adjustment} of the billed charges is written off under the provider's agreement with your plan. You do
not owe it.
</Paragraph>
)}
{p.hasExcluded && (
<Paragraph id="patient-responsibility-excluded">
{p.excluded} of what you owe is for services your plan does not cover or for out-of-network charges above
the allowed amount. It does not count toward your deductible or out-of-pocket maximum.
</Paragraph>
)}
{p.oopMet && (
<Paragraph id="patient-responsibility-oop-met">
You have reached your plan's out-of-pocket maximum. Covered services are paid in full for the rest of the
plan year.
</Paragraph>
)}
{!p.oopMet && (
<Paragraph id="patient-responsibility-remaining">
Still to meet after these services: {p.deductibleRemaining} of your deductible and {p.oopRemaining} of
your out-of-pocket maximum.
</Paragraph>
)}
</Section>
)}
</>
);
}; derivers/patient-responsibility-breakdown.deriver.ts // deno-lint-ignore-file no-explicit-any
import { deriver } from "docxcelerate/template";
/**
* Takes each claim line from billed charge to allowed amount to what the
* patient owes, carrying the deductible and out-of-pocket balances from line to
* line. Installed by `dxcl add patient-responsibility-breakdown`.
*
* It is self-contained on purpose: it travels to the engine as source text, so
* a module-level constant or helper would be a ReferenceError there. Every
* helper is declared inside `run`.
*/
export default deriver({
name: "patientResponsibilityBreakdown",
run: (patientResponsibility: unknown) => {
const pr = patientResponsibility as any;
// Currency first: the exponent decides how every amount is read and printed.
const currency = pr?.currency ?? "USD";
let money: Intl.NumberFormat;
try {
money = new Intl.NumberFormat("en-US", { style: "currency", currency });
} catch {
throw new Error("patientResponsibility.currency must be an ISO 4217 code");
}
const exponent = money.resolvedOptions().maximumFractionDigits as number;
const fmt = (minor: number) => money.format(minor / 10 ** exponent);
const dates = new Intl.DateTimeFormat("en-US", { dateStyle: "medium", timeZone: "UTC" });
const minorOf = (value: unknown, field: string): number => {
if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
throw new Error(field + " must be a non-negative integer of minor units");
}
return value;
};
const plan = pr?.plan;
let ded = minorOf(plan?.deductibleRemainingMinor, "patientResponsibility.plan.deductibleRemainingMinor");
let oop = minorOf(plan?.oopRemainingMinor, "patientResponsibility.plan.oopRemainingMinor");
const rate = plan?.coinsuranceRate;
if (typeof rate !== "number" || !Number.isFinite(rate) || rate < 0 || rate > 1) {
throw new Error("patientResponsibility.plan.coinsuranceRate must be a number from 0 to 1");
}
// Basis points keep the rate in integers.
const bp = Math.round(rate * 10000);
const copayFirst = plan.copayAppliesBeforeDeductible ?? true;
const counts = plan.copayCountsTowardDeductible ?? false;
// Meeting the out-of-pocket maximum satisfies the deductible too.
if (oop === 0) ded = 0;
const raw: unknown[] = pr.lines === undefined || pr.lines === null ? [] : pr.lines;
if (!Array.isArray(raw)) throw new Error("patientResponsibility.lines must be an array");
// Validate everything before any arithmetic, so a bad line never half-prints.
const checked = raw.map((l: any, i) => {
const f = "patientResponsibility.lines[" + i + "]";
if (typeof l?.serviceDate !== "string" || !/^\d{4}-\d{2}-\d{2}/.test(l.serviceDate)) {
throw new Error(f + ".serviceDate must be an ISO 8601 date");
}
if (typeof l.description !== "string" || l.description.trim() === "") {
throw new Error(f + ".description is required");
}
const billed = minorOf(l.billedMinor, f + ".billedMinor");
const covered = l.covered !== false;
let allowed = 0;
if (covered) {
allowed = minorOf(l.allowedMinor, f + ".allowedMinor");
if (allowed > billed) throw new Error(f + ".allowedMinor must not be above billedMinor");
}
const copay = l.copayMinor === undefined ? 0 : minorOf(l.copayMinor, f + ".copayMinor");
if (l.network !== undefined && l.network !== "in" && l.network !== "out") {
throw new Error(f + '.network must be "in" or "out"');
}
return { l, i, f, day: l.serviceDate.slice(0, 10), billed, covered, allowed, copay };
});
// Stable by construction: ties fall back to input order.
checked.sort((a, b) => (a.day < b.day ? -1 : a.day > b.day ? 1 : a.i - b.i));
type Row = {
service: string;
detail: string;
billed: string;
allowed: string;
deductible: string;
copay: string;
coinsurance: string;
youOwe: string;
note: string | null;
};
const rows: Row[] = [];
const sum = { billed: 0, allowed: 0, deductible: 0, copay: 0, coinsurance: 0, youOwe: 0 };
let adjustmentTotal = 0;
let excludedTotal = 0;
for (const c of checked) {
let deductible = 0;
let copay = 0;
let coinsurance = 0;
let notCovered = 0;
let balance = 0;
let adjustment = 0;
let note: string | null = null;
if (!c.covered) {
notCovered = c.billed;
note = "Not covered by your plan. The full charge of " + fmt(c.billed) +
" is yours to pay, and it does not count toward your deductible or out-of-pocket maximum.";
} else if (c.allowed === 0 && c.billed > 0) {
note = "Your plan allowed nothing for this service, so nothing is billed to you for it on this statement.";
} else if (c.allowed > 0) {
const out = c.l.network === "out";
const unprotected = out && c.l.nsaProtected === false;
if (unprotected) balance = c.billed - c.allowed;
else adjustment = c.billed - c.allowed;
const startOop = oop;
// Every cost-share step passes through the cap, in plan order.
const take = (x: number) => {
const t = Math.min(x, oop);
oop -= t;
return t;
};
let left = c.allowed;
const copayStep = () => {
copay = take(Math.min(c.copay, left));
left -= copay;
if (counts) ded -= Math.min(copay, ded);
};
const deductibleStep = () => {
deductible = take(Math.min(left, ded));
left -= deductible;
ded -= deductible;
};
if (c.l.copayOnly === true) copayStep();
else {
if (copayFirst) {
copayStep();
deductibleStep();
} else {
deductibleStep();
copayStep();
}
if (!Number.isSafeInteger(left * bp)) throw new Error(c.f + ".allowedMinor is too large to apply the rate exactly");
// Half up to the cent, on what is left after the deductible and copay.
coinsurance = take(Math.floor((left * bp + 5000) / 10000));
}
if (oop === 0) ded = 0;
if (balance > 0) {
note = "Out of network. The provider bills you the " + fmt(balance) +
" above your plan's allowed amount, which does not count toward your deductible or out-of-pocket maximum.";
} else if (c.billed === 0) {
note = null;
} else if (startOop > 0 && oop === 0) {
note = "You reached your out-of-pocket maximum with this service. Your plan pays the rest.";
} else if (startOop === 0) {
note = "Your plan pays 100%: you have already reached your out-of-pocket maximum.";
} else if (out) {
note = "Out of network, but protected by the No Surprises Act: you pay in-network cost sharing and cannot be billed the difference.";
}
}
const youOwe = deductible + copay + coinsurance + notCovered + balance;
sum.billed += c.billed;
sum.allowed += c.covered ? c.allowed : 0;
sum.deductible += deductible;
sum.copay += copay;
sum.coinsurance += coinsurance;
sum.youOwe += youOwe;
adjustmentTotal += adjustment;
excludedTotal += notCovered + balance;
const code = typeof c.l.code === "string" ? c.l.code.trim() : "";
const date = dates.format(new Date(c.day + "T00:00:00Z"));
rows.push({
service: c.l.description,
detail: code ? date + " · " + code : date,
billed: fmt(c.billed),
allowed: fmt(c.covered ? c.allowed : 0),
deductible: fmt(deductible),
copay: fmt(copay),
coinsurance: fmt(coinsurance),
youOwe: fmt(youOwe),
note,
});
}
return {
outcome: (rows.length === 0 ? "none" : sum.youOwe > 0 ? "owes" : "nothing-owed") as
| "none"
| "owes"
| "nothing-owed",
rows,
total: {
billed: fmt(sum.billed),
allowed: fmt(sum.allowed),
deductible: fmt(sum.deductible),
copay: fmt(sum.copay),
coinsurance: fmt(sum.coinsurance),
youOwe: fmt(sum.youOwe),
},
youOweMinor: sum.youOwe,
adjustment: fmt(adjustmentTotal),
hasAdjustment: adjustmentTotal > 0,
excluded: fmt(excludedTotal),
hasExcluded: excludedTotal > 0,
deductibleRemaining: fmt(ded),
oopRemaining: fmt(oop),
oopMet: rows.length > 0 && oop === 0,
};
},
}); arrangements/patient-responsibility-breakdown/lines.ts /**
* What the patient responsibility breakdown hands each of its arrangements:
* every line already decided and formatted. An arrangement places these and
* decides nothing, so both print every amount, $0.00 included, and the note
* under the same condition.
*
* Installed by `dxcl add patient-responsibility-breakdown`, with the arrangements.
*/
export interface PatientResponsibilityBreakdownLines {
/** One per claim line, in service-date order. A published loop over the deriver's rows. */
rows: Array<{
/** The description, as given. */
service: string;
/** "Sep 14, 2026 · 27447", or just the date when there is no code. */
detail: string;
/** Formatted money, such as "$248,750.00". */
billed: string;
/** $0.00 on a non-covered or denied line. */
allowed: string;
/** The deductible taken on this line. */
deductible: string;
/** The copay taken on this line. */
copay: string;
/** The coinsurance taken on this line. */
coinsurance: string;
/** Deductible + copay + coinsurance + any non-covered charge + any balance bill. */
youOwe: string;
/** One sentence explaining the line, or null for an ordinary covered line. */
note: string | null;
}>;
/** The column totals, each the sum of the rows above it, formatted. */
total: {
/** The sum of the billed charges. */
billed: string;
/** The sum of the allowed amounts. */
allowed: string;
/** The sum of the deductible portions. */
deductible: string;
/** The sum of the copays. */
copay: string;
/** The sum of the coinsurance amounts. */
coinsurance: string;
/** The sum of what the patient owes, never recomputed from rates. */
youOwe: string;
};
} arrangements/patient-responsibility-breakdown/table.arrangement.tsx import { Cell, Paragraph, Row, Table, type Yield } from "docxcelerate/template";
import type { PatientResponsibilityBreakdownLines } from "./lines.ts";
/**
* One row per claim line with the amounts in columns, the layout of a real EOB.
* Each money column is 21mm, which holds "$248,750.00" and the "Coinsurance"
* header at body size.
*/
export const table = (lines: PatientResponsibilityBreakdownLines): Yield => (
<Table
id="patient-responsibility-lines"
columns={[
{ width: "auto" },
{ width: 21, align: "right" },
{ width: 21, align: "right" },
{ width: 21, align: "right" },
{ width: 21, align: "right" },
{ width: 21, align: "right" },
{ width: 21, align: "right" },
]}
>
<Row id="patient-responsibility-lines-header" header>
<Cell>Service</Cell>
<Cell>Billed</Cell>
<Cell>Allowed</Cell>
<Cell>Deductible</Cell>
<Cell>Copay</Cell>
<Cell>Coinsurance</Cell>
<Cell>You owe</Cell>
</Row>
{lines.rows.map((row) => (
<Row id="patient-responsibility-line">
<Cell>
<Paragraph id="patient-responsibility-line-service">{row.service}</Paragraph>
<Paragraph id="patient-responsibility-line-detail">{row.detail}</Paragraph>
{row.note && <Paragraph id="patient-responsibility-line-note">{row.note}</Paragraph>}
</Cell>
<Cell>{row.billed}</Cell>
<Cell>{row.allowed}</Cell>
<Cell>{row.deductible}</Cell>
<Cell>{row.copay}</Cell>
<Cell>{row.coinsurance}</Cell>
<Cell>{row.youOwe}</Cell>
</Row>
))}
<Row id="patient-responsibility-total">
<Cell>Total</Cell>
<Cell>{lines.total.billed}</Cell>
<Cell>{lines.total.allowed}</Cell>
<Cell>{lines.total.deductible}</Cell>
<Cell>{lines.total.copay}</Cell>
<Cell>{lines.total.coinsurance}</Cell>
<Cell>{lines.total.youOwe}</Cell>
</Row>
</Table>
); arrangements/patient-responsibility-breakdown/stacked.arrangement.tsx import { Paragraph, Text, type Yield } from "docxcelerate/template";
import type { PatientResponsibilityBreakdownLines } from "./lines.ts";
/**
* One labelled block per claim line, down the text column, then a total block.
* For a narrow column, or a statement read on a phone as a PDF: nothing has to
* line up with anything.
*/
export const stacked = (lines: PatientResponsibilityBreakdownLines): Yield => (
<>
{lines.rows.map((row) => (
<>
<Paragraph id="patient-responsibility-line-service"><Text bold>{row.service}</Text></Paragraph>
<Paragraph id="patient-responsibility-line-detail">{row.detail}</Paragraph>
<Paragraph id="patient-responsibility-line-billed">Billed: {row.billed}</Paragraph>
<Paragraph id="patient-responsibility-line-allowed">Allowed amount: {row.allowed}</Paragraph>
<Paragraph id="patient-responsibility-line-deductible">Deductible: {row.deductible}</Paragraph>
<Paragraph id="patient-responsibility-line-copay">Copay: {row.copay}</Paragraph>
<Paragraph id="patient-responsibility-line-coinsurance">Coinsurance: {row.coinsurance}</Paragraph>
<Paragraph id="patient-responsibility-line-you-owe">You owe: {row.youOwe}</Paragraph>
{row.note && <Paragraph id="patient-responsibility-line-note">{row.note}</Paragraph>}
</>
))}
<Paragraph id="patient-responsibility-total-heading"><Text bold>Total</Text></Paragraph>
<Paragraph id="patient-responsibility-total-billed">Billed: {lines.total.billed}</Paragraph>
<Paragraph id="patient-responsibility-total-allowed">Allowed amount: {lines.total.allowed}</Paragraph>
<Paragraph id="patient-responsibility-total-deductible">Deductible: {lines.total.deductible}</Paragraph>
<Paragraph id="patient-responsibility-total-copay">Copay: {lines.total.copay}</Paragraph>
<Paragraph id="patient-responsibility-total-coinsurance">Coinsurance: {lines.total.coinsurance}</Paragraph>
<Paragraph id="patient-responsibility-total-you-owe">You owe: {lines.total.youOwe}</Paragraph>
</>
);