Closed rwx-yxu closed 1 year ago
Add data component. The user fills in the form which contains textboxes which are force and time. When the user submits the form, a timestamp will be recorded. The file has to be in csv format.
Are we making two forms? One for manual user input and another file component?
If user uploads file. should we present a visual representation parsed as a preview? If so, that might very well be another component
I read the use case description again and the user uploads the data and it is stored in the repository in csv format. We dont need to make a preview.
Please list the high priority fields here for the form. Create a new .js file in utils to parse and upload csv data. Check utils/uploadHcmData.js as an example for parsing and uploading data to firebase.
How are you going to add a route for add user data?
The high priority fields are: a. left/right ventricular end diastolic volume (ledv/redv) b. left/right ventricular end systolic volume (lesv/resv) c. left/right ventricular ejection fraction (lvef/rvef) d. left/right ventricular mass (lvmass/rvmass) e. left/right systolic volume (lsv/rsv) f. fibrosis/scarring (scar) g. gender h. age at MRI i. apical HCM j. sudden cardiac death k. hypertension l. diabetes m. myectomy
n. MYH7 o. MYBPC3 p. TNNT2 q. ACTC r. TPM1 s. TNNCI t. TNNI3 u. MYL2 v. TT
I can make a route that takes the user to the add data page like this: path: '/addData', name: 'addData', component: AddDataView
How to navigate to the new route? Button from the Dashboard?
Have you looked into file uploading component?
To navigate to the addData route, i could create a button in the navigation bar when the user is logged in or have a button for it on the dashboard.
File uploading https://usecsv.com/community/usecsv-vuejs To upload data, i can use UseCSV which supports CSV and Excel files and allows me to drag and drop. To use UseCSV, i will need to create an account and then 'npm install @usecsv/vuejs3', then insert the import button with a template.
I ran the test and it failed. It says the server closed unexpectedly.
https://flatfile.com/docs/2.0/vuejs/getting-started/
Decision made to use html tag with file type. Example: https://uploadcare.com/blog/html-file-upload-button/ .This solution is much more simpler than creating another external account because we already have some code that can parse the hcm data.
<input type="file">
Do not need to implement sending email when data has been added. Spec page 4, head 8.
Summary
The user wants to add their experimental data to the repository
Basic Path
Alternative Paths
Step 4: If the file is the wrong format, the system displays a message and the use case repeats step 2. Step 5: If other than two columns of data exist, a message is displayed and the use case repeats step 2.
Exception Paths
The user can cancel the operation at any time.
Preconditions
The data is stored in a csv file or developer-required format. There are only two columns of data, e.g., force and time. [This is also the developer’s choice but there should be a verification of the format and the layout of the data].
Postconditions
The data is now in the repository.