Show/Hide Toolbars

Filopto Help Manual

Navigation: Reports & Forms Tab > Report / Form Designer

How to use the P_PATIENT_DOC_REFERRED_TO

Scroll Prev Top Next More

Use the P_PATIENT_DOC_REFERRED_TO stored procedure to retrieve the list of physicians to whom the patient was referred to.

The P_PATIENT_DOC_REFERRED_TO stored procedure accepts one parameter, which is the patient number. And, will return a list of doctor numbers, that corresponds to the DOCTORNUMBER field in the FAMILYDOCTOR table.

 

Example : Retrieves Doctors names to which a patient has been referred to.  

SELECT

P1.DOCTORNUMBER,

FAMILYDOCTOR.FIRSTNAME,

FAMILYDOCTOR.LASTNAME

FROM P_PATIENT_DOC_REFERRED_TO(:PATIENTNO) AS P1

JOIN FAMILYDOCTOR

ON FAMILYDOCTOR.DOCTORNUMBER = P1.DOCTORNUMBER