;return pc team for a date
; DFN - pointer to patient file
; DATE - date of interest
; ASSTYPE - Default=1 (PC Team)
; returns sctm
EXTMPRTP(SCTP,DATE)
;returns external of team and practitioner for position
QTDTBF
NMPCPR(DFN,DATE,PCROLE)
;returns ien & name of pract filling pc position
; DFN - pointer to patient file
; DATE - date of interest
; PCROLE - Practitioner Position where '1' = PC provider
; '2' = PC attending
; '3' = PC associate provider
;404.42 entry for tm,position - if active on date
; return -1 if error, 0 if no active entry or 404.42 entyr if one
GETPC(DFN,DATE,PCROLE,ASSTYPE)
;return pc position & team for a date
; DFN - pointer to patient file
; DATE - date of interest (Default=DT)
; PCROLE - Default=1 (PC Practitioner Position) note 2= pc attending
; ASSTYPE - Default=1 (PC Team)
; returns sctp^sctm^assigned to pc?
ALPHA(INARRAY,OUTARRAY)
;not supported - for PCMM only
; returns array sorted by 2nd piece's value
; it keeps the 0 node -it does not return any x-ref values
; it only converts arrays of type 1-n to another 1-n array
ACTHIST(FILE,IEN,SCDATES,SCERR,SCLIST)
;is entry active for a time period?
; Input Parameters:
; File = either 404.52 or 404.58 or 404.59
; IEN = pointer to team(404.51) or team position(404.57)
; SCDATES = (SEE PRIOR DEFINITION)
; SCLIST = Output array
; Returned:
; status (-1:error|0:inactive|1:active)^ien for file^actdt^inacdt
; which ien depends on status
DTBEFORE(FILE,IEN,STATUS,DATE)
;return next date before given one
NMPCTM(DFN,DATE,PCROLE)
;returns ien & name of pc team
; (See GETPCTM for variables)
QTACTH
DTAFTER(FILE,IEN,STATUS,DATE)
;return next date after given one
ACTHISTB(FILE,IEN)
;boolean active function
GETPCTP(DFN,DATE,PCROLE)
;return pc position for a date
; DFN - pointer to patient file
; DATE - date of interest
; PCROLE - Default=1 (PC Practitioner Position) note 2= pc attending
; returns sctp,or 0 if none or -1 if error
GETPRTP(SCTP,DATE)
;returns ien & name of practitioner filling position
; Returned [Error:-1,Else: sc200^practname]
QTDTAF
LOOP
EXT(FILE,IEN)
;return external value of team or team position file