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

MCARAMLB.m

Go to the documentation of this file.
MCARAMLB ;WASH ISC/JKL-MUSE AUTO INSTRUMENT RETRANSMISSION-TRAN DATE ;2/27/95  16:35
 ;;2.3;Medicine;;09/13/1996
 ;
 ;
 ; Called from ^MCARAML
 ; Retransmits transaction record without EKG,tran date cross-reference
 N MCIEN,MCZERO,MCDATE,MCSSN,MCNAME,MCI,MCJ
 S MCIEN=0
 F MCI=1:1 S MCIEN=$O(^MCAR(700.5,MCIEN)) Q:MCIEN=""!(MCIEN="B")  D SAVE
 Q
 ;
SAVE ;
 I '$D(^MCAR(700.5,MCIEN,0)) Q
 S MCZERO=^MCAR(700.5,MCIEN,0),MCDATE=$P(MCZERO,"^"),MCSSN=$P(MCZERO,"^",3)
 I $P(MCZERO,"^",2)="MHOLT" Q
 S MCNAME=$P(MCZERO,"^",4)
 I $D(^MCAR(691.5,"B",MCDATE)),$D(^MCAR(700.5,"B",MCDATE)) Q
 D SET Q
 ;
SET ;
 I MCNAME="" S MCNAME="NO PATIENT NAME"
 I MCSSN="" S MCSSN="NO SSN"
 I $L(MCNAME)<30 F MCJ=$L(MCNAME):1:30 S MCNAME=MCNAME_" "
 I $L(MCSSN)<10 F MCJ=$L(MCSSN):1:10 S MCSSN=MCSSN_" "
 I $D(^TMP($J,0,"MC",MCNAME,MCSSN,MCDATE)) Q
 S MCCNT=MCCNT+1 W:MCCNT#100=0 "."
 S ^TMP($J,0,"MC",MCNAME,MCSSN,MCDATE)=""
 S ^TMP($J,0,"MC",0)=MCCNT
 Q