[628] | 1 | SPNDODCK ;SD/CM- UPDATES REG STATUS BASED ON DEATH STATUS; 4-4-01
|
---|
| 2 | ;;2.0;Spinal Cord Dysfunction;**15,19**;01/02/97
|
---|
| 3 | ;
|
---|
| 4 | LOOP(SPNPD0) ;
|
---|
| 5 | Q:'$D(^SPNL(154,SPNPD0,0))
|
---|
| 6 | Q:$P(^SPNL(154,SPNPD0,0),U,3)=""
|
---|
| 7 | S SPNOLD=$P(^SPNL(154,SPNPD0,0),U,3)
|
---|
| 8 | ;I $P($G(^DPT(SPNPD0,.35)),U,1)'="" K ^SPNL(154,"AD",SPNOLD,SPNPD0) S $P(^SPNL(154,SPNPD0,0),U,3)="X" S DA=SPNPD0,DIK="^SPNL(154,",DIK(1)=".03" D EN^DIK
|
---|
| 9 | I $P($G(^DPT(SPNPD0,.35)),U,1)'="" K ^SPNL(154,"AD",SPNOLD,SPNPD0) S DIE="^SPNL(154,",DA=SPNPD0,DR=".03///EXPIRED" D ^DIE
|
---|
| 10 | K DA,DIE,DR,SPNOLD,SPNPD0
|
---|
| 11 | Q
|
---|
| 12 | ;
|
---|
| 13 | LOOP2(SPNPD0) ;
|
---|
| 14 | N DIFROM
|
---|
| 15 | Q:'$D(^SPNL(154,SPNPD0,0))
|
---|
| 16 | Q:$P(^SPNL(154,SPNPD0,0),U,3)=""
|
---|
| 17 | Q:$P(^SPNL(154,SPNPD0,0),U,3)'="X"
|
---|
| 18 | I $P($G(^DPT(SPNPD0,.35)),U,1)="" D LOOP3
|
---|
| 19 | K SPNARR,SPNPD0,XMDUZ,XMSUB,XMTEXT,XMY
|
---|
| 20 | Q
|
---|
| 21 | LOOP3 ;
|
---|
| 22 | S SPNARR(1)=" ******** Patient NOT Expired ********"
|
---|
| 23 | S SPNARR(2)=" "
|
---|
| 24 | S SPNARR(3)="This is to alert you that a patient marked as 'Expired'"
|
---|
| 25 | S SPNARR(4)="in the SCD Registry is alive according to MAS records."
|
---|
| 26 | S SPNARR(4.2)="Notify your hospital's MAS personnel -- it is possible"
|
---|
| 27 | S SPNARR(4.4)="that the patient is indeed deceased, but Date of Death"
|
---|
| 28 | S SPNARR(4.6)="was not entered into pt's VA record."
|
---|
| 29 | S SPNARR(5)="However, if this patient is truely alive, please update"
|
---|
| 30 | S SPNARR(6)="his Registration Status field in the SCD Registry."
|
---|
| 31 | S SPNARR(7)=" "
|
---|
| 32 | S SPNARR(8)="Patient ----> "_$E($P($G(^DPT(SPNPD0,0)),U,1),1)_$E($P($G(^DPT(SPNPD0,0)),U,9),6,9)
|
---|
| 33 | S XMSUB="PT DEATH: MAS RECORD vs. SCD RECORD"
|
---|
| 34 | S XMDUZ="SCD REGISTRY"
|
---|
| 35 | MSG ;
|
---|
| 36 | S XMTEXT="SPNARR("
|
---|
| 37 | S XMY("G.SPNL SCD COORDINATOR")=""
|
---|
| 38 | SEND ;
|
---|
| 39 | D ^XMD
|
---|
| 40 | Q
|
---|