Skip to content

[Analyze-3513] Add care site to config - #3615

Open
brandantck wants to merge 5 commits into
developfrom
brandantck/analyze-3513_add_care_site_to_config
Open

brandantck wants to merge 5 commits into
developfrom
brandantck/analyze-3513_add_care_site_to_config

Conversation

@brandantck

@brandantck brandantck commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds Care site name and Care site Id to the Visit filter
  • Add $$SCHEMA$$ and $$VOCAB_SCHEMA$$ regex to allowed validation
  • Fix issue with cdw-config validate on postgres and bigquery.
image

CDM and PA config (mri-pg-config/src/db/seeds/03_Config.ts)

Field DuckDB (cdwConfigDuckdb) HANA (cdwConfig, omopHanaLeanCdwConfig)
expression COALESCE(@REF.care_site_name, 'No matching care site') COALESCE(@REF."CARE_SITE_NAME", 'No matching care site')
defaultFilter @REF.care_site_id = @VISIT.care_site_id @REF."CARE_SITE_ID" = @VISIT."CARE_SITE_ID"
referenceFilter @REF.care_site_name IS NOT NULL AND LOWER(@REF.care_site_name) LIKE LOWER('%@SEARCH_QUERY%') @REF."CARE_SITE_NAME" IS NOT NULL AND @REF."CARE_SITE_NAME" LIKE_REGEXPR '@SEARCH_QUERY' FLAG 'i'
from { "@REF": "$$SCHEMA$$.\"care_site\"" } { "@REF": "$$SCHEMA$$.\"CARE_SITE\"" }

Merge Checklist

Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out.

  • Automated Tests (Jasmine integration tests, Unit tests, and/or Performance tests)
  • Updated Manual tests / Demo Config
  • Documentation (Application guide, Admin guide, Markdown, Readme and/or Wiki)
  • Verified that local development environment is working with latest changes (integrated with latest develop branch)
  • following best practices in code review doc

Copilot AI balanced review requested due to automatic review settings October 28, 2026 02:03
@brandantck brandantck changed the title [Analyze-3117] Add care site to config [Analyze-3513] Add care site to config Oct 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Existing deployments do not receive the configuration updates, and declaring integer care_site_id as text causes filtering to fail with an unsupported PostgreSQL regex operation.

2 open issues
What changed in this PR

Adds care-site filtering to the default Patient Analytics Visit card for #3513, allowing researchers to select visits by facility name or ID.

Changes:

  • Adds care-site name lookups and ID attributes to the default CDM configurations.
  • Exposes both attributes in Patient Analytics filters, patient lists, and chart categories.
  • Updates table-reference validation to accept dataset and vocabulary schema placeholders.
File Description
plugins/​functions/​mri-pg-config/​src/​db/​seeds/​03_Config.ts Adds care-site attributes and corresponding Patient Analytics settings.
plugins/​functions/​cdw-svc/​src/​qe/​config/​configDefinition.ts Accepts schema placeholders and anchors validation to the full table reference.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
github — 1e00b8e6 Deployed Oct 30, 2026 by brandantck via publish #16060
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patient Analytics: add CARE_SITE.CARE_SITE_NAME as filter attribute on Visit card

3 participants