source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDRPA18.m@ 1579

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

initial load of WorldVistAEHR

File size: 960 bytes
RevLine 
[613]1SDRPA18 ;BP-OIFO/ESW,SWO - UTILITY ; 10/31/04 6:05pm
2 ;;5.3;Scheduling;**376**;Aug 13, 1993
3EN ;Check the 1st and 2nd run for missing ACK's
4 ;BTRAK : ien of batch tracking entry
5 ;V1 : ien of run
6 ;ZNODE : zero node of batch tracking entry
7 N BTRAK,DA,DIK,RUN,V1,V2,V3,ZNODE
8 S V1=0 F S V1=$O(^SDWL(409.6,V1)) Q:V1'>0 Q:+$G(^SDWL(409.6,V1,0))>3040514 D
9 . S BTRAK=0 F S BTRAK=$O(^SDWL(409.6,V1,2,BTRAK)) Q:'BTRAK D
10 .. S ZNODE=$G(^SDWL(409.6,V1,2,BTRAK,0)) Q:ZNODE=""
11 .. I $P(ZNODE,"^",4)=""!($P(ZNODE,"^",5)="") D UPD(V1,BTRAK)
12 .;check the "AE" xref for this run
13 .F V2="S","N","R" S V3=0 I $D(^SDWL(409.6,"AE",V2,V1)) F S V3=$O(^SDWL(409.6,"AE",V2,V1,V3)) Q:'V3 D
14 .. S DIK="^SDWL(409.6,"_V1_",1," S DA=V3,DA(1)=V1 D ^DIK
15 Q
16UPD(V1,V2) ;update the missed ACK as AA
17 ;V1 : ien of run
18 ;V2 : ien of batch tracking multiple
19 N DA,DIE,DR
20 S DA=V2,DA(1)=V1,DIE="^SDWL(409.6,"_V1_",2,"
21 S DR=".04///"_$$NOW^XLFDT_";.05///AA"
22 D ^DIE K DIE
23 Q
Note: See TracBrowser for help on using the repository browser.