source: FOIAVistA/tag/r/ZZREGIONAL-A1C-A5C-CRHD-RGED-RGUT-RGWB-RG/RGMTRUN.m@ 1424

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1RGMTRUN ;BIR/CML,PTD-SCAN TASKMAN RUNNING HL7 TASKS ;07/12/00
2 ;;1.0;CLINCAL INFO RESOURCE NETWORK;**25,20**;30 Apr 99
3 ;
4 ;Reference to ^%ZTSCH("TASK" supported by IA #3520
5 ;Reference to EN^XUTMTP supported by IA #3521
6 ;Setting ZT* and XU* variables supported by IA #3521
7 ;
8MAIN ;Entry point for device call
9 W !!,"This option prints the currently running HL7 tasks."
10 W !,"The right margin for this report is 80.",!
11 S NOTRPC=1
12 K ZTSAVE S ZTSAVE("NOTRPC")=""
13 D EN^XUTMDEVQ("START^RGMTRUN","Print Running HL7 Task Data") I 'POP K NOTRPC Q
14 W !,"NO DEVICE SELECTED OR REPORT PRINTED!!"
15 K NOTRPC
16 Q
17 ;
18START ;Entry point for RPC call
19 S $P(LN,"-",80)="",CNT=0,QFLG=0
20 I $D(NOTRPC) W @IOF,!
21 I '$D(NOTRPC) W "Running HL7 Tasks at "_$P($$SITE^VASITE(),"^",2)_":"
22 I '$D(NOTRPC) D NOW^%DTC W !,"Date compiled: ",$$FMTE^XLFDT($E(%,1,12))
23 ;
24 S TASK=0 F S TASK=$O(^%ZTSCH("TASK",TASK)) Q:'TASK Q:QFLG D
25 .S ROU=$P(^%ZTSCH("TASK",TASK),"^",2)
26 .I (ROU["HL")!(ROU["RG") D
27 ..S CNT=CNT+1
28 ..N ZTENV,ZTKEY,ZTFLAG,ZTNAME,XUTMUCI
29 ..S ZTENV=1,ZTKEY=0,ZTFLAG=1,ZTNAME=$$GET1^DIQ(200,+DUZ_",",.01)
30 ..X ^%ZOSF("UCI") S XUTMUCI=Y
31 ..D EN^XUTMTP(TASK) W !,LN
32 ..I $D(NOTRPC),CNT=5 W ! S DIR(0)="E" D ^DIR K DIR S CNT=0 S:'Y QFLG=1 I Y W @IOF
33 ;
34QUIT ;Kill variables and quit.
35 I $D(NOTRPC) W:$E(IOST)'="C" @IOF D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
36 K %,CNT,LN,NOTRPC,QFLG,ROU,TASK,Y,ZTSK
37 Q
38 ;
39 ;
40TASK(RETURN) ;Remote HL7 task display
41 N ARRAY
42 S ARRAY="^TMP(""RGMTHFS"","_$J_")"
43 D HFS^RGMTHFS("START^RGMTRUN")
44 M RETURN=^TMP("RGMTHFS",$J)
45 K ^TMP("RGMTHFS",$J)
46 Q
47 ;
Note: See TracBrowser for help on using the repository browser.