This function tells if Visit is related to an appointment. Or if it is a
standalone visit (i.e. is not related to an appointment).
VISIT ien to a Visit file (#9000010) entry
1 if the visit is related to an appointment.
0 if the visit is NOT related to an appointment.
-1 if the visit is not a valued pointer.
The function returns the visit that is related to an appointment. Must be
able to resolve the Patient, Date/Time and Clinic to an appointment entry in
the Patient file.
PATIENT DFN of a patient in the Patient file (#2) and the
Patient/IHS file (#9000001)
DATETIME The date and time of the appointment
HOSPLOC The Clinic of the appointment, pointer to Hospital
Location file (#44)
>0 ien of visit that relates to the apppointment
0 if there is no appointment or the appointment does
not point to a visit.