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

APSPMAN2.m

Go to the documentation of this file.
APSPMAN2 ; IHS/DSD/ENM - MANUFACTURER DATA FOR RENEWED RX'S ;  [ 05/26/98  11:43 AM ]
 ;;6.0;IHS PHARMACY MODIFICATIONS;**1**;09/03/97
EP ;ENTRY POINT FOR RENEWING RX
 I APSPMAN'=1 Q
 S (APSPMM,APSPL,APSPD)=""
 I $D(^PSRX(PSORENW("OIRXN"),1,0)) S LASTRF=$P(^(0),"^",3) D LAST
 I APSPMM]""!(APSPL]"")!(APSPD]"") G WR
 I $G(PSORENW("RX2"))']"" G ACT
 S APSPMM=$P($G(PSORENW("RX2")),"^",8),APSPL=$P($G(PSORENW("RX2")),"^",4),APSPD=$P($G(PSORENW("RX2")),"^",11) G WR
 ;************************************************************
LAST ;CK MAN DATA IN LAST REFILL
 S APSPLRF=^PSRX(PSORENW("OIRXN"),1,LASTRF,0)
 S APSPMM=$P(APSPLRF,"^",14),APSPL=$P(APSPLRF,"^",6),APSPD=$P(APSPLRF,"^",15)
 Q
 ;************************************************************
WR W !,"Manufacturer: ",APSPMM,?30,"Lot #: ",APSPL,?50,"Mfg Expiration Date: "_$E(APSPD,4,5)_"/"_$E(APSPD,2,3)
ACT S DIR(0)="Y",DIR("A")="Edit Manufacturer Data? :",DIR("B")="N",DIR("?")="Answer 'Yes' if the Manufacturer, Lot # or Expiration date has changed" D ^DIR K DIR I Y=1 S APSPRXX=$P(PSORENW("RX0"),U,6) D ASK^APSPMAN G OUT
DTO ;S APSPRXX=$P(PSORENW("RX0"),U,6) D MAN2^APSPMAN ;IHS/DSD/ENM 10/29/97
 S APSPRXX=$P(PSORENW("RX0"),U,6) D EP1^APSPMAN ;IHS/DSD/ENM 10/29/97 ;IHS/OKCAO/POC 5/26/98
OUT ;SET VARIABLES FOR PSOR52 GLOBAL SET
 S PSORENW("LOT #")=PSONEW("LOT #"),PSORENW("MANUFACTURER")=PSONEW("MANUFACTURER"),PSORENW("EXPIRATION DATE")=PSONEW("EXPIRATION DATE")
 ;GET LABEL VARIABLE DATA
 S APSPMF=$E(PSONEW("MANUFACTURER"),1,5),APSPLOT=$E(PSONEW("LOT #"),1,8),APSPDY=$E(PSONEW("EXPIRATION DATE"),4,5)_"/"_$E(PSONEW("EXPIRATION DATE"),2,3)
 Q