Upload Reports
This API facilitates the posting of patient reports data to the database. It necessitates the inclusion of the patient ID (medexUid), report type, report generated time, reported by and the report files in the request body form data, along with an authorized token in the headers.
Demo Curl
curl --location 'https://demo.hng.one/developerapi/mmu/uploadReportv1' \
--header 'Authorization: Bearer <<TOKEN>>' \
--form 'fileName="<<file url>>"' \
--form 'medexUid="<<PATIENT ID>>"' \
--form 'reportType="<<REPORT TYPE>>"' \
--form 'reportedBy="<<REPORT BY>>"' \
--form 'reportGeneratedAt="<<REPORT_GENERATED_TIME>>"' \
--form 'facilityId="<<FACILITY_ID>>"' \
--form 'azp="<<AZP>>"'
Prod Curl
curl --location 'https://aths.hng.one/developerapi/mmu/uploadReportv1' \
--header 'Authorization: Bearer <<TOKEN>>' \
--form 'fileName="<<file url>>"' \
--form 'medexUid="<<PATIENT ID>>"' \
--form 'reportType="<<REPORT TYPE>>"' \
--form 'reportedBy="<<REPORT BY>>"' \
--form 'reportGeneratedAt="<<REPORT_GENERATED_TIME>>"' \
--form 'facilityId="<<FACILITY_ID>>"' \
--form 'azp="<<AZP>>"'
Sample Responce
You will receive a response similar to below
{
"code": "Ok",
"message": "File and data uploaded successfully!"
}
Report Info
| Field | Type | ENUM | Description |
|---|---|---|---|
| fileName | String | file url | |
| medexUid | String | ||
| reportType | String | LAB_REPORT / PRESCRIPTION / OTHER | |
| reportGeneratedAt | Number | ||
| reportedBy | String |