SCCVDSP1 ; ALB/TMP - SCHED VSTS CONV/ARCHIVE TEMPLATE DETAIL; 25-NOV-97
;;5.3;Scheduling;**211**;Aug 13, 1993
;
INIT(SCCVTYP) ; -- build template detail screen
I SCCVTYP="CST" D BLD^SCCVCDS1
;I SCCVTYP="AST" D BLD^SCCVADS1
Q
;
FNL(SCCVTYP) ; -- Clean up template detail display
K ^TMP("SCCV."_SCCVTYP_".EDIT.DX",$J),^TMP("SCCV."_SCCVTYP_".EDIT",$J)
D CLEAN^VALM10
Q
;
HDR(SCCVDA,SCCVTYP) ; -- Template screen header
I SCCVTYP="CST" D HDR^SCCVCDS1
;I SCCVTYP="AST" D HDR^SCCVADS1
Q
;
;
PHIS(SCCVH,SCCVTYP) ; -- View/Print history
;Assumes SCCVDA = the entry # from list manager selection
Q:'$G(SCCVDA)
D FULL^VALM1
N SCCVANY,SCCVLOGT,FLDS,BY,L,DIC,TO,FR,DIR,DIOEND
S SCCVANY=1
I SCCVTYP="CST" D
. S SCCVLOGT=$S(SCCVH="R":"REQUEST",SCCVH="E":"EVENT",1:"ERROR")
. I SCCVH="ERR" D
.. S SCCVANY=+$O(^SD(404.98,SCCVDA,"ERROR","A"),-1)
.. I SCCVANY D
... W !!,"FYI: There are "_SCCVANY_" lines in the error list"
I SCCVTYP="AST" D
. ;S SCCVLOGT=$S($G(SCCVH)="":"HISTORY",1:"ERROR")
S FLDS="[SCCV "_SCCVLOGT_" LOG PRINT]",BY="[SCCV "_SCCVLOGT_" LOG]"
S L=0,DIC="^SD(404.9"_$S(SCCVTYP="CST":"8,",1:"9,"),(TO,FR)=SCCVDA
S DIOEND="I '$G(SCCVANY) W !,""NO ""_SCCVLOGT_""S FOUND FOR THIS ""_SCCVTYP,!"
D EN1^DIP
D PAUSE^SCCVU
S VALMBCK="R"
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCCVDSP1 1308 printed Nov 22, 2024@17:48:35 Page 2
SCCVDSP1 ; ALB/TMP - SCHED VSTS CONV/ARCHIVE TEMPLATE DETAIL; 25-NOV-97
+1 ;;5.3;Scheduling;**211**;Aug 13, 1993
+2 ;
INIT(SCCVTYP) ; -- build template detail screen
+1 IF SCCVTYP="CST"
DO BLD^SCCVCDS1
+2 ;I SCCVTYP="AST" D BLD^SCCVADS1
+3 QUIT
+4 ;
FNL(SCCVTYP) ; -- Clean up template detail display
+1 KILL ^TMP("SCCV."_SCCVTYP_".EDIT.DX",$JOB),^TMP("SCCV."_SCCVTYP_".EDIT",$JOB)
+2 DO CLEAN^VALM10
+3 QUIT
+4 ;
HDR(SCCVDA,SCCVTYP) ; -- Template screen header
+1 IF SCCVTYP="CST"
DO HDR^SCCVCDS1
+2 ;I SCCVTYP="AST" D HDR^SCCVADS1
+3 QUIT
+4 ;
+5 ;
PHIS(SCCVH,SCCVTYP) ; -- View/Print history
+1 ;Assumes SCCVDA = the entry # from list manager selection
+2 if '$GET(SCCVDA)
QUIT
+3 DO FULL^VALM1
+4 NEW SCCVANY,SCCVLOGT,FLDS,BY,L,DIC,TO,FR,DIR,DIOEND
+5 SET SCCVANY=1
+6 IF SCCVTYP="CST"
Begin DoDot:1
+7 SET SCCVLOGT=$SELECT(SCCVH="R":"REQUEST",SCCVH="E":"EVENT",1:"ERROR")
+8 IF SCCVH="ERR"
Begin DoDot:2
+9 SET SCCVANY=+$ORDER(^SD(404.98,SCCVDA,"ERROR","A"),-1)
+10 IF SCCVANY
Begin DoDot:3
+11 WRITE !!,"FYI: There are "_SCCVANY_" lines in the error list"
End DoDot:3
End DoDot:2
End DoDot:1
+12 IF SCCVTYP="AST"
Begin DoDot:1
+13 ;S SCCVLOGT=$S($G(SCCVH)="":"HISTORY",1:"ERROR")
End DoDot:1
+14 SET FLDS="[SCCV "_SCCVLOGT_" LOG PRINT]"
SET BY="[SCCV "_SCCVLOGT_" LOG]"
+15 SET L=0
SET DIC="^SD(404.9"_$SELECT(SCCVTYP="CST":"8,",1:"9,")
SET (TO,FR)=SCCVDA
+16 SET DIOEND="I '$G(SCCVANY) W !,""NO ""_SCCVLOGT_""S FOUND FOR THIS ""_SCCVTYP,!"
+17 DO EN1^DIP
+18 DO PAUSE^SCCVU
+19 SET VALMBCK="R"
+20 QUIT
+21 ;