r2164:2168 | 2019-05-07

Prescriptions (all regions, all types)

  • Added date offset functionality to misc fields on prescriptions
    • [d]<offset>[/d] will be converted into a date relative to the exercise date
    • Example: 01/02/2019

Prescriptions (Germany)

  • Fixed patient name display order (Thanks Christoph!)

Dispense exercises (USA)

  • Added new ancillaries
    • Do not drink alcohol
    • Take with food
    • Take on an empty stomach


SQL update 155
  • Added new USA ancillaries (row 81-83)


Unit tutorials (all regions)
  • Updated tutorial deactivate behaviour so that instructions who deactivate all tutorials in a unit do not deactivate the Unit (Thanks Pui San, Ali!)
    • Instructors do not have access to reactivate the unit, so this has been disabled for that reason.
    • Admins who deactivate all tutorials in a unit will still trigger unit deactivation.
Exercise designers (all regions)
  • Restored validation checklist button
Exam manager (all regions)
  • Added warning to exam landing page and marking pages when assessment marking is not enabled for exercises in that exam (Thanks Pui San!)
    • Links to edit the exercises are displayed for instructor role and above accounts
    • Fixes error warnings on marking screen when assessments aren’t enabled


r2161:2162 | 2019-04-15


Dispense exercises (all regions)
  • Fixed label section mark for exercises not checking if the alternative medication mark was the highest possible for that label (Thanks Roxane!)
    • This could cause confusion in situations where the mark for the alternative is higher than the main mark. For example if the main mark was 0 and the alternative mark was 2, then the total mark would be 2 marks less than expected.
    • The recalculation will only take place when the medication marks are edited and the exercise re-published.
  • Added error message to bulk label printing if the exercise ID does not exist.


  • Fixed an issue when importing medications that do not have a form (Thanks Viv!)


r2158:2154 | 2019-04-04

Prescriptions (USA)

  • Added DEA number as a field that can be endorsed by administrators (Thanks Roxane!)
  • Fixed NPI endorsements using the same field as DEA number endorsements

Prescriptions (all regions)

  • Changed prescription database render mode so it no longer renders admin endorsements if display errors mode is enabled (Thanks Roxane!)
    • This caused confusion when displaying errors on scripts because endorsements would also be displayed
    • No only one or the other can be rendered
    • Does not affect exercise designers because it uses get parameter rendering for the script


Tutorials (all regions)
  • Added confirmation windows for tutorial and exercise copy functions (Thanks Viv!)
Exams (all regions)
  • Fixed a bug where students could not be ordered by name on the reviewed page (Thanks Clark!)


r2131:2139 | 2019-03-12


OTC and Dispense exercises (all regions)
  • Fixed an javascript error warning where inline javascript was being applied to counselling notes to prevent pasting in assessments
OTC exercises (all regions)
  • Removed the ability to paste text into professional and counselling note text boxes to match dispense exercise functionality
Dispense exercises (all regions)
  • Labels can no longer be created if the directions are empty. An error message appears to students and the label will not be created
  • Fixed a bug where a medication with no form would cause an error warning to appear (Thanks Viv!)
  • Fixed labels in the dispense log being an object by reference and not staying in the state they were initially logged
  • Removed removal of the directions value when creating a label in case it was somehow involved with an empty directions bug
  • Added additional logging on the dispense screen
    • Now logging deletion of labels
    • Now logging when a paste event fails in assessments
  • Fixed maximum label error message not going through translation system


  • Fixed a bug where importing a medication with no form or location would cause a number of errors to be displayed (Thanks Viv!)
  • Fixed a bug where PDF attachments would be saved with the wrong file extension, causing the attachments to not work properly (Thanks Lorenna and Viv!)
  • Changed image upload requirements for RX medications to no longer enforce square image image requirements
    • Meaning that you can upload a preview image that is 310 on one axis only, rather than having to upload a 310×310.
    • Strict requirements are still set for label placement images.
  • Fixed a bug when adding an existing exercise to a tutorial
    • Front end javascript error which did not affect the backend process, but did require a page refresh to be able to view the exercise.
Exam marking (UK)
  • Changes to initials criteria (Thanks Matt!)
    • Renamed to Check/Dispense initials on label
    • Now checks if the check or dispense box has been filled
    • Field in marking interface now displays contents of check or dispense field and is marked accordingly


r2128:2129 | 2019-02-21


Dispense exercises (all regions)
  • Backported event logging for the dispense screen from version 6
    • Tracks all label creation events on the dispense screen to give a better picture of what the student is doing on the screen
  • Changed label create code to do a deep copy of the label data.
    • This has been done to try and fix a rarely occurring directions bug which could be the result of an variable reference error.
  • Endorsement pane fix for iPads (Thanks Merlyn!)
    • Fixed ipads being unable to scroll the endorsement pane
  • Re-minified exercise javascript


r2103 | 2019-01-24


Exercise create
  • Fixed instances where S8/CD medications would appear in the select table as being CD/S8 enabled without them actually being enabled (Thanks Keith!)


r2091 | 2018-11-28


Unit tutorials (all regions)
  • Added copy tutorial button to tutorial headers
    • The copied tutorial appears at the bottom of the tutorial list on the page
    • Copies any exercises contained in the tutorial
  • Added copy exercise button for each exercise inside a tutorial
    • Clicking the button will immediately make a copy of that exercise inside the same tutorial
Exercise designer (dispense all regions)
  • Reviewed ancillary code to try and make more robust
Medications list (USA)
  • Fixed bug with counting filter on US medication index


  • Replaced uses of let in javascript code that would cause code to fail on older browsers


r2068 | 2018-10-25

Prescriptions (australia)

  • Updated all Australian prescription types to display the patient concession number when the concessional checkbox is ticked (Thanks Viv!)


User CSV import (all regions)
  • Added new ‘username_import_strip’ array to the Auth config to allow common strings to be removed from usernames during import
    • Example, adding ‘@student.monash.edu’ will remove it from any usernames imported via CSV
    • This config is optional and is set per site – by default it is not enabled


r2066 | 2018-10-23


Exercises (all regions, all types)
  • Added Tutorial assessment check to assessment exercise open logging (Thanks Kathy!)
    • If an exercise is in a tutorial assessment without assessment marking flagged, the exercise wouldn’t be logged as opened.
    • The tutorial is now checked when opening the exercise to see if it is an assessment as well (in addition to checking the exercise status), so if marking isn’t set up, the exercise is still logged as being opened by the student.
    • Fixed a bug where if assets are missing from an exercise which has no tutorial/unit, an error would appear (Thanks Jason Whitley!)


r2062 | 2018-10-18


  • Fixed a bug where dates formatted in Javascript would appear incorrect in certain timezones (Thanks Kathy and Clark!)
    • This is fixed by applying the timezone offset to javascript dates.


R2056 | 2018-10-15


Validation exercises (all regions)
  • Fixed a bug where the dispensing record label would stay open when navigating between prescriptions (Thanks Kathy!)


CSV uploading (all regions)
  • Added trim function to all CSV field use to prevent whitespace / common hidden characters causing bad username imports


R2045:2049 | 2018-09-26


Validation exercises (all regions)
  • Fixed dispensing records not appearing in date order (Thanks Kathy!)
PDF Label printing (USA)
  • Changed label print to not print out the medication expiry date (Thanks Sarah!)
    • Instead the ‘Use before‘ or ‘Discard by’ text is displayed, with a space after it
    • The date it not output because it will not match what is on the physical box the students are labelling.
Assessment release (all regions)
  • Fixed a bug where result screens could not be navigated


Dispense exercises (USA)
  • Added quantity words to Controlled scripts (Thanks Kathy!)
Validation exercises (USA)
  • Fixed quantity words not working correctly on generic US prescriptions when an CD drug (set in region data) is selected (Thanks Kathy!)
    • No US specific region javascript was in place to prevent this from happening. Assuming a medication has been imported that has caused the issue – or old metadata
  • Added quantity words to controlled scripts (Thanks Kathy!)
Assessment marking (all regions)
  • Fixed a bug where non-attempted patient questions without a penalty would receive a mark of 1 instead of 0 (Thanks Kathy!)
Assessment management (all regions)
  • Fixed the not taken displays to match the landing page
    • The not taken page and output was allowing students from studentgroups not in the current unit to be displayed.
    • So if the tutorial was moved from another unit, enrolments from the previous unit could appear in the assessment not taken screen


US Generic + US Generic NL
  • Offset qty/rpt line slightly so it doesn’t clip into the border of the script

US Controlled

  • Added quantity words


  • Added prefix option support to med_qty_rpt_aus field output
    • Adding the prefix will prepend it to the qty field
    • Setting the prefix will stop med_qty_rpt_aus from outputting QTY: as text before the quantity


R2030:2040 | 2018-09-19


Validation exercises (all regions)
  • Added support for prescriptions that can have empty directions and no qty
Validation exercises (Germany)
  • Added support for german version
  • Added validation configuration for german prescriptions
    • Normal
      • Added patient insurance faults
      • Added correct location configuration for fault fields on script
    • Private
      • Added correct location configuration for fault fields on script
    • Renamed Patient NHS number (from UK config) to Patient number
  • Removed qty/rpt from medication screen
Assessment marking (all regions)
  • Updated date criteria to display a message when a date is not selected (Thanks Viv!)
    • If no date is selected by the student, the date is saved internally as 0000-00-00. These dates would appear as 30/11/-0001
    • Instead ‘No date selected will appear’
    • Applies to label date marking and controlled drug date marking
Dispense exercises (all regions)
  • Fixed a bug where saving an exercise would fail (Thanks Kathy!)
    • Patient history object was set to a string and a loop operation would throw an error.


Dispense exercises
  • Fixed initials not appearing on USA labels (Thanks Sarah!)
    • WKHTMLTOPDF changed the format that font-face fonts use
    • PDF export now loads font css for both labels and exercises
  • Cleaned up fonts.css
  • Removed fixed height for USA label PDF output
    • Allows labels to resize to fit directions content


  • Updated localisation files
  • Minified production CSS
  • Fixed pdf_font_copy script
    • Changed path copy command to reflect new location of script
  • Added new institution landing pages
    • ACP
    • Columbus State
    • IMU
    • Jefferson CoP
    • OSU
    • South Dakota State
    • UCSD
    • UIowa
    • UNam
    • UTHSC
    • UTTyler
    • Western Sussex
    • Wingate
    • XULA


r2015:2018 | 2018-09-14

German version 1.0


  • Added german prescription types
    • Normal
    • Private


  • Added German translation files
    • Enable by setting the following in Core:
      • Configure::write(‘Config.language’, ‘deu’);


Medications (GER)
  • Removed pill counting section
  • Removed label placement image requirements
  • Added pack_size_de field
    • Drop down menu with N1, N2, N3
  • Removed schedule
  • Removed qty
  • Removed rpt
  • Removed price
  • Added splittability field
    • N/A
    • Yes
    • No
Patients (GER)
  • Removed state field
  • Moved prescriber number field to standard fields
    • No longer depends on type
    • Removed type options
Patients (GER)
  • Removed concession section
  • Added patient number generate button
  • Removed state
  • Added insurance field
  • Added insurance number field
Dispense exercises (all regions)
  • Fixed medication name on medication prescription edit pane not using the region medication name function for output
    • Would always display in australian format
  • Added support for German prescription types (Normal, Private)
  • Added support for localised datepickers
    • Was not loading the jquery language files in exercise designers
Dispense exercises (GER)
  • Added support German medication name format output
  • Added German patient details
  • Added German prescriber details
  • Changed prescription medication pane to remove unneeded fields
    • Made directions optional
    • Removed instructions field
    • Removed instructions feedback field
    • Removed qty field
    • Removed rpt field
  • Removed dispensing records
  • Removed patient notes
  • Removed label only option
    • Updated help text to remove reference to label only option


Dispense exercises (all regions)
  • Added core_<region> javascript file to handle custom quicklaunch code
    • For all regions (except GER), it will refer back to the original quicklaunch populate code
  • Added backroom_region_med_backroom_select_extra function to backroom_<region>.js
    • Allows extra rows to be output on the medication selection pane
    • Returns nothing for all regions except GER.
  • Added more missing translations to the translation system
Dispense exercises (GER)
  • Added support for German region
    • Added German medication name display
    • Removed label creation from dispense screen
    • Updated dispense screen to display german medication details
      • Tablet splitability information
    • Removed benchtop
      • Added a new shopfront image without the benchtop
    • Added medication matching to product selection
      • Instead of having the label matching screen (label management) this is done during product selection
      • This is how we work around the lack of labels for Germany
      • Adding a product to the inventory makes a label object with only the label_index and product_medication_id set on it
    • Updated quicklaunch to support no labels
      • Displays medication matching information
    • Updated patient action pane to output no labels
      • Only product images from the ‘labels’ are displayed
Dispense feedback (All regions)
  • Fixed last uses of medication table form fields
    • Now correctly uses the medication_forms table
    • Fixed in AUS, USA, UK
  • Added missing phrases to translation system
Dispense feedback (GER)
  • Added support for German region
    • Removed medication tabs for label feedback
    • Changed notes tab to output medications + counselling notes on the one tab


SQL update 154
  • Added normal and private German prescription types.
    • Added as inactive.


  • Reminified exercise javascript and CSS


r1961:2013 | 2018-08-24


Dispense feedback (Hong Kong)
  • Fixed medications not appearing in feedback
Medication name display (Hong Kong)
  • Updated brand medication name display format to the following:
    • <brand name> (<generic name>) <strength> <abbreviated form>
    • Norvasc (Amlodipine Besylate) 5mg Tab
  • Updated generic medication name display format to the following:
    • <generic name> <strength> <abbreviated form>
    • Amlodipine Besilate 5mg Tab
  • Note that these changes only affect medication name display in exercises and feedback. No changes have been made to prescriptions.

Client and Admin

  • Added privacy policy / terms of service
    • Requires TOS config to be set in Config.php
      • Text – text displayed on ToS screen
      • Date_modified – date TOS last modified
      • Enabled – true/false
    • Appears on all pages and requires the user to check to acknowledge the terms.
      • If not agreed the ToS screen will appear again
    • Clicking do not agree will return the user to the MyDispense home page (the terms must be accepted for use)
    • Displays only on admin and student layouts using beforeRender in app/admin controllers.
  • Reworked update notes system
    • Moved check to before render in app / admin controllers
    • Now appears on any page – no longer has code specific to landing / login pages for user type (unit index, exam index, student index).
    • Displays only on admin and student layouts
  • Corrected spelling of Subtherputic to Subtherapeutic in validation exercise faults (Thanks Kathy!)
Prescriptions (UK)
  • Fixed the UK private prescription validation configuration where the patient and prescriber fault selection boxes were flipped (Thanks Jonny!)
  • Removed Age and NHS number as selectable faults for patients on the UK private prescription (these fields are not displayed)


  • Updated to prevent users from logging in with anonymously deleted user accounts (anon_del set to 1)


Exercises (all regions)
  • Fixed two bugs where the asset check medication replacement did not work correctly (Thanks Kathy!)
    • It was checking the patient id instead of the medication ID on dispensing records, causing the medication on the records to not update correctly.
    • Replacing alternative medications also had a bug present
Exercises (Validation, USA)
  • Added ‘too many refills’ fault for medications (Thanks Sarah!)
Student list (Admin options, all regions)
  • Added the option to select a unit that imported students will be enrolled in during student CSV import (account creation)
    • The option appears after the initial file upload screen
    • Selecting a unit will create user accounts (or if they already exist, skip them) and then enrol all users in the CSV file into that unit
    • Users will be enrolled even if their account already exists and they weren’t imported.
    • Users already enrolled in that unit will not be enrolled again
    • When unit enrolment is selected, an additional column is shown in the results, displaying where the user was enrolled in the unit or not.
  • Added a ‘delete selected students’ option
    • Selecting students and clicking the button will open a screen where the type of deletion and a list of students will appear
    • There are two deletion types:
      • Anonymise metrics
      • Delete all data
    • No matter which option is selected, all student submission data (required to display feedback) is deleted.
    • The anonymise option will anonymise the user table data and remove any Personally Identifying Information (PII) about the user from the database.
      • This includes replacing the username
      • Metric data is retained as it is anonymous at this stage
    • Delete all will delete everything about the user, nothing is retained
  • Updated student list display to not retrieve anonymously deleted user accounts
