Skip to content

feat(sentrapedia): add active encounter checklist - #29

Merged
gaffercode merged 1 commit into
mainfrom
codex/sentrapedia-active-encounter
Dec 1, 2026
Merged

gaffercode merged 1 commit into
mainfrom
codex/sentrapedia-active-encounter

Conversation

@gaffercode

@gaffercode gaffercode commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Executive Summary

The active encounter now shows a follow-up checklist beside the conversation. This public export also carries the preceding workspace refactor, inline clinical report navigation, and local demo launcher.

Changes Implemented

  • Open analysis reports from their conversation cards and return to the active encounter.
  • Save selected follow-up suggestions and completion in the existing encounter tasks shared with Work Queue.
  • Consolidate report formatting, request handling, persistence helpers, and marketing site asset helpers.
  • Cover the already supported demo mode in the standalone launcher usage assertion.

Impact Assessment

The checklist affects clinician navigation and task tracking in the workspace. The release uses the existing encounter task records and ships the sample catalogue and sample ICD-10 data. The demo launcher is for loopback testing.

Verification

Local verification ran on public commit 6f5fc543.

  • npm ci, npm run lint, and npm run typecheck exited 0. Lint reported three warnings.
  • npm test exited 0. Vitest reported 948 passed, 24 skipped, and one expected failure. The site suite passed 77 tests.
  • npm run test:system exited 0 with 72 passed and seven skipped after dependency installation.
  • npm run test:aadi exited 0 with 210 passed, 29 skipped, and one warning.
  • The public export passed the leak guard against the private reference, the staged secret scan, and the committed diff check.
  • Linux build and Docker results are tracked by the PR checks.

Risks & Rollback

The release changes report navigation and task presentation. Revert the merge commit in a follow-up PR if rollback is required. Merging into the production branch triggers the linked Vercel project.

Governance & Approval

BLOCKED for merge at the product owner's direction.

Publish the Sentrapedia workspace refactor, inline clinical report view, active encounter task checklist and local demo launcher through the public-only export.

Keep the launcher packaging assertion in sync with the existing demo mode.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentrapedia Ready Ready Preview Dec 1, 2026 5:55pm UTC

Request Review

@gaffercode
gaffercode marked this pull request as ready for review December 1, 2026 17:57
@gaffercode
gaffercode merged commit a59491a into main Dec 1, 2026
4 of 5 checks passed
@gaffercode
gaffercode deleted the codex/sentrapedia-active-encounter branch December 1, 2026 17:58

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 potential issues.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

