Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MCARAM0G

MCARAM0G.m

Go to the documentation of this file.
MCARAM0G ;WASH ISC/JKL-MUSE AUTO INSTRUMENT REINIT-MISS EKG REC ;1/31/95  11:31
 ;;2.3;Medicine;;09/13/1996
 ;
 ;
 ;Called from ^MCARAM0
 ;Deletes transaction records without EKG records by IEN patient match
 S (MCZERO,MCIEN,MCDATE,MCSSN,MCNAME,MCI,MCERR)=0
 F  S MCIEN=$O(^MCAR(700.5,MCIEN)) Q:MCIEN="B"  S MCZERO=^MCAR(700.5,MCIEN,0) D CHECK
 Q
CHECK ;
 S MCDATE=$P(MCZERO,"^"),MCSSN=$P(MCZERO,"^",3),MCNAME=$P(MCZERO,"^",4)
 I '$D(^MCAR(691.5,"B",MCDATE)) D DEL Q
 S MCI=0 F  S MCERR=0,MCI=$O(^MCAR(691.5,"B",MCDATE,MCI)) Q:MCI=""  I ^MCAR(691.5,MCI,.1)=MCSSN S MCERR=MCI Q
 I MCERR=0 D DEL
 Q
DEL ;
 S DIK="^MCAR(700.5,",DA=MCIEN D ^DIK
 S MCCNT=MCCNT+1 W:MCCNT#100=0 "."
 Q