...
Code Block | ||
---|---|---|
| ||
POST localhost:3008http://openhim-dev.psi-mis.org:5001/nifi.solidlines.io/surveys |
This endpoint expects a request body with the surveys to be inserted in DHIS2, so the request body must be the following:
Code Block | ||
---|---|---|
| ||
{ "surveys": [ { "orgUnit": "RznoYDeegAd", "surveyID": "4b8233d8b9ac3846a9bcdd13cd935161f3d848e9b902ecc27b5db6672cae5b7e", "surveyDate": "2023-05-23T14:22:37+02:00", "answers": [{ "type": "TEA", "answer": "mM", "question": "uXhGe3QPfeeJcGai6pHG1M" }, { "type": "DE", "answer": "user", "question": "fFjTS4qVA4h" }, { "type": "DE", "answer": "0010", "question": "C0fLABBqctc" }, { "type": "DE", "answer": "RCP", "question": "BUvnfpNC8Sg" }, { "type": "DE", "answer": 1, "question": "EXs9avwMrC6" }, { "type": "DE", "answer": 1, "question": "dXqvlNSA0rt" }, { "type": "DE", "answer": 1, "question": "VC57h7Z9WEZ" }, { "type": "DE", "answer": 0, "question": "olkJStuPU6a" }, { "type": "DE", "answer": 1, "question": "NrcQzTXHs1y" }, { "type": "DE", "answer": 0, "question": "OAeAYYna9Da" }, { "type": "DE", "answer": 1, "question": "YjaGSF7gW69" }, { "type": "DE", "answer": 1, "question": "goyGi80JLzn" }, { "type": "DE", "answer": 1, "question": "s8spLqKaFdR" }, { "type": "DE", "answer": 1, "question": "zWV0tzlhwCi" }, { "question": "FLd1dXDdHhT", "type": "TEA", "answer": "f22346132907bfe36981cf5614f2c4c8ad2d237e55c8165eabd8d46304bedf1e" }] } ] } |
...
Question | Refers to | Accepted values | Accepted values meaning |
---|---|---|---|
uXhGe3QPfeeJcGai6pHG1M | Thank you for helping us to improve our service. What is the gender of the person served: | mM | Male |
fFjTS4qVA4h | Who is answering the questionnaire: | user | User |
C0fLABBqctc | What is the age range of the person served: | 0010 | 0 - 10 years |
BUvnfpNC8Sg | In which sector were you served? | RCP CPN MAT CPP CCR LAB PHA SAAJ PNCT IC PSY NUT STO OPH OTH | Reception/Acceptance |
EXs9avwMrC6 | The way I was treated by the health care provider: | 1 | Makes me want to go back to the Health Center (1) |
dXqvlNSA0rt | During the consultation the health care provider: | 1 | Asked if I had questions (1) |
VC57h7Z9WEZ | Before you finish the consultation the health care provider: | 1 | Gave me room to ask questions (1) |
olkJStuPU6a | In talking to me the health care provider: | 1 | Explained everything in a simple way (1) Used words I didn't understand (0) |
NrcQzTXHs1y | During the consultation the health care provider: | 1 | He was my friend (1) |
OAeAYYna9Da | During the consultation: | 1 | I understood that the treatment is good for me (1) I was unsure/fearful of the treatment (0) |
YjaGSF7gW69 | During the consultation the health provider talked about HIV Treatment: | 1 | Yes (If yes move on to the next question) (1) |
goyGi80JLzn | During the consultation the health care provider: | 1 | Explained importance of complying with HIV Treatment (1) |
s8spLqKaFdR | During the consultation the health care provider explained that: | 1 | If I take medicines correctly I will not transmit HIV to partner (1) |
zWV0tzlhwCi | Viral load is: | 1 0 0.000001 | The amount of HIV in my body (1) |
FLd1dXDdHhT | Phone Number | any |
The endpoint should respond any of the following cases:
{"message": "Invalid JSONinvalid request, check if the structure of your request is correct for every survey (accepted answers for questions / all parameters are included within the questions) or if the org unit is accepted"}
: meaning that the structure of your request body JSON is not correct, check if all the values sent are accepted.{"message":"Valid JSONsuccess, valid request"}
: meaning that the structure of your request body JSON is correct.
...
Retrieve data inserted into DHIS2
Everyday at 6:00 AM (GMT+2 Time zone), the server will retrieve all the processed data responses and merge it into one full response, this means that the data that the user can view before 6:00 AM (GMT+2 Time zone) will be replaced with the new one.
...
The url to retrieve all the information of the data processed is the following:
Code Block |
---|
GET |
...
http://openhim-dev.psi-mis.org:5001/nifi.solidlines.io/results |
The endpoint should respond the following structure:
...