Map assessment_type on full-SAP certs 🟩

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-06-25 20:53:22 +00:00
parent 33f9988ac5
commit 304e8afb00
2 changed files with 3 additions and 0 deletions

View file

@ -734,6 +734,7 @@ class EpcPropertyDataMapper:
door_count, insulated_door_u = _sap_door_aggregates(schema) door_count, insulated_door_u = _sap_door_aggregates(schema)
return EpcPropertyData( return EpcPropertyData(
uprn=schema.uprn, uprn=schema.uprn,
assessment_type=schema.assessment_type,
# SAP 2012 (~9.92) for this family — carried so CalculatorRebaseliner # SAP 2012 (~9.92) for this family — carried so CalculatorRebaseliner
# fires trigger (a) (sap_version < 10.2 → Effective = the SAP-10.2 # fires trigger (a) (sap_version < 10.2 → Effective = the SAP-10.2
# calc) instead of keeping the lodged SAP-2012 score (ADR-0037). # calc) instead of keeping the lodged SAP-2012 score (ADR-0037).

View file

@ -213,6 +213,8 @@ class SapSchema17_1:
# cert has no secondary. Read by the calculator's cert_to_inputs — dropping # cert has no secondary. Read by the calculator's cert_to_inputs — dropping
# it under-counts a real secondary heater (ADR-0037). # it under-counts a real secondary heater (ADR-0037).
secondary_heating: Optional[EnergyElement] = None secondary_heating: Optional[EnergyElement] = None
# "SAP" for this family (vs "RdSAP"); carried for provenance / the panel.
assessment_type: Optional[str] = None
# measured living-room area (m²); the engine consumes it via a back-solved # measured living-room area (m²); the engine consumes it via a back-solved
# habitable_rooms_count (Table 27). Optional — 100% present in the corpus. # habitable_rooms_count (Table 27). Optional — 100% present in the corpus.
living_area: Optional[Union[int, float]] = None living_area: Optional[Union[int, float]] = None