Business · Product · Technology · AI

Define the public queue projection before the native client decodes it

A Movo-X queue-board case tracing a restricted server projection, optional-bearer routing, per-panel positions, native presentation and exact-key database test specifications.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: a waiting-room board needs queue state rather than a patient record

A public queue board serves a different audience from an authenticated visit-detail screen. The useful public information can be a ticket token, its position and the clinician panel, while a patient’s contact and clinical record belong to another access path. Choosing that response shape is a server responsibility.

The inspected Movo-X source defines a dedicated queue-board projection and a native model for consuming it. Three scoped tests examine routing and model behaviour. The database projection and its exact-key test script were inspected as pinned source without executing a database test or auditing the current deployed endpoint.

Build the response from explicitly selected queue fields

The reviewed SQL constructs serving entries from token, status and call time, and waiting entries from token, panel position and arrival time. Panel metadata identifies the clinician, and the top-level object supplies counts, clinic time zone, generation time and sequence metadata.

The function does not project patient names, phone numbers or patient record identifiers into those selected entry keys. Clinician names and identifiers are deliberately different fields with a public display role. Calling the result restricted is more precise than claiming it contains no identities at all or guarantees anonymity under every possible correlation.

Keep facility and day selection in the authoritative query

The projection receives tenant and facility context and obtains the facility’s queue-display time zone. Its selected encounter set is scoped to that facility’s current clinic day and supported queue states, with archived and migration-marked rows excluded in the inspected query.

That gives the response a defined population rather than asking the app to filter a full clinical record set. The current installed function and display configuration were not queried. Changes to the authoritative selection need a database-level review even if the native response type remains unchanged.

Route public and authenticated reads deliberately

The handler accepts a valid clinic slug on the public board route without a bearer and forwards a rate key to its public service operation. With accepted bearer claims, it uses the authenticated API path. The selected TypeScript fixture checks those two calls and the unchanged returned board shape.

It also checks refusal of an invalid slug and an explicitly invalid authorization header. A malformed credential is not silently treated as an anonymous request in that path. The fixture uses injected service responses; actual rate enforcement, clinic availability and current authorization remain responsibilities of the authoritative implementation.

Use exact output-key assertions at the database boundary

The inspected SQL test script asserts exact key sets for the board, panels, serving entries and waiting entries. It also uses synthetic identifying markers to look for unwanted data in the generated output. These are test specifications against the database-produced response, not only against a hand-written client fixture.

That is the right boundary for checking what crosses the network. This research reviewed the script but did not run it. An authorized acceptance environment should exercise those assertions after any projection change, including changes that add a seemingly harmless field to an existing object.

Recognize what native field dropping can and cannot establish

The selected Swift fixture intentionally includes an extra marker field in a waiting entry. The decoded model retains its declared queue fields, and re-encoding the model drops the unknown marker. This verifies selected client-model behaviour.

It cannot retract a field that already arrived over the network. The server handler passes the authoritative board through rather than performing a separate patient-field redaction step. The public data boundary therefore belongs to the server projection and its output tests, with native decoding providing a different compatibility boundary.

Separate panel positions from a flattened board presentation

The waiting position in the model belongs to its clinician panel. The native helper can also build a combined display: serving rows first, followed by waiting rows ordered by their arrival timestamps. The selected ordering fixture checks that flattened representation.

A combined row order is not a new global appointment or triage priority. The model keeps an unassigned panel when it contains tickets, and its wait text represents elapsed time from supplied timestamps. These presentation decisions should stay labelled according to their actual meaning rather than becoming a promise about when an individual will be seen.

Keep snapshot metadata and live-stream recovery as separate contracts

The board includes a generation timestamp and selected sequence metadata. Those values help describe the response, but reading them is not the same as proving a contiguous stream replay or instantaneous freshness on a display. The device gateway has its own replay and resynchronization behaviour.

Likewise, a source-defined board polling limit is not a production throughput measurement. Current polling, cache behaviour, stream configuration and display refresh need their own operating evidence. The route/model fixtures here do not open a real public board or measure how quickly a changed queue reaches a screen.

A practical public-board acceptance package

Retain the restricted projection, database exact-key tests, public/authenticated route fixture and native ordering/decoding cases. Verify actual wire output before relying on a client model to demonstrate data minimization. Keep patient records and public display metadata on their intended access paths.

For a CTO, the result is a board contract whose fields, audience and presentation can be explained precisely. The pinned source and three scoped cases establish selected design behaviour. Installed database output, current permissions, indirect identifiability and real display operation remain separately reviewable acceptance work.

Compare the reviewed boundaries

Different boundaries of a public queue board

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

LayerEvidence in this caseSeparate acceptance
Database projectionExplicit queue-entry and panel fields in sourceActual installed output and exact-key test execution
HTTP routingSynthetic public/authenticated dispatch and refusalsCurrent service permission and rate enforcement
Native decodingDeclared fields retained; extra marker not re-emittedInformation already present on the wire
Board presentationSelected panel and flattened ordering behaviourReal screen freshness and queue-priority meaning

Illustrative control flow

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

board = authoritative_restricted_queue_projection(clinic_scope)
assert_exact_wire_key_contract_in_database_tests(board)
route_selected_public_or_authenticated_read(board)
native_board = decode_declared_board_fields(board)
render_panel_positions_and_selected_flattened_order(native_board)

# Dropping an unknown client field does not erase its prior network disclosure.

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 ↗