Business · Product · Technology · AI

Keep review eligibility, published scores and star display separate

A Movo-X service-feedback case tracing review input, publication flags, prior-weighted scores, numeric versus star rounding and the server-owned visibility decision.

Work directly with Omer Muneer Qazi · Reviewed 29 November 2026

The scenario: a score carries a publication decision

A service directory can receive feedback before it is appropriate to publish an aggregate score. A draft review, a completed visit, a moderation decision and a visible star value represent different states. Collapsing them into one number makes the interface difficult to explain and can overstate what the feedback means.

The pinned Movo-X discovery model separates review inputs, server publication flags and native display helpers. One TypeScript input case and five portable Swift cases passed with invented data. This chapter concerns service-feedback engineering, not a measurement of clinical outcomes or a ranking of actual clinicians. No live reviews or patient encounters were queried.

Validate review shape before deciding eligibility

The selected TypeScript fixture checks required creation selectors, integral ratings in the supported range, permitted aspect keys, text bounds and language shape. It distinguishes create fields from the smaller edit shape, including refusal of an empty edit. Those tests inspect input structure rather than a person’s entitlement to review a visit.

The inspected SQL separately checks account/session access, a selected completed encounter, its age and migration status, allowed review settings and the one-review-per-encounter rule. These branches were reviewed without database execution. A well-formed encounter identifier supplied by a client does not independently prove an eligible visit.

Separate submitted, held and published feedback

The selected schema has distinct pending, held, published, rejected and removed states. Creation source chooses a nonpublished state, with selected text-screening results influencing the held path. The score aggregation source selects published reviews rather than every submitted row.

Those are source observations, not evidence that every live moderation decision is correct or that screening detects all personal information. The clinic and country settings also influence whether feedback is enabled. A full acceptance record should exercise edits, removal, publication and setting changes against committed data, without treating a local input test as a moderation audit.

Explain the prior-weighted score rather than hiding its arithmetic

The inspected score formula combines a configured prior weight/mean with the sum and count of published feedback. The Swift arithmetic case uses twelve invented reviews summing to fifty-four, together with the selected default prior, and checks the rounded result. It also checks the zero-review prior and selected rounding/clamping examples.

This is not the same calculation as a raw average. The prior affects a smaller sample differently from a larger one. Passing the portable arithmetic fixture demonstrates selected local calculations, not PostgreSQL numeric parity over all configurations, statistical certainty or suitability as a clinical-quality measure.

Keep minimum-count authority with the publication producer

The selected SQL builds enabled, shown and minimumCount metadata and emits score/average values only after the configured threshold is met. The Swift model’s display helper checks enabled and shown, then uses a supplied numeric value; it does not independently recompute the threshold from count metadata.

A supplemental fixture makes that trust boundary explicit with intentionally inconsistent invented flags/counts. It confirms that the helper follows shown rather than treating the advertised minimum as another local gate. Separate hidden and disabled inputs omit the display score. This is a contract observation, not a claim that production responses contain that inconsistency.

Distinguish the numeric score from the graphic star transform

The native helper can prefer the supplied score and fall back to a supplied average when the score is absent. A supplemental case checks that precedence and a response with neither value. Another part checks the separate half-star representation: a numeric value can remain unchanged while the graphic rounds to the nearest supported fill.

Existing cases exercise selected half-star and whole-star adjustment examples. These are deterministic presentation transforms, not independent reviews or new calculated evidence about a clinic. A product acceptance decision should explain the displayed decimal and the graphic together so their different precision is understandable.

Preserve unknown or unavailable score states

The existing Swift cases decode enabled, building and disabled summaries and refuse to manufacture a display score when the required numeric value is absent. The model can therefore represent feedback being accumulated without pretending a missing score is a zero-star verdict.

The supplemental hidden example carries a high synthetic score and large count but still displays no score because its publication flag is false. That fixture is important because absence is a product state, not necessarily a transport error. It does not establish how every installed native view labels that state or how a stale cached response behaves after a policy change.

Review public fields without calling free text anonymous

The inspected public-review projection uses selected rating/aspect/text fields, a visit-month representation and a generic author label. Replies have their own publication state. The owner-facing representation adds further workflow details for the account’s own review. Those projections serve different audiences.

A generic author label is not proof that free text cannot identify someone or describe private care. This review did not run a content classifier, inspect real submissions or evaluate every permitted public field. Selected source screening and a controlled projection still require operational moderation, access and content-retention acceptance.

A useful service-feedback acceptance package

Keep input-shape, arithmetic, hidden/disabled, absent-score, precedence and star-fill fixtures. Add database tests for eligible encounters, duplicate submissions, moderation transitions, configured thresholds and removed reviews, then inspect the intended native states with synthetic feedback. Check the numeric and visual representation together.

For a CTO or product leader, this separates who may submit, which rows contribute, when an aggregate is published and how a client draws it. The selected local cases support those input and presentation boundaries. They do not establish current review authenticity, production moderation, whole-platform accessibility or medical effectiveness.

Compare the reviewed boundaries

Independent review-system decisions

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

DecisionSelected evidenceSeparate acceptance
Input shapeTypeScript selector/rating/aspect casesExecuted visit/account eligibility
Score contributionPublished-only SQL sourceCommitted moderation transitions
VisibilitySwift enabled/shown and absent-value casesAuthoritative threshold production
PresentationNumeric precedence and half-star casesActual native wording and accessibility

Illustrative control flow

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

review = validate_submission_shape(input)
eligibility = decide_visit_and_account_authority(review)
published_rows = apply_moderation_and_visibility_policy(eligibility)
summary = compute_authoritative_score_and_publication_flags(published_rows)
client_value = use_score_only_when_enabled_and_shown(summary)
# Star-fill precision is a presentation choice, not a separate clinical metric.

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 ↗