LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
238 stars 262 forks source link

Labels and Submit buttons do same action after performing first Submit and Label buttons click #1442

Closed Ngai-E closed 5 years ago

Ngai-E commented 5 years ago

A) Outreachy Username: elizabeth

B) Issue Title: Both Labels and Submit Button tries to export a CSV file after performing first search.

C) Bug Report Date: March 13, 2019.

D) Site Affected: Documentation Site and NHANES

E) OS/ Browser Used: Chrome on Ubuntu 16.04

F) Which Workflow Module in LHEHR: Reports => Insurance => Unique Seen Patients

G) Steps to Reproduce the Bug:

  1. Login to LibreHealth EHR.
  2. Select Reports menu item.
  3. Hover over Insurance drop down option and click on Unique Seen Patients.
  4. Choose a From and To date range.
  5. Click on Submit.
  6. Click on Labels.
  7. Repeat steps 4 and 5.

H) At Point of the Bug, the Expected Behavior: User expects to still perform a search even after clicking the Labels button by performing steps 4 and 5 again.

I) Details of What Actually Happened: When user clicks on the Submit button for the first time, it performs the requested search successfully. However, after clicking the Labels button user can no longer perform steps 4 and 5 successfully as clicking the Submit button this time only results to a download prompt for a CSV file.

J) Provide Relevant Screenshot and Explain the Screenshot: image Illustration 1: Showing Submit and Labels Buttons After first search.

K) Estimation of The Bug Severity: Module's function ceases at this point or crashes (Blocker) .

aethelwulffe commented 5 years ago

I suppose the Labels button is for printing mailing labels? Checking to see if that attached code exists is a good idea (not necessarily indicated here) but most likely we have, upon submit/export, and discontinuous data (variable not reset)? I cannot verify that there were any rows to print from this, but lacking any data in the query result may be part of the issue. Yes, it should still "work" but that is the type of edge case that usually gets overlooked by a developer. I personally have seen the report work, but have never had occasion to print anything from it.

Ngai-E commented 5 years ago

I suppose the Labels button is for printing mailing labels? Checking to see if that attached code exists is a good idea (not necessarily indicated here) but most likely we have, upon submit/export, and discontinuous data (variable not reset)? I cannot verify that there were any rows to print from this, but lacking any data in the query result may be part of the issue. Yes, it should still "work" but that is the type of edge case that usually gets overlooked by a developer. I personally have seen the report work, but have never had occasion to print anything from it.

The main issue is that user can not perform a second search after clicking on the Labels button. When user clicks on Submit with a different search criteria no result is displayed instead it tries to export previous searched results. Module Crashes at this point.

aethelwulffe commented 5 years ago

Right. After returning results, you should have greyed-out buttons except for the "next step" or a "run another report" button that basically just refreshes the page. Variable definitions and all that should be called all over as a fresh start. The report stinks, and it needs fixing. Simple enough! :)

Ngai-E commented 5 years ago

Right. After returning results, you should have greyed-out buttons except for the "next step" or a "run another report" button that basically just refreshes the page. Variable definitions and all that should be called all over as a fresh start. The report stinks, and it needs fixing. Simple enough! :)

Thanks. I will fix the issue.