// Screen: Intake — incoming prescriptions + New Rx entry (eRx / fax / phone / manual) // ---- Source documents (left pane of split entry forms) ---------------- function FaxDoc({ doc }) { return (
{doc.faxHead}
{doc.clinic}
{doc.addr}

Patient{doc.patient}
DOB{doc.dob}
Date{doc.date}

{doc.drug}

{doc.disp}

{doc.sig}
{doc.signature}
Prescriber signature {doc.npi}
); } function CallRecord({ doc }) { return (
{doc.line} {doc.time}
Inbound from
{doc.from}
Caller
{doc.caller}
Taken by
{doc.pharmacist}
Order
{doc.order}
{doc.readback}
{doc.foot}
); } // ---- Config-driven entry form (eRx / fax split / verbal split) -------- function EntryForm({ config, onClose, onSent, nav, showToast }) { const { useState } = React; const [phase, setPhase] = useState('form'); // form | processing | paid const [payer, setPayer] = useState(config.billing.default); const submit = () => { if (phase !== 'form') return; setPhase('processing'); window.setTimeout(() => setPhase('paid'), 1000); }; const p = config.paid; const money = (n) => '$' + n.toFixed(2); const formBody = ( {/* Patient match / transcription */}
✓ {config.match.profile ? 'Matched existing patient' : 'Patient on file'} {config.match.name} {config.match.meta} {config.match.profile ? ( ) : null}
{config.transcript ?
{config.transcript}
: null}
{/* Prescriber + drug + sig */}
Prescriber
{config.prescriber.name} · {config.prescriber.clinic} {config.prescriber.npi}
Drug
{config.drug.name} {config.drug.mfr}
Sig
{config.sig.code} “{config.sig.text}”
Dispense
{/* Insurance */}
Billing
Clinical {config.clinical}
{/* Submit / result */}
{phase === 'paid' ? (
PAID {p.payerLabel} · response in 0.8 s
{money(p.copay)}
Copay
{money(p.plan)}
Plan paid
{money(p.total)}
Total
{money(p.acq)}
Acquisition
{money(p.gp)}
Gross profit · {p.margin}
) : (
{phase === 'processing' ? ( {p.processing} ) : null}
)}
); return (
{config.kicker} {config.badge}
{config.split ? (
{config.split === 'fax' ? : }
{formBody}
) : (
{formBody}
)}
); } // ---- Phone IVR refill review (compact modal) -------------------------- function PhoneModal({ data, onClose, onQueue, nav }) { return (
Refill request · Phone IVR Refill · no new Rx
Call record
{data.timeline.map((t, i) => (
{t[0]}{t[1]}
))}
✓ Matched patient {data.patient}
{data.facts.map((f, i) => (
{f[0]}
{f[1]}
))}
Eligible today
); } // ---- Intake screen ---------------------------------------------------- function Intake({ nav, entered, setEntered }) { const { useState } = React; const [openId, setOpenId] = useState(null); const [phoneOpen, setPhoneOpen] = useState(false); const [manualOpen, setManualOpen] = useState(false); const [toast, showToast] = useToast(); const rows = INTAKE_ITEMS.filter(i => !entered[i.id]); const handleRow = (item) => { if (item.id === 'in5') return setPhoneOpen(true); if (ENTRY_CONFIGS[item.id]) return setOpenId(item.id); showToast('Demo supports the highlighted prescriptions.'); }; const onSent = () => { const cfg = ENTRY_CONFIGS[openId]; nav.addRx(cfg.record); setEntered(e => ({ ...e, [openId]: true })); setOpenId(null); showToast(cfg.toast); }; const onQueueRefill = () => { nav.addRx(PHONE_REFILL.record); setEntered(e => ({ ...e, in5: true })); setPhoneOpen(false); showToast(PHONE_REFILL.toast); }; const onManualSent = (record, msg) => { nav.addRx(record); setManualOpen(false); showToast(msg); }; return (
nav.go('queue')}>
{rows.map(item => (
{item.kind} {item.time}
{item.fax ? (
) : null}
{item.drug}
{item.patient} · {item.prescriber}
{item.store}
))} {rows.length === 0 ? (
Intake clear — nothing waiting.
) : null}
eRx, fax, and refill calls flow in on their own — patient matched, prescriber verified, sig codes expanded. Entry is review, not retyping. Use + New Rx for a verbal order phoned straight to the pharmacist.
{openId ? ( setOpenId(null)} onSent={onSent} nav={nav} showToast={showToast}> ) : null} {phoneOpen ? ( setPhoneOpen(false)} onQueue={onQueueRefill} nav={nav}> ) : null} {manualOpen ? ( setManualOpen(false)} onSent={onManualSent} nav={nav} showToast={showToast}> ) : null}
); } Object.assign(window, { Intake, EntryForm, FaxDoc, CallRecord, PhoneModal });