
Turning the "Text" of Medical Records into a Database — Report on an Organized Session at the 46th Joint Conference on Medical Informatics
On November 13, 2026, at the Sapporo Convention Center, I organized and chaired the organized session "Building a Knowledge Base from EHR-Derived Clinical Data (2)" at the 46th Joint Conference on Medical Informatics (the 27th Annual Meeting of the Japan Association for Medical Informatics). It was the sequel to our report at the same conference last year. Here I report what was presented on the day, together with some of the slides.
This is the English edition of a report originally written in Japanese. The slides shown here have been translated into English from the speakers' original Japanese slides.
What we wanted to convey in this session
Electronic health records (EHRs) hold an enormous amount of clinical information. Yet the progress notes that physicians write every day, and the many kinds of reports, are natural-language text. In practice they cannot be handled as a database, and they have been left out of research and other secondary uses. And yet this is precisely where the results of treatment (outcomes) are recorded most richly.
Our project aims to structure this "text" with large language models (LLMs), load it into a database, and then make it searchable and analyzable in natural language. The biggest difference from last year is that the structuring of progress notes using real data has now begun.
There were three presentations, arranged so that they build on one another in the order "infrastructure → model → application."
Hiroyuki Yoshihara (Kyoto University): Structuring Unstructured Records with LLMs and Its Application to Clinical Data Analysis
Rio Yokota (Institute of Science Tokyo): Advancing Japanese LLMs and Implementing Them in Clinical Settings
Yasuyuki Kato (PRiME-R): From Unstructured Data to Insight: How LLMs and the JSON Master Approach Transform the Entire Process of Clinical Data Utilization
1. The progress notes that were left behind (Yoshihara)
Yoshihara began by explaining the overall picture of the project.

In the Millennial Medical Record (Sennen Karte) data collected by the Life Data Initiative (LDI), diagnoses are the largest category at more than 600 million records, followed by progress notes at more than 500 million. Prescriptions, laboratory tests, and injections, which are the data most often used for secondary purposes, stand at around 200 million each, and the various reports at under 100 million. What progress notes and reports have in common is that they are unstructured data written in natural language, and that they are rich in outcome information.

The processing flow is as follows.
Data are exported from the EHR in formats such as XML (MML) and CSV (HL7 v2.5). Some reports from departmental systems come out as PDF or JPEG, so a multimodal model performs OCR and semantic interpretation.
An LLM dedicated to structuring (LLM-1) structures the data, mainly the progress notes. For this we use the Swallow series from the Institute of Science Tokyo.
The results are output in JSON and stored in PostgreSQL.
When a researcher, or the EHR itself, asks a question in natural language, an LLM dedicated to querying (LLM-2) generates the SQL and runs the search automatically.
For example, if you write "Find the actual number of patients with gastric cancer, by sex," the answer comes back even if you know no SQL. That is the world we are aiming for.
2. Using LLMs without taking patient information outside the hospital (Dr. Rio Yokota)
The theme of Dr. Yokota's talk was: "Can free-text records be handled by an LLM without taking clinical data outside the hospital?"

Open models are approaching a practical level
Open models, whose weights are publicly released, have grown rapidly in scale over the past year. On a service that offers a choice of many models, the share of open models among the top 50 reportedly rose from 26.8% (October 2025) to 71.7% (September 2026).

Two approaches in Japan

LLM-jp (led by NII): Trains a foundation model from scratch in Japan on about 12 trillion tokens of data. It releases the weights, the training recipe, and the evaluations, building a foundation whose contents can be verified.
Swallow (Institute of Science Tokyo): Starts from open models developed overseas and adds further training in Japanese, mathematics, science, and other areas. Its advantage is that the result is at least better than the model it started from.
Since its first release in December 2023, Swallow has repeated this Japanese adaptation each time a new open model has appeared. In February 2026, a gpt-oss-based version and a Qwen3-based version were released.
Passing level on the national medical licensing examination, with no additional medical training

On a benchmark using the 2026 Japanese National Medical Licensing Examination, GPT-OSS-Swallow-120B scored 94.6% and Qwen3-Swallow-32B scored 91.8%. Neither had any additional training on medical data, and both met the passing criteria for both the compulsory and the general questions. It is also important that the scores were higher than those of the models they started from.
Models that think carefully before answering are also safer

