Hi Guru’s,
I apologise if this is repeated but was unable to find a solution by searching all over the forum.
I wanted to implement in the designer.
SELECT fhp.fund_holder_code
FROM pe,
fhp
WHERE
AND pe.reg_gp_practice = fhp.practice_code
AND pe.discharge_date BETWEEN fhp.date_from AND NVL(fhp.date_to, pe.discharge_date)
The motive is to get the list of codes which were active at the respective course of time for each patient.
E.g. if a patient came last year to the doctor and if code A was used then it should display code A but in the patient came second time to the doctor and Code B was prevelant then it should display B.
The above query gives the code which is the correct match but unable to implement it in the Designer.
gurmeet_singh2 (BOB member since 2007-12-14)