ECX325CV ;ALB/JAP Patch ECX*3*25 Post Install Conversion ;May 21, 1999
;;3.0;DSS EXTRACTS;**25**;Dec 22, 1997
;
N ECX,NODE,DATE,CASE,NON,TYPE,OPTIME,TIME,ECNO,A1,A2
;find every record in file #727.811 for fy1999
S ECX=0
F S ECX=$O(^ECX(727.811,ECX)) Q:'ECX S NODE=^ECX(727.811,ECX,0) I +$P(NODE,U,2)>199809 D
.S CASE=+$P(NODE,U,10),TYPE=$P(NODE,U,17),NON=$P(NODE,U,32)
.I NON]"" D
..S ECNO=$G(^SRF(CASE,"NON"))
..S A1=$P(ECNO,U,5),A2=$P(ECNO,U,4),TIME="##" D:(A1&A2) TIME S OPTIME=TIME
..I TYPE="P" S $P(^ECX(727.811,ECX,0),U,21)=OPTIME
..I TYPE'="P" S $P(^ECX(727.811,ECX,0),U,21)=""
Q
;
TIME ; given date/time get increment
;A1=later, A2=earlier, TIME=difference
S TIME=$TR($J($$FMDIFF^XLFDT(A1,A2,2)/900,6,0)," ") I TIME<0 S TIME="###"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECX325CV 780 printed Dec 13, 2024@01:49:53 Page 2
ECX325CV ;ALB/JAP Patch ECX*3*25 Post Install Conversion ;May 21, 1999
+1 ;;3.0;DSS EXTRACTS;**25**;Dec 22, 1997
+2 ;
+3 NEW ECX,NODE,DATE,CASE,NON,TYPE,OPTIME,TIME,ECNO,A1,A2
+4 ;find every record in file #727.811 for fy1999
+5 SET ECX=0
+6 FOR
SET ECX=$ORDER(^ECX(727.811,ECX))
if 'ECX
QUIT
SET NODE=^ECX(727.811,ECX,0)
IF +$PIECE(NODE,U,2)>199809
Begin DoDot:1
+7 SET CASE=+$PIECE(NODE,U,10)
SET TYPE=$PIECE(NODE,U,17)
SET NON=$PIECE(NODE,U,32)
+8 IF NON]""
Begin DoDot:2
+9 SET ECNO=$GET(^SRF(CASE,"NON"))
+10 SET A1=$PIECE(ECNO,U,5)
SET A2=$PIECE(ECNO,U,4)
SET TIME="##"
if (A1&A2)
DO TIME
SET OPTIME=TIME
+11 IF TYPE="P"
SET $PIECE(^ECX(727.811,ECX,0),U,21)=OPTIME
+12 IF TYPE'="P"
SET $PIECE(^ECX(727.811,ECX,0),U,21)=""
End DoDot:2
End DoDot:1
+13 QUIT
+14 ;
TIME ; given date/time get increment
+1 ;A1=later, A2=earlier, TIME=difference
+2 SET TIME=$TRANSLATE($JUSTIFY($$FMDIFF^XLFDT(A1,A2,2)/900,6,0)," ")
IF TIME<0
SET TIME="###"
+3 QUIT