/* ============================================================= CoreIQ Office — Expansion part 2 Clinical (Ironbark) · Customer · Finance · Gov programs · Ops · Admin ============================================================= */ const STX2 = { "S-001": "var(--teal-700)", "S-002": "var(--navy-600)", "S-003": "var(--violet-600)" }; // ================================================================= // CLINICAL — Ironbark AI console // ================================================================= function Ironbark() { const [tab, setTab] = React.useState("console"); return ( Live · 14 stores connected }> {tab === "console" && } {tab === "reviews" && } {tab === "interactions" && } {tab === "audit" && } ); } function IronbarkConsole() { return ( <>
IB
Ironbark · Clinical decision support
AI-assisted Rx review · drug interactions · allergy checks · dose verification
Today's activity
Rx reviewed184
Auto-cleared156
Pharmacist verify22
Flagged · escalated6
Top alerts
Drug-drug interactions22
Allergy mismatch4
Dose outside range8
Duplicate therapy14
Model performance
Confidence94.2%
Pharmacist agreement98.4%
False positives1.2%
Latency p95340ms

Live activity feed

{[ {ts:"14:32:18", patient:"Mei Tan", store:"S-001", action:"Metformin XR + Atorvastatin · cleared (no interaction)", kind:"ok"}, {ts:"14:28:48", patient:"Henry Whitlock", store:"S-001", action:"Endone + sertraline · flagged · serotonin syndrome risk", kind:"flag"}, {ts:"14:18:22", patient:"Jordan Riley", store:"S-001", action:"Metformin XR · dose verified for renal function", kind:"ok"}, {ts:"14:12:08", patient:"Ana Costa", store:"S-003", action:"Endone · S8 + Codeine allergy match · pharmacist hold", kind:"flag"}, {ts:"14:08:18", patient:"Sam Wakefield", store:"S-001", action:"Ventolin · counsel script — first-time inhaler", kind:"counsel"}, {ts:"13:58:42", patient:"Priya Sharma", store:"S-001", action:"Sertraline · standard refill cleared", kind:"ok"}, {ts:"13:48:14", patient:"Layla Khoury", store:"S-001", action:"Amoxicillin · paediatric dose verified (12yo, 32kg)", kind:"ok"}, {ts:"13:42:28", patient:"Beatrix Lim", store:"S-002", action:"Esomeprazole · stock low — alternative suggested", kind:"info"}, ].map((e, i) => (
{e.patient} · {findS(e.store)?.code}
{e.action}
{e.ts}
))}
); } function IronbarkReviews() { const FLAGGED = [ {rx:"rx-905-002", patient:"Mei Tan", drug:"Endone 5mg + Sertraline 50mg", issue:"Serotonin syndrome risk", severity:"high", flagged:"14:28", store:"S-001"}, {rx:"rx-902-118", patient:"Ana Costa", drug:"Endone 5mg", issue:"Patient codeine allergy on file", severity:"high", flagged:"12:30", store:"S-003"}, {rx:"rx-908-227", patient:"Henry Whitlock", drug:"Esomeprazole + Clopidogrel", issue:"Reduced antiplatelet effect", severity:"moderate", flagged:"13:55", store:"S-001"}, {rx:"rx-911-008", patient:"Henry Whitlock", drug:"Insulin Glargine", issue:"Dose increased 40% — verify with prescriber", severity:"moderate", flagged:"11:42", store:"S-001"}, {rx:"rx-912-118", patient:"Beatrix Lim", drug:"Esomeprazole", issue:"3rd refill within 30 days — over-supply", severity:"low", flagged:"14:22", store:"S-002"}, {rx:"rx-913-040", patient:"Ramy Khoury", drug:"Metformin XR", issue:"First dispense — counsel required", severity:"low", flagged:"13:30", store:"S-001"}, ]; return (
Rx
Patient
Drug
Clinical issue
Severity
Store
Flagged
Action
{FLAGGED.map(f => (
{f.rx}
{f.patient}
{f.drug}
{f.issue}
{f.severity === "high" && } {f.severity === "moderate" && } {f.severity === "low" && }
{findS(f.store)?.code}
{f.flagged}
))}
); } function IronbarkInteractions() { return (

Top drug-drug interactions flagged · 30 days

Drug A
Drug B
Severity
Flagged · 30d
% blocked
{[ {a:"Warfarin", b:"NSAIDs (ibuprofen)", sev:"high", n:48, blocked:84}, {a:"Sertraline", b:"Tramadol / opioid", sev:"high", n:38, blocked:92}, {a:"Clopidogrel", b:"Esomeprazole", sev:"moderate", n:62, blocked:42}, {a:"ACE inhibitor", b:"NSAIDs", sev:"moderate", n:54, blocked:38}, {a:"Metformin", b:"Contrast media", sev:"moderate", n:18, blocked:88}, {a:"Statin", b:"Macrolide antibiotic", sev:"moderate", n:24, blocked:32}, {a:"Codeine", b:"Sedatives", sev:"high", n:14, blocked:96}, {a:"Lithium", b:"NSAIDs / diuretics", sev:"high", n:8, blocked:100}, ].map((r, i) => (
{r.a}
{r.b}
{r.sev === "high" ? : }
{r.n}
80 ? 'var(--paid-text)' : 'var(--hold-text)'}}>{r.blocked}%
))}
); } function IronbarkAudit() { return (
Clinical audit trail
Every Ironbark decision is logged with model version, confidence, source citations, and pharmacist agreement / override. Filterable by drug, patient, severity, and time range. PSA-audit ready.
); } // ================================================================= // CLINICAL — Vaccinations / AIR // ================================================================= function Vaccinations() { return ( }>

