A patient-oriented data platform for Wang's Lab at HKUST, Based on Vue.js and Koa2 Here is the demo
# clone or Download this project
# install dependencies
npm install
# set up database with mysql
wait for finish
# build for production with minification
npm run build
# run server in the root directory
node src/server/server.js
# visit page on localhost:8080
- API:
/data?type=overview&sequence=0
- Fetching Component:
PatientList.vue
- Digest Component:
Table.vue
- Explain: Fetch the overview table data
- Return Format:
{ headers: [{ name: string, leadTo: string, sortable: boolean}], tableData: [[rowData]] }
- Example:
{
"headers":[
{ "name":"ID",
"leadTo": "patient"
},
"SNV Pipeline",
{ "name":"Cohort",
"sortable":true
}
],
"tableData":[
[ "R001",
"SAVI2",
"INCB"],
[ "R001",
"SAVI2",
"INCB"]
]
}
- API:
/data?type=detailTabs&id=
+patientID
- Fetching Component:
PatientDetail.vue
- Digest Component:
TabsSwitch.vue
- Explain: Fetch how many tabs in Patient Detail and their names
- Return Format:
[name: String]
- Example:
["AAA", "BBB", "CCC", "DDD", "EEE"]
- API:
/data?type=detail&id=
+patientID
+&cat=
+tabName
(must the same as tab name inPatient Detail Tabs
) - Fetching Component:
DetailData.vue
- Digest Component:
Table.vue
- Explain: Fetch corresponding table data in detail tabs
- Return Format:
{ headers: [ { name: string, leadTo: string, sortable: boolean} ], tableData: [[rowData]] }
- Example: As other table data