source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNDODCK.m@ 1476

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1SPNDODCK ;SD/CM- UPDATES REG STATUS BASED ON DEATH STATUS; 4-4-01
2 ;;2.0;Spinal Cord Dysfunction;**15,19**;01/02/97
3 ;
4LOOP(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 ;
13LOOP2(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
21LOOP3 ;
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"
35MSG ;
36 S XMTEXT="SPNARR("
37 S XMY("G.SPNL SCD COORDINATOR")=""
38SEND ;
39 D ^XMD
40 Q
Note: See TracBrowser for help on using the repository browser.