Unfortunately, the Heidi API and Widget are no longer available for future integrations in Australia and New Zealand. If you are a current Heidi customer looking to integrate, reach out to your Customer Success representative. Otherwise, contact our team to find out what this means for you.
Heidi API
Sessions
Coding

Coding

Heidi can generate coding from any session. Heidi currently supports the following coding standards:

  • ICD-10
  • ICD-10-CM
  • ICD-9
  • ICD-9-CM
  • SNOMED
  • SNOMED-CT
  • OPCS-410
  • ACHI-13
  • CPT-2025

Once coding is enabled on your account, you will be able to call the following endpoints to generate coding for a Heidi session:

Generate codes for a session

Method: GET

Path: /sessions/{session_id}/clinical-codes

Description: Generates and returns a list of Clinical Codes for a given session.

Request

GET /sessions/1234567890/clinical-codes
Authorization: Bearer <your_token>

Response

{
  "id": "691122421f414f697ea95f7c",
  "session_id": "1234567890",
  "consult_note_id": "6911221ba855c115664fee16",
  "clinical_entities": [
    {
      "location_in_note": [
        {
          "start": 816,
          "end": 832
        }
      ],
      "reference_in_transcript": [
        {
          "transcript_text": "...",
          "location_in_transcript": {
            "start": 6632,
            "end": 6712
          }
        }
      ],
      "reference_in_context": [],
      "primary_code": {
        "code": "11200-00",
        "code_name": "Provocative test for glaucoma",
        "metadata": {
          "clean_code": 1120000,
          "short_description": "Provocative test for glaucoma",
          "effective_from": "1/7/1998",
          "sex": "No biological sex",
          "min_age": null,
          "max_age": null,
          "age_edit_type": "No restrictions",
          "rare_use_flag": "Not applicable",
          "axis_1_description": "Diagnostic interventions",
          "axis_2_description": "Diagnostic tests, measures or investigations - eye and adnexa",
          "block": 1835,
          "block_description": "Other diagnostic ophthalmic tests, measures or investigations",
          "chapter_range": "Blocks 1820-1926",
          "chapter_description": "Interventions not elsewhere classified (blocks 1820-1926)",
          "valid_status": "Valid",
          "parent_code": null,
          "children_code": null,
          "sibling_code": [
            "11204-00",
            "11205-00",
            "11210-00",
            "11235-00",
            "11240-01",
            "12326-00",
            "92015-00",
            "92016-00",
            "96044-00"
          ]
        },
        "score": 0.793169379234314,
        "code_system": "achi_13_au"
      },
      "similar_codes": [
        {
          "code": "92016-00",
          "code_name": "Tonometry",
          "metadata": {
            "clean_code": 9201600,
            "short_description": "Tonometry",
            "effective_from": "1/7/1998",
            "sex": "No biological sex",
            "min_age": null,
            "max_age": null,
            "age_edit_type": "No restrictions",
            "rare_use_flag": "Not applicable",
            "axis_1_description": "Diagnostic interventions",
            "axis_2_description": "Diagnostic tests, measures or investigations - eye and adnexa",
            "block": 1835,
            "block_description": "Other diagnostic ophthalmic tests, measures or investigations",
            "chapter_range": "Blocks 1820-1926",
            "chapter_description": "Interventions not elsewhere classified (blocks 1820-1926)",
            "valid_status": "Valid",
            "parent_code": null,
            "children_code": null,
            "sibling_code": [
              "11200-00",
              "11204-00",
              "11205-00",
              "11210-00",
              "11235-00",
              "11240-01",
              "12326-00",
              "92015-00",
              "96044-00"
            ]
          },
          "score": 0.786866307258606,
          "code_system": "achi_13_au"
        },
        ...
      ],
      "status": "PENDING",
      "relevance_score": 0.0,
      "relevance": "LOW"
    }
  ],
  "created_at": "2025-11-01T23:22:42.244000",
  "updated_at": "2025-11-01T23:22:42.244000",
  "feedback": null
}

Get the E/M level for a session

Method: GET

Path: /sessions/{session_id}/clinical-codes/em-level

Description: Returns the Evaluation and Management (E/M) office visit CPT code for a session, based on the medical decision making documented in its consult note. The session must have a completed consult note.

Query parameters to include in the request:

FieldDescription
patient_typeEither new_patient or established_patient

Request

GET /sessions/1234567890/clinical-codes/em-level?patient_type=new_patient
Authorization: Bearer <your_token>

Response

{
  "patient_type": "new_patient",
  "code": "99204",
  "code_name": "Office or other outpatient visit for the evaluation and management of a new patient, which requires a medically appropriate history and/or examination and moderate level of medical decision making. When using total time on the date of the encounter for code selection, 45 minutes must be met or exceeded.",
  "mdm": {
    "level": "moderate",
    "problems_addressed": {
      "level": "moderate",
      "classification": "Multiple stable chronic illnesses",
      "supporting_evidence": ["Hypertension and diabetes were assessed"]
    },
    "data_reviewed": {
      "level": "moderate",
      "classification": "Independent interpretation",
      "supporting_evidence": ["Laboratory results were reviewed"]
    },
    "risk_of_management": {
      "level": "moderate",
      "classification": "Prescription drug management",
      "supporting_evidence": ["Medication dose was adjusted"]
    }
  },
  "summary": "Moderate medical decision making"
}