VistA-WorldVistAEHR/r/NOIS-FSC/FSCRPCGH.m

30 lines
1.2 KiB
Mathematica

FSCRPCGH ;SLC/STAFF-NOIS RPC Patch Summary ;1/13/98 15:43
;;1.1;NOIS;;Sep 06, 1998
;
MOD(MODULE) ; from FSCRPCG
N CNT,LINE,NUM,PACKAGE,PATCH,PATCHNM,PRI,SEQ,SEQNUM,STATUS,SUBJECT,VERSION,ZERO K ^TMP("FSCRPC PATCH",$J)
S CNT=0
S PACKAGE=+$P($G(^FSC("MOD",+$G(MODULE),0)),U,8) I 'PACKAGE Q
S PACKAGE=+$P(^FSC("PACK",PACKAGE,0),U,3) I 'PACKAGE Q
S VERSION=+$P($P(^FSC("MOD",MODULE,0),U),"/",2) I 'VERSION S VERSION=1
S PATCH=0 F S PATCH=$O(^A1AE(11005,"D",PACKAGE,PATCH)) Q:PATCH<1 D
.S ZERO=$G(^A1AE(11005,PATCH,0)) I '$L(ZERO) Q
.I $P(ZERO,U,3)=VERSION D
..S SUBJECT=$P(ZERO,U,5)
..S STATUS=$$STATUS^FSCRPCGP($P(ZERO,U,8))
..S PRI=$$PRIORITY^FSCRPCGP($P(ZERO,U,7))
..S SEQ=$P(ZERO,U,6)
..I SEQ S SEQNUM=SEQ
..E S SEQNUM=CNT+10000
..S PATCHNM=$P(ZERO,U)
..S LINE=$$SETSTR^VALM1(PATCHNM,SEQ,5,$L(PATCHNM))
..S LINE=$$SETSTR^VALM1(STATUS,LINE,20,$L(STATUS))
..S LINE=$$SETSTR^VALM1(PRI,LINE,42,$L(PRI))
..S LINE=$$SETSTR^VALM1(SUBJECT,LINE,56,$L(SUBJECT))
..S CNT=CNT+1,^TMP("FSCRPC PATCH",$J,SEQNUM)=LINE
I 'CNT S ^TMP("FSCRPC",$J,"OUTPUT",1)=" No patches for this Module/Version #." Q
S (CNT,NUM)=0 F S NUM=$O(^TMP("FSCRPC PATCH",$J,NUM)) Q:NUM<1 S LINE=^(NUM) D
.S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
K ^TMP("FSCRPC PATCH",$J)
Q