This action allows to authenticate to the system.
{
"success": true,
"errorMsg": "", // it might be "Wrong username or password" in case of failure
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJtYXJpby5yb3NzaSIsImlhdCI6MTUxNjIzOTAyMiwicm9sZXMiOlsiZG9jdG9yIl19.u77tWJnNskPxa4cGuBikY6ebFEpflC2_XGwDvZFiukY", // secret is "mysecret"
"username": "mario.rossi",
"roles": [ "doctor" ], // it is a set of { "doctor", "manager" }
"group": "Catania" // the group the user belongs to
}The action can be executed by an anonymous user.
This action allows to insert a new positive case.
{
"number": 1234,
"name": "Mario",
"surname": "Rossi",
"email": "mario.rossi@vigilfuoco.it",
"phone": "3331234567",
"role": "VIGILE DEL FUOCO"
}The response is empty.
The logged user must have doctor privileges.
The list of valid roles is here.
This action allows to append an update to a positive case.
{
"caseNumber": 1234,
"estremiProvvedimentiASL": "abcd efgh yxzk", // required field
"diseaseConfirmDate": "2020-05-05T00:00:00.000Z", // required field
"quarantinePlace": "HOME", // value in [ "HOME", "HOSP", "INTCARE" ] // required field
"expectedWorkReturnDate": "2020-12-31T00:00:00.000Z", // nullable date
"actualWorkReturnDate": null // nullable date
}The response is empty.
The logged user must have doctor privileges.
This action allows to insert a new suspected infected individual.
{
"number": 1234,
"name": "Mario",
"surname": "Rossi",
"email": "mario.rossi@vigilfuoco.it",
"phone": "3331234567",
"role": "VIGILE DEL FUOCO"
}The response is empty.
The list of valid roles is here.
The logged user must have doctor privileges.
This action allows to append an update to a suspect infected individual.
{
"caseNumber": 1234,
"quarantinePlace": "HOME", // value in [ "HOME", "HOSP" ]
"expectedWorkReturnDate": "2020-12-31Z",
"actualWorkReturnDate": null, // nullable date
"healthMeasure": {
"code": "12345",
"by": "DOC" // can be in [ "DOC", "ASL" ]
}
}The response is empty.
The logged user must have doctor privileges.
This action allows to fetch updated patient data.
{
"group": "Catania",
"caseNumber": 1234
}{
"subject": {
"number": 1234,
"name": "Mario",
"surname": "Rossi",
"email": "mario.rossi@vigilfuoco.it",
"phone": "3331234567",
"role": "VIGILE DEL FUOCO"
},
"data": {
"estremiProvvedimentiASL": "abcd efgh yxzk",
"quarantinePlace": "HOME",
"expectedWorkReturnDate": "2020-12-31Z",
"actualWorkReturnDate": null
},
"history": [
{
"quarantinePlace": "HOME",
"expectedWorkReturnDate": "2020-12-31Z",
"convertedToSuspectCaseNumber": null, // can be either null or an integer
"convertedToSuspectSheetClosed": true,
"updatedAt": "2020-03-31T18:31:24.287Z",
"updatedBy": "mario.rossi",
},
// ... other items here
]
}The logged user must belong to doctor or supervisor role. He can access sheets belonging to his group only. In case the user has no groups, he can access sheets belonging to any group.
This action allows to fetch updated suspect data.
{
"group": "Catania",
"caseNumber": 1234
}{
"subject": {
"number": 1234,
"name": "Mario",
"surname": "Rossi",
"email": "mario.rossi@vigilfuoco.it",
"phone": "3331234567",
"role": "VIGILE DEL FUOCO"
},
"data": {
"quarantinePlace": "HOME",
"expectedWorkReturnDate": "2020-12-31Z",
"actualWorkReturnDate": null,
"closedCase": true
},
"history": [
{
"expectedWorkReturnDate": "2020-12-31Z",
"convertedToPositiveCaseNumber": null, // can be either null or an integer
"convertedToPositiveSheetClosed": true,
"updatedAt": "2020-03-31T18:31:24.287Z",
"updatedBy": "mario.rossi",
},
// ... other items here
]
}The logged user must belong to doctor or supervisor role. He can access sheets belonging to his group only. In case the user has no groups, he can access sheets belonging to any group.
This action allows to fetch statistics on sheets.
The request is empty.
{
groupStatistics: [
{
"group": "Group 1",
"positives": {
"totalSick": 3,
"totalClosed": 3,
"quarantinePlacesFacet": {
"HOME": 2,
"HOSP": 1,
"INTCARE": 0
},
"roleFacet": [
{
"name": "Role 1",
"total": 1
},
{
"name": "Role 2",
"total": 0
},
// ...
{
"name": "Role N",
"total": 2
},
],
},
"suspects": {
"total": 12,
"totalClosed": 21,
"quarantinePlacesFacet": {
"HOME": 10,
"HOSP": 1,
},
"roleFacet": [
{
"name": "Role 1",
"total": 5
},
{
"name": "Role 2",
"total": 3
},
// ...
{
"name": "Role N",
"total": 1
},
],
},
...
},
{
"group": "Group 2",
...
},
]
}The logged user must have manager privileges.
This action allows to fetch sheets counters.
The request is empty.
{
counters: {
positives: {
closed: 200,
open: 121
},
suspects: {
closed: 800,
open: 226
}
}
}The user must be authenticated.
The numbers refer to the group of the authenticated user. In case of empty group, the numbers refer to all the sheets.
This action allows a user to change the password.
{
"username": "mario.rossi",
"oldPassword": "hereTheOldPassword12345",
"newPassword": "hereTheNewPassword12345"
}In case of success, the response is empty.
In case of failure the system returns an error in the following form:
{
"error": "Password must contain at least 6 characters.\r\nThe new password must contain at least one digit.\r\nThe new password must contain at least one letter."
}In case the password is changed by a user belonging to admin role, validation is not performed. Otherwise, the password must:
- contain at least 6 characters;
- contain at least one number;
- contain at least one letter.
The action can be executed by an authenticated user with reference to his own password.
The action can be executed in any case by a user belonging to admin role, with reference to the password belonging to any user.
This action returns the groups visible by the authenticated user.
The request is empty.
{
groups: [
{
"code": "theGroup",
"description": "the Description"
},
// ... here the other groups
]
}The action can be executed by authenticated users.
The group description is get from the group code converting to uppercase characters.
This action returns the current news to display to the users, sorted by descending order field, between their validity date.
The request is empty.
{
news: [
{
highlight: false, // [true|false]
text: "here the news text in HTML format...",
order: 230, // integer value
"validFrom": "2020-04-02T08:00:00.000Z", // the news appears in this instant
"validTo": null // the news is valid forever
},
// ... other news here
]
}The action can be executed by any authenticated user.
The action returns the news ordered by order fields in descending order.
This action marks alive the group the logged user belongs to.
The request is empty.
{
msg: "Happy to see you again! :-)"
}The user must belong to the doctor role.
The action returns the news ordered by order fields in descending order.
This action returns the patients and suspects sheets.
{
"group": "theGroup"
}{
patients: [
{
"group": "theGroup",
"subject": {
"number": 1234,
"name": "Mario",
"surname": "Rossi",
"email": "mario.rossi@vigilfuoco.it",
"phone": "3331234567",
"role": "VIGILE DEL FUOCO"
},
"data": {
"estremiProvvedimentiASL": "abcd efgh yxzk",
"quarantinePlace": "HOME", // value in [ "HOME", "HOSP", "INTCARE" ]
"expectedWorkReturnDate": "2020-12-31Z",
"actualWorkReturnDate": null // nullable date
}
},
// ... other patients here
],
suspects: [
{
"group": "theGroup",
"subject": {
"number": 1234,
"name": "Giuseppe",
"surname": "Verdi",
"email": "giuseppe.verdi@vigilfuoco.it",
"phone": "3337654321",
"role": "ASSISTENTE AMMINISTRATIVO"
},
"data": {
"quarantinePlace": "HOME", // value in [ "HOME", "HOSP" ]
"expectedWorkReturnDate": "2020-12-31Z",
"actualWorkReturnDate": null, // nullable date
"healthMeasure": {
code: "12345",
by: "DOC" // can be in [ "DOC", "ASL" ]
}
}
},
// ... other suspects here
]
}The action can be executed by any authenticated user with reference to his groups. A user belonging to no groups is allowed to retrieve sheets belonging to any group.
{ "username": "mario.rossi", "password": "hereThePassword" }