Przejdź do głównej zawartości

Medical Dictionary

Na tej stronie

Medical Dictionary to system wykrywania terminów medycznych podczas edycji wizyt. Integruje się z AI Suite do automatycznego rozpoznawania terminologii.


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 --> Suggestions

CategoryPolishExamples
diagnosisRozpoznaniehipoglikemia, zapalenie płuc
procedureProceduraUSG, RTG, zabieg chirurgiczny
medicationLekamoksycylina, prednizolon
anatomyAnatomiawątroba, nerki, tchawica
symptomObjawwymioty, biegunka, kaszel
lab_valueWartość labkreatynina, ALT, morfologia

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: Notification

interface FoundTerm {
matchedText: string; // "hipoglikemia"
start: number; // Position in text
end: number;
type: TermType; // 'diagnosis' | 'medication' | ...
definition?: string; // Dictionary definition
confidence?: number; // 0-1
}

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
}

┌─────────────────────────────┐
│ Dictionary │
├─────────────────────────────┤
│ Detected Terms: │
│ │
│ • hipoglikemia (diagnosis) │
│ Niski poziom cukru... │
│ │
│ • amoksycylina (medication) │
│ Antybiotyk beta-laktam... │
│ │
│ • USG (procedure) │
│ Badanie ultrasonograf... │
└─────────────────────────────┘

Terminy mogą być podświetlone w edytorze SOAP z tooltipem definicji.


ComponentRole
RightPanelDisplay detected terms
useVisitSelectiononTermsFound handler
VisitDictionaryServicePersistence to DB
AI SuiteTerm detection engine

// Signature to prevent duplicate saves
const signature = `${visitId}:${matchedText}-${start}-${end}-${type}`;
if (lastSavedTermsRef.current !== signature) {
lastSavedTermsRef.current = signature;
await saveTermsToVisit(visitId, terms);
}