#Dev Log#GutPacer#AWS#Serverless#Health Informatics
The Record Existed. The Care Event Did Not.
A small GutPacer notification bug exposed a larger health-informatics problem: database presence, observed events, missing observations, and workflow context are different states.
The first GutPacer notifier asked a simple question: Does yesterday’s record exist?
If it did, no bowel-care reminder was sent. If it did not, the Lambda looked further back and sent a LINE message.
The query was technically correct and conceptually wrong.
A daily record could exist because someone had checked a medication box. Its presence said that the application had received data for that date. It did not say that a bowel movement had been observed. The notifier confused persistence with meaning, and a valid DynamoDB item suppressed the reminder it was supposed to support.
The immediate fix was one line: check the bowel field rather than the existence of the item. The more useful result was a clearer research and engineering question: What states does a care record need to represent when observation itself is incomplete?
A row is not an event
GutPacer stores several daily facts together: bowel information, medication checks, notes, and location. That shape is convenient for a one-screen caregiver form and a date-based history.
It also makes one DynamoDB item carry several independent meanings.
Consider these records:
{
"fullDate": "2026-07-18",
"meds": { "morning": true },
"bowel": null
}
{
"fullDate": "2026-07-19",
"meds": { "morning": true },
"bowel": { "amount": "medium", "type": "normal" }
}
Both dates have records. Only one has a recorded bowel event.
The original notifier effectively evaluated:
daily item exists -> day is complete
The corrected version evaluates:
bowel object exists -> bowel movement is recorded
That is better, but it still does not answer every real-world question.
Missing observation and observed absence are not the same
When bowel is null, at least two situations are possible:
- The caregiver completed the day and observed that there was no bowel movement.
- The caregiver recorded medication but did not complete the bowel section.
Those states can lead to the same stored value. One is an observation of absence. The other is an absence of observation.
For a reminder tool, collapsing them may be acceptable in the earliest version: either situation is a reason to ask the caregiver to review the record. For analysis, reporting, or multi-caregiver hand-off, the distinction becomes important. Treating missing data as a negative event would create false certainty.
A richer model could make completion explicit:
{
"bowelStatus": "none-observed",
"bowelRecordedAt": "2026-07-19T21:10:00+09:00",
"recordedBy": "verified-user-id"
}
Possible states might include:
movement-observednone-observednot-checkedfacility-managedunknown
The names need stakeholder validation before implementation. The point is not to create more enums. It is to avoid assigning a clinical-looking meaning to a missing field.
Workflow context changes the correct notification
GutPacer also tracks whether the person is at home or staying in a facility.
When care is being handled by a facility, the family may not have the information required to complete the home record. Sending the same reminder is not only annoying; it incorrectly assigns responsibility. Repeated irrelevant alerts then train the family to ignore future messages.
The notifier therefore skips family reminders during a facility stay. In state terms, facility-managed is not equivalent to none-observed or not-checked. It means the observation may exist in another workflow and another record system.
That creates a later hand-off problem: when the person returns home, should facility information be transcribed, summarized, or left as an explicit gap? GutPacer currently marks the location context but does not claim to solve cross-organization data exchange.
This is a useful product boundary. Direct staff access would introduce identity, authorization, consent, responsibility, and operational-support questions that are much larger than adding another input screen.
Notification logic is a state machine, even when written as if-statements
The first Lambda implemented the reminder policy as date lookups and conditionals. As the meanings became clearer, the hidden state machine emerged:
facility-managed -> suppress family reminder
movement-observed yesterday -> no missing-bowel reminder
no movement recorded yesterday
+ movement recorded the day before -> reminder
no movement recorded across multiple days -> stronger review prompt
The output is still deliberately modest. It is a prompt to review the record, not a diagnosis or treatment instruction. GutPacer does not infer a medical condition from the state machine.
This distinction affects language as much as code. “No bowel event was recorded” is supported by the data. “The person is constipated” is a clinical interpretation the application is not designed to make.
Serverless systems do not remove domain modelling
GutPacer’s notification path is small:
EventBridge schedule
-> Lambda
-> DynamoDB records and user settings
-> LINE Messaging API
There is no message broker, event-sourcing platform, or large domain layer. It would be easy to treat modelling as unnecessary architecture for such a small system.
The bug showed the opposite. The fewer layers a system has, the more directly one ambiguous field can shape user-facing behaviour. Domain modelling is not a synonym for adding infrastructure. Sometimes it is writing down that “record exists,” “event observed,” and “observation completed” are three different propositions.
The tests now protect the executable boundary, while the next schema iteration must protect the semantic one. Multi-user work already enforces verified identity as the partition key. A future record-status change should receive the same treatment: explicit states, migration rules, acceptance criteria, and tests showing that a missing observation is never silently upgraded into a known event.
A small bug became a research direction
For health informatics, the interesting problem is not simply how to store a bowel record. It is how data provenance, missingness, care setting, and responsibility affect what downstream systems are allowed to infer.
Questions worth studying include:
- Which explicit states can caregivers use reliably without increasing entry burden?
- How often do medication-only records represent an observed absence versus an unfinished record?
- Does adding an explicit “none observed” action improve data interpretability or reduce adherence?
- How should family-entered and facility-reported observations retain provenance when shown in one timeline?
- Which reminder language improves record completion without implying medical judgement?
GutPacer is too small to answer those questions by itself. It is large enough to reveal them honestly and to prototype testable versions of the data model.
The project remains a care-record tool in development. Follow the GutPacer product page or inspect the source and delivery history.
This is the kind of boundary I want to keep exploring across technical product management and doctoral research: where a small implementation detail becomes a question about data meaning, human workflow, and responsible inference. More projects are documented in the VEAI LAB portfolio.

Thanks for reading — built with care, for caregivers.