source: FOIAVistA/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJ0171.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1PSJ0171 ;BPOIFO/BI - Correct zero node in File 55 Activity Multiple ;01-FEB-06
2 ;;5.0; INPATIENT MEDICATIONS ;**171**;16 DEC 97
3 ;
4 ;Reference to ^PS(55 is supported by DBIA# 2191.
5 ;
6 Q
7 ;
8EN ; Check user and Queue Job.
9 N ZTSAVE,ZTSK,ZTRTN,ZTDESC,ZTIO,ZTDTH,PIMSG
10 I $G(DUZ)="" W !,"Your DUZ is not defined. It must be defined to run this routine." Q
11 S ZTRTN="ENQ^PSJ0171",ZTDESC="Inpatient Meds Activity Multiple Cleanup",ZTIO="",ZTDTH=$H D ^%ZTLOAD
12 D:$D(ZTSK)
13 .K PIMSG
14 .S PIMSG(1)="The cleanup of existing Activity Multiple Nodes is"
15 .S PIMSG(2)="queued to start NOW."
16 .S PIMSG(3)=" "
17 .S PIMSG(4)="YOU WILL RECEIVE A MAILMAN MESSAGE WHEN TASK #"_ZTSK_" HAS COMPLETED."
18 .D MES^XPDUTL(.PIMSG)
19 D:'$D(ZTSK)
20 .K PIMSG
21 .S PIMSG(1)="The cleanup of existing Activity Multiple Nodes was"
22 .S PIMSG(2)="NOT queued."
23 .D MES^XPDUTL(.PIMSG)
24 S ZTREQ="@"
25 Q
26 ;
27ENQ ; Scan through file ^PS(55 and correct the Activity Multiple Node.
28 N ZS2,ZS4,ZD6,ZD62
29 S ZS2=0 F S ZS2=$O(^PS(55,ZS2)) Q:+ZS2=0 D
30 .S ZS4=0 F S ZS4=$O(^PS(55,ZS2,5,ZS4)) Q:+ZS4=0 D
31 ..S ZD6=$G(^PS(55,ZS2,5,ZS4,9,0))
32 ..S ZD62=$P(ZD6,"^",2)
33 ..I ZD62="55,09D" D
34 ...S $P(^PS(55,ZS2,5,ZS4,9,0),"^",2)="55.09D"
35 D SENDMSG
36 Q
37 ;
38SENDMSG ;Send mail message when check is complete.
39 N DIFROM,XMDUZ,XMSUB,XMTEXT,XMY,PSG
40 S XMDUZ="MEDICATIONS,INPATIENT"
41 S XMSUB="PSJ*5*171 INPATIENT MEDS ACTIVITY MULTIPLE CLEANUP COMPLETED"
42 S XMTEXT="PSG("
43 S XMY(DUZ)=""
44 S PSG(1,0)="The cleanup of the Inpatient Medication Activity Multiple has completed."
45 D ^XMD
46 Q
Note: See TracBrowser for help on using the repository browser.