PSNHELP ;BIR/CCH&WRT-Help text routine ;08/21/98 14:25
;;4.0; NATIONAL DRUG FILE;**60,84,93**; 30 Oct 98
;IA 2352 - ^PSDRUG(
;IA 2613 - ^PS(59.7
;IA 3621 - DRG^PSSHUIDG(DA)
;IA 4394 - DRG^PSSDGUPD(DA) V.2.4 dispensing machines
;IA 1976 - ^PS(59
TRD1 ; TRADE NAME
W !!,"Enter number of one of the trade names displayed"
W !,"Or press return to view more" D UPAR Q
TR2 ; TRADE NAME
W !!,"Enter number of one of the trade names displayed",!,"If none of them match, press return to proceed"
W !,"to next step in matching process" D UPAR K ANS Q
UPAR W !,"or enter ""^"" to exit",! Q
NDC1 ; NDC CODE
W !!,"Enter NDC Code for drug from your drug file",!,"Format should be MANUFACTURER'S CODE""-""PRODUCT CODE""-""PACKAGE CODE",!,"(i.e. 9999-999-99)" D UPAR K ANS Q
NDC2 ; NDC CODE
W !!,"Enter number of one of the drugs displayed or press",!,"return to view more.",!,"You may enter ""^NDC"" to skip this step and go directly to the",!,"""enter NDC Code <WITH DASHES>:"" prompt" D UPAR K ANS Q
NDC3 ; NDC CODE
W !!,"Enter number of one of the drugs displayed",!,"If none of them match, press return to proceed"
W !,"to next step in matching process" D UPAR Q
HIT1 ; FOR MATCH PROMPT
W !!,"The drugs displayed are ""matches"" found in the National",!,"Drug File" D NDC2 Q
RES1 ; FOR RESP PROMPT
W !!,"If the drug from the National Drug File matches the drug ",!," from your drug file enter ""Y""",!,"If an incorrect response was entered, respond ""N"""
W !," or press return to proceed to next step in matching process" D UPAR Q
TYP1 ; FOR PKG TYPE
W !!,"Enter Package Type which matches the Package Type of the drug",!,"in your drug file" D UPAR Q
SZ1 ; FOR PKG SIZE
W !!,"Enter Package Size matches the Package Size",!,"of the drug in your drug file",!,"If none of them match, enter ""NONE""" D UPAR Q
MRG1 ; FOR MERGE OPTION
; W !!,"This routine will merge the following data from the National Drug File",!,"into your local drug file: ",!,"(1) PTR TO NDF",!,"(2) VA PRODUCT NAME FROM NDF",!,"(3) PTR TO NDF VA PRODUCT NAME"
; W !,"(4) PTR TO PACKAGE SIZE IN NDF",!,"(5) PTR TO PACKAGE TYPE IN NDF AND",!,"(6) NEW VA DRUG CLASSIFICATION." K ANS G RESP^PSNMRG Q
ASK1 ; FOR MATCH PROMPT
W !!,"If drugs match, enter ""Y"" for YES",!,"If you would like to rematch drug, enter ""N"" for NO",!,"If no match is possible, press return and the drug will remain unmatched"
W:'$D(Z9) !,"and next drug in your drug file will be displayed" D UPAR Q
REMTCH ; REMATCH PROMPT
W:$P(^PSDRUG(+Y,"ND"),"^",2)]"" !!,"This drug has already been matched and classified with the",!,"National Drug File."
I $D(^PSDRUG(+Y,3)) W:$P(^PSDRUG(+Y,3),"^",1)=1 !,"This drug has also been marked to transmit to CMOP.",!,"If you choose to rematch it, the drug will be marked NOT TO TRANSMIT to CMOP.",!
W:$P(^PSDRUG(+Y,"ND"),"^",2)']"" !!,"This drug has been manually classed but not matched (merged with NDF)."
R !,"Do you wish to match/rematch it? N// ",ANS:DTIME S:'$T ANS="^" S:ANS']"" ANS="N" I ANS="^" S PSNFL=1 Q
I ANS?.E1C.E G REMTCH
I "?"[$E(ANS) W !!,"Answer ""Yy"" to rematch this drug.",!,"Answer ""Nn"" or ""^"" or press <RET> to quit." K ANS G REMTCH
I "NnYy"'[$E(ANS)!(ANS="") W !,"ANSWER MUST BE YES OR NO" K ANS G REMTCH
I "Yy"'[$E(ANS) K ANS G START^PSNDRUG
K ANS S:$D(^PSDRUG(+Y,"ND")) PSNID=$P(^PSDRUG(+Y,"ND"),"^",10) D SETNULL^PSNHELP1 S:$D(^PSDRUG(+Y,3)) $P(^PSDRUG(+Y,3),"^",1)=0 K:$D(^PSDRUG("AQ",+Y)) ^PSDRUG("AQ",+Y) K:PSNID]"" ^PSDRUG("AQ1",PSNID,+Y) S DA=+Y K PSNID
I $$PATCH^XPDUTL("PSS*1.0*57") D DRG^PSSHUIDG(DA)
N XX,DNSNAM,DNSPORT,DVER,DMFU S XX=""
F XX=0:0 S XX=$O(^PS(59,XX)) Q:'XX D
.S DVER=$$GET1^DIQ(59,XX_",",105,"I"),DMFU=$$GET1^DIQ(59,XX_",",105.2)
.I DVER="2.4" S DNSNAM=$$GET1^DIQ(59,XX_",",2006),DNSPORT=$$GET1^DIQ(59,XX_",",2007) I DNSNAM'=""&(DMFU="YES") D DRG^PSSDGUPD(DA,"",DNSNAM,DNSPORT)
S X="PSXREF" X ^%ZOSF("TEST") D:$T ^PSXREF K DA G MATCH^PSNDRUG Q
BLD1 ; WHERE TO BEGIN MATCHING
W !!,"If you wish to begin matching process from beginning of your local drug file,",!,"enter ""B"". This will allow you to match drugs which may have been re-activated."
W !,"Press return to continue with next drug following the one last matched" D UPAR K ANS Q
ING ; INGREDIENTS
R !!,"Display ingredients for this NDF drug? N//",ANS:DTIME S:'$T ANS="^" I ANS["^" S PSNFL=1 Q
I ANS?.E1C.E G ING
I ANS["?" D ING1 G ING
I ANS']""!"nN"[ANS S ANS="N" Q
; S D0=PSNNDF,Y=$P(^PSNDF(D0,5,PSNFNM,1),"^",1)
D INGRED^PSNOUT
; I $D(^PSNDF(D0,5,PSNFNM,3)) S Y=$P(^PSNDF(D0,5,PSNFNM,3),"^",1) D INGRED^PSNOUT
; I $D(^PSNDF(D0,5,PSNFNM,4)) S Y=$P(^PSNDF(D0,5,PSNFNM,4),"^",1) D INGRED^PSNOUT
Q
ING1 W !!,"Displays ingredients (including strengths and units)" D UPAR K ANS Q
RES2 ; MATCH PROMPT
W !!,"If the drug from the National Drug File matches the drug",!," from your local file, respond ""Y""",!,"If it is not a match, respond ""N"""
W:'$D(Z9) !,"If you want to pass to next drug and leave this drug unverified, press return" D UPAR K ANS Q
CR ; FORCES CONVERSION REMATCH OPTION
I $P(^PS(59.7,1,10),"^",3)=0 W !!,"You must use the Conversion Rematch option first before using this option.",! Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSNHELP 5218 printed Dec 13, 2024@02:24:09 Page 2
PSNHELP ;BIR/CCH&WRT-Help text routine ;08/21/98 14:25
+1 ;;4.0; NATIONAL DRUG FILE;**60,84,93**; 30 Oct 98
+2 ;IA 2352 - ^PSDRUG(
+3 ;IA 2613 - ^PS(59.7
+4 ;IA 3621 - DRG^PSSHUIDG(DA)
+5 ;IA 4394 - DRG^PSSDGUPD(DA) V.2.4 dispensing machines
+6 ;IA 1976 - ^PS(59
TRD1 ; TRADE NAME
+1 WRITE !!,"Enter number of one of the trade names displayed"
+2 WRITE !,"Or press return to view more"
DO UPAR
QUIT
TR2 ; TRADE NAME
+1 WRITE !!,"Enter number of one of the trade names displayed",!,"If none of them match, press return to proceed"
+2 WRITE !,"to next step in matching process"
DO UPAR
KILL ANS
QUIT
UPAR WRITE !,"or enter ""^"" to exit",!
QUIT
NDC1 ; NDC CODE
+1 WRITE !!,"Enter NDC Code for drug from your drug file",!,"Format should be MANUFACTURER'S CODE""-""PRODUCT CODE""-""PACKAGE CODE",!,"(i.e. 9999-999-99)"
DO UPAR
KILL ANS
QUIT
NDC2 ; NDC CODE
+1 WRITE !!,"Enter number of one of the drugs displayed or press",!,"return to view more.",!,"You may enter ""^NDC"" to skip this step and go directly to the",!,"""enter NDC Code <WITH DASHES>:"" prompt"
DO UPAR
KILL ANS
QUIT
NDC3 ; NDC CODE
+1 WRITE !!,"Enter number of one of the drugs displayed",!,"If none of them match, press return to proceed"
+2 WRITE !,"to next step in matching process"
DO UPAR
QUIT
HIT1 ; FOR MATCH PROMPT
+1 WRITE !!,"The drugs displayed are ""matches"" found in the National",!,"Drug File"
DO NDC2
QUIT
RES1 ; FOR RESP PROMPT
+1 WRITE !!,"If the drug from the National Drug File matches the drug ",!," from your drug file enter ""Y""",!,"If an incorrect response was entered, respond ""N"""
+2 WRITE !," or press return to proceed to next step in matching process"
DO UPAR
QUIT
TYP1 ; FOR PKG TYPE
+1 WRITE !!,"Enter Package Type which matches the Package Type of the drug",!,"in your drug file"
DO UPAR
QUIT
SZ1 ; FOR PKG SIZE
+1 WRITE !!,"Enter Package Size matches the Package Size",!,"of the drug in your drug file",!,"If none of them match, enter ""NONE"""
DO UPAR
QUIT
MRG1 ; FOR MERGE OPTION
+1 ; W !!,"This routine will merge the following data from the National Drug File",!,"into your local drug file: ",!,"(1) PTR TO NDF",!,"(2) VA PRODUCT NAME FROM NDF",!,"(3) PTR TO NDF VA PRODUCT NAME"
+2 ; W !,"(4) PTR TO PACKAGE SIZE IN NDF",!,"(5) PTR TO PACKAGE TYPE IN NDF AND",!,"(6) NEW VA DRUG CLASSIFICATION." K ANS G RESP^PSNMRG Q
ASK1 ; FOR MATCH PROMPT
+1 WRITE !!,"If drugs match, enter ""Y"" for YES",!,"If you would like to rematch drug, enter ""N"" for NO",!,"If no match is possible, press return and the drug will remain unmatched"
+2 if '$DATA(Z9)
WRITE !,"and next drug in your drug file will be displayed"
DO UPAR
QUIT
REMTCH ; REMATCH PROMPT
+1 if $PIECE(^PSDRUG(+Y,"ND"),"^",2)]""
WRITE !!,"This drug has already been matched and classified with the",!,"National Drug File."
+2 IF $DATA(^PSDRUG(+Y,3))
if $PIECE(^PSDRUG(+Y,3),"^",1)=1
WRITE !,"This drug has also been marked to transmit to CMOP.",!,"If you choose to rematch it, the drug will be marked NOT TO TRANSMIT to CMOP.",!
+3 if $PIECE(^PSDRUG(+Y,"ND"),"^",2)']""
WRITE !!,"This drug has been manually classed but not matched (merged with NDF)."
+4 READ !,"Do you wish to match/rematch it? N// ",ANS:DTIME
if '$TEST
SET ANS="^"
if ANS']""
SET ANS="N"
IF ANS="^"
SET PSNFL=1
QUIT
+5 IF ANS?.E1C.E
GOTO REMTCH
+6 IF "?"[$EXTRACT(ANS)
WRITE !!,"Answer ""Yy"" to rematch this drug.",!,"Answer ""Nn"" or ""^"" or press <RET> to quit."
KILL ANS
GOTO REMTCH
+7 IF "NnYy"'[$EXTRACT(ANS)!(ANS="")
WRITE !,"ANSWER MUST BE YES OR NO"
KILL ANS
GOTO REMTCH
+8 IF "Yy"'[$EXTRACT(ANS)
KILL ANS
GOTO START^PSNDRUG
+9 KILL ANS
if $DATA(^PSDRUG(+Y,"ND"))
SET PSNID=$PIECE(^PSDRUG(+Y,"ND"),"^",10)
DO SETNULL^PSNHELP1
if $DATA(^PSDRUG(+Y,3))
SET $PIECE(^PSDRUG(+Y,3),"^",1)=0
if $DATA(^PSDRUG("AQ",+Y))
KILL ^PSDRUG("AQ",+Y)
if PSNID]""
KILL ^PSDRUG("AQ1",PSNID,+Y)
SET DA=+Y
KILL PSNID
+10 IF $$PATCH^XPDUTL("PSS*1.0*57")
DO DRG^PSSHUIDG(DA)
+11 NEW XX,DNSNAM,DNSPORT,DVER,DMFU
SET XX=""
+12 FOR XX=0:0
SET XX=$ORDER(^PS(59,XX))
if 'XX
QUIT
Begin DoDot:1
+13 SET DVER=$$GET1^DIQ(59,XX_",",105,"I")
SET DMFU=$$GET1^DIQ(59,XX_",",105.2)
+14 IF DVER="2.4"
SET DNSNAM=$$GET1^DIQ(59,XX_",",2006)
SET DNSPORT=$$GET1^DIQ(59,XX_",",2007)
IF DNSNAM'=""&(DMFU="YES")
DO DRG^PSSDGUPD(DA,"",DNSNAM,DNSPORT)
End DoDot:1
+15 SET X="PSXREF"
XECUTE ^%ZOSF("TEST")
if $TEST
DO ^PSXREF
KILL DA
GOTO MATCH^PSNDRUG
QUIT
BLD1 ; WHERE TO BEGIN MATCHING
+1 WRITE !!,"If you wish to begin matching process from beginning of your local drug file,",!,"enter ""B"". This will allow you to match drugs which may have been re-activated."
+2 WRITE !,"Press return to continue with next drug following the one last matched"
DO UPAR
KILL ANS
QUIT
ING ; INGREDIENTS
+1 READ !!,"Display ingredients for this NDF drug? N//",ANS:DTIME
if '$TEST
SET ANS="^"
IF ANS["^"
SET PSNFL=1
QUIT
+2 IF ANS?.E1C.E
GOTO ING
+3 IF ANS["?"
DO ING1
GOTO ING
+4 IF ANS']""!"nN"[ANS
SET ANS="N"
QUIT
+5 ; S D0=PSNNDF,Y=$P(^PSNDF(D0,5,PSNFNM,1),"^",1)
+6 DO INGRED^PSNOUT
+7 ; I $D(^PSNDF(D0,5,PSNFNM,3)) S Y=$P(^PSNDF(D0,5,PSNFNM,3),"^",1) D INGRED^PSNOUT
+8 ; I $D(^PSNDF(D0,5,PSNFNM,4)) S Y=$P(^PSNDF(D0,5,PSNFNM,4),"^",1) D INGRED^PSNOUT
+9 QUIT
ING1 WRITE !!,"Displays ingredients (including strengths and units)"
DO UPAR
KILL ANS
QUIT
RES2 ; MATCH PROMPT
+1 WRITE !!,"If the drug from the National Drug File matches the drug",!," from your local file, respond ""Y""",!,"If it is not a match, respond ""N"""
+2 if '$DATA(Z9)
WRITE !,"If you want to pass to next drug and leave this drug unverified, press return"
DO UPAR
KILL ANS
QUIT
CR ; FORCES CONVERSION REMATCH OPTION
+1 IF $PIECE(^PS(59.7,1,10),"^",3)=0
WRITE !!,"You must use the Conversion Rematch option first before using this option.",!
QUIT