@welldot/utils
getOperationWarnings
Returns the validation warnings of the meters, production and operatingregime blocks, of the v2.3 historylogs categories and of aquiferanalysis references (.well v2.3) and of loggerseries events (.well v2.4). Warnings never make a file invalid. today (local calendar date) selects the active permit a
getOperationWarnings(
well,today?):OperationWarning
Returns the validation warnings of the meters, production and
operating_regime blocks, of the v2.3 history_logs categories and of
aquifer_analysis references (.well v2.3) and of logger_series events
(.well v2.4). Warnings never make a file invalid. today (local calendar
date) selects the active permit and the regime in force for
regime_exceeds_permit.
Meters:
meter_removed_before_installed—removed_atnot afterinstalled_at. ids: meter.overlapping_meters— two installation windows overlap (open = until infinity; touching is fine). ids: meter, meter.duplicate_meter_id— ids: meter id.
Production (effective entries only, except for ids and corrects):
reading_meter_unresolved— ids: production, meter_id.reading_outside_installation— reading beforeinstalled_ator afterremoved_at(equal is fine). ids: production, meter.reading_rollover_unknown— r₂ < r₁ withoutmax_reading. ids: r₁ production, r₂ production, meter.duplicate_production_id— ids: production id.corrects_unresolved—correctspoints to no entry. ids: production.corrects_cycle— thecorrectschain loops back. ids: production, once per entry in the cycle.estimate_period_invalid— anestimated_volumewhoseperiod_endis not afterperiod_start, or an unparseable instant. ids: production.estimated_overlaps_meter— anestimated_volumeoverlapping a meter interval; the meter wins. ids: production.
Operating regime:
duplicate_regime_id— ids: regime id.regime_duplicate_effective_from— same instant. ids: every regime sharing it.daily_operating_time_normalized— a regimedaily_operating_timeabove 24, read as 24 (v2.4). ids: regime.regime_exceeds_permit— the regime in force ontoday(latest whoseeffective_fromlocal date is on or beforetoday) hasflow_rateordaily_operating_timeabove anactive/active_pending_renewalpermit. ids: regime, permit.
History logs (ids: log):
log_category_field_mismatch— maintenance fields on a non-maintenanceentry,statuson a non-status_change.hydrodynamic_event_idsandsample_idsare valid on every category.log_reference_unresolved—pump_installation_id,meter_id, or an id inhydrodynamic_event_ids/sample_idsthat does not resolve.log_after_decommission— while the current status isdecommissionedorabandoned, a non-status_changeentry dated after the start of that closed run (the earliest closing entry not followed by a reopening one).missing_maintenance_type— a structuredmaintenanceentry (withpump_installation_idormeter_id) withoutmaintenance_type. Legacy maintenance entries without references are fine.missing_status— astatus_changeentry withoutstatus.
Aquifer analysis:
analysis_uses_retracted_event—source_event_idsorstatic_level_source_idpoints to a retracted event. ids: analysis, event.analysis_uses_logger_series—source_event_idsorstatic_level_source_idpoints to an effectivelogger_series, which is not a valid analysis source (v2.4). ids: analysis, event.
Logger series (effective events only, v2.4):
logger_reading_below_sensor— a reading whosedepthis greater thansensor_depth(the level is below the sensor, so the reading is invalid). Once per event. ids: event.
Parameters
well
Well
today?
string = ...