Stand-alone DRG Coder
This API is being released. This page describes the contract it is built to; details may still change before release.
The Stand-alone DRG Coder groups one inpatient episode on demand and returns the AR-DRG in the same response. It does one of two things:
| You send | Najeeb does |
|---|---|
| The episode only | Groups it: returns Najeeb's DRG |
The episode and provider_drg (or a DRG service line) | Groups it and compares the result with the provider DRG, explaining any difference |
Use it to code an episode before or outside a prior authorization or claim, to check a DRG your coders assigned, or as a tool for an AI agent trying out codings. Every request is stored and can be retrieved with Get DRG Result, whether or not it is linked to anything.
Read DRG Coder & Validator first. It defines the shared objects (provider_drg, drg_info, the DRG result and issues), the DRG mode, and the rules for dates, length of stay and admission weight.
Base URL
https://api.{client_namespace}.najeeb.ai/v4.0/health
Authentication
Requests are authenticated with an API key in the access-key header. The Stand-alone DRG Coder must be enabled for your account; otherwise requests are rejected with 403 (E_DRG_014).
access-key: YOUR_API_KEY
Endpoints
1. Group an Episode
POST /drg/group
Request Body Parameters
| Parameter | Type | Required | Description | Accepted Values |
|---|---|---|---|---|
remote_reference | string | No | Your own ID for this DRG request. Makes the request idempotent: see Idempotency | String, 1–255 characters. Unique across your DRG requests |
transaction_id | string | No | Links the result to a prior authorization: the transaction_id you created it with. Not unique: a prior authorization can be coded more than once | String, 1–255 characters. Must match an existing prior authorization |
claim_reference | object | No | Links the result to a batch claim | See Claim Reference Object. Works once the batch has reached PENDING_AUDIT. Unknown claim: 404 E_DRG_021 |
member_dob * | string | Yes | Patient's date of birth. On or before encounter_start_date | Full ISO-8601 DateTime |
member_gender * | Enum | Yes | Patient's gender | MALE, FEMALE |
encounter_start_date * | string | Yes | Admission date and time | Full ISO-8601 DateTime |
encounter_end_date * | string | Yes | Separation (discharge) date and time. On or after encounter_start_date | Full ISO-8601 DateTime |
diagnoses * | array | Yes | Episode diagnoses. Exactly one PRIMARY | 1–30 items. See Diagnosis Object |
items | array | No | Procedures performed. Can be empty for a medical episode | 0–30 items. See Item Object |
provider_drg | object | No | The DRG to compare with. Send it to group and compare | See DRG Reference Object |
drg_info | object | No | Grouping inputs | See DRG Info Object |
supporting_info | array | No | Admission weight and ventilation hours, when not in drg_info | See the names to use |
remote_reference, transaction_id or claim_reference?remote_referenceidentifies this DRG request in your system. Sending it again returns the stored result.transaction_idorclaim_referencepoints at a prior authorization or claim Najeeb already has. Send at most one of them: both together are rejected with409E_DRG_022.
A linked result is always kind: STANDALONE and is_current: false. It is stored with the prior authorization or claim, but never replaces their own claimed or approved DRG.
The Stand-alone DRG Coder always groups an inpatient episode, so both encounter dates are required. In the prior authorization APIs they are optional.
Diagnosis Object
| Parameter | Type | Required | Description | Accepted Values |
|---|---|---|---|---|
type * | Enum | Yes | Diagnosis type | PRIMARY, SECONDARY (lowercase also accepted) |
code * | string | Yes | ICD-10-AM code, with or without the dot | For example I21.4 or I214 |
name | string | No | Description. Not used for grouping | Max 255 characters |
Item Object
| Parameter | Type | Required | Description | Accepted Values |
|---|---|---|---|---|
nphies_code * | string | Yes | SBS V3 procedure code | For example 38306-00-00. Must exist in SBS V3 (E_DRG_013 otherwise) |
service_code | string | No | Provider's service code. A DRG code here is read as the provider DRG | Max 255 characters |
service_description | string | No | Provider's description. Not used for grouping | Max 255 characters |
nphies_description | string | No | NPHIES description of the procedure. Not used for grouping | Max 255 characters |
erp_item_id | string | No | Your item ID, returned with the item | Max 255 characters |
treatment_date | string | No | Not used for grouping | Full ISO-8601 DateTime |
Provider DRG Object
| Parameter | Type | Required | Description | Accepted Values |
|---|---|---|---|---|
drg_code | string | Yes, when the object is sent | The DRG the provider billed. Kept as sent, even when invalid | String, up to 16 characters, e.g. F10A |
drg_version | string | No | AR-DRG version. It is also the version used for grouping: an unsupported version ends the request with E_DRG_001 | String, up to 8 characters. Default 9 |
drg_weight | number | No | Relative weight of the billed DRG. Optional | 0–100, up to 4 decimals |
Claim Reference Object
| Parameter | Type | Required | Description | Accepted Values |
|---|---|---|---|---|
batch_erp_id * | string | Yes | The batch_erp_id of the batch | String, 1–255 characters |
claim_id * | string | Yes | The claim's claim_id in that batch | String, 1–255 characters |