WV19PST ;HIOFO/FT-WV*1*19 POST INSTALLATION ROUTINE ;06/26/06
;;1.0;WOMEN'S HEALTH;**19**;Sep 30, 1998
;
EN ; This routine will loop through the word processing text in FILEs 790.6
; and 790.404 and replace the "|SSN#|" placeholder with "|$E(SSN#),6,9|".
;
N WVIEN,WVLINE,WVNEW,WVNODE
S WVIEN=0
W !,"Checking FILE 790.6...",!
F S WVIEN=$O(^WV(790.6,WVIEN)) Q:'WVIEN D
.S WVLINE=0
.F S WVLINE=$O(^WV(790.6,WVIEN,1,WVLINE)) Q:'WVLINE D
..S WVNODE=$G(^WV(790.6,WVIEN,1,WVLINE,0))
..Q:WVNODE=""
..I WVNODE["|SSN#|" D
...S WVNEW=$P(WVNODE,"|SSN#|",1)_"|$E(SSN#,6,9)|"_$P(WVNODE,"|SSN#|",2)
...W !,WVIEN,!,WVNODE,!,WVNEW
...S ^WV(790.6,WVIEN,1,WVLINE,0)=WVNEW
...Q
..Q
.Q
S WVIEN=0
W !,"Checking FILE 790.404...",!
F S WVIEN=$O(^WV(790.404,WVIEN)) Q:'WVIEN D
.S WVLINE=0
.F S WVLINE=$O(^WV(790.404,WVIEN,1,WVLINE)) Q:'WVLINE D
..S WVNODE=$G(^WV(790.404,WVIEN,1,WVLINE,0))
..Q:WVNODE=""
..I WVNODE["|SSN#|" D
...S WVNEW=$P(WVNODE,"|SSN#|",1)_"|$E(SSN#,6,9)|"_$P(WVNODE,"|SSN#|",2)
...W !,WVIEN,!,WVNODE,!,WVNEW
...S ^WV(790.404,WVIEN,1,WVLINE,0)=WVNEW
...Q
..Q
.Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HWV19PST 1134 printed Dec 13, 2024@02:46:28 Page 2
WV19PST ;HIOFO/FT-WV*1*19 POST INSTALLATION ROUTINE ;06/26/06
+1 ;;1.0;WOMEN'S HEALTH;**19**;Sep 30, 1998
+2 ;
EN ; This routine will loop through the word processing text in FILEs 790.6
+1 ; and 790.404 and replace the "|SSN#|" placeholder with "|$E(SSN#),6,9|".
+2 ;
+3 NEW WVIEN,WVLINE,WVNEW,WVNODE
+4 SET WVIEN=0
+5 WRITE !,"Checking FILE 790.6...",!
+6 FOR
SET WVIEN=$ORDER(^WV(790.6,WVIEN))
if 'WVIEN
QUIT
Begin DoDot:1
+7 SET WVLINE=0
+8 FOR
SET WVLINE=$ORDER(^WV(790.6,WVIEN,1,WVLINE))
if 'WVLINE
QUIT
Begin DoDot:2
+9 SET WVNODE=$GET(^WV(790.6,WVIEN,1,WVLINE,0))
+10 if WVNODE=""
QUIT
+11 IF WVNODE["|SSN#|"
Begin DoDot:3
+12 SET WVNEW=$PIECE(WVNODE,"|SSN#|",1)_"|$E(SSN#,6,9)|"_$PIECE(WVNODE,"|SSN#|",2)
+13 WRITE !,WVIEN,!,WVNODE,!,WVNEW
+14 SET ^WV(790.6,WVIEN,1,WVLINE,0)=WVNEW
+15 QUIT
End DoDot:3
+16 QUIT
End DoDot:2
+17 QUIT
End DoDot:1
+18 SET WVIEN=0
+19 WRITE !,"Checking FILE 790.404...",!
+20 FOR
SET WVIEN=$ORDER(^WV(790.404,WVIEN))
if 'WVIEN
QUIT
Begin DoDot:1
+21 SET WVLINE=0
+22 FOR
SET WVLINE=$ORDER(^WV(790.404,WVIEN,1,WVLINE))
if 'WVLINE
QUIT
Begin DoDot:2
+23 SET WVNODE=$GET(^WV(790.404,WVIEN,1,WVLINE,0))
+24 if WVNODE=""
QUIT
+25 IF WVNODE["|SSN#|"
Begin DoDot:3
+26 SET WVNEW=$PIECE(WVNODE,"|SSN#|",1)_"|$E(SSN#,6,9)|"_$PIECE(WVNODE,"|SSN#|",2)
+27 WRITE !,WVIEN,!,WVNODE,!,WVNEW
+28 SET ^WV(790.404,WVIEN,1,WVLINE,0)=WVNEW
+29 QUIT
End DoDot:3
+30 QUIT
End DoDot:2
+31 QUIT
End DoDot:1