# IRMR Upload Defaults and Preview QA Evidence

Date: 2026-05-27 | Before: test1.oncolysys.com | After: dataverse-ehr.local | Scope: Documents and Results / IRMR

## Reported Behavior

a) Κάνε το IRMR open by default παντού.
b) Όταν ανεβαίνει ένα αρχείο "αναβοσβήνει" η οθόνη.
c) Το "click to preview" δείχνει υπερβολικά μικρή μικρογραφία - κάντο να το δείχνει το αρχείο σε Κανονικό μέγεθος - μεγάλο.

## Fix

- IRMR default: locked Lab Tests entries now start with `IRMR AI processing = YES` for real uploaded files. Fileless/manual lab entries do not send IRMR work in the save payload.
- Upload stability: the duplicate upload-workspace preview card was removed. The entry row is the single source of truth for uploaded-file state, so the modal no longer grows/jumps after upload completion.
- Preview size: the eye icon for PDF/image files now opens the existing full PDF/Image viewer instead of the tiny thumbnail popover. DICOM keeps its existing viewer-specific behavior.

### Primary files

- `document_root/web/src/containers/Patients/Patient/PatientDocuments/UnifiedFileModalDomain.js`
- `document_root/web/src/containers/Patients/Patient/PatientDocuments/UnifiedFileModalPresentation.js`
- `document_root/web/src/containers/Patients/Patient/PatientDocuments/AddDocumentTypeModal.js`
- `document_root/web/src/components/fileList.js`
- `document_root/web/src/containers/Patients/Patient/PatientDocuments/AddDocumentTypeModal.test.js`
- `document_root/web/src/components/fileList.test.js`

## Proof

### Issue A - IRMR Default

Before on test1: locked Lab Tests upload expands with `NO IRMR AI processing`.
After on dev: the same locked Lab Tests upload expands with `YES IRMR AI processing`.

### Issue B - Upload Blink / Jump

Before on test1: duplicate upload preview card exists; measured `previewCards=1`, modal height `631px`.
After on dev: duplicate preview card removed; measured `previewCards=0`, modal height `487px`.

### Issue C - Full Preview

Before on test1: eye icon opens a small thumbnail popover; measured `popoverThumb=1`, `pdfModal=0`.
After on dev: eye icon opens the full PDF viewer modal; measured `popoverThumb=0`, `pdfModal=1`.

## Verification

- Passed: focused ESLint for changed PatientDocuments and FileList files.
- Passed: focused Jest suites: `AddDocumentTypeModal.test.js` and `fileList.test.js`.
- Passed: MCP/Playwright browser proof recorded before and after for all three issues.

## Commit

- `65e6537cc` Refine IRMR upload defaults and previews

## Notes

The browser videos use real upload and UI flows. The document-classification AI endpoint was mocked during video recording to keep the evidence deterministic and avoid waiting for live LLM processing. The generated recorder and this page are intentionally kept outside git under `.codex-tmp`.