
The challenge
Most of the information in electronic health records is free text written by doctors and nurses. It works well for communication between professionals, but it is hard to compare, aggregate and analyse reliably across large volumes of records. Pirha needed a way to turn clinical notes into structured functioning and diagnosis data, supporting professionals' work rather than replacing their clinical judgement.
What Headai built
Headai Health Koodittaja is a clinical coding assistant that reads the text a doctor or nurse has written, identifies its meaning and returns standardised codes such as ICF, ICD-10, ICD-11, ICPC and MeSH. It uses self-supervised and graph-based machine learning built on Headai's semantic knowledge graph.
The solution works directly with the customer's own data: it runs as an isolated component next to the source data inside the secure EHR environment, integrates with existing systems without vendor lock-in, and returns every code together with a quality indicator and the passage of text it is based on. Headai acted as Pirha's technology and science partner, combining healthcare practice, functioning classifications and AI research.
Questions it answers
What does this patient record say about the person's functioning, in ICF terms?
Which diagnosis codes does the clinical text support?
Why was this code suggested, and which part of the text is it based on?
How can free-text records be compared and aggregated across large datasets?
How can changes in functioning be followed over time?

Impact
Structured data makes patient records comparable and opens new possibilities for knowledge-based management, research, service planning and monitoring changes in functioning. For every text, the solution produces a structured, explainable list of codes to support the professional's work.
The scientific and clinical validation carried out at Pirha was published in two peer-reviewed studies in 2025: one validating a self-supervised architecture for automated ICF coding in electronic health records, and one applying graph machine learning to identify functioning in patients with low back pain. The collaboration continues.
Explore the story
Pirha: Functioning classification can be mined from patient texts

Helping YTK members find work that matches their real skills

Turning fragmented skills data into shared decisions with LEADSx2030

Seeing what's actually happening in an industry, before it shows up in official statistics

Turning clinical notes into explainable ICF and ICD codes

Consistent where generative AI is not: keywording 5,585 project applications
