Skip to content

Update investigation model#3

Merged
upasanapattnaik-eq merged 1 commit into
mainfrom
investigation-model-update
Jul 16, 2024
Merged

Update investigation model#3
upasanapattnaik-eq merged 1 commit into
mainfrom
investigation-model-update

Conversation

@upasanapattnaik-eq
Copy link
Copy Markdown
Contributor

Update to Investigation model to include NBS_Act_Entity fields for F_PAGE_CASE update.

Copy link
Copy Markdown
Contributor

@alog-enquizit alog-enquizit left a comment

Choose a reason for hiding this comment

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

lgtm

@upasanapattnaik-eq upasanapattnaik-eq merged commit a9c7a17 into main Jul 16, 2024
@upasanapattnaik-eq upasanapattnaik-eq deleted the investigation-model-update branch July 16, 2024 19:47
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
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>
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.

2 participants