source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXCA.m@ 972

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

initial load of WorldVistAEHR

File size: 2.4 KB
RevLine 
[613]1PXCA ;ISL/dee & LEA/Chylton - Main entry points to PCE Device Interface Module ;12/17/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**5,14**;Aug 12, 1996
3 Q
4 ;
5 ;----------------------------- FOREGROUND ---------------------------
6FOREGND(PXCA,PXCASTAT,PXCAVSIT) ; Invoke the event point in the foreground
7 ; if there are no errors
8 S PXCASTAT=0 ; assume that event processing did not occur
9 D EN^PXCA0
10 I '$D(PXCA("ERROR")),PXCASTAT=0 S PXCASTAT=1 ; there were no errors so report that
11 ; event processing occurred
12 I PXCASTAT>0!(PXCASTAT<-1) D EVENT ; Let the rest of the world look at the array
13 ; if there are now errors
14 Q
15 ;
16 ;----------------------------- BACKGROUND ---------------------------
17BACKGND(PXCA,PXCASTAT,PXCAVSIT) ; Invoke the event point in the background
18 D VALIDATE(.PXCA) ; Verfify minimal data set is present and valid
19 S PXCASTAT=0 ; assume that event processing did not occur
20 Q:$D(PXCA("ERROR")) ; data did not pass validation
21 S ZTRTN="TASKED^PXCA",ZTDESC="PCE Device Interface Module"
22 S ZTDTH=$H,ZTIO=""
23 I $G(DUZ)'>0 S DUZ=$P(PXCA("SOURCE"),"^",2)
24 I $G(DUZ)'>0 S DUZ=.5
25 I $D(DUZ("AG"))#2'=1 S DUZ("AG")="V"
26 S ZTSAVE("DUZ")=DUZ,ZTSAVE("DUZ(")=""
27 S ZTSAVE("PXCA(")=""
28 D ^%ZTLOAD
29 K ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
30 I $D(ZTSK) S PXCASTAT=1 ; report that event processing occurred
31 E S PXCASTAT=0,PXCA("ERROR","ENCOUNTER",0,0,0)="Tasking of job failed."
32 Q
33 ;
34 ;------------------------------- TASKED -----------------------------
35 ; processing of event point was off-loaded to the host
36TASKED ; called by BACKGND only
37 N DIC
38 K DTOUT,DIROUT,X
39 S PXCASTAT=0 ; assume that event processing did not occur (for debug)
40 D EN^PXCA0
41 K DTOUT,DIC,DIROUT,X
42 S:'$D(PXCA("ERROR")) PXCASTAT=1 ; there were no errors so report that
43 ; event processing occurred (for debug)
44 D EVENT ; Let the rest of the world look at the array
45 Q
46 ;
47 ;----------------------------- VALIDATED ----------------------------
48VALIDATE(PXCA,PXCAVSIT) ;
49 D PROCESS^PXCA0(.PXCA,0,0)
50 Q
51 ;
52 ;---------------------------- EVENT POINT ---------------------------
53EVENT ;
54 S X=+$O(^ORD(101,"B","PXCA DATA EVENT",0))_";ORD(101,"
55 D:+X>0 EN^XQOR
56 Q
57 ;
Note: See TracBrowser for help on using the repository browser.