Skip to content

Submission uploader config

emmagcta edited this page Feb 28, 2019 · 1 revision

https://github.com/ctagroup/home-app/blob/feature/submission-uploader/imports/__tests__/fixtures/submissionUploader.js

An example uploader config file:

[
     {
		"title": "Recordset ID (4093-recordset_id)",
		"type": "rowId"
	},
	{
		"title": "Client Detail",
		"type": "clientSourceSystemId"
	},
	{
		"type": "startDate"
	},
	{
		"type": "endDate"
	},
	{
		"title": "Q01 Detail Clarity",
		"type": "question",
		"questionId": "73163b83-f0c5-4817-bd00-75b013a441bd",
		"sectionId": "52986609-a1f0-4ed2-a499-d6d9fa724270"
	},
	{
		"title": "Q03 Detail",
		"type": "question",
		"questionId": "b3f5cc10-5d6e-4d96-83d5-a7e99d165102",
		"sectionId": "52986609-a1f0-4ed2-a499-d6d9fa724270"
	},
	{
		"title": "Q05 Detail",
		"type": "question",
		"questionId": "ca9f7127-760b-4ddb-a519-29a68147d9bc",
		"sectionId": "52986609-a1f0-4ed2-a499-d6d9fa724270"
	},
	{
		"title": "If Other, please specify(4109)",
		"type": "question",
		"questionId": "ca9f7127-760b-4ddb-a519-29a68147d9bc",
		"sectionId": "52986609-a1f0-4ed2-a499-d6d9fa724270"
	}
]

For each column in the csv file is matched to an item in the config. In the example above, 1st column holds rowId, second column holds clientId, columns 5+ hold question answers.

Each item must contain a type:

Type Other fields Notes
rowId left-aligned not used
clientSourceSystemId Values in this column are used to search for HMIS clients by sourceSystemId for now only searching by source system id is supported
startDate not used
endDate not used
question questionId - HMIS question Id sectionId - HMIS section Id for the questionId If multiple items have the same questionId, the question responses for the latter value will override the previous one.

To skip a column, use {} as an item.

Clone this wiki locally