支持私有化部署
AI知识库

53AI知识库

学习大模型的前沿技术与行业应用场景


医学GraphRAG案例研究:将医生记录转换为医学时序知识图谱

发布日期:2024-11-27 11:40:17 浏览次数: 2015 作者:知识图谱科技

摘要

该案例研究描述了如何将医生的病历转录转换为医学记录时序知识图谱,以进行更复杂的医疗数据分析和问题解答,并强调了WhyHow.AI的平台在该过程中的独特架构和优势。

Key Takeaways:

* 本研究使用合成医疗转录数据构建了一个时序医学记录知识图谱。

* 该知识图谱包含五种节点类型(病人、观察、免疫接种、病情和遭遇类型)和六种文本块类型,这些文本块包含与三元组相关的关键信息摘要。

* WhyHow.AI平台的独特之处在于其向量搜索、独立的三元组对象和JSON数据格式支持,这使得构建和查询时间知识图谱更加高效和准确。

* 该系统能够回答关于病人治疗、历史病历分析等复杂问题,并展示了其在多病人分析和跨多份转录本分析中的优势。

* 通过Claude等LLM工具,可以将非结构化文本数据转换为WhyHow.AI平台可接受的JSON格式,方便知识图谱构建。

* 与仅限向量的RAG系统相比,该方法在多病人分析和跨多份病历分析中具有显著优势。

*  整个过程耗时25个开发小时,其中大部分时间用于迭代完善知识图谱的模式。

正文

新颖的知识图谱架构概述

1. Patient -> EncounterType
Triple: (Patient) -[had_encounter]-> (EncounterType)
- Chunk_ids link to specific visit instances
- Example Chunk: "Annual physical on 2024–01–15. BP 120/80, routine screenings
updated."


2. Patient -> Condition
Triple: (Patient) -[has_condition]-> (Condition)
- Chunk_ids link to condition episodes
- Example Chunk: "Diagnosed with hypertension on 2020–03–10. Status: active.
Managed with medication."


3. Patient -> Immunization
Triple: (Patient) -[received]-> (Immunization)
- Chunk_ids link to administration records
- Example Chunk: "Influenza vaccine administered on 2024–01–15."

4. Patient -> Observation
Triple: (Patient) -[has_measurement]-> (Observation)
- Chunk_ids link to measurement instances
- Example Chunk: "2024–01–15: Blood Pressure 120/80 mmHg, Weight 70kg."

PATIENT SUMMARY
Name: Joseph Crona
DOB: 2022–08–29
Age: 2 years
Gender: male
MRN: #dbfbaa

CURRENT MEASUREMENTS (as of 2024–08–05)
Height: 84.1cm (50th percentile)
Weight: 14.5kg (52nd percentile)
ALLERGIES
No known allergies

IMMUNIZATIONS
- DTaP: 2022–12–05, 2023–02–06, 2023–03–06, 2024–02–05
- Hepatitis A: 2023–11–06
- Hepatitis B: 2022–08–29, 2022–10–03, 2023–03–06
- Hib: 2022–12–05, 2023–02–06, 2023–11–06
- Influenza: 2023–03–06, 2024–08–05
- MMR: 2023–11–06
- PCV13: 2022–12–05, 2023–02–06, 2023–03–06, 2023–11–06
- Polio: 2022–12–05, 2023–02–06, 2023–03–06
- Rotavirus: 2022–12–05, 2023–02–06
- Varicella: 2023–11–06

MEDICAL HISTORY
- Viral sinusitis (disorder)
Onset: 2023–03–13
Status: resolved
Outcome: Resolved

GROWTH & DEVELOPMENT
- 2023–11–06: Body Weight: 12.7 kg
- 2024–02–05: Body Height: 79 cm
- 2024–02–05: Body Weight: 13.4 kg
- 2024–08–05: Body Height: 84.1 cm
- 2024–08–05: Body Weight: 14.5 kg
Development: Age-appropriate milestones met
- Gross motor: Age appropriate
- Fine motor: Age appropriate
- Language: Age appropriate
- Social: Age appropriate

PREVENTIVE CARE
Well-Child Visits:
- 2024–08–05: 2yo well visit - Development on track
- 2024–02–05: 1yo well visit - Development on track
- 2023–11–06: 1yo well visit - Development on track
- 2023–08–07: 1yo well visit - Development on track
- 2023–05–08: 9mo well visit - Age appropriate exam completed
- 2023–02–06: 6mo well visit - Age appropriate exam completed
- 2022–12–05: 4mo well visit - Age appropriate exam completed
- 2022–10–03: 2mo well visit - Age appropriate exam completed
- 2022–08–29: Newborn visit - Normal exam

