;is the team currently active?
; Used by computed field #300 (CURRENTLY ACTIVE?) OF file #404.51
; Input:
; SCTM - Pointer to Team file #404.51
; SCDT - Date to check for, Default=DT
; Returns:
; 1 if after effective date and before inactive date
; 0 if not yet active or inactivated
; -1 if error
PR(SDNPI)
;Provider Display Data
; Input -- SDNPI New Person IEN
; Output -- Provider Display Data - Provider Name
OKPTTM(SCNODE,DA)
;check pt team assignment - 404.42
; SCNODE is proposed new node
INSTPCTM(DFN,SCEFF)
;return institution & team for pt's pc team
; return ptr4^institution^sctm^team name
ENROLL(DFN,CLINIC,DATE)
;is this patient enrolled in this clinic on a date?
WHOCLIN(SDCL,DATE)
;give clinic & date return prt to 200
; SDCL - ien of #44
; DATE - effective date (optional) default =DT
; Returned: ien of 200
WHOPOS(SCTP,DATE)
;given position & date,return pointer to 200^name of pr
EVTQ
PTTMSCRN
;define dic('s') to ensure patient team position assignement is ok
DISPWHO(SCPOS,DATE)
;given position & date, return external of 200
RESTCONS(DFN)
;does this patient have restricted consults?
; for a clinic in which the patient is NOT enrolled, some patients/teams
; require more authority to enroll or make appointments
; this will often be used with $$ENROLL(dfn) to see if he is enrolled
POSCLIN(SDCL,DATE)
;given clinic & date, return ptr to team position 404.57
; SDCL - ien of Hospital Location (#44)
; Returned: If exactly one position for clinic - ien of team postion
; else null