mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
feat: deploy to Hostinger VPS, switch to global_healthx Ozonetel account
- Add helix.svg and PNG favicon (generated via nano-banana) - Update page title to "Helix Engage" with proper meta tags - Make seed scripts configurable via SEED_GQL/SEED_ORIGIN env vars - Support remote workspace member IDs in seed-data.ts - Dynamic doctor-to-clinic linking in seed-new-entities.ts (fetch IDs from platform) - Remove deprecated branchClinic field from seed data - Fix TypeScript errors: callNotes null vs undefined, Lead type casting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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<string, string> = {
|
||||
'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<string, string> = {
|
||||
'Sharma': koramangala,
|
||||
'Patel': indiranagar,
|
||||
'Kumar': whitefield,
|
||||
'Reddy': koramangala,
|
||||
'Singh': indiranagar,
|
||||
};
|
||||
const doctorClinicMap: Record<string, string> = {
|
||||
'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('');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user