From 9267320d5ec36a2b1f2416d0b7e90c0392a3a399 Mon Sep 17 00:00:00 2001 From: Jay Allen <107942890+jallentxbiomed@users.noreply.github.com> Date: Wed, 6 May 2026 09:13:33 -0500 Subject: [PATCH 1/2] Fix cost account ETL view returning multiple rows per charge id when a charge id has multiple species (#914) * removed join on species table * added order by to select --- .../resources/source_queries/create_v_charge_account.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/snprc_ehr/resources/source_queries/create_v_charge_account.sql b/snprc_ehr/resources/source_queries/create_v_charge_account.sql index 1fa67bbee..5df02bfb8 100644 --- a/snprc_ehr/resources/source_queries/create_v_charge_account.sql +++ b/snprc_ehr/resources/source_queries/create_v_charge_account.sql @@ -24,6 +24,7 @@ ALTER VIEW [labkey_etl].[v_charge_account] AS -- 11/11/2016 added modified, modifiedby, created, and createdby columns tjh -- 10/22/2019 removed distinct clause from valid_charge_by_species join tjh -- 02/15/2020 Added fallback for missing created & createdBy columns tjh + -- 04/23/2026 Removed join on species table and added OUTER APPLY ja -- ========================================================================================== @@ -47,7 +48,12 @@ ALTER VIEW [labkey_etl].[v_charge_account] AS ca.timestamp AS timestamp FROM dbo.charge_account AS ca LEFT OUTER JOIN dbo.TAC_COLUMNS AS tc ON tc.object_id = ca.object_id - LEFT OUTER JOIN dbo.valid_charge_by_species AS vcs ON ca.charge_id = vcs.charge_id + OUTER APPLY ( + SELECT TOP 1 vcs2.charge_id, vcs2.arc_species_code + FROM dbo.valid_charge_by_species vcs2 + WHERE vcs2.charge_id = ca.charge_id + ORDER BY vcs2.arc_species_code + ) vcs LEFT OUTER JOIN dbo.prd_cost_account AS pca on pca.account_id = ca.account_id From b6f7317d5dc56ed3ec24a41d18587e498c0360ca Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Thu, 7 May 2026 15:17:49 -0700 Subject: [PATCH 2/2] Create history.md (#926) --- snd/history.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 snd/history.md diff --git a/snd/history.md b/snd/history.md new file mode 100644 index 000000000..29700f605 --- /dev/null +++ b/snd/history.md @@ -0,0 +1,30 @@ +# snd module history + +**TL;DR:** the `snd` module's full commit history travels with it on every migration. **File-level** history and blame work everywhere — GitHub, IntelliJ, and any tool that follows renames (Sourcetree, GitKraken, Fork, GitLens, `git log --follow`, etc.). **Directory-level** history (`git log -- snd/` or GitHub's directory tree view) only shows commits since the most recent migration — for older directory-level browsing, open the corresponding repo from the table below. + +## Why directory-level history is limited + +Each migration changed the path of the module — first from a repo root into a subdirectory, then between subdirectories. Git's rename detection is per-file, not per-directory, so a directory-level log starts fresh at each move even though every individual file's history remains intact. + +## Where prior history lives + +| Repository | History active | Notes | +|------------------------------------------------------------------------------------------------------------------|-------------------------|--------------------------------------------------------------------------| +| [LabKey/snd](https://github.com/LabKey/snd) | until 2025-02-24 | Original standalone repo. Now archived. | +| [LabKey/ehrModules/snd](https://github.com/LabKey/ehrModules/tree/fc811d93c1a99ee46e219508da17041a9bcfb2d4/snd) | 2025-02-24 → 2026-05-05 | Rehomed via `LabKey/ehrModules` commit `76b86bc5` ("Rehome snd module"). | +| [LabKey/snprcEHRModules/snd](https://github.com/LabKey/snprcEHRModules/tree/develop/snd) | 2026-05-05 → present | Current home. Rehomed from `LabKey/ehrModules`. | + +## Browsing history + +### File-level (works everywhere) + +Any Git tool that follows renames will show full history back to the module's origin: + +- **GitHub**: open any individual file, then click *History* or *Blame*. GitHub follows renames automatically across migrations. +- **IntelliJ**: right-click a file → *Git → Show History* (or *Annotate* for blame). +- **Other tools** (Sourcetree, GitKraken, Fork, GitLens, etc.): use the file's history or blame view — these tools follow renames by default. +- **CLI**: `git log --follow -- `. + +### Directory-level (use the table above) + +There is no built-in equivalent to `--follow` for directories. To see directory-level history from before a migration, open the corresponding repo from the table above for the date range you care about and browse the module directory there.