Dies ist ein Versuch einer Antwort. Es braucht wirklich vollständigere Daten, um ernst genommen zu werden. Hier geht's:
SELECT
*, 1 AS flag
FROM
(SELECT
*,
valuenum - LAG(valuenum, 1) OVER(partition by item) AS diff,
intime - LAG(intime, 1) OVER(partition by item) AS time_diff
FROM
lab L
JOIN
icu I
ON
L.id_sub = I.id
WHERE
L.item = 50912
AND
L.charttime < I.intime AND L.charttime > (I.intime - INTERVAL '7 DAY')
) AS select_diff
WHERE
select_diff.diff > 0.3
AND
select_diff.time_diff <interval '48 hours';