The Estonian digital model, from decentralization to digital sovereignty, and the ways of applying it to the Tunisian health system
(The secret and magic word: X-Road)
Estonia, in its transformation into the first digital society in the world, did not rely on a giant central database, but founded its infrastructure on decentralized systems connected to one another, and the basic technology that made this integration possible is summarized in X-Road, supported by systems of digital identity and of blockchain. This architectural choice is not marginal; it is the essential difference between a digital system that can endure and another that collapses. Understanding this model, dismantling its components and testing its capacity to be projected onto the Tunisian health system is the subject of this report of mine today, I, Dr Lamine Elhajji, a general practitioner working in an emergency department, interested in medical AI, health economics and governance, and very interested in this kind of technological leap. The X-Road platform is considered the most important technological innovation in Estonia: it is a decentralized, open-source data-exchange layer that allows governmental and private information systems to communicate and exchange data securely in real time. This platform is based on an absolute decentralization, as there is no central database for storing citizens’ information; each institution keeps its own data, so that medical records remain in the hospitals, civil records in the Ministry of the Interior, and financial records in the tax administration or the Ministry of Finance. Interoperability is achieved by calling the data and integrating them only when needed, so that the public-health administration system can exchange data among emergency departments, outpatient clinics and health-insurance systems smoothly, which prevents the repetition of data or their isolation in isolated islands. This model solves the dilemma of trust and of security in exchanging data among systems and types of software that do not know one another, without building a slow central system exposed to failures. In order for the X-Road platform to work safely, the identity of every user and system must be verified, and here the public-key infrastructure and electronic seals stand out. This infrastructure guarantees the encryption of data while they are moving among the servers, and every citizen possesses a digital identity card or a smart identity used for authentication and electronic signature. Electronic seals are used to guarantee the credibility of documents issued automatically by institutions, which allows the digitization of administrative correspondence and the provision of government services completely without human intervention. In this framework the system does not confine itself to verifying the identity of the person requesting the information only; the security servers work on mutual verification between the two parties of identity and of authorizations before creating the encrypted communication channel and exchanging any byte of data. Every query operation that takes place through the network is recorded and time-stamped with a digital seal that cannot be erased, which guarantees absolute transparency, as the citizen can know who requested his data, when and for what purpose, which prevents the misuse of authorizations. To secure the integrity of the data, Estonia developed the Keyless Signature Infrastructure technique, based on blockchain. This technique is not used to store the data themselves, in order to avoid slowness — which is a given in Tunisia — but to create a digital fingerprint for every record present on the network. This guarantees the impossibility of tampering with the data: if any medical record or legal document is amended in an unauthorized manner, the system will immediately discover the change, refuse the amendment and launch an alert. The practical effect of this integration among X-Road, digital identity and blockchain is manifested in the electronic-health system that manages 99% of health records and of medical prescriptions. When the emergency doctor receives a patient, he can have immediate access to his complete medical history, previous laboratory analyses and the medicines prescribed to him, which accelerates the triage process, supports clinical decision-making and reduces medical errors radically. The Estonian digital system was completed by integrating innovative techniques and policies that turn data into actual services and guarantee the continuity of the State even in cases of emergencies and disasters. Among the most prominent of these components is e-Residency, a cross-national digital-identity programme that allows any person in the world to found and manage a company registered in the European Union entirely over the internet; and internet voting, as Estonia was the first state to allow citizens to cast their votes in elections from any place in the world using digital identity cards, relying on strong encryption and the public-key infrastructure to guarantee the secrecy of the voter and the integrity of the results; and artificial intelligence and proactive services, through the Kratt strategy — this genius strategy that we hope from the present Tunisian Minister of Health — which integrates artificial intelligence into public services in order to provide proactive services: when a child is born, the systems automatically register him in the civil records and disburse family allowances without the parents having to submit any request; and data embassies, the first of their kind and an Estonian creative jealousy that we hope will be repeated in Tunisia, whose aim is to protect digital sovereignty from natural disasters or cyberattacks, as Estonia created the first data embassy in the world in physical cloud servers located in Luxembourg, enjoying diplomatic immunity and hosting encrypted backup copies of all vital government records. And the e-Cabinet platform, an information system for managing government sittings that allowed ministers to review draft laws and vote on them digitally before the meetings, which reduced the time of the government’s weekly sittings from several hours to thirty minutes only. The data embassy is an innovation that integrates international diplomatic law and advanced technological infrastructure. The basic idea is that the State can store its vital data and operate its basic systems from servers located geographically outside its borders, while retaining complete sovereignty over them. From the legal standpoint, the servers that host these data are treated exactly as physical embassies and are subject to the Vienna Convention on Diplomatic Relations, so that the authorities of the host state do not have the right to enter the data centre, or to inspect the servers, or to confiscate them, or even to cut the electrical current from them, whatever the circumstances. The data embassy is not used as a cold archive; it is a live system connected to the national infrastructure through encrypted, high-speed communication channels, and critical data are updated continuously and daily, such as citizens’ health records, tax systems, land and property records, national-identity databases and civil records. And even if we assumed the success of a cyberattack in reaching these servers, the data are protected by blockchain technology, which creates an encrypted, time-stamped digital fingerprint for every file. If any intruder tried to change a medical record or to amend the ownership of a piece of land, the system would immediately discover the mismatch of the digital fingerprint and refuse the amendment. The supreme aim of the data embassy is to guarantee the State’s ability to remain and to work even if its physical infrastructure were destroyed: in the event of a military invasion, a natural disaster or a comprehensive cyberattack, the government transfers the path of the systems, and it can continue to provide services from exile or from emergency centres. And here Tunisia can undertake such an idea, not necessarily in a foreign state, but in an unknown and safe underground centre.
One moment, let us return to the Kratt strategy, because it is a genius idea and may attract decision-makers in Tunisia or the Minister of Health, Dr Mostafa El Ferjani, the Minister being almost the only person and the holder of a clear vision concerning artificial intelligence since the event of 25 July 2021. I met the Minister once and I observed his great intelligence and sharpness, and the ambition and his large reformist endeavour, and you can know that from the type of questions he asks you and from his observations. He is also open to everyone and to any idea, which increased his charisma and prestige, and is the opposite of the traditional military leader who glorifies closure and excessive hierarchy over communication. Here, in truth, I compare two styles of leadership, one based on communication and openness to ideas from everyone, and the other on excessive hierarchical chain and on closure and elitism. This comparison is in truth linked to the idea of the necessity of modernizing Tunisian administration, whether civilian or not. Openness to new ideas in general can also help the success of the digitization project, for there are points that go beyond the elite, however intelligent it may be. And I return and confirm here that this is not a generalization or a general judgment on military leaderships, given that the Minister is a military man: it is certain that there is a fair number of those who believe in communication. He bets and moves on artificial intelligence in a tangible way, in word and in deed. As for circulating the idea of Kratt: in old Estonian myths, Kratt is a magical creature that peasants make from scrap and old tools and that is given life to perform the hard work on behalf of its owner, and the Estonian government was inspired by this name to launch it on the national artificial-intelligence strategy. In the digital context, Kratt is not a single programme, but a comprehensive governmental vision that aims to turn public services from interactive services that wait for the citizen’s request into proactive services managed by artificial-intelligence algorithms in a hidden and useful manner. This strategy depends on two basic pillars. The first pillar is the unified virtual assistant that links all government databases to one another, and the citizen can speak to it by voice or by chat to request a certain service, and the artificial intelligence directs the request and completes it through the X-Road network without human intervention. The second pillar is proactive services based on life events. The supreme aim is that the government should work in the background without the citizen feeling it: at birth, the hospital registers the birth in the electronic-health system, and the artificial intelligence automatically registers the child in the civil register, allocates a digital identity to him and transfers financial allowances to the parents’ account; and when a job is lost, the system automatically communicates with the citizen, offers him unemployment allowances and suggests professional rehabilitation courses to him. In the health-care sector, Kratt is used to predict the clinical paths of patients, so that artificial-intelligence algorithms can analyse medical records through X-Road to alert emergency doctors or family doctors proactively about patients exposed to high risks before their condition deteriorates, which facilitates early medical intervention. Any artificial-intelligence system faces a simple golden rule: the quality of the outputs depends entirely on the quality of the data. Kratt does not rely on magic, but rests on a solid technical and legal infrastructure that allows its algorithms to work in a proactive and reliable manner. The foundations of the success of the Kratt strategy can be summarized in four main pillars. The first pillar is interoperability through X-Road, as there is no algorithm that can work if the data are held in isolated silos, and machine-learning models depend on the X-Road network to fetch immediate, clean and reliable data from the various ministries and institutions. The second pillar is natural-language processing, as the virtual assistant depends heavily on natural-language-processing models trained specifically to understand the complexities of the Estonian language, which allows the system to analyse the user’s intention and to direct his request to the correct government institution automatically. The third pillar is digital identity and authentication, as governmental artificial intelligence needs a certain knowledge of the identity of the person it is dealing with before it offers him proactive services, and Kratt depends on the public-key-infrastructure system linked to digital identity. The fourth pillar is the legislative and ethical framework, for technology alone is not enough if the citizen does not trust it, and the effectiveness of Kratt depends on clear laws that explicitly allow automated systems to take administrative decisions, with complete transparency that allows citizens to see who accessed their data, and with strict regulatory standards to prevent bias in the algorithms and to protect privacy. In the context of health care, in order for artificial intelligence to predict a certain disease path or to alert the emergency staff — as we say in Tunisia, or “emergency” so that the Mashriq may understand us — to the probability of a deterioration of a patient’s condition, it needs to read data coordinated by standard criteria that pass through a secured network, and without this integration the algorithms remain mere software codes unable to produce a true clinical effect. Here the FHIR standard stands out, which I have mentioned often before without explaining it, and which represents the common language that allows the different medical systems and applications to speak to one another smoothly. Instead of exchanging huge and complex files, FHIR depends on modern web techniques to exchange specified and precise data, by dismantling the medical record into standard, independent information units called resources: there is a resource specific to the patient’s data, a resource for diagnosis, a resource for medicines, and a resource for laboratory results and vital signs, and every resource possesses a globally unified data structure. To reach these resources, FHIR uses standard internet protocols, so that a medical application can request a very specified piece of information in a light format such as JSON or XML, and they are exchanged immediately and securely. In the rapid clinical working environment such as emergency departments, the actual effect of the FHIR standard appears through accelerating the collection of data and supporting the decision. When a patient is received, the admission application can send a rapid query by the patient’s identity number, and instead of loading the entire medical record, the system calls only the resource of drug allergy and the resource of the medicines the patient is currently taking, which prevents dangerous drug interactions. Monitoring devices or portable ultrasound devices at the point of care can also send measurements and images directly as FHIR resources to be integrated automatically into the patient’s digital record. The advantages of FHIR compared with old standards are manifested in lightness, speed and suitability for mobile applications, and compatibility with the large infrastructure, as it is easy to pass FHIR data through secure data corridors in order to create a connected national health-care network. The true secret behind the strength of the X-Road platform does not lie in a magical software cipher, but in the philosophy of the decentralized architecture on which it was built, and which solved the dilemma of trust and of security in exchanging data among systems and types of software that do not know one another. The success of this system depends on four strict technical and organizational principles. The first principle is the absence of centralization: X-Road is simply an encrypted highway for transferring data, and is not a warehouse for storing them, and the data remain in their original places under the control of the institution that produced them. The second principle is the once-only principle: Estonian law prevents any institution from requesting a piece of information from the citizen if it is already registered in another government system, and this legislation forced all institutions to abandon isolated systems and to use X-Road for immediate linking among them. The third principle is mutual authentication: the system does not confine itself to verifying the identity of the person requesting the information only; the security servers work on mutual verification between the two parties of identity and of authorizations before creating the encrypted communication channel. The fourth principle is documentation that cannot be tampered with: every query operation is recorded and time-stamped with a digital seal that cannot be erased, which guarantees absolute transparency and prevents the misuse of authorizations. In the public-health sector this secret stands out as a practical solution to the dilemma of data integration. Instead of trying to build a slow central electronic system exposed to failures that gathers the data of all hospitals, the X-Road architecture allows emergency departments in regional health institutions, dispensaries, pharmacies and insurance systems to keep their own databases independently, and at the moment of need precise information is exchanged, such as drug allergy or the summoned medical history, through standards such as FHIR, in fractions of a second, to support a rapid clinical decision and to save a patient’s life, without infringing the privacy of the rest of the data or the stability of the other systems. This decentralized model is the most suitable for the Tunisian context, where it is not conceivable to build a giant central database that gathers all the national health records, while it is conceivable to have a decentralized network that links regional health institutions, dispensaries and pharmacies, with each institution keeping its data and exchanging information only when needed. When this model is projected onto the Tunisian reality, a practical roadmap can be conceived that begins by establishing the digital backbone of interoperability. The first decision is to get rid of the isolation of data among hospitals and dispensaries in order to accelerate clinical decision-making, by launching a project to link public health institutions with decentralized data-exchange protocols that guarantee the flow of information with security and transparency, and adopting standard criteria to facilitate the calling of medical records. This will enable doctors in any regional health institution to pull the medical history, the list of medicines and the allergies of any patient in a few seconds, which accelerates triage and reduces medical errors radically. Rapid, low-cost digital platforms can also be adopted to facilitate the daily management of beds and of the stock of medicines in emergency departments. Then comes the restoration of consideration to regional health institutions: the enormous pressure on the central and university hospitals stems essentially from the lack of support and of equipment in the front-line and regional health institutions. Urgent budgets must therefore be directed to modernizing the emergency departments in the regional health institutions — from my own experience in a regional health institution — and to supplying them with rapid diagnostic devices such as portable ultrasound devices at the point of care, and to putting in place clinical protocols and simplified reference guides in the French and Arabic languages to be a clear guide for nursing and paramedical teams. Then the management of the human load and continuous development, by applying concepts of load management to distribute working hours and shifts scientifically in a way that guarantees the psychological and physical balance of doctors and nurses, and the decentralization of continuous training to facilitate the enrolment of medical cadres in programmes of complementary university certificates without bureaucratic complications. And finally governance based on data, by linking the management of resources to business-intelligence systems to monitor strategic shortcomings before they worsen, such as predicting the characteristics of vital medicines or maintenance needs on the basis of precise analyses that anticipate crises instead of merely responding to them. With regard to the executive steps, the introduction of artificial intelligence does not begin with the algorithms, but with preparing the infrastructure to guarantee the smooth flow of data, by establishing the national X-Road platform as a first line of defence for the data, and by linking regional health institutions, dispensaries and central pharmacies to secure servers, with each hospital keeping its patients’ data locally, and enabling the system to call automatically the blood group, drug allergies and chronic diseases as soon as the patient’s identity is entered in the emergency department. Then unifying the language of the systems by imposing the FHIR protocol on all providers of medical software, to guarantee that the emergency application can read the analysis results issued by the laboratory smoothly and in real time, together with digitizing the front lines with flexibility by supplying emergency doctors and nurses with rapid applications to record vital signs instantly through tablet devices, as well as launching clinical artificial intelligence by analysing historical data of patient arrivals to predict peak times in emergency departments and to distribute duty rosters scientifically in a way that prevents professional exhaustion, and training algorithms that read the medical files of chronic patients to alert emergency doctors immediately of cases exposed to the risk of rapid deterioration, and integrating techniques of medical voice recognition to ease the administrative burden. And finally, and not last, securing the system through identity and electronic seals to protect all medical decisions and prescriptions by using the public-key infrastructure and guaranteeing the reliability of the records and specifying responsibilities with precision, together with operational gradualness by executing digitization as model projects in emergency units in regional health institutions in an interior region that suffer from poor governance and a poor distribution of human resources, among other things, in order to test the efficiency of the flow of data and to correct errors before the national generalization. In this context, reliance on simplified applications designed locally to collect triage data in emergency departments represents a smart and necessary strategic step to pave the way toward a national system. This gradual approach avoids the shock of imposing complex systems on exhausted teams and provides immediate gains: it breaks the psychological and technical barrier, as introducing technology into emergency departments of high pressure and of decisive time requires tools that do not increase the burdens, and simplified applications designed specifically to meet the needs of direct triage, with intuitive interfaces, will encourage nursing and medical teams to abandon paper, and their success in regional health institutions builds confidence in digitization before imposing more complex national systems. It also builds a culture of structured data, as even the simplest applications force the user to enter the data in specified fields, and this move from random paper records to structured digital data is the foundation on which artificial-intelligence algorithms and business-intelligence reports will later be built. And it provides flexibility and rapid adaptation, as local tools allow rapid amendment on the basis of the daily observations of emergency doctors, and if it appears that a certain data field takes a long time, or that a new protocol needs to be added, the application can be amended in hours, unlike central national systems that require long and bureaucratic update cycles. And it prepares for the future linking through X-Road: when the time comes to launch the national network, these departments will not start from zero, but the data will already have been collected and coordinated, and the next step will simply be to add standard programming interfaces to export these local data and to link them to the national network.
The Estonian model is not a technical model only; it is a political, institutional and legal model. Success did not come from choosing the correct techniques only, but from the political will to impose the once-only principle, from the legal framework that grants electronic seals a conclusive argument, from the transparency that allows the citizen to know who looked at his data, and from the trust that the system built over years. Tunisia, which possesses the engineering and medical competencies able to build these models, and in which there is academic research in this field, lacks only the political will to turn this knowledge into a field reality, and beginning with a model project in any department of a regional health institution constitutes the first practical step toward building a proactive health system able to predict crises before they occur, to control resources before they run out, and to protect lives before they reach the limits of danger. The matter is not building a giant central database, but building a decentralized network that links what exists, respects the independence of every institution and allows the exchange of information only when needed. This is the most important Estonian lesson: that digital sovereignty is not built by centralization, but by connected decentralization, by institutional trust and by the political will that turns technique into a solution.
And finally, the Tunisian State has taken its first steps toward establishing the infrastructure of interconnection and the beginning of the use of X-Road; in truth this technology is now not foreign to Tunisia, except that the health sector must be the first beneficiary.
Dr Lamine Elhajji, doctor in the emergency department at a regional health institution, interested in medical artificial intelligence and health economics.