BZDMUT ;ihs\bao\dmh utilities [ 09/08/2000 4:01 PM ]
;
;
Q
LASTED ;EP count the number of edits by month in the medicaid elig file
S CT=0
S N=0
F S N=$O(^AUPNMCD(N)) Q:+N=0 D
.S R=$G(^AUPNMCD(N,0))
.S LUP=$P(R,"^",8)
.I LUP'="" D
..S CT($E(LUP,1,5))=$G(CT($E(LUP,1,5)))+1
..S CT=CT+1
..I CT#1000=0 W "."
ZW CT
K CT,LUP,R,N,CT
Q
SSNCT ;EP count the SSN nodes in the BZDMTEMP GLOBAL
S CT=0
S SSN=0
F S SSN=$O(^BZDMTEMP("SSN",SSN)) Q:SSN="" D
.S SSNDFN=""
.F S SSNDFN=$O(^BZDMTEMP("SSN",SSN,SSNDFN)) Q:SSNDFN="" D
..S CT=CT+1
U 0 W !!,"TOTAL SSN NODES: ",CT
K CT,SSNDFN,SSN
Q
Q
MNOCT ;EP count the MNO nodes in the BZDMTEMP GLOBAL
S CT=0
S MNO=0
F S MNO=$O(^BZDMTEMP("MNO",MNO)) Q:MNO="" D
.S MCDDFN=""
.F S MCDDFN=$O(^BZDMTEMP("MNO",MNO,MCDDFN)) Q:MCDDFN="" D
..S CT=CT+1
U 0 W !!,"TOTAL MNO NODES: ",CT
K CT,MNODFN,MNO
Q
TIME ; get time
10 N BZDM S BZDM=$P($H,",",2)\60
20 N BZDI,BZDN S BZDTIME=BZDM\60_":"_(BZDM#60\10)_(BZDM#10)
S BZDN=" AM" S:BZDM'<720 BZDM=BZDM-720,BZDN=" PM" S:BZDM<60 BZDM=BZDM+720
S BZDI=BZDM\600 S:'BZDI BZDI=" " S BZDTIME1=BZDI_(BZDM\60#10)_":"_(BZDM#60\10)_(BZDM#10)_BZDN
I '$D(BZDNP) U 0 W !,BZDTIME1 ;K BZDTIME,BZDTIME1
K BZDNP Q
Q
INDX ;
U 0 W !!,"Creating the index for Medicaid numbers..."
S INDX=0
S INDXCT=0
F S INDX=$O(^AUPNMCD(INDX)) Q:+INDX=0 D
.S REC=$G(^AUPNMCD(INDX,0))
.Q:REC=0
.S MN=$P(REC,"^",3)
.Q:MN=""
.S ^BZDMTEMP("INDX",MN,INDX)=""
.S INDXCT=INDXCT+1
.I INDXCT#1000=0 W "X"
.Q
K INDX,INDXCT,REC,MN
Q
BZDMUT ;ihs\bao\dmh utilities [ 09/08/2000 4:01 PM ]
+1 ;
+2 ;
+3 QUIT
LASTED ;EP count the number of edits by month in the medicaid elig file
+1 SET CT=0
+2 SET N=0
+3 FOR
SET N=$ORDER(^AUPNMCD(N))
IF +N=0
QUIT
Begin DoDot:1
+4 SET R=$GET(^AUPNMCD(N,0))
+5 SET LUP=$PIECE(R,"^",8)
+6 IF LUP'=""
Begin DoDot:2
+7 SET CT($EXTRACT(LUP,1,5))=$GET(CT($EXTRACT(LUP,1,5)))+1
+8 SET CT=CT+1
+9 IF CT#1000=0
WRITE "."
End DoDot:2
End DoDot:1
+10
*** ERROR ***
+11 KILL CT,LUP,R,N,CT
+12 QUIT
SSNCT ;EP count the SSN nodes in the BZDMTEMP GLOBAL
+1 SET CT=0
+2 SET SSN=0
+3 FOR
SET SSN=$ORDER(^BZDMTEMP("SSN",SSN))
IF SSN=""
QUIT
Begin DoDot:1
+4 SET SSNDFN=""
+5 FOR
SET SSNDFN=$ORDER(^BZDMTEMP("SSN",SSN,SSNDFN))
IF SSNDFN=""
QUIT
Begin DoDot:2
+6 SET CT=CT+1
End DoDot:2
End DoDot:1
+7 USE 0
WRITE !!,"TOTAL SSN NODES: ",CT
+8 KILL CT,SSNDFN,SSN
+9 QUIT
+10 QUIT
MNOCT ;EP count the MNO nodes in the BZDMTEMP GLOBAL
+1 SET CT=0
+2 SET MNO=0
+3 FOR
SET MNO=$ORDER(^BZDMTEMP("MNO",MNO))
IF MNO=""
QUIT
Begin DoDot:1
+4 SET MCDDFN=""
+5 FOR
SET MCDDFN=$ORDER(^BZDMTEMP("MNO",MNO,MCDDFN))
IF MCDDFN=""
QUIT
Begin DoDot:2
+6 SET CT=CT+1
End DoDot:2
End DoDot:1
+7 USE 0
WRITE !!,"TOTAL MNO NODES: ",CT
+8 KILL CT,MNODFN,MNO
+9 QUIT
TIME ; get time
10 NEW BZDM
SET BZDM=$PIECE($HOROLOG,",",2)\60
20 NEW BZDI,BZDN
SET BZDTIME=BZDM\60_":"_(BZDM#60\10)_(BZDM#10)
+1 SET BZDN=" AM"
IF BZDM'<720
SET BZDM=BZDM-720
SET BZDN=" PM"
IF BZDM<60
SET BZDM=BZDM+720
+2 SET BZDI=BZDM\600
IF 'BZDI
SET BZDI=" "
SET BZDTIME1=BZDI_(BZDM\60#10)_":"_(BZDM#60\10)_(BZDM#10)_BZDN
+3 ;K BZDTIME,BZDTIME1
IF '$DATA(BZDNP)
USE 0
WRITE !,BZDTIME1
+4 KILL BZDNP
QUIT
+5 QUIT
INDX ;
+1 USE 0
WRITE !!,"Creating the index for Medicaid numbers..."
+2 SET INDX=0
+3 SET INDXCT=0
+4 FOR
SET INDX=$ORDER(^AUPNMCD(INDX))
IF +INDX=0
QUIT
Begin DoDot:1
+5 SET REC=$GET(^AUPNMCD(INDX,0))
+6 IF REC=0
QUIT
+7 SET MN=$PIECE(REC,"^",3)
+8 IF MN=""
QUIT
+9 SET ^BZDMTEMP("INDX",MN,INDX)=""
+10 SET INDXCT=INDXCT+1
+11 IF INDXCT#1000=0
WRITE "X"
+12 QUIT
End DoDot:1
+13 KILL INDX,INDXCT,REC,MN
+14 QUIT