diff --git a/index.html b/index.html index a26dbb3..4160928 100644 --- a/index.html +++ b/index.html @@ -2,16 +2,17 @@ - + + - - + + - Starter kit — Untitled UI + Helix Engage diff --git a/nanobanana-output/helix_engage_logo_letter_h_with_.png b/nanobanana-output/helix_engage_logo_letter_h_with_.png new file mode 100644 index 0000000..72dcc1c Binary files /dev/null and b/nanobanana-output/helix_engage_logo_letter_h_with_.png differ diff --git a/nanobanana-output/helix_engage_logo_letter_h_with__1.png b/nanobanana-output/helix_engage_logo_letter_h_with__1.png new file mode 100644 index 0000000..36cf61f Binary files /dev/null and b/nanobanana-output/helix_engage_logo_letter_h_with__1.png differ diff --git a/public/favicon-32.png b/public/favicon-32.png new file mode 100644 index 0000000..87fce84 Binary files /dev/null and b/public/favicon-32.png differ diff --git a/public/helix-512.png b/public/helix-512.png new file mode 100644 index 0000000..72dcc1c Binary files /dev/null and b/public/helix-512.png differ diff --git a/public/helix-engage-logo.png b/public/helix-engage-logo.png new file mode 100644 index 0000000..72dcc1c Binary files /dev/null and b/public/helix-engage-logo.png differ diff --git a/public/helix.svg b/public/helix.svg new file mode 100644 index 0000000..b10ff76 --- /dev/null +++ b/public/helix.svg @@ -0,0 +1,4 @@ + + + H + diff --git a/scripts/seed-data.ts b/scripts/seed-data.ts index e1f00b4..5d360fa 100644 --- a/scripts/seed-data.ts +++ b/scripts/seed-data.ts @@ -16,9 +16,9 @@ * NOTE: callNotes/visitNotes/clinicalNotes are RICH_TEXT — read-only, cannot seed */ -const GQL = 'http://localhost:4000/graphql'; +const GQL = process.env.SEED_GQL ?? 'http://localhost:4000/graphql'; const SUB = 'fortytwo-dev'; -const ORIGIN = 'http://fortytwo-dev.localhost:4010'; +const ORIGIN = process.env.SEED_ORIGIN ?? 'http://fortytwo-dev.localhost:4010'; let token = ''; @@ -56,8 +56,14 @@ async function main() { await auth(); console.log('✅ Auth OK\n'); - // Workspace member IDs (from platform — set names + roles in UI before running) - const WM = { + // Workspace member IDs — switch based on target platform + const WM = GQL.includes('srv1477139') ? { + drSharma: '107efa70-fd32-4819-8936-994197c6ada1', + drPatel: '7e1fe368-1f23-4a10-8c2f-3e9c3846b209', + drKumar: 'b86ff7d3-57de-44e5-aa13-e5da848a960c', + drReddy: 'b82693b6-701c-4783-8d02-cc137c9c306b', + drSingh: 'b2a00dd2-5bb5-4c29-8fb1-70a681193a4c', + } : { drSharma: '251e9b32-3a83-4f3c-a904-fad7e8b840c3', drPatel: '2b1bbf20-3838-434f-9fe9-b98436362230', drKumar: '16109622-9b13-4682-b327-eb611ffa8338', @@ -76,7 +82,6 @@ async function main() { specialty: 'Interventional Cardiology', qualifications: 'MBBS, MD (Medicine), DM (Cardiology), FACC', yearsOfExperience: 18, - branchClinic: 'Koramangala, Whitefield', visitingHours: 'Mon/Wed/Fri 10:00 AM – 1:00 PM', consultationFeeNew: { amountMicros: 800_000_000, currencyCode: 'INR' }, consultationFeeFollowUp: { amountMicros: 500_000_000, currencyCode: 'INR' }, @@ -95,7 +100,6 @@ async function main() { specialty: 'Reproductive Medicine & IVF', qualifications: 'MBBS, MS (OBG), Fellowship in Reproductive Medicine', yearsOfExperience: 15, - branchClinic: 'Indiranagar, Koramangala', visitingHours: 'Tue/Thu/Sat 9:00 AM – 12:00 PM', consultationFeeNew: { amountMicros: 700_000_000, currencyCode: 'INR' }, consultationFeeFollowUp: { amountMicros: 400_000_000, currencyCode: 'INR' }, @@ -114,7 +118,6 @@ async function main() { specialty: 'Joint Replacement & Sports Medicine', qualifications: 'MBBS, MS (Ortho), Fellowship in Arthroplasty', yearsOfExperience: 12, - branchClinic: 'Whitefield', visitingHours: 'Mon–Fri 2:00 PM – 5:00 PM', consultationFeeNew: { amountMicros: 600_000_000, currencyCode: 'INR' }, consultationFeeFollowUp: { amountMicros: 400_000_000, currencyCode: 'INR' }, @@ -133,7 +136,6 @@ async function main() { specialty: 'Internal Medicine & Preventive Health', qualifications: 'MBBS, MD (General Medicine)', yearsOfExperience: 20, - branchClinic: 'Koramangala, Indiranagar, Whitefield', visitingHours: 'Mon–Sat 9:00 AM – 6:00 PM', consultationFeeNew: { amountMicros: 500_000_000, currencyCode: 'INR' }, consultationFeeFollowUp: { amountMicros: 300_000_000, currencyCode: 'INR' }, @@ -152,7 +154,6 @@ async function main() { specialty: 'Otorhinolaryngology & Head/Neck Surgery', qualifications: 'MBBS, MS (ENT), DNB', yearsOfExperience: 10, - branchClinic: 'Indiranagar', visitingHours: 'Mon/Wed/Fri 11:00 AM – 3:00 PM', consultationFeeNew: { amountMicros: 600_000_000, currencyCode: 'INR' }, consultationFeeFollowUp: { amountMicros: 400_000_000, currencyCode: 'INR' }, diff --git a/scripts/seed-lab-tests.ts b/scripts/seed-lab-tests.ts index c3eb263..9f290f5 100644 --- a/scripts/seed-lab-tests.ts +++ b/scripts/seed-lab-tests.ts @@ -10,9 +10,9 @@ * PackageTest: position→order, isMandatory→mandatory */ -const GQL = 'http://localhost:4000/graphql'; +const GQL = process.env.SEED_GQL ?? 'http://localhost:4000/graphql'; const SUB = 'fortytwo-dev'; -const ORIGIN = 'http://fortytwo-dev.localhost:4010'; +const ORIGIN = process.env.SEED_ORIGIN ?? 'http://fortytwo-dev.localhost:4010'; let token = ''; diff --git a/scripts/seed-new-entities.ts b/scripts/seed-new-entities.ts index 9f3e34c..e93aba6 100644 --- a/scripts/seed-new-entities.ts +++ b/scripts/seed-new-entities.ts @@ -14,9 +14,9 @@ * InsurancePartner: planTypes→planTypesAccepted */ -const GQL = 'http://localhost:4000/graphql'; +const GQL = process.env.SEED_GQL ?? 'http://localhost:4000/graphql'; const SUB = 'fortytwo-dev'; -const ORIGIN = 'http://fortytwo-dev.localhost:4010'; +const ORIGIN = process.env.SEED_ORIGIN ?? 'http://fortytwo-dev.localhost:4010'; let token = ''; @@ -143,23 +143,23 @@ async function main() { // LINK DOCTORS TO CLINICS // ═══════════════════════════════════════════ console.log('🔗 Linking doctors to clinics'); - const doctors: Record = { - 'da5678f3-6b52-492e-87d3-c4707d105938': 'Dr. Sharma', // Koramangala - 'b080cdf0-4527-46c7-b723-47f2eee623e4': 'Dr. Patel', // Indiranagar - 'd780976a-7ddb-4a00-9a56-e7e3a77fa416': 'Dr. Kumar', // Whitefield - 'bf77c148-438f-4b6f-9e5d-b1c1ff2e10f8': 'Dr. Reddy', // Koramangala - 'e71c2c59-574f-4e81-b8cd-2d7b4b5da8e5': 'Dr. Singh', // Indiranagar + // Fetch doctor IDs dynamically from platform + const docData = await gql(`{ doctors(first: 10) { edges { node { id name } } } }`); + const allDocs = docData.doctors.edges.map((e: any) => e.node); + const clinicAssignment: Record = { + 'Sharma': koramangala, + 'Patel': indiranagar, + 'Kumar': whitefield, + 'Reddy': koramangala, + 'Singh': indiranagar, }; - const doctorClinicMap: Record = { - 'da5678f3-6b52-492e-87d3-c4707d105938': koramangala, - 'b080cdf0-4527-46c7-b723-47f2eee623e4': indiranagar, - 'd780976a-7ddb-4a00-9a56-e7e3a77fa416': whitefield, - 'bf77c148-438f-4b6f-9e5d-b1c1ff2e10f8': koramangala, - 'e71c2c59-574f-4e81-b8cd-2d7b4b5da8e5': indiranagar, - }; - for (const [docId, clinicId] of Object.entries(doctorClinicMap)) { - await update('doctor', docId, { clinicId }); - console.log(` ${doctors[docId]} → ${clinicId === koramangala ? 'Koramangala' : clinicId === whitefield ? 'Whitefield' : 'Indiranagar'}`); + for (const doc of allDocs) { + const lastName = Object.keys(clinicAssignment).find(n => doc.name?.includes(n)); + if (lastName && clinicAssignment[lastName]) { + await update('doctor', doc.id, { clinicId: clinicAssignment[lastName] }); + const clinicName = clinicAssignment[lastName] === koramangala ? 'Koramangala' : clinicAssignment[lastName] === whitefield ? 'Whitefield' : 'Indiranagar'; + console.log(` ${doc.name} → ${clinicName}`); + } } console.log(''); diff --git a/scripts/test-ai-flow.ts b/scripts/test-ai-flow.ts index 27d3ae0..69764b3 100644 --- a/scripts/test-ai-flow.ts +++ b/scripts/test-ai-flow.ts @@ -5,9 +5,9 @@ * Run: cd helix-engage && npx tsx scripts/test-ai-flow.ts */ -const GQL = 'http://localhost:4000/graphql'; +const GQL = process.env.SEED_GQL ?? 'http://localhost:4000/graphql'; const SUB = 'fortytwo-dev'; -const ORIGIN = 'http://fortytwo-dev.localhost:4010'; +const ORIGIN = process.env.SEED_ORIGIN ?? 'http://fortytwo-dev.localhost:4010'; // Rekha's credentials const AGENT_EMAIL = 'rekha.cc@globalhospital.com'; diff --git a/src/lib/transforms.ts b/src/lib/transforms.ts index 35e1e16..81d27d1 100644 --- a/src/lib/transforms.ts +++ b/src/lib/transforms.ts @@ -144,7 +144,7 @@ export function transformCalls(data: any): Call[] { durationSeconds: n.durationSec ?? 0, recordingUrl: n.recordingUrl, disposition: n.disposition, - callNotes: undefined, + callNotes: null, patientId: n.patientId, appointmentId: n.appointmentId, leadId: n.leadId, diff --git a/src/pages/call-desk.tsx b/src/pages/call-desk.tsx index 92431c1..24f7df1 100644 --- a/src/pages/call-desk.tsx +++ b/src/pages/call-desk.tsx @@ -39,19 +39,7 @@ export const CallDeskPage = () => { const activeLead = isInCall ? (callerLead ?? selectedLead) : selectedLead; // Convert worklist lead to full Lead type for components that need it - const activeLeadFull = activeLead ? { - ...activeLead, - updatedAt: activeLead.createdAt, - contactPhone: activeLead.contactPhone ?? [], - contactEmail: (activeLead as any).contactEmail ?? [], - priority: 'NORMAL' as const, - utmSource: null, utmMedium: null, utmCampaign: null, utmContent: null, utmTerm: null, - landingPageUrl: null, referrerUrl: null, - spamScore: 0, isSpam: false, isDuplicate: false, duplicateOfLeadId: null, - firstContactedAt: null, lastContactedAt: null, contactAttempts: 0, - convertedAt: null, patientId: null, campaignId: null, adId: null, - assignedAgent: null, leadScore: null, - } : null; + const activeLeadFull = activeLead as any; return (