Repository navigation
Using a de-identified CDM #443
|
Hi Nic and colleagues Our clinical data warehouse (DW) takes responsibility for creating a de-identified schema itself, as multiple downstream applications will use it. Using this de-identified schema I obtain results that diverge between Leaf and a DBMS client (DBeaver). E.g., searching for persons over 55, Leaf returns 1 patients (sic). But the same query issued directly against the dbms obtains 4.3M patients, which makes sense in a dbms of 13M: My suspicion is that the problem is caused by the type of person_id. It's a binary (32 long) field, which is the hashed, de-identified version of the PHI person_id. Can Leaf handle this? Thanks |
Replies: 2 comments 5 replies
|
Hi @artgoldberg, Immediately after running the query in the Leaf UI, can you check the LeafDB SELECT TOP 1000 C.PersonId, Q.Owner, Q.Created
FROM app.Query AS Q
INNER JOIN app.Cohort AS C
ON Q.Id = C.QueryId
WHERE Q.Created = (SELECT MAX(Q2.Created)
FROM app.Query AS Q2)The The Leaf API does a very simple ToString() call to retrieve the patient identifiers from the clinical database while iterating through results returned from the query. I can't think of any reason why the API would mis-count. Hopefully this will give us some clues. Best, |
|
With help from Nic @ndobb we have resolved this problem by transforming all of the The transformations are incorporated into the This transformation is applied to each of the current and planned clinical domains in our system that will be queried by Leaf, as shown in the 1_sqlsets.sql script in our clone of the leaf-scripts repo. Arthur |

With help from Nic @ndobb we have resolved this problem by transforming all of the
BINARY(32)de-identified person ids in our de-identified CDM into 64 character strings when the person ids are first obtained by Leaf.The transformations are incorporated into the
SqlSetFromfield of theLeafDB.app.ConceptSqlSet, which specifies the tables that contain data from OHDSI clinical domains which Leaf queries. For example, if the type of the person id was an OMOP standard-compliantINT, then Leaf queries that query conditions in our system would use aConceptSqlSet.SqlSetFromvalue ofomop.cdm_deid.condition_occurrence. To transformBINARY(32)de-identified patient ids into 64 character strings …