Medical Dictionary
Na tej stronie
Overview
Dział zatytułowany „Overview”Medical Dictionary to system wykrywania terminów medycznych podczas edycji wizyt. Integruje się z AI Suite do automatycznego rozpoznawania terminologii.
Architecture
Dział zatytułowany „Architecture”flowchart TB subgraph Input Transcript[Visit Transcript] SOAP[SOAP Notes] end
subgraph Detection AI[AI Term Detection] Parser[Term Parser] end
subgraph Storage Service[VisitDictionaryService] DB[(visit.attachments)] end
subgraph Output RightPanel[Right Panel Display] Suggestions[Term Suggestions] end
Transcript --> AI SOAP --> AI AI --> Parser Parser --> Service Service --> DB DB --> RightPanel Parser --> SuggestionsTerm Categories
Dział zatytułowany „Term Categories”| Category | Polish | Examples |
|---|---|---|
diagnosis | Rozpoznanie | hipoglikemia, zapalenie płuc |
procedure | Procedura | USG, RTG, zabieg chirurgiczny |
medication | Lek | amoksycylina, prednizolon |
anatomy | Anatomia | wątroba, nerki, tchawica |
symptom | Objaw | wymioty, biegunka, kaszel |
lab_value | Wartość lab | kreatynina, ALT, morfologia |
Detection Flow
Dział zatytułowany „Detection Flow”sequenceDiagram participant Editor as Visit Editor participant Panel as RightPanel participant AI as AI Term Detector participant Service as VisitDictionaryService participant DB as Database
Editor->>Panel: Text change Panel->>AI: Analyze text AI->>AI: Extract medical terms AI-->>Panel: FoundTerm[]
Panel->>Panel: onTermsFound(terms) Panel->>Service: saveTermsToVisit(visitId, terms) Service->>DB: Update attachments DB-->>Service: Success Service-->>Panel: NotificationFoundTerm Model
Dział zatytułowany „FoundTerm Model”interface FoundTerm { matchedText: string; // "hipoglikemia" start: number; // Position in text end: number; type: TermType; // 'diagnosis' | 'medication' | ... definition?: string; // Dictionary definition confidence?: number; // 0-1}Storage
Dział zatytułowany „Storage”Terminy zapisywane są w visit.attachments:
{ "type": "dictionary_terms", "data": { "visitId": "uuid-123", "foundTerms": [...], "analyzedAt": "2024-01-15T10:30:00Z", "stats": { "totalTerms": 5, "byType": { "diagnosis": 2, "medication": 3 } } }, "timestamp": 1705315800000}UI Display
Dział zatytułowany „UI Display”Right Panel
Dział zatytułowany „Right Panel”┌─────────────────────────────┐│ Dictionary │├─────────────────────────────┤│ Detected Terms: ││ ││ • hipoglikemia (diagnosis) ││ Niski poziom cukru... ││ ││ • amoksycylina (medication) ││ Antybiotyk beta-laktam... ││ ││ • USG (procedure) ││ Badanie ultrasonograf... │└─────────────────────────────┘Inline Highlights
Dział zatytułowany „Inline Highlights”Terminy mogą być podświetlone w edytorze SOAP z tooltipem definicji.
Integration
Dział zatytułowany „Integration”| Component | Role |
|---|---|
RightPanel | Display detected terms |
useVisitSelection | onTermsFound handler |
VisitDictionaryService | Persistence to DB |
| AI Suite | Term detection engine |
Deduplication
Dział zatytułowany „Deduplication”// Signature to prevent duplicate savesconst signature = `${visitId}:${matchedText}-${start}-${end}-${type}`;
if (lastSavedTermsRef.current !== signature) { lastSavedTermsRef.current = signature; await saveTermsToVisit(visitId, terms);}Future Features
Dział zatytułowany „Future Features”Related
Dział zatytułowany „Related”- Dictionary Commands - API reference
- Visits Overview - Visit architecture
- AI Suite - AI capabilities