source: WorldVistAEHR/trunk/r/MEDICINE-MC/MCARAM0E.m@ 1036

Last change on this file since 1036 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 768 bytes
Line 
1MCARAM0E ;WASH ISC/JKL-MUSE AUTO INSTRUMENT REINIT-NOTED REC IN ERR ;1/31/95 11:30
2 ;;2.3;Medicine;;09/13/1996
3 ;
4 ;
5 ;Called from ^MCARAM0
6 ;Delete automated EKGs that are marked for deletion
7 ; and corresponding transaction records
8 N MCIEN,MCSTAT,MCTIEN,MCDATE,MCSSN
9 S (MCIEN,MCTIEN,MCDATE)=0
10 F S MCIEN=$O(^MCAR(691.5,MCIEN)) Q:MCIEN="B" I $D(^MCAR(691.5,MCIEN,"A")),$D(^MCAR(691.5,MCIEN,"ES")) S MCSTAT=$P(^MCAR(691.5,MCIEN,"ES"),"^",12) I MCSTAT=1 D DEL
11 Q
12DEL ;
13 S MCTIEN=0
14 S MCSSN=^MCAR(691.5,MCIEN,.1)
15 S MCDATE=$P(^MCAR(691.5,MCIEN,0),"^")
16 F S MCTIEN=$O(^MCAR(700.5,"B",MCDATE,MCTIEN)) Q:MCTIEN="" I $P(^MCAR(700.5,MCTIEN,0),"^",3)=MCSSN S DIK="^MCAR(700.5,",DA=MCTIEN D ^DIK S DIK="^MCAR(691.5,",DA=MCIEN D ^DIK S MCCNT=MCCNT+1 W:MCCNT#100=0 "."
17 Q
Note: See TracBrowser for help on using the repository browser.