source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSO146PS.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1PSO146PS ;BIR/RTR-Patch 146 Post Install routine ;08/16/03
2 ;;7.0;OUTPATIENT PHARMACY;**146**;DEC 1997
3 ;
4 S ZTDTH=@XPDGREF@("PSOQ146")
5 S ZTRTN="START^PSO146PS",ZTDESC="Post Init for patch PSO*7*146",ZTIO="" D ^%ZTLOAD K ZTDTH,ZTRTN,ZTIO,ZTDESC
6 I $D(ZTSK)&('$D(ZTQUEUED)) D BMES^XPDUTL("Task Queued!")
7 Q
8START ;
9 I '$G(DT) S DT=$$DT^XLFDT
10 N PSOTTEXT,PSOTPSTZ,PSOTPLLZ,PSOTPFLG,PSOTDFN,PSOTDFNX
11 D NOW^%DTC S Y=% X ^DD("DD") S PSOTTEXT(3)="The job started at "_$G(Y) K Y
12 ;Update Rx Patient Status entry
13 S PSOTPFLG=0
14 F PSOTPLLZ=0:0 S PSOTPLLZ=$O(^PS(53,PSOTPLLZ)) Q:'PSOTPLLZ D
15 .S PSOTPSTZ=$P($G(^PS(53,PSOTPLLZ,0)),"^") I PSOTPSTZ'="",$$UP^XLFSTR(PSOTPSTZ)="NON-VA" S $P(^PS(53,PSOTPLLZ,0),"^",6)=5,PSOTPFLG=PSOTPFLG+1
16 I '$G(PSOTPFLG) S PSOTTEXT(6)="Could not find a NON-VA entry in the RX PATIENT STATUS file." S PSOTTEXT(7)="Please contact National Vista Support!"
17 I $G(PSOTPFLG)>1 S PSOTTEXT(6)="Found multiple entries of NON-VA in the RX PATIENT STATUS file." S PSOTTEXT(7)="Please contact National Vista Support!"
18 ;Disable Enter/Edit option
19 K DIC,X S DIC(0)="X",DIC=19,X="PSO TPB PATIENT ENTER/EDIT" D ^DIC K DIC
20 I +Y>0 K DA,DIE,DR S DA=+Y,DIE="^DIC(19,",DR="2////"_"TEMPORARILY OUT OF ORDER - POST INSTALL RUNNING" D ^DIE K DIE,DA,DR
21 ;Date of death check
22 F PSOTDFN=0:0 S PSOTDFN=$O(^PS(52.91,PSOTDFN)) Q:'PSOTDFN I '$P($G(^PS(52.91,PSOTDFN,0)),"^",3)!($P($G(^(0)),"^",3)>DT) D
23 .K PSOTDFNX S PSOTDFNX=$$GET1^DIQ(2,PSOTDFN,.351,"I")
24 .I $G(PSOTDFNX) K DA,DIE,DR S DA=PSOTDFN,DIE="^PS(52.91,",DR="2////"_DT_";3////"_5 D ^DIE K DIE,DA,DR
25 K DIC,X S DIC(0)="X",DIC=19,X="PSO TPB PATIENT ENTER/EDIT" D ^DIC K DIC
26 I +Y>0 K DA,DR,DIE S DA=+Y,DIE="^DIC(19,",DR="2////"_"@" D ^DIE K DIE,DR,DA
27 K DIC,X S DIC(0)="X",DIC=19,X="PSO TPB RX ENTRY" D ^DIC K DIC
28 I +Y>0 K DA,DR,DIE S DA=+Y,DIE="^DIC(19,",DR="2////"_"@" D ^DIE K DIE,DR,DA
29 S ZTDTH=$H,ZTIO="",ZTRTN="^PSOTPHL1",ZTDESC="TPB PATIENT HL7 EXTRACT" D ^%ZTLOAD K ZTDTH,ZTIO,ZTRTN,ZTDESC
30MAIL ;Send mail message
31 I '$G(DUZ) Q
32 S PSOTTEXT(1)="The Post-Init for patch PSO*7.0*146 is complete."
33 S PSOTTEXT(2)=" "
34 S PSOTTEXT(5)=" "
35 D NOW^%DTC S Y=% X ^DD("DD") S PSOTTEXT(4)="The job ended at "_$G(Y)
36 S XMDUZ="Patch PSO*7*146 Post Install",XMSUB="Patch PSO*7*146 Post Install Complete",XMY(DUZ)=""
37 S XMTEXT="PSOTTEXT(" N DIFROM D ^XMD
38 K PSOTTEXT,XMTEXT,XMSUB,XMDUZ,XMY
39 S:$D(ZTQUEUED) ZTREQ="@"
40 Q
Note: See TracBrowser for help on using the repository browser.