export const taskDraftFrom = (result: AadiResult): string => result.nextBestActions.map(action => `${actionVerb[action.kind]}: ${action.item}`).join("\n");
export const actionVerb = { question: "Tanyakan", exam: "Periksa", test: "Pemeriksaan penunjang" } as const;
// Each engine action stays a single suggestion, including when the item spans multiple lines.
export const taskSuggestionsFrom = (result: AadiResult): string[] => result.nextBestActions.map(action => `${actionVerb[action.kind]}: ${action.item.trim()}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Tugas pemeriksaan kehilangan syarat klinis

Saat dokter menambahkan pemeriksaan bersyarat, taskSuggestionsFrom tidak menyertakan indikasinya. Checklist dan Antrean kerja menampilkan pemeriksaan tanpa syarat yang tercantum di laporan.

Learn more

AADI mengirim nama pemeriksaan dan indikasinya sebagai kolom terpisah (kontrak tindakan). Laporan klinis menampilkan keduanya. EncounterOverview menyimpan teks saran apa adanya saat dokter menekan Tambah. QueueCard hanya menampilkan teks tersimpan, sehingga syarat tidak ikut terbawa ke antrean.

Example: Jika nama pemeriksaannya “USG abdomen” dan indikasinya “Bila nyeri kanan bawah menetap”, tugas yang tersimpan hanya berbunyi “Pemeriksaan penunjang: USG abdomen”.

Recommended fix: Sertakan indikasi yang tidak kosong di saran dan pertahankan saat menyimpan tugas. Pastikan representasi yang dipilih tetap lolos batas panjang tugas tanpa memotong syarat, dan uji tampilan tugas tersimpan di checklist serta Antrean kerja.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +101 to +104
<Section number="05" title="Tanda Bahaya dan Keselamatan Klinis">
<h4>Kondisi yang perlu disaring</h4>
{priorities.length ? <Lines items={priorities.map((item) => `${item.label} (${item.icd10})`)}/> : <p>{unavailable}</p>}
<p><strong>Disposisi:</strong> {therapy?.disposition || unavailable}</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Urgensi hilang dari ringkasan keselamatan

Saat AADI mengembalikan kondisi untuk skrining segera dan bersyarat, AnalysisDocument menampilkan keduanya tanpa status di bagian Tanda Bahaya. Dokter harus membuka bagian Penalaran Diagnostik untuk membedakannya.

Learn more

analysisView menyertakan status tiap kandidat dari hasil AADI. Status ini membedakan kondisi yang perlu disaring segera dengan kondisi yang hanya perlu disaring bila ada indikasi. Bagian Penalaran Diagnostik menampilkan status itu, tetapi ringkasan Tanda Bahaya tidak.

Example: Satu kondisi berstatus screenNow dan kondisi lain berstatus screenIfIndicated tampil dengan format yang sama di bagian Tanda Bahaya.

Recommended fix: Tampilkan item.status pada tiap kondisi di bagian Tanda Bahaya dan tambahkan uji yang membedakan kedua status.

Suggested change
<Section number="05" title="Tanda Bahaya dan Keselamatan Klinis">
<h4>Kondisi yang perlu disaring</h4>
{priorities.length ? <Lines items={priorities.map((item) => `${item.label} (${item.icd10})`)}/> : <p>{unavailable}</p>}
<p><strong>Disposisi:</strong> {therapy?.disposition || unavailable}</p>
{priorities.length ? <Lines items={priorities.map((item) => `${item.label} (${item.icd10}) · ${item.status}`)}/> : <p>{unavailable}</p>}

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

<li>Status: <span className="guideline-citation-tag">Terverifikasi</span></li>
<li>Relevansi: {referenceNotes[item.id]?.relevance ?? "Lihat kutipan sumber."}</li>
</ul>
<details><summary>Kutipan sumber</summary><p className="guideline-citation-text">{item.text}</p></details>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Kutipan sumber hilang saat dicetak

Saat dokter langsung mencetak laporan, GuidelineCitations menyembunyikan kutipan di bagian yang tertutup. printDocument mencetak panel tanpa membukanya, sehingga hasil cetak memuat judul referensi tanpa kutipannya.

Learn more

Cetak mencetak panel laporan yang aktif. printDocument hanya menandai panel untuk dicetak, dan aturan cetak tidak membuka bagian yang terlipat. Sebelumnya, teks dari dua referensi pertama langsung tampil dan ikut tercetak.

Example: Buka laporan yang memiliki dua referensi, lalu tekan Cetak tanpa membuka Kutipan sumber. Hasil cetak memuat judul dan ID referensi, tetapi tidak memuat teks kutipannya.

Recommended fix: Tampilkan teks kutipan yang sudah dirender pada media cetak, tanpa mengubah kondisi lipatan di layar. Uji cetak laporan dengan dua kutipan yang masih tertutup.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +92 to +93
const hasTasks = Boolean(encounter?.tasks?.length);
const hasMessages = Boolean(encounter?.messages.length) || hasTasks || pendingQuestion !== null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Ekspor kosong untuk encounter berisi tugas

Setelah dokter menambah tugas sebelum mengirim pesan, WorkspaceState menampilkan Ekspor. Ekspor hanya membaca pesan, sehingga file unduhan kosong.

Learn more

Pembuatan pasien langsung membuat encounter tanpa pesan. Antrean kerja tetap menampilkan encounter tersebut, dan QueueCard mengizinkan penambahan tugas. Setelah ada tugas, WorkspaceHeader menampilkan Ekspor, tetapi handler ekspor hanya menulis pesan ke Markdown.

Example: Buat pasien, tambahkan “Hubungi pasien” melalui Antrean kerja, buka encounter itu, lalu tekan Ekspor sebelum mengirim pesan. File Markdown kosong.

Recommended fix: Pisahkan kondisi untuk membuka tampilan encounter dari kondisi untuk menampilkan Ekspor. Jika ekspor tetap khusus percakapan, tampilkan tombol hanya ketika ada pesan tersimpan. Jika cakupannya mencakup checklist, sertakan tugas dan status centangnya di Markdown.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant