From 8e58f7e871b2a92820fc92f55b02736fdaf65097 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 14 Jul 2026 23:12:08 +0000 Subject: [PATCH] =?UTF-8?q?Capture=20the=20per-surface=20RIR=20insulation-?= =?UTF-8?q?known=20answer=20from=20the=20survey=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- backend/documents_parser/extractor.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/documents_parser/extractor.py b/backend/documents_parser/extractor.py index 334cf08cc..767e8c731 100644 --- a/backend/documents_parser/extractor.py +++ b/backend/documents_parser/extractor.py @@ -685,10 +685,19 @@ class PasHubRdSapSiteNotesExtractor: height = self._get_in(data, f"{prefix} height:") if length is None and height is None: return None + # "{prefix}: Are you able to provide details of the insulation …?" — + # the question wraps onto a second PDF line, so the Yes/No sits at + # offset 2 from the stable first-line key. Absent on legacy forms. + known_raw = self._get_in( + data, f"{prefix}: Are you able to provide details of the", offset=2 + ) return RoomInRoofSurfaceDetail( length_m=float(length.split()[0]) if length else None, height_m=float(height.split()[0]) if height else None, gable_type=self._get_in(data, f"{prefix} type:") if with_type else None, + insulation_known=( + None if known_raw is None else known_raw.lower() == "yes" + ), ) def _parse_room_in_roof(self, data: List[str]) -> Optional[RoomInRoofDetail]: