To obtain the result of the POST request, poll for the via the GET API and check on the “state” [see below]. The state should transition from In-Progress [continue polling] to Completed and the “result” should contain the body of the predicted result. It is possible that “state” can return Error which the error property reflecting the reason.
Endpoint Information
Endpoint: https://services.hank.ai/autocoding/v1/tasks/ [id get provided as a response to successful POST request]
API Key: x-api-key
API Key Value: to be provided
API Body Request
API Response
{
"id": <id>, //id requested
"response": {
"result": {
“job_id”: <internal id optionally supplied with POST request>,
"entities": [ <<< List of line items
“entity”: { <<<< line item
“id” : <random unique within request value identifier>,
“provider”: <name of the provider>
"entityValue": [ <<<< array of codes of a specific type in order
{
“id” : <random unique within request value identifier>
“code”: 20610,
“confidence”: 0.98,
“noteType”: "SurgeonProcedureNote/AnesthesiaProcedureNote/AnesthesiaPreoperativeNote/DiagnosisDescription/SurgeryDescription/AnesthesiaProcedureNote_AirwayPlacement/AnesthesiaProcedureNote_LaborEpidural/AnesthesiaProcedureNote_ArterialLine/AnesthesiaProcedureNote_NerveBlock/AnesthesiaProcedureNote_EpiduralCatheterNonOB/AnesthesiaProcedureNote_CentralLine",
“noteId”: 25,
"Meta": <<<<< internal only
{"changelog": ["...", ...]}
“keyphrases” : TBD
},....................
],
"order": 1,
“Line_item_number”: n
"type": "SurgCPT/AnesCPT/ICD10/Modifier/Practitioner",
"meta":
{"changelog": ["...", ...]}
}.....list of such
]
},
"state": "Completed"|”In-Progress”,”Error”
"status": null,
"metadata": {
"apiKey": "apiKey value",
"timeStamp": "timestamp",
"processEndTime": "time",
"processStartTime": "time"
},
"error": null
}
Post your comment on this topic.