Recent vaccinations

When
Patient
Vaccine · batch
Vaccinator
Store
Program
AIR
{[ {ts:"Today 14:18", p:"Mei Tan", v:"Influenza quadrivalent · CSL-A4422", who:"Suni K.", store:"S-001", prog:"Voucher · Camberwell Aged"}, {ts:"Today 11:48", p:"Henry Whitlock", v:"COVID booster · Moderna-B118", who:"Suni K.", store:"S-001", prog:"Federal"}, {ts:"Today 10:14", p:"Jordan Riley", v:"Influenza quadrivalent · CSL-A4422", who:"Rachel P.", store:"S-001", prog:"Self-funded"}, {ts:"Today 09:48", p:"Beatrix Lim", v:"Hep A · Avaxim-V42", who:"James L.", store:"S-003", prog:"Travel · Bridgewater"}, {ts:"Yesterday", p:"Ana Costa", v:"Influenza quadrivalent · CSL-A4422", who:"Rachel P.", store:"S-002", prog:"Voucher · Glen Iris Day"}, {ts:"Yesterday", p:"Priya Sharma", v:"Influenza quadrivalent · CSL-A4422", who:"Suni K.", store:"S-001", prog:"NIP eligible"}, ].map((v, i) => (
{v.ts}
{v.p}
{v.v}
{v.who}
{findS(v.store)?.code}
{v.prog}
))}
); } // ================================================================= // CLINICAL — MedsCheck & services // ================================================================= function ServicesLog() { return ( }>

Recent services

