PSXCMOP0 ; BIR/WRT-DISPLAY & Review NDF (LOOP) matches for CMOP ;[ 04/08/97 2:06 PM ]
;;2.0;CMOP;;11 Apr 97
S PSXFL=0,PSXF=0,PSXEND=0 D BEGIN,COMPLETE^PSXCMOP1,DONE
Q
BEGIN K ^TMP($J,"PSXCMOP"),^TMP($J,"PSXANS") D TEXT,NO1^PSXCMOP1 S:'$D(^TMP($J,"PSXCMOP")) PSXEND=1 Q:PSXEND D PICK Q:PSXFL Q:PSXF
Q
DONE K PSXMM,PSXB,PSXGN,PSXVAP,PSXVP,PSXCMOP,PSXZERO,PSXD,PSXFL,NDA,NUM,PSXDA,PSXDN,PSXDP,PSXDU,PSXDUP,PSXF,PSXG,PSXGN,PSXLM,PSXLOC,PSXM,PSXODE,PSXOU,WAS,DA,RRF,^TMP($J,"PSXCMOP"),^TMP($J,"PSXANS"),X,Y,PSXNO,PSXBT,PRICE,PSXNOW
K PSXNDF,PSXVAPN,PSXIDENT,PSXEND,PSXLAST,PSXNEXT,ONCE,RTC
Q
PICK F PSXMM=1:1 S PSXF=0 D PICK1^PSXCMOP Q:PSXFL Q:PSXF Q:PSXBT
Q
TEXT W !!,"This option allows you to choose entries from your drug file and helps you",!,"review your NDF matches and mark individual entries to send to CMOP.",!
W !,"If you mark the entry to transmit to CMOP, it will replace your Dispense Unit",!,"with the VA Dispense Unit. In addition, you may overwrite the local drug name"
W !,"with the VA Print Name and the entry will remain uneditable.",! S PSXBT=0
Q
DISPLAY Q:PSXFL=1 W @IOF W !,?3,"VA Print Name: ",PSXM,?55,"VA Dispense Unit: ",PSXDU
S PSXD=^PSDRUG(PSXDA,"ND") W !!!,?5,"Local Drug Generic Name: ",PSXLOC,!?15,"VA Drug Class: ",$P(^PS(50.605,$P(PSXD,"^",6),0),"^",1)
W !!,?18,"ORDER UNIT: " I $D(^PSDRUG(PSXDA,660)) S PSXODE=^PSDRUG(PSXDA,660) I $P(PSXODE,"^",2) S PSXOU=$P(PSXODE,"^",2) I $D(^DIC(51.5)),$D(^DIC(51.5,PSXOU)) W ?28,$S('$D(PSXOU):"",1:$P(^DIC(51.5,PSXOU,0),"^",1))
W !,?2,"DISPENSE UNITS/ORDER UNITS: ",$S('$D(PSXODE):"",1:$P(PSXODE,"^",5)),!,?15,"DISPENSE UNIT: ",$S('$D(PSXODE):"",1:$P(PSXODE,"^",8)),!," PRICE PER DISPENSE UNIT: ",$S('$D(PSXODE):"",1:$P(PSXODE,"^",6))
W:PSXNO !!,"** This entry has been previously marked NOT to transmit to CMOP **" D MARK^PSXCMOP Q:PSXFL
Q
SYN S:'$D(^PSDRUG(WAS,1,0)) ^PSDRUG(WAS,1,0)="^50.1A^0^0" I '$D(^PSDRUG("C",PSXM,WAS)) S PSXNOW=$P(^PSDRUG(WAS,1,0),"^",3)+1,^PSDRUG(WAS,1,PSXNOW,0)=PSXM,^PSDRUG("C",PSXM,WAS,PSXNOW)="" D SYN1
Q
SYN1 S $P(^PSDRUG(WAS,1,0),"^",3)=PSXNOW,$P(^PSDRUG(WAS,1,0),"^",4)=$P(^PSDRUG(WAS,1,0),"^",4)+1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSXCMOP0 2155 printed Dec 13, 2024@01:43:38 Page 2
PSXCMOP0 ; BIR/WRT-DISPLAY & Review NDF (LOOP) matches for CMOP ;[ 04/08/97 2:06 PM ]
+1 ;;2.0;CMOP;;11 Apr 97
+2 SET PSXFL=0
SET PSXF=0
SET PSXEND=0
DO BEGIN
DO COMPLETE^PSXCMOP1
DO DONE
+3 QUIT
BEGIN KILL ^TMP($JOB,"PSXCMOP"),^TMP($JOB,"PSXANS")
DO TEXT
DO NO1^PSXCMOP1
if '$DATA(^TMP($JOB,"PSXCMOP"))
SET PSXEND=1
if PSXEND
QUIT
DO PICK
if PSXFL
QUIT
if PSXF
QUIT
+1 QUIT
DONE KILL PSXMM,PSXB,PSXGN,PSXVAP,PSXVP,PSXCMOP,PSXZERO,PSXD,PSXFL,NDA,NUM,PSXDA,PSXDN,PSXDP,PSXDU,PSXDUP,PSXF,PSXG,PSXGN,PSXLM,PSXLOC,PSXM,PSXODE,PSXOU,WAS,DA,RRF,^TMP($JOB,"PSXCMOP"),^TMP($JOB,"PSXANS"),X,Y,PSXNO,PSXBT,PRICE,PSXNOW
+1 KILL PSXNDF,PSXVAPN,PSXIDENT,PSXEND,PSXLAST,PSXNEXT,ONCE,RTC
+2 QUIT
PICK FOR PSXMM=1:1
SET PSXF=0
DO PICK1^PSXCMOP
if PSXFL
QUIT
if PSXF
QUIT
if PSXBT
QUIT
+1 QUIT
TEXT WRITE !!,"This option allows you to choose entries from your drug file and helps you",!,"review your NDF matches and mark individual entries to send to CMOP.",!
+1 WRITE !,"If you mark the entry to transmit to CMOP, it will replace your Dispense Unit",!,"with the VA Dispense Unit. In addition, you may overwrite the local drug name"
+2 WRITE !,"with the VA Print Name and the entry will remain uneditable.",!
SET PSXBT=0
+3 QUIT
DISPLAY if PSXFL=1
QUIT
WRITE @IOF
WRITE !,?3,"VA Print Name: ",PSXM,?55,"VA Dispense Unit: ",PSXDU
+1 SET PSXD=^PSDRUG(PSXDA,"ND")
WRITE !!!,?5,"Local Drug Generic Name: ",PSXLOC,!?15,"VA Drug Class: ",$PIECE(^PS(50.605,$PIECE(PSXD,"^",6),0),"^",1)
+2 WRITE !!,?18,"ORDER UNIT: "
IF $DATA(^PSDRUG(PSXDA,660))
SET PSXODE=^PSDRUG(PSXDA,660)
IF $PIECE(PSXODE,"^",2)
SET PSXOU=$PIECE(PSXODE,"^",2)
IF $DATA(^DIC(51.5))
IF $DATA(^DIC(51.5,PSXOU))
WRITE ?28,$SELECT('$DATA(PSXOU):"",1:$PIECE(^DIC(51.5,PSXOU,0),"^",1))
+3 WRITE !,?2,"DISPENSE UNITS/ORDER UNITS: ",$SELECT('$DATA(PSXODE):"",1:$PIECE(PSXODE,"^",5)),!,?15,"DISPENSE UNIT: ",$SELECT('$DATA(PSXODE):"",1:$PIECE(PSXODE,"^",8)),!," PRICE PER DISPENSE UNIT: ",$SELECT('$DATA(PSXODE):"",1:$PIECE(PSXODE,"^",
6))
+4 if PSXNO
WRITE !!,"** This entry has been previously marked NOT to transmit to CMOP **"
DO MARK^PSXCMOP
if PSXFL
QUIT
+5 QUIT
SYN if '$DATA(^PSDRUG(WAS,1,0))
SET ^PSDRUG(WAS,1,0)="^50.1A^0^0"
IF '$DATA(^PSDRUG("C",PSXM,WAS))
SET PSXNOW=$PIECE(^PSDRUG(WAS,1,0),"^",3)+1
SET ^PSDRUG(WAS,1,PSXNOW,0)=PSXM
SET ^PSDRUG("C",PSXM,WAS,PSXNOW)=""
DO SYN1
+1 QUIT
SYN1 SET $PIECE(^PSDRUG(WAS,1,0),"^",3)=PSXNOW
SET $PIECE(^PSDRUG(WAS,1,0),"^",4)=$PIECE(^PSDRUG(WAS,1,0),"^",4)+1
+1 QUIT