Patient 360 on the Databricks Lakehouse with Zero-ETL Graph Analytics and PuppyGraph
Summary
- Zero-ETL graph layer: transforms patient-journey questions into short graph traversals instead of SQL joins.
- Ontology mapping: provides smaller, self-explaining context for agents than raw table descriptions.
- Unified graph: connects OMOP models and PostgreSQL for cross-system patient risk investigation.
Patient 360 on the Databricks Lakehouse with Zero-ETL Graph Analytics and PuppyGraph

Talk by Weimo Liu, CEO, PuppyGraph
The fastest way to build a patient 360 is a zero-ETL graph layer over the lakehouse tables you already have: PuppyGraph models claims, labs, pharmacy and visit data as Patient, Condition, Visit and Prescription nodes, turning patient-journey questions into short graph traversals instead of 50-line SQL joins. This video compares SQL joins with graph queries for identifying high-risk patients, and shows why an ontology mapped onto Unity Catalog tables gives AI agents a smaller, self-explaining context than raw column names.
Weimo Liu, CEO of PuppyGraph, explains why healthcare data stays siloed and why identifying high-risk patients requires linking the whole journey: Patient, Condition, Visit, Prescription. He compares SQL and graph queries, then shows why an ontology gives AI agents a smaller, self-explaining context than hundreds of table and column descriptions. Because Unity Catalog already organizes the physical layer, the ontology maps onto existing tables, and generated queries can be validated against it so results are reproducible and self-correcting. A demo on the OMOP common data model connects to PostgreSQL, builds a unified graph, and lets an agent investigate patient risk, with queries you can reuse.
Chapters
00:00Introduction00:35Why patient data is fragmented across claims, labs and pharmacy02:02Why high-risk patients need the full patient journey02:31Healthcare graph: nodes, edges and relationships04:05SQL joins vs graph queries04:58Why AI agents need an ontology, not column names07:09Mapping the ontology onto Unity Catalog tables08:01Validating generated queries against the ontology08:51Agents investigating patient risk with graph queries12:30Demo: OMOP data model as a graph13:23Connecting PostgreSQL and other sources into one unified graph14:56Asking an agent about a patient's journey
FAQs
Why are patient records fragmented?
Patient data exists in separate systems: claims in one, labs in another, pharmacy in a third. Identifying high-risk patients requires linking the whole journey across all these sources.
How do graph queries help patient 360?
Instead of writing 50-line SQL joins linking patients, conditions, visits and prescriptions, graph queries let agents traverse relationships directly. Patient nodes connect to Condition, Visit and Prescription nodes through edges.
What is an ontology in healthcare AI?
An ontology maps business concepts (Patient, Risk, Visit) onto your Unity Catalog tables and columns. This gives agents a smaller, self-explaining context than raw table names and helps validate generated queries.
Can I connect multiple healthcare databases?
Yes—the demo connects PostgreSQL and other sources using the OMOP common data model to build a unified graph where agents can investigate patient journeys across many systems.
Full transcript
00:00 Introduction
Thank you so much for the opportunity and we're glad to have the opportunity to share about our experience with some of the biggest companies in the healthcare industry. And today we will share something about building patient 360 on Databricks with zero ETL references. And since we work with some of the largest healthcare company, and they share some challenges they are meeting. Why is that the data source fragment?
00:35 Why patient data is fragmented across claims, labs and pharmacy
They have a bunch of data from claims labs, pharmacy, and also there are too many systems, like provider system and care management, and every company have different ones. And at the same time, big companies in the healthcare industry really like to acquire small companies. And the areas of our company have a different database, have different data stack, but all the data are from the same patient and then they want to see the connection and the insight of that.
And so for the patient data, when people are trying to do a patient 360, there are a lot of challenges. One is that the data are expensive, they pay a lot of money to get it, but most of the data have been never utilized. And some of them have never been read before. And at the same time, if you want to have a patient journey, you need to read the data from different tables, from different data sources. and it spans many systems.
So it's very hard to have critical risk signals because usually the combination generates insight, not a single record. A single row or single column cannot show the information. Then we need clinical insights, like high-risk patients. It's very hard to identify because only when you have all the information about this patient, you can have accurate prediction. And then even some of them can access all the data and pull all the data into one single data source, you'll still run very complex SQL query, maybe 50 lines, maybe 100.
02:31 Healthcare graph: nodes, edges and relationships
Then straightforward solution for this is that you have a healthcare and audiograph. And there are a lot of benefits. Firstly, that it's no longer just a table of columns. the first class citizens are no longer just one row, one column. You can also have relations as first class citizens. You have nodes like patient, provider, visit, condition, medications. At the same time, you have edges like which patient visits which provider.
And also the prescribed, ignored with, and referred to. These other relations are also very important to get useful information. And then if you're trying to write SQL to have some pattern like from patient to condition to visit to provider to prescription, you need to draw a lot of tables. And sometimes you don't know which table to draw because there's no semantics there. Even how not mentioned agent, even the human being, it's very hard to get what it means. the meaning and then you read a lot of documents and you ask your teammates sometimes the table the one who created the table already left and you don't know who to ask but now you still need to maintain it to read it and maintain it so the heart is hard to write but the right is not the biggest problem it's no one understand after the writer left so there's a simple conversation between the SQL and the graph query.
04:05 SQL joins vs graph queries
You can see on the right side, the interesting part is that there is no longer a join and you don't need to know which column can join on which column. And then you can just traverse along edge. For example, this arrow has condition. You don't know what's the underlying tables and what's underlying column. But you just have an edge. Azure itself is self-explaining about the semantic, since the highest condition, the name expressed the semantic.
And also there are diagnostic during, and it's really mean diagnostic during. It's not like drawing a condition table with the table, and let me explain what is the meaning. Then when you build an agent based on our customer feedback, ontology is all our agent needs. The agent don't care about the column names, don't care about table names, but from most of the failed technical project, the customer share some learning to us is that they have to have a very big contact window.
04:58 Why AI agents need an ontology, not column names
Like this column is a semantic of what, and they have a very long description. Like even you only have 50 tables, that you may have a 1500 column. You need to explain why by one, like this column meaning what. And this column can be joined with what other tables, which column, and what's the semantic. And also, you need to explain one by one. After that, you will have a big window. And if the window is big, and then sometimes only the beginning of the context and the end of the context will affect.
All the things in the middle will be missed. And then when you generate a query, it's very hard to have an accuracy one. And even if it generates some SQL, and you cannot make sure it's correct. Since if you join the wrong table, like you join the patient table with maybe some doctor salary, you can still gather results. The agent don't know it's wrong. There is no error message. Just return a number. But now, you can just only provide the ontology.
Since ontology means the semantic of a data entity and the relation between them. And we can try to rename all this to try to make it a self-explan, like a patient means patient, and condition means condition. And the edge of a has condition means has condition. So you're trying to rename all this, and the self-explanning can make the context much smaller. You can imagine that if you have all this in table format and describe each column one by one, the context will be much bigger than this.
And so you may think about what if you build this? It's maybe if you want an already graph tool, you want a graph database, you have a lot of money and all boarding process, but actually it's not because the sense to data rates, they build a perfect product like the other tables and the unique catalog. They already organize all the data in physical layer with data governance. And we can just leverage a graph layer on top of it.
07:09 Mapping the ontology onto Unity Catalog tables
And like this table is type of nodes, that table is type of edge, and how mapping to the tables, and what's the connection between different entities. These all are deterministic. Shouldn't be teach AI and then that you know that this table can join that table. it should be handled by engine. And then the AI only need to understand the semantic and generate the graph pattern with what you want. And after that, you can run graph query generated by the agent.
08:01 Validating generated queries against the ontology
And if the graph query is not correct, it will check the ontology graph, if it align with it or not. Then if there's no edge, for example, between the doctor's salary to the patient, then we will just reject it, send the error message back to larger model. And then we can have a clear wrong message and generate a new query. Until it's accessible, it will be run. Which means all the query runs align with ontology, which makes the system robust and reproducible.
We help, it's sort of simple, but it's very effective. We help a lot of big customers with solvable table make it in production. And after that, you can have the patient 3CTA insight. The more interesting part is that, Sometimes it's not just a translator, translate the nature language to query. We can just ask some high level question, like for one patient, what's a potential risk for him? And then because the learner model have the general knowledge, then and also have the ontology of your data.
08:51 Agents investigating patient risk with graph queries
So he can, sorry. He can know, the AI can know that, oh, this is what we have, and what's the general knowledge about the patient health risk. And then he will track different entity by himself, and then divide the main task into some small ones, and like if there are potential for diabetes, there are potential for cancer. And then a lot of subtasks generate a lot of subquery. And finally, they will summarize all of this and give your report.
So the short question you ask, you can have even more context and a higher level summary. So that's the benefits we can have. Like first, we can have the relation and context. It's much smaller in the context, but all the information is not visited. every word in the context is useful. It's not like this column can join that column. It should be handled by engine instead of AI. And at the same time, we can do multi-hard pass.
And I think some of you already tried some type of SQL, and maybe you have the same experience as our customer, like more tables, the higher error rates. But if you can just always go along with ontology graphs, And it's a guardrail and you can make sure that all the queries along with it, you can go with as many hops as you want. And the last one is that after that, you have an added-ready infrastructure. So the audit is out of a Lara model.
You don't need to only rely on a Lara model to generate the aggregated query. Even sometimes you generate the wrong query, it will be audit outside. In this case, you don't need to always use the most expensive model. You can just use some open source one, and maybe the accuracy of the generated query is not good enough. But we can just audit outside, and then send back and have a self-correcting. After several retry, you can have the correct answer.
In this case, the cost will be much lower, and you can save a lot of token. And why PICAN 360 matters? So as myself with the data info guys, so it's just my two cents, learn from our customer, and I think all you guys are domain experts in this area and have much deeper knowledge with me. Like, I think the first one is identify high risk patients across the visit and conditions, and also track medications, provider and care guests.
And the last one is that clinical thinking follows connected patient journeys. And thank you. And this is, please follow our web page, and we can share more information. And also, I have a recording video for the demo. And usually, we just do the live demo and let our audience ask a random question. But this time, it's pretty short. So I'm trying, it's a lightning talk. So I just play a video to save time. But you can definitely reach out to us And on the same data model, like it's a demo in OMOP, a common data model is a standard one in the healthcare industry.
12:30 Demo: OMOP data model as a graph
And you can just ping us on LinkedIn and we can schedule a live demo. You ask the question you want to ask. Here is the dataset. And we're modeling all this as a graph. You can see that is a concept, procedure, and visit patient. Like a patient is insured by the payer plan. And also the patient visits the provider. And also the provider employed by the care site. And the care site has a location. And all the concept has been connected to each other.
13:23 Connecting PostgreSQL and other sources into one unified graph
And then it's ontology. And after that, we can show that how we connect this here, we can just connect to PostgreSQL, but at the same time, we can connect as many as data sources as possible, like some tables in Postgres, sometime in Delta Lake, which is the data storage, and then we can connect through unique catalog and create another catalog, and then one graph can query multiple data source at the same time, you will have one unified graph on all your tables in different places.
And also we provide an auto tool to run some data sampling to detect your data and auto correct graph ontology for you. And then you can even over rename some of the column or skip some of the column if it's not useful. And then we can hear that we have . And then we can ask some random question here, like giving me common procedure underwent by a patient who died. And the concepts are linked to the code. And then we can generate a pattern instead of a SQL. we can see here like it's a graph pattern why that patient is died to death.
14:56 Asking an agent about a patient's journey
And also this patient visit, have this visit and there's an underwent procedure and the connectivity on the procedure node. And the procedure is a concept and then continues to the concept node. And after that, they will auto run the query and get some data here. And then finally give you the summarization about this question. Here's the result. We can see that sometimes it will, it's not a single query. Sometimes based on the results, it will be auto have some follow up. like this one.
As you know, here's the concept. Sorry, too fast. And then we can have a different concept and then give you some key concept. Based on our learning, usually the big, the learner model is strong enough to give you a lot of insights. Most of the time, the wrong result is not because the learner model is not powerful enough, but it's because you, they haven't had all the contacts, don't have enough information about your data.
So the efficient way that we're trying to provide as much as possible, but at the same time, a short way. Because when there are a lot of tedious information which is not useful, then we have lost our attention and generate some wrong information and overlook some useful one. And at the same time, because we generate some useful query And we output it, and you can copy this query for records for the future use. I think this is all for this demo.
And thank you so much.
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.