@measurequick/measurequick-report-generator 1.5.16 → 1.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/report-gen-scripts/nci-report.js +66 -21
package/package.json
CHANGED
|
@@ -147,8 +147,13 @@ export async function getReport(payload, _test) {
|
|
|
147
147
|
form.getTextField('DateOfServiceUpper').setText(date.toLocaleDateString("en-US"));
|
|
148
148
|
form.getTextField('TimeOfServiceUpper').setText(date.toLocaleTimeString("en-US"));
|
|
149
149
|
}
|
|
150
|
+
let type = 'Duct System Screening';
|
|
151
|
+
if (test.ductScreeningSystemType === 1)
|
|
152
|
+
type = 'Duct System Analysis';
|
|
153
|
+
else if (test.ductScreeningSystemType === 2)
|
|
154
|
+
type = 'Duct Analysis w/Fan Table';
|
|
150
155
|
|
|
151
|
-
form.getTextField('HeaderText').setText(
|
|
156
|
+
form.getTextField('HeaderText').setText(type);
|
|
152
157
|
|
|
153
158
|
if (test.ductScreeningResult === 'PASS'){
|
|
154
159
|
form.getTextField('TestResultGreen').setText(`PASS`);
|
|
@@ -165,7 +170,7 @@ export async function getReport(payload, _test) {
|
|
|
165
170
|
//Airflow
|
|
166
171
|
if (test.ductScreeningType!==3){
|
|
167
172
|
if (test.ductScreeningAirflow){
|
|
168
|
-
form.getTextField('FanAirflow').setText(`${test.ductScreeningAirflow.toString()}`);
|
|
173
|
+
form.getTextField('FanAirflow').setText(`${test.ductScreeningAirflow.toString()} SCFM`);
|
|
169
174
|
}
|
|
170
175
|
if (test.ductScreeningAirflowTarget){
|
|
171
176
|
form.getTextField('FanAirflowTarget').setText(`${test.ductScreeningAirflowTarget.toString()}`);
|
|
@@ -187,7 +192,7 @@ export async function getReport(payload, _test) {
|
|
|
187
192
|
|
|
188
193
|
//TESP
|
|
189
194
|
if (test.ductScreeningTESP){
|
|
190
|
-
form.getTextField('TotalExternalStaticPressure').setText(`${test.ductScreeningTESP.toString()}`);
|
|
195
|
+
form.getTextField('TotalExternalStaticPressure').setText(`${test.ductScreeningTESP.toString()} inH2O`);
|
|
191
196
|
}
|
|
192
197
|
if (test.ductScreeningTESPTarget){
|
|
193
198
|
form.getTextField('TotalExternalStaticPressureTarget').setText(`${test.ductScreeningTESPTarget.toString()}`);
|
|
@@ -205,7 +210,7 @@ export async function getReport(payload, _test) {
|
|
|
205
210
|
|
|
206
211
|
//Filter Pressure Drop
|
|
207
212
|
if (test["ductScreeningPressureDrop"+filter_pressure_drop])
|
|
208
|
-
form.getTextField('FilterPressureDrop').setText(test['ductScreeningPressureDrop'+filter_pressure_drop].toString());
|
|
213
|
+
form.getTextField('FilterPressureDrop').setText(test['ductScreeningPressureDrop'+filter_pressure_drop].toString() + ' inH2O');
|
|
209
214
|
if (test['ductScreeningPressureDrop'+filter_pressure_drop+'Target'])
|
|
210
215
|
form.getTextField('FilterPressureDropTarget').setText(test['ductScreeningPressureDrop'+filter_pressure_drop+'Target'].toString());
|
|
211
216
|
//Add logic here for which image
|
|
@@ -221,8 +226,8 @@ export async function getReport(payload, _test) {
|
|
|
221
226
|
|
|
222
227
|
//Coil Pressure Drop
|
|
223
228
|
if (test.ductScreeningTestPoint3){
|
|
224
|
-
if (test["ductScreeningPressureDrop"+coil_pressure_drop])
|
|
225
|
-
form.getTextField('IndoorCoilPressureDrop').setText(test["ductScreeningPressureDrop"+coil_pressure_drop].toString());
|
|
229
|
+
if (test["ductScreeningPressureDrop"+coil_pressure_drop] || test["ductScreeningPressureDrop"+coil_pressure_drop]===0)
|
|
230
|
+
form.getTextField('IndoorCoilPressureDrop').setText(test["ductScreeningPressureDrop"+coil_pressure_drop].toString() + ' inH2O');
|
|
226
231
|
if (test["ductScreeningPressureDrop"+coil_pressure_drop+'Target'])
|
|
227
232
|
form.getTextField('IndoorCoilPressureDropTarget').setText(test["ductScreeningPressureDrop"+coil_pressure_drop+'Target'].toString());
|
|
228
233
|
//Add logic here for which image
|
|
@@ -242,7 +247,7 @@ export async function getReport(payload, _test) {
|
|
|
242
247
|
|
|
243
248
|
//Return Duct Pressure
|
|
244
249
|
if (test["ductScreeningPressureDrop"+return_pressure_drop])
|
|
245
|
-
form.getTextField('ReturnDuctPressure').setText(test["ductScreeningPressureDrop"+return_pressure_drop].toString());
|
|
250
|
+
form.getTextField('ReturnDuctPressure').setText(test["ductScreeningPressureDrop"+return_pressure_drop].toString() + ' inH2O');
|
|
246
251
|
if (test["ductScreeningPressureDrop"+return_pressure_drop+'Target'])
|
|
247
252
|
form.getTextField('ReturnDuctPressureTarget').setText(test["ductScreeningPressureDrop"+return_pressure_drop+'Target'].toString());
|
|
248
253
|
//Add logic here for which image
|
|
@@ -258,7 +263,7 @@ export async function getReport(payload, _test) {
|
|
|
258
263
|
|
|
259
264
|
//Supply Duct Pressure
|
|
260
265
|
if (test["ductScreeningPressureDrop"+supply_pressure])
|
|
261
|
-
form.getTextField('SupplyDuctPressure').setText(test["ductScreeningPressureDrop"+supply_pressure].toString());
|
|
266
|
+
form.getTextField('SupplyDuctPressure').setText(test["ductScreeningPressureDrop"+supply_pressure].toString() + ' inH2O');
|
|
262
267
|
if (test["ductScreeningPressureDrop"+supply_pressure+'Target'])
|
|
263
268
|
form.getTextField('SupplyDuctPressureTarget').setText(test["ductScreeningPressureDrop"+supply_pressure+'Target'].toString());
|
|
264
269
|
//Add logic here for which image
|
|
@@ -273,20 +278,35 @@ export async function getReport(payload, _test) {
|
|
|
273
278
|
form.getButton('ImageSupplyDuctPressure'+meas).setImage(icon);
|
|
274
279
|
|
|
275
280
|
//Additional Supporting Data
|
|
276
|
-
|
|
277
|
-
|
|
281
|
+
if (test.ductScreeningType){
|
|
282
|
+
let value = test.ductScreeningType === 1 ? 'Duct Analysis' : test.ductScreeningType === 2 ? 'Duct Analysis w/Fan Table' : 'Duct System Screening';
|
|
283
|
+
form.getTextField('AdditionalSupportingDataLabel1').setText(`Test Type:`);
|
|
284
|
+
form.getTextField('AdditionalSupportingDataValue1').setText(value);
|
|
285
|
+
}
|
|
278
286
|
//form.getButton('ImageAdditionalSupportingData1').setImage(icon);
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
if (test.ductScreeningSystemType){
|
|
288
|
+
form.getTextField('AdditionalSupportingDataLabel2').setText(`System Type:`);
|
|
289
|
+
form.getTextField('AdditionalSupportingDataValue2').setText(test.ductScreeningSystemType);
|
|
290
|
+
}
|
|
281
291
|
//form.getButton('ImageAdditionalSupportingData2').setImage(icon);
|
|
282
|
-
|
|
283
|
-
|
|
292
|
+
if (test.ductScreeningFilterLocation){
|
|
293
|
+
form.getTextField('AdditionalSupportingDataLabel3').setText(`Filter Location:`);
|
|
294
|
+
form.getTextField('AdditionalSupportingDataValue3').setText(test.ductScreeningFilterLocation);
|
|
295
|
+
}
|
|
284
296
|
//form.getButton('ImageAdditionalSupportingData3').setImage(icon);
|
|
285
|
-
|
|
286
|
-
|
|
297
|
+
if (test.tonnage_nominal){
|
|
298
|
+
form.getTextField('AdditionalSupportingDataLabel4').setText(`Nominal Tonnage:`);
|
|
299
|
+
form.getTextField('AdditionalSupportingDataValue4').setText(test.tonnage_nominal + ' tons');
|
|
300
|
+
}
|
|
287
301
|
//form.getButton('ImageAdditionalSupportingData4').setImage(icon);
|
|
288
|
-
|
|
289
|
-
|
|
302
|
+
if (test.ductScreeningType!==3&&test.airflow_rated){
|
|
303
|
+
form.getTextField('AdditionalSupportingDataLabel5').setText(`Airflow (Rated):`);
|
|
304
|
+
form.getTextField('AdditionalSupportingDataValue5').setText(test.airflow_rated + ' SCFM');
|
|
305
|
+
} else if (test.ductScreeningType!==3&&test.airflow_nominal&&test.tonnage_nominal){
|
|
306
|
+
let value = test.tonnage_nominal * test.airflow_nominal;
|
|
307
|
+
form.getTextField('AdditionalSupportingDataLabel5').setText(`Airflow (Nominal):`);
|
|
308
|
+
form.getTextField('AdditionalSupportingDataValue5').setText(value + ' SCFM');
|
|
309
|
+
}
|
|
290
310
|
//form.getButton('ImageAdditionalSupportingData5').setImage(icon);
|
|
291
311
|
form.getTextField('AdditionalSupportingDataLabel6').setText(``);
|
|
292
312
|
form.getTextField('AdditionalSupportingDataValue6').setText(``);
|
|
@@ -303,7 +323,30 @@ export async function getReport(payload, _test) {
|
|
|
303
323
|
}
|
|
304
324
|
//form.getButton('ImageAdditionalSupportingData9').setImage(icon);
|
|
305
325
|
|
|
306
|
-
|
|
326
|
+
let recommendations = '';
|
|
327
|
+
if (test.ductScreeningTESPResult!==0 && test.ductScreeningTESPResultText){
|
|
328
|
+
recommendations += (test.ductScreeningTESPResultText + '\n');
|
|
329
|
+
}
|
|
330
|
+
if (test.ductScreeningAirflowResult!==0 && test.ductScreeningAirflowResultText){
|
|
331
|
+
recommendations += (test.ductScreeningAiflowResultText + '\n');
|
|
332
|
+
}
|
|
333
|
+
if (test.ductScreeningPressureDrop1Result!==0 && test.ductScreeningPressureDrop1ResultText){
|
|
334
|
+
recommendations += (test.ductScreeningPressureDrop1ResultText + '\n');
|
|
335
|
+
}
|
|
336
|
+
if (test.ductScreeningPressureDrop2Result!==0 && test.ductScreeningPressureDrop2ResultText){
|
|
337
|
+
recommendations += (test.ductScreeningPressureDrop2ResultText + '\n');
|
|
338
|
+
}
|
|
339
|
+
if (test.ductScreeningPressureDrop3Result!==0 && test.ductScreeningPressureDrop3ResultText){
|
|
340
|
+
recommendations += (test.ductScreeningPressureDrop3ResultText + '\n');
|
|
341
|
+
}
|
|
342
|
+
if (test.ductScreeningPressureDrop4Result!==0 && test.ductScreeningPressureDrop4ResultText){
|
|
343
|
+
recommendations += (test.ductScreeningPressureDrop4ResultText + '\n');
|
|
344
|
+
}
|
|
345
|
+
if (!recommendations) {
|
|
346
|
+
recommendations = 'No recommendations. System passed all diagnostics!';
|
|
347
|
+
}
|
|
348
|
+
form.getTextField('Recommendations').setText(recommendations);
|
|
349
|
+
|
|
307
350
|
if (test.ductScreeningType!==3 && (test.ductScreeningAirflowResult||test.ductScreeningAirflowResult===0))
|
|
308
351
|
form.getTextField('FanAirflowPassFail').setText(getPassFailText(test.ductScreeningAirflowResult));
|
|
309
352
|
else form.getTextField('FanAirflowPassFail').setText('N/A');
|
|
@@ -311,10 +354,12 @@ export async function getReport(payload, _test) {
|
|
|
311
354
|
form.getTextField('StaticPressurePassFail').setText(getPassFailText(test.ductScreeningTESPResult));
|
|
312
355
|
if (test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']||test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']===0)
|
|
313
356
|
form.getTextField('AirFilterPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+filter_pressure_drop+'Result']));
|
|
314
|
-
if (test.ductScreeningTestPoint3){
|
|
357
|
+
if (test.ductScreeningTestPoint3||test.ductScreeningTestPoint3===0){
|
|
315
358
|
if (test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']||test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']===0)
|
|
316
359
|
form.getTextField('CoilPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+coil_pressure_drop+'Result']));
|
|
317
|
-
} else
|
|
360
|
+
} else {
|
|
361
|
+
form.getTextField('CoilPassFail').setText('N/A');
|
|
362
|
+
}
|
|
318
363
|
if (test['ductScreeningPressureDrop'+supply_pressure+'Result']||test['ductScreeningPressureDrop'+supply_pressure+'Result']===0)
|
|
319
364
|
form.getTextField('SupplyDuctPassFail').setText(getPassFailText(test['ductScreeningPressureDrop'+supply_pressure+'Result']));
|
|
320
365
|
if (test['ductScreeningPressureDrop'+return_pressure_drop+'Result']||test['ductScreeningPressureDrop'+return_pressure_drop+'Result']===0)
|