History of ScriptBase
Work on ScriptBase began in 1990 when the author was working as a drugs worker at "Response" - a community drugs team in Camden, North London. With the HIV epidemic hitting hard there was a concerted effort to increase the availability of Opiate Substitution Therapies and the small team was struggling to cope with handwriting all the prescriptions. It quickly became clear that ScriptBase enabled safer handling of larger prescribing caseloads and there was likely to be wider demand for the software. ScriptBase became the first commercially available software developed specifically for the UK addictions sector.
Over the following 25 years the author continued to update the software whilst also working full-time in the substance misuse sector. He has held Director level positions in a number of organisations including Alcohol Concern, Phoenix Futures and SMART Recovery - and sat on the Advisory Council for the Misuse of Drugs for a period of ten years.
Since 2015, he has worked full time on ScriptBase and other IT projects related to the substance misuse and social care sectors.
Release History
This is a summary of the changes introduced at each revision of ScriptBase. It is for reference only, though may be helpful if you have recently started using an upgrade of the program and wish to check what changes were introduced. Check the version number of the program in the About box, from the Help menu of ScriptBase itself. See end of this topic for an explanation of the version number system.
4.20 – November 2026
This is a major update to the application, though most changes will not be visible to the end user. The software development platform has been upgraded, with several months of code reviews and ‘deep dive’ refactorings. This is a massive modernisation of the application code. Many subtle bugs have been fixed and an automated test suite of over 2,500 checks is run before every build. The application is now available as a 64-bit build, which makes better use of modern hardware and should be used where compatible.
Under the hood
- Optional 64-bit build
- Upgraded language / library / database versions.
- Performance optimisation of key routines makes the application more responsive.
- Robust test coverage with > 2,500 checks on application logic.
- New floating point number comparison algorithm, with defined tolerance.
- New and provably robust dose-to-words routine used throughout.
- Dozens of subtle memory and handle leaks resolved.
- New checks to detect incompatible regional settings, more robust data backup / restore procedure.
User interface
- The help file now works even when ScriptBase is run from a network share, resolving a long standing problem with Microsoft networks refusing to display remotely hosted html based help files.
- Unit sizes: the spin buttons no longer step twice.
- Auto reduction: the duplicate 'end of auto reduction' message is gone.
- The prescriber list and edit form have been redesigned on the same pattern as the drug list; Bug fixed so the prescriber type can no longer revert on save.
- The default pharmacy selector in Options improved and remembers its selection.
- A single permissions matrix decides who may do what, and it is checked at every level including the script grid itself.
- The CSV export escapes quotes, separators and line breaks correctly.
- The address stamp is properly stored and printed as rich text, so bold prints as bold.
- Two 'Print Test' buttons in Printer Settings print a sample prescription without needing a script, and show the selected printer's hardware metrics for diagnosing alignment.
New prescription safety checks
- Checks to ensure that a negative dose in any instalment is blocked through validation.
- Checks to ensure that a zero daily dose, a zero 'reduce by' value and a prescription of zero days-length are rejected through validation.
- Checks to ensure that where the chosen date / dose combination cannot be properly resolved the prescription is blocked through validation.
- Stable dose custom pickups: a new warning when the pharmacy's close days force the instalments into a single pickup; a new error when doses are missing from the list.
- Stable dose daily pickups: a script longer than the maximum allowed days is now blocked through validation.
- Pharmacy holidays: bug fixed where a second pharmacy closed on the same date as the first was treated as open. A pharmacy with no closure type recorded is no longer treated as open and this is checked when building a prescription.
- A warning when the close-day calendar does not cover the whole span of a script.
- A drug whose controlled-drug status is unknown is blocked by validation.
- A prescription with prescriber who cannot be resolved is blocked by validation.
- Variable-dose custom-pickups prescription without all the required instructions to clients is blocked by validation.
- Checks to ensure that the dose handling for multi-drug scripts can be standardised to the smallest available unit and block by validation if it does not.
- 'All scripts must use this pharmacy' and 'all scripts must be signed by this prescriber' settings are now enforced by validation.
- Every validation rejection now carries its own code rather than some sharing '999', so the message on screen says which rule failed.
Printing and Rx Layout
- 'CD' is printed after the product name for Schedule 2 and 3 controlled drugs, as the NHS overprint specification requires.
- Prescriber codes (DIN/PIN) are recorded for each prescriber, validated for the prescriber types that must have one, and overprinted on the prescription.
- Script Series: a print run no longer stops at the end of a series that was not marked to go on hold.
- The margin model is now measured from the printable origin, with a one-time reset of stored margins on first run; negative margins are allowed where a printer needs them.
- An additional prescription validity check is run just before render, not just when the print buffer is filled. This is an additional safeguard against printing inaccurate prescription.
- If a print run is abandoned part-way, the print run now stops and records the fact, releases its locks, tidies up the screen on failure and lets the operator record what the printer actually did.
- Resolved bug that some instructions were not printed.
- The print, archive and costing sequence is now a single transaction; the archive record no longer clips the pharmacy name; a combination-dose cost can no longer silently record as £0.
Data, backup and upgrade
- Before any database restructure the program takes a backup and verifies it. If an upgrade is interrupted, the next start detects it and restores the safety copy automatically; a stale marker left by a healthy upgrade is cleared and reported, never used to roll back a good database.
- Client-server sites now back up, verify, list and restore through the server rather than from the workstation. Backups are kept to the number the site asks for in both deployments, and the backup settings page says what a workstation actually controls.
- A failed backup is reported rather than silent, and the tables are reopened whether or not it succeeded.
- Table repair is a separate module that produces a report; an unreadable table version is treated as needing upgrade rather than crashing; the progress window stays hidden on unattended runs.
- Record locking: the worker lock is claimed with a compare-and-swap against disk; a prescription's lock is claimed before it is deleted; copying a script is abandoned cleanly if the client picker is dismissed.
- Client and episode deletes now run inside a transaction and tell the operator if they did not happen.
NDTMS and TOPS
- Submitting blank mandatory fields is an explicit choice rather than the default.
- The statutory return file is produced by a separate tested module, pinned against a reference output.
- The TOPS export is gated on validation, and the validator no longer wipes its own messages.
- Date-window checks are leap-year aware and the messages match the checks; the export builders no longer read past the start of an empty episode list.
4.18 July 2024
A maintenance release with no new features.
Bug fixes
- Major revision to the script series logic improving end date logic.
- Fixed problem with stable dose - custom pickup scripts which calculated the last dose cumulatively triggering error.
- The reduction panel of the script editor now shows the dispense unit beside the 'or dose' field.
- Client Server version sbase_server has been rebuilt with an updated buffer setting.
4.17 March 2022
New features
- 'Bottle' added as a dispense form.
Bug fixes
- Deleting a pharmacy caused an error.
- Custom pharmacy dates (pharmacy-specific close days) were not being picked up.
- Script Series was not displaying the graph correctly.
- A series reduction now correctly puts the script on hold at the end of the reduction.
- Stable dose custom pickup scripts are now compatible with Series reductions.
- Dose up and down buttons were not populating the script correctly.
- Double-click editing of a dose with custom pickups wrongly reported that the custom doses were not multiples of the dose.
4.16 December 2021
New features
- Allow Schedule 5 drugs to be up to 60 days in length
- Add pre-filled syringe as an option for drug dispense formulation
- Change script wording to "Dispense in a single instalment" from 'single dose'
- Improve logic of prescriber use – consistency between settings and script editor.
- Added 'Replace keyworker' tool under utilities menu
- Added patient name as search option in 'view archive'
Bug fixes
- Printing summary labels sometimes crashed with memory table error
- Options pages for pharmacist and holiday now list in the correct order
- NDTMS content was not being hidden even if NDTMS support turned off
- Auto backup on shutdown sometimes crashed with #10498 insufficient rights
- Unable to delete prescribing doctor even if they have no Prescriptions
- Wrong documentation about Report Builder
- All scripts must be signed by particular doctor now changes doctor correctly
- Several bugs in filter options on main screen – such as select pharmacy
- Browse scripts by due date did not update screen correctly
Changelog for 4.15 October 2019
Major performance increases (roughly 8 x faster for most operations) on networked versions. This is achieved by 'caching' or storing more data on the client machine in order to reduce calls across the network. The new benchmarking tool (on the utility menu) makes it easier to diagnose performance bottlenecks. This release also fixes a number of bugs which arose after the client-server implementation.
- Massive performance gains by moving lookup tables to memory
- Fixed bug Report Builder again offering data tab
- Memory manager tuned using benchmarks
- Added performance benchmarking routines
- Fixed several sanity check errors
- User can now load script which has semaphore lock for him / herself
- Fixed bug where batch print run not correctly selecting workers scripts
- Repair tables meters now smooth
- Print script buttons now have more consistent behaviour
- Fixed occasional error on preview script
- Bug reporter now correctly returning reports
Changelog for 4.14 – 13 August 2018
- Upgraded the database engine which should improve performance
- Upgraded the memory manager which should improve performance
- Data server installer provides menus to install, start and stop the service
- Data server stores logs in application data folder, avoiding permission problems
Changelog for 4.13 – 03 May 2018
- Improved handling of ini files, including default values and error handling
- Installer runs ScriptBase at the end, so first run is with admin permissions
- Improved wording on the 'purchase' screen.
- Fixed bug if user tries to extend trial period twice.
- Improved handling of encryption settings for Client Server mode.
- Prevent deletion of database in Client Server mode
- Fix to allow client and server to share same IP address
- Allow two copies of ScriptBase to run at the same time – using different server
4.12 - February 2018
- The Client-Server mode is by far the largest change.
- Over 40 new 'sanity checks' to ensure integrity of data when editing or printing prescriptions.
- Improved editing of doses, you can double click the dose to change the dose without ScriptBase checking / correcting for a configurable period; See Options | Setting | All | Misc to configure this value – default 1500 ms – ie. 1.5 seconds.
- Changed the way that settings are stored for 'This Computer' under Options | Settings. This should reduce the likelihood of settings being lost and will allow printer settings to work properly under remote desktop solutions such as Citrix.
- New setting to disable and hide the NDTMS / Tops modules if not used.
- New ability to run sbase.exe with /REPAIRSILENT switch, to run the repair tables utility without loading the application interface. This can be used to set up a scheduled task to make sure that repair tables is run regularly.
- New setting to change the 'buffers' used by the database. This increases memory usage but greatly improves performance over a network. The default value has been set to what we believe is optimal in most circumstances.
- Increased the amount of memory that the application can use, if available, which will improve performance.
- Upgraded most of the third party components and libraries used within the application. This has improved stability and speed.
- Upgraded bug reporting mechanism which no longer relies on email to send in reports.
- New optional setting to localsettings.ini – LogPath which is location of error log. This is mostly useful when using Client-Server mode because the database folder is no longer directly visible to the client. Improved error log viewer.
- New security feature to make sure Windows does not keep confidential data in memory after ScriptBase exits.
- New warning in client list if you change name or dob – in case it is an accident.
- New logging of errors, warnings and info events to the Windows Events log.
- Automatic restart after repair tables and database errors.
- Updated default Holiday, Drugs and Instructions for new installations.
- Fixed several compatibility issues with Windows 10.
- Fixed interface to show dispense form if the drug is to be dispensed in dose units.
- Fixed an intermittent 'floating point' error when editing doses.
- Fixed occasional crash when previewing prescriptions.
- Fixed minor bug on client form – which was briefly showing the wrong client name when you created a new record.
- Fixed occasional errors when opening and saving records in client list.
4.06 - May 2009
Added proper support for prescribing Buprenorphine/Naloxone (Suboxone). Added Suboxone to default drug database. New feature to allow restoring backup archive files from any location. Fixed problem when prescribing maximum doses of some tablets (eg. Acamprosate). Added default drugs section to the helpfile Minor tweaks to rx wording
4.05 April 2009
Many improvements to NDTMS interface - but not yet dataset F compliant Improved information in help / about Fixed problem with bespoke instructions showing in preview but not on actual scripts Fixed incorrect default dose unit for Sugar Free Methadone Fixed problem with printed labels, including squeezing more information on Fixed occasional problem when creating a new ScriptBase 4 database from within ScriptBase 4
4.04 March 2009
Re-worked Drug list to make it easier to use and improved error handling Changed Autobackup so it only runs once per day Backup automatically checks only one worker is logged in, before running Change client record to accept NFA in postcode Fixed password check for printing scripts from the edit screen Provided work around for windows problem of html help on networks Fixed trial countdown ticker not reporting accurate number of days Fixed occasional problem with 'extend trial' utility Fixed occasional problem with additional instructions not printing or not being removed. Fixed problem importing ScriptBase 3 data, sometimes reporting the data was not actually version 3 data Fixed X1 copy protection for machines on a network with different windows short date settings
4.03 December 2008
Fixed problem with some custom scripts for none tablet Rx causing error. Fixed problem with holiday calculations. Adjusted totals dose wording for tablets. Fixed minor problem when loading scripts with dose of zero. Fixed trivial problem with Pharmacy settings. Fixed trivial error on additional instructions page.
4.02 December 2008
Fixed problem with script alignment with printers that require forms to be 'center' aligned in the tray. Re-worked the printed script archive viewer, fixed a problem with the query builder that caused problem when filtering on dates. Same fix on the query builder on the main browse screen. Fixed problem with previewing and printing from within script edit screen.
4.01 November 2008
TOPS module added NDTMS updated to dataset E and validated with NTA. New casenotes records module. Support for Nurse and Pharmacist prescribers. Template system for new prescriptions. Report Builder to create / edit reports. Full support for sub doses, working out exact number of different tablet sizes needed to make up a particular dose. Improved handling of 'additional instructions'. New HTML Help system (not win NT or earlier than 98). Full XP / Vista compatibility. New strong encryption of data tables. Allows selection of different printer for interval and none interval Rx.
3.76 July 2007
To meet requests of some customers; change to allow different dispensing unit for total dose than for individual dose (so methadone mixture can be specified in mg doses, with total converted to mL).
3.75 April 2007
Introduced NDTMS dataset D - fully implemented including export, though still to be verified by NTA.
3.74 February 2007
Introduced new 'find scripts' utility (ctrl F) from main script browse. Improved script order listing. Added newly permitted instruction on dispensing missed doses. Added National Health Number to client record and to scripts. Added honorific (ms, mr etc) and Postcode to client record and scripts. Updated format for Private script forms after DoH Shipman review
3.73 November 2006
Fixed bug in network version. Improved stability of backups when on a network.
3.72 October 2006
Small bug fix to NDTMS feature. Fixed bug in registration module.
3.71 March 2006
Brought drug list costings up to date for new installers Small bug fix / GUI improvements (eg. Dispensing units alongside dose editor) Small fixes to NDTMS gizmo Minor upgrade to database engine, fixed problem with help file index.
3.70 March 2006
Improved handling of custom Rx. Change 'stamp' editing to allow bold (to meet ppa rules). Improvements to the Auto Reductions feature. Added finish date to bottom of Rx. Added number of (eg.) tablets to bottom of Rx. New database engine / Speed improvements / more stability. New backup engine, halves size of backup files. New registration system.
(This is a major upgrade, with lots more small changes not shown here. The version number has been 'step changed' to reflect this).
Beta 3.70 August 2005
This was a beta-release leading up to the major upgrade of 3.75. It was distributed to customers who had some compatibility problems with Windows XP and earlier versions.
3.09 May 2005
(there was also an interim release January 2004 with some of these features). Changes to move hospitals to Blue / Green Rx. Added holiday handling of stable dose custom Rx. Simplified licensing / upgrade system. Fixed various bugs: - with editing of a Rx - with the drug list, eg. unit size editing - with disappearing images.
3.06b May 2001
Added import / export routine for client list and printed script archive Main form now records it's 'state' (i.e. whether maximised or not). Fixed bug in autobackup, reporting 'system.dat' in use. Fixed bug of estimates of number of Rx to print being wrong. Changed buttons which were disappearing on some versions of Windows
3.06a March 2001
Additional setting to allow label printing threshold Improved handling of Private Rx Minor improvements to user interface; niggle fixing Fixed bug causing margin settings to be out Fixed occasional printer recognition problems Improvements to Auto-Reductions, and fixed problem when printing single reduction Rx Improved garbage collection of temporary data (will shrink backups a bit)
3.06 Dec 2000
Automatic Reductions feature added Big speed improvements to browse (almost double speed) Autobackup feature added to make backup copy of data when exiting ScriptBase Manual in Word format written Basic Tutorial in Word format written Properties page added to edit page, with Jotter, Archive and charts of regime history and projected regime Custom Query added to main browse and Archive Print run reports on any Rx put on hold, after printing, allows this list to be printed. Jotter fixed, also replaced with faster editor New reports added for lists of Pharmacies, Drugs, Clients and Workers New filter to show clients due for review (date set in client list). Button to print current browse Additional colour scheme information on the main browse, indicating auto reductions etc. New installations include drug list Improved behaviour if Windows shutdown with ScriptBase running Database engine upgraded, more solid so hopefully fewer corruption problems Fix tables improved
3.05 Jan / Feb. 2000
Fixed y2k problem · Speed improvements
3.04 August 99
Improvements to user interface, e.g.: · Client name remains static on browse so always visible. · Check Scripts Utility added to housekeep and check scripts are valid scripts. · Added colour coding of Rx belonging to current worker. · Added quick key commands to the browse (using CTRL + letter of the command). Added Quick restore utility to compliment the Quick Backup utility. Network support improved, with Network requirements removed for standalone version. Solved bug causing records to disappear after printing a single Rx. Solved bug causing Pharmacy and Dr information to be lost from Rx record. Solved bug causing error (ADDR missing) if Rx printed for client without an address. Access violation errors believed to be solved. EInoutError 32 error believed to be solved.
3.03 July 99
Editing script no longer requires redrawing the browse, resulting in huge improvements in operating speed File repair utility added, to fix any file corruption problems. Custom Scripts improved: · Wording of variable dose and daily dispense custom Rx splits dispensing information from client dosage instruction, so that a reduction regime can extend over Pharmacy close days. · Pharmacy closure date handling improved for all Custom and variable dose Rx. · Date edit defaults to logical next date on blank dates and invalid dates, making the writing of Custom scripts much easier. Fixed bug in Custom Rx when using decimal dose drugs. Password protection of Rx print run, can be turned off from the options / preferences page. Backup Utility interface improved and simplified. Quick Backup utility added, which performs a standard data backup to A: with no messing. Problems with Jotter fonts fixed.
3.02 June 99
Ability to change signing Dr at print time. Where drugs have a standard unit size, limit doses to multiples of that unit. Added Number of units to script wording (e.g. 10 tablets) Setting to put worker initials onto scripts Network locks developed, making ScriptBase network friendly not just compatible. Remove locks utility, to enable end user to fix after network crashes Fixed 'sde32.dll' missing error.
3.01a May 99
Fixed bug in the option to delete script. Fixed bug in the installation routine which used the wrong directory.
3.01 May 99
ScriptBase re-written from the ground up in Borland Delphi. Incomplete feature set, rushed out as a first draft for the April 99 target. Labels for the print run backup utility initial reports.
ScriptBase 2 - 2.1 - 1991 to 1998
ScriptBase 2 was a DOS based program written in Clipper, an xBase derivative language. This version (2.01 being the last release) sold over 40 copies until the end of 1998. In the last year, the program was released as effectively free, as the dreaded Year 2000 bug meant the writing was on the wall for this version.
Technology had also moved on, and it was no longer realistic to update and maintain this version. Additional, the NHS Executive announced in December 1998 that the prescription forms for interval dispensing would be changed the following year. I therefore decided to rewrite ScriptBase from the ground up, introducing features and technologies learnt about in the previous 8 years of the DOS version.
Understanding Version Numbers
The first number (currently 3) is the main version of ScriptBase. · The 01 indicates minor version. This increments with each version indicating that new functions have been added. · The letter (in this case 'a') indicates a bug fix release. So 3.01a has been upgraded just to fix a bug in 3.01.