Enovation: Open source software could save the NHS money - what better recommendation could there be? Steve Mathieson reports

he NHS is surely the ideal organisation to take advantage of one of the strongest trends in computing:

open source software.

After all, its staff are rarely in it just for the money. Ideas about service, collaborating for the common good and doing a good job for the sake of it are also important.

Open source software is often created - at least in part - as a service to the wider community (see box). In addition:

standard commercial software requires a paid for licence, whereas open source licences are free;

commercial software is usually sealed, unalterable and unviewable, whereas open sources'workings are visible and the authors encourage changes;

much (but not all) commercial software uses its own protocols, hindering the free passage of data, whereas open source software prides itself on sticking to published standards, improving compatibility.

Last month, the NHS Information Authority sponsored the second meeting of the open source healthcare alliance, a global body aiming to coordinate health sector use of the concept.

Nigel Bell, at that point still NHSIA chief executive, jokingly described open source meetings as having the confessional spirit of Alcoholics Anonymous. There was certainly fervour from across the Atlantic. The US Department of Veterans'Affairs, which provides healthcare for US military personnel and their families, has made extensive use of open source, building up its Vista suite of open source software over many years.

One of the main advantages of open source software was demonstrated when Vista competed with commercial suppliers in a tender from US military hospitals worldwide. The best commercial bid was a 66 per cent fit with the stated requirements and would have cost $2.6bn. The open source alternative was a 98 per cent fit and cost $1bn - it won and was installed on time and under budget.Vista software is also used by hospitals in Finland and Germany.

As the Department of Veterans'Affairs bid suggests, installing open source software may be cheaper than the commercial alternative, but it is not free. Installation and support costs money, regardless of whether the licence comes for nothing.

Dr David Chan, the Canadian developer of open source software and an assistant professor at McMaster University in Hamilton, Ontario, says this can present problems for the creator.

'People using the software think: It is free software, so It is free service, ' he says, detailing the difficulty he had in persuading people who acquired the software to train staff to use his system.

But the mere fact that the software is free can be baffling in itself. 'The government just didn't get it.

It just didn't understand why we didn't want it to buy anything, ' says Dr Chan.

NHS converts to open source have found similar problems.Dr Ray Henry, head of informatics for the Public Health Laboratory Service in Wales, couldn't find commercial software to track infection in hospitals, so he commissioned programmers to write InControl. This was successfully introduced to hospitals across the principality, and Dr Henry wanted to release it to health service units elsewhere.

He hit on a standard open source licence agreement, under which PHLS Wales would retain copyright, but allow free use and access to the source code, encourage modification and - crucially - release itself from providing support and liability.

He got board approval for giving InControl to whoever wanted it. 'What happened? Lawyers, ' he says. PHLS's legal officers would not allow the use of a standard contract. 'We are writing our own licence. The joke is, if it [the legal bill for the licence] goes on for much longer, it will cost more than the programming.'

Furthermore, the licence - which has delayed release of the software for six months already - will restrict distribution of InControl to the UK health service, through NHSnet. Dr Henry has also had to pay extra for licences for software used to produce InControl (the software had been properly licensed, but only by the sub-contractors, rather than PHLS Wales - perfectly proper behaviour, until the issue of giving away the software arose).

Innovators such as Dr Henry face other problems.

NHSIA director Graham Folmer pointed out that the requirement for trusts to get best value for intellectual property rights could extend to software, though it was designed to cash in on clinical advances.

Another difficulty is that much state sectorproduced software is crown copyright - this includes the extensively peer-reviewed data within Prodigy, the decision-support system for GPs.

'It is very hard to re-use, even if It is from within the NHS, ' says Dr Jeremy Rogers, a clinical resource fellow at Manchester University, who is working on an open source project to link healthcare systems reliably.

'We have not had a good experience of licensing in this area, even as a publicly funded body.'

Such legal problems will need to be tackled by a central body such as NHSIA, which sounds genuinely enthusiastic about open source.

However, the government has shown little enthusiasm for the concept. The Department of Health is in the final stages of negotiating with Microsoft to provide software for the NHS, a move condemned by open source campaigners.

Breaking the code: what is open source software?

Most software is written in computer languages that incorporate English words and are easy for a programmer to write.

This is the 'source code'.But computers run software better if this goes through a process called 'compiling', which produces 'object code'that computers can read directly.This is what users generally receive.

Software firms have two reasons for hiding the source code.First, if users change the code, it can make it harder to provide support, as the effect on the software is unpredictable.Second, showing the source code means the secrets of the product are open for all to see and to copy.The world's biggest software firm, Microsoft, is a strong proponent of keeping its source code to itself.

Open source software has a philosophy at odds with this.The best-known example of such software is operating system Linux, the core of which was written by Linus Torvalds at Helsinki University.Mr Torvalds has become a geek icon - as has the penguin (right) he chose as Linux's mascot.

Mr Torvalds'claim on Linux is known as 'copylefting'.Anything that builds on his original work must be available for modification, and though someone changing the code can charge for their efforts, they cannot restrict the purchasers'usage of the software.In contrast, standard software contracts place tight controls on its use.

Some opponents of open source (such as the commercial vendors most threatened by the concept) question the reliability of such software.But Linux is much-respected, seen by many techies as superior to paid-for alternatives.And much of the software running the Internet is open source.

As Glyn Moody, author of open source guide Rebel Code points out, Sendmail (used to deliver three out of every four e-mails), Apache (which runs two-thirds of web-servers) and Perl (a widely used language for interactive websites) are all dependable, open source products.

Many of the programmers who get involved in open source software do so for reasons of altruism, for peer approval or just for the satisfaction of producing good software.However, some firms have embraced open source for marketing reasons - they hope to sell associated software and services.Sun provides StarOffice, a high-quality alternative to Microsoft Office (Word, Excel and the rest) for free, through its website (www. sun. com/staroffice).The product was previously a commercially failing paid-for product, so Sun gave it a new lease of life as open source software.This cost it little, but has gained it publicity and kudos.

So what are the pros and cons for users? The obvious plus is that an open source software installation is usually much cheaper.You may still need support and services - firms such as Red Hat have successfully 'sold' Linux to users by offering it with full written documentation and the support of consultants.IBM is spending $1bn to move into the same market.But as long as the open source software works reasonably, it should be a lot cheaper than paying licence fees to the likes of Microsoft.

On the other hand, buying licensed software normally entitles you to support, plus upgrades and repairs for bugs.It means you pay someone to take responsibility for the smooth working of your software, and this may provide a better support service.

However, the collaborative nature of open source means it is often better tested than commercial software.If you are writing for pride, and being reviewed by your peers, you will want to get it right.And as mentioned, several firms are now providing support for open source anyway.

The most serious argument in favour of open source is that users of sealed, commercial software can never be certain of its integrity - they must take the vendor's word for it.With open source, the peer review process makes errors or deliberate back-doors (secret methods included by programmers that by-pass security procedures) far less likely - which should mean less vulnerability to hackers.Indeed, a recent European Parliament report on interception networks concluded that data in transit should be encrypted using open source software, with commercial e-mail software considered the least reliable option.