Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

User Story description:
Anchor
top
top

As a Submitter (i.e., Health Authority user), I would like to be able to submit forms in batch via a file upload functionality in order to save a significant amount of time when I have to submit data for multiple facilities/operators.

This Story focuses on the submission only. The following points describe the whole workflow for the file submission:

  • Once authenticated, a submitter should be able to select a form to which they have access, and then decide to submit this form either manually or, if the option is available, via file upload.

  • Once the file upload selected, the user can download the template for the submission

  • Once the user has filled out the file, they can now submit it using the “browse“ button to select the file or they can also simply drag and drop the file into the dedicated area on the screen.

  • Once the file pre-loaded, the user can confirm their submission by clicking the “submit“ button.

  • From there, the file will be parsed and validated using the validation rules defined by the form designer on each field. Every row within the file will be the equivalent of one form submission.

  • During the import and validation, the user is prompted with a loading screen

  • Once the validation completed, a message will appear on the user screen indicating the Successful file processing or the Failed file processing, in which case a validation report will be available for download. If the import was successful, then the user will see the current status of their submission to be “Review pending“

  • The validation report will point out the different issues found within the files (e.g. First name missing, must be provided. Or, Incorrect format for birthdate, format must be yyyy-mm-dd)

Only the section in bold is part of this User Story.

Business Rationale:

top page

Currently, Health Authorities gather data from multiple facilities/operators to then submit this data to the Ministry of Health.

It is important for the Health Authorities to gather this data first as it feeds their own system. The current issue is that the HAs have no easy way to submit the data to the Ministry of Health. They can only do so through time consuming and painful manual form entries. As a solution they would like to have the ability to make batch submissions through a file upload functionality.

Dependencies:

top page

[List potential dependencies with other User Stories or Tasks]

 

Technical Details:

top page

Questions:

  • Its is an all or nothing import. If one issue is found on one record, we do not insert the other valid records.

  • Front-end initial checks:

    • We accept only .csv files (comma separated values, including the header row)

    • We limit the size of the file to 10MB

    • We control the number of columns submitted. This should match the number of columns in the template

    • The column name should match to a field name.

  • Parsing:

    • We do not care about the order of the columns

    • We read the rows of the file one by one and try to create a form submission from each of them

    • As we parse the data we generate the Validation report containing the different errors identified when trying to enter a value for a given field

    • There shouldn’t be any actual submission if 1 error is detected. We only actually create the submissions if there is no error.

  • We will need to agree on the Validation Report format (it will be a .csv):

    • What will be the columns?

    • Example from other application:

We could add a column to identify an “error #” just in case the user needs additional support and it would make it easier .

We could add a column to identify the “value“ of the field that threw the error

If we are able to identify a “unique identifier“ in the form, then we could also have that ID in the Validation Report to better identify the row that threw an error.

  • We will need to think about how to manage interruptions:

    • If the processing is interrupted, how do we let the user know? What type of error is generated?

  • Audit need?

    • We will need to confirm whether we should keep track of all the attempts at uploading files for Audit purposes

Solution :

Let me resume what we are going to do in simple way :

  1. Read the form data and convert it to an csv empty .

  2. When the user upload the data check if the column name is match to form field.

  3. If every thing is OK we convert each row to form submission and convert them to a List of submission and transfer it to the server.

  4. if there is an error in a field format or field missing any thing else we abort the file submission and allow the submitter to download a file with a complete report .

First to generate the empty template csv file for a specific form for the submitter we can use this package “Vue-Json-CSV” from this command :

npm i vue-json-csv

This package allow you generate csv from json .

Next when the user upload the file we must read the data from file to analyse them to do that we can use this package “Papaparse” from this command

npm install papaparse --save-dev

This package is going to separate the header to the rows , so now you can check if header is compatible to the form by testing if the field is match and the number of column is equal .

How to generate the template csv file ?

Get the form, the extract all fields of the forms, create a JSON object with them and use the package vue-json-csv to generate the csv file .

How to read the csv file ?

Create A Drag-and-Drop File Uploader, catch the file use papaparse to convert the file to object.

Acceptance Criteria:

top page

[List the Acceptance Criteria]

#

Description

Notes

1

 I can choose to submit data using file upload

 The option should be offered to the user

2

 I can browse my files or drag and drop the file I wish to upload

.csv format only. Other formats will be rejected instantly

3

 I can click on submit and see my file being processed

loading screen while file is processed 

4

 I can view the outcome of the processing of my file either via a “File Successfully Imported“ message or via a “File Could Not be Imported“ message

 

5

 If my file is rejected, I can download the Validation Report to consult the details of the errors

 

Prototype/Mockups

top page

Provide high fidelity prototype or mockoup

Out of Scope:

top page

  • The setup of a file upload from the perspective of the form designer is not part of this User Story

  • The review of a file submission is not part of this User Story

  • The download of the validation report is not included in this scope

Contact(s):

top page

This User Story is primarily built for the LTC

Table of Contents

Table of Contents