bug fix with export, not all claims have procedures
This commit is contained in:
parent
0aa6eb3d5d
commit
46a1f212f2
|
@ -169,7 +169,8 @@ def init (**_args) :
|
||||||
_name = "$"+".".join([table,field_name])
|
_name = "$"+".".join([table,field_name])
|
||||||
project[field_name] = {"$ifNull":[_name,""]} #{"$cond":[{"$eq":[_name,None]},"",_name]}
|
project[field_name] = {"$ifNull":[_name,""]} #{"$cond":[{"$eq":[_name,None]},"",_name]}
|
||||||
project["_id"] = 1
|
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)}]
|
r += [{"table":table,"mongo":{"aggregate":TABLE_NAME,"cursor":{},"pipeline":pipeline,"allowDiskUse":True},"sql":create(table=table,key='claim_id',fields=fields)}]
|
||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
|
@ -179,7 +179,7 @@ class Reader(Worker):
|
||||||
try:
|
try:
|
||||||
self.reader = transport.factory.instance(**self._info) ;
|
self.reader = transport.factory.instance(**self._info) ;
|
||||||
self.rows = self.reader.read(mongo=self.pipeline)
|
self.rows = self.reader.read(mongo=self.pipeline)
|
||||||
|
|
||||||
N = len(self.rows) / self.MAX_ROWS if len(self.rows) > self.MAX_ROWS else 1
|
N = len(self.rows) / self.MAX_ROWS if len(self.rows) > self.MAX_ROWS else 1
|
||||||
N = int(N)
|
N = int(N)
|
||||||
# self.rows = rows
|
# self.rows = rows
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ import sys
|
||||||
def read(fname):
|
def read(fname):
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||||
args = {
|
args = {
|
||||||
"name":"healthcareio","version":"1.6.2.14",
|
"name":"healthcareio","version":"1.6.2.16",
|
||||||
"author":"Vanderbilt University Medical Center",
|
"author":"Vanderbilt University Medical Center",
|
||||||
"author_email":"steve.l.nyemba@vumc.org",
|
"author_email":"steve.l.nyemba@vumc.org",
|
||||||
"include_package_data":True,
|
"include_package_data":True,
|
||||||
|
|
Loading…
Reference in New Issue