Capture the per-surface RIR insulation-known answer from the survey 🟩

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-14 23:12:08 +00:00
parent d743f6fb3b
commit 8e58f7e871

View file

@ -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]: