; -- called by input transform and screen logic for type of reason
; Input: EVCODE = event code (e.g. ZM1)
; Used to check for fields that point to Scheduling Reason File
; Piece = Piece number of zero node of
; setup date array & error arrays if none passed in
; VARIABLES SET:
; SCOK - SET TO 0 IF ERROR
TEAMCNT2(SCTM,DATE)
;this is the count of patients assigned to the team on a date
; Input: SCTM - ien to 404.51
; DATE - date of concern, default=DT
CHK
;
OKPREC(TEAM)
; - called by screen logic for preceptor position file (#.1) of team position (#404.57) file
; Input; TEAM = Pointer to team file (#404.51) for team position with preceptor
; requires position being assigned to be a possible preceptor position
; AND that position is from the same team as the supervised position
ERR(SEQ,ERNUM,PARMS,OUTPUT,SCER)
;-- process errors
ST
OKTMPOS(TEAM,POSITION,DATE)
;validate legitimate position in a team for a dt
; used in screen for pc practitioner position of patient team assngt
;this is a more efficient count of PC patients assigned to position
; Input: SCTP - ien to 404.57
; SCDATE - date of concern, default=DT
; SCPCONLY - 1= must be pc, 0=all assignments 1=DEFAULT
; SCFUTURE - 1= include future, 0=current 0=DEFAULT ;;bp/cmf 177
QTDATES
DATES(FILE,IEN,DATE)
;used to return latest activation & inactivation date
; Input Parameters:
; File = either 404.52, 404.53, 404.58, or 404.59
; IEN = pointer to team(404.51) or team position(404.57)
; DATE = default=DT
; Returned:
; status^actdate^inactdate^scien^first actdate? [1=yes/null=no]
;gets last date for team or position from 404.52,404.58,404.59 - uses DATES function below
; Input Parameters:
; File = either 404.52 or 404.58 or 404.59
; IEN = pointer to team(404.51) or team position(404.57)
; Returned:
; -1 if error,o/w latest date defined 0=no historical dates