Writing for Medium.com, in the article ‘Open source is the only way for Medicine’, Dr. Marcus Baw argues:
‘As software and technology have become more and more part of medicine itself, neither distinguishable or separable from the practice of medicine, we must consider that these software artefacts now have to become part of the corpus of medical knowledge, and thus there is an ethical duty to share these technological artefacts openly, as Open Source software and Open Hardware, in order for the maximum benefit to humankind.‘
In principle I partly agree. If a team develops a system that improves the quality of healthcare, others could benefit globally by repurposing it. Superficially, there’s a moral argument for publishing code for such a system. But I think the case would be stronger if Dr. Baw hadn’t based it on a comparison between the sharing of software and the sharing of medical knowledge. If we accept, as our basis for argument, that both the medical profession and software development are distinct fields of expertise, software development would be analogous to performing surgery or treating a patient. The point here is that the production of properly engineered software is not equatable to knowledge sharing, since the former is often a bigger undertaking that requires the application of expertise and labour.
What is directly analogous to the sharing of medical knowledge is the sharing of knowledge that enhances the quality of software, through books, meetups, blogs, GitHub pages, tools, best practices, YouTube/Pluralsight videos, design patterns, etc. This has been the norm for decades already.
Another point worth mentioning is that making clinical software open source is all nice and altruistic, but it could go completely the other way. Over the years, we’ve seen how the ideal of collaborative progress can be co-opted to form a ‘sharing economy’, in which corporations exploit underpaid labour in ways that undermine the social contract, while creating a fake ‘startup culture’ that enables monopolies to assimilate anything and everything they deem profitable. The monopolies now exist. What’s to prevent them repurposing the best code, hiring the top 1% of developers, and making it harder for smaller vendors to compete? What’s to prevent a corporation co-opting a successful open source project and ensuring only their implementation gets approved?
The Testability of Proprietary Software
On the issue of testing and reviewing clinical software, Dr. Baw states:
‘But, with these closed-source proprietary systems, there’s no way to independently test their claims, there’s no scientific process, and the need for proper clinical peer review has been completely over-ridden by the wish of the company to make profit.‘
It’s not always appropriate to invoke ‘science’ when making an argument, as the scientific method is simply a tool for determining the typical behaviour of the observable world. For what it’s worth, one could observe an instance of proprietary software, make inferences about its behaviour, and form testable hypotheses. Dr. Baw could even do that for multiple proprietary applications and submit a paper on that for peer review. This would be an example of the scientific process applied to proprietary software.
As it happens, proprietary software is far from untestable, as the actual behaviour of an application can be compared with the expected behaviour for a range of anticipated use cases, and this is precisely what the NHS does for each iteration of clinical software it develops in-house. The Clinical Portal, My Health Online, WCCG, GPTR and Myrddin are thoroughly tested that way by professional test analysts. That method of testing is also applied to some third-party proprietary applications, such as LIMS, INPS and EMIS. It’s not the place of test analysts to weigh in on my source code, but it’s their job to criticise the applications from the users’ perspective and log application behaviour that deviates from what they expect.
When it comes to reviewing code, that’s important, but it doesn’t reveal much about how the software would actually behave, especially if one is reviewing scripts where the underlying components were coded in another language, or if software is so loosely coupled one needs to dig through five source files to determine the purpose of a component.
Subjective opinion also plays a huge role in fundamental decisions about how software is engineered and applied – there are even valid criticisms against what’s generally considered ‘best practice’. My opinions of someone else’s code, and whether that person should have followed a given design pattern, would be a matter of subjective opinion, regardless of my reasoning.
Open Source and Publicly-Funded Projects
‘Quite a large proportion of medical research is publicly funded. This is taxpayers™ money which is used for developing medicine. Where this medical research results in development of software, data sets, algorithms, or any other technological feature, it’s imperative that these be open sourced, so that the the maximum taxpayer benefit is extracted from the investment.‘
Aside from having to be really careful about publishing data sets, I sort of agree. I believe in subsidiarity, that everyone can empower themselves taking ownership of their communities, and open source projects are conducive to that. It’smore sustainable, I believe, for a community to utilise the skills it has, develop the systems it needs and use them as it sees fit. Taxpayers would certainly get more for their investment, and patient care might improve globally. However, for things to remain that way, NHS would need to assume a similar role to the Free Software Foundation, in funding the core developers and ensuring there are legal protections for in-house projects.