|
|
|
@ -169,7 +169,8 @@ def init (**_args) :
|
|
|
|
|
_name = "$"+".".join([table,field_name])
|
|
|
|
|
project[field_name] = {"$ifNull":[_name,""]} #{"$cond":[{"$eq":[_name,None]},"",_name]}
|
|
|
|
|
project["_id"] = 1
|
|
|
|
|
pipeline = [{"$match":{"procedures":{"$nin":[None,'']}}},{"$unwind":"$"+table},{"$project":project}]
|
|
|
|
|
# pipeline = [{"$match":{"procedures":{"$nin":[None,'']}}},{"$unwind":"$"+table},{"$project":project}]
|
|
|
|
|
pipeline = [{"$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
|
|
|
|
|