Skip to content

Commit 3af9b0b

Browse files
authored
Fixed NTE concatenation bug IN labkey_etl.v_labwork_results (#431)
1 parent 3fb6506 commit 3af9b0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

snprc_ehr/resources/source_queries/create_v_labwork_results.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ALTER VIEW [labkey_etl].[v_labwork_results] AS
3131
-- Note: Merged all procedure types into a single query
3232
-- Changes:
3333
--
34-
--
34+
-- 4/11/2022 Fixed NTE concatenation bug
3535
-- ==========================================================================================
3636

3737
SELECT
@@ -58,7 +58,7 @@ SELECT
5858
REPLACE(
5959
(SELECT RTRIM(LTRIM(nte.comment)) + '**NEWLINE**'
6060
FROM dbo.CLINICAL_PATH_NTE AS nte
61-
WHERE nte.message_id = obr.message_id AND obx.set_id = nte.set_id
61+
WHERE nte.message_id = obr.message_id
6262
ORDER BY CAST(nte.set_id AS INTEGER)
6363
FOR XML PATH ('') -- generates a concatenation of notes
6464

0 commit comments

Comments
 (0)