PSSPKIPR ;BIR/MHA-DEA/PKI Post-Inst DEA-CS FED SCH mismatch report ;08/08/02
;;1.0;PHARMACY DATA MANAGEMENT;**61,76**;9/30/97
;Reference to ^PSNDF(50.68 supported by DBIA 3735
Q:'$D(OP)
DEV ;
K %ZIS,IO("Q"),POP,ZTSK S PSDIO=ION,%ZIS="QM" D ^%ZIS
S ZZ="PSSPKI"
I POP W !,"NO DEVICE SELECTED !!!" G END
I $D(IO("Q")) K IO("Q"),ZTIO,ZTSAVE,ZTDTH,ZTSK D G END
.S ZTRTN="EN^PSSPKIPR",ZTDESC="PKI CS vs DEA-Spec-Hdlg inconsistent-discrepancy report"
.N I F I="OP","ZZ" S ZTSAVE(I)=""
.D ^%ZTLOAD W:$D(ZTSK) !,"Report is Queued to print !!" K ZTSK
W:$E(IOST)["C" !!,"......Compiling report, this may take a few minutes......",!,"......It is better to QUEUE this report!!........"
EN ;
K ^XTMP(ZZ) N PSSX,PSSD,PSSJ,PSSK,PSSN,NDR
S PSSX="" F S PSSX=$O(^PSDRUG("B",PSSX)) Q:PSSX="" D
.S PSSN=0 F S PSSN=$O(^PSDRUG("B",PSSX,PSSN)) Q:'PSSN D
..Q:'$D(^PSDRUG(PSSN,0))
..I $P($G(^PSDRUG(PSSN,"I")),"^"),$P($G(^("I")),"^")
IOSL HD Q:QU
Q
END K ^XTMP(ZZ),^TMP($J)
W ! W:$E(IOST)'["C" @IOF D ^%ZISC
K ZZ,AR,DIR,DIRUT,DOS,I,J,K,T,NDR,OP,PG,PSSD,PSSJ,PSSK,PSSL,PSSN,PSSX,QQ,QU,S1,S2,T,UL,XX,ZTSAVE
S:$D(ZTQUEUED) ZTREQ="@"
Q
PDET ;
S ^TMP($J,J,XX)="GENERIC NAME: "_K,XX=XX+1
S ^TMP($J,J,XX)="VA PRODUCT NAME: "_$P(QQ,"^"),XX=XX+1
S ^TMP($J,J,XX)="VA CLASS: "_$P(QQ,"^",2),XX=XX+1
S ^TMP($J,J,XX)="CURRENT DEA, SPECIAL HDLG: "_$P(QQ,"^",3),XX=XX+1
S ^TMP($J,J,XX)="CS FEDERAL SCHEDULE: "_$P(QQ,"^",4),XX=XX+1
S ^TMP($J,J,XX)="",XX=XX+1
Q
REP4 ;
N OI S PSSL="" F S PSSL=$O(^PSDRUG("ASP",PSSL)) Q:'PSSL D
.Q:'$D(^PS(50.7,PSSL,0)) S OI=$P(^PS(50.7,PSSL,0),"^")
.S PSSN="" K AR S (I,J)=0 F S PSSN=$O(^PSDRUG("ASP",PSSL,PSSN)) Q:'PSSN D
..Q:'$D(^PSDRUG(PSSN,0))
..I $P($G(^PSDRUG(PSSN,"I")),"^"),$P($G(^("I")),"^")1,$E(IOST)="C" S DIR(0)="E" D ^DIR I $D(DIRUT) S QU=1 Q
W @IOF D @("H"_T) W !,UL,! S PG=PG+1
Q
H1 W !?5,"DEA Special Handling & CS Federal Schedule Discrepancies",?71,"Page: ",PG
I PG=1 D
.W !!,"The following active Controlled Substances were identified as having a"
.W !,"discrepancy between the CS FEDERAL SCHEDULE in the VA PRODUCT file (#50.68)"
.W !,"and the DEA,SPECIAL HDLG code in the DRUG file (#50). You may wish to update"
.W !,"the DEA,SPECIAL HDLG code for these drugs."
.W !!,"PLEASE NOTE: The CS FEDERAL SCHEDULE will only identify DEA, SPECIAL HDLG"
.W !,"codes of 1, 2A, 2C, 3A, 3C, 4, or 5. In addition to these codes, you may"
.W !,"also use other DEA, SPECIAL HDLG codes such as L, P,R, S, etc., as needed."
Q
H2 W !?10,"Controlled Substances Not Matched to NDF",?71,"Page: ",PG
I PG=1 D
.W !!,"The following active Controlled Substances have not been matched to NDF."
.W !,"You may wish to match these drugs."
.W !!,"GENERIC NAME",?43,"VA CLASS",?53,"CURR DEA, SPECIAL HDLG"
Q
H3 W !?7,"CS (DRUGS) with Inconsistent DEA Special Handling Field",?71,"Page: ",PG
I PG=1 D
.W !!,"The following active drugs are defined as Controlled Substances, but"
.W !,"not classified correctly as Narcotics or Non-Narcotics."
.W !,"Please make sure they are defined correctly."
.W !!,"GENERIC NAME",?43,"VA CLASS",?53,"CURR DEA, SPECIAL HDLG"
Q
H4 W !?3,"CS (ORDERABLE ITEMS) with Inconsistent DEA Special Handling Field",?71,"Page: ",PG
I PG=1 D
.W !!,"The following pharmacy orderable items are associated with active dispense"
.W !,"drugs that have a discrepancy within their DEA Special Hdlg fields. Please"
.W !,"correct all entries to identify these orderable items with a specific"
.W !,"Controlled Substance schedule."
.W !!,"PHARMACY ORDERABLE ITEM"
.W !," IEN DISPENSE DRUG",?52,"DEA SPEC. HDLG",?67,"CS FED. SCHE."
Q