Business · Product · Technology · AI

Keep allergy records, document statements and unknown values distinct

A Movo-X native-model case separating reported and clinic allergy data, unconfirmed document text, no-known-allergies statements, versioned edits and forward-compatible values.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: an empty collection is not a negative clinical finding

A health application can have no recorded allergy rows, an unconfirmed statement extracted from a document, or a family-reported allergy. Those states carry different meanings. Treating every empty collection as an affirmative statement of no allergies would erase the distinction between missing information and recorded evidence.

The inspected Movo-X models keep recorded counts, documented counts and a no-known-allergies document flag separate. Ten portable Swift cases examine selected decoding, edits, summaries and fake-transport outcomes. The chapter concerns representation and provenance, without determining whether an individual has an allergy or can receive a medicine.

Preserve the no-known-allergies statement as its own field

The medicine-plan model represents the document statement with an optional Boolean. A true value enables a statement-specific presentation property. Missing and false values do not enable that property. The existing tests also check that the statement does not increase the recorded-allergy count.

A supplemental fixture deliberately supplies both a true statement flag and separate positive counts. Decoding preserves all those supplied values; it does not make the flag cancel the counts. The representation can therefore carry evidence requiring interpretation rather than resolving a contradiction by silently deleting one side.

Distinguish the source flag from a latest clinical conclusion

The selected SQL helper looks within a bounded set of successful episode-document readings for a recognized statement or explicit extraction flag. It has branches for older stored text and newer structured readings. Its phrase rules exclude selected exception forms from being treated as a plain negative statement.

The corresponding database test script contains synthetic phrase and stored-reading assertions, but it was inspected rather than executed here. This source policy describes evidence found in selected documents. It is not a latest-clinician determination, exhaustive multilingual interpretation or proof that every relevant document has been processed.

Display recorded information before the document statement

The reviewed SwiftUI source renders household active entries and a separate clinic-recorded section. When a document statement exists, the source can show its neutral line alongside recorded information; it does not use the flag as a command to clear the active list. When the selected recorded lists are empty, that line can replace the ordinary empty-state text.

These branches were reviewed in source, without rendering the screen. Exact localized wording, accessibility output and the way a user interprets apparently conflicting information still need interface acceptance. A model-property assertion does not establish that every displayed translation communicates the intended uncertainty.

Carry provenance and verification separately from severity

A household allergy row has its own substance, reaction, severity, status, source and verification fields. Document source identifiers distinguish a referenced episode and attachment from a family report. The selected fixture checks those shapes and a clinician-confirmed row.

The native draft helper permits changes to selected details for an editable family record, while a clinician-confirmed row’s draft patch is limited to a status change. That client policy is not an authorization boundary by itself. The server must verify the actual source, relationship and permitted mutation rather than trusting the UI to establish confirmation.

Make unknown-value behaviour explicit

The model maps unfamiliar severity and verification values to unknown and retains an unfamiliar source kind for reading. An unfamiliar status is distinct from active and appears in the model’s inactive grouping. Missing or undecodable status has its separate default path in the decoder. These are compatibility choices, not a clinical classification of risk.

The list decoder also skips malformed rows while retaining selected valid rows. The existing fixture checks that one broken row does not hide the others. A successfully decoded or empty list should therefore never be treated as independent proof that the complete underlying record contains no relevant information.

Keep edit intent and reviewed version in the request

The draft patch includes the original row version and only changed fields. Optional values can be omitted, set or explicitly cleared with null. An unchanged draft yields no patch, and selected clinician-confirmed details are not emitted by that draft transformation.

The fake-transport tests check selected paths, request identifiers, delete-version query and propagated conflict/refusal outcomes. Those responses are scripted. They establish client construction and error handling rather than a real database’s concurrency or permission enforcement. Review and retry must use the authoritative result for the actual record.

Separate presentation deduplication from identity resolution

The summary helper compares normalized names when separating clinic-recorded names from household entries and unconfirmed document strings. The fixture checks selected case-insensitive duplicates and the implementation’s derived-name handling. It also verifies replacement and removal of local list entries by identifier.

Name matching in a summary is a display policy, not a terminology service or proof that two substances are medically equivalent. The source’s treatment of active and resolved household entries differs between summary functions. Those policies should remain explicit when changing how sources are grouped or allowing a document statement to become a record.

A practical provenance acceptance package

Keep fixtures for absent, false and true document flags, coexisting recorded counts, malformed rows, unfamiliar values, document provenance, unchanged drafts and explicit clearing. Add database tests for source validation and current authorization, then render the actual localized interface with conflicting and incomplete evidence.

For a CTO, the result is a data contract that preserves what is recorded, where it came from and what remains unknown. The pinned source and ten scoped cases establish selected native behaviour. Clinical interpretation, complete extraction, current server enforcement and real device presentation remain separately reviewable responsibilities.

Compare the reviewed boundaries

Different meanings within an allergy summary

On smaller screens, scroll across to compare every column. Keyboard users can focus the table and use the arrow keys.

RepresentationMeaning in this caseCannot establish alone
Recorded countCount supplied separately from the document flagAbsence of an allergy when zero
Document statementA selected document says no known allergiesCurrent clinical clearance
Family or clinic entryA row or name with a selected source policyEquivalent verification across all sources
Unknown or skipped valueCompatibility handling by the native modelComplete clinical information

Illustrative control flow

Pseudocode summarizing the decision boundary. It is not copied production code or a deployment instruction.

decode_recorded_counts_and_document_statement_separately()
retain_provenance_verification_and_status()
render_recorded_entries_with_statement_context()
patch_only_changed_permitted_fields_with_reviewed_version()

# An empty list and a documented negative statement are different evidence states.

About this engineering series

Written by Omer Muneer Qazi from a review of Movo-X implementation and dated engineering records. This article explains source behaviour and historical observations; current production, clinical outcomes and store availability require their own verification. Examples are synthetic and proposed test cases are identified as such.

Explore the Movo-X engineering series → · Related implementation experience →

Discuss a similar engineering problem

Send the workflow, current platform and the decision your team needs to make. I can help define an implementation or review scope with concrete acceptance evidence.

Discuss your project on WhatsApp ↗
WhatsApp Omer about this project ↗