BPCPCCVM ; IHS/OIT/MJL - GUI V GENERIC CHECK ;
;;1.5;BPC;;MAY 26, 2005
;;
Q
;
EN ;ENTRY POINT FOR TESTING
;SET APCDALVR() VALUES
;check patient IEN
I '$G(APCDALVR("APCDPAT")) S BPCERR="PATIENT IEN NOT SENT!" Q
;
;check patient
I '$D(^AUPNPAT(APCDALVR("APCDPAT"),0)) S BPCERR="PATIENT ENTRY IS NOT DEFINED!" Q
;
;check for DUZ(2)
I '$G(APCDALVR("APCDLOC")) S BPCERR="LOCATION (DUZ(2)) NOT SENT!" Q
;
;check VISIT TYPE
I $G(APCDALVR("APCDTYPE"))="" D
.S APCDALVR("APCDTYPE")=$S($P($G(^APCCCTRL(APCDALVR("APCDLOC"),0)),U,4)'="":$P(^(0),U,4),1:"I")
;check for good visit type
I '"I^C^T^O^6^V^P^U^S"[APCDALVR("APCDTYPE") S BPCERR="VISIT TYPE NOT DEFINED!" Q
;
;check for SERVICE CATEGORY
I $G(APCDALVR("APCDCAT"))="" S BPCERR="SERVICE CATEGORY NOT SENT!" Q
I '"A^H^I^C^T^N^S^O^E^R^D^X"[APCDALVR("APCDCAT") S BPCERR="SERVICE CATEGORY NOT DEFINED!" Q
;
;check for VISIT DATE
I $G(APCDALVR("APCDDATE"))="" S BPCERR="VISIT DATE NOT SENT!" Q
;
;check for CREATE/MOD flag
I $G(BPCMOD)="" S BPCERR="CREATE/MOD FLAG NOT SENT!" Q
;
;check for FILE NAME
I $G(BPCFILE)="" S BPCERR="FILE NAME NOT SENT!" Q
;
;check for provider
I $G(APCDALVR("APCDTPRV"))="" S BPCERR="PROVIDER NOT SENT!" Q
;
;check for ORDERING PROVIDER ENTRY IN VA200
I '$D(^VA(200,+APCDALVR("APCDTPRV"),0)) S BPCERR="ORDERING PROVIDER NOT DEFINED!" Q
;
;check for ENCOUNTER PROVIDER
I '$G(APCDALVR("APCDTEPR")) S BPCERR="INVALID ENCOUNTER PROVIDER SENT!" Q
;
;check for ENCOUNTER PROVIDER ENTRY IN VA200
I '$D(^VA(200,+APCDALVR("APCDTEPR"),0)) S BPCERR="ENCOUNTER PROVIDER NOT DEFINED!" Q
;set specific variables
;
;check for value
I '$G(APCDALVR("APCDTXXX")) S BPCERR="INVALID XXX SENT!" Q
;
Q
BPCPCCVM ; IHS/OIT/MJL - GUI V GENERIC CHECK ;
+1 ;;1.5;BPC;;MAY 26, 2005
+2 ;;
+3 QUIT
+4 ;
EN ;ENTRY POINT FOR TESTING
+1 ;SET APCDALVR() VALUES
+2 ;check patient IEN
+3 IF '$GET(APCDALVR("APCDPAT"))
SET BPCERR="PATIENT IEN NOT SENT!"
QUIT
+4 ;
+5 ;check patient
+6 IF '$DATA(^AUPNPAT(APCDALVR("APCDPAT"),0))
SET BPCERR="PATIENT ENTRY IS NOT DEFINED!"
QUIT
+7 ;
+8 ;check for DUZ(2)
+9 IF '$GET(APCDALVR("APCDLOC"))
SET BPCERR="LOCATION (DUZ(2)) NOT SENT!"
QUIT
+10 ;
+11 ;check VISIT TYPE
+12 IF $GET(APCDALVR("APCDTYPE"))=""
Begin DoDot:1
+13 SET APCDALVR("APCDTYPE")=$SELECT($PIECE($GET(^APCCCTRL(APCDALVR("APCDLOC"),0)),U,4)'="":$PIECE(^(0),U,4),1:"I")
End DoDot:1
+14 ;check for good visit type
+15 IF '"I^C^T^O^6^V^P^U^S"[APCDALVR("APCDTYPE")
SET BPCERR="VISIT TYPE NOT DEFINED!"
QUIT
+16 ;
+17 ;check for SERVICE CATEGORY
+18 IF $GET(APCDALVR("APCDCAT"))=""
SET BPCERR="SERVICE CATEGORY NOT SENT!"
QUIT
+19 IF '"A^H^I^C^T^N^S^O^E^R^D^X"[APCDALVR("APCDCAT")
SET BPCERR="SERVICE CATEGORY NOT DEFINED!"
QUIT
+20 ;
+21 ;check for VISIT DATE
+22 IF $GET(APCDALVR("APCDDATE"))=""
SET BPCERR="VISIT DATE NOT SENT!"
QUIT
+23 ;
+24 ;check for CREATE/MOD flag
+25 IF $GET(BPCMOD)=""
SET BPCERR="CREATE/MOD FLAG NOT SENT!"
QUIT
+26 ;
+27 ;check for FILE NAME
+28 IF $GET(BPCFILE)=""
SET BPCERR="FILE NAME NOT SENT!"
QUIT
+29 ;
+30 ;check for provider
+31 IF $GET(APCDALVR("APCDTPRV"))=""
SET BPCERR="PROVIDER NOT SENT!"
QUIT
+32 ;
+33 ;check for ORDERING PROVIDER ENTRY IN VA200
+34 IF '$DATA(^VA(200,+APCDALVR("APCDTPRV"),0))
SET BPCERR="ORDERING PROVIDER NOT DEFINED!"
QUIT
+35 ;
+36 ;check for ENCOUNTER PROVIDER
+37 IF '$GET(APCDALVR("APCDTEPR"))
SET BPCERR="INVALID ENCOUNTER PROVIDER SENT!"
QUIT
+38 ;
+39 ;check for ENCOUNTER PROVIDER ENTRY IN VA200
+40 IF '$DATA(^VA(200,+APCDALVR("APCDTEPR"),0))
SET BPCERR="ENCOUNTER PROVIDER NOT DEFINED!"
QUIT
+41 ;set specific variables
+42 ;
+43 ;check for value
+44 IF '$GET(APCDALVR("APCDTXXX"))
SET BPCERR="INVALID XXX SENT!"
QUIT
+45 ;
+46 QUIT