mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
section 4 save
This commit is contained in:
parent
d0315472fb
commit
27b16dc1c9
2 changed files with 19 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ from etl.transform.conditionReportTypes import (
|
|||
MainElevation, Elevation, ElevationInfo, PropertyAccess, ExternalElevation, ExternalElevationFront,
|
||||
ExternalElevationGableOne, ExternalElevationGableTwo, ExternalElevationRear, ConservatoryOrOutbuilding,
|
||||
AccessAndElevations, Hallway, RoomInfo, WindowsInfo, VentilationInfo, LivingRoom, DiningRoom, Kitchen,
|
||||
Utility, WC, Landing, Bedroom, Bathroom, LoftSpace, RoomInRoof
|
||||
Utility, WC, Landing, Bedroom, Bathroom, LoftSpace, RoomInRoof, HeatingSystem, GeneralConditionHeatingSystem
|
||||
)
|
||||
from datetime import datetime
|
||||
from pprint import pprint
|
||||
|
|
@ -88,6 +88,7 @@ class ConditionReport(SiteNotesExtractor):
|
|||
self.get_section_1()
|
||||
self.get_section_2()
|
||||
self.get_section_3()
|
||||
self.get_section_4()
|
||||
self.get_section_0()
|
||||
|
||||
def get_section_0(self):
|
||||
|
|
@ -287,8 +288,8 @@ class ConditionReport(SiteNotesExtractor):
|
|||
_ = self.get_bathroom()
|
||||
_ = self.get_loft_space()
|
||||
_ = self.get_room_in_roof()
|
||||
print("Put all this togeter in section 3")
|
||||
|
||||
pprint(_)
|
||||
|
||||
def get_room_info(self, data):
|
||||
ventilation = VentilationInfo(
|
||||
|
|
@ -453,6 +454,21 @@ class ConditionReport(SiteNotesExtractor):
|
|||
is_there_a_room_in_roof=room_in_roof_state,
|
||||
room_info=room_info
|
||||
)
|
||||
|
||||
def get_section_4(self):
|
||||
_ = self.get_general_condition_of_heating_system()
|
||||
pprint(_)
|
||||
|
||||
def get_general_condition_of_heating_system(self):
|
||||
data = self.get_data_between("4. Heating System", "Main Heating 1")
|
||||
return GeneralConditionHeatingSystem(
|
||||
is_the_heating_system_in_working_order=True if self.get_next_value(data, "Is the Heating System in working order?") else False,
|
||||
does_the_occupant_have_a_smart_meter=True if self.get_next_value(data, "Does the occupant have a Smart Meter?") else False,
|
||||
are_there_any_smart_monitoring_devices=True if self.get_next_value(data, "Are there any smart monitoring devices (Switchee etc)?") else False,
|
||||
are_the_gas_and_electricity_meters_accessible=True if self.get_next_value(data, "Are the Gas and Electricity Meters accessible") else False,
|
||||
dual_or_single_electric_meter=self.get_next_value(data, "Dual or single electric meter"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class GeneralConditionHeatingSystem(BaseModel):
|
|||
does_the_occupant_have_a_smart_meter: bool
|
||||
are_there_any_smart_monitoring_devices: bool
|
||||
are_the_gas_and_electricity_meters_accessible: bool
|
||||
further_notes: str
|
||||
dual_or_single_electric_meter: str
|
||||
|
||||
class SecondaryHeating(BaseModel):
|
||||
is_there_a_secondary_heating: bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue