ACESOAI

HCC APIs Documentation

Authentication

Use OAuth2 Client Credentials Grant to obtain an access token.

POST /oauth2/token/

Request Body


grant_type=client_credentials
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
        

Successful Response


{
  "access_token": "your_token_here",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "hcc:api:Calculate"
}
        

POST /api/codes/hcc/api/calculate/

Calculates risk scores based on patient demographics and diagnosis codes.

Headers


Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
        

Request Body


{
  "account_data": {
    "id": "optional-id",
    "dob": "1950-01-01",
    "sex": "M",
    "icd10_codes": ["I10", "E11.9"],
    "orec": 0,
    "nemcaid": 0,
    "ltimcaid": 0,
    "year": 2024
  },
  "calc_settings": {
    "model": "CNA2024",
    "year": 2024,
    "reimb_rate": 10000,
    "normalize_factor": 1.05,
    "mce_edit": true
  }
}
        

Successful Response


{
  "id": "optional-id",
  "dob": "1950-01-01",
  "sex": "M",
  "submitted_icd10_codes": ["I10", "E11.9"],
  "calculation_details": {
    "calc_year": 2024,
    "risk_model": "CNA2024",
    "mce_edit": true,
    "orec": 0,
    "ltimcaid": 0,
    "nemcaid": 0,
    "reimbursement_rate": 10000,
    "normalize_factor": 1.05
  },
  "raf_score": 1.23,
  "estimated_reimbursement": 12915,
  "hccs": [...],
  "demographics": {...},
  "interactions": [...],
  "others": [...],
  "disease_groups": [...],
  "trumped_hccs": [...]
}
        

Error Responses

Missing Fields


{
  "error": "Missing required fields in 'calc_settings': model, year"
}
        

Invalid or Expired Token


{
  "error": "Invalid or expired token."
}