Commit bb7cec9
committed
Fix RTR bug #5b: populate nrt_investigation.patient_id before datamart chain
The Hepatitis datamart SP reads nrt_investigation.patient_id directly to
resolve PATIENT_KEY via F_PAGE_CASE. When NULL, F_PAGE_CASE's
COALESCE(PATIENT.PATIENT_KEY, 1) falls back to sentinel PATIENT_KEY=1
(PATIENT_UID=NULL), and the SP's `DELETE WHERE PATIENT_UID IS NULL`
then removes the row before INSERT. Setting patient_id to a real
nrt_patient.patient_uid in the orchestrator unblocks HEPATITIS_DATAMART
population. Verified by re-running the merged-fixture chain.1 parent efd71aa commit bb7cec9
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
268 | 277 | | |
269 | 278 | | |
270 | 279 | | |
| |||
0 commit comments