62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
# File 'lib/helper/ac_report_extraction.rb', line 62
def cooling_plant(node)
{
system_number: xpath(%w[System-Number], node),
identifier: xpath(%w[System-Component-Identifier], node),
equipment: {
manufacturer: xpath(%w[Manufacturer], node),
description: xpath(%w[Description], node),
model_reference: xpath(%w[Model-Reference], node),
serial_number: xpath(%w[Serial-Number], node),
year_installed: xpath(%w[Year-Installed], node),
cooling_capacity: xpath(%w[Cooling-Capacity], node),
refrigerant_type: {
type: xpath(%w[Type], node),
ecfgasregulation: xpath(%w[ECFGasRegulation], node),
ecozoneregulation: xpath(%w[ECOzoneRegulation], node),
},
refrigerant_charge: xpath(%w[Refrigerant-Charge], node),
location: xpath(%w[Location], node),
area_served: xpath(%w[Area-Served], node),
discrepancy_note: xpath(%w[Discrepancy-Note], node),
},
inspection:
checklist_values_with_guidance(
node.at("ACI-Cooling-Plant-Inspection"),
),
sizing: {
total_occupants:
xpath(%w[ACI-Cooling-Plant-Sizing/Total-Occupants], node),
total_floor_area:
xpath(%w[ACI-Cooling-Plant-Sizing/Total-Floor-Area], node),
occupant_density:
xpath(%w[ACI-Cooling-Plant-Sizing/Occupant-Density], node),
upper_heat_gain:
xpath(%w[ACI-Cooling-Plant-Sizing/Upper-Heat-Gain], node),
installed_capacity:
xpath(%w[ACI-Cooling-Plant-Sizing/Installed-Capacity], node),
acceptable_installed_size:
xpath(%w[ACI-Cooling-Plant-Sizing/Acceptable-Installed-Size], node),
guidance: guidance(node.at("ACI-Cooling-Plant-Sizing/Guidance")),
},
refrigeration: {
refrigerant_name:
xpath(%w[ACI-Cooling-Plant-Refrigeration/Refrigerant-Name], node),
f_gas_inspection:
checklist_values_with_guidance(node.at("ACI-Cooling-Plant-Refrigeration"))[
:f_gas_inspection,
],
pre_compressor:
xpath(%w[ACI-Cooling-Plant-Refrigeration/Pre-Compressor], node),
post_processor:
xpath(%w[ACI-Cooling-Plant-Refrigeration/Post-Processor], node),
ambient: xpath(%w[ACI-Cooling-Plant-Refrigeration/Ambient], node),
acceptable_temperature:
xpath(
%w[ACI-Cooling-Plant-Refrigeration/Acceptable-Temperature],
node,
),
compressor_control:
checklist_values(node.at("ACI-Cooling-Plant-Refrigeration"), skip_state: true)[
:compressor_control,
],
refrigerant_leak:
checklist_values(node.at("ACI-Cooling-Plant-Refrigeration"))[
:refrigerant_leak,
],
guidance:
guidance(node.at("ACI-Cooling-Plant-Refrigeration/Guidance")),
},
maintenance: {
records_kept:
checklist_values(node.at("ACI-Cooling-Plant-Maintenance"))[
:records_kept,
],
competent_person:
checklist_values(node.at("ACI-Cooling-Plant-Maintenance"))[
:competent_person,
],
guidance: guidance(node.at("ACI-Cooling-Plant-Maintenance/Guidance")),
},
metering: {
metering_installed: checklist_values_with_guidance(node.at("ACI-Cooling-Plant-Metering"))[:metering_installed],
bem_installed: checklist_values(node.at("ACI-Cooling-Plant-Metering"))[:bem_installed],
usage_records: checklist_values(node.at("ACI-Cooling-Plant-Metering"))[:usage_records],
excessive_use: checklist_values(node.at("ACI-Cooling-Plant-Metering"))[:excessive_use],
},
humidity_control:
checklist_values(node.at("ACI-Cooling-Plant-Humidity-Control"))[
:humidity_control,
],
chillers:
if xpath(%w[ACI-Cooling-Plant-Chillers], node).nil?
{}
else
checklist_values(node.at("ACI-Cooling-Plant-Chillers"))
end,
}
end
|