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

BPCPCCVM.m

Go to the documentation of this file.
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