From 9b00473ba4e391dfe3c429abe95a80c74a9972cf Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Tue, 16 Feb 2021 11:55:18 -0600 Subject: [PATCH] bug fix: export function & filters --- healthcareio/export/export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/healthcareio/export/export.py b/healthcareio/export/export.py index 15d2196..a159c45 100644 --- a/healthcareio/export/export.py +++ b/healthcareio/export/export.py @@ -170,7 +170,7 @@ def init (**_args) : project[field_name] = {"$ifNull":[_name,""]} #{"$cond":[{"$eq":[_name,None]},"",_name]} project["_id"] = 1 # pipeline = [{"$match":{"procedures":{"$nin":[None,'']}}},{"$unwind":"$"+table},{"$project":project}] - pipeline = [{"$unwind":"$"+table},{"$project":project}] + pipeline = [{"$match": {table: {"$nin": [None, ""]}}},{"$unwind":"$"+table},{"$project":project}] r += [{"table":table,"mongo":{"aggregate":TABLE_NAME,"cursor":{},"pipeline":pipeline,"allowDiskUse":True},"sql":create(table=table,key='claim_id',fields=fields)}] return r