MedCodeMCP / src /merge_kb.py
gpaasch's picture
repo structure cleanup (https://chatgpt.com/share/6841a61b-3dfc-8004-aec7-9c48fba857fd)
8e61455
raw
history blame contribute delete
388 Bytes
# merge_kb.py
import json
with open("symptom_to_icd.json") as f:
symptom_to_icd = json.load(f)
with open("icd_to_description.json") as f:
icd_to_description = json.load(f)
kb = {
"symptom_to_icd": symptom_to_icd,
"icd_to_description": icd_to_description
}
with open("knowledge_base.json", "w", encoding="utf-8") as f:
json.dump(kb, f, indent=2, ensure_ascii=False)