Skip to content
This repository was archived by the owner on Jan 14, 2020. It is now read-only.

Commit 07ee047

Browse files
authored
Merge pull request #57 from fielded/fix-transform-stockcount
fix: pass service object to transform
2 parents 9d58df6 + abd17df commit 07ee047

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/translator/translator.service.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import VANApiTools from '@fielded/van-stock-count-api-tools'
22

33
class TranslatorService {
44
translate (data, version) {
5-
const stockCountRecord = VANApiTools.docToStockCountRecord(data)
5+
const service = {
6+
id: 'program:immunization:service:immunization',
7+
program: { reportingPeriod: 'weekly' }
8+
}
9+
const stockCountRecord = VANApiTools.docToStockCountRecord(data, service)
610
return VANApiTools.translateReport(stockCountRecord, version)
711
}
812
}

0 commit comments

Comments
 (0)