Skip to content

SL-1368: send o2IframeFormPrinted message back to the O3 when printing a form - #675

Merged
cioan merged 1 commit into
masterfrom
SL-1368
Jul 21, 2026
Merged

cioan merged 1 commit into
masterfrom
SL-1368

Conversation

@cioan

@cioan cioan commented Jul 20, 2026

Copy link
Copy Markdown
Member

@mogoodrich and @chibongho , here are the corresponding changes in the pihcore to get this Print&Save button working.

I already have a PR in the esm-pihemr that shows how this works:
PIH/openmrs-esm-pihemr#40

@cioan
cioan requested review from chibongho and mogoodrich July 20, 2026 20:47
}
};

var removeIframe = function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't this just close the iframe? Should we also trigger a message to close the workspace?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@chibongho , the removeIframe function here in the visit.js closes the iFrame in which the printing template is loaded.
A couple lines above this code posts a 'o2IframeFormPrinted' message which the O3 O2VisitSummaryWorkspace component listens to and then it removes the patient from the ward and closes the workspace.

https://github.com/PIH/openmrs-esm-pihemr/pull/40/changes#diff-2ad2c6b5fbc16f8248605c48875931f27d4c70ee65db07fc787a6bd5742bb9fbR83

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, I didn't see that. Yeah, looks good then. Thanks!

@cioan
cioan merged commit 06fd099 into master Jul 21, 2026
@cioan
cioan deleted the SL-1368 branch July 21, 2026 16:47
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.

3 participants