From 932266376748c8e85c36669b366fa1d9fa254357 Mon Sep 17 00:00:00 2001
From: Michael Boniface <m.j.boniface@soton.ac.uk>
Date: Wed, 26 Feb 2025 18:39:14 +0000
Subject: [PATCH] fix: added omop cdm version to the omop version file at 5.4.
 It's not clear how we know what version the downloaded omop files are but our
 assumption is that the downloads are the latest version. Closes #32

---
 acmc/omop.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/acmc/omop.py b/acmc/omop.py
index 744dc49..4b8cc4c 100644
--- a/acmc/omop.py
+++ b/acmc/omop.py
@@ -16,7 +16,9 @@ logger = logging_config.setup_logger()
 
 # constants
 VOCAB_PATH = Path("./vocab/omop")
-DB_PATH = VOCAB_PATH / "omop_54.sqlite"
+OMOP_CDM_Version ="54"
+OMOP_DB_FILENAME = f"omop_{OMOP_CDM_Version}.sqlite"
+DB_PATH = VOCAB_PATH / OMOP_DB_FILENAME
 VERSION_FILE = "omop_version.yaml"
 VERSION_PATH = VOCAB_PATH / VERSION_FILE
 EXPORT_FILE = "omop_export.db"
@@ -24,6 +26,7 @@ EXPORT_FILE = "omop_export.db"
 vocabularies = {
     "source": "OHDSI Athena",
     "url": "https://athena.ohdsi.org/vocabulary/list",
+    "cdm_version": OMOP_CDM_Version,        
     "version": "",
     "vocabularies": [
         {"id": 1, "name": "SNOMED"},  # No license required
-- 
GitLab