openemr / openemr

The most popular open source electronic health records and medical practice management solution.
https://open-emr.org/
GNU General Public License v3.0
3.07k stars 2.1k forks source link

Uncaught TypeError: parent.twAddFrameTab is not a function #6639

Open spikyangel opened 1 year ago

spikyangel commented 1 year ago

This JS error occurs when attempting to open any clinical forms while reviewing an encounter. write concise description of what the bug is.

Steps to reproduce the behavior:

  1. Open an encounter and Click "Review"
  2. Click on 'Clinical' and select any form.
  3. Uncaught TypeError: parent.twAddFrameTab is not a function at openNewForm (forms.php?review_id=23:313:16) at HTMLAnchorElement.onclick (forms.php?review_id=23:449:394)
adunsulag commented 9 months ago

So this is a bug, but I think the issue is that when the encounter form is being reviewed, adding new forms to the encounter defeats the purpose of the review. The review functionality is intended to be a readonly view of the encounters (note how the edit / esign features all disappear). I think what has to happen is to popup an alert saying editing of the encounter is disabled in a review). We should also disable or remove the delete encounter button.

I'm going to bump this to the next release and this will need to be address either as a feature enhancement.