System business rule specification specimen addition - ESG-Project/documentation GitHub Wiki

← Home / Requirements / Business Rules

This business rule defines the requirements for adding new specimens, including data fields, auto-calculations, and validations.

Rule Details

Field Content
Identification BR08
Business Rule Specimen Addition
Description Specifies mandatory and optional fields for new specimen entries, including automatic calculations for DBH and Basal Area, and real-time species autocomplete.
Source System Requirements
Priority High
Status Active

Implementation Details

  • Mandatory fields for new specimens: Species, Plot (number or "Isolated"), Height (m), and at least one CBH (cm) value (up to 6 possible).
  • Optional fields: Family (auto-populated, editable if species not found), Category (Exotic, Invasive Exotic, Protected by Law) and Observations (free text).
  • Real-time autocomplete for Species search by cache.
  • Validations: Height and CBH values must be greater than 0; CBH must have between 1 and 6 values.
  • Automatic Calculations: DBH (Diameter at Breast Height)(cm)(CAPm/PI) and Basal Area (m²) are calculated by the system based on entered data.
  • Data validation occurs upon submission, and the operation can be canceled at any time.

Related Components

  • Specimen Data Entry Form
  • Species Autocomplete Service
  • Calculation Engine
  • Data Validation Module

History

Version Date Author Changes
1.0 2025-07-29 System Initial version

Notes

  • Ensures data consistency and reduces manual calculation errors.
  • Flexibility for field data collection variations (multiple CBH measurements).

Related Documents

Notes — Measurement and Calculation Rules

When registering a specimen, only the following inputs are manually provided:

  • CAP1
  • CAP2
  • CAP3
  • CAP4
  • CAP5
  • CAP6

All remaining fields (ABI, CAP Mean, DAP, basal area in m², and volume) are computed automatically according to the rules below.


1. Area Basal Individual (ABI)

ABI corresponds to the sum of basal areas derived from each CAP measurement: ABI = (CAP1²)/(4π) + (CAP2²)/(4π) + (CAP3²)/(4π) + (CAP4²)/(4π) + (CAP5²)/(4π) + (CAP6²)/(4π)

Where:

  • ABI is expressed in cm².

2. CAP Médio (Mean Circumference)

The mean circumference is derived from ABI, not from the arithmetic average: CAP_mean = √( ABI × 4π )

3. DAP / DBH (Diameter)

DAP in centimeters:

DAP(cm) = CAP_mean / π

DAP in meters:

DAP(m) = DAP(cm) / 100

DAP squared:

DAP²(m²) = DAP(m) × DAP(m)


4. Basal Area (G)

Since ABI is in cm²: G(m²) = ABI / 10,000


5. Volume (Vol)

The specimen volume is computed as: Vol = G(m²) × Height

Volume cubed (if required):

Vol³ = Vol × Vol × Vol


6. Label Mapping

  • CAP = CBH (Circumference at Breast Height)
  • DAP = DBH (Diameter at Breast Height)
  • ABI = Individual Basal Area (sum of CAP-based areas)
  • G = Basal Area (m²)