FAMILY HISTORY
Mother: Healthy
Father: Healthy
Siblings: None documented

SOCIAL HISTORY
Living Situation: Lives with parents
Development: Meeting age-appropriate milestones
Sleep: Age-appropriate pattern
Nutrition: Age-appropriate diet

Knowledge Graph Structure (Timeless):


Nodes:
1. Patient Node
Structure: {
name: str, # "John Smith"
label: "Patient",
properties: {
gender: str, # FHIR gender
patient_type: str# "adult" | "pediatric"
},
chunk_ids: List[str]# Links to demographic chunks
}


2. EncounterType Node
Structure: {
name: str, # "Well-child visit" | "Annual physical"
label: "EncounterType",
properties: {
category: str,# "preventive" | "acute" | "chronic"
specialty: str# "primary_care" | "pediatrics" | "emergency"
},
chunk_ids: List[str]# Links to visit pattern chunks
}


3. Condition Node
Structure: {
name: str, # "Essential hypertension"
label: "Condition",
properties: {
category: str, # "chronic" | "acute" | "resolved"
system: str, # "respiratory" | "cardiovascular" | etc
is_primary: bool # True if primary diagnosis
},
chunk_ids: List[str]# Links to condition history chunks
}


4. Immunization Node
Structure: {
name: str, # "DTaP" | "MMR"
label: "Immunization",
properties: {
series: str, # "primary" | "booster"
target: str# "tetanus" | "measles" | etc
},
chunk_ids: List[str]# Links to immunization records
}


5. Observation Node
Structure: {
name: str, # "Blood Pressure" | "Height"
label: "Observation",
properties: {
category: str, # "vital" | "lab" | "growth"
unit: str # "mmHg" | "cm" | etc
},
chunk_ids: List[str]# Links to measurement records
}


Relations:
1. Patient -> EncounterType
Triple: (Patient) -[had_encounter]-> (EncounterType)
- Chunk_ids link to specific visit instances


2. Patient -> Condition
Triple: (Patient) -[has_condition]-> (Condition)
- Chunk_ids link to condition episodes


3. Patient -> Immunization
Triple: (Patient) -[received]-> (Immunization)
- Chunk_ids link to administration records


4. Patient -> Observation
Triple: (Patient) -[has_measurement]-> (Observation)
- Chunk_ids link to measurement instances


5. Condition -> EncounterType
Triple: (Condition) -[managed_in]-> (EncounterType)
- Links conditions to typical encounter types


6. Immunization -> EncounterType
Triple: (Immunization) -[given_during]-> (EncounterType)
- Links vaccines to visit types

You are an AI assistant specializing in medical records analysis. 
Use the following information to answer the user's question.
The information is derived from a knowledge graph of patient medical records.

Relevant Nodes (these represent patients, encounters, and conditions):
{
node_context}

Relevant Relationships (these show connections between patients,
encounters, and conditions)
:
{
triple_context}

Relevant Medical Records:
{chunk_context}

Answer the question using the following steps:
1. Analyze the medical information, focusing on the specific topic of the
question
2. Identify key medical events, conditions, and temporal relationships
3. Formulate a clear and concise answer that directly addresses the
question
4. If there are any uncertainties in the medical information, mention
them explicitly
5. If you don't have enough information to answer confidently, say so
6. Consider temporal relationships between medical events
7. It's currently {datetime.now().strftime("%Y-%m-%d")}. Consider this
when interpreting dates
8. Maintain patient privacy by using only first names or initials when
necessary

Question: {question}

To determine the types of well-child visits and immunizations Joseph Crona 
received in his first year, we need to consider the relevant medical events
and their timing. Joseph was born in 2022, and it is currently November 9, 2024.
Therefore, his first year would span from 2022 to 2023.

**Well-Child Visits:**
- Joseph had an encounter categorized as a "Well child visit," which falls
under preventive care in pediatrics. This type of visit is typically part of
routine check-ups for children, especially in their first year.

