Repository navigation
Conversation
Integrate functional dev work through 3f5fd70 with coordinated frontend contracts, regression fixes and disposable PostgreSQL/MariaDB verification. Related to sihsalus/sihsalus-frontend.tasktree#36. Co-authored-by: Anderson Bill Ticona Remond <abticonar@pucp.edu.pe>
Merged
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome and scope
Integrate Anderson's pending reportes-sql work with the indicators frontend: immutable definitions, catalogue filters, goals, canonical/history results, annual recalculation and consistent aggregate series. A changed nested filter creates a new version; multiple matching diagnoses count a single encounter; a failed version/metadata write rolls back the whole operation. Concurrent calculations preserve history and select one current result per indicator/month.
Related to https://github.com/sihsalus/sihsalus-frontend.tasktree/issues/36 (partial implementation; do not close). Coordinated frontend draft: sihsalus/sihsalus-frontend#1069 (head
fe587e2c1; technical CI passed).Functional source:
devthrough3f5fd70eae2184920b3063d0deda5ea416207460, with Anderson credited as co-author. Excludes later local debugging configuration, private agent state and unrelated dependency cleanup. Existing main behavior is the base; this branch introduces no hospital access or deployment.Contracts and data
app:indicadoresmodule privilege, and additionally require a configured institutional privilege for mutations/recalculation. An unset write privilege denies writes./openmrs/services/reportes-sql, separate catalogue service account and SELECT-only source MySQL account. No roles are created or assigned.versionesis a number array. Windowed-patient attribution and indicator definitions require institutional approval.Validation evidence
yarn install --immutableyarn test --runInBandyarn buildnode --check scripts/test-database-contract.mjsandgit diff --check origin/main...HEADcce6230e: https://github.com/sihsalus/reportes-sql/actions/runs/35677413338 — real SQL counts, source read-only grants, migration failure/restart, 8 concurrent calculations, CRUD rollback and HTTP series shapeRegression cases reproduced before fixes: nested definition changes, encounter-type validation and all count modes with repeated diagnoses. Real database tests refuse nonempty databases and remove synthetic fixtures on completion. The final CI run also passes Node 22 unit tests/build. The first database run exposed an incorrectly shaped synthetic privilege object; the fixture now uses the OpenMRS
displayrepresentation. No production guard or assertion was relaxed.Rollout and rollback
High risk: calculations and PostgreSQL canonical metadata change. Keep draft until database CI and institutional acceptance pass. Rehearse startup on a recoverable de-identified PostgreSQL copy; retain the existing PostgreSQL volume and OpenMRS database, disable automatic seeding, configure the approved write privilege/catalogue account and deploy coordinated pinned versions through the gateway. The distribution configuration still needs that coordination.
Stop on changed source data, lost history, duplicate canonical rows or mismatched approved calculations. Reverting an image alone does not reverse canonical metadata; PostgreSQL recovery requires the verified pre-upgrade backup. No merge or deployment is requested by this PR.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.