[613] | 1 | MCARAMLC ;WASH ISC/JKL-MUSE AUTO INSTRUMENT RETRANSMISSION NO TRAN ;2/27/95 17:18
|
---|
| 2 | ;;2.3;Medicine;;09/13/1996
|
---|
| 3 | ;
|
---|
| 4 | ;
|
---|
| 5 | ;Called from ^MCARAML
|
---|
| 6 | ;Retransmits no EKG date cross-reference, misidentified PID
|
---|
| 7 | N MCNAME,MCSSN,MCDATE,MCPID,MCZERO,MCNAME2,MCI,MCJ,X,D,DIC,Y,MCK
|
---|
| 8 | N MCIEN,MCIEN2,MCERR
|
---|
| 9 | S (MCIEN,MCIEN2)=0
|
---|
| 10 | F MCI=1:1 S MCIEN=$O(^MCAR(691.5,MCIEN)) Q:MCIEN=""!(MCIEN="B") D SAVE
|
---|
| 11 | Q
|
---|
| 12 | ;
|
---|
| 13 | SAVE ;
|
---|
| 14 | I '$D(^MCAR(691.5,MCIEN,0)) Q
|
---|
| 15 | S MCSSN="" I $D(^MCAR(691.5,MCIEN,.1)) S MCSSN=^MCAR(691.5,MCIEN,.1)
|
---|
| 16 | S MCZERO=^MCAR(691.5,MCIEN,0),MCNAME2=""
|
---|
| 17 | S MCDATE=$P(MCZERO,"^"),MCPID=$P(MCZERO,"^",2),MCNAME=""
|
---|
| 18 | I MCDATE="" Q
|
---|
| 19 | S X=MCSSN,DIC="^DPT(",D="SSN",DIC(0)="XZ" D IX^DIC
|
---|
| 20 | S:+Y>0 MCNAME=$P(Y(0),"^")
|
---|
| 21 | I MCPID'="",$D(^DPT(MCPID,0)) S MCNAME2=$P(^DPT(MCPID,0),"^")
|
---|
| 22 | I MCNAME'=MCNAME2 D SET Q
|
---|
| 23 | I '$D(^MCAR(700.5,"B",MCDATE)) D SET Q
|
---|
| 24 | I '$D(^MCAR(691.5,"B",MCDATE)) D SET Q
|
---|
| 25 | S MCERR=1 F MCK=1:1 S MCIEN2=$O(^MCAR(700.5,"B",MCDATE,MCIEN2)) Q:MCIEN2="" I $D(^MCAR(700.5,MCIEN2,0)),$P(^MCAR(700.5,MCIEN2,0),"^",3)=MCSSN S MCERR=0
|
---|
| 26 | I MCERR>0 D SET
|
---|
| 27 | Q
|
---|
| 28 | SET ;
|
---|
| 29 | I MCNAME="" S MCNAME="NO PATIENT NAME"
|
---|
| 30 | I MCSSN="" S MCSSN="NO SSN"
|
---|
| 31 | I $L(MCNAME)<30 F MCJ=$L(MCNAME):1:30 S MCNAME=MCNAME_" "
|
---|
| 32 | I $L(MCSSN)<10 F MCJ=$L(MCSSN):1:10 S MCSSN=MCSSN_" "
|
---|
| 33 | I $D(^TMP($J,0,"MC",MCNAME,MCSSN,MCDATE)) Q
|
---|
| 34 | S MCCNT=MCCNT+1 W:MCCNT#100=0 "."
|
---|
| 35 | S ^TMP($J,0,"MC",MCNAME,MCSSN,MCDATE)=""
|
---|
| 36 | S ^TMP($J,0,"MC",0)=MCCNT
|
---|
| 37 | Q
|
---|