In an evaluation with AnswerCarefully, a Japanese safety dataset, models trained on data that retained the reasoning process had a higher proportion of acceptable responses and a lower proportion of violating responses. Even when an answer is found right away, the model checks once more whether it is appropriate and safe. The result shows that this process contributes to safety.
On the other hand, there was also a candid report that the ability to handle long contexts is still under development: simply extending the context temporarily lowers reading-comprehension performance, and it has not yet caught up with the original model.
Verifying structuring and the replacement of personal information

In a test of structuring MML-format XML into JSON with an LLM, structuring succeeded for all 1,044 records, with an average processing time of 43.2 seconds per record. The subsequent replacement of personal information worked for 1,040 records and failed for 4 because of key mismatches. The accuracy of detection and replacement, and whether any personal information remains after replacement, have yet to be evaluated.
A setup for running it inside the hospital

The system is kept physically disconnected from the hospital network (air-gapped), and the models and software brought in can be inspected, logged, and stopped at a single point. Data are carried by hand on encrypted SSDs. It is a nuisance, he explained, but they do not want to compromise a state in which absolutely nothing goes outside. He also holds weekly discussions with the faculty member responsible for security at the university.
Three assumptions about medical LLMs

The conclusion of the talk was clear. Two views, "a medical-specific model is necessary" and "generative AI cannot be used without an external API," no longer fit the data. The difficulty of the tasks needed in clinical practice stays constant, while AI keeps improving. The remaining challenges are long-document comprehension, the evaluation of structuring accuracy, and an operational infrastructure for continued use inside the hospital.
3. The JSON master, and an analysis environment anyone can use (Yasuyuki Kato)
Mr. Kato showed us, in one sweep, everything from actually structuring real clinical data and turning it into a database to putting that database to use. The work covers four domains: respiratory disease, cardiovascular disease, psychiatric disorders, and cancer, with several thousand cases planned per domain (psychiatric disorders and cancer within this fiscal year).
The key is the "JSON master"
If you ask an LLM to "structure this text," it will do so. But it returns a different structure every time you ask, so the output cannot become a database as it is. What is needed is a template that says "structure it with this structure": the JSON master. For natural-language search, too, the SQL will not be correct unless the model is told the structure.
The master is built as follows.

First, give the LLM a single case to structure, and have specialist physicians check only the top level of the hierarchy.
Feed in several hundred cases repeatedly, adding items as you go.
Use the LLM to tidy up and merge the items that have multiplied as separate entries because of spelling variants, typos, and omissions.
Repeat.

The number of items rises, falls with each consolidation, and eventually levels off. For respiratory disease it finally settled at 366 items. The set of items that physicians in that field actually write emerges from the data.

The analysis environment enters its third generation
The environment that lets people who do not know SQL run analyses in natural language has also entered its third generation.
First generation (reported November 2025): Generates SQL from a natural-language request and displays a graph. Easy to use, but not extensible, and you cannot see what it is doing inside.
Second generation (reported June 2026): Users build their own analysis apps by dragging and dropping components and connecting them with lines. The processing is visible, but the setup is cumbersome.
Third generation (shown publicly for the first time): Write what you want to do in a sentence, and the LLM automatically generates the analysis application itself.

In the demonstration, a timeline display of drug therapy, a comparison of survival curves, and a comparison of duration of response and number of cases by drug were built on the spot.

Analyses that used to take months after being requested from database engineers can now be done in about a minute, even by ordinary users (Mr. Kato).
Respiratory disease: the fill rate decides whether a study is feasible
Even if structuring works, no data will go in if the information was never written in the chart in the first place. So, for 1,044 respiratory cases, the team examined the fill rate (the proportion of cases in which an item is recorded) item by item.

The principal diagnosis and past medical history are well recorded, but for laboratory values and the like there are large differences from item to item.
The following episode was interesting. When the AI was shown the list of items and asked for a research theme, it proposed an analysis using four items: eosinophils, FeNO, IgE, and specific IgE. However, the AI multiplied the fill rates of the individual items together and estimated: "The probability that all four items are present is 0.13%. Among 1,000 cases there would be one case at most; 40,000 cases would be needed."

But when the database was actually searched, there were 81 cases (7.76%) with all four items. These tests are ordered as a set and the results come back together, so they are not independent of one another. The AI does not know the realities of clinical practice. The lesson is that the AI's answers should not be taken at face value and need to be checked against real data.
Cardiovascular disease: automatically generating a standard pathway
In cardiology, the minute-by-minute course of patients brought in by ambulance with acute myocardial infarction is written out in long passages of text. Even so, it turned out that this text can be structured, and that both the "rationale" for diagnosis and treatment choices and the resulting "outcomes" can be extracted.

