SCMC PCMM NIGHTLY TASK (10611)    OPTION (19)

View in ViViaN Menu
Name Value
NAME SCMC PCMM NIGHTLY TASK
X ACTION PRESENT YES
MENU TEXT PCMM NIGHTLY TASK
UPPERCASE MENU TEXT PCMM NIGHTLY TASK
E ACTION PRESENT YES
EXIT ACTION N DTT S DTT=+$D(^XTMP("SCMCTSK2-"_$$HTFM^XLFDT($H,1),$J,"START")) N DT1 S DT1=$S(DTT>0:$$HTFM^XLFDT($H,1),1:$$HTFM^XLFDT($H-1,1)) S ^XTMP("SCMCTSK2-"_DT1,$J,"STOP")=$$HTE^XLFDT($H)
OUT OF ORDER MESSAGE This functionality is now accomplished by the PCMM Web Application.
ENTRY ACTION S ^XTMP("SCMCTSK2-"_$$HTFM^XLFDT($H,1),0)=$$HTFM^XLFDT($H+7,1)_U_$$HTFM^XLFDT($H,1)_U_$J,^XTMP("SCMCTSK2-"_$$HTFM^XLFDT($H,1),$J,"START")=$$HTE^XLFDT($H)
ROUTINE NIGHT^SCMCTSK2
LOCK SC PCMM SETUP
DESCRIPTION
This option should be scheduled once a day. It reviews Patient team assignments
and flaggs them for inactivation if their assignment is NEW and they 
have not been seen in the last year. It also flaggs ESTABLISHED patients 
if they have not been seen more than two years. If there are not 
appointments within 30 days since flagging the related patients are 
inactivated on the closest 15th or the end of month process. Messages are 
generated both on the 15th and on the last day of a month.
CREATOR USER,ONE
TYPE run routine