The AutoCoder API is asynchronous. You submit a coding task with a POST, which returns a task id; you then poll for the result with a GET.
| Field | Value |
|---|---|
| Endpoint | https://services.hank.ai/autocoding/v1/tasks/ |
| Method | POST |
| API Key header | x-api-key |
| API Key value | to be provided |
The request carries the document(s) to code under request.job.input.entities, plus optional patient, provider, and scheduling context.
{
"Name": "some_blank_name",
"request": {
"service": "<reference to service>",
"job": {
"id": "value",
"input": {
"entities": [
{
"inputType": "text",
"lastModifiedTime": "Mon Nov 02 12:56:49 EST 2020",
"noteType": "SurgeonProcedureNote",
"content": "Content representing type specified in inputType"
Each entity declares the kind of clinical note it carries via noteType. The accepted values are:
SurgeonProcedureNoteAnesthesiaProcedureNoteAnesthesiaPreoperativeNoteDiagnosisDescriptionSurgeryDescriptionAnesthesiaProcedureNote_AirwayPlacementAnesthesiaProcedureNote_LaborEpiduralAnesthesiaProcedureNote_ArterialLineAnesthesiaProcedureNote_NerveBlockAnesthesiaProcedureNote_EpiduralCatheterNonOBAnesthesiaProcedureNote_CentralLineIn the schedule section there is an optional surgeonNPI field. If provided, it can further enhance the system’s ability to predict the correct codes.
When squash_icd is true, the API returns the minimal set of ICD codes (used for billing claims, for example). When omitted or set to the default of false, the behavior is to return the maximal set of valid ICD codes (useful for audits, or anywhere the client wants them all available).
patient_info (guarantor, insurance, and patient demographics/addresses) and provider may also be supplied on the job. See the full schema in the embedded API reference on the Authentication page.
A successful submission returns 200 OK with the task id to poll:
{
"id": "<id>",
"metadata": {
"apiVersion": "1.0",
"timeStamp": "timestamp",
"apiKey": "apiKeyValue"
}
}Take the id and poll it via the GET Request.