Furthermore, the care processes of 200 cases of ischemic heart disease were visualized individually, and the task of integrating and abstracting them ten cases at a time was repeated 20 times to bring the whole picture together into one.

Each stage shows the rationale for treatment and the conditions for moving on to the next stage. Medical staff can consult it at whatever level of detail they need, and for patients it becomes a map that tells them where they are now and how things will proceed from here. We can now see the possibility of automatically generating, from real data, the pathways that until now have been made by hand.
4. Discussion: "What is not written cannot be extracted"
We received many questions and comments from the floor. The main points were as follows.
Data quality and fill rate: Research needs a dataset suited to its purpose. It was pointed out that the fill rate and the quality should be made visible before analysis, and that a mechanism to assure quality is wanted.
Connecting to international standards: There was a request that the JSON master be put in a form that can be converted to an international common data model.
Differences between institutions: For a disease such as myocardial infarction, where the range of treatment choices is wide, the content varies with each institution's areas of strength. Mr. Kato replied that, if anything, it will become possible to compare and visualize those differences. The current data are provided, within the scope of the Act on the Protection of Personal Information, by three institutions: Kyoto University, Kameda Medical Center, and Keiju Medical Center.
The process leading up to a diagnosis: In real clinical practice, the process before a diagnosis is confirmed is long, and treatment is sometimes started with several candidates still open. One participant asked that this, too, be incorporated into the pathways.
Raising the quality of the chart on the spot: One institution uses an LLM to audit the quality of the chart in real time during care, showing the missing information on screen and prompting the clinician to add it. It reported that the quality of documentation has clearly improved.
Permissions for AI agents: Dr. Yokota answered that even when control is exercised through prompts and the like, it is ignored with a certain probability, so reliable control should be implemented by mechanical means, such as at the OS level. He also said that the mainstream approach now is not to train the model on sensitive information but to have it refer to that information when needed.
On the fill-rate problem, Yoshihara expressed the view that this is an "upstream problem" (in the sense of upstream and downstream). If it is not written at the very source, nothing can be done. In the past, template-based entry was tried in EHRs, but the number of templates exploded and the operation broke down.
Now, however, we know that the information can be picked up from the text. If so, might the fill rate not rise considerably simply by showing keywords on the screen where the progress note is written and prompting the clinician to record them? And if there were a mechanism for getting test results and the like out of departmental systems as character strings, in whatever format, the situation should change greatly.
Closing remarks
The JSON master is a collection, organized from actual data, of "what is written in practice." openEHR archetypes, on the other hand, define medical information in extremely fine detail. From the standpoint of international commonality as well, I believe that linking the two is a good path forward.
To sum up what this session made visible:
We have reached the stage where open Japanese LLMs running closed within the hospital can structure progress notes and extract even the rationale and the outcomes.
What decides success or failure is the JSON master, which defines the items clinicians need, and verification with real data.
The remaining challenges are assuring fill rate and quality, finding ways to increase documentation itself, dealing with differences between institutions, connecting to international standards, and controlling the permissions of AI agents.
The full-scale discussion with clinicians from the four domains will begin once the databases have been completed. We will continue this work.
Session information
46th Joint Conference on Medical Informatics (27th Annual Meeting of the Japan Association for Medical Informatics), organized session "Building a Knowledge Base from EHR-Derived Clinical Data (2)"
Friday, November 13, 2026, 9:00–10:30, Sapporo Convention Center
Speakers: Hiroyuki Yoshihara (Kyoto University), Rio Yokota (Institute of Science Tokyo), Yasuyuki Kato (PRiME-R)
This research is being conducted as part of the Health, Labour and Welfare Sciences Research Grant project (Research Program on ICT Infrastructure Development and Artificial Intelligence Implementation for Clinical Research) "Research toward Establishing a Methodology for Outcome Extraction Using Large Language Models (LLMs) for Evaluating the Efficacy and Safety of Pharmaceuticals and Other Medical Products" (24AC0401; principal investigator: Manabu Muto, Kyoto University). There are no companies or other entities with a conflict-of-interest relationship to disclose in connection with these presentations.
This article was compiled from a transcript of the recording made on the day and from the presentation slides. The slides are reproduced with the consent of each speaker.
Contact:
Hiroyuki Yoshihara, M.D., Ph.D.
Professor Emeritus, Kyoto University and University of Miyazaki
drlob@mac.com
Information related to this project:
References and reference materials (Word file):
A PDF summary of this article is available here:
Contact
Hiroyuki Yoshihara
Professor Emeritus, Kyoto University and University of Miyazaki
drlob@mac.com