Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PXCA

PXCA.m

Go to the documentation of this file.
  1. PXCA ;ISL/dee & LEA/Chylton - Main entry points to PCE Device Interface Module ;12/17/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**5,14**;Aug 12, 1996
  1. Q
  1. ;
  1. ;----------------------------- FOREGROUND ---------------------------
  1. FOREGND(PXCA,PXCASTAT,PXCAVSIT) ; Invoke the event point in the foreground
  1. ; if there are no errors
  1. S PXCASTAT=0 ; assume that event processing did not occur
  1. D EN^PXCA0
  1. I '$D(PXCA("ERROR")),PXCASTAT=0 S PXCASTAT=1 ; there were no errors so report that
  1. ; event processing occurred
  1. I PXCASTAT>0!(PXCASTAT<-1) D EVENT ; Let the rest of the world look at the array
  1. ; if there are now errors
  1. Q
  1. ;
  1. ;----------------------------- BACKGROUND ---------------------------
  1. BACKGND(PXCA,PXCASTAT,PXCAVSIT) ; Invoke the event point in the background
  1. D VALIDATE(.PXCA) ; Verfify minimal data set is present and valid
  1. S PXCASTAT=0 ; assume that event processing did not occur
  1. Q:$D(PXCA("ERROR")) ; data did not pass validation
  1. S ZTRTN="TASKED^PXCA",ZTDESC="PCE Device Interface Module"
  1. S ZTDTH=$H,ZTIO=""
  1. I $G(DUZ)'>0 S DUZ=$P(PXCA("SOURCE"),"^",2)
  1. I $G(DUZ)'>0 S DUZ=.5
  1. I $D(DUZ("AG"))#2'=1 S DUZ("AG")="V"
  1. S ZTSAVE("DUZ")=DUZ,ZTSAVE("DUZ(")=""
  1. S ZTSAVE("PXCA(")=""
  1. D ^%ZTLOAD
  1. K ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE
  1. I $D(ZTSK) S PXCASTAT=1 ; report that event processing occurred
  1. E S PXCASTAT=0,PXCA("ERROR","ENCOUNTER",0,0,0)="Tasking of job failed."
  1. Q
  1. ;
  1. ;------------------------------- TASKED -----------------------------
  1. ; processing of event point was off-loaded to the host
  1. TASKED ; called by BACKGND only
  1. N DIC
  1. K DTOUT,DIROUT,X
  1. S PXCASTAT=0 ; assume that event processing did not occur (for debug)
  1. D EN^PXCA0
  1. K DTOUT,DIC,DIROUT,X
  1. S:'$D(PXCA("ERROR")) PXCASTAT=1 ; there were no errors so report that
  1. ; event processing occurred (for debug)
  1. D EVENT ; Let the rest of the world look at the array
  1. Q
  1. ;
  1. ;----------------------------- VALIDATED ----------------------------
  1. VALIDATE(PXCA,PXCAVSIT) ;
  1. D PROCESS^PXCA0(.PXCA,0,0)
  1. Q
  1. ;
  1. ;---------------------------- EVENT POINT ---------------------------
  1. EVENT ;
  1. S X=+$O(^ORD(101,"B","PXCA DATA EVENT",0))_";ORD(101,"
  1. D:+X>0 EN^XQOR
  1. Q
  1. ;