Update investigation model#3
Merged
Merged
Conversation
rseshadri99
added a commit
that referenced
this pull request
Feb 26, 2025
…atamart step #3 generating TMP_F_PAGE_CASE to avoid concurrent running of this step The step # 3 in th proc was failing with deadlock and could not recover. Adding the OPTION (MAXDOP 1); -- tentative fix to disable running it concurrently
4 tasks
ericnagel
added a commit
that referenced
this pull request
May 5, 2026
nullflux
added a commit
that referenced
this pull request
May 20, 2026
…aging CSV
The step "Generating ##SAS_morb_Rpt_User_Comment" joined the Order
observation to itself via root.morb_rpt_uid = obs.observation_uid and
then filtered obs.obs_domain_cd_st_1 IN ('C_Order','C_Result'), which
is impossible because the Order row's obs_domain_cd_st_1 is 'Order'.
The temp table was therefore always empty and MORB_RPT_USER_COMMENT
never populated.
Replaced the broken self-join with a staging-side walk: the upstream
NRT row #nrt_morbidity_observation already carries
followup_observation_uid as a CSV of the Order's children (mixed
C_Order / C_Result / Result), so this step expands that CSV via
CROSS APPLY string_split and joins to #morb_obs_reference filtered to
obs_domain_cd_st_1 = 'C_Result' to pull the user-comment row.
Stays entirely within RDB_MODERN staging — no cross-DB read of
nbs_odse.dbo.act_relationship, consistent with the
sp_nrt_*_postprocessing layer's "NRT-only" convention (cross-DB ODSE
joins live exclusively in sp_*_event SPs).
Verified locally: applied the routine, truncated MORB_RPT_USER_COMMENT,
ran sp_d_morbidity_report_postprocessing for the seeded morb (uid
20080010), confirmed 1 row populated with the seeded user-comment
text. job_flow_log shows step 19 (build ##SAS_morb_Rpt_User_Comment)
and step 27 (Insert into morb_Rpt_User_Comment) both at row_count=1
with no errors.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
nullflux
added a commit
that referenced
this pull request
May 20, 2026
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Update to Investigation model to include NBS_Act_Entity fields for F_PAGE_CASE update.