MCARAM0H ;WASH ISC/JKL-MUSE AUTO INSTRUMENT REINIT-REMOVE RELEASE STATUS,ADD CONFIRMATION STATUS ;1/31/95 11:36
;;2.3;Medicine;;09/13/1996
;
;
;Called from ^MCARAM0
;Remove release status from any automated records
;Add confirmation status to any automated records
N MCIEN,MCSTAT,MCRSR,MCCSA
S (MCIEN,MCRSR,MCCSA)=0
F S MCIEN=$O(^MCAR(691.5,MCIEN)) Q:MCIEN="B" I $D(^MCAR(691.5,MCIEN,"A")) D REMOVE,ADD
W !!,MCRSR," automated records modified by removing release status."
W !!,MCCSA," automated records modified by adding confirmation status."
Q
REMOVE ;
I '$D(^MCAR(691.5,MCIEN,"ES")) Q
S MCSTAT=$P(^MCAR(691.5,MCIEN,"ES"),"^",7)
K ^MCAR(691.5,MCIEN,"ES")
I MCSTAT'="",$D(^MCAR(691.5,"ES",MCSTAT,MCIEN)) K ^MCAR(691.5,"ES",MCSTAT,MCIEN)
S MCRSR=MCRSR+1
W:(MCRSR+MCCSA)#100=0 "."
Q
ADD ;
I $P(^MCAR(691.5,MCIEN,0),"^",12)="C" Q
S $P(^MCAR(691.5,MCIEN,0),"^",12)="C",MCCSA=MCCSA+1
W:(MCRSR+MCCSA)#100=0 "."
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCARAM0H 960 printed Dec 13, 2024@02:12 Page 2
MCARAM0H ;WASH ISC/JKL-MUSE AUTO INSTRUMENT REINIT-REMOVE RELEASE STATUS,ADD CONFIRMATION STATUS ;1/31/95 11:36
+1 ;;2.3;Medicine;;09/13/1996
+2 ;
+3 ;
+4 ;Called from ^MCARAM0
+5 ;Remove release status from any automated records
+6 ;Add confirmation status to any automated records
+7 NEW MCIEN,MCSTAT,MCRSR,MCCSA
+8 SET (MCIEN,MCRSR,MCCSA)=0
+9 FOR
SET MCIEN=$ORDER(^MCAR(691.5,MCIEN))
if MCIEN="B"
QUIT
IF $DATA(^MCAR(691.5,MCIEN,"A"))
DO REMOVE
DO ADD
+10 WRITE !!,MCRSR," automated records modified by removing release status."
+11 WRITE !!,MCCSA," automated records modified by adding confirmation status."
+12 QUIT
REMOVE ;
+1 IF '$DATA(^MCAR(691.5,MCIEN,"ES"))
QUIT
+2 SET MCSTAT=$PIECE(^MCAR(691.5,MCIEN,"ES"),"^",7)
+3 KILL ^MCAR(691.5,MCIEN,"ES")
+4 IF MCSTAT'=""
IF $DATA(^MCAR(691.5,"ES",MCSTAT,MCIEN))
KILL ^MCAR(691.5,"ES",MCSTAT,MCIEN)
+5 SET MCRSR=MCRSR+1
+6 if (MCRSR+MCCSA)#100=0
WRITE "."
+7 QUIT
ADD ;
+1 IF $PIECE(^MCAR(691.5,MCIEN,0),"^",12)="C"
QUIT
+2 SET $PIECE(^MCAR(691.5,MCIEN,0),"^",12)="C"
SET MCCSA=MCCSA+1
+3 if (MCRSR+MCCSA)#100=0
WRITE "."
+4 QUIT