Closed kakampassi closed 1 month ago
Hi @kakampassi, I updated the pull request to include fixes for the OMOP demo above. Both in the notebook and the README.md
https://github.com/databricks-industry-solutions/dbignite-forked/tree/main/dbignite/omop#example
fhir_model=FhirBundles(path=TEST_BUNDLE_PATH)
cdm_model=OmopCdm(cdm_database)
FhirBundlesToCdm().transform(fhir_model, cdm_model, True)
Can you confirm this works on your end?
from dbignite.omop.data_model import * from pyspark.sql import functions as F
BUNDLE_PATH="s3://hls-eng-data-public/data/synthea/fhir/fhir/" cdm_database='dbignite_demo'
fhir_model=FhirBundles(BUNDLE_PATH) cdm_model=OmopCdm(cdm_database)
FhirBundlesToCdm(spark = spark).transform(fhir_model,cdm_model)
facing issue
TypeError: 'str' object is not callable File, line 8
5 fhir_model=FhirBundles(BUNDLE_PATH)
6 cdm_model=OmopCdm(cdm_database)
----> 8 FhirBundlesToCdm(spark = spark).transform(fhir_model,cdm_model)
File /Workspace/Users/software-license@calibo.com/dbignite/dbignite/omop/data_model.py:164, in FhirBundlesToCdm.transform(self, source, target, overwrite)
161 cdm_database = target.cdm_database
162 mapping_database=target.mapping_database
--> 164 entries_df = source.loadEntries()
166 person_df = entries_df.transform(entries_to_person)
167 condition_df = entries_df.transform(entries_to_condition)
File /Workspace/Users/software-license@calibo.com/dbignite/dbignite/omop/data_model.py:55, in FhirBundles.loadEntries(self)
53 def loadEntries(self):
54 if self.df is None:
---> 55 self.df = self.defaultResource(**self.args)
56 return self.df