## Medicine and the fight for simple software. How digitalisation prophets kill patients. by Christoph Lohmann <20h@r-36.net> ## Introduction Medicine is the new high-profit market, where capitalists can rob money from social systems. Mass solutions from the web are pushed into working systems without thinking about them. The pitfalls are not thought about. A simple example of file formats will show you what is going wrong and that a different thinking is required in healthcare. Ramming your head against a problem like in other fields of digitalisation will not work. People will die that way. ## What is so special about medicine? * You cannot restart a patient. * You cannot simply replace a component of a patient. * You need to keep the system running while repairing it. * You cannot online-update a patient. * Patients run on a pretty old operating system we have not yet completely unciphered. * Patients will sue you for harming them. * Patients have human rights. ## What we are using now: the xDT Format xDT, where "x" can be a single letter to show the standard used. A ... Abrechnung / Accounting B ... Behandlungsdaten / Treatment Record G ... Geräte / Device Transfer L ... Labor / Laboratory Data https://update.kbv.de/ita-update/Abrechnung/KBV_ITA_VGEX_Datensatzbeschreibung_KVDT.pdf * description of field to record to data packet rules ## xDT Format * data packets, container parts * sadly ISO-8859-1 * container names * con0 ... container begin * con9 ... container end * besa ... data of health institution * rvsa ... for laboratory ring tests * accounting * "adt0", "adt9" like above * "0101", "0102", "0103", "0104"; different treatment types * some more specialized names, but all just four bytes ASCII ## xDT Format Fields * basic data structure is the field length + field name + field description + \r\n length ::= [0-9]{3} ASCII field name ::= [a-z]{4} field description ::= string * many fields create one record * many records create one data packet * different data packets are in one file ## xDT file name description Zhhnnnnnnnnn_DD.MM.YYYY_hh.mm.eee Z ................. ISO-8859-1 hh ................ how many data packets are in nnnnnnnnn ......... id of healthcare institution DD.MM.YYYY_hh.mm .. timestamp eee ............... file ending "con" Ex. Z05721113456_19.01.2019_11.57.CON ## xDT Example 0138000con0 017910304102010 01091064 01091321 0138000besa 0180201948875100 ... ## xDT Discussion * simple to parse * simple to extend * used everywhere * easy to compress * whole basic standard can be expressed in three slides * old German devices support this format for device interaction too * can be easily implemented everywhere in no time * sadly ISO-8859-1 * digitalisation prophets mark it as "obsolete" but do not come up with viable alternatives ## HL7 HL7 is just a standard describing formats. With every new iteration it got more complex. Compare it to W3C, which with too much time adds more and more complexity without a practical need and only making things worse. Device vendors are stuck at HLv2, out of good reason. I will show why. ## HL7v2 A message consists of: * segments * fields * data types Format example: MSH|^~\&|KIS||Subsystem||202106172010||ADT^A01|12345|P|2.3| PID|||0815|1234567890|Bob^Evil^^^||19741007|M|||Somestreet \ 2^^City^^Postcode^D||||D||||1234||||||||| PV1||stat|01^^^6^^^536^^HNO||^||123^Bob Evil^^Dr.||||||| \ |||||1234567890||||||||||||||||||||||||||||| \ 202106172010|||||| MSH ... Message Header Segment PID ... Patient Identification Segment PV1 ... Patient Visit 1 Segment ## HLv3 Instead of a simple file format you have a HL7 Development Framework using: * UML ... Unified Modeling Language From UML the messages are generated in an XML dialect. All started in 1995 and failed. Why? ## Restart: FHIR _Fast_ Healthcare Interopability Resources or "Throw in all web, because it worked so well for everything." * Everything is a "resource" represented and only interfaces are defined. * Things are exchanged over HTTP, REST, JSON, XML. * You only have services, no interchange format. * Services need to be online all the time. ## FHIR Simplifier The standard is so complex and full of nonsenses, they even took a website https://simplifier.net/ Germany: https://simplifier.net/basisprofilde ## German FHIR Profile Profiles .............. 45 ValueSets ............. 27 CodeSystems ........... 25 Extensions ............ 23 NamingSystems ......... 30 ImplementationGuides .. 1 Texts ................. 142 Images ................ 5 Layouts ............... 1 PackageManifests ...... 1 ## FHIR Expressability ## Practicability vs. Theory * Practical application in devices or with accounting seem to stay with the old format. Why? * The new standards are simply crap, thought out by theorists with no practical experience. * For intellectual masturbation go to gopher://bitreich.org/1/bithub * We ended up with the worst of the worse: * XML describing XML with XML over XML * Wasting resources with a non-properly implementable standard like XML. * People are not looking at what went wrong. * We will have dead people because XML is clogging pipes which are required for life-important data events. ## Something else: The Arden Syntax, programming medicine. maintenance: title: To check the diastolic blood pressure of the patient;; mlmname: Hypotension;; arden: version 2.7;; version: 1.00;; institution: Latrobe University Bundoora;; author: Lakshmi Devineni;; specialist: ;; date: 2013-06-02;; validation: testing;; ## Arden Syntax library: purpose: check if the diastolic blood pressure of the patient is within limits;; explanation: This MLM is an example for reading data and writing a message;; keywords: hypotension; categorization;; citations: ;; links: http://en.wikipedia.org/wiki/Hypotension;; ## Arden Syntax knowledge: type: data_driven;; data: /* read the diastolic blood pressure */ diastolic_blood_pressure := read last {diastolic blood pressure}; /* the value in braces is specific to your runtime environment */ /* If the height is lower than height_threshold, output a message */ diastolic_pressure_threshold := 60; stdout_dest := destination {stdout}; ;; ## Arden Syntax evoke: null_event;; logic: if (diastolic_blood_pressure is not number) then conclude false; endif; if (diastolic_blood_pressure >= diastolic_pressure_threshold) then conclude true; else conclude false; endif; ;; action: write "Your Diastolic Blood Pressure is too low (hypotension)" at stdout_dest; ;; ## The Arden Syntax resources: default: de ;; language: en 'msg' : "The normal range from 60 to 90"; ;; language: de 'msg' : "Der Normalbereich von 60 bis 90"; ;; end: ## Discussion: Arden Syntax This part of the presentation is about bringing you the essence of this talk: Thinking the medical way and then knowing why doctors will not easily adapt your good-sounding solution to all medical problems. ## Questions: Arden Syntax Why is the Arden Syntax dangerous? #pause * It will end up compiled and unmaintained. #pause * Medicine is always raw, from the ground up. #pause * Automation of test values forgets other basics: #pause * How are the test values obtained? #pause * What is the measurement error? #pause * What bias is used? #pause * How is the interpretation? #pause * Standards change over time. #pause * Current new hypertension standard in Germany completely changed the view to life quality. ## Questions: Arden Syntax Would you want to be treated by an algorithm or a doctor? #pause * The solution is a mix. ## Proposal for a Algorithm Doctor Friendship Some basic medical iron rules always apply. ## Proposal for a Algorithm Doctor Friendship 1. Always talk to the patient. ## Proposal for a Algorithm Doctor Friendship 2. Always see, smell, touch, feel the patient how it is needed. * Quality of treatment requires as much sensory input as possible. * Training the sensor interpretation of the doctor is his or her core value of professional integrity. ## Proposal for a Algorithm Doctor Friendship 3. Doctor-Patient Interaction is always live. * Everything not live is only an intepretation, no treatment. * Radiology has much magic, but less value. ## Proposal for a Algorithm Doctor Friendship 4. Any measurment, laboratory check requires doctor approval. * Measurements or simple blood taking are attacking your body integrity. * primum nihil nocere - firstly do not hurt ## Proposal for a Algorithm Doctor Friendship 5. Always interpret results *with* the patient and in accordance to the current science and the will of the patient. ## Proposal for a Algorithm Doctor Friendship Algorithms help us in grasping science, slowly adapting it to the quality of treatment, they should never *replace* the doctor. Like: if (age > 50 && genetic_type(patient, "cancer-gene")) { warn_doctor("Look for cancer because ...."); } if (ai_filter(ultrasound_picture, "metastasis")) { warn_doctor("Looks like a metastasis of ..."); } ## Conclusion When proposing a file format, keep it simple, do not just think of your always-on web, think of doctors in rural areas going for home visits without Internet. Do not take the future or your city-life for granted all over the world. The world will never be like that. Doctors and algorithms are friends, not enemies. But doctors think freely and are then not controllable by corporations. See Introduction for reasoning. Data kept for real by doctors in really closed local files are not easy to process by Google and companies. Who wins is who decides on the market. Go to a responsible doctor and you get a responsible treatment. ## Questions Do you have questions? ## Thanks Thanks for listening! Questions and Comments to: Christoph Lohmann <20h@r-36.net>