---
Zeno wants to add a possibility to create a QR-code. E.g. display it on the right side, where a patient could scan it. Or add a button "Create QR-Code"
Having a look at gem rqrcode from http://whomwah.github.io/rqrcode/ which has over 250K installations. Adding a src/model/prescription.rb and test/test_model/prescription.rb to add the QRcode and its unit test.
Fixed pretty printing with commit Prettify prescription print.. See
Creating watir test to show problem loosing comment after adding a new drug. This was easy (< 10 minutes). See commit Add watir test to check adding a drug to the prescription
But first I add the interactions to the print view to avoid having to correct this problem twice. Added interactions to the print. Had to introduce @session.persistent_user_input(:printing)
to exchange this information between src/view/drugs/prescription.rb
and src/view/interactions/interaction_chooser.rb
Also supressing header for interactions and comments if non present. This works now. See
Removed empty lines if now interactions or comments and uploaded a new screenshot.
Now attacking the proble why adding/deleting a drug removes comments, name, birthday, etc. Improved watir test to check for all fields.
I think I must modify set PrescriptionDrug.prescription_comment to use textarea.set_attribute 'onBlur'/'onFocus to save the value in a global variable of the Javascript. What I found out is that
I must therefore find a javascript way to preserve values after reloading the window. With a cookie? Or maybe using dojox/storage. Did not work.
Trying https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage. Now I am ready to get value of the comments after deleting/adding a drug in the domReady-function, but I don't know yet how to set the value of the concerned field.