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

APSPCCD.m

Go to the documentation of this file.
APSPCCD ; IHS/DSD/ENM - DELETE PCC RX LINKAGE ;01-Mar-2006 19:07;SM
 ;;7.0;IHS PHARMACY MODIFICATIONS;;09/03/97
 ; NOTE: CALLED FROM PSRXDL
 ;
EN ; NORMAL ENTRY POINT FROM PHARMACY ROUTINES -- TASKMAN SETUP
 G:'APSRM EXIT G:'$D(^AUPNVMED(APSRM,0)) EXIT
 NEW X
 K ZTSAVE F %="APSRX","APSRM","APSPPDFN" S ZTSAVE(%)=""
 S ZTRTN="ZTSK^APSPCCD",ZTDESC="DELETE PRESCRIPTION LINK TO PCC FROM PHARMACY",ZTIO="",ZTDTH=DT D ^%ZTLOAD K ZTSK
EXIT K APSRX,APSRM,ZTRTN,ZTDESC,ZTIO,ZTDTH
 Q
 ;
ZTSK ; TASKMAN ENTRY POINT (IN BACKGROUND)
 D ^APSPCCLQ ; HANG IN QUEUE
 S APSRV=$P(^AUPNVMED(APSRM,0),U,3)
 S:$D(^APSPCCTM) (^APSPCCTM,APSPCCTM)=^APSPCCTM+1,^APSPCCTM(APSPCCTM,1)=$H_"^D"
 S DIE=9000010.14,DA=APSRM,DR=".01///@" D ^DIE ; DELETE V MED ENTRY
 I '$P(^AUPNVSIT(APSRV,0),U,9) S AUPNVSIT=APSRV D DEL^AUPNVSIT
 I $D(APSPCCTM) S ^APSPCCTM(APSPCCTM,2)=$H K APSPCCTM
 D K^APSPCCLQ ; REMOVE QUEUE ENTRY
 S:$D(ZTQUEUED) ZTREQ="@"
ZTSKX K APSRX,APSRM,APSRV,AUPNVSIT
 Q