erp-clinicas-backend-v2/src/modules/ai/prompts/index.ts
Adrian Flores Cortes 297720cdf2 [PROP-CORE-004] feat: Add Phase 6 modules from erp-core
Propagated modules:
- payment-terminals: MercadoPago + Clip TPV (PCI-DSS compliant)
- ai: Role-based AI access (ADMIN, DOCTOR, RECEPCIONISTA, PACIENTE)
- mcp: 18 ERP tools for AI assistants

Note: Payment data must NOT be stored in clinical records.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:45:29 -06:00

49 lines
1.6 KiB
TypeScript

/**
* System Prompts Index
*/
export { ADMIN_SYSTEM_PROMPT, generateAdminPrompt } from './admin-system-prompt';
export { SUPERVISOR_SYSTEM_PROMPT, generateSupervisorPrompt } from './supervisor-system-prompt';
export { OPERATOR_SYSTEM_PROMPT, generateOperatorPrompt } from './operator-system-prompt';
export { CUSTOMER_SYSTEM_PROMPT, generateCustomerPrompt } from './customer-system-prompt';
import { ERPRole } from '../roles/erp-roles.config';
import { generateAdminPrompt } from './admin-system-prompt';
import { generateSupervisorPrompt } from './supervisor-system-prompt';
import { generateOperatorPrompt } from './operator-system-prompt';
import { generateCustomerPrompt } from './customer-system-prompt';
export interface PromptVariables {
businessName: string;
currentDate?: string;
currentBranch?: string;
maxDiscount?: number;
storeHours?: string;
}
/**
* Generar system prompt para un rol
*/
export function generateSystemPrompt(role: ERPRole, variables: PromptVariables): string {
const baseVars = {
businessName: variables.businessName,
currentDate: variables.currentDate || new Date().toLocaleDateString('es-MX'),
currentBranch: variables.currentBranch || 'Principal',
maxDiscount: variables.maxDiscount,
storeHours: variables.storeHours,
};
switch (role) {
case 'ADMIN':
return generateAdminPrompt(baseVars);
case 'SUPERVISOR':
return generateSupervisorPrompt(baseVars);
case 'OPERATOR':
return generateOperatorPrompt(baseVars);
case 'CUSTOMER':
return generateCustomerPrompt(baseVars);
default:
return generateCustomerPrompt(baseVars);
}
}