When
Patient
Service
Pharmacist
Store
Fee
PPA claim
{[ {ts:"Today 14:00", p:"Mei Tan", svc:"Diabetes MedsCheck", who:"Suni K.", store:"S-001", fee:140.00, claim:"submitted"}, {ts:"Today 11:48", p:"Henry Whitlock", svc:"MedsCheck (standard)", who:"Suni K.", store:"S-001", fee:90.00, claim:"submitted"}, {ts:"Today 10:14", p:"Ana Costa", svc:"Home Medicines Review (HMR)", who:"Rachel P.", store:"S-002", fee:215.00, claim:"approved"}, {ts:"Yesterday", p:"Jordan Riley", svc:"Diabetes MedsCheck", who:"James L.", store:"S-003", fee:140.00, claim:"approved"}, {ts:"Yesterday", p:"Sam Wakefield", svc:"Inhaler technique counsel", who:"Suni K.", store:"S-001", fee:0, claim:"—"}, {ts:"24/05/2026", p:"Priya Sharma", svc:"MedsCheck (standard)", who:"Rachel P.", store:"S-001", fee:90.00, claim:"paid"}, {ts:"22/05/2026", p:"Nadia Khoury", svc:"DAA setup · weekly", who:"Suni K.", store:"S-001", fee:46.00, claim:"paid"}, ].map((s, i) => (
{s.ts}
{s.p}
{s.svc}
{s.who}
{findS(s.store)?.code}
{s.fee > 0 ? oMoney(s.fee) : "—"}
{s.claim === "submitted" && } {s.claim === "approved" && } {s.claim === "paid" && } {s.claim === "—" && }
))}
); } // ================================================================= // CLINICAL — Patient medication profiles // ================================================================= function MedicationProfiles() { return ( }>
{[ {init:"MT", name:"Mei Tan", meds:4, profile:"Diabetes T2 + statin"}, {init:"JR", name:"Jordan Riley", meds:2, profile:"Webster pack"}, {init:"AC", name:"Ana Costa", meds:6, profile:"Polypharmacy · S8 active"}, {init:"HW", name:"Henry Whitlock", meds:9, profile:"Cardiovascular + diabetes"}, {init:"PS", name:"Priya Sharma", meds:3, profile:"Mental health"}, ].map((p, i) => (
{p.init}
{p.name}
{p.meds} active meds · {p.profile}
))}
MT
Mei Tan
DOB 14/03/1962 · MED ****72-1 · Type 2 diabetes since 2014
Allergies Diabetes
Allergies
Penicillin (rash · 2008) · Sulfonamides (flagged 2023)
Active medications
Drug
Sched
Sig
Started
Last filled
{[ {d:"Metformin XR 500mg", s:"S4", sig:"1 nocte with food", st:"2014", lf:"Today"}, {d:"Atorvastatin 40mg", s:"S4", sig:"1 nocte", st:"2018", lf:"22/05/2026"}, {d:"Esomeprazole 20mg", s:"S4", sig:"1 mane 30 min ac", st:"2020", lf:"15/05/2026"}, {d:"Multivitamin", s:"—", sig:"1 daily", st:"2022", lf:"01/05/2026"}, ].map((m, i) => (
{m.d}
{m.s !== "—" && }
{m.sig}
{m.st}
{m.lf}
))}
Services received
Diabetes MedsCheck · today (Suni Kapoor) · Influenza vaccination · today · MedsCheck (standard) · 18/04/2026
); } // ================================================================= // CUSTOMER — Unified profiles, scripts on file, comms preferences // ================================================================= function CustomerProfiles() { return ( }>
Name
Medicare · DOB
Scripts
Home store
Consent
Last visit
{OD.PATIENTS.map(p => (
{(p.first[0]+p.last[0]).toUpperCase()}
{p.first} {p.last}
{p.medicare}
{p.scripts}
{p.id === "u03" || p.id === "u09" ? "S-001" : "S-001"}
SMS {p.id !== "u04" && Email}
{p.lastVisit}
))}
); } function ScriptsOnFile() { return ( }>
Rx
Patient
Drug
Repeats
Prescriber
Expiry
Status
{OD.SCRIPTS.slice(0, 8).map(s => { const p = findP(s.productId); const pat = OD.PATIENTS.find(x => x.id === s.patientId); return (
{s.id}
{pat?.first} {pat?.last}
{p?.name} {p?.strength}
{s.repeats.used}/{s.repeats.total}
{s.prescriber}
12 months from {s.written}
{s.status === "dispensed" ? : s.status === "ready" ? : }
); })}
); } function CommsPreferences() { return ( }>
Customer
Phone
Pickup SMS
Repeat SMS
Promo SMS
Marketing email
{OD.PATIENTS.map(p => (
{(p.first[0]+p.last[0]).toUpperCase()}
{p.first} {p.last}
{p.phone}
))}
); } window.OFFICE_SCREENS = Object.assign(window.OFFICE_SCREENS || {}, { ironbark: Ironbark, vaccinations: Vaccinations, servicesLog: ServicesLog, medProfiles: MedicationProfiles, customerProfiles: CustomerProfiles, scriptsOnFile: ScriptsOnFile, commsPrefs: CommsPreferences, });