Skip to content

Commit

Permalink
Change report doc.type field to data_record
Browse files Browse the repository at this point in the history
Closes #30
  • Loading branch information
alxndrsn committed Oct 23, 2017
1 parent 06daae2 commit b1532f9
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medic-configurer-beta",
"version": "1.6.7",
"version": "1.6.8",
"description": "Configure Medic Mobile deployments",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/fn/csv-to-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module.exports = projectDir => {
function processReports(report_type, csv) {
const { rows, cols } = loadCsv(csv);
return rows
.map(r => processCsv('report', cols, r, { form:report_type }));
.map(r => processCsv('data_record', cols, r, { form:report_type }));
}

function processContacts(contactType, csv) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"form": "follow_up",
"type": "report",
"type": "data_record",
"chw_id": "32120a8b-9432-544b-ab61-2631440255ec",
"name": "Charlie Chalk",
"field": {
Expand All @@ -9,5 +9,5 @@
"notes": "A boisterous fellow",
"fam": "cc56b63e-aade-5e30-9f06-c4dcd31587ff"
},
"_id": "09e3215e-25fc-5960-9034-784d920db457"
"_id": "017648ca-a4cf-5171-93b7-852ed049e777"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"date_of_birth": "1987-12-03T00:00:00.000Z",
"phone": "+447890000001",
"child_count": 1,
"favourite_widget": "bd94f448-3f5c-5020-9fd0-32f702915ed8",
"favourite_widget": "a4e71523-2758-56a3-9fd0-fb5d1a280277",
"_id": "32120a8b-9432-544b-ab61-2631440255ec"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"form": "follow_up",
"type": "report",
"type": "data_record",
"chw_id": "93af26f8-af91-5a2c-ad2a-e6b92fab0e1c",
"name": "Donnie Darko",
"field": {
Expand All @@ -9,5 +9,5 @@
"notes": "A troubled youth",
"fam": "40f8bfc0-0757-5a7f-ba60-5abe0665b3c8"
},
"_id": "70e235bc-b23a-5b9a-addb-60e9d487e7e3"
"_id": "364c2a17-b249-5396-8733-586455e3be97"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"date_of_birth": "1979-01-31T00:00:00.000Z",
"phone": "+447890000002",
"child_count": 2,
"favourite_widget": "8c81a26a-8026-52a0-944c-65a0ffc2b291",
"favourite_widget": "dc10934a-64e1-5243-bd8c-74394a4c66c3",
"_id": "5398e690-22e2-576f-bac5-0389508d41a6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"date_of_birth": "1987-12-03T00:00:00.000Z",
"phone": "+447890000001",
"child_count": 1,
"favourite_widget": "bd94f448-3f5c-5020-9fd0-32f702915ed8",
"favourite_widget": "a4e71523-2758-56a3-9fd0-fb5d1a280277",
"_id": "93af26f8-af91-5a2c-ad2a-e6b92fab0e1c"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"form": "widget",
"type": "report",
"type": "data_record",
"code_name": "a694",
"description": "small and useful",
"_id": "bd94f448-3f5c-5020-9fd0-32f702915ed8"
"_id": "a4e71523-2758-56a3-9fd0-fb5d1a280277"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"form": "widget",
"type": "report",
"type": "data_record",
"code_name": "b912",
"description": "large and unwieldy",
"_id": "8c81a26a-8026-52a0-944c-65a0ffc2b291"
"_id": "dc10934a-64e1-5243-bd8c-74394a4c66c3"
}

0 comments on commit b1532f9

Please sign in to comment.