;clinics for patient
; input:
; DFN = ien of PATIENT <FILE#2> [required]
; SCDATES("BEGIN") = begin date to search (inclusive)
; [default: TODAY]
; ("END") = end date to search (inclusive)
; [default: TODAY]
; ("INCL") = 1: only use pracitioners who were on
; team for entire date range
; 0: anytime in date range
; [default: 1]
; SCTEAMA= array of teams to include reverse with scposa('exclude')
; SCERR = array NAME to store error messages.
; [ex. ^TMP("ORXX",$J)]
ST
OKCLIN(SC44,SCPOSA)
;is clinic ok, given position array
PTCLQ
OKDATA()
;check/setup variables - return 1 if ok; 0 if error