diff --git a/backend/templates/pmr.html b/backend/templates/pmr.html
index cdb7407..423eaa4 100644
--- a/backend/templates/pmr.html
+++ b/backend/templates/pmr.html
@@ -2678,8 +2678,8 @@
}
}
- // PAAI 결과 인쇄
- async function printPaaiResult(preSerial, patientName, result) {
+ // PAAI 결과 인쇄 (전역)
+ window.printPaaiResult = async function(preSerial, patientName, result) {
if (!autoPrintEnabled) {
console.log('[AutoPrint] 비활성화됨');
return;
@@ -2687,7 +2687,7 @@
try {
console.log('[AutoPrint] 인쇄 요청:', preSerial);
- const response = await fetch('/pmr/api/paai/print', {
+ var response = await fetch('/pmr/api/paai/print', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
@@ -2697,7 +2697,7 @@
})
});
- const data = await response.json();
+ var data = await response.json();
if (data.success) {
console.log('[AutoPrint] 인쇄 완료');
showToast('인쇄 완료: ' + patientName, 'success');