Unit students and studentgroups (all regions)
  • Updated student display functions to exclude users who have been deleted anonymously.
  • Updated to prevent being able to add anonymously deleted user accounts


  • Added checks for duplicate image hashes during import (Thanks Sarah!)
    • A list of duplicate image hashes in the receiving database are made
    • If an image hash matches one of these duplicate hashes, then an image hash match can not be made
    • This means that multiple copies of that image exist in the database and the image hash itself is not unique and therefore a reliable match cannot be made
    • For example, medications may have been made with a placeholder image. Then when importing, an exported medication with that placeholder image would match with the first medication with that placeholder image on the imported site.
    • In the case where this issue was found, Warfarin (with the placeholder image) would automatically match with Ativan – clearly incorrect.
    • Now if a duplicate image hash is found, during the image hash check, it will fall back to other match methods
  • Added checks for inactive matches (Thanks Sarah!)
    • If a match is made with an item in the database, the ‘active’ setting of that asset is now checked.
    • If the asset is not active in the database, then the match level will be reduced to 1. This means that a match will be displayed, but it will require manual confirmation during the import process.
    • When an asset is inactive, the message ‘Match is not active’ is displayed on the match card. This is to indicate that if you were to select this item, it is inactive in the database and would either need to be activated or replaced.
  • Changed Medication primary data check match levels
    • If a primary data match is made, it will be made as a level 1 match that requires a manual check.
    • In a lot of cases the details of the medication may be the same, but the product images are different
    • Requiring a manual review means that similar images aren’t missed at import because they are hidden as ‘exact matches’
  • Added support for export version 2
    • Can now import medication forms if they do not exist in the receiving database for Medications
    • If importing using export version 1 and a medication form does not exist, the form type will be set to 0 on import


  • Fixed alternative medications not exporting correctly in Dispense exercises.
  • Updated Export version to version 2
    • This version exports full medication form data from the server
    • Previously only the most basic form data was exported (the name + id)
    • Exporting the full data means that we can import medication forms on the other end if they do not exist in the receiving database


  • Moved unit table view from import to /View/Elements/pane/tbl_unit.ctp
  • Added unit table pane function to Unit controller (to allow a generic location to be able to display that pane


SQL Update 152
  • Added tos_accepted field to users table
SQL Update 153
  • Added anon_del to users table


r1892:1947 | 2018-07-31


Exercises (all regions)
  • Changed pushy patient dialog no button label to ‘No’
OTC exercises (all regions)
  • Fixed an IE10 bug for patient selected medications (Thanks Adam!)
Assessment release (all regions)
  • No longer displays criteria that have no marks associated with them
    • Includes criteria that have a maximum mark of 0
  • No longer displays sections that have no valid criteria to display (Thanks Tsitsi!)
Validation exercise feedback (all regions)
  • Removed list of ‘incorrect faults selected’ on script dispense / correct feedback screens when no faults have been selected

Prescriptions (UK)

  • Fixed missing addresses on the UK Private CD prescription (Thanks Mike!)


  • Fixed patient image selection (Thanks Keith!)
Assessment marking (dispense exercises) (all regions)
  • Fixed a bug in assessments when a CD record without a match or an alternate match is encountered
Validation exercises (all regions)
  • Fixed a bug where entering spaces in the misc field on the prescription would result in %20 appearing instead of spaces (Thanks Jonny!)

Database updates

SQL update 151
  • Changed default database character set to utf8mb4 from utf8
  • Converted all character sets to utf8mb4 from utf8


  • Added UTF-8 headers to all layout files
    • HTTP header
  • Added symposium unit copy functionality (see r1900 changelog)
  • Added symposium user import functionality (see r1902)
  • Added symposium 2018 login styles


r1889 | 2018-06-29


Labels (UK)
  • Added an additional line for addresses on the label


  • Updated PDF exporter to the latest version
    • Required some minor changes to command configurations


r1883 | 2018-06-21


Validation exercises (UK)
  • Fixed a bug where private scripts would hang when selecting medications (Thanks Jonny!)
    • Private scripts were missing a validation config. Added missing config
  • Fixed title missing from field hide options for patients (Thanks Jonny!)
Validation exercises (all regions)
  • Added ‘Insufficient quantity for the directions’ fault option for medication qty (Thanks Jonny!)


Exercises (UK)
  • Added pharmacy address to full labels (Thanks Jonny!)
  • Fixed initial fields handwriting font not loading on IE11


  • Updated minified exercise css and js


r1821 | 2018-06-05


  • Fixed a bug in the exercise completion report where results were not showing correctly for OTC exercises (Thanks Lisa!)
  • Updated completion report so it displays tutorials in the correct order


r1791 | 2018-05-29


  • Fixed Patient image locking / unlocking functionality (Thanks Keith!)
    • Patient image unlocking now works correctly
    • Also added checks to show / hide the clear image button if the locked checkbox has been selected
    • Added check on patient edit load to display the clear button correctly


r1705 | 2018-05-08


Assessment marking (all regions)
  • Fixed a bug where a fault on a prescription would be correctly displayed as required and incorrectly displayed as being a non-required fault selected by the student (Thanks Kathy!)
Validation exercise designer (all regions)
  • Fixed a bug where the date expiry mark settings would not load correctly (Thank Kathy!)


r1688:1697 | 2018-04-30


Assessment release
  • Fixed endorsement prescriptions not appearing (Thanks Kathy!)
  • Fixed medication criteria displaying marks in the criteria details  (Thanks Kathy!)
  • Added check to medication criteria to see if the alternate medication mark is higher than the standard mark and use the alternate medication mark as the maximum for the criteria instead.


OTC exercise designer (All regions)
  • Fixed a bug where the patient question assessment checklist would prevent exercises from being saved (Thanks Clark!)
Dispense and Validation exercise designer (USA)
  • Added qty words field for USA generic prescriptions for medications
    • Can optionally add the quantity in words to medications (Appears like: 30 Thirty)


  • Added support for qty words to USA generic and generic NL prescription types


R1672 | 2018-04-17


Units (all regions)
  • Fixed a bug where copying a unit would delete studentgroup data from the unit you just copied from (Thanks Clark!)
    • This is because of a recursive query that when the tutorials were copied, studentgroup data would be deleted.
Dispense exercises (all regions)
  • Fixed a bug where the counselling notes marking criteria would not save correctly (Thanks Kathy!)
Marking (all regions)
  • Fixed a bug where endorsement marking and patient counselling marking would not appear (Thanks Kathy!)
  • Fixed a bug where fact finding marking would appear to have a maximum mark of 1 when not completed when no marking penalty is set (Thanks Kathy!)
  • Fixed a bug where script date faults would not appear correctly (Thanks Clark!)
  • Fixed a bug where patient date of birth faults would not appear correctly
  • Fixed a bug where label mark totals were not calculating correctly (Thanks Kathy!)


Validation exercises (all regions)
  • Fixed a bug where loading a validation exercise with saved progress would cause it to hang (Thanks Clark!)
    • Script notes were trying to access an object that didn’t exist.


R1668 | 2018-04-13


Validation marking interface
  • Fixed a bug where a fault on a prescription that was required by the student and was selected was appearing as not selected (Thanks Sophia and Clark!)
    • There were two bugs here. One was causing the fault to not be added to the list of criteria to mark — so even though the student should’ve selected the item, it wasn’t appearing in the list of faults to mark
    • The second bug caused the missed fault to appear in the list of additional faults that the student selected. Now the fault will appear on its own line as intended and not also appear in the additional faults list
  • Fixed additional faults selected by the student appearing in the automark section instead of the manually marked section
    • This also caused the manual marking section to appear even though it was empty — because the additional faults row should’ve appeared there instead
Assessment landing page
  • Fixed a bug where the marking statistics for validation exercises were not loading correctly (Thanks Clark!)
    • This is because Validation exercises do not have sectional marking, all marking for the exercise is saved in one location and is saved when the exercise is submitted
    • In the backend there are two fields for setting an exercise as marked. Marked and exercise_marked. Marked is used for exercise level marking, such as in dispense and OTC exercises. Exercise marked indicates that the exercise as a whole has been marked. Marked was being used on the query instead of exercise marked, which caused issues.


R1663 | 2018-04-10


Dispense exercises (all regions)
  • Fixed a bug where the professional notes assessment criteria would be set as enabled even though it should not be able to be enabled (such as when professional notes aren’t enabled)
Studentgroups (all regions)
  • Added bulk select button when adding students to a studentgroup (Thanks Clark!)


Assessment results (all regions)
  • Fixed criteria the actual maximum mark value was not being used for some criteria (Thanks Clark!)
    • OTC treatment groups, Patient and Prescriber fact finding
  • Fixed Patient/Prescriber fact finding no attempt feedback from not appearing (Thanks Clark!)
  • Fixed Patient question no attempt feedback from not appearing (Thanks Clark!)
  • Updated release feedback for Dispense exercise cumulative criteria
    • No longer displays raw marks for items
    • Now lists results as ‘label 1: <result>’ instead of ‘1: <result>’
  • Updated release feedback for Fact Finding
    • No longer displays raw marks for items.
    • Lists all must ask and do not ask questions asked by the students
    • Lists all must ask questions required by the exercise
    • Added additional clarification for no attempt results
  • Updated release feedback for OTC treatment groups
    • No longer displays raw marks for items
    • More concise feedback for students. If a beneficial medication is selected that isn’t the preferred medication, the preferred medication will be shown to students
    • Could be room to display more of the exercise feedback here rather than some statements.
  • Increased size of the release modal from small to medium
    • Wider!


R1605-R1641: / 2018-03-27


Assessment Results (all regions)
  • Added the assessment results feature
    • Marker’s can now optionally release results for students to view from the unit page
    • Overall results will be displayed in a pane with a link to each exercise. See the Assessment Release section in Admin for how this view can be configured
All Exercises (All Regions)
  • Added an explicit error message when an administrator attempts to submit an assessment while in student view


Exercise designers (all regions, all exercises)
  • Added calculation of total marks for assessments. Saves to fields added in SQL update 149.
Assessment Marking (all regions, all exercises)
  • Removed mark field from patient questions that were not answered
    • Marks could not be saved for questions that were not answered, so removing the box makes this clear (replaced with N/A)
  • Added maximum mark total display to all sections
    • For a section mark, it displays the total possible mark for that section in the section mark area
    • Underneath the total mark for the exercise on the marking sidebar, the maximum possible mark for the exercise is displayed
  • Added manual override for overall assessment mark
    • By default, cumulative exercise total will still be used
  • Marking sidebar will now continue to be displayed with previous and next controls when viewing an exercise that was not submitted by a student
  • Changed display system for fact finding so that missed must ask questions are listed at the bottom of the question display, with the total maximum mark for the criteria
    • By default the auto-mark button will display the mark that the student can receive based on the questions that they ask, which can be confusing because markers may be wondering where marks may be missing.
    • Now those missing marks are displayed in the marking interface, which should make fact finding marking less confusing.
Assessment Release (all regions)
  • Added the assessment release feature
    • New interface pane on the assessment landing to page to configure how and when assessment marks will be released to students
    • Choose whether results will be shown or hidden at an overall, exercise and criteria level, as well as how the results will be displayed
    • Choose whether marker’s comments will be shown or hidden
    • Choose whether or not to display student’s answer alongside correct answer
    • Select a time and date for results to be made available for viewing


SQL update 149
  • Added assessment release fields to tutorials table
  • Added assessment mark total fields to exercise, medications prescriptions and prescription (Validation exercises) tables
SQL update 150
  • Added update notes for Assessment Release to the updates table
Data update 45

Calculates the total marks for each exercise (that is an assessment) and saves them in the fields added by SQL Update 149.


R1646:1653 | 2018-03-28


Exam marking
  • Added row of student selected medications when marking advanced OTC exercises (Thanks Kathy!)
  • Added row containing treatment group marking values after each treatment group mark in advanced OTC exercises (Thanks Kathy!)
  • Changed behaviour of penalty marking buttons so they always appear even when the penalty is not set / 0
  • Added second penalty box for OTC treatment groups so both the harmful and no match penalties can be displayed
    • This is when students select a harmful medication that isn’t in the list of harmful medications
Dispense and Validation exercises (UK)
  • Removed cost centre name requirements from prescriptions (Thanks Kate, Mike)

Prescriptions (UK)

  • Removed cost centre name from all prescriptions (Thanks Kate, Mike!)
    • It was appearing in the same place as the medical centre and there was no room for it. The medical centre name is preferred, so it has been removed. The cost centre number still appears as expected.


R1612 / 2018-03-13


Administrators page
  • Fixed reset password option not working for Cake/MyDispense accounts.
Exercises (OTC and Dispense, all regions)
  • Fixed a bug where feedback for custom fact finding questions couldn’t be entered without saving progress and reloading (Thanks Mike!)


R1595:1602: / 2018-03-01


Import (all regions)
  • Added an additional check for the image hash check to make sure the image hash its checking isn’t empty before declaring a match.
    • In a case where the image_hash is empty it’ll return a match with the first medication with an empty hash. Which isn’t great.
Dispense exercise designer (all regions)
  • Fixed a bug where a prescriber who shouldn’t be able to prescribe a prescription was causing the exercise to not be submittable when the enforcement hasn’t been set to strict.
  • Fixed label marking appearing when activating assessment marking when errors are enabled and do not dispense is selected as the outcome
  • Fixed a hanging bug after patient selection where the sections underneath patient selection would not appear.

Prescriptions (UK)

  • Added hide GMC No. option to private prescriptions
    • Completely hides the field, along with the GMC No. : text


r1583 / 2017-02-06


Dispense exercises (all regions)
  • Fixed label medication name resize code not being applied to labels due to the new label management screen
  • Fixed some CSS issues with the new label management screen
Dispense exercises (AUS)
  • Fixed label medication name resize code not working correctly
  • Updated print label size from 80x40mm to 96x48mm


  • Updated minified exercise javascript and css


r1565:1580 / 2017-01-29


OTC exercises (all regions)
  • Fixed a bug where an incomplete OTC exercise would not load due to a missing fact finding object (Thanks Monique!)


Dispense exercise feedback (UK)
  • Fixed ‘something should go here…’ appearing as the correct feedback for the prescriber authority criteria for CD entries (Thanks Vicky!)
Dispense exercise feedback (AUS)
  • Fixed medication names not appearing correctly on the correct label when the medication in question is a generic medication (Thanks Viv!)
    • Had a = instead of a .=.


  • Replaced all instances of ‘let’ with ‘var’ in javascript for IE compatibility
  • Updated link on the Altinbas landing page from the old Kemerburgaz link


R1538 / 2017-01-17


Dispense exercises (all regions)
  • Added support for medications that do not have a form (appears blank)
Exercises (Hong Kong)
  • Updated Rx medication selection pane to refer to controlled drugs as CD instead of S8
Patient editing (all regions)
  • Fixed a bug where you could not select a patient image to associate a patient with (Thanks Keith!)
    • Standardised using the common asset tables javascript file.
Patient and Prescriber editing (AUS, UK, USA)
  • Changed the street address field from multiline text entry to single line text entry
    • Street address fields on prescriptions are not actually multiline
    • So this change has been made to reflect that and prevent confusion.

Prescriptions (all regions)

  • Added support for medications that do not have a form (appears blank)
  • Added prescriber medical centre field to all UK prescriptions


  • Updated landing page NMU (formerly NMMU)


R1521:1535 / 2017-01-16


Dispense exercises (All regions)
  • Fixed a bug in the label pdf printing code where the prescriber ID would not be passed to the PDF generator correctly, resulting in no prescriber being printed on the label.
  • Fixed a bug where the attachment additional information check was checking the wrong property to see if an attachment had been opened.
  • Fixed a bug where the MyDispense version was not being recorded in metrics
Dispense exercises (Australia)
  • Added support for PDF label printing
    • Rewrote direction / label splitting code. Now when splitting directions it looks for spaces and line breaks in the directions.
    • That means we now account for when students hit enter when making directions and the label splitting properly handles line breaks in the directions.
  • Added styles for the closing the gap section on the dispense screen
Dispense exercises (UK)
  • Updated UK label printing code with updated label splitting code
    • Properly handles line breaks in the directions now
  • Changed maximum number of direction lines when printing UK labels
    • Reduced to 5 from 7.
    • Prevents directions from being cut off and hidden at the bottom of the label
    • As a side effect, some labels may not be as dense, but it is better to not lose any directions on the label.
All Exercises (All Regions)
  • Fixed issue where students were able to access exercise for assessment that has already been submitted while the exam is still open
  • Fixed issue were students may potentially submit an assessment after the deadline has passed
  • Fixed issue where students could submit an exercise even though they did not have access to the exercise.
    • Submission of the exercise would require crafting a custom + correct URL request to complete the exercise. This check ensures that the user has current access to the exercise before allowing submission.
  • Added link attachments
    • Appear below ‘document attachments’. Clicking the link will open it in a new tab.
    • Ties into attachment opened metric. If a link is clicked, it will increment the attach_open / pap_attach_open metrics.
Validation exercises (all regions)
  • Added incomplete to the list of faults for medication directions (Thanks Vicky!)
  • Fixed a bug where the user id and exercise id was not being recorded in the main exercise table of the validation metrics. (Thanks Clark!)
    • The Exercise and User_IDs are restored in data update 44 using the contents of the metrics_checks_scripts table.
    • In the case of the user_id it was not being recorded because the user_id column was named user_Id instead
    • Exercise id was not being recorded because the exercise_id was not set on the exercise level, but it was set on the script level
    • Found when I was gathering data for Clark Kebodeaux from the University of Kentucky.
Dispense feedback (HK)
  • Fixed a bug where region data was not being displayed correctly (Thanks Hercules!)
  • Removed all other fields except for street address when displaying the patient address in feedback (Thanks Hercules!)


All exercises (all regions)
  • Added support for link attachments
    • Link attachments allow for links to be added to exercises
    • Links can link to anything you want and will appear in a new tab
    • Note that the full URL of the link must be included, including http://.
Dispense exercises (HK)
  • Fixed an issue where editing a controlled drug would require you to fill in a field that wasn’t there (Thanks Hercules!)
  • Updated medication select pane and changed the S8 (Australia) reference to CD
Validation exercises (all regions)
  • Fixed a bug where the prescription edit pane would not load in chrome and safari
    • Added a setTimeout delay to tinyMCE initialisation to TinyMCE to initialise before checking for the contents of fields, which would cause exceptions.
Medication edit (UK)
  • Fixed a bug where CD enabled medications weren’t loading their CD settings correctly
Prescribers edit (UK)
  • Fixed a bug where the prescriber pin was not being saved or loaded correctly. (Thanks Kate!)


SQL Update 147
  • Added instructor update message for Link Attachments
SQL Update 148
  • Renamed user_Id field in metrics_checks to user_id
Data update 44

Updates the user_id and exercise_id of metrics_checks rows using the data stored in the metrics_checks_script table. For each script in a validation exercise, a metrics_checks_script row is created for each metric. These rows correctly stored the user_id and exercise_id fields for the metric and have a direct link back to the metrics_check row (metrics_checks_id).

We use that link to go back and fix the data losses caused by the user_id and exercise_id storage bugs.


  • Updated TinyMCE from 4.5.5 to 4.7.4.


R1473:1511 / 2017-12-11

Login and user creation

  • Added support for update messaging system
    • When logging in, a check is made to see if an update message dialog should be displayed to the user
    • Updates are based on role level. Updates from lower role levels are displayed to higher role levels. Therefore we can make an update message for students, but it will be displayed to markers, instructors, admins and so on.
    • Updates are displayed upon login.
  • Updated user import and user creation with support for update system
    • When creating a user, it will check to see what the latest update level is and create the user with that level.
    • Therefore when the user logs in, every update message added to MyDispense won’t appear for them the first time they log in.

Validation exercises (all regions)

  • Reworded ‘not permitted to use this type of prescription’ fault
    • Added ‘Prescriber not permitted to use this type of prescription’
    • Added to provide additional context to the fault.


Unit and Assessment index pages (all regions)
  • When these pages are displayed after login, an update check is made and all unseen update messages are displayed to the user.
  • Clicking ok / close on the update window will dismiss it for this update.
  • Each update is displayed as its own page, with previous / next buttons at the bottom.
Admin general (all regions)
  • Added updates button to the user drop down menu.
    • Clicking the button will display all updates previously displayed to the user.
Dispense and OTC exercise designer (all regions)
  • Updated patient image selection system
    • Clicking on a patient image during selection will now open up extra details about that patient image
    • Age, Bodyshape and Region have been added in addition to Sex
  • Added new search options for patient images
Patient Images (all regions)
  • Added new filtering options to patient image index
  • Added Age, Bodyshape and region fields to patient image edit and create pages
OTC exercises (all regions)
  • Added notes section to OTC exercise
    • Added professional notes feedback option
  • Added assessment marking support
Validation exercises (all regions)
  • Added assessment marking support
Dispense exercise designer (all regions)
  • Added additional validation when enabling the hide prescription option.
    • Exercises with the hide prescription option enabled may only have a single medication on the script that the student needs to dispense.
    • This is a technical limitation with the new label management screen we are introducing this update.
    • When dispensing an emergency supply with multiple items on the script, we would be forced to lead students by displaying the medication names on the script.
    • However, since the script is hidden from the students (you still create a prescription in the exercise designer, students just don’t get to see it) displaying those names would cause a number of issues.
    • Therefore we have decided to restrict hidden prescription exercises to one item on the script.
  • Simplified loading of assessment views and js files
    • Some assessment features were gated behind an assessment config in region data. So features could be turned off per region
    • This functionality has never been used, so it has been removed.
Dispense exercise designer (USA, AUS, HK)
  • Fixed a bug where the first ancillary already selected would not appear on the ancillary selection pane as selected (Thanks Kaan!)
Exam marking (all regions)
  • Moved javascript from region section to core.
  • Fixed the right hand panel displaying that an exercise had been marked based on the exercise level marks instead of the whole exercise status.
  • Added support for OTC and Validation exercise marking
Unit Studentgroups (all regions)
  • Removed checkbox style selection for all submenus, instead simply click anywhere in the desired rows to select them.
Unit Tutorials Studentgroups
  • Removed checkbox style selection for selecting the student groups to be associated with a tutorial, instead simply click anywhere in the desired row to select it.
OTC Medication Categories
  • Removed checkbox style selection for OTC medications, simply click anywhere in the desired row to add or remove a medication from the current category. Medications that are in the current category will be highlighted.
Admin Options Students
  • Remove checkbox style selection for exporting students to CSV
Admin Options Staff
  • Added authentication options menu for staff
Exam manager (all regions)
  • Updated core code for Not Reviewed, Reviewed, Not Taken and All pages so that the students displayed on these pages are students currently enrolled in the exam.
    • So students who have been removed should no longer appear in the results for these pages.
Prescribers (UK)
  • Added support for Veterinarian prescribers
    • Prescriber # NNNNNNN
Rx Medications (HK)
  • Fixed bugs that would cause medication editor to hang when trying to edit them


  • Header changes
    • Removed old logout link
    • Added new name drop down menu in the top right of the screen (same as admin)
      • Contains logout button and updates button
      • For admins, also contains role name and link back to the admin screen.
    • Removed i icon from the header
      • The i icon would display the exercise introduction information.
      • This is now accessed by clicking the exercise name in the heading
Unit page (all regions)
  • Added update message check support.
    • If an update message can be displayed, it will be displayed on this page.
  • Added button to display updates at the bottom of the unit list
    • Only appears to student users (non-student users won’t see the button)
    • Displays all updates previously displayed to students (even ones they haven’t seen before)
OTC exercise feedback (all regions)
  • Added professional notes feedback
    • Appears underneath professional notes
    • If no professional notes have been entered, but there is feedback, the feedback is displayed.
Dispense exercises (all regions)
  • Fixed a bug where having no medication on a label and sticking it on a product would cause MyDispense to hang.
  • Added ‘continue exercise’ heading to second continue exercise dialog box
  • Added new label management interface
    • Instead of using the order that labels were created in to make an association between the label and the item on the script, you must now explicitly make a connection between the item on the script you want the label to be for.
    • Should reduce student errors due to technicalities.
    • Single item scripts do not require an association to be made.
  • Added error message when trying to handover products and label hasn’t been assigned to an item on the script.
    • Once the close button on the dialog is clicked, the user is automatically navigated to the label management screen.
Dispense exercises (HK)
  • Initial client preparation for Hong Kong
  • Added dispense screen changes for Hong Kong
    • Removed script type selection
    • Removed repeats
    • Added precautions field
      • Precautions field in lieu of ancillaries
  • Added Hong Kong label
  • Benchtop changes
    • Removed ancillary section
    • Removed label placement
  • Backroom changes
    • Changed Controlled drug register to match Hong Kong table format (front page still in aus format)
      • Removed prescriber details field
      • Removed signature field
      • Added Hong Kong ID field
        • In the back end it uses the prescriber field
    • Added pill counting activity
Dispense exercise feedback (all region)
  • Changed how endorsements affect partial / full exercise feedback fields
    • The system was a little confusing and more strict that it needed to be. Simplified the system and made it less strict.
    • Old behaviour
      • When working out which feedback field to display when endorsements are in play, feedback would check through each item selected by the student AND the teacher in admin.
      • If there wasn’t a full 1:1 matchup of all the selected endorsements, partial feedback would be displayed.
      • This was a bit of a problem as endorsements aren’t fully black and white.
    • New behaviour
      • Instead of checking through each endorsement selected in the admin and by the student, we now check to see if endorsements have been enabled in the exercise and whether the student has completed them.
      • If the exercise has endorsements and the student has endorsed the script, full feedback will be displayed (if other additional options haven’t caused partial feedback to be displayed)
      • If the exercise has no endorsements and the student has not endorsed the script then full feedback will be displayed
      • If there is a mismatch between the two, where the exercise has endorsements, but the student didn’t endorse, partial feedback will be displayed.
      • Same if the exercise doesn’t have endorsements, but the student decided to endorse.
Dispense exercise feedback (HK)
  • Added support for Hong Kong
  • Removed following feedback rows:
    • Rpt
    • Script type
    • Ancillaries
    • Label placement
    • CD feedback
      • Removed prescriber details feedback
      • Removed signature feedback
  • Added feedback rows:
    • Precautions (replacement for ancillaries)
    • Pill counting
    • CD feedback
      • Added hong kong ID feedback

Database updates

SQL Update 145
  • Added age, region and bodyshape fields to the patient images table
SQL Update 146
  • Added updates table to the database.
    • Allows support for update message function
  • Added update_level field to users table
    • Tracks last update displayed to the user
  • Added 6 initial update prompts for 5.2.0
Patient image update
  • Patient image update package
  • Updates all patient images from old versions to new versions
  • Includes an extra hundred patient images
  • Adds support for new database fields added in SQL update 145.


  • Added Less CSS support
    • Kaan can now do magic!
    • Less CSS shouldn’t compile on production servers and if it does it should only occur once.
  • Renamed all instances of Gender to Sex
    • Mainly for patient images and patients.
    • Gender has become more muddied politically, therefore to sidestep any issues we will use Sex from this point on.
    • Database fields have not been renamed but may be renamed in future
  • Removed all patient images and prescriber signatures from the SVN repository
    • These were still in the repository due to legacy commits
    • Standardising these so they are the same as medication and OTC images.
  • Updated bootstrap config file to include loading of all plugins at run time.
  • Institution landing pages
    • Added Altinbas university landing page
    • Added D’Youville College landing page
    • Removed Kemerburgaz landing page


R1513 / 2017-12-12


Assessment marking (all regions)
  • Added patient question display when students decide to not dispense a dispense exercise (Thanks Stephanie!)


R1509 / 2017-12-11


Assessment marking (all regions)
  • Added patient notes, counselling notes and professional notes display when students decide to not dispense a dispense exercise (Thanks Jill!)
    • If a student decides to not dispense a dispenseable exercise, there is a catch-all system. Unfortunately it was not displaying all the available information.


R1482 / 2017-11-17


Prescriber create (all regions)
  • Fixed a bug where region data for a prescriber was not being saved correctly. (Thanks Mong!)


R1464:1467 / 2017-11-01


Unit Tutorials (all regions)
  • Selecting assessment for a unit will now hide the tutorial datetime selector
  • Units with groups will no longer display tutorial datetime selector
  • Fixed bug where deselecting all student groups caused the application to hang
Unit Students (all regions)
  • Removed checkbox style selection for students, instead simply click anywhere in the desired rows to select them
Dispense exercise designer (all regions)
  • Fixed a bug where the brand substitution not permitted checkbox would not populate correctly (Thanks Clark!)
    • After un-checking Brand Substitution not permitted and saving it, the check box would save correctly, but not appear unchecked the next time you open the exercise.


All exercises (all regions)
  • Fixed PDF’s not appearing in FireFox (Thanks Clark!)
    • Mozilla decided that removing the pdf mimetype was a great idea, which broke the method used to display PDF’s.
    • We have fallen back on a more manual method using an object tag with an additional embed tag inside of that for IE.
    • IE requires that a PDF reader be installed on the system for it to work correctly though.
  • Removed PDFObject.js library
    • No longer in use as Firefox broke it.
Dispense exercises (all regions)
  • Fixed a bug when trying to generate a medication expiry date (Thanks Clark!)
    • If a medication didn’t have any region data set, it would cause MyDispense to hang.
    • Checks to see if region data is set and if is isn’t, will use the default expiry range for medications instead (90 days)


  • Re-minified dispense exercise js


R1461 / 2017-10-26


Validation exercise feedback (all regions)
  • Fixed a bug where the incorrect message would be displayed for the prescription outcome (Thanks Kathy!)
    • Would display that the student was correct/incorrect when the opposite was true.
    • Renamed the feedback files on the back end so I don’t get confused when looking at Validation exercise feedback.
      • I mean, who names dispense script feedback script_correct and do not dispense script_incorrect and expects to not get confused by that?
      • Renamed them to script_dispense and script_do_not_dispense.


Dispense exercises (all regions)
  • Fixed a bug where an empty medication ID in the alt_meds object would cause the asset check page to appear and hang because of the empty medication (Thanks Clark!)
    • I’ve added a check during the alt_meds loop that checks if the medication ID is empty. If it is empty, then it will skip adding that empty medication to the asset check medication list.
    • It also removes the index with the empty medication and saves the region data for the medication prescription item to make sure no errors can occur down the line.
      • If the alt_meds object is empty, it will remove it completely before saving as well.


R1440:1443 / 2017-10-24


  • Fixed a bug where the miscellaneous field would not appear correctly on UK private prescriptions (Thanks Kate!)
  • Removed prescriber type and sub code from UK private prescriptions (Thanks Kate!)


Assessment marking
  • Fixed a bug where professional notes would not appear on the marking screen (Thanks Marlowe!)


All exercises (Australia)
  • Fixed ‘undefined’ appearing on labels where a medication cost has not been defined.
Dispense exercises (all regions)
  • Removed reference to prescription on label management screen when the prescription is hidden
  • Removed medication list in the quick launch popup in label only exercises
Dispense exercises (UK)
  • Fixed a bug where clicking the PM register pen, then cancelling the PM register action by clicking on the benchtop would not cancel the action correctly.
    • If you click on another object it should clear the action. However if you clicked on a label after clicking elsewhere, the action would not clear correctly and the PM register would open.
    • Changed the benchtop cleanup function to run a custom function to rebind the normal label placement functions.
Dispense exercise feedback (UK)
  • Moved ancillary feedback from full exercise section to general section in feedback.
    • This means that ancillary feedback is now displayed on label only exercises
    • UK ancillaries are attached on the Dispense screen, so technically they can be used in label only exercises.
    • This change reflects that.
OTC exercises (all regions)
  • Fixed a bug where reject medication counselling would not work (Thanks Jill!)
    • Was looking to output the form of the OTC, which isn’t needed. So I removed the form output for the medication.
Validation exercise feedback (all regions)
  • Fixed username not appearing on PDF export (Thanks Kathy!)


  • Added landing page for PCOM SOP
  • Minified the exercise css and javascript


R1434:1437 / 2017-10-20


Dispense exercises (all regions)
  • Fixed the prescription errors pane from not appearing correctly (Thanks Tara and Mike)


All exercises (all regions)
  • Fixed missing minified production CSS (Thanks Kathy!)
    • This was causing the validation exercise submit button to not appear.
Validation exercises (all regions)
  • Added an empty medication form to the medications_forms object (Thanks Kathy!)
    • This fixes an error that would cause exercises to hang if a form hasn’t been selected for a medication. This protection is in other exercise types, but wasn’t in validation exercises until now.


R1410:1416 / 2017-10-10

Patient / Prescriber ID consolidation

For better interoperability between MyDispense regions, the backend names for Patient and Prescriber numbers have been standardised. For all patients, this means the patient number region field has been renamed to patient_number. For prescribers the prescriber number field has been renamed to prescriber_number.

So when importing/exporting between regions, the numbers will now appear, even if they are in the same format. This will also allow for prescriptions from other regions to work properly and allow me to consolidate the prescription configuration system in future.

Changes per region:


medicare_number -> patient_number


No changes


pin -> prescriber_number

nhs_number -> patient_number


No changes

Login pages

  • Moved login JS from inline script to auth/common.js
    • Due to security and script content location changes, the script had to be move or it would be blocked.


  • Added UK Private prescription
    • Very basic prescription type.
  • Changed Hong Kong fonts from Simplified Chinese to Traditional Chinese.


Table searching (all admin pages)
  • Fixed table searching to allow for spaces and special characters in searches, rather than stripping them out.
    • Done by fixing the search RegEx to be more robust.
    • Escapes ^ \ “ so searching won’t bug out.
  • Updated all admin page javascript to support new table search system
    • Otherwise if you typed a symbol it would recursively escape it until your browser crashed. Which isn’t fun.
Dispense exercises (UK)
  • Added ancillary number column to ancillary selection table
  • Added support for private prescription type
  • Fixed alternative medications not appearing on prescription medication screen
Dispense exercises (AUS)
  • Fixed a bug where opening the prescription errors pane with a hospital script would cause the exercise designer to hang.
All exercises types (HK)
  • Added support for chinese name display on patient and prescriber tables
  • Added support to search by chinese name using the name search field
Export (all regions, all types)
  • Added export report link on export wait dialog box
    • Clicking the export report link will download a CSV report
    • The report contains a basic overview of the exercise contents in the export package you are downloading
    • The report lists:
      • Tutorial
      • Exercise name
      • Exercise description
      • Exercise type (OTC, Dispense, Validation)
      • Exercise outcome (Dispense, Do Not Dispense, Recommend, Do not recommend)
      • Patient details
      • Other basic exercise details
    • Aimed at helping catalogue exported exercises
Patients (Hong Kong)
  • Changed Hong Kong ID generator to only generate numbers between 1-10 (10 being the letter A), instead of 0-10 (where 10 is the letter A)
    • 0 looked strange in the ID generator.
  • Added chinese name field
    • Stored internally as ‘third_name’ in region data
    • This is an attempt to make ‘third names’ more interoperable if another region uses them in the future.
Prescribers (Hong Kong)
  • Added chinese name field
    • Stored internally as ‘third_name’ in region data
Studentgroups (all regions)
  • Fixed a bug where instead of N/A, the end time for non-assessment studentgroups would appear around the Unix epoch (1969) (Thanks Allen!)
  • Fixed a bug where the bulk removal of studentgroups would not work after adding student groups
  • Added better handling of the no student groups exist message. Now appears correctly.


All exercises (all regions)
  • Fixed table searching to allow for spaces and special characters in searches, rather than stripping them out.
    • Done by fixing the search RegEx to be more robust.
    • Escapes ^ \ “ so searching won’t bug out.
  • Consolidated Rx medication name output for each region into a single function
    • Previously medication name output was handled independently for each interface that displayed a medication.
    • This meant that medications could appear with inconsistent names throughout the client interface.
    • For example, UK medications should appear with the medication form in full.
      • However this naming convention was not being applied throughout the exercise interface. Labels in the POM register would have an abbreviated medication form rather than the full medication form and the labels on the benchtop would appear with full form names.
    • This has been standardised across all exercise types and all regions. So each region now has a ‘region_med_name’ function defined in its label_structure_<region>.js file.
    • This function is used after Rx medications have been retrieved for use in the exercise to create ‘display’ versions of the medication name. It will take the medication name and add the strength, form and any other fields for display for that region.
      • The fields are: display_name and display_generic. Where display_name is the brand name of the product and display_generic is the generic name.
  • Updated exercise javascript to use standardised fields for patient and prescriber numbers.
Dispense exercises (all regions)
  • Fixed pasting into notes and directions from being blocked in assessments due to new server content rules.
    • For assessments, pasting directions and notes is blocked in certain fields.
  • Moved functions around for medication name consolidation
  • Removed shopfront region JS
    • No longer needed after consolidation efforts.
  • Added core.js file
    • Moved asset loading functions from shopfront.js to core.js
  • Added validation to check that fields loaded for a script type are checked for their existence before spitting out errors.
Validation exercises (all regions)
  • Added full medication form names to exercise data payload.
    • Added for compatibility with Rx medication name consolidation
  • Fixed a bug when loading an exercise the loading progress bar would still display even though the exercise had fully loaded.
  • Added optional notes when confirming decisions about scripts
    • These notes are displayed in feedback and can be marked in the upcoming 5.2 assessment update.
  • Removed green / red backgrounds after selecting whether a prescription should be dispensed or not dispensed.
    • Replaced with a more neutral background
    • This is so we’re not misleading students by making them think their choice is correct or not.
    • Updated button colours too
  • Updated complete exercise icon
    • No longer appears as a hand. Should be less ambiguous
OTC exercises (all regions)
  • Changes for compatibility with Rx medication name consolidation
Validation exercise feedback (all regions)
  • Added display of optional notes to feedback
    • Note that there is no feedback for the optional notes. This is just so students can see their notes and compare it to the regular feedback fields in the exercise.


SQL Update 144
  • Added UK private prescription type to database (not enabled by default)
Data update 43

Patient/Prescriber # consolidation

  • Renames medicare_number, nhs_number to patient_number in patient region data.
  • Renames pin to prescriber_number in doctor region data


  • Re-minified dispense exercise JS
  • Added landing pages for the following institutions:
    • Temple University
    • Cardiff University
    • Howard University
    • MISR International University
    • Chicago State University
  • Fixed CSS minifier utility script
    • Now using uglifycss
  • Updated minified exercise JS and CSS


R1402 / 2017-09-13


  • Replaced instances of $this->method->post with Ajax check instead.
  • Now casts database ID’s in URLs to INTs to prevent SQL injection


  • Added int casting for all database requests


Exam marking
  • Fixed a bug where endorsement marking would not appear (Thanks Kathy!)
    • Occurred when other manually marked criteria for the exercise were not enabled.
    • Added a check to make sure it gets displayed correctly.


  • Updated MyDispense server configuration to be more secure.
    • Updated rewrite to check for files and directories before performing rewrite in NGINX config.
    • Stops URLs like admin/units/tutorials/APP/webroot/index.php from appearing on the site landing page and returns a 404 not found error.
    • Added content security policy headers
      • Content-Security-Policy “default-src ‘self’; script-src ‘self’; img-src ‘self’ data:; style-src ‘self’ ‘unsafe-inline’; font-src ‘self’ data:; child-src ‘self’; connect-src ‘self’; object-src ‘none’ “;
      • Content-Security-Policy “upgrade-insecure-requests; “;
  • Fixed missing svn ignores
    • SVN ignores are there so we can ignore some files that are not part of the source code repository.
    • Such as per site configuration files, upload folders and so on.
    • Added the following:
      • app/Config/
        • Database.php
        • Config.php
        • Core.php
      • sql/dbconn.php
      • app/webroot/
        • uploads/mp3/temp
        • uploads/image
        • uploads/import


R1393: / 2017-09-08


Assessment marking (all regions)

  • Fixed a bug where an error message would appear for certain criteria regarding their critical status (Thanks Kathy!)
  • Fixed a bug where student endorsements would not appear during marking (Thanks Kathy!)
  • Fixed a bug where the previous / next buttons in the marking interface would cause hidden errors to occur.


Dispense exercises (all regions)

  • Fixed a bug where patient questions would not work correctly (Thanks Kathy!)
    • Bug introduced in MyDispense 5.1.9 as part of the robber fix. An attribute I used to use to check if the robber was in play was changed, but the patient question code was still checking the old attribute. So when you asked the patient a question, it would trigger the robber code instead of displaying the student answer box.


SQL Update 143

  • Fixed a prescriber phone pickup response because of broken english (Thanks Kathy!)


R1385:1390 / 2017-08-25

Hong Kong Region

  • Added Hong Kong region version of MyDispense
  • Changes to the Hong Kong region will be denoted as (HK) in section updates.


  • Added generic hong kong prescription
  • Added three new fonts for the HK region
    • YaHei for printed HK fonts (supporting simplified chinese characters)
    • Handwriting fonts (simplified chinese)
      • Tea (also used as endorsement font)
      • Tang


Patients (HK)

  • Removed city, state and postcode fields
  • Added Hong Kong ID field
    • Also added button that generates an ID in the following format: X123456(A)
      • (A) can be 0-9 or A

Prescribers (HK)

  • Removed city, state and postcode fields
  • Reset prescriber types to the following:
    • General Practitioner
    • Medical Doctor
    • Dentist
    • Vet

Rx medications create (All regions)

  • Fixed pill counting preview not appearing correctly.
    • The style sheet for pill counting wasn’t being included on the page, therefore the colours and sizes were missing.

Rx Medications (HK)

  • Renamed schedule field to classification
  • Added support for the CD register
  • Added support for pill counting
  • Removed stitched image requirements (no label placement)

OTC medications (HK)

  • Renamed schedule field to classification

Dispense exercises (all regions)

  • Fixed a the copy ideal directions button in the Medication create pane (Thanks Kate!)

DIspense exercises (UK)

  • Fixed the copy ancillaries details button in the Medication create pane (Thanks Kate!)


Dispense exercises (all regions)

  • Fixed swapping of patient images for the robber patient image.
    • Added support for the robber image to AUS and UK regions
  • Removed titles from dispense screen search and label management panes.
    • Removing these titles means that ‘Patient search’ and ‘Label management’ labels no longer appear on the screen if you hover your mouse over the screen for a long time.
    • ‘Patient search’ for instance would appear even when searching for Medications and we couldn’t have that.

Database updates

SQL Update 142

  • Updated the schedule field in the Rx medications table to varchar 20 from varchar 3
  • Updated the schedule field in the OTC medications table to varchar 20 from varchar 16
  • Corrects missing svg_alt_data for robber patient images


  • Updated javascript minify script to use new minify utility
  • Re-minified dispense exercise javascript files
  • Updated email to use Amazon SES. Emails should now arrive in inboxes rather than in the spam folder.


R3177:1379 / 2017-08-16


Validation exercise designer (all regions)
  • Fixed a bug where editing a prescription would cause the exercise designer to hang (Thanks Michael!)
    • This was because the patient’s, medications and prescribers were not being loaded before the prescription was opened.


Reports (all regions)
  • Updated the unit medication usage report with support for validation and OTC exercises. The report now includes OTC medications that are used by exercises in the unit.
  • Added exercise completion report
    • Displays all exercises in the unit and all students enrolled in that unit
    • Lists the number of times each student has completed each exercise in the unit
      • The report uses the metrics system, so it counts the number of resets. So if the student completes the exercise, resets it, then completes it again, it will be counted as 2.
    • Lists the first time the student completed the exercise
    • Can be exported as CSV (which is probably the easiest way to view the report)
      • CSV export includes the number of unique exercises completed by each student at the bottom of the report
      • If a unit has 20 exercises in it, the unique exercises lists how many exercises the student completed (say 15/20).
Administrator users (all regions)
  • Added email links action to the administrator users page
    • Allows administrators to view email links for active administrator users. When creating an account for another user, it’ll allow you to view and copy any activation links for that administrator in case they do not receive the email.


  • Added logout URL to simplesaml configuration
    • Standard simplesaml logout does not seem to be enough to ensure a full logout. This forces a redirect to the correct logout link.


R1371 / 2017-08-09


Dispense exercise designer (all regions)
  • Fixed a bug where the medication notes checkbox would be checked when loading an exercise even though it was saved as unchecked. (Thanks Jeremy!)


2017-07-12 | R1333:1343

Server configuration

  • Added HLTS to HTTPS server configuration
  • Updated HTTPS cipher suite to the recommended Mozilla modern settings
    • This drops support for insecure TLSv1 and TLSv1.1 encryption methods.
    • Unfortunately this means that Internet Explorer 9 will no longer function correctly. Internet Explorer 10 may also have issues.
    • If you require an earlier version Internet Explorer to have access to your site, email Keenan and he will change the cipher suite to the intermediate recommendations.


  • Added miscellaneous field support to all prescriptions. (Thanks Saad!)
    • The miscellaneous field is a free text field that appears underneath the medications on a prescription.
    • Thus you can add any additional documentation / notes that may be required on a prescription (such as medication codes) without having to ask for that feature to be added to MyDispense.
  • Added handwriting support to the miscellaneous field
    • Misc field handwriting font can be set separately to all other fields on each prescription.
  • Fixed the “Authorising no. of issues =” on FPSS acute scripts overlapping the number of issues on the script.


Dispense and Validation exercises (all regions)
  • Added support for the miscellaneous field on prescriptions
    • Appears as a free text entry field underneath the prescription options
    • Not a required field
  • Added support for setting handwriting for the miscellaneous field
    • Appears underneath the medication section handwriting option in prescription options.
Dispense exercises (all regions)
  • Fixed a bug when editing a medication on a prescription that has ancillaries in an incomplete exercise would cause the exercise designer to hang (Thanks Kate!)
    • Ancillaries are stored in the database as a CSV, so we can unpack the ancillary ID’s at run time. Therefore cutting out a medicationsprescriptions_ancillaries table join.
    • However, while this was handled correctly on regular exercise load and save, incomplete exercises were not performing this conversion.
    • Therefore, it has been fixed so that on load the string is unpacked in javascript and turned back into the expected object format.
Validation exercises (all regions)
  • Fixed multiline fields not encoding correctly, making them appear on prescriptions as single line fields.
    • This is because the fields were not being encoded properly and would lose the line breaks in the process.

Login system

  • Added a new SSO login method called SSO Hash
    • Custom SSO solution.
    • Users click login button and are redirected to institution login page. Once they authenticate they are redirected to a verify_login page.
    • The verify_login page is sent the following:
      • The username of the user
      • Timestamp of the server request.
        • In UTC time. This is used to verify that that the request was made and completed in a certain time frame.
      • Encrypted hash of the request
    • The verify login page then takes the username and timestamp sent to the server and hashes them using a shared encryption key.
      • The encryption key is used on the institution server and on the MyDispense server to ensure that the information came from the correct location.
      • If the resulting hash values do not match, then the request has not come from a valid source and it will be rejected.
    • Then the timeout is checked. If the request from the server did not come within a certain number of seconds, the request is rejected.
      • This can be adjusted via MyDispense authentication configuration. Can be as long or as short as needed.
    • Once these requirements are validated, users are logged in using the standard SSO method.
    • SSO Hash requires the following at minimum:
      • Shared secret key (sha256)
      • User ID
      • Timestamp
      • Login redirect URL
      • Implementation testing on the institution login server.
    • Many thanks to Ling Lee at University of Western Australia for conceptualising and helping me set this up.
  • Added a password policy for the account registration page.
    • Passwords must now be at least 8 characters long, have one uppercase letter, one lowercase letter, a number and a special character.
    • Passwords can not have the username in the password or ‘mydispense’
  • Fixed missing autocomplete=”off” on login fields
    • Register, login, password reset
  • Removed internal redirect of /admin/users/login to /users/login function. Now redirects fully, so /admin/users/login will now be redirected to /users/login in the browser.
  • Added private cache headers to all login pages

Database updates

SQL update 141
  • Added misc_field (TEXT) to prescriptions table.
    • Adds support for the miscellaneous field on scripts
  • Added hw_misc field (TINYINT 2) to prescriptions table
    • Adds support for handwriting for the misc field.


  • Removed test.php from webroot.
    • Wasn’t doing anything, so we have removed it.


2017-07-05 | R1327:1329


Dispense exercises (all regions)
  • Fixed a bug where the prescription preview would not display after loading an incomplete exercise.
  • Fixed a bug where the summary of altered fields on a prescription was not correct.
    • Errors, missing information. The altered fields number was displaying the missing fields number instead.
  • Added region based check in javascript that will report whether the prescription has any controlled medications on it.
    • Check always 0 for USA regions, as they do not have controlled drugs.
    • This function is used for the script error pane and is passed in the post data as 0/1.
  • Added support for CD required fields to the script error pane.
    • If a field requires that a CD medication be present, it will respect that fact and not display the field for hiding.
    • This has been put in place for the patient DoB on Australian prescription templates. Thus when making a non-CD prescription, the option to hide the patient DoB will not appear, as there is no field to hide.
  • Moved patient DoB and Script date hide options to new sections on the script error pane.
    • Because of the separate buttons to hide the day, month or year, the pane could get a little confusing. Now that they are in separate sections it is more obvious which options the buttons are providing.
Dispense exercises (UK / AUS)
  • Fixed a bug where controlled drug feedback would not be saved correctly.
    • This is due to tinymce being added to the field and the get function not being updated correctly.
  • Fixed a bug where selecting a controlled drug, then changing to a non-controlled drug would not cause the CD flag to be removed. Thus the edit dialogue would still run the CD validation, even though the CD fields were hidden from view.
Validation exercises (all regions)
  • Added a check that makes sure field data exists before outputting a script group fault. If the field doesn’t exist in the region data, it will skip that field.
    • It’ll also output which field is missing, so I can debug/remove the missing field.
    • This is only really relevant when using prescription types from other regions of MyDispense.
Validation exercises (AUS)
  • Added CD check to medications
  • Added support for patient DoB for prescriptions with CD medications
    • Patient DoB option no longer appears on prescriptions without CD.
    • Includes region JS check like dispense exercises that checks the prescription for CD enabled medications.
  • Added support for region field overrides for the endorsement pane.
    • Thus if fields have been overridden the overridden fields will appear in the enrdorsement list.


Validation exercises (all regions)
  • Added check in exercise data function that checks for CD medications and adds a new attribute (cd) to the script objects that use CD medications
  • Added support for script field groups that require a CD medication before being displayed.
  • Added support to ellipse fields that have been added via region field overrides.
    • So if a region_field adds a field, the extra field will also be ellipsed, instead of just the standard fields.
OTC exercises feedback (all regions)
  • Fixed a bug in advanced feedback where it would not appear correctly (Thanks Saad!)
    • This was because the outcome for advanced feedback is set as 2, however when the student recommends medications the outcome is 1. Therefore when checking to see if the outcome matched, the outcome mismatch feedback was displayed instead.

Prescriptions (All regions)

  • Added CD requirement to field output functions
    • If the prescription does not have CD/S8 drug on the prescription, the field will not be displayed.
  • Added CD requirement check function to all Australian prescription templates
  • Added patient DoB to all australian prescription templates, with the requirement that an CD/S8 medication be on the prescription before it it is displayed.
  • Updated medication field configuration for all regions.
    • Removed references to brand and generic output for standard medication names.
      • This has been standardised a long time ago, as medications would swap between generic and branded versions until we split them up.
      • However references to generic/brand fields still remained in the config and were quite confusing.
    • Updated references to brand name to generic name. The way the system is setup now we use the alternate name field for a medication as the generic name.
      • Field is used on branded and branded generic medications. Previously the fields were pointing at med_brand field. So any prescription type that displays both names (AUS hospital) would display no medication name, only the strength and form on the second line.
  • Added region_fields option to prescription field configuration
    • Allows for a region_option set in the main configuration file to output a special set of fields rather than the default set.
    • For example, aus_nsw_doc_quals has been added to the prescriber name fields on all australian scripts. If aus_nsw_doc_quals is set, then the region_fields will be used instead of the standard fields, which adds the prescriber qualification field after the prescriber name.


  • Added region options to main configuration file
    • Region options are used in conjunction with scripts to add region specific overrides.
    • All new region features that affect code will be placed here.
    • Added region_options object to all exercise designers and client exercises.
      • Added to the misc_data object.
  • Added two ‘region options’ for Australian sites
    • Aus_cd_dob
      • Adds patient Date of Birth after the patient’s name on all australian prescriptions when controlled drugs are enabled on the prescription.
      • Uses the CD requirement functionality added to prescriptions.
        • CD and aus_cd_dob must be enabled for the date of birth to appear.
    • Aus_nsw_doc_quals
      • Adds prescriber qualification fields onto the end of their name on australian prescriptions.
      • Utilizes the region_fields option added to prescriptions.
  • Reminified dispense exercise javascript and CSS


2017-06-23 | R1324


Dispense exercises (all regions)
  • Removed duplicate patient introduction field
  • Fixed a bug where saving an incomplete exercise could throw a serious error when keywords had not been set for the exercise (Thanks Dalavia!)
  • Changed the patient note criteria in assessments so they aren’t automatically enabled
  • Fixed a bug where a patient image would appear as locked when it actually wasn’t.


2017-06-21 | R1318


Validation exercise feedback (all regions)
  • Fixed a bug where fault messages for medication items were not appearing correctly (Thanks Kathy!)
    • This is a regression left over from the translation efforts back in 5.0.x.
    • I had to move translation messages around, but I did not fully update the feedback pages to support this.
  • Fixed a fatal error in feedback when a prescription has not been completed in a validation exercise.
    • This is a very rare bug, as exercises require to finish reviewing all scripts before you can complete the exercise. Adding an extra script in the exercise designer and opening feedback for a validation exercise you’ve already completed was the only way to trigger this bug.


2017-06-19 | R1306:1308


Dispense exercises (all regions)
  • Added option to disable patient fact finding
    • Patient fact finding questions will be hidden in exercises.
    • Clears error requirements and assessment options relating to patient fact finding.
  • Added option to disable prescriber fact finding
    • The phone used to call prescribers will be hidden in exercises.
    • Also forces voicemail off.
      • Voicemail is accessed via the phone, which is hidden.
    • Clears error re quirements and assessment options relating to prescriber fact finding
  • Added exercise option to hide medication notes in an exercise.
    • When selected medication notes will not appear in the dispensing screen after selecting a medication.
OTC exercises (all regions)
  • Added option to disable patient fact finding
    • Patient fact finding questions will be hidden in exercises.
Rx Medications (all regions)
  • Added a note field to medications
    • This is a free text field. The contents of the field are displayed in dispense exercises after selecting a medication on the dispense screen.
Tutorials (all regions)
  • Fixed a bug when adding an existing exercise where the edit link for the added exercise was incorrect.


Dispense exercises (all regions)
  • Added support for disabling patient fact finding
    • Option and questions are not displayed in the patient action pane.
  • Added support for disabling prescriber fact finding
    • Phone screen is not output.
    • Phone icon in shopfront and taskbar is not output.
  • Added support for medication notes on the dispensing screen.
    • If notes get too long they scroll
    • Added support for not displaying medication notes.

Data updates

SQL update 140
  • Changed ff_pat_feedback_type and ff_pre_feedback_type in Exercises table to allow negative numbers (unsigned)
    • When these values are -1, it means that fact finding for that type is disabled.
  • Added note field to medications.


  • Re-minified CSS and Javascript.


2017-06-01 | R1295:1302


Import hub
  • Added ancillary import option (Thanks Lisa!)
    • When importing between regions, the option to not import ancillaries has been added.
    • In most cases, the number and type of ancillaries available between two regions won’t line up. So this option will remove all ancillaries and their feedback from exercises during import.
    • The ancillary import option will not appear when importing and exporting from the same region.
  • Reworked ancillary selection (USA and AUS ancillaries) (Thanks Lisa!)
    • Clicking on an ancillary now displays an ancillary details window
    • On the window is a full description of the ancillary and large version of the ancillary for reading.
    • Ancillaries are selected by clicking the select button on the window, which dismisses the ancillary details window.
    • An unselect button is then displayed under the selected ancillary. Click it to unselect the ancillary.
  • Added an export fail page.
    • Export failures can occur when exercise assets are not in the database or images are missing from exercise assets.
    • When exporting, all assets are checked for integrity and grouped together.
    • There are two groups: Missing assets (not in database) and assets missing files (files are missing)
    • These are displayed on the page along with the exercises that use them.
    • Missing assets must be replaced in the exercise.
    • Assets missing files can be edited (except for attachments) to upload new files and restore them to a working state.
    • Once the issues are resolved, the page can be reloaded via a retry export button and the checks are run again.
Dispense exercises (all regions)
  • Reworked ancillary selection (USA and AUS ancillaries)
    • Clicking on an ancillary now displays an ancillary details window
    • On the window is a full description of the ancillary and large version of the ancillary for reading.
    • Ancillaries are selected by clicking the select button on the window, which dismisses the ancillary details window.
    • An unselect button is then displayed under the selected ancillary. Click it to unselect the ancillary.
Validation exercises (all regions)
  • Fixed a bug where prescriptions could not be edited
    • This was due to TinyMce fields not being initialised when a get function was called. Causing an exception to occur.


Exercises (all regions)
  • Added clarification to the error messages displayed when an exercise has been imported (Thanks Lisa!)
    • Instead of a catch all error message, there are now specific messages for inactive asset issues vs. an exercise flagged for import.
  • Fixed a bug where an old assessment field was being used as a check for a counselling note feature (Thanks Lisa!)
  • Fixed a bug where the asset check system was not retrieving exercise assets correctly.

SQL Update 140

Converts all Tinyint (1) fields to Tinyint (2). Tinyint (1) fields are read by cake as a boolean rather (true/false) than a 0/1. This lead to issues with json encoding for import/export where instead of exporting these fields as a 0 or 1, ‘true’ / ‘false’ strings were exported instead.

So during import, the correct values would be lost. Conversion between the two values did not work, so this update fixes the problem by changing the size of tinyint from 1 to 2. Now Cake treats the values as numbers (the correct behaviour) which means enable/disable flags now import correctly.

Also truncates and re-inserts the ancillary table. Full descriptions have been added for all USA and Australian ancillaries, required for the new ancillary selection windows.


  • Added large hover preview images for all USA ancillaries


2017-05-25 | R1244:1293

Server configuration changes

To facilitate larger file uploads for unit and tutorial imports, PHP and NGINX configuration changes are required. These configuration changes will allow uploads of 200MB to MyDispense servers. If 200MB appears to be too low, then I’ll look at increasing / removing upload limits in the PHP config.

  • client_max_body_size in the site configuration set to 200M.
    • Required to be set in individual site config file
    • Allows for file uploads up to 200 Megabytes.
    • client_max_body_size 200M;
  • Moving from Ubuntu maintained packages (12.04 = 5.4, 14.04 = 5.5, 16.04 = 7) to repository maintained by Ondřej Surý.
  • PHP 7.1 will be installed on all MyDispense servers.
    • Standardising PHP version across the board. Should mean that there should be even less discrepancies between dev and production.
  • Should see about a 2x script execution performance increase over PHP 5.x.
  • 16.04 servers (december 13th 2016 onwards) are already using PHP7, but will be upgraded to PHP 7.1
PHP INI changes
  • upload_max_filesize set to 200M
  • post_max_size set to 201M
    • Set at 201MB to allow extra variable data to be sent alongside the post data.
  • memory_limit set to 256M
    • Memory limit has to be larger than the maximum file size uploaded. Thus 256MB seems to be the best.

Import / Export

  • Added new controller
    • Added export functionality
      • Was previously located in ExerciseController, the increased scope of the new export system necessitated a refactor of the export system.
      • I originally put it in the AdminBaseController, but eventually decided that Import/Export was large enough to warrant its own controller.
      • All exports follow the same code path, but IDs are set based on the type of object we’re trying to export.
        • So if we want to export a unit, it will set a unit ID. Which will then populate the tutorial ids from that unit, which will populate the exercise IDs.
        • If a tutorial is exported, it will set the tutorial ID. Upon not finding a unit id, it will skip exporting the unit, find the tutorial ID which will populate the exercise IDs for export.
        • For exercises it will set the exercise ID and the unit + tutorial levels of the exporter will be ignored.
        • Thus all export types follow the same code path.
        • Of course, export is the easy part. Import is where it gets interesting.
      • Export functions are private in the new controller.
      • Exporting is accessed from three public functions: /admin/export/unit (tutorial or exercise) / <id>
        • These public functions hook into the private functions and check if the user can run them before actually exporting.
        • Added router connect definitions so the importexport controller is not exposed.
      • Outputs a .myde file
        • Technically this is a zip file. It contains all of the data required to recreate the unit + all files and so on.
    • Added import functionality
      • All based on common functionality, similar to the Export functions.
      • Designed to run on a single code-path for all three import package types.
      • Import management
        • The import pane is designed to allow users to view their incomplete imports and upload new import packages.
        • Clicking an incomplete import will take the user to the import page.
  • Import upload
      • Three locations to start imports.
        • Unit pages, tutorial page at the top and tutorial page inside a tutorial.
      • Importing is context sensitive. If you click the import button on the units page, it will assume that you want to import a unit.
        • If you click it on the units tutorial page it assumes you want to import a tutorial into that unit.
        • If you click the import exercise button on the tutorials pane it will assume you want to import an exercise into that tutorial.
        • The system will detect if you did not upload the expected type and will warn you about it on the import page.
    • Import page
      • The import hub provides an overview of the import package and is divided into three sections:
        • Options, Review and Finalise.
      • Options
        • Destination
          • For tutorial and exercise imports, you may select the unit (for tutorials) or tutorial (for exercises) that the item you’re importing will be imported into.
          • Therefore you can import an exercise directly into a tutorial without having to add it manually later on.
        • Content
          • Available for Unit and Tutorial imports.
          • Allows for selective imports. You can select which exercises (tutorial only) or exercises and tutorials (unit only) to import.
          • A unit must import at least one tutorial and one exercise.
          • A tutorial must import at least one exercise.
      • Asset review
        • When something is exported from MyDispense, it includes all of the data used in that exercise.
        • This includes assets referenced in exercises, such as patient, prescribers and medications.
        • During export a list of assets used in each exercise is generated. Each asset is only exported once.
        • For each asset used in the exercises you are going to import, a decision must be made on what to do with that asset. You can choose to use a match (if found), replace it with another asset (of the same type) or in some cases import the data from the export package (including images) as a new asset.
        • During the import process, every time that asset is used in an exercise, the decision you made during the audit process will be used to update the use of that asset.
          • So for example, if five exercises use the patient Peter Dawson and you select the patient Tyson Wilson as a replacement, all exercises that used Peter Dawson will use Tyson after importing.
          • Thus, instead of going through each exercise individually, you are choosing what happens to the assets all exercises you are importing.
            • It is done this way because going through each exercises assets individually would be very time consuming.
            • Assets can still be replaced once imported, using the exercise designer interface.
        • Once a decision has been made on all assets for a type, the audit for that asset type is completed. Audits for all asset types must be completed before the final import can be completed on the import hub page.
      • Finalise import
        • Once auditing has been completed (see audit pages), the final import is completed by clicking the import button.


Units index (all regions)
  • Added export action to unit actions drop down list.
    • Displays a dialog asking for patience while a download is prepared
    • Depending on the size of the unit the download can take a while
  • Added import unit button
Unit tutorials page (all regions)
  • Added flagging to exercises that have been imported.
    • If an exercise has been imported, it will be marked as such.
    • Imported exercises must be re-saved in the exercise designer with a passed checklist before students can complete them.
  • Added import tutorial and import exercise buttons
    • These link to the Import management pane used to import Units/Tutorials/Exercises into MyDispense.
  • Removed US specific files for this page
    • Superseded by new version which will run on Australian code.
    • Also removed US specific existing exercise selection page
  • Replaced old add existing exercise pane with new pane
    • New table code! Uses custom slick display to show more exercise info than old display (multiline, not strictly a table)
    • Added support for OTC and Validation exercise types
    • New search system
      • Two levels of search: Generic level and type specific
      • Generic level searches on fields relevant to all exercise types
        • Name, keywords, description, assessment and exercise type
      • Type specific displays exercise specific search options once the exercise type search has been engaged.
        • Dispense search options
          • Label only, exercise outcome (dispense, do not dispense), errors, number of medications on script, ancillaries, fact finding, patient question, attachment voicemail, patient history
        • Validation search options
          • None as of yet.
        • OTC search options
          • Outcome (do not recommend, recommend (basic), recommend (advanced)), patient medications, fact finding, patient questions, attachments, patient history
  • Added support for unpublished exercises
    • Unpublished exercises appear after regular exercises in a tutorial.
    • They do not count as regular exercises (can not be completed by students)
    • Added ability to delete unpublished exercises
      • Prompt pane will appear before final delete
  • Updated exercise sort with support for unpublished exercises
    • Unpublished exercises are ignored as part of the sort
    • Made the backend more… streamlined?
      • Less bad for sure.
  • Added new icons for Dispense, OTC and Validation exercises
    • Now possible to determine which exercise type is which at a glance.
Unit students and Unit student groups
  • Fixed a bug where importing students from CSV that has duplicate student usernames would be imported more than once, causing the student lists not to load correctly.
    • Import now checks if a username has already been imported from the file. If it has already been imported, it is skipped.
    • Does not affect student initial import, as the import user check is performed for each student (thus picking up any recently imported duplicates). While unit and studentgroup import does a bulk check at the beginning only.
Exercise designers (all types, all regions)
  • Reintroduced export button next to save in the checklist sidebar
    • Clicking the button will export the current exercise from when it was last saved.
  • Consolidated data loading functions for medications, otcs, medication forms, patients and prescribers
    • Added a new common file shared between all three exercise types.
      • Common_asset_tables.js
    • All five types are now stored in misc_data[‘assets’][type], rather than in separate global variables.
  • Consolidated and simplified table functions for medications, patients and prescribers
    • Functions are stored in common_asset_tables file.
    • Removed button to select these items from the table structure.
      • Selection now occurs by clicking the row.
      • Switching has removed the need for separate button binds for each use of the table.
      • Instead, once the table function is invoked, a custom listener is set for table clicking. Which sends the ID of the asset clicked to the appropriate function.
    • Cuts down on a load of similar / reused code. Probably saves about 500-1000 lines of JS code.
    • Removed unneeded table code.
      • Region specific slick formatter functions are kept in their region files for each asset type.
  • Rewrote exercise check system.
    • A basic exercise check is performed when loading an exercise which checks if the used assets in an exercise are active and haven’t been recently imported (import_flag = 1).
    • If the exercise fails that check, it will use the common_asset_check javascript file to display an information pane that helps the user solve the conflicts.
    • This pane has been fully implemented for all three exercise types.
    • Thus if an asset is deleted or disabled, it will trigger the check and this problem solving pane will appear.
  • Added support for import_flag 1 on exercises.
  • Added new metadata object to replace old metadata fields
    • Better support for exercise metadata. No longer restricted to specific fields for metadata (JSON text field vs. individual fields)
  • Removed checklist review button
  • Renamed save button to publish (same functionality as old save button)
    • Published exercises appear to students and act as exercises do before MyDispense 5.1
    • When the publish button is clicked (when creating an exercise for the first time), any unpublished exercise data is deleted when creating the final published exercise.
  • Added new Save button
    • Appears only when creating a new exercise in a tutorial
    • New save button saves exercise data as it exists at the time.
    • Does not require the checklist to pass
    • Exercises saved this way appear on the tutorials page as an ‘in progress’ or ‘unpublished’ exercise
      • Unpublished exercises do not appear to students
      • An exercise must be ‘published’ to be fully saved and made available to students
      • Until an exercise is published it exists in a separate table and does not have the correct data structure.
    • Once an exercise has been saved in unpublished form, clicking the save button will overwrite the unpublished exercise data.
      • Thus you can continue to update your exercise as you build it.
  • Fact finding questions are now displayed in alphabetical order.
  • Renamed some fact finding questions
    • Medication purpose renamed to Purpose of medication(s)
    • Previous use of this medication to Previous use of medication(s)
    • Weight of patient to Weight
    • Alcohol Consumption to Alcohol consumption
    • Smoking Status to Smoking status
    • Medication Purpose (prescriber FF) to Medication purpose
    • Dosing query (too high/low) to Dosing query
    • Patient allergic to drug/group to Patient allergies
    • Unsigned script / Other paperwork issue to Paperwork issue
    • Doctor’s plan of action, eg review to Doctor’s plan of action
  • Added rich text editing to most feedback fields (Thanks Sarah!)
    • Allows for bold, italic, underlining, hyperlinks and lists.
    • Standardised initialisation of tinymce fields
      • Added to admin common.js file
  • Added auto-resizing to all multiline text fields (Thanks Jenny!)
    • As text is typed into the field, it will expand so all of the contents can be viewed without scrolling.
    • Standard in admin common.js file.
Dispense exercise designer (all regions)
  • Moved voicemail upload location from exercises_imports table to imports table.
    • Exercises imports table is being dropped in favour of an imports table.
    • Imports is better suited to what the import system will be.
    • Changed voicemail upload type from ‘vm’ to 20, as the type in the new table is an int not a string.
  • Fixed a bug where adding alternate medications on the script errors pane would cause a javascript error if region data did not exist for that medication on the script.
  • Removed the patient exercise history list
    • This pane was outdated and did not work correctly. I also received feedback that it wasn’t very useful, so I have removed it.
  • Added support for new metadata object.
    • New metadata object tracks the following attributes about the exercise:
    • Attachments, patient history, fact finding, voicemail, patient questions, error enabled, exercise outcome, number of medications on script, prescription type, ancillaries on medications.
  • Changed how patient question and voicemail enabled checkboxes work
    • These used to be saved directly as meta_ fields.
    • Now they are saved into the metadata object.
    • Since they aren’t strictly exercise fields anymore, they are populated by the patient question / voicemail populate functions rather than the exercise details function.
      • To that effect, the section display code has been moved around a bit to provide support for the change.
  • Hardened exercise populate functions so they do not throw errors when expected exercise data does not exist.
  • Fixed bugs with extra information and fact finding.
    • Because the fact finding enable checkboxes were removed, the extra information custom requirements table was not being populated properly.
    • Thus instead of displaying a checkbox with the name of the fact finding type, nothing was displayed instead.
    • This has been fixed so the old enable checkbox is not referenced anymore, and the fact_finding_data_check function is used instead to see if there is any data.
  • Added support for unpublished exercises
  • Changed how keywords are sent to the exercise save function
    • Instead of keywords being turned into a comma separated string on the client, it is now done on the backend.
    • This matches behaviour found in other exercise types, and standardises the keyword system.
  • Added support for new help system and new help
    • Some features have been renamed
    • Grumpy prescriber has been renamed to Prescriber frustration
      • Prescriber fact finding
    • Pushy Patient has been renamed to Patient prompting
      • Patient questions
  • Added an error warning for patient prompting when no after questions have been defined (Thanks Patrick!) (Applies to Dispense and OTC exercises)
    • If patient prompting is enabled and there are no after questions defined for the exercise, the patient may prompt you to ask a question but may have no questions to ask.
    • If this is the case, a warning appears underneath the patient question list.
  • Fixed Controlled Drug (S8) fields/options from appearing on the script errors pane for all medications.
  • Fixed a bug where the fact finding penalty marks were not loading correctly.
  • Fixed a bug where the patient questions assessment marking checklist was only run if assessment marking was enabled for patient fact finding.
Dispense exercise designer (UK)
  • Removed checkboxes from ancillary select
  • Updated ancillary select to use row selection instead
  • Added search filter to display selected ancillaries only
Dispense exercise designer (AUS)
  • Added support for CTG (closing the gap scripts)
    • Appears as a script option for all PBS/RPBS scripts.
    • Does not appear for Private or Hospital scripts.
Validation exercise designer (all regions)
  • Fixed instances where a medication name was being output manually instead of using the region medication name output function.
    • There are still a few instances where manually outputting the name is used when displaying all medication info.
  • Added support for new exercise metadata object
    • New metadata object tracks the number of prescriptions in the exercise.
  • Added support for unpublished exercises
OTC exercise designer (all regions)
  • Added support for new exercise metadata object
    • New metadata object tracks the following attributes about the exercise:
    • Attachments, patient history, fact finding, patient questions, exercise outcome, patient medications.
  • Added support for unpublished exercises
  • Increased sizes of some text fields
  • Added rich text editing to most feedback fields (Thanks Sarah!)
Exercises list (all regions)
  • Fixed edit link not working correctly on US version
  • Restored export functionality (actions -> export)
Index pages for Rx Medications, OTC Medications, Patients and Prescribers (all regions)
  • Added Import filter
    • Displays items that have been recently imported and need to be resaved.
    • Did not add a column as imported items should be rare. (I hope!)
Create pages for Rx Medications, OTC Medications, Patients and Prescribers (all regions)
  • Added warning on load if recently imported.
    • Uses noty and disappears when clicked.
    • Reminds users to save the item to remove the import flag.
  • Added support for image hashing for assets with images.
    • Rx Medications, OTC Medications, Prescribers and Patient images
OTC Medication create (all regions)
  • Moved core javascript functionality from australian region folder to common admin folder
    • Matches location of other create page javascript files.
Administrators page (all regions)
  • Updated to show all administrator users rather than users below your role level.
    • Thus administrators can view other administrators and so on.
  • Updated page to allow admins to edit admins on their role level and below.
    • Admins can edit other admins, but not edit superadmins.
  • Fixed granted users not appearing in the administers user list until after a refresh.
  • Fixed granted users still appearing in the non-administrator user table until after refresh
  • Removed link to comm responses page
Students page (all regions, admin options)
  • Moved change auth and edit email buttons to an actions drop down box instead.
  • Added email links column
    • If a student has any active email links (activation, password reset, so on), they will appear in this this. Clicking the link will take you to that page.
    • Thus you can manually give a student the email link if they do not have it.
    • Added a filter option for email links, so you can view students who have email links easily.
  • Added email links and password reset options to the action drop down box
    • Email links (Non SSO accounts only)
      • Same as the emails links in the user field.
      • Provides the date the link was created, along with a delete button.
      • So you may delete old password reset links and so on.
    • Password reset (Non SSO accounts only)
      • You can choose to reset a student’s password using two methods.
      • Send a standard reset password link to their email (generating an email link)
      • Or set a new password for the student.
        • If you set a new password for the student, the password will immediately change to what you enter.
        • The student will be informed by email of the change, including the new password.
  • Removed link to comm responses page
Exercise list (all regions, admin options)
  • Updated with support for OTC and Validation exercise types
  • Updated search options to be be consistent with new add existing exercise pane.
  • Expanded display of exercise names to display more information.
  • Removed link to comm responses page
Assessment landing page (all regions)
  • Fixed suppressed errors on the assessment landing page when an assessment has no unit or students or exercises
    • Should no longer clog up the error log
  • Added warning message for assessments that have no exercises.
  • Hidden complete marking section / exercise marking sections if there are no students or exercises in an assessment


Exercises (all regions, all types)
  • Updated asset checking system to use a unified function.
    • Asset checking checks during exercise load if all the things the student needs to complete an exercise are available (active, not imported).
      • If they aren’t a dialog is displayed and the exercise does not load correctly.
      • This is because students won’t be able to complete the exercise correctly if the assets are missing.
    • Added support for import flag checks
    • Added checking for exercise import flag.
    • If one check fails, it will return a fail state (0) and exit without doing any further checks
  • Fixed asset checking system for OTC exercises
    • It had not been updated since the first iteration of OTC exercises, way back in MD5 alpha.
Validation exercise feedback (all regions)
  • Fixed medication sub faults not appearing correctly (Overdose, Subtherapeutic dose)
Validation exercise (all regions)
  • Fixed a bug where the exercise already completed dialog would not close.
Dispense exercises (all regions)
  • Added function that gets all region data fields before submission / save.
    • Class name: exercise_region_data
  • Updated exercise save functions to correctly save region data.
  • Updated exercise progress load function to populate region fields on save.
Dispense exercise (Australia)
  • Added CTG (closing the gap) checkbox to dispensing app.
    • Checking the box indicates that this patient is a closing the gap patient
Dispense exercise feedback (Australia)
  • Added feedback for CTG (closing the gap)
    • Four feedback states.
    • If CTG is not enabled on the script
      • By default CTG feedback will not appear.
      • However, if the student selects the CTG option on the dispensing screen the CTG feedback field will appear.
        • It will tell the student that CTG was not required for this exercise and will be displayed as incorrect
    • If CTG is enabled on the script
      • If the student did not select CTG on the dispensing screen, CTG will be displayed as incorrect.
      • If the student did select CTG on the dispensing screen, CTG will be displayed as correct.
  • Added styling to the ‘No tutorials are available’ message.
    • No longer appears black on black
    • Uses the same styling as the not enrolled in units message


General (All regions, all types)
  • Added some extra validation that fills in empty query string values so a blank prescription is displayed instead of an error message
    • Added default values for script font types (0)
    • Added default values for patient and prescriber ids (-1)
      • Will display no patient selected / no prescriber selected messages.
  • Added basic support for UK prescriptions in USA and AUS regions.
    • This way if you’re importing a UK script into another region, you’ll be able to view a prescription preview image instead of nothing.
Australian (PBS/RPBS prescriptions)
  • Added CTG support for script ID’s.
    • Done by adding a new field type, aus_ctg, which is based on right_align.
    • Aus_ctg checks for ctg in the script_data object, if it is found it prefixes CTG and postfixes K to the script id.
      • Example, script id output of 343 becomes CTG343K
    • If ctg is not found in the script object, then the script_id is displayed as normal.
    • Applied to the following script types: doctor (PBS/RPBS), Optometrist (PBS/RPBS), Nurse (PBS/RPBS), Midwife (PBS/RPBS), Dentist (PBS/RPBS), Authority (PBS/RPBS).
      • Aus_ctg field type applied to all script_id fields on these scripts.

Database updates

SQL Update 137
  • Dropped exercises imports table
    • Table used to store import data, including exercises and voicemails.
  • Added Imports table
    • Essentially the same as the exercises_imports table and replaces it.
    • Type is now an int instead of a varchar.
    • Exercise data changed to import data.
  • Added import_flag field (tinyint 1, default 0) to the following tables:
    • Exercises, doctors, medications, medications_otcs, patients
    • Will be used to track items that have just been imported.
  • Added metadata field to exercises table
  • Renamed meta_assessment_marks to assessment
  • Moved assessment to below region data (above assessment_data)
  • Renamed some fact finding questions
    • Medication purpose renamed to Purpose of medication(s)
    • Previous use of this medication to Previous use of medication(s)
    • Weight of patient to Weight
    • Alcohol Consumption to Alcohol consumption
    • Smoking Status to Smoking status
    • Medication Purpose (prescriber FF) to Medication purpose
    • Dosing query (too high/low) to Dosing query
    • Patient allergic to drug/group to Patient allergies
    • Unsigned script / Other paperwork issue to Paperwork issue
    • Doctor’s plan of action, eg review to Doctor’s plan of action
  • Added image hash field to asset tables (CHAR 40)
    • Doctors
    • Medications_otcs
    • Medications
    • Patient_images
    • Used by import for matching purposes
SQL Update 138
  • Resets ancillary table
  • Truncates, then re-inserts all ancillaries.
  • This is because some UK sites had a massive ID gap between the aus/usa ancillaries and the UK ancillaries. So ancillary ID’s did not end up matching up over all sites and caused some issues during import/export.
Data update 40 – 5.1.0 exercise metadata generation

Gathers metadata data for all exercises in the database and saves them to the metadata field in the exercises table. Then removes all old meta fields in the exercises table as they are no longer used.


  • Meta_patient_history
  • Meta_cd
  • Meta_medication_count
  • Meta_voicem
  • Meta_ancillaries
  • Meta_pff
  • Meta_pres_ff
  • Meta_patq
Data update 41 – Image hash generation

Goes through all assets with images and generates an sha1 hash based on the primary image for that asset. Primary image must be uploaded directly and not be modified by the server.

Primary images

Medications – Medication preview image

OTC – Preview image of the first side

Patient image – Thumbnail

Prescriber – Signature

Data update 42 – UK ancillary re-index

Retrieves all medication prescription records and labels, then re-indexes ancillaries using the incorrect UK ancillary IDs. Resaves the ancillary ID data using the correct values.


  • Removed Exercise Imports model.
  • Added Import model.
  • Added new routes for the ImportExport controller
  • Re-organised functions in the Exercises Controller.
  • Added shell accessible PHP script that will output the number of exercises completed as a string.
    • Counts the # of rows in the metrics, metrics_checks and metrics_otcs table (metric attempt tables for all three exercise types).
  • Removed unused medication RX admin javascript files
    • Removed Australian and USA region files that were superseded by common files.
  • Removed /View/Exercise folder containing old import view files.
  • Removed old import javascript files
  • Re-minified exercise javascript and CSS.
  • Removed other files that are no longer in use
  • Updated tinyMCE


2017-06-20 | r1310


Exercises page
  • Fixed a bug where deleting an exercise would cause a serious error to occur (Thanks Kathy!)
    • In this case the options controller was not updated to include the new CdRegistry model. So it was trying to reference the old s8Registry model, which no longer exists, causing the error.


2017-06-06 | r1303


Dispense exercises (all regions)
  • Fixed a bug in label metrics were controlled drug (aka S8) metrics were not recorded correctly. (Thanks Karl!)
    • Checks for actual data were using incorrect variables and the process required some refactoring.

Database updates

Data update 39

Dispense label metrics CD fix

This data update, similar to update 38, uses exercise data to re-create the CD metrics on each label that uses CDs. This is done in two steps. The first step upgrades all old records that use the old s8 object in the exercise object for each metric to CD. Then goes through again and rebuilds the CD metrics.

This standardises the exercise object between old (4.x) and new versions (5.x) of MyDispense.


2017-06-02 | R1300


Dispense exercises (all regions)
  • Fixed a bug in the label metrics where the label attachment metrics were not working properly. (Thanks Karl!)
    • In this case, the check whether the medication was attached or not was missing a parent variable, so it was not checking the correct location.
    • All exercises completed from this point will not have this issue.

Database updates

Data update 38

Dispense label metrics fix

This data update goes through all the dispense metrics and uses the exercise object copy from the metric table to fix the attached and attach_correct fields in the table. The exercise object field is a copy of the raw data used when submitting exercises. Since it is a raw copy data copy used to create the metrics in the first place, it is used to rebuild the metric as it should’ve been sans bug.


2017-04-26 | r1245


Assessment marking (all regions)
  • Changed when an outcome mismatch message is displayed (Thanks Patrick!)
    • When marking, if the error outcome criteria field is disabled, information about student decisions was not displayed.
    • Therefore if the exercise was dispense and the student chose not to dispense, nothing would be displayed to tell the marker this information.
    • Updated the message so it is displayed even if the error outcome criteria is disabled.
    • I’ve also updated the message so it appears if a student dispenses medications in a do not dispense scenario.


2017-04-12 | r1231:1239


Validation exercises (all regions)
  • Changed the rpt fields on scripts so it doesn’t need to be a number and can be left empty (Thanks Lisa!)
Dispense exercises (all regions)
  • Fixed a bug where the mark for an alternative medication would be saved but not loaded correctly (Thanks Patrick!)


Dispense exercises (all regions)
  • Fixed a bug where Grumpy prescribers would take one less call than expected before refusing to pick up (Thanks Jenny!)
    • A case of a >= rather than > when checking the number of times the student has called.


2017-04-05 | R1223:1227


Dispense exercises (all regions)
  • Added patient introduction feature from OTC exercises (Thanks Jenny!)
    • Patient can now display a message at the start of exercises similar to OTC exercises.
    • If no message has been set, the speech bubble will not appear
    • Introduction’s can have dates put in them by entering [d]+/-X[d] where X is the number of days before or after the exercise date.
  • Fixed a metric submission error warning where an incorrect script date reference is used.
  • Fixed a validation check for ancillaries in dispense exercise submission. The variable is now correctly checked to see if it exists rather than assuming it does.
OTC exercises (all regions)
  • Updated patient introduction support for new location
  • Fixed patient introductions not having dates parsed correctly
    • In other words, the dates didn’t appear properly.
Dispense exercise feedback (all regions)
  • Fixed a translation message missing a variable in additional information feedback.
    • Translation message was missing the number of dispensing records for the message.


Dispense exercises (all regions)
  • Added support for patient introduction field.
    • Appears underneath patient selection in the prescription section.
    • Introduction field has been left optional so previously created exercises will not be affected by the addition of the patient introduction field.
OTC exercises (all regions)
  • Updated patient introduction field location to match new database location.

Database updates

SQL Update 136
  • Adds patient_introduction field to the exercises table.
    • OTC exercises previously stored the field in the region_data JSON object.
    • OTC exercises have been updated to use this new locaton
Data update 37

Migrates patient introduction fields for OTC exercises from the region_data JSON object to the patient_introduction field in the exercises table.


2017-03-27 | R1210


OTC and Dispense exercise feedback (all regions)
  • Changed Fact Finding feedback for exercises that have no Must Ask questions (Thanks Ming!)
    • Feedback that appears when no must ask questions are asked and must ask questions are defined in the exercise:
      • You asked some Fact Finding questions during the exercise, but you failed to gather some important information which would have helped your decision making.
    • Feedback that appears when no must ask questions are asked and there are no must ask questions defined in the exercise:
      • You asked some Fact Finding questions during the exercise.


  • Updated exercise remote login queries to use the the exercise date field instead of created for more accuracy.


2017-03-21 | R1201


  • Updated PHPCAS to 1.3.4.
  • Removed login_check.php from /sql
  • Added remote_queries folder to /sql
    • Added new login_check.php
      • Returns last two login times from user_logins folder
    • Added exercises_complete.php
      • Returns total number of exercises completed in the system
    • Added login_total.php
      • Returns total number of student logins in the system.


2017-03-15 | R1196


Prescribers (all regions)
  • Fixed a bug where opening the new prescriber page would result in a white screen (Thanks Michael!)
    • This is likely due to the PHP7 upgrades I have been doing this week, which makes PHP run around 2x faster.
    • Checks of the other pages resulted in no errors, so thanks again to Michael for finding this for me!


2017-03-15 | R1192

OTC exercises (all regions)

  • Added new Do Not Recommend reason (Thanks Alison!)
    • Inappropriate product due to contra-indication for patient’s medical condition


2017-03-15 | R1189

OTC exercises (all regions)

  • Removed ‘Pension/Entitlement/Medicare Number’ fact finding question from appearing during OTC exercises (Thanks Alison!)
    • This question had been removed from exercise create, but had not been removed from the student side.


2017-03-10 | R1166


Patient, Prescriber create pages
  • Removed the use of the sanitize utility when checking form data.
    • The utility was incorrect re-encoding some UTF8 characters, which was not a desired result. The utility has been deprecated for some time, it was it was time to stop using it.
    • This will stop turkish characters from being re-encoded incorrectly.
Medication edit (Australia)
  • Fixed a bug where the S8 enable checkbox would always be enabled, even if that should not be the case.


Dispense exercises (UK)
  • Changed the label PDF generator to allow more lines and more characters per line in directions.


  • Added landing pages for:
    • University of Sussex
    • Purdue University
    • University of Queensland
    • Kemerburgaz University
    • University of Western Australia
    • Royal College of Surgeons Ireland
    • University of Lisbon


2017-03-14 | r1163


Dispense and OTC exercises (all regions)
  • Patient question before/after terminology changes
    • Previously, the before/after question switch was based on the student selecting a medication from the shelf. Doing so would swap the patient question state from before to after.
      • However, in OTC scenarios where the patient would present medications to the student, students would not select a medication from the shelf, which would not change the patient question state from before to after.
    • We are now changing the trigger for the before/after state to pharmacist intervention from medication selection. Pharmacist intervention is when the pharmacist intervenes in patient care.
      • This is done when the pharmacist selects a medication or counsels the patient.
        • Doing either will swap the patient question state from before intervention questions to after intervention questions.
        • This should include students rejecting OTC medications from the patient, as they are prompted to counsel the patient on why they rejected  the medication.
  • Changed the patient question before/after system to trigger on counselling. (Thanks Clark!)
    • See above terminology changes.


Dispense and OTC exercises (all regions)
  • Updated patient question before/after terminology to pharmacist intervention.
    • New text reads
      • The patient will only ask this question once. You can choose when the patient asks the question – either before or after ‘pharmacist intervention’. Pharmacist intervention means the pharmacist has EITHER selected a medication for the patient OR counselling the patient.     
      • Options
        • Before the pharmacist selects a medication OR counsels the patient
        • After the pharmacist selects a medication OR counsels the patient
        • Either – the patient can ask the question at any time.
Dispense and Validation exercises (UK)
  • Added checkbox to hide the quantity of medications when the number of days treated field has been entered (Thanks Michael!)
    • Appears underneath the number of days treatment when it is entered.
    • When enabled, the qty of medications will be hidden on the prescription. However, the quantities of medications will still be required when creating and editing medications.
    • The quantity of your medication should be what the students will enter on their label to ensure that the feedback screens work correctly.
    • Example:
      • If a prescription was for 1 tablet three times a day and we set the number of days treatment as 28, then in the quantity box we would enter 84 and hide this on the prescription. Students would have to dispense 3 x 28 tablet packs to get the exercise right
    • Works by unsetting the qty and qty_words fields if the number of treatment days field has been entered and the checkbox revealed. (base_script_validation function)


  • Re-minified dispense exercise javascript due to client changes


2017-02-08 | r1155

Prescriptions (UK)

  • Added field for number of days treatment (Thanks Kate!)
    • Optional field. Can enter any text into it.
    • Applies to all UK script types   
      • FP10SS
      • Private CD
      • FP10MDA-SS
      • FP10D
      • FP10NC
      • FP10P


Dispense and Validation exercises (UK)
  • Added support for number of days treatment field for UK prescriptions


  • Updated UK region data configuration with number of days treatment field
  • Updated the update-mydispense script to reset the folder owner of the sessions folder to www-data:www-data.
    • On PHP7 sites, this would cause users to be booted out of their sessions and forced to clear their cookies before they could log in again. Which was annoying.


2017-02-03 | r1143


Dispense exercises (UK)
  • Changed S8 register name popups to CD register on the shopfront and taskbar (Thanks Kate!)


Unit students page (all regions)
  • Fixed a bug where adding students to an empty unit did not work (Thanks Kate!)
  • Fixed a bug where selecting all students to add to a unit did not work
  • Fixed the student table not loading correctly if there students not already in a unit
    • It would try and add students to the empty table. Now it reloads the data from the database instead when you add students.

Prescriptions (UK)

  • Removed CD postfix for Controlled Drugs from UK prescriptions (Thanks Michael!)
    • May be added again later as an optional postfix rather than being automatic.


  • Added a login_check script to the /sql directory.
    • The script checks the database for the last login time. This is so I can see when the last login was and decide whether I can do server maintenance or not.


2017-02-02 | r1138


Tutorials page
  • Added a space between the arrow and the units text on the Units button.
All exercises (all regions)
  • Fixed an issue where start and end times of exercises may not be saved because they did not have padding 0’s on the timestamps.
    • By default javascript outputs hours, minutes and seconds as 0-23, 0-59 and 0-59 respectively. However, it does not add a 0 in front of 1-9.
OTC exercises (all regions)
  • Fixed a bug where the exercise start time, end time and time were not being saved.
  • Fixed a bug where the outcome metrics were not being processed correctly (do not dispense was processed as hand over and vice versa)
  • Fixed a bug where the correct outcome was not being processed correctly (was not handling outcomes 0,1,2, was expecting 0,1 only)
Dispense exercise feedback (all regions)
  • Fixed a translation issue on Either is Valid outcomes where the C would be cut off Correct (Thanks Kate!)


  • Re-minified dispense exercise production JS due to changes.


2017-02-02 | r1131


Rx Medication page (UK)
  • Fixed a bug where the Controlled Drug enabled tick would appear as ticked, even when it wasn’t (Thanks Michael!)


2017-02-01 | r1125:1127


Dispense exercises (USA / UK)
  • Fixed a bug where /’s were appearing in PDF label print outs.
  • Fixed a potential issue where having spaces in a username would cause pdf exports to not function properly.


2017-02-01 | r1121


Dispense exercise designer (Australia)
  • Fixed a bug where the hospital supply check box would not appear when editing a medication with the hospital prescription type selected.


2017-02-01 | r1117


Assessments (all regions)
  • Fixed a server error introduced in 5.0.10 (Thanks Keith!)


2017-01-19 | r1111:1113


Dispense exercises (all regions)
  • Fixed a bug where the label PDF button would appear on sites that don’t have label PDF enabled
  • Added additional protection against missing concession types (Thanks Kate!)
    • If there is no matching concession type when retrieving patient information from the database, the exercise would hang due to a PHP error.
  • Updated minified dispense exercise javascript.


Patient creation (UK)
  • Added a hidden concession type ID field
    • Defaults to a value of 5, which is none.
Unit student page (all regions)
  • Fixed selecting all enrolled students checkbox (Thanks Kate!)
Unit tutorials page (all regions)
  • Added a message that appears if a unit has no students reminding the user to enrol students (Thanks Kate!)


  • Updated all system calls with an escape command function (escapes potential problems with command strings)
    • Commands such as: PDF export, image outlines for patient images, MP3 uploads etc.
  • Updated all header calls so they do not have any concatenation in them
    • Headers are edited when serving up file uploads.


2017-01-18 | r1107

Database updates

SQL Update 135
  • Audited fields of all tables and converted fields that were not in utf8 encoding to utf8.
    • This could cause problems when copying text from utf8 sources, as by default the database expects things to be in utf8.
    • This audit finds fields that are not in the db / table set format and had their own encoding / collation specified in the field.
    • This is a holdover from MyDispense 2 and 3. All tables / fields introduced in later versions have been UTF8.
    • A side effect of this change seems to be that some non-utf8 text fields get converted to medium text fields after the UTF8 conversion.


2017-01-17 | r1104


Administrator / Student pages
  • Fixed an error when creating new user accounts (Thanks Keith, Clark!)
    • This was an intermittent server error that was caused due to email account validation failure. When sending an email, Cake checks to see if the email is valid, which was a check I do earlier in the form.
    • However, during form submission whitespace was not being trimmed off the field content, thus if there was a space at the start or end of the email it would cause a server error on submission.
    • The user account would still be created, but any account emails would not go out with it.
    • Thanks to Clark for telling me about this bug months ago and thanks to Keith for leading me to figure out what it was.


2017-01-16 | r1100


OTC exercise feedback (Advanced, all regions)
  • Fixed a bug where counselling feedback would be displayed twice (Thanks Sarah!)
    • Introduced in 5.0.9b as part of the counselling localisation changes.


2017-01-12 | r1098


Exercises (OTC and Dispense, USA)
  • Added extra localization for ‘Counseling’ on the patient action pane.
    • When running the USA region, extra code is used to swap out Counselling for Counseling
Dispense exercises (all regions)
  • Fixed a bug where the label metrics were not being logged correctly.
    • Due to a structure change in version 5, dispense exercises were not logging label metrics.
    • However, if label metrics are required I can generate them using the exercise object (copy of the exercise data) saved in the exercise level metric record.
    • This is because label metrics is mostly automarking. So long as the content of the exercise has not been changed, the label metrics will be accurate.


2017-01-11 | r1094


Exercise feedback (all regions, all exercise types)
  • Removed the description field from exercise PDF feedback (Thanks Sarah)
    • This field is marked as only available to administrators and shouldn’t have been exported to students.
Feedback dispense labels (USA)
  • Fixed a bug where the rpts would not be displayed correctly on a label.
    • Instead a translation context message would be displayed instead.
    • “Placeholder replaced by Rpt #. appears on US label”
    • Instead of “X refills”


  • Fixed a bug where x_field_usa field outputs were throwing an error because they were using an old font variable.
    • Should only affect controlled drug USA scripts


Dispense exercise designer (all regions)
  • Fixed a bug where if individual medication No Brand Substitute (NBS) is enabled, alternate medication data would not be deleted. (Thanks Patrick!)
    • If you selected alternative medications with NBS turned off, then turned NBS on, the alternative medication selections would persist.
    • Now alternative medications are cleared when you update the medication
    • Feedback would still read alternate medications even with individual NBS turned on, which should not be happening.


2016-12-15 | r1089


Exercises (all types, all regions)
  • Fixed default image not appearing in references pane
  • Added scrolling to references pane
    • If the number of references exceeds the height of the pane, it will now scroll instead of appearing on top


Dispense exercises (all regions)
  • Updated voice mail upload pane error message to tell users to click the upload button before clicking the save button (Thanks Kathy!)


  • Updated wkhtmltopdf to 0.12.4 from
    • Many misc bug fixes and security fixes.
  • Updated execute path of wkhtmltopdf to /opt/wkhtmltox/bin/wkhtmltopdf
    • Wkhtmltopdf is no longer installed as server software, so we call it from its installation directory instead.


2016-12-06 | r1084


Dispense exercise designer (all regions)
  • Fixed a bug where you could not search for medications/patients/prescribers when replacing them on inactive/missing data screen. (Thanks Kathy!)
    • The inactive pane was not using the updated methods of getting the search parameters. So the search parameters would be passed as empty/null causing the table to return no results.
  • Fixed a bug where you could not close the medication/prescriber replace windows on the inactive/missing data screen.
    • The medication pane cancel button was not hooked up. This is now fixed.
    • The prescriber pane button was hooked up to dispensing records. It now re-opens the inactive/missing data pane.


2016-12-06 | r1079


Exercises (all types, all regions)
  • Fixed instances where error messages from the controller were messages were not translated.
  • Fixed the validation dialog header (‘warning’) not being included in translations
  • Fixed a do not dispense error dialog appearing in an alert box rather than a styled dialog.
Dispense exercises (UK)
  • Changed patient address output so it doesn’t include the state.
    • The patient address appeared like:
      • 10 Marloo St, London
      • N/A WC1E 6BT.
    • Now it appears like so:
      • 10 Marloo St
      • London WC1E 6BT.
OTC Exercises (all regions)
  • Fixed OTC exercises not loading
  • Fixed OTC reject medication dialog not working correctly
  • Fixed a translation not appearing correctly on the rejection counselling screen
    • The translation would not appear if the context message was too long. “Reject_counselling” context has been simplified.
    • Also discovered that the best way to make sure translations are appearing correctly is to clear the Cake Cache in app/tmp/cache . Sometimes added translations won’t show up even with debug set to 2.
  • Fixed a bug where an error message would be displayed in an alert box, then a dialog would be displayed with no way to dismiss it.
    • Moved error messages to the dialog, removed alerts.
Validation exercises (all regions)
  • Fixed a bug where an error message would be displayed in an alert box, then a dialog would be displayed with no way to dismiss it.
    • Moved error messages to the dialog, removed alerts.
Exercise feedback (all regions)
  • Added missed translations to Fact Finding feedback
  • Added missed translations in the Controller
    • No medication / patient / prescriber selected messages.
  • Added missed translations for dispense label placement feedback (AUS / UK)
  • Added missed translations in validation exercise feedback (script buttons labels)
Dispense exercise feedback (UK)
  • Fixed missing structure around the student label heading. Would cause the labels to be misaligned.
Dispense exercise designer (all regions)
  • Added prescriber select hook for prescription types.
    • If defined, a function will run when a prescriber is selected.
    • This allows for fields to shown based on the selected prescriber type.
Dispense exercise designer (UK)
  • Added copy ancillaries to feedback button when adding a medication to a prescription.
    • Clicking the button will add each ancillary to the feedback field in the following format: “<ancillary #>: <ancillary details / name>” with a line break at the end.
  • Added prescriber select functions for FP10SS and FP10MDA-SS prescription types
    • Moves the Cost Centre Name/Code fields to underneath the prescriber selection area.
    • These fields are now displayed based on the type of prescriber selected. If a GP/MD is selected, the fields will not appear.
    • If a nurse is selected on the FP10SS script, then an additional nurse type drop down box will appear.
    • Removed labels indicated where the fields are used (only displayed for GP/MD, or only used for nurses)
  • Changed script validation code for FP10SS and FP10MDA script types
    • Now checks if the cost centre fields should be validated based on the prescription types.
    • The fields are still created in the background, but are not filled in.
  • Added extra nurse prescriber type to FP10SS script
  • Added extra radiographer prescriber types to the FP10SS script
Validation exercise designer (all regions)
  • Moved FP10SS and FP10MDA-SS script fields into the prescriber section, similar to the dispense exercise designer.
    • Cost centre name/code have been moved, along with the nurse sub-type selection.
Prescribers (UK)
  • Added extra prescriber PIN codes for Radiographers, Podiatrists, Optometrists, Dentists.
  • Prescriber PIN generation now displays the code format it will generate just below the button.


  • Added field resize support to date fields.
    • Uses x_max in the script configuration to determine the maximum horizontal length fo the field.
    • As a side effect, I’ve had to add x_max to all of the date fields for all scripts.
    • I’ve had to do this because ellipsing the date fields also relies on having x_max.
    • To output a date in the maximum size, x_max should be x + 120.
  • Added extra prescriber types for Nurse and Radiographers to the FP10SS script type.
  • Added extra check that looks for ‘prescriber’ in a prescriber type. If the prescriber type already has prescriber it in it, then it won’t append ‘prescriber’ to it.
    • Therefore Pharmacist Prescribers won’t be Pharmacist Prescriber Prescriber on script.


SQL Update 134
  • Added dentist requirement to the FP10D prescription type.
    • When selecting a non-dentist prescriber, a warning will appear.


  • Updated CakePHP to 2.9.3 from 2.7.7


2016-12-06 | r1074


Unit and tutorial pages
  • Moved all translation strings to the ‘client’ domain
    • __() to __d()
  • Refined and added context to most translation strings __dx()
  • Fixed instances where variables were included in the translation strings.
    • For example, ‘Year: $year’ to ‘Year: %1$s’
    • The %1$s is substituted for the correct value at run time and appears correctly in PoEdit.
  • Added missing page titles / error messages to be translated.
Login pages
  • Moved all login translation strings to the ‘login’ domain
    • __() to __d()
  • Refined and added context to most translation strings __dx()
  • Fixed instances where variables were included in the translation strings.
  • Added email templates to translation system
    • Activate, registration, etc emails can now be translated.
  • Added missing translation strings, such as page titles and error messages.
Exercises (all types, all regions)
  • Removed instances of CSS pseudo elements providing content to elements, like button rollovers and such.
    • This is because we can’t change pseudo elements using javascript
    • We’ve reimplemented the content as plain html, which we’ve added to the translation system.
    • Affected rollovers:
      • Exercise date explanation, pill counting buttons and patient fact finding asked.
  • Moved exercise error dialogs from JS to html for translation.
  • Added view that contains common javascript messages for translation
    • Contains common table header definitions, error messages and so on. Things used in all 3 exercise types.
    • Similar views have been added for each individual exercise type as needed.
Validation exercises (all regions)
  • Added translation support to validation exercises
    • Moved prescription X/Y message to new sub-span
      • Updates the prescription X/Y message without changing prescription field.
  • Moved all dialogs generated in JS to the view structure and translated them (confirm handover, error on handover, finalise error script dialog).
Validation exercises (UK, Admin and Client)
  • Added support for Patient NHS number
    • Patient NHS number will now appear in the list of faults for the patient
    • Faults: missing
  • Renamed Prescriber NHS Number to Prescriber PIN
  • Added age and date of birth fields to the patient faults list in validation exercises (Thanks Michael!)
    • Previously the date of birth and age fields were not in the group whitelist (because certain other fields are not included).
    • Age faults: Missing
    • DoB faults: Incomplete and missing
  • Increased the size of the patient faults box on the prescription to cover the age, date of birth and NHS number fields completely on all UK script types.
OTC exercises (UK)
  • Fixed a bug where the patient personal information query would result in ‘undefined’ instead of an actual response.
  • Added translation support to patient personal information query
  • Added translation support to OTC exercises
  • Removed unused interface code (quicklaunch medication preview)
Dispense exercises (all regions)
  • Deleted old S8 registry files
  • Deleted USA benchtop view file
    • Was identical to the Australian file. So no longer needed.
  • Fixed some cases where medication names were being output manually instead of using the region medication name output.
  • Added datepicker i18n support
    • So we can have translated datepickers + different date systems
  • Merged quicklaunch label delete code and dispense label delete code (dialog + confirm button)
  • Moved all dialogs generated in JS to the view structure and translated them.
  • Fixed a potential bug where the fact finding object would not be initialised after exercise load.
  • Changed backroom product behaviour to compare the storage id rather than the storage name when trying to open a new set of shelves
    • This is the behaviour that swaps between different locations instead of closing the pane and having the student reopen it
    • It was comparing the english/translated version of the storage location when checking if the pane was already open.
    • Thus if the different locations were the same name (test), then it would close the pane instead of opening the different location.
    • Facepalm at my past self there.
  • Changed pill counting behaviour (UK and USA) so that all buttons are disabled when adding pills.
    • Also made sure that the fill button remains disabled if there no pills have been counted. Thus we get past the odd scenario where you could fill a bottle with nothing but air.
      • We hope.
  • Fixed a bug where PDF labels would exit early instead of rendering the label properly.
  • Added translation support throughout the exercise
    • Everything on the screen (except for fact finding and other database set questions) can be translated and localised.


Unit tutorials page (all regions)
  • Added preliminary translation support for the timepicker and datepicker jQuery widgets.
    • This is a test. Translation support for admin will be implemented during 5.1.x
Dispense exercise designer (all regions)
  • Added partial translation support to the endorsements pane.
    • Translation support has been added to the selectable endorsements in the pane. The endorsement pane has been updated to support the translation changes made in the region data.
  • Added partial translation support to the script errors pane
    • Same as above
  • Added support for partial date hiding in the script errors pane
    • Can now individually hide parts of the exercise date and patient DoB (depending on the script type).
    • Hide year, month, day fields.
Validation exercise designer (all regions)
  • Added partial translation support to the do not dispense outcome tab.
    • Added due to changes in the faults configuration for translation support
Validation exercise designer (UK)
  • Fixed a bug where the qty words on a script would not save correctly. (Thanks Michael!)
    • Field was flagged as a standard field and not as region data, so it was not being saved to the region data object on save and the data was lost.


  • Fixed a regression where missing date subfields would not be displayed correctly.
    • Introduced in MyDispense 5 RC6, related to the script error display bug.
    • To fix that bug I removed the script errors object, which is used to colour fields, when display errors is not enabled.
    • However the script errors object also included the date format changes for the script date, thus when the script errors object was removed, the full date would be shown on the script.
    • To fix that, I’ve added a new date_formats object to the script data. Whenever a date format is changed, it is stored there. All dates on a script should be run through the output_date function, which will check the date_formats object to see if that field’s date format has been changed.
  • Added support for script date formats that use different separators
    • Prescription_separator option added to config to facilitate this support
    • UK scripts did not have functioning date format alteration support (hide individual fields) because the ‘/’ was stopping the date format from being broken up.
  • Added ellipse support for empty date fields
    • If a date field was fully hidden, it would not be ellipsed on a script.
  • Added patient date of birth individual field hiding support
    • Can now alter the date format to hide individual fields for the patient date of birth on scripts. Similar to the script date.
  • Added support for missing colour for script date and patient DoB
    • When fields were displayed in feedback, the dates would reappear, but in black.
    • Now they appear in the missing colour (orange)

Region data (all regions)

  • Added translation support to Dispense exercise do not dispense reasons
  • Added translation support to OTC exercise do not recommend reasons
  • Added translation support to endorsements
  • Added translation support to validation exercise reasons

Config changes

  • Added ‘prescription_separator’ to date_format. (optional)
    • This is to allow correct date format separation on scripts that do not use ‘ ‘ as the separator between fields on the script date.
    • I noticed that date format separating was not working correctly on UK scripts because they use a ‘/’ instead of a space.
    • This field is optional as the prescription code will default to a space. If this config option is set, then it is used instead.


  • Removed an old email template that was no longer in use.
    • Activate_reset.ctp email. Has been superseded by auth_import_activate_reset.
  • Merged french translations from old file (default) into client and login files.
    • Some translations have now been changed because of better support. These have been left blank until they can be translated again.
  • Added i18n folder to webroot/js/jquery folder.
    • This i18n folder contains translation files for the datepicker and timepicker jqueryUI widgets.
    • The i18n files need to be loaded whenever another language is used as they contain the translations for the widgets. A second config value ‘Config.language_jqueryui’ sets the jquery region language.
      • A second value is used because the cake and jquery translation codes do not match. For example, Cake’s french code is fra and jQuery’s is fr.
      • Changing them to match would be pretty painful too.
  • Updated timepicker javascript library to 0.3.3 from 0.3.2
  • Added simplesaml login error page, as using the CAS page would result in login links going to CAS login instead of SAML.
  • Added translation POT files to SVN repository
  • Fixed errors in CAS login page


2017-11-11 | r1068


Dispense exercises (all regions)
  • Fixed a bug where missing region data would cause the medication selection window not to appear (Thanks Clark, Patrick)
Dispense exercises (UK)
  • Increased size of Prescriber and Patient fields on PM register
  • Changed Prescriber and Patient field labels from Patient/Prescriber details to Patient/Prescriber name and address (thanks Michael)
  • Added medication qty field to PM register (thanks Michael)
    • This is a separate field so we can automark the qty
Dispense feedback (UK)
  • Added Qty to UK PM register feedback
    • Automarked. Compares against label qty, not prescription qty.
  • Added prescriber address to PM register feedback. Patient address was already present.
  • Added prescriber address fields in database call for dispense feedback (This applies to all regions)


Units (all regions)
  • Fixed a bug where deleting a unit would result in an error instead of deleting the unit.


2016-11-07 | r1061


Dispense exercise feedback (all regions)
  • Fixed a bug in Either is Valid Dispense feedback where region view files would not be loaded correctly, defaulting to Australian feedback (Thanks Michael!)
    • Either is Valid Dispense was not updated with the PDF feedback headers, so it did not include the view path variable. I have updated the full header and it works correctly now.
Dispense exercise feedback (UK)
  • Fixed ancillaries not appearing on the student / your label in feedback (Thanks Michael!)


2016-11-04 | r1056


Unit tutorials page
  • Fixed a bug where the add existing exercise function would fail because it referenced an old database column that no longer existed. (Thanks Nada!)
OTC exercise designer (all regions)
  • Fixed a bug where the pushy patient and other checkbox fields would save correctly, but not populate in the same state (Thanks Nada!)
    • Checkboxes that were ticked were saved, but wouldn’t appear ticked when the exercise was loaded.
    • If the box wasn’t re-ticked, then it would be saved as disabled.


2016-11-03 | r1050:1053


All exercise designers (all regions)
  • Updated patient information region function to output as a return string instead of appending directly to the DOM.
    • This is to support validation exercises, which had a different DOM element for the patient information section.
Dispense and Validation exercises (all regions)
  • Added support for new handwriting system (Thanks Michael for the suggestion)
    • Instead of using a single handwriting font to use for the whole prescription, fonts can be selected for each section on the prescription
    • You can select a font for these sections:
      • Prescription fields
        • Date
        • Script ID
        • Script specific fields
          • For example, authority number
      • Patient section
        • All patient details.
        • Name, address, etc.
      • Prescriber section
        • All prescriber details
        • Name, address, etc.
      • Medications
        • All medications on the prescription
    • The sections are treated separately, so you can choose to use the printed font, or different handwriting fonts for each section.
    • Prescriptions that already had handwriting have had the handwriting font previously selected applied to all sections on the prescription.
Dispense and Validation exercises (UK)
  • Added support for FP10NC and FP10P prescription types
Validation exercises (all regions)
  • Removed internal file references to script checker
  • Updated with support for base regional files
    • Medication, Patient and Prescriber display files used for OTC and Dispense exercises
  • Moved core validation exercise JS to common location with other exercise types.
  • Renamed validate folder for JS to validation.
  • Renamed validate folder for views to validation
OTC exercises (all regions)
  • Added a new option for advanced feedback exercises for hiding beneficial medication options in an exercise (Thanks Sarah for the suggestion)
    • By default, the beneficial medications in all treatment groups are shown in exercise feedback. Even if the student does not select any beneficial medications in that treatment group.
    • Thus students are given the answer regardless of the feedback given.
    • The new option will only display the beneficial medications in a treatment group if the student has recommended a beneficial medication from that treatment group.
    • Otherwise it will only display feedback and any harmful medications the student has selected.
    • New option is called Do Not Display Beneficial medications and is located under the treatment groups.


Validation exercises (all regions)
  • Moved javascript files from validate folder to validation
  • Moved view files from validate folder to validation
  • Removed internal references to script_checker or checker, including renaming files.
Dispense and OTC exercises (all regions)
  • Fixed an issue where zooming the browser out would cause the patient action pane interface to break (Thanks Sarah!)
Dispense and OTC exercise feedback (all regions)
  • In patient / prescriber fact finding feedback, Can Ask questions are listed under all other question types
  • Added an additional fact finding feedback case that catches when a student has only asked Can Ask questions (Thanks Allen!)
    • Previously if students only asked Can Ask questions, the feedback would display that no fact finding questions were asked, even if the student asked questions that required no feedback.
OTC exercise feedback (all regions)
  • Added support for Do Not Display Beneficial medications for advanced feedback.
    • If enabled, beneficial medications for a group are only displayed if the student has selected a beneficial medication from the group.
    • If not enabled, beneficial medications are always shown in each group.

Prescriptions (all regions)

  • Added FP10NC prescription type
    • Based on FP10D code
    • Uses FP10SS green script as a base
  • Added FP10P prescription type
    • Based on FP10D code
    • Uses new lilac image as a base.
  • Removed X’s after medications on FP10D prescription type
  • Added support for new handwriting font system
    • Refactored font array system
    • Font array returns font’s only in use by the system instead of some fonts used by the system + the full handwriting font array.
      • Core – standard print font
      • Error – Error font for exercise designers displayed when a section hasn’t been selected (Patient, Prescriber, Medication)
      • Endorse – Endorsement font
      • Script – font for the script section
      • Patient – font for the patient section
      • Prescriber – font for the prescriber section
      • Medication – font for the medication section
    • Updated all prescription types to support the new system.
      • When going to render a section, instead of using the ‘script_font’, it now references the font array and the font for that section.
      • Case lowering for fonts now checks the font for force lowercase instead of another variable (checks to see if force_lowercase is set on the font before applying)


  • Updated UK region data with script and validation configs for FP10D and FP10NC prescription types.

Database updates

SQL update 133
  • Added new UK prescription types (disabled) to the prescription_types table
  • Added handwriting system fields to prescriptions table
    • Hw_script, hw_patient, hw_prescriber, hw_medication
Data update 36

Converts prescriptions that have had handwriting enabled to the new system by copying the handwriting_index field value to the new fields.

Once all scripts with handwriting enabled have been updated, it drops the handwriting_index field from the prescriptions table.


2016-10-27 | r1042

Login pages

  • Added translation support to all login / registration pages


  • Added translation support to the unit index page.
  • Added translation support to the tutorials page
Dispense exercises (all regions)
  • Fixed a bug where patient question data would be not saved when do not dispense is used to complete the exercise. (Thanks Allen!)


  • Updated University of Illinois landing page
  • Removed old helper views that caused errors when extracting translation strings.


2016-10-25 | r1035


OTC exercise feedback (all regions)
  • Fixed counselling not appearing for treatment groups in advanced feedback (Thanks Ming, Nada and Sarah!)


2016-10-24 | r1023:1032


Validation exercises (UK)
  • Added do not dispense reason bounding boxes for UK prescriptions
    • Was missing, FP10D, FP10MDA
  • Fixed do not dispense reason bounding box locations for UK scripts in validation exercises.
    • Bounding boxes would not appear in the correct locations.
      • For example, the signature box did not appear over the signature.


Validation exercises (all regions)
  • Added prescription type population function support.
    • Used by prescriptions that need a secondary populate function to run on top of the regular one.
    • Only used by the FP10SS script thus far.
Validation exercises (UK)
  • Added UK prescriptions to prescription type map (thanks Michael!)
    • The type map defines how the prescriptions and their sub-options should be displayed. Without the prescription types defined, the exercise designer would hang.
  • Added UK medication page support
    • Removed rpt fields
    • Removed CD medication fields
    • Added Qty words field
      • Qty words does not need to be filled in. It is optional.
Dispense exercises (UK)
  • Removed requirement that qty words be filled in on a prescription (thanks Kate!)
    • Qty in words is on a per medication basis. It is no longer required for all medications being put on a script, but can be entered for any medication.

Prescriptions (UK)

  • Medication form now appears in full on all prescriptions (thanks Kate!)
  • Updated UK region data
    • Changed prescription medication form display to full name
    • Added missing prescription types in the validation exercise config

5.0 Release Candidate 7

2016-10-21 | r1028


Exercises (all types, all regions)
  • Added extra validation when exercise handover and exercise progress requests fail.
    • Instead of displaying a cryptic ‘An error has occurred’ message, a dialog now appears with more information about the error.
    • It will display the error code and the error text. In most cases of this happening, it will display an ‘Internal error has occurred’, but it is slightly better than the box we had before.
    • There is also a check for when the login session expires for the student. If the login session expires, all the student needs to do to fix the problem is to log in again.
      • A different dialog appears in these cases. It explains the problem to students and provides them a link back to the MyDispense home page.
      • Clicking the button the home page is opened in a new window. The student can then login again
      • Once logged in, the student can return to the page with the message and click ok to continue the exercise as normal, without losing their work.
Dispense exercises (all regions)
  • Fixed a bug where label data would not be sent to the label print function correctly on production servers (Thanks Kate!)
    • The development environment running apache would send post data from wkhtmltopdf to the php function correct, while nginx does not.
    • We’ve gotten around this by putting the label data in as an encoded query string and the exercise date is sent using a parameter for the php function.
Dispense exercises (USA and AUS)
  • Added extra checks for missing ancillary arrays on medications.
    • The missing array would cause the the exercise populate functions to fail when loading an exercise, causing the exercise to hang.
    • This bug occurs when ancillaries are added to a medication, then removed and exercise progress is saved.


  • Updated MyDispense update script
    • Added output descriptions for each stage of the script
    • Added step that removes cache folders before svn update.
      • This effectively clears the cache as the folders will be regenerated by SVN once the SVN update part of the script occurs.

5.0 Release Candidate 6

2016-10-18 | r1022


Tutorials page
  • Added support for pushing enter to submit tutorial passwords (Thanks Clark!)
    • Previously students would need to enter the password then click the submit button.
Exercises (all regions, all types)
  • Added warning pop-up if you try to navigate away from the exercise.
    • If you hit back, reload or try to otherwise navigate away from the exercise page without submitting or using the exit / save buttons this warning will appear.
    • Should help prevent students from exiting and losing work.
    • Thanks to Clark for the suggestion.
Dispense exercises (all regions)
  • Updated exercises with S8 -> CD backend changes.
Dispense exercises (AUS)
  • Updated S8 register to new structure.
    • Removed up / down buttons from index page
    • Removed images and replaced with text
    • Put add / remove entry buttons on a new line, rather than having them in an extra cell
Dispense exercises (UK)
  • Benchtop changes
    • Removed barcode scanner
    • Redesigned benchtop for the UK
    • Full size (without pharmacy details on the bottom) have been added on the left hand side.
    • Clicking the full size labels will put them into move mode. When in move mode, clicking on a medication on the right will associate that label with the medication.
      • If the medication wasn’t counted, it will open up the label placement activity.
      • If the medication was counted, the label will be stuck to the medication automatically.
    • Added PM Register book
      • Clicking the PM register will enter register mode.
      • Clicking on a label (either on the left or attached to a medication) will open the PM register screen
      • The PM register screen has the PM register and the Check / Dispense box options.
      • PM Register
        • To make a PM register entry, fill out the fields.
        • PM Register fields
          • ID #
          • Date of supply
          • Date of prescription
          • Patient details
          • Prescriber details
          • Medication details
        • There is a separate PM ID that must be put on the label. The PM ID on the label is found on the left hand side of the screen underneath the label.
      • Check / Dispense
        • To initial the check / dispense boxes on the label, enter the desired initials in the initials field.
        • Then click the dispense check box to enter those initials on in the check box.
        • Clicking the dispense checkbox will apply it to the dispense box.
      • Click the done button to return to the regular benchtop.
  • Redesigned Controlled Drug register
    • A lot more green
    • Entry screen has been updated with uk fields.
      • Date supply
      • Received
        • Name and address
          • Omnicorp placeholder has been added for now.
        • Quantity received
      • Supplied
        • Patient name and address
        • Prescriber authority details
        • Prescriber name
        • Quantity supplied
      • Balance
    • Save entry button is on another line below the entry line.
      • Once the entry is filled out, click the save entry button to save it.
      • Remove the entry by clicking the remove entry button.
Validation exercises (all regions)
  • Fixed missing styles for the attachments pane
    • Moved attachments pane styles to new CSS file
  • Fixed missing styles for dispensing record table
    • Added dispense.css to the CSS load list for validation exercises
    • Added dispense.css to the CSS load list for the minify utility.
  • Added UK version of the patient_prescriber info JS.
    • Mainly to prevent errors when loading an exercise. A proper version will have to be made.
Exercise feedback (all regions, OTC and Dispense)
  • Fixed a bug where ‘pat’ or patient would be referred to instead of prescriber or patient in fact finding feedback. (Thanks Sarah!)
  • Updated backend to use CD instead of S8 as all Controlled Drug references
  • Fixed a bug where fact finding feedback would be displayed even if no questions were set for a certain kind of fact finding (Thanks Clark!)
  • Updated fact finding feedback so that advanced fact finding feedback displays the feedback for a question next to that question, rather than in a box below.
    • The problem was that it wasn’t obvious which line of feedback belonged to each question. So we have re-consolidated it to make it much easier to read.
Dispense exercise feedback (AUS)
  • Fixed S8 feedback using the label creation date as the S8 supply date instead of the exercise date.
    • If an exercise date was manually set, the label creation date may not match the exercise date.
Dispense exercise feedback (UK)
  • Added feedback for the PM register
    • PM register feedback only appears if the exercise has a private prescription.
    • Thus if a PM register item is filled out on a non-private prescription exercise, nothing will appear.
    • If a PM register item is not filled out on a private prescription, a not completed message will appear.
    • Feedback fields
      • PM ID. Auto-marked, checks for differences between label and PM register ID entry
      • Prescription date. Auto-marked, compared to prescription date.
      • Supply date. Auto-marked, compared to exercise date
      • Patient details. Manually marked.
      • Prescriber details. Manually marked.
      • Medication details. Manually marked.
  • Added feedback for CD register
    • CD register feedback appears if a medication required a CD register entry.
    • If no entry is found, then a no entry completed message will appear.
    • Feedback fields
      • Date. Auto-marked, compared to exercise date.
      • Patient name. Manually marked
      • Prescriber authority number. Manually marked. Could be auto-marked once a field is defined for it.
      • Prescriber name. Manually marked.
      • Quantity supplied. Auto-marked, checked against qty on prescription.
      • Balance. Auto-marked, calculated using the qty on prescription and amount supplied defined in the exercise set up.
OTC exercise feedback (all regions)
  • Removed CSS from view files. CSS has been moved back out to CSS files.
  • Added support for PDF export
    • Added print CSS styles for OTC medications


Assessments (all regions)
  • Updated backend with S8 -> CD support.
  • Renamed S8 criteria to CD.
  • Fixed scenarios where a student chooses to not dispense in a dispense exercise with errors enabled would attempt display label marking (Thanks Clark!)
  • Added additional context to scenarios where students do not dispense in dispense exercises with errors enabled.
    • Now displays the reasons for not dispensing.
    • Lists all notes that the student has added to the exercise
    • Made it more obvious that the student has chosen not to dispense in a dispense scenario.
Dispense exercises (all regions)
  • Fixed a bug where the exercise failure pane would not allow you to select a replacement medication (Thanks Clark!)
  • Fixed replacement medication forms appearing as undefined on the failure pane
  • Updated all S8 fields to Controlled drug fields (AUS -> UK)
Dispense exercises (AUS / UK)
  • Fixed controlled drug validation not checking if fields had been filled out.
Validation exercises (AUS / USA)
  • Fixed repeats field not having an ellipse drawn around the field when selected as a problem.
Rx medications (AUS)
  • Updated backend to support S8 -> CD changes


  • Updated references from s8 to cd. Makes sure that quantity words and repeats still works correctly for Australian scripts.
  • Fixed a bug where even though fields have been hidden, prefixes and postfixes would render in the hidden field colour.
    • Added a check in the parse_script_error_data function that removes the $script_data[‘errors’] object if display missing is not set.
    • The existence of the errors object was causing the script to render pre/post fixes in their altered colour, instead of the base colour.
    • I think the parse_script_error_data function used to exit early, but doing so stopped fields from being altered / hidden. Preliminary tests looks as though this fix works correctly.
    • First noticed on the symposium site.
    • Prescriptions, line 2054.

Database updates

SQL Update 132
  • Renamed s8registries table to cd_registries
    • Removing Australian specific term and making it more generic
    • Allows for Controlled drugs to be shared between versions more easily
  • Updated metric and other tables to update s8_ to cd_
Data update 35
  • Updated all s8_activate and s8_stock region data attributes (australian version) to cd and cd_stock.
  • Updated all medications_prescription entries to use cd instead of s8 for Controlled drug attributes in region data.
  • Updated all medications_prescription assessment data to use renamed CD marking criteria instead of s8.
  • Updated all label assessment data with CD marking criteria instead of S8.


  • Updated region config data with S8 -> CD changes
  • Removed CSS definitions from OTC exercise view files.
  • Added Ajman University landing page
  • Moved attachment overlay css into new attachments.css file.
    • Updated all exercises to use this file.
    • Added attachments.css to css minify utility.
    • Without these styles the attachments overlay was broken in Validation exercises.
    • Removed attachment overlay css from handover.css
  • Updated label config field names to be more obvious
    • Name → pharmacy_name
    • Address → pharmacy_address
    • Misc → pharmacy_phone
    • Type → use_by_type
      • Type is only used on USA label types. So type was really confusing at the best of times.
  • Added pharmacy_image to label config.
    • Used on Australian versions to supply the image in the bottom left corner of the label.
    • Used on USA labels that have an image instead of a pharmacy name.
      • If a label has an image instead of a name, leave the name field blank and put the image in the image field.
    • Not used on UK labels.
  • Updated underscore js to 1.8.3 to 1.6.0.
    • Added underscore-min.map file too.
      • This is to stop the cake logs filling up with messages about this file missing. Kaan’s dev version has a 3mb log nearly full of these messages. Guess that’s what we get for emptying our caches so often.

5.0 Release Candidate 5

2016-09-29 | r1002


Dispense exercises (all regions)
  • Added metrics for the endorsements pane
    • Now tracks if the pane is opened, endorsements selected, moved around, resized etc.
  • Fixed a bug where the prescriber was always contactable even if they no questions were defined (Thanks Clark!)
    • A check for the number of defined prescriber FF questions was set incorrectly. Updating the check with the correct data fixed the issue.
OTC exercises (all regions)
  • Partial bug fix for the product images getting pulled down when dragging them around while zoomed.


Dispense exercises (all regions)
  • Fixed voice mail system from being completely broken (Thanks Clark!)
    • Javascript for the voice mail section was not added while I was consolidating common JS.
    • Re-adding the script fixed the problem. Doh! Copied directly from MD4.

SQL Update 131

Added endorsement tracking fields to the metrics table.


  • Updated minified dispense exercise js due to changes made in this version.
  • Added University of Reading Malaysia landing page

5.0 Release Candidate 4

2016-09-28 | r998

Prescriptions (all regions)

  • Fixed a bug where a student endorsed script would not be displayed correctly in exercise feedback (Thanks Clark!)
    • Student endorsement data is stored in the exercise submission data and has to be retrieved. Thus when a prescription is rendered, the exercise id and user id for the exercise is passed to the prescription so it knows which endorsement data / exercise data to retrieve.
      • The user id and exercise id are passed to the prescription so that I can implement some future feedback improvements that require extra user validation.
    • So student endorsement data is retrieved and then applied to the script. However, there was some left over code from validation exercises that was removed that referred to ellipse data (circles around fields) that it was still trying to get from the database.
    • Thus since the field didn’t exist, it would cause an error and the prescription would not be rendered. So removing the ellipse data references and old code has fixed the issue.

5.0 Release Candidate 3

2016-09-22 | r996


Dispense exercises (all regions)
  • Fixed endorsement bug fixed in MyDispense 4.4.20.
  • Fixed javascript errors when trying to open prescription errors and endorsement panes.
    • These errors occurred when trying to open these panes without selecting a patient or prescriber. Extra checks were added so it would not happen. You can not open an empty endorsements pane.

5.0 Release Candidate 2

2016-09-22 | r993


Dispense exercises (USA)
  • Fixed a bug where the backroom / front room slider buttons were not appearing. (Thanks Clark + Sarah!)
    • We missed updating the US version of the taskbar with the new structure + ids.

5.0 Release Candidate 1

2016-09-21 | r989:991

  • Updated admin pages with links to new CSS locations
Unit students
  • Fixed a bug where the add all students checkbox did not work correctly when adding students to the unit. (Thanks Clark!)
    • It was updating and selecting the students actually in the unit instead.
  • Added more width to the checkbox column to display the sort arrow correctly.
Dispense exercise designer (all regions)
  • Fixed a bug where fact finding questions were not being deleted or updated correctly. (Thanks Clark!)


  • Updated client pages with links to new CSS locations
  • Added the region class to the body tags of pdf layouts.
Dispense exercises (all regions)
  • Updated dispense exercise sliders (backroom and pharmacy buttons) with OTC styles.
    • Button labels have been removed to reflect the OTC style.
    • Generated updated minified javascript files
  • Added support for minified CSS in production
  • Added support for new CSS files
    • See overall misc changes for more details
Dispense exercises (UK)
  • Updated dispense screen
    • Moved fields around and consolidated the look of the screen
    • Styled select ancillaries button
    • Styled select ancillaries screen
      • Finish button now properly padded
      • Select row highlight has been updated
  • Updated UK label
    • Combined directions and ancillaries field
      • This has been done to facilitate label splitting for label pdf output. Which has also been implemented.
    • Fixed full size label styles
    • Added handwriting font for C / D boxes
    • Finished print styles
OTC exercises (all regions)
  • Category back button in product selection has been made more prominent
  • Adjusted the position of page controls beneath the product selection shelves.
    • Now uses the full horizontal width
  • Fixed a bug where the patient list would not load after searching for a patient on the dispense screen.
    • Introduced in Beta 16.
  • Added support for minified CSS in production
  • Added support for new CSS files
    • See overall misc changes for more details
Validation exercises (all regions)
  • Added support for minified CSS in production
  • Added support for new CSS files
    • See overall misc changes for more details
OTC Exercise feedback (all regions)
  • Expanded Fact Finding feedback to match the same level provided by dispense exercises.
    • Splits each question type into its own list, instead of displaying a single list of questions you asked.
    • Effective gone from this structure:
      • List of questions asked
      • Feedback
    • To this structure
      • General feedback blurb
      • List of must ask questions asked by the student (if applicable)
      • List of must ask questions that were not asked by the student (if applicable)
      • List of do not ask questions asked by the student (if applicable)
      • Feedback
    • Consolidated view file so that is now shared between OTC and Dispense exercises.
Dispense exercise feedback (all regions)
  • Updated fact finding feedback to use OTC feedback styles
    • Looks nicer
    • Removed tables
Tutorials list
  • Added number of exercises completed in the tutorial header
    • Displays ‘X/Y exercises complete’
    • Gives an overview of how many exercises the student has left to complete.
    • Updates if an exercise is reset.


  • Restructured CSS files
    • Moved all jquery / plugin CSS files to /css/library from /css/common
    • Moved core CSS files to /css/core
      • Core files are dashboard, feedback, login and main
    • Moved admin.css to /css/admin/admin.css
    • Moved exercise css into /css/exercise
      • Exercise css has been split into smaller files to make css management easier.
      • Exercise types will load the required css files in development.
      • On production a minified CSS file will be used instead.
        • Generated using the css minify utility script in the utilities folder
    • Removed region specific CSS files
      • Region specific CSS will be handled in the existing files instead.
      • The body tag in exercises now has a class for the exercise type and the region mydispense is running.
      • For example: <body class=”otc aus”>
      • These classes are used to determine which region specific CSS to use.
  • Added landing page styles for the following institutions:
    • University of Sydney
    • Sharjah University
    • University of Malawi
    • University of Michigan
    • University of Minnesota
    • Midwestern University
    • University of Illinois
    • University of Mississippi
    • University of Zimbabwe
  • Added css minify script
    • Outputs files to /webroot/css/min
    • Generates minified CSS for all 3 exercise types.
  • Updated UK region data
    • Removed all references to rpt’s in the script configuration
    • Removed rpt’s from validation exercise problem list
  • Updated monthly database backup script
    • Now saves to /db_monthly instead of /db.
    • Changed name format to <month #>.<institution code>.<date>
      • This is to make the order of the files more obvious.
  • Updated daily database backup script
    • Now saves to /db_daily instead of /db
    • Changed name format to <weekday # (1-7)>.<institution code>.<month>
  • Updated login landing page image from MyDispense 4 shopfront to MyDispense 5 shopfront
    • Shiny!

5.0 Beta 17

2016-09-14 | r984


Dispense exercises (all regions)
  • Fixed a bug where fact finding questions would get saved with error required set to 1. (Thanks Sarah!)
    • This would flag the questions as required for exercises with errors, even if you did not flag the questions as required.
    • Fix made in javascript to convert boolean error_required values to 0 or 1.

5.0 Beta 16

2016-09-06 | r982


Dispense exercises (all regions)
  • Added support for creating PDF versions of labels
    • PDF button appears underneath delete in label management
    • This button will generate a PDF version of the label for printing
    • Label printing can be configured to output to different page sizes
      • Page width / height are in MM
      • Margins can also be set for each side in MM. Default will be 5mm.
    • The PDF button will not appear unless the instance has been set up for label printing.
  • Added dispense_region_populate_patient function call after selecting a patient on the dispense screen.
    • Use to populate region specific data that doesn’t fall into the main select function.
  • Added dispense_region_populate_doctor function call after selecting a prescriber on the dispense screen.
    • Same as patient function.
  • Updated select patient data function to return date of birth as part of detailed patient information.
  • Updated script type drop down data function to only return active prescription types.
  • Fixed a bug where loading directions from a save would case new lines to appear as <br/> instead of new lines (Thanks Kaan!)
  • Added support for minified exercise javascript
    • Minified version of javascript is loaded when the MyDispense instance is in production mode.
    • Minified JS is created by running a utility (located in /utilities) which will pack and minify the JS. The output files should be tested before committing.
  • Moved Patient date of birth calculation from single patient data to all patient data.
    • What this means is that instead of waiting until a single patient has been selected to determine a patient’s date of birth (when a patient is selected, extra data is pulled down from the database, like dispensing records and so on), it has been moved to the general patient data function.
    • This allows for the date of birth to be displayed on the patient selection screen instead of only on the dispense screen once a patient has been selected.
Dispense exercises (UK)
  • Added support for pill counting activity
  • Added support for label placement
    • If medication was counted into its own bottle, label placement will not appear for the medication.
    • Clicking on the label will not display label placement for counted medications
  • Removed ancillary section on the benchtop
    • Ancillaries will eventually appear in the dispense screen.
    • Tumbleweed will be added/removed as needed.
  • Updated postfixes for UK Rx medications
    • Swapped abbreviated form for full form name
    • Removed manufacturer code from medication display
    • No longer displays the generic output.
    • Changed in controller code too.
  • Updated backroom medication name display
    • No longer shows the generic name
  • Added UK label
  • Dispense screen changes
    • Changed patient information display on the dispense screen
      • Selection table
        • Changed medicare # to NHS #
        • Changed age to Date of Birth
      • Detail display
        • Removed concession type
        • Removed concession number
        • Changed Age to DoB
        • Changed medicare number to NHS number
    • Removed drug information section
    • Removed RPT field
    • Removed cost field
    • Removed initials field
    • Added support for UK label
    • Added ancillary screen
      • Select ancillaries from a table and add them to the label
      • Ancillaries with subfields (do not take more than X) appear with fields to allow the X to be replaced.
      • Re-open the ancillary screen to deselect ancillaries.
      • Added support for ancillaries on UK labels.
  • Controlled drug registry
    • Built on top of the S8 registry from the Australian version
    • Changed format to match UK CD template
    • 9 Total fields. Some fields not added for paperwork reasons
      • Supply fields (filled in automatically)
      • Date supply contained
      • Name and address of supplier
      • Quantity obtained
    • Student fields (student fields to create CD entry)
      • Date
      • Name of patient
      • Amount supplied
      • Given / disposed by
      • Balance left in stock
  • Added custom submission code
    • Validation check added for ancillaries.
      • Since they do not get added at benchtop, the data structure is different than expected. UK code block in the validation function finds the selected ancillaries in the region data and puts them in the correct location.
    • Additional code is still required for S8 medications.
Dispense exercise feedback (all regions)
  • Fixed a bug where the drug on label feedback field wouldn’t check the student selected medication was correct if no alternative medications were available.
    • There was no else statement after the errors enabled check to compare the medication ids.
Dispense exercise feedback (AUS)
  • Fixed a bug where the generic product form would be displayed twice instead of abbreviated form + brand code.
Dispense exercise feedback (UK)
  • Added support for UK label
    • Label structure
    • Ancillaries on label
      • Including subfields
      • Added UK specific code in the controller to grab ancillary data. Other regions use ID’s to display images.
    • Medication formatting
  • Removed Rpt and Initials feedback fields
  • Added pill counting support
  • Added label placement support
    • Also checks if pill counting is enabled for the medication. If pill counting is enabled, label placement feedback is not shown.
  • Updated formatting for medications
    • Uses full form, not abbreviated
    • Does not display generic names (two lines)
      • There are some exceptions, but I do not have a method to identify those medications for now.


Dispense exercises (UK)
  • Changed ancillary selection for the UK
    • Ancillary selection has been changed to use a table (with search) rather than graphical label selection
    • The ancillary labels list has been changed to display a partial amount of the ancillary labels instead of the graphics
  • Updated CD field labels when editing a medication with CD enabled.
    • Initial balance → Quantity supplied
    • Balance out → Balance
Rx Medications (UK)
  • Added stitched image requirements for label placement.
    • Rx medications now require a product stitched image (jpg 850px x 410px) and a feedback stitched image (jpg 850px x 410px) for label placement.
    • If the medication is counted, the label placement activity won’t appear, but the images will still be required.

SQL Update 130

  • Added full_name field to ancillaries table (text)
    • Used to store full size ancillary descriptions
  • Added UK ancillaries to the database
  • Added FP10MDA-SS script type to prescriptions type table
  • Added FP10D script type to the prescriptions type table


  • Added FP10MDA-SS prescription type for the UK
  • Added FP10D prescription type for the UK
  • Updated slickgrid to new version
    • Also included slickgrid plugins
    • New UK ancillary table uses the rowselection plugin
  • Added utility folder to project root
    • Added dispense exercise minify utility script
    • Moved pdf_font_copy script to utility folder.
  • Applied bug fix from 4.4.19 (Assessment Bug)

5.0 Beta 15

2016-07-27 | r975


Dispense exercises (all regions)
  • Fixed a bug where you could not search again after searching for a patient.
    • Introduced in Beta 14.
  • Added Patient and Prescriber name ordering. (Thanks Clark!)
    • Patient and Prescriber results are now ordered by surname, then by first name.
    • Note that searches are still looking for matches in the first and last name fields.
  • Fixed script endorsements not loading correctly after exercise save (Thanks Clark!)
    • Fixed text not being entered correctly into fields
    • Fixed endorsement prescription image being reverted to its initial state after endorsement populate.
  • Ported changes from MyDispense 4.4.18
    • When hiding fields in a medication name, these fields will also be hidden in the endorsement pane.
    • Thus when you hide the ‘Amoxil’ out of Amoxil 500mg Cap, only 500mg cap will appear in the endorsement pane, instead of Amoxil 500mg Cap.
    • If you hide all of the fields in a medication name, Medication # will appear instead. Where # is the number of the medication on the prescription.


Dispense exercise designer (all regions)
  • Fixed medication search when selecting a replacement medication in Prescription errors (Thanks Clark!)
  • Fixed medication search when selecting an alternative medication in Prescription errors (Thanks Clark!)
    • Alternative medication selection once you have selected a replacement medication. Alternative medications for brand substitution purposes were not affected by the bug.

5.0 Beta 14

2016-07-27 | r972


Dispense and OTC exercises (all regions)
  • Changed search behavior in dispense software (Thanks Eliza Tam, Jill Fitzgerald)
    • Moved search initialisation to a change function. When the search field text is changed, the search pane will be displayed.
    • If you hit enter while searching, it will cause the search field to lose focus, causing the above change function to trigger.
    • Thus even if you don’t hit enter, the search and select window will appear, preventing users from entering the name of the thing you’re searching without selecting it.


Dispense exercises (all regions)
  • Fixed a bug where the changing the expiry date of a medication would cause the expiry date screen to hang. (Thanks Peter James!)
  • Fixed a bug where trying to save custom fact finding questions in a new exercise would fail. (Thanks Christian Hanson!)
Dispense and OTC exercises (USA)
  • Fixed a bug where missing region data could cause the manage dispensing records pane to hang. (Thanks Sarah Kelling!)

5.0 Beta 13

2016-07-11 | r962:967


Dispense exercises (all regions)
  • Fixed a bug where SVG highlights weren’t working in Chrome (Thanks Wee!)
    • Moved SVG’s from symbol and xlink system into individual svg’s per image.
    • It appears that Chrome doesn’t support the xlink and symbol references.
Dispense exercises (USA)
  • Changed attachment speech bubble system to display the attachment binder instead of the attachment thumbnail images.
Validation exercises (all regions)
  • Fixed the close attachment button being bound to the same function as the exit exercise function.
Tutorials page
  • Removed some console messages


Dispense exercise designer (all regions)
  • Fixed a bug where the additional information sections for patient and prescriber fact finding would not appear (Thanks Jenny!)
  • Fixed a bug where the tables for fact finding questions for assessments would not appear after activating marking for fact finding.
  • Fixed a bug where additional information requirements would not be saved correctly (all options would be ticked upon loading the exercise again)

SQL update 129

Updated a grumpy prescriber no pick up response that was missing a <p>, causing the text to stack on top of each other (comm_responses ID #34). Thanks Jenny!

5.0 Beta 12

2016-06-24 | r960

Validation exercise designer (all regions)

  • Fixed a bug where no brand substitute would always be ticked (Thanks Wee!)
    • Changed the load order so that the script type fields would be populated first, instead of populating the base script fields (which set the prescription type), then loading the prescription type fields.
    • Since the no brand substitute field is considered a base script field, it’s value would try to be set before the field actually existed (because it is created via the script type function) and would default to ticked.
  • When editing a prescription the load screen will now disappear after all of the fields have been loaded.

Dispense exercise designer (USA)

  • Restored a missing function that would cause an error when editing Controlled drug medications (where the brand substitution would be set per medication).


  • Fixed Qty and Rpt no longer appearing on Generic US scripts (Thanks Wee!)

5.0 Beta 11

2016-06-23 | r957


Dispense exercise designer (all regions)
  • Added extra validation checks for the region data object for medications
  • Fixed attachment preview links not working correctly for image attachments (Thanks Wee!)
Dispense exercise designer (Australia)
  • Removed quantity words validation check when creating / editing medications on a prescription
    • Left over from the UK version of the file.
OTC exercise designer (all regions)
  • Fixed attachment preview links not working correctly for image attachments (Thanks Wee!)
Validation exercise designer (all regions)
  • Fixed attachment preview links not working correctly for image attachments (Thanks Wee!)


OTC exercises (all regions)
  • Updated window stacking so that medication windows in your inventory can not be hidden by the product selection screen (Thanks Wee!)
    • Clicking on the product selection window would cause it to take focus and appear over any open medication previews that were in your inventory / rejected.
    • Now they will be moved to the front when the medication selection screen is, so they won’t disappear underneath the screen. As the expected behaviour of the medications is to stay over the screen at all times.


SQL Update 128
  • Updated auth_type in users table to varchar 20 from varchar 10.
    • Change made to support longer authtype names, mainly ‘simplesaml’ which didn’t fit in the old length


  • Merged changes from MyDispense 4.4.16
  • Merged changes from MyDispense 4.4.17

5.0 Beta 10

2016-06-16 | r950


OTC exercises (all regions)
  • Fixed next navigation for OTC categories
    • Locations with 3 or less categories would not navigate correctly.
    • Fixed the next navigation to work correctly (pulling the categories to the very edge of the screen instead of leaving a gap / showing the first ⅓ of the next set of categories
  • Changed behaviour of medications
    • Medications now have three possible states, with two sources
    • In inventory, rejected and on the shelf.
    • If you add a medication to your inventory, then remove it, it will be considered rejected.
    • A source is where the medication came from. If the patient presents the medications to you, then it is considered a patient medication.
      • Patient medications display a patient avatar on the patient screen and in the medication quicklaunch section
      • If you reject a patient medication, you will be prompted to counsel about that medication.
        • The counselling prompt will only appear once and only for patient medications.
        • Once you have entered your counselling text and click reject, you will be taken to the counselling section in the patient action pane.
  • Patient medications when clicked will now open the medication select pane for that medication instead of opening the quicklaunch
  • Clicking a medication in the quicklaunch will open the regular medication select pane instead of a different UI element.
    • Replacing the dispense exercise style element.
  • Removed the remove button next to each medication in the quicklaunch menu
    • Removing medications has been replaced with rejecting, which is accessed by clicking on the reject button on the medication select pane
  • Medication select pane buttons now change based on context
    • If a medication has been added to the inventory, the pane will change to the in inventory pane (with a reject button instead of add)
    • If a medication has been rejected, it will change to the add pane, with an add button.
    • If a medication has not been selected, it will also have an add button.
    • For all of these panes, if the medication was first presented by the patient, the patient image will appear on the pane.
  • Added an additional line break between counselling balloons to make it look nicer in feedback.
  • Added icons for medication state in the medication selection screen (shelves)
    • Icons appear in the bottom right
    • Patient selected, rejected, in inventory
  • Fixed a bug where you could not drag a zoomed medication preview all the way to the top of the image (medication select)
  • Added window offsetting to medication select
    • When you open multiple windows their X and Y will be offset by 20 px, so they overlap slightly instead of directly overlapping.
    • The offset is reset back to the normal open location when you drag a pane or close it
Dispense exercises (all regions)
  • Added window offsetting to medication select panes
    • When you open multiple windows their X and Y will be offset by 20 px, so they overlap slightly instead of directly overlapping.
    • The offset is reset back to the normal open location when you drag a pane or close it
  • Added icon for medications in the inventory on the medication selection screen (shelves)
  • Fixed quick launch icons (due to OTC changes)
OTC exercise feedback (all regions)
  • All new design
    • Covers all possible OTC exercise outcomes
    • Recommend advanced, basic, do not recommend and outcome mismatches
  • Added support for basic recommend feedback
  • Nice and clean!


OTC exercise designer (all regions)
  • Fixed a bug where the outcome field for Fact Finding would not update
  • Fixed a bug where the simple FF feedback field would be displayed when creating an exercise for the first time (Thanks Jenny!)
  • Fixed a bug where the checklist for Do Not Dispense reasons would fail even if you selected reasons (Thanks Jenny!)
OTC exercise designer (USA)
  • Fixed the basic feedback section not appearing for fact finding
Dispense exercise designer (all regions)
  • Fixed a bug where the simple FF feedback field would be displayed (for patient and prescriber) when creating an exercise for the first time (Thanks Jenny!)


  • Merged changes from MyDispense 4.4.15

5.0 Beta 9

2016-06-07 | r944


Dispense exercise designer (all regions)
  • Simplified core js files and moved them to /js/admin/exercise/dispense
  • Moved region specific functions / changes to smaller region files located in /js/region/<region>/admin/exercise/dispense
  • This change should make it easier to manage region changes in the future
  • Moved all medication name outputs to a common medication name function
    • Again, should make it easier to maintain how medications appear
    • Removed dependencies on old form fields
  • Deleted old core files in /js/region/<region>/admin/exercise_create_dispense
  • Deleted old core files in /js/admin/exercise
  • Fixed a bug with the prescriber grumpy limit. It now correctly reports a maximum level of 4, not 101.
  • Added simplified feedback option for Patient and Prescriber fact finding
    • Can choose between basic and advanced feedback (basic being the default)
    • Advanced feedback is the same as the existing system
      • Individual feedback fields per questions
      • Updated so that Can Ask questions no longer require any feedback
    • Basic feedback
      • Disables individual question feedback
      • Adds a single feedback field for all the questions set for the section
      • Thus all feedback is set in one location instead, simplifying the process.
    • Added new Type checklist section, which checks that basic / advanced feedback options have their required data.
Validation exercise designer (all regions)
  • Fixed broken JS file references due to dispense exercise designer files getting moved around
  • Updated medication selection panes to support new filter variable names because of changes to the Rx medication selection pane
  • Validation exercise designer JS needs to go under the simplification process. There has been a start, but a lot of stuff can be standardised.
OTC exercise designer (all regions)
  • Simplified region JS
    • Now uses common js files for regions
    • Shared between Dispense and OTC exercises at this point
    • Moved all existing functions to region functions where needed (dispensing records and all table functions)
  • Improved form filter for Rx and OTC medications
    • Forms that have no medications associated with them are not displayed
    • Forms are now listed with a number next to them
      • The number indicates how many of that form of medication there are
      • For example, Tablet (667) means there are 667 tablet medications
  • Added simplified feedback option for Patient fact finding (Questions for the patient)
    • Can choose between basic and advanced feedback (basic being the default)
    • Advanced feedback is the same as the existing system
      • Individual feedback fields per questions
      • Updated so that Can Ask questions no longer require any feedback
    • Basic feedback
      • Disables individual question feedback
      • Adds a single feedback field for all the questions set for the section
      • Thus all feedback is set in one location instead, simplifying the process.
    • Added new Type checklist section, which checks that basic / advanced feedback options have their required data.
  • Changed outcome values
    • 0 = Do Not Recommend (from 1)
    • 1 = Recommend (Basic) (new)
    • 2 = Recommend (Advanced) (from 0)
    • Fixed existing structure to work with new values
  • Added Recommended Basic feedback option
    • Basic feedback does not include treatment groups
    • Has counselling feedback, wrong outcome feedback and feedback for the correct feedback.
      • Correct feedback has tinymce integration
    • Added optional recommended medication section
      • Select medications that you would recommend for the patient
      • Feedback for why you would recommend these medications
        • With tinymce
  • Added OTC medication form to list display. Should make it a little easier to remember which medications you have selected.
  • Added a maximum medication selection option
    • Limits the number of medications that the student may select.
      • Defaults to 6
  • Added symptoms field
    • This field is used to give a general overview of the patient’s condition on the feedback screen


Dispense exercises (all regions)
  • Fixed a bug with the prescriber grumpy limit. It now correctly reports a maximum level of 4, not 101
OTC exercises (all regions)
  • Changed outcome submit values.
    • 0 = Do Not Recommend
    • 1 = Recommend
    • Updated to match Designer Values (1 = recommend, matches will be done in the back end)
  • Added support for the maximum medication option in admin
    • Dialog appears when trying to add more medications than the limit
OTC exercise feedback (all regions)
  • Updated feedback to support new outcome values.
  • Added support for recommended medication basic feedback
    • Uses styles from the new redesign, so it’s pretty rough
  • Added counselling feedback to advanced recommended medication feedback
  • Renamed advanced feedback view to feedback_otc_rm_advanced
  • Added support for the new symptoms field for advanced and basic recommend feedback


SQL update 127
  • Added fields to support patient and prescriber fact finding basic feedback
    • ff_pat_feedback_type (tinyint) Default 1 (advanced)
    • ff_pat_feedback (text)
    • ff_pre_feedback_type (tinyint) Default 1 (advanced)
    • ff_pre_feedback (text)
Data update 34

Converts existing OTC exercises and student data to the new outcome system so things won’t break. Recommend outcomes default to 2.


  • Moved dispense specific patient and prescriber JS for exercise designers to a common location (exercise/dispense to exercise/)
  • Merged changes from MyDispense 4.4.14
  • Added tinymce 4.3.12
  • Deleted old otc JS files (js/region/aus/admin/exercise_create_otc)

5.0 Beta 8

2016-05-25 | r940


Exercises (all regions)
  • Removed prescription from the shopfront image
  • Saved a separate prescription image to be included in dispense exercises
  • Updated CSS to facilitate the changes


  • Ported changes from MyDispense 4.4.14.
  • Cleaning up javascript as UK changes are made.
    • Simplifying javascript files to reduce the amount of repeated code as much as possible.
    • New core admin javascript files are located in js/admin/ . Locations reflect region folder structure.
    • Region files should only contain region specific code. Common files will reference region files and variables which will be prefixed with region_
      • For example, region_populate and region_get_data, region_columns
Patient index (all regions)
  • Region specific code only has the table columns.
    • UK file created. Same columns as USA
  • Common js file created
Patient create (all regions)
  • Common js file created in js/admin/create folder
    • Handles 90% of existing functionality
  • Region js files created
    • Handle region specific fields and code
  • Patient Dates of Birth added
    • Dates of Birth are treated as standard and infant.
    • A standard date of birth is when a patient is over a year old. When a patient is over a year old, the month and date of their birth is selected from a calendar.
      • The year of their birth is calculated from their age in years, subtracted from the year of the exercise date.
      • Thus if someone is 10 years old and the exercise date is in 2016, the date of birth will be in 2006.
    • Infant dates of birth kick in when the age of the patient is less than one year old or 0.
      • Instead of selecting a day and month for the patient’s birth, you will enter how many days old they are. The patient date of birth is then calculated from the exercise date minus the number of days old the patient is.
      • Thus, if the patient is 10 days old and the exercise date is 2016-05-13, the calculated date will be 2016-05-03.
      • Note that due to the limitations of infant patients, the date of birth WILL change when an exercise is loaded on a different date. If you need to put the date of birth into the feedback text or a note, you should set a manual exercise date in the exercise rather than an automatic one.
    • DoB are back. Back again. Tell your friends.
Patient create (UK)
  • Removed australian fields (AUS base)
  • Added NHS number field
  • Added UK region JS
    • Generates NHS numbers (000000000)
    • Generate UK postcodes (AA0 0AA)
Patient images (all regions)
  • Moved JS from aus region folders to common files.
Prescriber create (all regions)
  • Common js file created in js/admin/create folder
    • Handles 90% of existing functionality
  • Region js files created
    • Handle region specific fields and code
Prescriber create (UK)
  • Created UK version of Prescriber create
  • Added prescriber pin
    • Added appropriate PIN generation code for different prescriber types
  • Added prescriber sub-type section
    • Private, CCG, Provider
    • Added code for generating appropriate codes
Prescriber index (all regions)
  • Moved JS to common location
  • No region files exist at this stage. All regions use the common code.
Rx Medications create (all regions)
  • Moved JS to common location
  • Moved pill counting structure to australia
    • Note that australia still doesn’t use the pill counting
  • Moved pill counting javascript to common file
  • Added UK version of medication create
    • Includes Controlled Drug (S8 options) and Pill Counting exercise from the US)
Rx Medications index (all regions)
  • Moved JS to common location
    • Simplified search argument system
    • Region specific files contain columns and filter code
  • Added counted search filter to UK and USA regions
    • Can filter for count activity medications
  • Made region field searches more robust
    • Code will now check if the field exists for that medication before doing things.
Dispense exercise designer (UK)
  • Prescriber changes
    • Prescriber select table changes
      • Changed Prescriber No. to PIN
      • Removed medical centre name and state from table
      • Renamed suburb to city
    • Prescriber information (post select)
      • Changed prescriber No. to PIN
      • Removed state from address display
      • Removed medical centre from address display
  • Patient changes
    • Patient select table changes
      • Renamed medicare No. to NHS number
      • Removed concession field
    • Patient information (post select)
      • Removed concession field
      • Renamed medicare no. to NHS number
    • Dispensing record changes
      • Renamed prescriber number to prescriber pin
      • Removed medical centre name from address
    • Medication select changes
      • Renamed S8 field to CD
      • Renamed S8 search to CD
      • Added counted search
      • Changed medication table filter arg system to new function system
    • Medication create changes
      • Removed Rpts
        • Changed to hidden field
      • Removed hospital supply
      • Added Quantity words field
      • Renamed S8 fields to CD.
        • Will improve JS too.
    • Added support for Private CD script
      • No extra options
    • Added support for FP10SS script
      • Does not include support for hospital prescribers
      • Lots of extra fields
      • Cost centre name
      • Cost centre code (+ generate button)
      • Nurse type. Used to differentiate between Community and Independent nurses.
        • Appears whether you have selected a nurse or not. Quite hard coded. Will look into better ways of handling this in the next release
      • Dispense type
        • Acute
          • One time script. No additional options
        • Repeat
          • Set number of repeats for script
        • Batch
          • Set total number of repeats
          • Set current repeat number


All regions
  • Added type to prescriber data array
    • Retrieves doctor type from doctors_types table and puts it in Doctor object as type
    • Outputs in upper case (for the UK)
  • Added dob to patient data array
    • Calculates patient date of birth and put it in Patient object as ‘dob’
  • Removed medication form dependency on medications table.
    • Now retrieves form and abbreviation from the medications_forms table.
  • Added config option to override single_field font size
    • Set font_size in script field config to override the base max font size.
  • Fixed a bug in the endorsement system where if a field group wasn’t named the same as the endorsement, the field would not appear as endorsed.
    • Line 309 in Prescriptions Controller
  • Added arial and arial bold fonts
  • Added uk_private_cd script
  • Added uk_fp10ss script

Data updates

SQL Update 126
  • Added dob_month field
    • TINYINT 2
    • Logs the month for standard DoB.
  • Added dob_day field
    • SMALLINT 4
    • Small int because dob_day serves as the day offset for infants / patients with an age of 0.
    • Otherwise used to store the month day for standard DoB.

5.0 Beta 7

2016-05-19 | r934


OTC exercise designer (all regions)
  • Added option to hide OTC product gallery.
    • Checking this option will only display the front face of the OTC products.
  • Added exercise region field get data code
  • Added patient starting inventory
    • The patient starting inventory are medications that the patient will hand to the student at the start of the exercise
    • Works the same way as selecting medications for a treatment group
    • Change the patient introduction to suit any medications that you select


Dispense and OTC exercises (all regions)
  • Finished adding fact finding question asked highlight
    • Questions you have asked will be highlighted and will have Asked appear next to the topic
  • Updated Fact Finding question structure
    • Removed ask button that appears and disappears.
    • Ask the question by clicking the question row instead of clicking the button
    • Applies to prescriber and patient fact finding
  • Removed Call button from Prescriber Fact finding prescriber list
    • Call a prescriber by clicking the row instead
OTC Exercises (all regions)
  • Added support for hide OTC product gallery option
  • Added support for patient starting inventory
    • Medication images appear before the attachment icon in the the patient speech bubble
    • Starting inventory medications are added to the student inventory at the start of the exercise
    • Clicking the medication images in the patient introduction speech bubble will open the quick launch panel (student medication inventory), where the medications will appear.
  • Fixed bug where custom fact finding questions would be output as type 3 instead of type 2, causing the question to not be asked correctly.
    • Bug also caused a script error which would prevent the question from being asked too.

5.0 Beta 6

2016-05-10 | r931


Dispense and OTC exercises (all regions)
  • Changed attachment appearance in patient conversation balloon
    • Instead of displaying an icon for each attachment in the exercise, a single attachment icon is displayed if there are attachments in the exercise.
    • Should look a bit neater
  • Added support for random ordering of Patient and Prescriber fact finding question lists.
    • Includes custom questions and the OTC identity query.
  • Fixed a bug where clicking the counsel button without entering any counselling would cause the button to go inactive (thanks Kaan!)
  • Added support for pre-defined question category question text overriding.
  • Asking a fact finding question will cause that question to appear in a different colour to indicate that question has already been asked.
    • Persists over progress save / load.
    • Patient and Prescriber fact finding supported.
  • Added support for fact finding sub questions
    • Sub questions will appear directly below the parent question once it has been asked.
    • Note that the parent question must be defined for the sub questions to show.
OTC exercises (all regions)
  • Fixed the spelling of patient personal information enquiry (thanks Kaan!)
    • From paitent to patient.
Validation exercises (all regions)
  • Changed references to script correct or incorrect to Dispense or Do Not Dispense
Dispense and OTC exercise feedback (all regions)
  • Fixed debug output from appearing in fact finding feedback
OTC exercise feedback (all regions)
  • Fixed a bug where the wrong medication image would be displayed when non-matched medications were selected. (Thanks Keith!)
Validation exercise feedback (all regions)
  • Fixed a bug where feedback would not be loaded on other regions
  • Changed references to correct to dispense
  • Changed references to incorrect to do not dispense
  • Changed faults selected feedback to incorrect faults feedback
    • Previous feedback did not indicate that these faults were incorrect. (Thanks Jenny and Jennifer!)


Assessments (all regions)
  • Added button to reset individual students
    • Deletes all student exercise data and marking data.
    • Allows student to re-attempt the assessment.
    • Button does not appear if student has not submitted.
    • Ported from 4.4.13.
Exercise designers (all regions)
  • Fixed a bug where images without orientation would cause an error message to appear when uploading an image.
  • Fixed patient age range search displaying patients with age’s outside of that range (Thanks Keith!)
  • Added attachment image size information to attachment upload pane
    • Image sizes above 960×600 will be resized to fit within the boundary.
OTC exercise designer (all regions)
  • Added extra descriptions for OTC feedback fields
    • The extra descriptions should describe where the feedback will appear and what it is used for.
  • Removed Pension / Entitlement / Medicare question from OTC patient fact finding
    • Deleted the index in Javascript so that the question doesn’t appear.
    • Does not affect dispense exercises
  • Fixed a bug where selecting a lot of medications in treatment groups would begin to lag the browser. (Thanks Kaan!)
  • Added field to override the question prompt for pre-defined fact finding questions
    • Pre-defined questions usually have their own prompt for the patient / prescriber. Such as ‘You ask the patient about their Age’.
    • The additional field gives the option to override that text with something custom. Similar to custom questions.
    • The question label text is not affected. The question will still appear as age etc.
  • Added option to randomise order of fact finding questions
    • If option is checked (patient or prescriber fact finding), then the order the questions appear in will be randomised.
    • For example, the patient fact finding list won’t always start with Age, Alcohol Consumption, etc. It will appear in a random order.
  • Added support for fact finding sub questions (pre-defined only)
    • Defining the parent of a sub question will cause the children questions to appear.
    • Children questions are the same as regular questions, except they only appear in the list once the parent question has been asked.
    • Removing the parent question will delete any child questions on update
    • Updated checklist code with support for sub questions
Dispense exercise designer (all regions)
  • Fixed fact finding (patient and prescriber) assessment sections from displaying even though no fact finding questions have been defined
  • Fixed patient question assessment section from displaying if patient questions have not been enabled in the exercise.
  • Updated US core code and removed old fact finding checks that no longer apply due to model changes.
  • Added support for fact finding sub questions (pre-defined only)
    • Defining the parent of a sub question will cause the children questions to appear.
    • Children questions are the same as regular questions, except they only appear in the list once the parent question has been asked.
    • Removing the parent question will delete any child questions on update
    • Updated check data code to work with sub questions
    • Updated errors and assessment code to work with sub questions
Validation exercise designer (all regions)
  • Changed Problem with script outcome text to Do Not Dispense.
OTC exercise designer (USA)
  • Added missing pushy patient section for Patient Questions (Thanks Keith!)
    • Should allow you to make the patient not bother you anymore.
Patients (all region)
  • Fixed patent age range search displaying patients with age’s outside of that range (Thanks Keith!)

SQL Update 124

  • Updated patient fact finding category names. Mainly to remove brackets and questions from the categories.
    • ‘Allergies: (medication/other)’ → ‘Allergies’
    • ‘Have they taken this medicine before?’ → ‘Previous use of this medication’
    • ‘What is the medication for?’ → ‘Medication purpose’
  • Updated id index in CommCategories table
    • Changed to auto increment and changed to unsigned INT.
    • Not sure why it wasn’t auto increment in the first place.
  • Added sub_question_id field to Comm Categories table
    • INT 11, INDEX, Default 0.
    • Used to indicate if this question is a sub question of another Comm Category item. References ID of another question in the table.
  • Inserted two sub questions for Patient FF Symptoms question (ID 12)
    • Other Symptoms
    • Aggravating/Relieving factors


  • Updated jquery to version 2.2.3 from 2.1.1
  • Moved slickgrid onto a forked repository
    • Contains bug fixes and updates, as original repository is no longer maintained
    • https://github.com/6pac/SlickGrid/wiki
    • Lots of bug fixes and hope.
    • Slickgrid is the table system we use in Admin and in the Dispense screen in exercise clients.
      • It’s fantastic, but it’s been needing some updates for a while now.
  • Updated exercise delete code to work with all exercise types.
    • Includes deletion of all metrics for clearing user data.
  • Added landing page for the University of Kentucky

5.0 Beta 5

2016-04-22 | r918


Dispense and OTC exercises (all regions)
  • Fixed patient image SVG from covering right side of the screen overlapping the patient conversation scrollbar and stopping it from being click able. (Thanks Keith!)
    • Updated the patient image area to have a set height instead of allowing CSS to do it.
    • Top offset is now calculated based on the image height. For most images it should be 0.
  • Removed top CSS property from exercise.css stylesheet.
Dispense and OTC exercise feedback (all regions)
  • Fixed a bug where fact finding feedback would display that a question had not been asked even though the question was displayed as asked in the feedback. (Thanks Keith!)
OTC exercise feedback (all regions)
  • Fixed prescriber fact finding not being processed correctly. Now using Dispense exercise feedback code.


Patient images (all regions)
  • Updated patient image SVG path parse code to save the width of the image as well as the height. Dropped viewport property.

Data update 33

  • Removed viewport from SVG path data
  • Added width to svg path data
  • NOTE Data update 33 will need to be re-run on MD 5 beta instances.

5.0 Beta 4

2016-04-20 | r916

Validation exercise designer (all regions)

  • Fixed a bug where an attachment check could cause the exercise designer to hang when selecting a prescription type
  • Fixed a bug where selecting a fault on the medication would not be recorded because the medication data hadn’t been updated yet.
    • Had to re-organise the update order so the medications would be updated before the outcome data was updated.

5.0 Beta 3

2016-04-20 | r914

Dispense exercise designer (USA)

  • Fixed a bug where loading an exercise with fact finding data would cause the designer to hang (Thanks Clark!)
    • Fact finding categories were not being loaded as part of the designer startup process. Updated with code from Australian files.

Exercise delete (all regions)

  • Updated exercise delete code to handle extra exercise types
  • Updated exercise delete code with patient histories and new patient communication tables
  • Fixed exercise delete code not deleting prescriptions


  • Removed old model calls from Units Controller
    • Barcode scans, label ancillaries
    • A blast from the past
  • Added required models for exercise delete to Unit and Option controllers

5.0 Beta 2

2016-04-19 | r909

OTC exercises (all regions)

  • Fixed OTC categories not appearing in alphabetical order in the selection screens
  • Fixed OTC product page size (12 -> 15 products per page)
  • Fixed OTC product page navigation (not functioning to functioning)
  • Fixed OTC product page last item name (on bottom of the screen)
    • Was previously referencing the medication after the last item on the screen, which would cause errors if there was only one page of items.
  • Fixed OTC location changing when a location has no categories
    • Would previously display last location opened + previews.
    • Now correctly displays empty OTC category location instead
  • Updated OTC product preview slider behaviour
    • Thanks Keith!
    • Fixed product preview size not increasing until after the image has been loaded. (image now immediately updates to the correct size)
    • Fixed single click behaviour on the slider. Clicking on the slider will correctly update the image size, instead of doing nothing or making the image the incorrect size.
    • Added a check for the preview image to see if a draggable object has been added before trying to change the draggable properties. This will stop error messages from appearing in the javascript console.

Dispense exercises (all regions)

  • Letters that have no products associated with them in product selection now appear inactive

5.0 Beta 1

2016-04-14 | r905:906

4.4.12 merge

Merged changes from MyDispense 4.4.12.


  • Fixed a bug where the no brand substitution checkbox would not appear ticked in exercises (Thanks Wee!)
  • Added Other (specify) as a Do Not Dispense reason checkbox


Attachment uploads (all regions)
  • Fixed a bug where PDF attachments would fail to upload correctly.
Dispense exercise designer (all regions)
  • Fixed a bug where fact finding questions would be re-created instead of updated on exercise save
  • Fixed a bug where assessment criteria were set as having no attempt penalty enabled, even though it has not been enabled on exercise load.
  • Added professional notes to assessable criteria
Validation exercise designer (all regions)
  • Added per prescription attachment support
    • Manage attachments for a prescription under the extras tab
    • Attachments are set per prescription
    • Upload new and select existing attachments
Assessment marking (all regions)
  • Fixed fact finding marking
  • Added support for custom questions in fact finding automarking
  • Fixed patient question marking
  • Added support for professional notes
OTC Categories (all regions)
  • Added number of medications in a category to table
  • Added delete category function
    • When deleting a category that has medications in it, you must select a new category for the medications to go to.
  • Added medication management function
    • Add / Remove medications from a category by selecting / deselecting medications. Same interface for selecting medications as OTC exercise designer.
    • Removed medications are placed in a ‘General’ category. This category is a default that can not be deleted.
OTC medication (all regions)
  • Added additional checks for null region and active ingredient data
    • Without these checks the populate function could fail, resulting in missing data
Patient images (all regions)
  • Removed some left over console messages that are no longer needed
Patient image create (all regions)
  • Added backend support for SVG Path generation. SVG data is now generated when a new patient image is uploaded or created.
    • SVG path data is used to make patient image outlines in the updated client environment.
Exercise list (all regions)
  • Fixed exercise copy function to use new format
  • Updated exercise copy function to use new Communication tables
    • From FfQuestion -> CommQuestion
  • Fixed misnamed prescription id variable that caused validation exercise copy to fail
  • Updated exercise copy function to include OTC exercise copying


Exercises (all regions)
  • Identified and moved all core exercise js files to js/exercise from region specific folders.
    • All exercises now rely on these core files with region specific code moved to smaller region files. If any new region code needs to be added, it will be split from the core file into the smaller one.
  • Moved all JS and View files into a new folder structure.
    • /exercise/ contains all files that are used over multiple exercise types (common files)
    • /exercise/dispense contains all dispense exercise files
    • /exercise/validate contains all validation exercise files
    • /exercise/otc contains all otc exercise files
    • If a file is used by more than one exercise type, it is moved into the common location. For example label generation code (JS) or the exercise introduction pane (View)
  • Prefixed view filenames based on where they appear in the exercise structure
    • wra_ are exercise wrapper level views (exercise introduction, attachments)
    • con_ are container wrapper level views (shopfront and taskbar)
    • dia_ are dialog wrapper level views (dispense, benchtop)
    • nes_ are nested views. These views are called from one of the above view types and describe where are called from inside the view.
  • Removed old views and javascript that were no longer in use.
Exercises (USA)
  • Fixed a date format unspecified variable check bug in validation exercises. Now checks for variable type instead
Validation exercises (all regions)
  • Added support for attachments
    • A new tab has been added for attachments in the left menu bar.
    • Clicking the tab will open the attachments section. If any attachments have been added for the current prescription, thumbnails will appear in the tab.
    • Clicking a thumbnail will open the attachment in a full screen dialog.
  • Renamed internal parent view file from exercise_script_checker to exercise_validate and removed old file
  • Fixed clicking label text in professional notes pane not passing focus to professional notes textarea
OTC exercises (all regions)
  • Added new shopfront environment
    • New 3d environment
    • Has a new front area for OTC medication shelving
    • Shiny!
  • Added support for different shopfront locations
    • Shelves, under the counter and fridge
    • Categories are only displayed in a location if that category has medications in that location
    • The state of each location is saved when going between them. If a category was open in a location, it will be re-opened to that point when navigating back to it.
      • This includes displaying any medications that were open in that location. You can not have medication panes open from multiple locations at a time.
      • Location states are not included in progress saving
  • Added SVG highlight support for patient images
    • Highlights now outline the patient image rather than a box around them.
  • Fixed a bug where removing a medication from the inventory did not allow you to re-add that medication if it was already being previewed in the product selection screen.
  • Fixed clicking label text in professional notes pane not passing focus to professional notes textarea
Dispense exercises (all regions)
  • Added new shopfront environment
    • New 3d environment
    • Shiny!
    • Old environment files have been kept and archived for now
  • Renamed internal parent view file from exercise to exercise_dispense and removed old file.
  • Added SVG highlight support for patient images
    • Highlights now outline the patient image rather than a box around them.
  • Fixed a bug where USA region view files were not loaded correctly
  • Added OTC style medication selection to the backroom
    • Product shelves now take up the full width of the dialog
    • 18 products may now be displayed instead of 9
    • Medication information appears in a draggable dialog window (same as OTC)
    • Multiple medications can be opened at once
    • Current page / category are retained when swapping between locations (same as the changes for OTC)
  • Updated pill icon animation to begin at the location of the draggable dialog window add button
  • Simplified backroom region code
    • Moved all region specific functions into a new file called backroom_region_<usa/aus>
    • New file contains region specific code only. Stops duplication of non-region specific code.
    • AUS
      • Medication name display
      • S8 Registry
      • Product selection
    • USA
      • Medication name display
      • Pill counting activity
      • Product selection (with support for pill counting)
    • Saves around 500 lines of common code.
  • Simplified benchtop region code
    • Split region specific functions into benchtop_region_<usa/aus>
    • Contains label placement code for australia and no label placement code for USA.
  • Simplified shopfront region code
    • Split region specific function into shopfront_region_<usa/aus>
    • Contains medication format string and extra data required to show quicklaunch labels
  • Simplified dispense region code
    • Split region specific functions into dispense_region_<usa/aus>
    • A bit trickier for this one. Lots of little misc changes throughout the code.
    • May need further cleanup at one stage.
Dispense exercises (USA)
  • Fixed a bug where medications that are manually counted did not copy over the abbreviated form for that medication. Resulting in the medication form appearing as undefined in some circumstances.
Exercise feedback (all regions)
  • Fixed a medication ID being output outside of the feedback table structure, causing a number to appear underneath the label previews
  • Fixed the region file file_exists check location by removing an extra dispense/ directory check. Region specific feedback files now load correctly again.
  • Removed unused otc feedback view parent file (feedback_otc.ctp), which was superseded a while back.

Database updates

SQL update 123
  • Added validation exercise metric fields for attachments
  • Added svg_data field to patient_images table
    • Contains json data for svg path generation.
    • Fields: path, viewbox and height
    • As some patient images are a non-standard size, the viewbox and height needed to be added to support different sizes
SQL update 124
  • Renamed patient_images ethnicity field to svg_path_alt
  • Updated male and female robber images with alternative svg paths
Data update 33

Generates SVG path data for all existing patient images. Processes pngs through potrace to create outline data which is then stored in the svg_data field in the patient images table. Requires imagemagick and potrace to be installed on the server.

Generates json object with path, viewbox and height extracted from generated SVG file.

Generated files are then deleted from the server.


  • Added professional notes criteria to assessment config
  • Installed imagemagick and potrace packages on servers.
  • Merged OTC medication preview styles from otc.css to exercise.css
  • Updated robber avatar code for MD5
  • University of Charleston landing page

5.0 Alpha 4

2016-03-18 | r885


Dispense exercise designer (all regions)
  • Removed activate checkboxes for fact finding sections
  • Added support for before and after patient questions
    • Select before, after or before and after when creating patient questions.
    • Question lists swap once the student has selected medication from the back room.
    • Validation will fail if after questions have been defined in a label only exercise (as there is no backroom to select medications from)
  • Added support for optional fact finding questions
    • All questions are no longer required to be defined in fact finding
  • Added support for custom fact finding questions
    • Includes major simplification to fact finding question tables
    • Should be better optimised on the back end now
  • Updated error missing information system to work with custom fact finding questions
  • Updated fact finding assessment marking to work with custom fact finding questions
  • Added support for communication response types.
    • Select a communication response type in the prescriptions section. Defaults to default.
  • Fixed patient questions not saving correctly (saving as type ‘pat’ -> 0, instead of type 1.
OTC exercise designer (all regions)
  • Added pushy patient option for patient questions
    • Must have at least one patient question defined or the checklist will fail.
    • Pushy patient is a dialog box that appears if the student hasn’t asked the patient any questions.
  • Added preferred medication checkbox for beneficial medications in treatment groups
    • Calls out a single medication in a treatment as the medication you would preferably recommend to the patient.
    • When a medication has been set as preferred, a new feedback field appears in the group. If the student recommends the preferred medication, the preferred medication feedback is displayed.
    • If a non preferred beneficial medication is displayed, the correct medication feedback is displayed. The correct medication feedback field can be changed to reference the preferred medication. For example: “I would have recommended ‘X’ because y”
Communication responses
  • Added new prescriber fact finding sub category
    • Undefined question response. Responses from this pool are displayed if a question has not been defined.


Dispense exercise client (all regions)
  • Removed hand over pane
  • Removed patient fact finding pane
  • Removed attachments pane
  • Added Patient Actions Pane (PAP) from OTC exercises
    • Contains patient questions, patient fact finding, counselling, attachments and hand over options
    • Includes improvements made to attachments (inline PDF’s and images)
    • Functionally fact finding, patient questions, attachments and counselling now work the same as the OTC exercise PAP. Thus the following has been added:
      • Moved all patient conversations into a single area that appears in the main shopfront
      • Added support for custom patient fact finding questions
      • Added support for before and after patient questions (after questions are triggered once a product has selected from the backroom)
      • Counselling is now communicated to the patient, who will respond
  • Added a speech bubble containing attachment images if any attachments have been set for the exercise
  • Changed PAP handover for Dispense exercises
    • The handover screen displays all labels and products in a user’s inventory.
    • Labels are displayed using the label graphics used on the benchtop and products are displayed using a thumbnail.
    • If a label is not attached to a product, it appears separately.
    • If a label has been attached to a product, the product is displayed with a label icon (as seen in benchtop). When the product is moused over, the label will be displayed.
    • If no labels have been created, the finish button will not appear.
  • Added support for custom prescriber fact finding questions
  • Added support for optional prescriber fact finding questions
  • Added support for PAP metrics
  • Added new metrics that record the outcome of the exercise and other auto-markable things at the exercise level.
    • Such as the exercise outcome type and outcomes of various fact finding questions. See sql update 122 for more details
Dispense exercise feedback (all regions)
  • Fixed fact finding feedback
  • Fixed patient questions feedback
  • Moved fact finding feedback view to common view
    • Common view is shared between OTC and Dispense exercises.
    • Controller codebase for FF data is now the same between OTC and Dispense
    • Deleted old FF feedback view
  • Moved patient questions feedback to common view
    • Also used by OTC exercises.
OTC exercise client (all regions)
  • Fixed a bug where the patient question after state would be reset to 3 each time a medication was added to the inventory.
    • Resetting the state to 3 results in an in initial question comm response being used instead of a prompt for another question (if a the initial prompt has already been asked).
    • State is now only changed when the state is less than 3 to 3 (After question initial prompt)
  • Changed internal data structure for logging fact finding questions
    • Custom and Defined Fact finding questions are now logged to the same object instead of separately.
  • Fixed a bug where the no attachments message in the patient action pane would be replaced with the user’s selected products (Thanks Keith)
    • Removed shared class name and changed message class and format.
  • Added support for new fact finding metric count, pap_ff_undefined.
    • This counts the number of times an undefined fact finding question was asked.
OTC exercise feedback (all regions)
  • Added support for custom fact finding questions to feedback
  • Updated fact finding feedback to always display an outcome message
    • There are 5 outcomes.
      • 1 – All questions correct
      • 2 – All questions incorrect
      • 3 – Questions correct and incorrect
      • 4 – Questions correct, but missing all of them
      • 5 – No questions asked
    • All questions correct feedback no longer causes the feedback table to exit early.
  • Added output for correct fact finding questions in feedback.
    • Questions answered as must ask will now be displayed in a feedback table instead of being hidden.
  • Fixed a bug in recommended feedback where the wrong medications would be displayed as selected by the student (Thanks Keith!)
    • The wrong value was being referenced in an array, which set all user medications as ID # 1.
  • Added support for preferred medications
    • When a preferred medication has been recommended it is displayed with a thicker green border and a specific feedback field is shown.
    • If a preferred medication has been set, but not recommended it will be displayed next to the recommended medications for the group, but with a grey border instead of green
    • The alternative medications list displays the preferred medication with a thicker grey border.

Database updates

SQL update 122
  • Added comm_responses_types_id column to prescriptions table
    • Adding support for comm_responses_types to dispense exercises.
  • Updated CommQuestions fact finding question types to 0.
    • Fact Finding questions were being pulled in as patient questions. This should fix that.
  • Insert communication responses for new prescriber fact finding undefined response type.
    • Responses
    • “I’m not sure”
    • “I can’t remember”
    • “I do not recall”
    • “I can’t answer that right now”
  • Added pap_ff_undefined metric to metrics_otcs table (tinyint 3)
  • Metrics table changes
    • Dispense exercise metrics have been renamed and moved around to fit in with otc metrics a bit more.
    • Added the following fields. Fields are tinyint 3 unless otherwise noted.
      • Pap_open
      • Pap_nav_co
      • Pap_nav_ho
      • Pap_nav_dd
      • Pap_ff_man
      • Pap_ff_undefined
      • Pap_nav_pq
      • Pap_nav_pq_q_b
      • Pap_nav_pq_q_a
      • Pap_coun_add
      • Pap_attach_nav_btn
      • Pap_attach_nav_img
      • Pap_attach_nav_intro
      • Pap_dnd_just_edit
      • Pap_dnd_reason_sel
      • Out_pat_ff_ma_miss
      • Out_pre_ff_ma_miss
      • Outcome (tinyint 1)
      • Out_correct (tinyint 1)
    • Renamed the following fields
      • Attachment_open to pap_nav_at
      • Attachment_used to pap_attach_open
      • Ff_pre_asked to ff_pre_def
      • Paq_answered to pap_pq_reply
      • Patq_asked to pap_pq_ask
      • Ff_pat_open to pap_nav_ff
      • Ff_pat_asked to pap_ff_def
      • Ff_pat_can to out_pat_ff_ask
      • Ff_pat_dont to out_pat_ff_dna
      • Ff_pat_must to out_pat_ff_ma
      • Ff_pre_can to out_pre_ff_ask
      • Ff_pre_dont to out_pre_ff_dna
      • Ff_pre_must to out_pre_ff_ma


  • Deleted dispense feedback views for fact finding and patient questions
  • Deleted OTC feedback view for fact finding
  • Added common view for fact finding feedback
  • Moved patient action pane js to common location
  • Removed old patient action pane js file
  • Added a bit of a hack to the usa common label generation code that handles the date format not being in the misc_data object.

5.0 Alpha 3

2016-03-07 | r880


Admin options section
  • Added communication responses sub menu item
Communication Responses
  • Added communication responses page
  • Lists all of the random communication responses currently in MyDispense.
    • Used by prescriber fact finding, patient fact finding, patient questions and counselling.
  • Can add / edit / copy and delete communication responses
  • Can Add new communication response types
    • Creating a new communication response type requires you to copy responses from an existing type as a base. After copying you can edit / delete the responses as normal.
    • Communication response types are used to customise patient responses to communications during exercises. The response type is selected during exercise creation.
    • An example of a response type would be a grumpy type. In this type patient responses would be curt / grumpy.
OTC exercise designer (all regions)
  • Removed medication lists from recommend outcome
    • Primary, Harmful, Secondary, Secondary harmful
  • Removed some feedback fields from recommended outcome
    • Instructions, correct outcome feedback, inappropriate medication feedback, harmful medication feedback
  • Added treatment groups to recommended outcome options
    • Treatment groups allow for multiple medication groups to be defined in an exercise.
    • Each group contains a list of beneficial and harmful medications for that group, along with feedback fields (medication instructions, correct, harmful, inappropriate / not selected).
    • Multiple treatment groups can be added to an exercise.
    • Medications can span treatment groups, but only if they are the same type (harmful medications in one group can’t be a beneficial medication in a another group)
  • Added add all medications from category button to OTC medication select
    • Clicking the add button will add all medications from the currently selected category to the medication selection.
    • You can then untick medications to remove them from the selection
    • Select the selected items only filter option to view your current selection


OTC exercises (all regions)
  • Removed comm_response_types_id requirement from patient question student responses (Comm Response table)
OTC feedback (all regions)
  • Added OTC exercise feedback
  • Separate feedback interfaces for Recommend, Do not recommend and outcome mismatches
    • An outcome mismatch is when the student recommends a medication when they should have not recommended a medication and vice versa.
  • Used feedback table to display fact finding feedback rather than <p> tags
    • Will probably port this over to dispense exercises too


  • Removed some old super admin functions in the Options controller. These were superceded a long time ago by the data update function.
  • Fixed common unescape string functions from only replacing the first instance of some commas. (Replaced with correct regular expressions)

Database updates

SQL update 121
  • Updated Patient Question comm_response levels 20,21,22 to have no comm_responses_types_id, as they are student responses, not patient responses.
  • Deleted level 0 patient question responses (patient questions disabled)
  • Updated metrics_otcs fields
    • Renamed out_ho_pri to out_ho_b
    • Renamed out_ho_sec to out_ho_h
    • Dropped out_ho_pri_harm, out_ho_sec_harm
    • Added out_ho_group_corr, out_ho_group_inc, out_ho_group_miss
      • Counts how many treatment groups were correct, incorrect and missed
  • Added metrics_otcs_groups table
    • Tracks usage of each of medication in an exercise
    • Tracks whether the medication was matched in a group and whether it was harmful, beneficial or not in a group
    • Data can be used to create data selection trends. Compare # of selections vs. the number of exercises completed and so on.
    • Fields
      • id, metrics_otcs_id, user_id, exercise_id, medications_otcs_id, index, type, created

5.0 Alpha 2 update 2

2016-02-23 | r872


All exercises
  • Added exif orientation support for image attachment uploads.
    • Supporting iphone / mobile phone images and correctly rotating images on upload.


OTC exercise (all regions)
  • Fixed PPDF icon display on attachments gallery overlay
  • Included new OTC shelf background image
  • Separated ‘no medications selected’ text from ‘finish’ button and text to display them separately
  • Added wrappers around product images to give them background

5.0 Alpha 2

2016-02-22 | r869

Fact finding responses

Fact finding responses are random responses or prompts that are displayed as part of prescriber fact finding, patient fact finding and patient questions. Messages such as what the prescriber says when they pick up the phone and so on.

Patient question responses have been expanded responses for the before and after patient lists. (See appendix A for a full list of fact finding responses). A category system has also been added for responses. It is now possible to create and manage varying responses and select the response type for the patient when creating an exercise.

An example of a response category would be a patient who can not speak english. The response category would be filled with responses where the patient can speak little to no english, rather than using the default responses where they would reply with perfect english.

Fact finding responses will be managed in the Patients section in Admin.


  • Added walk in patient option in Admin.
    • Walk in patients do not appear in the dispensing software in the computer
    • Thus walk in patients can not be searched for or have dispensing records / patient notes made about them.
    • Walk in patients can not be used in Validation and Dispense exercises, only OTC exercises
Dispense and Validation exercises
  • Added filtering to exclude walk in patients from Patient selection
Dispense and OTC exercises (all regions)
  • Added support for jpegs when uploading attachments
    • Jpeg’s are automatically resized to fit 900w x 600h px and a thumbnail is generated when the image is uploaded.
Validation exercises (all regions)
  • Fixed medication forms not being loaded for some medication select dialogs
    • Would cause a silent hang
  • Split prescriber and medication select code into separate region files
Validation exercises (USA)
  • Removed references to medicare and concession types when selecting patients
  • Fixed bugs related to region data when selecting patients and prescribers
    • These bugs were causing the application to hang on a JS error. Thanks Lisa!
  • Removed references to S8 in medication select
  • Fixed Rx medication select bugs
  • Removed references to S8 when selecting Rx medications
OTC exercises (all regions)
  • Added walk in patients to patient select screen
  • Added walk in patient search option to patient select screen
  • Added support for walk in patients
    • Dispensing records and patient notes section automatically hide when a walk in patient is selected
    • Existing dispensing records and patient notes are discarded on exercise save.
  • Added students cannot reset exercise option
    • Would default to not able to reset without the option present
  • Added support for updated patient communication tables
    • Note that existing fact finding and patient questions have been broken by this update. Fact finding and patient question data will need to be recreated.
  • Added medication and patient region data code
  • Added USA patient communication section region structure
  • Changed recommend a medication reference in Patient Questions to select a medication from the shelf for before and after patient questions.
OTC exercises (USA)
  • Removed references to medicare and concession types when selecting patients
  • Fixed bugs related to region data when selecting patients and prescribers
  • Fixed dispensing record copy bugs
  • Fixed Rx medication select bugs
  • Removed references to S8 when selecting S8 medications
  • Removed reference to medicare number in patient ID query section
OTC medications create (all regions)
  • Added image no drop down box
    • Allows the number of sides the product will have to be selected from a drop down list. Values: 1-6.
    • Selecting a value will display the # of image upload fields
    • Smart JS will only add / remove what is selected in the box, retaining values.
      • Note that if a side is removed the value it had before will be lost
  • Added backend support for image no
    • Simplified OTC medication image config
      • The number of images in the config are generated at run time, so existing image validation / upload functions could be used
    • Added checks for the # of existing images vs. currently selected side. If images are removed, the images will be removed from the server (keeping things neat).
OTC medication management (all regions)
  • Updated activate medication code with support for image_no checking.


Validation exercises (All regions)
  • Fixed a bug in validation feedback where the date missing fault would be flagged as missing.
    • Validation check for missing (mi) included an incomplete flag (in) instead, causing it to be displayed incorrectly.
  • Added metric that counts total number of correct script outcomes selected in the exercise
  • Added individual script level metrics, one record is stored for each script in a validation exercise.
  • Fixed medication name display for dispensing record medications
    • Previously did not display strength, form and brand postfix after the name.
    • Fixed in patient history list and in patient history preview
  • Added medication name scaling to patient history label preview
  • Added region files for the patient information panel
Validation exercises (USA)
  • Fixed bugs with patient and prescriber region data
  • Removed references to medicare and concession numbers and types
Dispense exercise (All regions)
  • Added patient question pushy patient dialog to Do Not Dispense handover.
    • If you try to finish the exercise using Do Not Dispense and pushy patient is enabled and flagged (you haven’t asked the patient any questions), the patient will prompt you to ask a question, instead of just finishing the exercise.
    • Basically duplicating the functionality for Dispense.
  • Added medication name scaling to patient history label preview
  • Added hidden full_name field for Prescriber and Patient tables.
  • Updated Prescriber and Patient search to use the full_name field instead of doing individual searches on the first name and last name.
    • Searches for patients or prescribers now take into account the full name, instead of an individual name.
    • Previously searching for “Ari Contos” would return no results, even if there was an Ari Contos in the patient database.
    • Now if you search for “Ari Contos” it will return the expected results.
    • Searching for partial first or last names functions as normal.
    • Caveat: If there is extra whitespace in the name, it will be required for the search. Hence Amrita Aman getting a note in the SQL update.
  • Changed patient history dialog draggable handling
    • Instead of creating and destroying a draggable object each time the dialog is opened, the draggable is now only created once. When the dialog is closed it is not deleted from the DOM, thus the dragggable does not need to be recreated on open.
    • Draggable creation and close event listener are now applied in the ready function of dispense.js
  • Removed attachments draggable pane
  • Added new attachment dialog
    • Gallery of items
    • Supports images
    • PDF’s now rendered inline instead of opening in a new window/tab
OTC Exercise (all regions)
  • Added OTC exercises
  • Added background support for OTC exercises (url does not change, similar to validation exercises)
  • Features new OTC product selection interface:
    • Introduces product category selection
    • Introduces full width shelf view with product preview dialogs
    • Multiple product preview dialogs can be open at one time which are draggable within the interface. This helps multiple products to be compared side by side.
    • Product preview dialogs include an image gallery, introduces support for viewing more than one side of a product
    • Product preview images can be zoomed in using the zoom slider so that details on product packaging can be seen
  • Features new Patient Actions Pane:
    • The patient action pane replaces existing exercise handover pane. In addition to ‘handover/recommend OTC’, ‘do not dispense/do not recommend’, ‘patient questions’ and ‘counselling’, it also includes ‘patient fact finding’ and ‘attachments’. The introduction of ‘patient actions pane’ removes handover button from the taskbar. This action is moved inside the pane.
    • ‘Attachments’ display have been overhauled to display inline in the browser instead of in a separate window. Clicking an attachment displays the attachment gallery in an overlay, in which images and PDF files can be viewed. The images are limited to 960px in width or 600px in height.
    • ‘Fact finding’, ‘counselling’ and ‘patient questions’ conversations are gathered together and are displayed on shopfront with the patient rather than being listed under different dialogs.

Database updates

SQL update 120
  • Add walkin field to patient table (tinyint, default 0)
  • Create metrics_checks_scripts table
  • Add ex_scripts_correct field to metrics_checks table
  • Convert existing int and tinyint count fields in metrics_checks table to unsigned ints where applicable
    • exercise_time, script_nav, script_dec_change, script_dec_cor, script_dec_inc, script_fau_back, script_fau_sel, script_fau_rm, info_open, info_hist_open, script_open, ref_open, ref_used, note_open
  • Add ff_responses_types table
    • id, name, created, modified
  • Added ff_responses_types field to ff_responses table
    • Ties into new ff_responses_types table so custom types can be created
    • Added index too
    • Inserted ‘default’ type (id 1)
  • Updated ff_responses to type 1 where they aren’t type 0.
    • (Converted patient question and patient fact finding responses to type 1 (default)
  • Deleted some inappropriate patient fact finding responses
    • ID’s 49,51,54,52, 57
    • Copy of removed items can be found in 120.sql
  • Updated the level of various Type 1 responses (See appendix A for response types)
    • Level 1 to level 4
    • Level 40 to level 22
    • Level 41 to level 22
  • Inserted new responses
    • Type 1 level 1 (3 new)
    • Type 1 level 2 (4 new)
    • Type 1 level 3 (3 new)
    • Type 1 level 4 (3 new)
    • Type 1 level 20 (2 new)
    • Type 1 level 21 (3 new)
    • Type 2 level 0 (3 new)
    • Type 3 level 0 (New type and level. 2 new responses)
  • Drop medications_otc table
  • Create medications_otc table
    • Dropped is_generic, strength, generic_name, brand fields.
    • Added active_ingredient field.
  • ff_categories
      • Renamed ff_categories table to comm_categories
  • ff_responses
    • Renamed ff_responses table to comm_responses
    • Renamed ff_responses_types_id field to comm_responses_types_id
    • Recreated index for comm_responses_types_id
  • ff_responses_types
    • Renamed ff_responses_types table to comm_responses_types
  • ff_questions
    • Renamed ff_questions table to comm_questions
    • Renamed ff_categories_id field to comm_categories_id
    • Moved response field
    • Set response and feedback field encoding to UTF8
    • Updated type field values to numbers
      • ‘Can Ask’ = 0
      • ‘Must Ask’ = 1
      • ‘Do Not Ask’ = 2
      • ‘pat’ = 2
    • Changed type field from varchar 20 to tinyint 2
    • Renamed type field to outcome
      • Outcome stores the outcome of asking the question
    • Add type field (tinyint 2)
      • The type field stores the type of question.
      • 0 = fact finding
      • 1 = Patient Question
      • 2 = Custom patient fact finding question
    • Rename availability field to order
      • Essentially making the purpose of the field clearer
    • Delete comm_questions that have an exercise id of 0
      • Orphaned data essentially
  • comm_answers
    • Create comm_answers table.
    • Designed to supercede the factfindings and patient_answers tables.
    • Contains all fields from patient_answers table. Data update 32 imports data from factfindings and patient_answers tables.
    • Fields
      • id (int 11 index)
      • user_id (int 11 index)
      • exercise_id (int 11 index)
      • comm_questions_id (int 11 index)
      • response (text)
      • mark (float 20,2)
      • created (datetime)
      • modified (datetime)
  • Create metrics_otcs table
    • metrics table for OTC exercises
    • Fields
      • id (int 11 index)
      • exercise_id (int 11 index)
      • user_id (int 11 index)
      • loaded (tinyint 3)
      • browser (varchar 255)
      • version (varchar 255)
      • ex_time (int 9)
      • ex_start (datetime)
      • ex_end (datetime)
      • ex_obj (text)
      • out (tinyint 1)
      • out_correct (tinyint 1)
      • out_ff_ask (tinyint 3)
      • out_ff_dna (tinyint 3)
      • out_ff_ma (tinyint 3)
      • out_ff_ma_miss (tinyint 3)
      • out_ho_pri (tinyint 3)
      • out_ho_sec (tinyint 3)
      • out_ho_pri_harm (tinyint 3)
      • out_ho_sec_harm (tinyint 3)
      • out_dnr_reasons_corr (tinyint 3)
      • out_dnr_reasons_miss (tinyint 3)
      • out_dnr_reasons_sel (tinyint 3)
      • disp_open (tinyint 3)
      • disp_search_name (tinyint 3)
      • disp_search_addr (tinyint 3)
      • disp_search_medi (tinyint 3)
      • disp_sel (tinyint 3)
      • disp_hist_open (tinyint 3)
      • note_open (tinyint 3)
      • note_edit (tinyint 3)
      • ref_open (tinyint 3)
      • ref_view (tinyint 3)
      • otc_open (tinyint 3)
      • otc_cat (tinyint 3)
      • otc_page (tinyint 3)
      • otc_med_open (tinyint 3)
      • otc_med_open_multi (tinyint 3)
      • otc_med_drag (tinyint 3)
      • otc_med_slide (tinyint 3)
      • otc_med_zoom (tinyint 3)
      • otc_med_zoom_drag (tinyint 3)
      • otc_med_sel (tinyint 3)
      • pap_open (tinyint 3)
      • pap_nav_ff (tinyint 3)
      • pap_nav_pq (tinyint 3)
      • pap_nav_co (tinyint 3)
      • pap_nav_at (tinyint 3)
      • pap_nav_ho (tinyint 3)
      • pap_nav_dd (tinyint 3)
      • pap_ff_query (tinyint 3)
      • pap_ff_def (tinyint 3)
      • pap_ff_man (tinyint 3)
      • pap_pq_ask (tinyint 3)
      • pap_pq_reply (tinyint 3)
      • pap_pq_q_b (tinyint 3)
      • pap_pq_q_a (tinyint 3)
      • pap_coun_add (tinyint 3)
      • pap_attach_open (tinyint 3)
      • pap_attach_nav_btn (tinyint 3)
      • pap_attach_nav_intro (tinyint 3)
      • pap_attach_nav_img (tinyint 3)
      • pap_dnd_just_edit (tinyint 3)
      • pap_dnd_reson_sel
      • created (datetime)
      • modified (datetime)
  • Set users_login table engine from MyISAM to InnoDB
  • Set users_logins table character encoding from latin1 to utf8
  • Set metrics_labels table engine from MyISAM to InnoDB
  • Set exercises_students_opens table engine from MyISAM to InnoDB
  • Set exercises_students character encoding from latin1 to utf8
Data update 31

The search field update revealed that some patients and prescribers have whitespace in their names. Data update 31 finds the patients and prescribers that have the extra whitespace and eradicates them using the trim function.

This is done purely so that the updated search system for patients and prescribers works correctly.

Data update 32

Communications table restructure

Takes data from factfindings and patients_answers tables and inserts it into the comm_answers table. Factfindings rows are matched with the comm_question row for the question and have a comm_question_id set.

Then deletes factfindings and patients_answers tables.


  • Moved exercise label generation javascript to new common file.
    • exercise_label_structure_generate_<region>.js . Located in region js root folder, as label structure is still region dependant.
  • Deleted old fact finding model files
    • FfResponse, FactFinding, FfQuestion, FfCategory and PatientsAnswer
  • Added new models for patient communication tables
  • Added svn ignore to all files inside webroot/uploads/image
    • Destination folder for image attachments

Appendix A

FF Response table types and codes

Type 0 – Prescriber fact finding


    -1    Called correct prescriber, but prescriber FF not enabled.

    0    Called wrong prescriber

    1    Prescriber picks up phone    (requires prescriber to be FF enabled)

    2+    Prescriber grumpy responses (as level increases, Prescriber grows more irate)

    100    Prescriber no longer answers the phone (grumpy cut off)


Type 1    – Patient Questions

Patient responses

    0    Patient questions not enabled

    1    No questions before medication

    2    No questions after medication

    3    Finished before questions

    4    Finished after questions

Student prompts

    20    Prompt for another question

    21    Initial prompt for questions (before)

    22    Initial prompt for questions (after)

Type 2 – Counselling responses

    0     Patient response to counselling

5.0 Alpha 1

2016-01-14 | r864

Data updates

SQL update 119
  • Add ellipse data field (TEXT) to the following tables:
    • Prescriptions
    • MedicationsPrescriptions
  • Add type field (INT 3) to exercises table. Determines type of exercise
    • 0 = Dispense
    • 1 = Validation
    • 2 = OTC (eventually)
  • Add exercise_data (TEXT) to prescriptions table
    • Used to store fault and outcome data for validation exercise
  • Add medication_forms_id (INT 11) to medications table
    • To be used to connect medication forms to a list table instead of directly storing form and form_abbr in the medications table.
    • Added index to medication_forms_id
  • Add medication_forms table
    • Table to store medication forms and abbreviations
  • Add medications_otc table
    • OTC medications table
  • Add medications_otc_categories
    • Simple table to list OTC category names and ID’s.
  • Add metrics_checks table
    • Metrics table for validation exercises
Data update 30

Populates new medication forms table using existing forms in the medications table. Then updates medications with the correct form id in the new table.

Note that existing medications do not fully use the new medications_forms table yet. Full support still needs to be added. Changing / updating medication forms will grab the form from the medications_forms table however.


  • Renamed medication controller to medications controller.
  • Existing medications have been renamed to Rx Medications due to the introduction of OTC medications.
  • Changed default landing page URL to /medications/rx
  • Added sub menu to medications section
    • Rx Medications (existing medications)
    • OTC Medications (for upcoming OTC exercises)
    • OTC Categories (managing how OTC medications will appear)
    • Forms (edit and add new medication forms)
Rx medications
  • Internally all references to medications have been changed to rx. Example: medication.ctp -> medication_rx.ctp.
  • Added new URL for Rx Medication landing page and create pages
    • /admin/medication/ => /admin/medications/rx
    • /admin/medication/create => /admin/medication/rx/create
OTC Medications
  • Added OTC medications index page.
    • Manage and search for OTC medications.
    • Activate / deactivate OTC medications
    • URL : /admin/medications/otc
  • Added OTC medications create page
    • Create and edit OTC medications
    • URL: /admin/medications/otc/create
    • Most fields and systems similar to Rx medications (generic naming system is the same)
    • Image requirements for OTC medications are different.
      • Requires images from each side of the product (6 sides). In two different sizes.
        • Preview (PNG) (max size 310×310)
        • Zoom (JPG) (max size 1600×1600)
      • A thumbnail (max 100×100) will be generated from each preview image.
      • 12 images needed to create an OTC medication through the create page. 18 images in total will be used
OTC Categories
  • Added OTC categories management page
  • Allows for search and viewing on OTC categories
  • Add / Edit OTC categories in page.
  • Uses custom URL. /admin/medications/otc/categories
Medication Forms
  • Added medication forms management page
  • Allows for search and viewing of medication forms
  • Add / Edit medication forms in page
  • URL: /admin/medications/forms
  • Existing exercises have been renamed to Dispense exercises.
    • URL has changed from /admin/exercise/create to /admin/exercise/create/dispense
    • Internally all exercise references have been changed from exercise to exercise_dispense.
    • Dispense exercises have been assigned a type of 0.
  • Added Validation exercise type.
    • URL: /admin/exercise/create/validation
    • Referred to internally as script_check or checker.
    • Validation exercises have a been assigned a type of 1.
Validation exercise
  • Create a series of prescriptions which may have faults with them.
  • Scripts may be correct (no faults) or may have multiple faults.
  • Uses existing script errors (hiding fields) and other technical errors.
  • Added new system to prescriptions to circle fields (ellipse) to highlight selected errors.
  • Exercise outcome / data is done per script, with prescriptions containing their own fault data in the exercise_data field.
  • Essentially compressed 60% of the Dispense exercise designer into a single pane.
  • Fault configuration
    • Faults are configured in region data, with fault fields and fault configuration.
    • Fault fields define groups and faults, with the actual description and labels of the faults.
    • Fault configuration is per script and defines boxes on the scripts which link to the fault field config.
      • Note that the fault config can define a whitelist of groups that will be used in the fault field config to remove fields that don’t appear on the script.
      • Things like patient weight and so on, which only appear on the Australian hospital script. Check out the hospital config in the australian region data for an example.
      • Thus script specific groups and fields can be added to existing groups (like Patient and Prescriber) without all those fields appearing everywhere. Nor do we have to duplicate the field config either, which is nice.
  • NOTE: There is no support for assessments in validation exercises yet.
  • Added create validation exercise button
  • Renamed add exercise button to create dispense exercise


  • Overhauled brush system
    • Brushes are now loaded and stored in an array so they can be swapped out.
    • Example: Swapping out an ellipse brush to draw a line using the endorse brush
  • Added ellipse system
    • Uses bitmap brushes to draw circles around fields
    • Mostly piggybacks the endorse line drawing system by using the same field_bounds variables.
    • However, the boundaries used are altered to fit the imageellipse function requirement, which draws from the centre of X and Y values. Thus the middle of the ellipse is calculated from the bounding bound of the field and drawn.
    • In some special cases (where a field is hidden, but the space is still there (like a medicare #)) the ellipse function will create a new ‘bounding box’ object from the max width of the field and draw over the empty field.
      • This makes the render look a lot nicer, however it cannot be accomplished on hidden fields where the non-rendered space isn’t preserved.
    • Medication names have a special decoupling flag (ellipse_separate) to force fields to be ellipsed separately. Due to piggybacking on the endorse strikeout system, ellipse’s are joined when multiple subfields are selected in a multi field render.
      • The addition of the ellipse_separate command forces each field to be rendered separately even if all subfields are ellipsed. This behaviour may cause problems if (when) endorsements are introduced, but that is further down the line at this stage.
    • There are a few custom ellipse renders which are noted below:
      • Script type on all australian scripts (PBS / RPBS). Not in use however.
      • X Field output (output field object function)
      • single field output (output field object function) (when field is empty)
    • Ellipses tie into the script field config and use the same name as endorsements.
    • Unlike hiding or endorsing fields, ellipses require that a value be set in the database. (other systems default to 0 or 1).
      • Ellipses render in different colours based on their value, which are as follows:
        • 1 = Selected (purple)
        • 2 = Missed (red)
        • 3 = Found (green)
      • Ellipses displayed via the get method of generating a script (in exercise designers (no prescription ID)) will display all ellipses as found (green).
      • Ellipses set in the validation exercise editor are saved with a value of 2 and thus by default will display red in feedback.
      • Feedback combines ellipse values saved in the exercise designer with the ellipses the user has selected in their exercise. User ellipses are weighted as 1 (selected) and admin ellipses as 2 (missed)
        • If the user has selected an ellipse set in admin, the user value will be added to the admin value, (2+1) resulting in 3. The ellipse is then displayed in green, the correct feedback.
        • Thus prescriptions do a little work in displaying ellipse’s in feedback. Ellipses generated without a feedback code will be displayed as selected (1 / purple).
        • Internal quick ref:
          • parse_get_data ellipse == 3
          • parse_db_data (requires feedback code), ellipse = 2 (stored in ellipse data)
          • parse_get_endorse == 1. Combines with existing data (requires feedback code and db_data)
          • NO STUDENT ellipse_data is stored. Feedback generates an ellipse get string, which displays student selections (which are combined with admin selections in the prescription generator)
  • Added sub-field hiding for prescription date
    • Uses custom code in parse_error_script_data function to read alt_script_date sent to the prescription generator.
    • The prescription date format is then taken from the system config and split into an array. The fields selected as hidden are then used to remove the subfields from the date format.
      • Example: if the year (Y) is to be removed from the date, then the date format would go from ‘Y m d’ to ‘m d’.
    • The new shortened date format is then sent to the date format function, resulting in a date with fields missing.


  • Added support for validation exercises.
    • Known internally as script checker
  • The url for exercises has not changed (/exercises/<id>). Internally the exercise data is pulled down and the type of exercise is read. Then the appropriate exercise type function is run, all transparent to the user.
    • Thus internally, dispense exercises run from exercise => exercise_dispense and validation exercises run from exercise => exercise_script_checker
  • Added support for validation exercise feedback.
  • Added function redirection for dispense and validation exercise types. Same url system as above, applies for both HTML and PDF feedback


  • Renamed exercise_designer element view folders to exercise_create_dispense
  • Added script_checker folders (exercise_create_script_checker)
  • Added otc folders (exercise_create_otc)
  • Added new ellipse brush image in /app/assets/prescriptions
    • ellipse_tip_found.png (3)
    • ellipse_tip_missing.png (2)
    • ellipse_tip_select.png (1)
  • Added new OTC medication base image folder (/webroot/img/medications_otc/)
  • Removed renamed folders
  • Updated aus_region_data with new exercise vars
  • Updated usa_region_data with new exercise vars
  • Added directories to svn_ignore
    • Patients, Patient images, prescribers and OTC medication image directories
    • PDF, MP3 and exercise upload directories