# W-BDpT Rule Implementation

**HISTORY:**
###### ECARS-1104 - initial W-BDpT implementation (DiseaseExtentRule3)
###### ECARS-1569 - update aligned with QC report 2023
###### 13/04/2026: ECARS-2374 - apply only for Beh=3 and allow BoD in {5,6,7}

## Overview
This document describes the implementation of the W-BDpT (pT + BoD consistency) validation rule.

## Rule Description
**Rule Definition ID**: 216  
**Rule Code**: W-BDpT  
**Rule Type**: WARNING  
**Description**: pT + BoD not valid  
**Protocol**: Incidence

### Rule Logic
The W-BDpT warning is evaluated only when all common preconditions are true:

1. `Beh = 3`
2. `pT` is in_range (valid, not missing, not unknown)

Then the warning is produced when:

1. `pT` does not contain `X` AND `BoD` is not in `{5,6,7}`

## Implementation Files
### 1. Java Implementation
**File**: `src/main/java/eu/europa/ec/jrc/qcs/engine/rule/crossfield/encr2014/DiseaseExtentRule3.java`

### 2. Rule Registration / ID Reference
**File**: `docs/rules/W-BDpT/W-BDpT_rule_registration.sql`
