mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
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:
parent
d743f6fb3b
commit
8e58f7e871
1 changed files with 9 additions and 0 deletions
|
|
@ -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]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue