From b2d9efbe1f3a7866e18fad8b5461987959f8083d Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Wed, 13 May 2026 17:16:24 +0000 Subject: [PATCH] For aggressions, EVENTS.Certainty is the certainty of the recipient After phone discussion with Ian, 2026-05-13. The MS Access aggression_event.ae_recipient_certainty_flag column will need to be normalized to 'Y' and 'N' in the "clean" schema. NULL and N means false, Y and X means true. And some other illegitimate values exist. --- conversion/load_aggressions.m4 | 8 ++++---- doc/src/tables/events.m4 | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/conversion/load_aggressions.m4 b/conversion/load_aggressions.m4 index b507245..2ee424e 100644 --- a/conversion/load_aggressions.m4 +++ b/conversion/load_aggressions.m4 @@ -62,13 +62,13 @@ BEGIN , 'AGG' , this_ae.ae_time , this_ae.ae_time - , CASE -- badobs - WHEN this_ae.ae_bad_observation_flag IS NULL THEN + , CASE -- recipient certainty + WHEN this_ae.ae_recipient_certainty_flag = 'N' THEN '0' - WHEN this_ae.ae_bad_observation_flag = 'X' THEN + WHEN this_ae.ae_recipient_certainty_flag = 'Y' THEN '1' ELSE - 'Invalid' -- Blow up with an typecasting error + 'Invalid' -- Blow up with lookup error END , COALESCE(this_ae.ae_comments, '')); diff --git a/doc/src/tables/events.m4 b/doc/src/tables/events.m4 index 0c1b979..c686092 100644 --- a/doc/src/tables/events.m4 +++ b/doc/src/tables/events.m4 @@ -75,6 +75,9 @@ The following table lists these rules and implications: This means the value of the EVENTS.\ |EVENTS.Start| column must equal the value of the |EVENTS|.\ |EVENTS.Stop| column. + For aggression events, the |EVENTS|.\ |EVENTS.Certainty| column + records the certainty of the identity of the recipient. + .. _EVENTS_arrival_code: ``sdb_arrival`` (Arrival) @@ -241,7 +244,11 @@ Certainty A |CERTAINTIES|.\ |CERTAINTIES.Certainty| code designating the certainty of the event observation. -|EVENTS.Certainty_summary| |notnull| +|EVENTS.Certainty_summary| +The semantics of this column differs slightly in the case of +:ref:`aggression events `. + +|notnull| .. Don't have a seq column in events, unless later maybe -- 2.34.1