Visit Templates
Overview
Dział zatytułowany „Overview”Visit Templates pozwalają na szybkie tworzenie wizyt z pre-filled zawartością. Redukują czas dokumentacji dla typowych procedur.
Built-in Templates
Dział zatytułowany „Built-in Templates”Vista zawiera wbudowane szablony dla najczęstszych typów wizyt:
| Template | Visit Type | Description |
|---|---|---|
| Consultation | consultation | Standardowa wizyta konsultacyjna |
| Vaccination | vaccination | Szczepienie profilaktyczne |
| Follow-up | followup | Wizyta kontrolna |
| Surgery | surgery | Zabieg chirurgiczny |
| Emergency | emergency | Nagły przypadek |
Template Structure
Dział zatytułowany „Template Structure”interface VisitTemplate { id: string; name: string; visitType: string; description?: string;
// Pre-filled SOAP sections defaultSubjective?: string; defaultObjective?: string; defaultAssessment?: string; defaultPlan?: string;
// Optional defaults defaultDuration?: number; // minutes defaultInternalNotes?: string;
// Metadata isBuiltIn: boolean; createdBy?: string; createdAt?: string;}Using Templates
Dział zatytułowany „Using Templates”Creating Visit from Template
Dział zatytułowany „Creating Visit from Template”sequenceDiagram participant User participant UI as Create Visit Dialog participant API as visitApi participant DB as Database
User->>UI: Select template UI->>UI: Load template defaults User->>UI: Select patient User->>UI: Click "Create"
UI->>API: create({...templateDefaults, patient_id}) API->>DB: INSERT visit DB-->>API: New visit API-->>UI: Visit created UI->>UI: Open in editorTemplate Selection UI
Dział zatytułowany „Template Selection UI”┌─────────────────────────────────────┐│ New Visit │├─────────────────────────────────────┤│ Select Template: ││ ││ ○ Consultation (default) ││ ○ Vaccination ││ ○ Follow-up ││ ○ Surgery ││ ○ Emergency ││ ○ Custom templates... │├─────────────────────────────────────┤│ Patient: [Select patient] │├─────────────────────────────────────┤│ [Cancel] [Create Visit] │└─────────────────────────────────────┘Default Templates Content
Dział zatytułowany „Default Templates Content”Consultation
Dział zatytułowany „Consultation”{ id: 'consultation', name: 'Konsultacja', visitType: 'consultation', defaultSubjective: '', defaultObjective: 'Pacjent w stanie ogólnym dobrym. Błony śluzowe różowe, wilgotne. Węzły chłonne niepowiększone.', defaultAssessment: '', defaultPlan: '', defaultDuration: 30,}Vaccination
Dział zatytułowany „Vaccination”{ id: 'vaccination', name: 'Szczepienie', visitType: 'vaccination', defaultSubjective: 'Szczepienie profilaktyczne. Brak zgłaszanych dolegliwości.', defaultObjective: 'Pacjent w stanie ogólnym dobrym. Temperatura w normie. Błony śluzowe różowe.', defaultAssessment: 'Pacjent zakwalifikowany do szczepienia.', defaultPlan: 'Szczepienie wykonane. Obserwacja przez 15 minut. Kontrola za rok.', defaultDuration: 15,}Follow-up
Dział zatytułowany „Follow-up”{ id: 'followup', name: 'Kontrola', visitType: 'followup', defaultSubjective: 'Wizyta kontrolna. ', defaultObjective: '', defaultAssessment: '', defaultPlan: '', defaultDuration: 20,}Surgery
Dział zatytułowany „Surgery”{ id: 'surgery', name: 'Zabieg', visitType: 'surgery', defaultSubjective: 'Pacjent zakwalifikowany do zabiegu. ', defaultObjective: 'Badanie przedoperacyjne: ', defaultAssessment: '', defaultPlan: 'Zalecenia pooperacyjne:\n- \n- \n- ', defaultDuration: 60,}Emergency
Dział zatytułowany „Emergency”{ id: 'emergency', name: 'Nagły przypadek', visitType: 'emergency', defaultSubjective: 'NAGŁY PRZYPADEK. Czas zgłoszenia: ', defaultObjective: 'Stan pacjenta przy przyjęciu: ', defaultAssessment: '', defaultPlan: 'Działania podjęte:\n- \n\nDalsze postępowanie:\n- ', defaultDuration: 45,}Custom Templates
Dział zatytułowany „Custom Templates”Planned Features
Dział zatytułowany „Planned Features”- Tworzenie własnych szablonów
- Edycja istniejących szablonów
- Szablony per lekarz lub per klinika
- Import/export szablonów
- Szablony z placeholderami
Template Variables (Planned)
Dział zatytułowany „Template Variables (Planned)”// Future: dynamic placeholders{ defaultPlan: 'Kontrola za {{follow_up_days}} dni. Tel: {{clinic_phone}}',}Integration
Dział zatytułowany „Integration”With Workspace
Dział zatytułowany „With Workspace”// useWorkspaceDraftActionshandleCreateDraft(patientId, template) { const visit = await visitApi.create({ patient_id: patientId, visit_type: template.visitType, soap_subjective: template.defaultSubjective, soap_objective: template.defaultObjective, soap_assessment: template.defaultAssessment, soap_plan: template.defaultPlan, });}With Calendar
Dział zatytułowany „With Calendar”// From appointment → visitonStartVisit(appointment) { const template = getTemplateForType(appointment.appointment_type); await visitApi.create({ ...templateDefaults, patient_id: appointment.patient_id, appointment_id: appointment.appointment_id, });}Template Selection Logic
Dział zatytułowany „Template Selection Logic”function getTemplateForType(visitType: string): VisitTemplate | null { // 1. Check custom templates (future) // 2. Check built-in templates return BUILT_IN_TEMPLATES.find(t => t.visitType === visitType) || null;}
function applyTemplate(template: VisitTemplate): Partial<CreateVisitInput> { return { visit_type: template.visitType, soap_subjective: template.defaultSubjective || '', soap_objective: template.defaultObjective || '', soap_assessment: template.defaultAssessment || '', soap_plan: template.defaultPlan || '', };}Related
Dział zatytułowany „Related”- Creating a Visit - Create visit flow
- SOAP Notes - SOAP format
- Visits Overview - Module architecture