Accessibility Options

API Documentation

Documentation for the High-Risk Diagnosis Code Risk Assessment API

Documentation Guide

Explore our API documentation with this step-by-step guide:

1
Review API Endpoints

Explore the API Endpoints section to understand the available endpoints, request formats, and expected responses.

Technical Context: Our primary endpoint is POST /api/assess, which accepts FHIR resources and returns risk assessment results.

Go to API Endpoints
2
Understand Risk Assessment Logic

Review the Risk Assessment Logic section to learn how the API evaluates diagnosis codes for potential risk.

Business Context: Our risk filters are based on CMS/OIG audit criteria for Acute Stroke, Acute MI, Embolism, and Lung Cancer, which are commonly flagged in Medicare Advantage audits.

Go to Risk Assessment Logic
3
Examine Code Examples

Check the Example Usage section for practical code samples in cURL, JavaScript, and Python.

Technical Context: These examples demonstrate how to format requests to the API and process the responses in different programming languages.

Go to Example Usage
4
Explore Supported FHIR Resources

In the sidebar, review the Supported FHIR Resources section to understand which FHIR resources are required vs. optional.

Technical Context: While only Condition resources are required, including Encounter, MedicationRequest, and Procedure resources improves risk assessment accuracy.

Go to FHIR Resources
5
Try Interactive Demo

Use the "Try the Demo" button at the bottom of the sidebar to experience the API in action on the home page.

Business Context: The demo lets you see how the API can help identify potentially problematic diagnosis codes before submission to CMS.

Go to Interactive Demo
Integration Tip: For best results, include all relevant supporting documentation (encounters, medications, procedures) along with diagnosis codes to enable comprehensive risk assessment.

API Endpoints

POST /api/assess

Assess the risk of diagnosis codes based on CMS/OIG high-risk criteria.

Request Format

The API accepts FHIR resources in JSON format.

{
  "resourceType": "Condition",
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "code": "I213",
        "display": "STEMI of unspecified site"
      }
    ]
  },
  "subject": { "reference": "Patient/12345" },
  "encounter": { "reference": "Encounter/67890" },
  "onsetDateTime": "2024-09-01"
}
Response Format
{
  "diagnosis_results": [
    {
      "code": "I213",
      "description": "STEMI of unspecified site",
      "risk_level": "high",
      "reason": "No inpatient diagnosis within 60-day window for acute myocardial infarction"
    }
  ],
  "status": "success"
}
Error Responses
{
  "error": "Invalid FHIR format: Condition resource must have a code field",
  "status": "error"
}
HTTP Status Codes
  • 200 OK - Request successful
  • 400 Bad Request - Invalid input format or missing required fields
  • 500 Internal Server Error - Server-side error

GET /api/sample

Returns a sample risk assessment response for documentation and testing purposes.

Response Format
{
  "diagnosis_results": [
    {
      "code": "I213",
      "description": "STEMI of unspecified site",
      "risk_level": "high",
      "reason": "No inpatient diagnosis within 60-day window for acute myocardial infarction"
    },
    {
      "code": "G459",
      "description": "Transient cerebral ischemic attack, unspecified",
      "risk_level": "high", 
      "reason": "One stroke diagnosis on physician claim, no inpatient/outpatient claim"
    }
  ],
  "status": "success"
}

Risk Assessment Logic

The risk assessment API applies the following CMS/OIG logic filters to identify potentially high-risk diagnosis codes:

Acute Stroke (HCC 100)
  • High Risk Criteria: One outpatient or physician office diagnosis of stroke without a corresponding inpatient stay.
  • Common Error: Using acute stroke codes when "history of stroke" would be more appropriate.
  • Applicable ICD-10 Codes: I63.x series (cerebral infarction), G45.x series (transient cerebral ischemic attacks)
Acute Myocardial Infarction (HCC 86)
  • High Risk Criteria: Diagnosis of acute MI without an inpatient hospitalization within a 60-day window.
  • Common Error: Using acute MI codes instead of "old" or "history of" MI codes.
  • Applicable ICD-10 Codes: I21.x series (acute MI), I22.x series (subsequent MI)
Embolism (HCCs 107 & 108)
  • High Risk Criteria: Diagnosis of embolism without a corresponding anticoagulant medication prescribed.
  • Common Error: Coding as current condition instead of "history of embolism."
  • Applicable ICD-10 Codes: I26.x series (pulmonary embolism), I74.x series (arterial embolism)
Lung Cancer (HCC 9)
  • High Risk Criteria: Diagnosis of lung cancer without evidence of treatment (radiation, chemotherapy, or surgery) within a 6-month window.
  • Common Error: Using active cancer codes instead of "history of" or "in remission" codes.
  • Applicable ICD-10 Codes: C34.x series (malignant neoplasm of bronchus and lung)

Example Usage

cURL Example
curl -X POST https://your-domain.com/api/assess \
    -H "Content-Type: application/json" \
    -d '{
      "resourceType": "Condition",
      "code": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/sid/icd-10",
            "code": "I213",
            "display": "STEMI of unspecified site"
          }
        ]
      },
      "subject": { "reference": "Patient/12345" },
      "encounter": { "reference": "Encounter/67890" },
      "onsetDateTime": "2024-09-01"
    }'
JavaScript Example
const fhirData = {
  resourceType: "Condition",
  code: {
    coding: [
      {
        system: "http://hl7.org/fhir/sid/icd-10",
        code: "I213",
        display: "STEMI of unspecified site"
      }
    ]
  },
  subject: { reference: "Patient/12345" },
  encounter: { reference: "Encounter/67890" },
  onsetDateTime: "2024-09-01"
};

fetch('/api/assess', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(fhirData)
})
.then(response => response.json())
.then(data => {
  console.log(data);
})
.catch(error => {
  console.error('Error:', error);
});
Python Example
import requests
import json

fhir_data = {
  "resourceType": "Condition",
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "code": "I213",
        "display": "STEMI of unspecified site"
      }
    ]
  },
  "subject": { "reference": "Patient/12345" },
  "encounter": { "reference": "Encounter/67890" },
  "onsetDateTime": "2024-09-01"
}

response = requests.post(
    'https://your-domain.com/api/assess',
    headers={'Content-Type': 'application/json'},
    data=json.dumps(fhir_data)
)

print(response.json())

API Overview

The High-Risk Diagnosis Code Risk Assessment API analyzes FHIR resources to identify diagnosis codes that may be miscoded according to CMS/OIG guidelines.

  • Base URL: https://your-domain.com
  • Format: JSON
  • Authentication: None (demo version)
  • FHIR Version: STU3 or R4

Supported FHIR Resources

  • Condition
    Diagnosis codes
    Required
  • Encounter
    Visit information
    Optional
  • MedicationRequest
    Prescribed medications
    Optional
  • Procedure
    Performed procedures
    Optional

Risk Levels

  • high
    Diagnosis code meets specific high-risk criteria. High likelihood of being miscoded.
  • moderate
    Some risk factors present but not meeting all high-risk criteria.
  • low
    No risk factors identified. Likely to be correctly coded.

Ready to get started?

Schedule a consultation to learn how our risk assessment tools can protect your organization.

Schedule Consultation Try the Demo