SPNPST03 ;HIRMFO/WAA- POST-INIT ROUTINE FOR PATCH 3 ; 8/21/96
;;2.0;Spinal Cord Dysfunction;**3**;01/02/1997
;;
EN1 D FIX,OPT
Q
FIX ; This program will loop though 154 and check field 2.2 for C or
; I and delete the data to clean up the database
;
N SPNIEN
S SPNIEN=0
F S SPNIEN=$O(^SPNL(154,SPNIEN)) Q:SPNIEN<1 D
.N SPNMS
.I $G(^SPNL(154,SPNIEN,0))="" Q ; Bad Line
.I $G(^SPNL(154,SPNIEN,2))="" Q ; Quit if no data
.S SPNMS=$P(^SPNL(154,SPNIEN,2),U,2)
.Q:SPNMS=""
.I $L(SPNMS)'=2 S $P(^SPNL(154,SPNIEN,2),U,2)=""
.Q
Q
OPT ; Update the option for the Filters menu.
; The two modified fields are ENTRY ACTION and EXIT ACTION.
N IEN
S IEN=0
S IEN=$O(^DIC(19,"B","SPNL SCD REPORT(FILTERED) ",IEN))
Q:IEN<1
; Update menu Entry and Exit actions
N DR,DIE,DA
S DR="15////K ^TMP($J,""SPNPRT"",""AUP""),SPNFILTR;20////S SPNFILTR=$$FILYN^SPNPRTUP I SPNFILTR D EN1^SPNPRTUP"
S DIE="^DIC(19,",DA=IEN
D ^DIE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSPNPST03 964 printed Nov 22, 2024@17:47:51 Page 2
SPNPST03 ;HIRMFO/WAA- POST-INIT ROUTINE FOR PATCH 3 ; 8/21/96
+1 ;;2.0;Spinal Cord Dysfunction;**3**;01/02/1997
+2 ;;
EN1 DO FIX
DO OPT
+1 QUIT
FIX ; This program will loop though 154 and check field 2.2 for C or
+1 ; I and delete the data to clean up the database
+2 ;
+3 NEW SPNIEN
+4 SET SPNIEN=0
+5 FOR
SET SPNIEN=$ORDER(^SPNL(154,SPNIEN))
if SPNIEN<1
QUIT
Begin DoDot:1
+6 NEW SPNMS
+7 ; Bad Line
IF $GET(^SPNL(154,SPNIEN,0))=""
QUIT
+8 ; Quit if no data
IF $GET(^SPNL(154,SPNIEN,2))=""
QUIT
+9 SET SPNMS=$PIECE(^SPNL(154,SPNIEN,2),U,2)
+10 if SPNMS=""
QUIT
+11 IF $LENGTH(SPNMS)'=2
SET $PIECE(^SPNL(154,SPNIEN,2),U,2)=""
+12 QUIT
End DoDot:1
+13 QUIT
OPT ; Update the option for the Filters menu.
+1 ; The two modified fields are ENTRY ACTION and EXIT ACTION.
+2 NEW IEN
+3 SET IEN=0
+4 SET IEN=$ORDER(^DIC(19,"B","SPNL SCD REPORT(FILTERED) ",IEN))
+5 if IEN<1
QUIT
+6 ; Update menu Entry and Exit actions
+7 NEW DR,DIE,DA
+8 SET DR="15////K ^TMP($J,""SPNPRT"",""AUP""),SPNFILTR;20////S SPNFILTR=$$FILYN^SPNPRTUP I SPNFILTR D EN1^SPNPRTUP"
+9 SET DIE="^DIC(19,"
SET DA=IEN
+10 DO ^DIE
+11 QUIT