Urgent care ECGs · InCor
Gorgona
AI-assisted ECG screening for suspected myocardial infarction in urgent care
Heart Institute (InCor), Hospital das Clínicas, University of São Paulo Medical School
What is Gorgona?
Gorgona is an AI-assisted electrocardiogram (ECG) screening system developed at the Heart Institute (InCor), University of São Paulo, and deployed at an urgent care unit in Salvador, Brazil. It is designed to identify ECGs suggestive of acute myocardial infarction and provide an earlier warning to the referral coordination team, which arranges patient transfers to referral hospitals.
The system monitors newly recorded ECGs, sends the files to the InCor server and analyzes them with a deep learning model. When the analysis indicates a suspected infarction, Gorgona sends an alert to the coordination team through Telegram. This happens alongside the usual telemedicine review, so the information can reach the clinicians assessing the patient and deciding on care sooner.
From the model to deployment
I led the project and developed the initial software implementation, connecting the ECG classifier to the Windows client at the unit, the InCor processing server, the web dashboard and the Telegram alerts. I was also responsible for the machine learning decisions. I worked with the clinical team, which defined the care protocol and reviewed the ECGs.
A central part of the work was bringing the research into clinical use: handling the files produced by the ECG equipment, integrating the components with the computers and routines already in place, and delivering results through the channel the coordination team already used. That integration made it possible to follow the full path from a saved ECG file to an alert received by the team.
Deployment location
We deployed Gorgona at a public urgent care unit in Salvador, Bahia, Brazil. ECG acquisition and the upload client run at the unit, while analysis takes place remotely on the InCor server in São Paulo. The map locates Salvador within Brazil and Bahia and ends with a city-wide view, without identifying the unit.

How it works
The integration starts with the folder where ECG files are already saved on the unit's computer. From there, Gorgona connects ECG acquisition, AI analysis and clinical alerts alongside the existing care pathway.
Previous workflow
In the previous workflow, staff manually submitted the ECG to the telemedicine service. The report, together with the clinical assessment, supported the decision to contact the referral coordination team through Telegram. When clinical suspicion was high, the physician at the unit could also contact the group directly before the report was issued.
With Gorgona
With Gorgona, submission for AI analysis begins automatically when a new ECG appears in the monitored folder. If the probability assigned to the ST-elevation myocardial infarction (STEMI) category exceeds 50%, the system alerts the referral coordination group through Telegram. Telemedicine review continues through the usual pathway, and decisions about care remain with the medical and coordination teams.

| Stage | Previous workflow | With Gorgona |
|---|---|---|
| Collection | Manual telemedicine submission | Automatic folder monitoring |
| Analysis | Medical review and report | Additional AI classification |
| Communication | Staff-initiated contact | Automated Telegram alert |
| Decision | Medical and coordination teams | Medical and coordination teams |
Windows client, server and online platform
The app at the urgent care unit
At the urgent care unit, the ECG-IA Client connects the files produced by the ECG equipment to the analysis server. It monitors a Windows folder and queues each new ECG for upload, using credentials specific to that installation. Through the system tray menu, staff can configure or restart the application and resubmit files when needed.
Server and online platform
At InCor, a FastAPI endpoint receives the files, reads their metadata and prepares the input for the classifier, converting the waveform to an image when needed. Predicted categories and their probabilities are stored in SQLite and displayed in the web dashboard. The Telegram integration uses those results to send alerts to the coordination team.

Data protection and LGPD
The client can anonymize files on the unit's own computer before upload to InCor. Transfers use HTTPS, with access controlled through installation-specific credentials and user roles. These are the technical safeguards described in the implementation and do not, by themselves, establish full compliance with Brazil's LGPD.
To support operational follow-up, the dashboard brings together classification results and the status of connected clients. Filters by unit, period, status and class allow the team to review ECGs and their predictions.

Two minutes from ECG to alert
An encounter at an urgent care unit in Salvador shows how this workflow operated in practice. The patient was admitted at 18:52, and the first ECG was recorded at 19:15. Gorgona sent an alert for suspected ST-elevation myocardial infarction (STEMI) at 19:17, two minutes after the recording. At 19:58, the telecardiology service issued a report classifying this first ECG as normal. A subsequent review by InCor physicians confirmed STEMI on that tracing.
A second ECG, recorded at 19:37, also triggered an alert within two minutes, at 19:39. For this second recording, the telecardiology report, issued at 20:04, already indicated STEMI. InCor physicians also confirmed STEMI on the second tracing. The patient’s arrival at the referral center was recorded at 20:44. The encounter date and the identity of the unit have been withheld. Times are retained to document the sequence of events.

| Event | First ECG | Second ECG |
|---|---|---|
| ECG recorded | 19:15 | 19:37 |
| AI alert | 19:17 | 19:39 |
| Received by telemedicine | 19:21 | 19:39 |
| Report issued | 19:58 | 20:04 |
| ECG to alert | 2 min | 2 min |
| Time before report | 41 min | 25 min |
The two ECGs from the encounter
These are the original ECG images included in the case study. They were extracted without redrawing or modifying the waveform and contain no patient identification details.


Telecardiology reports and review by InCor physicians
For the first ECG, the initial report and subsequent review differed: the telecardiology service concluded “Normal electrocardiogram”, while InCor physicians confirmed STEMI on that same tracing. Gorgona had already flagged suspected STEMI two minutes after the recording.
For the second ECG, the telecardiology report already indicated STEMI, describing mild inferior ST-segment elevation and ST-segment depression in aVL. Review by InCor physicians confirmed STEMI on this tracing as well.
| Assessment | First ECG | Second ECG |
|---|---|---|
| Gorgona alert | Suspected STEMI | Suspected STEMI |
| Telecardiology report | Normal | STEMI |
| Review by InCor physicians | STEMI confirmed | STEMI confirmed |
In this encounter, the alerts reached the coordination team 41 and 25 minutes before the respective telemedicine reports. The first alert arrived four minutes before the ECG even reached the telemedicine service. The case documents the system's ability to communicate a suspected abnormal ECG earlier within an actual care pathway.
That earlier communication is the operational result observed here. Establishing whether it leads to faster treatment or better outcomes would require an evaluation across patients, with the corresponding treatment times and clinical outcomes.
The model behind the system
The classifier builds on my research in ECG image analysis and the method developed by AIMED, the team I led to first place in the classification task of the 2024 PhysioNet Challenge. Gorgona brought that line of research into urgent care by connecting the model to ECG acquisition and communication between clinical teams. The CinC 2024 paper describes ECG pretraining and the ConvNeXt ensemble, while my thesis covers the image datasets, experiments and clinical evaluation in greater detail.
The classifier combines ConvNeXt models to identify 12 categories. In the research evaluation, involving 18,519 ECGs from 14,402 patients annotated by 19 cardiologists, it achieved a macro F1 of 0.807 on the held-out test set (95% CI: 0.788–0.825). That evaluation measures classification performance on a research dataset. The case timings above describe how the system operated after integration into the urgent care workflow.
Related papers
- Dias FM et al. Image-based deep learning for emergency electrocardiogram classification. medRxiv · Preprint, 2026.
- Dias FM, Ribeiro E, Soares QB, Krieger JE, Gutierrez MA. Image-Based Electrocardiogram Classification Using Pre-trained ConvNext. Computing in Cardiology, 2024.
- Dias FM. Classificação automatizada de imagens de eletrocardiogramas por aprendizado profundo. Universidade de São Paulo · Tese de doutorado, 2025.