**Immunizations:**
During his first year, Joseph received the following immunizations, all of
which are common for pediatric patients:
1. **Hep B, adolescent or pediatric** - Completed
2. **Hib (PRP-OMP)** - Completed
3. **Rotavirus, monovalent** - Completed
4. **IPV (Inactivated Poliovirus Vaccine)** - Completed
5. **DTaP (Diphtheria, Tetanus, and Pertussis)** - Completed
6. **Pneumococcal conjugate PCV 13** - Completed

These immunizations are typically administered during the first year of life
as part of the standard immunization schedule for infants.

In summary, Joseph Crona received a well-child visit and completed a series of
standard pediatric immunizations during his first year.

To address the question regarding the sequence of encounters and observations 
for patients with otitis media, we will focus on the medical records of Miles
Dickinson, as he is the patient identified with this condition.

1. **Condition Onset:**
- Miles Dickinson was diagnosed with otitis media on June 10, 2024. The
condition is currently resolved.

2. **Encounters:**
- Miles had two types of encounters recorded:
- **Well Child Visit:** This is categorized as a preventive encounter in
pediatrics.
- **Encounter for Symptom:** This is categorized as a follow-up encounter in
primary care.

3. **Observations:**
- Various observations were recorded for Miles, including:
- **Pain Severity:** Recorded multiple times with scores ranging from 0 to 4.
- **Body Weight:** Recorded with values ranging from 3.2 kg to 8.2 kg.
- **Head Occipital-frontal Circumference and Percentile:** Recorded with
specific values in cm and percentiles.
- **Heart Rate:** Recorded with values ranging from 61 to 100 beats per minute.
- **Respiratory Rate:** Recorded with values ranging from 12 to 16 breaths per
minute.

4. **Temporal Sequence:**
- The otitis media diagnosis occurred on June 10, 2024. Observations and
encounters before this date may have been related to other conditions or
routine check-ups. Observations and encounters after this date could be
related to follow-up care for otitis media or other health assessments.

5. **Conclusion:**
- The sequence of encounters and observations for Miles Dickinson includes
preventive and follow-up encounters, along with various health observations.
The specific sequence related to otitis media is not detailed in terms of exact
dates for each observation or encounter, but the diagnosis date provides a
temporal marker for understanding subsequent medical activities.

If more detailed temporal data on each observation and encounter were
available, a more precise sequence could be established. However, based on
the current information, this is the overview of the sequence related to
otitis media for Miles Dickinson.

Based on the provided medical records, there are two patients diagnosed with 
acute bronchitis: Maximo Swaniawski and Bennie Herman.

### Onset Patterns:
- **Maximo Swaniawski**:
- Onset dates for acute bronchitis:
- October 24, 2014
- November 7, 2015
- November 29, 2018
- **Bennie Herman**:
- Onset dates for acute bronchitis:
- October 24, 2014
- November 7, 2015
- November 29, 2018

### Typical Onset Patterns:
The onset dates for both patients are identical, suggesting a pattern where
acute bronchitis episodes occurred in late October or November. This could
indicate a seasonal pattern, possibly related to colder weather or other
seasonal factors that might contribute to respiratory conditions.

Both patients have had their conditions resolved, indicating that the episodes
of acute bronchitis were acute and not chronic.

To determine which patients had both viral sinusitis and bronchitis, 
we need to analyze the conditions associated with each patient and their
onset dates.

1. **Maximo Swaniawski**:
- Conditions: Acute bronchitis
- Earliest onset of bronchitis: 2014–10–24
2. **Cassandra Monahan**:
- Conditions: Viral sinusitis
- Earliest onset of sinusitis: 2014–12–12
3. **Bennie Herman**:
- Conditions: Acute bronchitis
- Earliest onset of bronchitis: 2014–10–24
4. **Deangelo Price**:
- Conditions: Viral sinusitis
- Earliest onset of sinusitis: 2014–12–12
5. **Joseph Crona**:
- Conditions: Viral sinusitis
- Earliest onset of sinusitis: 2014–12–12

From the information provided, none of the patients have both viral sinusitis
and bronchitis. Each patient has either one condition or the other, but not
both. Therefore, there are no patients with both conditions, and consequently,
no earliest onset dates for both conditions in a single patient.


53AI,企业落地大模型首选服务商

产品:场景落地咨询+大模型应用平台+行业解决方案

承诺:免费场景POC验证,效果验证后签署服务协议。零风险落地应用大模型,已交付160+中大型企业

联系我们

售前咨询
186 6662 7370
预约演示
185 8882 0121

微信扫码

添加专属顾问

回到顶部

加载中...

扫码咨询