PXCASOR ;ISL/dee - Validates & Translates data from the PCE Device Interface into PCE's PXK format for the Source ;6/20/96
;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
Q
; Variables
; PXCASOR Copy of the source node of the PXCA array
;
SOR(PXCASOR) ;
S ^TMP(PXCAGLB,$J,"SOR")=$P(PXCASOR,"^",1)
S PXKDUZ=$P(PXCASOR,"^",2)
Q
;
SOURCE(PXCA,PXCABULD,PXCAERRS) ;
I '($D(PXCA("SOURCE"))#2) S PXCA("ERROR","SOURCE",0,0,0)="SOURCE node of the local data array is missing" Q
N PXCASOR,PXCAITEM
S PXCASOR=$G(PXCA("SOURCE"))
I PXCASOR="" S PXCA("ERROR","SOURCE",0,0,0)="SOURCE data missing" Q
S PXCAITEM=+$P(PXCASOR,"^",1)
I 'PXCAITEM S PXCA("ERROR","SOURCE",0,0,1)="Data Sourec is Missing^"_PXCAITEM
E I '$D(^PX(839.7,PXCAITEM,0)) S PXCA("ERROR","SOURCE",0,0,1)="Data Sourec is not in File 839.7^"_PXCAITEM
S PXCAITEM=+$P(PXCASOR,"^",2)
I '$D(^VA(200,PXCAITEM,0)) S PXCA("ERROR","SOURCE",0,0,2)="User is not in File 200^"_PXCAITEM
I PXCABULD&'$D(PXCA("ERROR","SOURCE"))!PXCAERRS D SOR(PXCASOR)
Q
;
PXCASOR ;ISL/dee - Validates & Translates data from the PCE Device Interface into PCE's PXK format for the Source ;6/20/96
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
+2 QUIT
+3 ; Variables
+4 ; PXCASOR Copy of the source node of the PXCA array
+5 ;
SOR(PXCASOR) ;
+1 SET ^TMP(PXCAGLB,$JOB,"SOR")=$PIECE(PXCASOR,"^",1)
+2 SET PXKDUZ=$PIECE(PXCASOR,"^",2)
+3 QUIT
+4 ;
SOURCE(PXCA,PXCABULD,PXCAERRS) ;
+1 IF '($DATA(PXCA("SOURCE"))#2)
SET PXCA("ERROR","SOURCE",0,0,0)="SOURCE node of the local data array is missing"
QUIT
+2 NEW PXCASOR,PXCAITEM
+3 SET PXCASOR=$GET(PXCA("SOURCE"))
+4 IF PXCASOR=""
SET PXCA("ERROR","SOURCE",0,0,0)="SOURCE data missing"
QUIT
+5 SET PXCAITEM=+$PIECE(PXCASOR,"^",1)
+6 IF 'PXCAITEM
SET PXCA("ERROR","SOURCE",0,0,1)="Data Sourec is Missing^"_PXCAITEM
+7 IF '$TEST
IF '$DATA(^PX(839.7,PXCAITEM,0))
SET PXCA("ERROR","SOURCE",0,0,1)="Data Sourec is not in File 839.7^"_PXCAITEM
+8 SET PXCAITEM=+$PIECE(PXCASOR,"^",2)
+9 IF '$DATA(^VA(200,PXCAITEM,0))
SET PXCA("ERROR","SOURCE",0,0,2)="User is not in File 200^"_PXCAITEM
+10 IF PXCABULD&'$DATA(PXCA("ERROR","SOURCE"))!PXCAERRS
DO SOR(PXCASOR)
+11 QUIT
+12 ;