> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encodebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sentinel CDM quick reference

> Field-level Sentinel CDM quick reference for tables used in EncodeBox.

Quick reference for Sentinel Common Data Model tables and fields used in EncodeBox.

## Core identifiers

| Identifier    | Description                 | Used in                                      |
| ------------- | --------------------------- | -------------------------------------------- |
| `PatID`       | Unique patient identifier   | All patient-related tables                   |
| `EncounterID` | Unique encounter identifier | Encounter, Diagnosis, Procedure, Lab, Vitals |
| `ProviderID`  | Unique provider identifier  | Diagnosis, Procedure, Dispensing             |
| `FacilityID`  | Unique facility identifier  | Encounter                                    |

## Enrollment

| Field       | Type    | Description                    |
| ----------- | ------- | ------------------------------ |
| `PatID`     | Num     | Patient identifier             |
| `Enr_Start` | Date    | Enrollment start date          |
| `Enr_End`   | Date    | Enrollment end date            |
| `MedCov`    | Char(1) | Medical coverage (Y/N/U/A)     |
| `DrugCov`   | Char(1) | Drug coverage (Y/N/U)          |
| `Chart`     | Char(1) | Chart availability (Y/N)       |
| `PlanType`  | Char(1) | Plan type (F/H/E/P/S/M/O/U)    |
| `PayerType` | Char(2) | Payer type (CO/MC/MD/OG/OT/UN) |

## Demographic

| Field        | Type    | Description                |
| ------------ | ------- | -------------------------- |
| `PatID`      | Num     | Patient identifier         |
| `Birth_Date` | Date    | Date of birth              |
| `Sex`        | Char(1) | Sex (A/F/M/U)              |
| `Hispanic`   | Char(1) | Hispanic ethnicity (Y/N/U) |
| `Race`       | Char(1) | Race (0/1/2/3/4/5/M)       |
| `PostalCode` | Char    | Postal/ZIP code            |

Race codes: `0` unknown, `1` American Indian/Alaska Native, `2` Asian, `3` Black/African American, `4` Native Hawaiian/Pacific Islander, `5` White, `M` multi-racial.

## Encounter

| Field                   | Type    | Description              |
| ----------------------- | ------- | ------------------------ |
| `PatID`                 | Num     | Patient identifier       |
| `EncounterID`           | Num     | Encounter identifier     |
| `ADate`                 | Date    | Admission/encounter date |
| `DDate`                 | Date    | Discharge date           |
| `EncType`               | Char(2) | Encounter type           |
| `FacilityID`            | Num     | Facility identifier      |
| `Discharge_Disposition` | Char(1) | A/E/S/U                  |
| `DRG`                   | Char(3) | Diagnosis Related Group  |

Encounter types: `AV`, `ED`, `IP`, `IS`, `OA`.

## Diagnosis

| Field         | Type    | Description                      |
| ------------- | ------- | -------------------------------- |
| `PatID`       | Num     | Patient identifier               |
| `EncounterID` | Num     | Encounter identifier             |
| `ADate`       | Date    | Service date                     |
| `DX`          | Char    | Diagnosis code                   |
| `DX_CodeType` | Char(2) | Code type                        |
| `PDX`         | Char(1) | Principal diagnosis flag (P/S/X) |

Code types: `09` ICD-9-CM, `10` ICD-10-CM, `11` ICD-11-CM, `SM` SNOMED CT.

## Procedure

| Field         | Type    | Description          |
| ------------- | ------- | -------------------- |
| `PatID`       | Num     | Patient identifier   |
| `EncounterID` | Num     | Encounter identifier |
| `ADate`       | Date    | Service date         |
| `PX`          | Char    | Procedure code       |
| `PX_CodeType` | Char(2) | Code type            |

Code types: `09` ICD-9-PCS, `10` ICD-10-PCS, `C4` CPT-4, `HC` HCPCS, `LC` LOINC, `RE` Revenue.

## Dispensing

| Field         | Type    | Description        |
| ------------- | ------- | ------------------ |
| `PatID`       | Num     | Patient identifier |
| `RxDate`      | Date    | Dispensing date    |
| `Rx`          | Char    | Drug code          |
| `Rx_CodeType` | Char(2) | Code type          |
| `RxSup`       | Num     | Days supply        |
| `RxAmt`       | Num     | Amount dispensed   |

Code types: `ND` NDC, `RN` RxNorm, `SN` SNOMED CT.

## Lab, vitals, death

| Table             | Key fields                                                 |
| ----------------- | ---------------------------------------------------------- |
| Laboratory result | `Lab_Date`, `Lab_LOINC`, `Result_Num`, `Result_Unit`       |
| Vital signs       | `Measure_Date`, `HT`, `WT`, `Systolic`, `Diastolic`, `BMI` |
| Death             | `Death_Date`, `Death_Source`, `Confidence`                 |

## EncodeBox query patterns

```python theme={null}
# Type 2 diabetes (ICD-10 E11*)
db.diagnosis.matching("E11", code_type="10", match="starts_with")

# Inpatient-related diagnosis position filter
db.diagnosis.matching("E11", code_type="10").in_position("primary")

# NDC dispensing
db.medication.matching("00006007431", code_type="ND", match="exactly")
```

<Tip>
  Always specify `code_type` when matching codes, and verify enrollment covers your study window with `db.enrollment.covering_index(...)`.
</Tip>

See also: [Data model](/data-model), [API map](/api).
