MCPRE07 ;HIRMFO/DAD-KILL RECORDS WITH NO ZERO NODES ;8/2/96 11:00
;;2.3;Medicine;;09/13/1996
;
N MCD0,MCDATA,MCFILE,MCOFFSET
S MCDATA(1)=""
S MCDATA(2)="Searching the Medicine files for bad records, (missing"
S MCDATA(3)="zero nodes). If found, these records will be killed."
D MES^XPDUTL(.MCDATA)
;
F MCOFFSET=1:1 S MCFILE=$P($T(FILE+MCOFFSET),";",3) Q:MCFILE'>0 D
. S MCD0=0
. F S MCD0=$O(^MCAR(MCFILE,MCD0)) Q:MCD0'>0 D
.. I $G(^MCAR(MCFILE,MCD0,0))="" K ^MCAR(MCFILE,MCD0)
.. Q
. Q
Q
FILE ;;File#
;;690
;;691
;;691.1
;;691.5
;;691.6
;;691.7
;;691.8
;;691.9
;;692
;;694
;;694.5
;;698
;;698.1
;;698.2
;;698.3
;;699
;;699.5
;;700
;;701
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCPRE07 712 printed Nov 22, 2024@17:26:44 Page 2
MCPRE07 ;HIRMFO/DAD-KILL RECORDS WITH NO ZERO NODES ;8/2/96 11:00
+1 ;;2.3;Medicine;;09/13/1996
+2 ;
+3 NEW MCD0,MCDATA,MCFILE,MCOFFSET
+4 SET MCDATA(1)=""
+5 SET MCDATA(2)="Searching the Medicine files for bad records, (missing"
+6 SET MCDATA(3)="zero nodes). If found, these records will be killed."
+7 DO MES^XPDUTL(.MCDATA)
+8 ;
+9 FOR MCOFFSET=1:1
SET MCFILE=$PIECE($TEXT(FILE+MCOFFSET),";",3)
if MCFILE'>0
QUIT
Begin DoDot:1
+10 SET MCD0=0
+11 FOR
SET MCD0=$ORDER(^MCAR(MCFILE,MCD0))
if MCD0'>0
QUIT
Begin DoDot:2
+12 IF $GET(^MCAR(MCFILE,MCD0,0))=""
KILL ^MCAR(MCFILE,MCD0)
+13 QUIT
End DoDot:2
+14 QUIT
End DoDot:1
+15 QUIT
FILE ;;File#
+1 ;;690
+2 ;;691
+3 ;;691.1
+4 ;;691.5
+5 ;;691.6
+6 ;;691.7
+7 ;;691.8
+8 ;;691.9
+9 ;;692
+10 ;;694
+11 ;;694.5
+12 ;;698
+13 ;;698.1
+14 ;;698.2
+15 ;;698.3
+16 ;;699
+17 ;;699.5
+18 ;;700
+19 ;;701