SCCVCDS1 ; ALB/TMP - SCHED VSTS CONV - SCREEN BUILD ; 25-NOV-97
;;5.3;Scheduling;**211**;Aug 13, 1993
;
BLD ; -- build selected template display
N SCCV0,SCCV1,SCCV2,SCCVLRQ,SCCVZ,SCCVZ1
S VALMBG=1,SCCVSCRN=2
Q:'$D(SCCVDA)
K ^TMP("SCCV.CST.EDIT",$J),^TMP("SCCV.CST.EDIT.DX",$J)
S VALMCNT=0
S SCCV0=$G(^SD(404.98,SCCVDA,0)),SCCV1=$G(^(1)),SCCV2=$G(^(2))
S SCCVLRQ=+$$LSTREQ^SCCVLOG(SCCVDA),SCCVLRQ=$G(^SD(404.98,SCCVDA,"R",SCCVLRQ,0))
S VALMCNT=VALMCNT+1
S SCCVZ="Conversion Template Date Range:"
D SET^VALM10(VALMCNT,SCCVZ),REV^SCCVDSP2(SCCVZ,VALMCNT,1)
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT,"Start Date: "_$$FMTE^XLFDT($P(SCCV0,U,3),"1D"))
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT,"End Date : "_$$FMTE^XLFDT($P(SCCV0,U,4),"1D"))
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT," ")
I $P(SCCVLRQ,U,3) D
.S VALMCNT=VALMCNT+1
.S SCCVZ="Conversion Results:"
.D SET^VALM10(VALMCNT,SCCVZ),REV^SCCVDSP2(SCCVZ,VALMCNT,1)
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,$$LAST($P(SCCV1,U)))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,"# Converted : "_+$P(SCCV1,U,2))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,"# Not Converted: "_+$P(SCCV2,U,6))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,"# Errors Logged: "_+$P(SCCV1,U,5))
I '$P(SCCVLRQ,U,3) D
.S VALMCNT=VALMCNT+1
.S SCCVZ="Estimate Results:"
.D SET^VALM10(VALMCNT,SCCVZ),REV^SCCVDSP2(SCCVZ,VALMCNT,1)
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,$E("# Encounters to be added : "_+$P(SCCV2,U,7)_$J("",39),1,39)_"# Add/Edits Found : "_+$P(SCCV2,U))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,$E("# Visits to be added : "_+$P(SCCV2,U,8)_$J("",39),1,39)_"# Ancillaries Found : "_+$P(SCCV2,U,2))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,$E("# V PROVIDERs to be added : "_+$P(SCCV2,U,9)_$J("",39),1,39)_"# Appointments Found: "_+$P(SCCV2,U,3))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,$E("# V POVs to be added : "_+$P(SCCV2,U,10)_$J("",39),1,39)_"# Credit Stops Found: "_+$P(SCCV2,U,4))
.S VALMCNT=VALMCNT+1
.D SET^VALM10(VALMCNT,$E("# V CPTs to be added : "_+$P(SCCV2,U,11)_$J("",39),1,39)_"# Dispositions Found: "_+$P(SCCV2,U,5))
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT," ")
S VALMCNT=VALMCNT+1
S SCCVZ="Last Event:",SCCVZ1="Last Action Request:"
D SET^VALM10(VALMCNT,$E(SCCVZ_$J("",39),1,39)_SCCVZ1),REV^SCCVDSP2(SCCVZ,VALMCNT,1),REV^SCCVDSP2(SCCVZ1,VALMCNT,40)
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT,$E("Event : "_$$EXPAND^SCCVDSP2(404.98,.05,$P(SCCV0,U,5))_$J("",39),1,39)_"Action : "_$$NONE^SCCVDSP2(404.98,.08,$P(SCCV0,U,8),"<No action requested>"))
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT,$E("Status: "_$$EXPAND^SCCVDSP2(404.98,.07,$P(SCCV0,U,7))_$J("",39),1,39)_"Start Date/Tm: "_$$FMTE^XLFDT($P(SCCVLRQ,U,4)))
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT,$J("",39)_"Stop Date/Tm : "_$$FMTE^XLFDT($P(SCCVLRQ,U,5)))
S VALMCNT=VALMCNT+1
D SET^VALM10(VALMCNT,$E("Bulletin Upon Completion: "_$$EXPAND^SCCVDSP2(404.98,.06,+$P(SCCV0,U,6))_$J("",39),1,39)_$E("Task # : "_$P(SCCV1,U,3)_$J("",28),1,28)_"Volume: "_$P(SCCV1,U,4))
I '$P(SCCVLRQ,U,3) D
.N SCGRAPH,SCCT,Z
.S SCCT=$$DSPGLBL^SCCVEGD1(SCCVDA,"SCGRAPH",0)
.I SCCT D
..S VALMCNT=VALMCNT+1
..D SET^VALM10(VALMCNT," ")
..S Z=0 F S Z=$O(SCGRAPH(Z)) Q:'Z I $D(SCGRAPH(Z,0)) D
...S VALMCNT=VALMCNT+1
...D SET^VALM10(VALMCNT,$J("",10)_SCGRAPH(Z,0))
Q
;
HDR ;Template screen header
N SCCV0,X
S SCCV0=$G(^SD(404.98,SCCVDA,0))
S X="List #: "_+$O(VALMY(0))_" "
S X=X_$$FMTE^XLFDT($P(SCCV0,U,3),"1D")_" - "_$$FMTE^XLFDT($P(SCCV0,U,4),"1D")_" "
S X=X_$$EXPAND^SCCVDSP2(404.98,.05,$P(SCCV0,U,5))_" "_$$EXPAND^SCCVDSP2(404.98,.07,$P(SCCV0,U,7))_" "
S X=X_"Template #: "_$P(SCCV0,U)
S VALMHDR(1)=X
Q
;
LAST(SCOE) ; -- build last encounter info string
N SCOE0,SCORG,X
S SCOE0=$G(^SCE(+SCOE,0)),SCORG=$P(SCOE0,U,8)
S X="Last ^SCE Entry: "_SCOE
S X=X_" DFN: "_$P(SCOE0,U,2)
S X=X_" Type: "_$S(SCORG=1:"Appointment",SCORG=2:"Stop Code Addition",SCORG=3:"Disposition",SCORG=4:"Credit Stop",1:"")
Q X
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCCVCDS1 4085 printed Nov 22, 2024@17:48:24 Page 2
SCCVCDS1 ; ALB/TMP - SCHED VSTS CONV - SCREEN BUILD ; 25-NOV-97
+1 ;;5.3;Scheduling;**211**;Aug 13, 1993
+2 ;
BLD ; -- build selected template display
+1 NEW SCCV0,SCCV1,SCCV2,SCCVLRQ,SCCVZ,SCCVZ1
+2 SET VALMBG=1
SET SCCVSCRN=2
+3 if '$DATA(SCCVDA)
QUIT
+4 KILL ^TMP("SCCV.CST.EDIT",$JOB),^TMP("SCCV.CST.EDIT.DX",$JOB)
+5 SET VALMCNT=0
+6 SET SCCV0=$GET(^SD(404.98,SCCVDA,0))
SET SCCV1=$GET(^(1))
SET SCCV2=$GET(^(2))
+7 SET SCCVLRQ=+$$LSTREQ^SCCVLOG(SCCVDA)
SET SCCVLRQ=$GET(^SD(404.98,SCCVDA,"R",SCCVLRQ,0))
+8 SET VALMCNT=VALMCNT+1
+9 SET SCCVZ="Conversion Template Date Range:"
+10 DO SET^VALM10(VALMCNT,SCCVZ)
DO REV^SCCVDSP2(SCCVZ,VALMCNT,1)
+11 SET VALMCNT=VALMCNT+1
+12 DO SET^VALM10(VALMCNT,"Start Date: "_$$FMTE^XLFDT($PIECE(SCCV0,U,3),"1D"))
+13 SET VALMCNT=VALMCNT+1
+14 DO SET^VALM10(VALMCNT,"End Date : "_$$FMTE^XLFDT($PIECE(SCCV0,U,4),"1D"))
+15 SET VALMCNT=VALMCNT+1
+16 DO SET^VALM10(VALMCNT," ")
+17 IF $PIECE(SCCVLRQ,U,3)
Begin DoDot:1
+18 SET VALMCNT=VALMCNT+1
+19 SET SCCVZ="Conversion Results:"
+20 DO SET^VALM10(VALMCNT,SCCVZ)
DO REV^SCCVDSP2(SCCVZ,VALMCNT,1)
+21 SET VALMCNT=VALMCNT+1
+22 DO SET^VALM10(VALMCNT,$$LAST($PIECE(SCCV1,U)))
+23 SET VALMCNT=VALMCNT+1
+24 DO SET^VALM10(VALMCNT,"# Converted : "_+$PIECE(SCCV1,U,2))
+25 SET VALMCNT=VALMCNT+1
+26 DO SET^VALM10(VALMCNT,"# Not Converted: "_+$PIECE(SCCV2,U,6))
+27 SET VALMCNT=VALMCNT+1
+28 DO SET^VALM10(VALMCNT,"# Errors Logged: "_+$PIECE(SCCV1,U,5))
End DoDot:1
+29 IF '$PIECE(SCCVLRQ,U,3)
Begin DoDot:1
+30 SET VALMCNT=VALMCNT+1
+31 SET SCCVZ="Estimate Results:"
+32 DO SET^VALM10(VALMCNT,SCCVZ)
DO REV^SCCVDSP2(SCCVZ,VALMCNT,1)
+33 SET VALMCNT=VALMCNT+1
+34 DO SET^VALM10(VALMCNT,$EXTRACT("# Encounters to be added : "_+$PIECE(SCCV2,U,7)_$JUSTIFY("",39),1,39)_"# Add/Edits Found : "_+$PIECE(SCCV2,U))
+35 SET VALMCNT=VALMCNT+1
+36 DO SET^VALM10(VALMCNT,$EXTRACT("# Visits to be added : "_+$PIECE(SCCV2,U,8)_$JUSTIFY("",39),1,39)_"# Ancillaries Found : "_+$PIECE(SCCV2,U,2))
+37 SET VALMCNT=VALMCNT+1
+38 DO SET^VALM10(VALMCNT,$EXTRACT("# V PROVIDERs to be added : "_+$PIECE(SCCV2,U,9)_$JUSTIFY("",39),1,39)_"# Appointments Found: "_+$PIECE(SCCV2,U,3))
+39 SET VALMCNT=VALMCNT+1
+40 DO SET^VALM10(VALMCNT,$EXTRACT("# V POVs to be added : "_+$PIECE(SCCV2,U,10)_$JUSTIFY("",39),1,39)_"# Credit Stops Found: "_+$PIECE(SCCV2,U,4))
+41 SET VALMCNT=VALMCNT+1
+42 DO SET^VALM10(VALMCNT,$EXTRACT("# V CPTs to be added : "_+$PIECE(SCCV2,U,11)_$JUSTIFY("",39),1,39)_"# Dispositions Found: "_+$PIECE(SCCV2,U,5))
End DoDot:1
+43 SET VALMCNT=VALMCNT+1
+44 DO SET^VALM10(VALMCNT," ")
+45 SET VALMCNT=VALMCNT+1
+46 SET SCCVZ="Last Event:"
SET SCCVZ1="Last Action Request:"
+47 DO SET^VALM10(VALMCNT,$EXTRACT(SCCVZ_$JUSTIFY("",39),1,39)_SCCVZ1)
DO REV^SCCVDSP2(SCCVZ,VALMCNT,1)
DO REV^SCCVDSP2(SCCVZ1,VALMCNT,40)
+48 SET VALMCNT=VALMCNT+1
+49 DO SET^VALM10(VALMCNT,$EXTRACT("Event : "_$$EXPAND^SCCVDSP2(404.98,.05,$PIECE(SCCV0,U,5))_$JUSTIFY("",39),1,39)_"Action : "_$$NONE^SCCVDSP2(404.98,.08,$PIECE(SCCV0,U,8),"<No action requested>"))
+50 SET VALMCNT=VALMCNT+1
+51 DO SET^VALM10(VALMCNT,$EXTRACT("Status: "_$$EXPAND^SCCVDSP2(404.98,.07,$PIECE(SCCV0,U,7))_$JUSTIFY("",39),1,39)_"Start Date/Tm: "_$$FMTE^XLFDT($PIECE(SCCVLRQ,U,4)))
+52 SET VALMCNT=VALMCNT+1
+53 DO SET^VALM10(VALMCNT,$JUSTIFY("",39)_"Stop Date/Tm : "_$$FMTE^XLFDT($PIECE(SCCVLRQ,U,5)))
+54 SET VALMCNT=VALMCNT+1
+55 DO SET^VALM10(VALMCNT,$EXTRACT("Bulletin Upon Completion: "_$$EXPAND^SCCVDSP2(404.98,.06,+$PIECE(SCCV0,U,6))_$JUSTIFY("",39),1,39)_$EXTRACT("Task # : "_$PIECE(SCCV1,U,3)_$JUSTIFY("",28),1,28)_"Volume: "_$PIECE(SCCV1,U,4))
+56 IF '$PIECE(SCCVLRQ,U,3)
Begin DoDot:1
+57 NEW SCGRAPH,SCCT,Z
+58 SET SCCT=$$DSPGLBL^SCCVEGD1(SCCVDA,"SCGRAPH",0)
+59 IF SCCT
Begin DoDot:2
+60 SET VALMCNT=VALMCNT+1
+61 DO SET^VALM10(VALMCNT," ")
+62 SET Z=0
FOR
SET Z=$ORDER(SCGRAPH(Z))
if 'Z
QUIT
IF $DATA(SCGRAPH(Z,0))
Begin DoDot:3
+63 SET VALMCNT=VALMCNT+1
+64 DO SET^VALM10(VALMCNT,$JUSTIFY("",10)_SCGRAPH(Z,0))
End DoDot:3
End DoDot:2
End DoDot:1
+65 QUIT
+66 ;
HDR ;Template screen header
+1 NEW SCCV0,X
+2 SET SCCV0=$GET(^SD(404.98,SCCVDA,0))
+3 SET X="List #: "_+$ORDER(VALMY(0))_" "
+4 SET X=X_$$FMTE^XLFDT($PIECE(SCCV0,U,3),"1D")_" - "_$$FMTE^XLFDT($PIECE(SCCV0,U,4),"1D")_" "
+5 SET X=X_$$EXPAND^SCCVDSP2(404.98,.05,$PIECE(SCCV0,U,5))_" "_$$EXPAND^SCCVDSP2(404.98,.07,$PIECE(SCCV0,U,7))_" "
+6 SET X=X_"Template #: "_$PIECE(SCCV0,U)
+7 SET VALMHDR(1)=X
+8 QUIT
+9 ;
LAST(SCOE) ; -- build last encounter info string
+1 NEW SCOE0,SCORG,X
+2 SET SCOE0=$GET(^SCE(+SCOE,0))
SET SCORG=$PIECE(SCOE0,U,8)
+3 SET X="Last ^SCE Entry: "_SCOE
+4 SET X=X_" DFN: "_$PIECE(SCOE0,U,2)
+5 SET X=X_" Type: "_$SELECT(SCORG=1:"Appointment",SCORG=2:"Stop Code Addition",SCORG=3:"Disposition",SCORG=4:"Credit Stop",1:"")
+6 QUIT X