Skip to main content

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/uploadReport' \
--header 'Authorization: Bearer <<TOKEN>>' \
--form 'file=@"/Users/shajahanshaik/Desktop/signature.png"' \
--form 'medexUid="medexUID|4507test1"' \
--form 'reportType="PRESCRIPTION"' \
--form 'reportedBy="Doctor test DD"' \
--form 'reportGeneratedAt="<<REPORT_GENERATED_TIME>>"' \
--form 'facilityId="<<FACILITY_ID>>"' \
--form 'azp="<<AZP>>"'

Prod Curl

curl --location 'https://aths.hng.one/developerapi/mmu/uploadReport' \
--header 'Authorization: Bearer <<TOKEN>>' \
--form 'file=@"/Users/shajahanshaik/Desktop/signature.png"' \
--form 'medexUid="medexUID|4507test1"' \
--form 'reportType="LAB_REPORT"' \
--form 'reportedBy="Doctor test DD"' \
--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

FieldTypeENUMDescription
file
medexUidString
reportTypeStringLAB_REPORT / PRESCRIPTION / OTHER
reportGeneratedAtNumber
reportedByString
facilityIdString
azpString