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

PSNHELP.m

Go to the documentation of this file.
  1. PSNHELP ;BIR/CCH&WRT-Help text routine ;08/21/98 14:25
  1. ;;4.0; NATIONAL DRUG FILE;**60,84,93**; 30 Oct 98
  1. ;IA 2352 - ^PSDRUG(
  1. ;IA 2613 - ^PS(59.7
  1. ;IA 3621 - DRG^PSSHUIDG(DA)
  1. ;IA 4394 - DRG^PSSDGUPD(DA) V.2.4 dispensing machines
  1. ;IA 1976 - ^PS(59
  1. TRD1 ; TRADE NAME
  1. W !!,"Enter number of one of the trade names displayed"
  1. W !,"Or press return to view more" D UPAR Q
  1. TR2 ; TRADE NAME
  1. W !!,"Enter number of one of the trade names displayed",!,"If none of them match, press return to proceed"
  1. W !,"to next step in matching process" D UPAR K ANS Q
  1. UPAR W !,"or enter ""^"" to exit",! Q
  1. NDC1 ; NDC CODE
  1. 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
  1. NDC2 ; NDC CODE
  1. 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
  1. NDC3 ; NDC CODE
  1. W !!,"Enter number of one of the drugs displayed",!,"If none of them match, press return to proceed"
  1. W !,"to next step in matching process" D UPAR Q
  1. HIT1 ; FOR MATCH PROMPT
  1. W !!,"The drugs displayed are ""matches"" found in the National",!,"Drug File" D NDC2 Q
  1. RES1 ; FOR RESP PROMPT
  1. 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"""
  1. W !," or press return to proceed to next step in matching process" D UPAR Q
  1. TYP1 ; FOR PKG TYPE
  1. W !!,"Enter Package Type which matches the Package Type of the drug",!,"in your drug file" D UPAR Q
  1. SZ1 ; FOR PKG SIZE
  1. 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
  1. 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"
  1. ; 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
  1. ASK1 ; FOR MATCH PROMPT
  1. 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"
  1. W:'$D(Z9) !,"and next drug in your drug file will be displayed" D UPAR Q
  1. REMTCH ; REMATCH PROMPT
  1. W:$P(^PSDRUG(+Y,"ND"),"^",2)]"" !!,"This drug has already been matched and classified with the",!,"National Drug File."
  1. 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.",!
  1. W:$P(^PSDRUG(+Y,"ND"),"^",2)']"" !!,"This drug has been manually classed but not matched (merged with NDF)."
  1. R !,"Do you wish to match/rematch it? N// ",ANS:DTIME S:'$T ANS="^" S:ANS']"" ANS="N" I ANS="^" S PSNFL=1 Q
  1. I ANS?.E1C.E G REMTCH
  1. I "?"[$E(ANS) W !!,"Answer ""Yy"" to rematch this drug.",!,"Answer ""Nn"" or ""^"" or press <RET> to quit." K ANS G REMTCH
  1. I "NnYy"'[$E(ANS)!(ANS="") W !,"ANSWER MUST BE YES OR NO" K ANS G REMTCH
  1. I "Yy"'[$E(ANS) K ANS G START^PSNDRUG
  1. 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
  1. I $$PATCH^XPDUTL("PSS*1.0*57") D DRG^PSSHUIDG(DA)
  1. N XX,DNSNAM,DNSPORT,DVER,DMFU S XX=""
  1. F XX=0:0 S XX=$O(^PS(59,XX)) Q:'XX D
  1. .S DVER=$$GET1^DIQ(59,XX_",",105,"I"),DMFU=$$GET1^DIQ(59,XX_",",105.2)
  1. .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)
  1. S X="PSXREF" X ^%ZOSF("TEST") D:$T ^PSXREF K DA G MATCH^PSNDRUG Q
  1. BLD1 ; WHERE TO BEGIN MATCHING
  1. 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."
  1. W !,"Press return to continue with next drug following the one last matched" D UPAR K ANS Q
  1. ING ; INGREDIENTS
  1. R !!,"Display ingredients for this NDF drug? N//",ANS:DTIME S:'$T ANS="^" I ANS["^" S PSNFL=1 Q
  1. I ANS?.E1C.E G ING
  1. I ANS["?" D ING1 G ING
  1. I ANS']""!"nN"[ANS S ANS="N" Q
  1. ; S D0=PSNNDF,Y=$P(^PSNDF(D0,5,PSNFNM,1),"^",1)
  1. D INGRED^PSNOUT
  1. ; I $D(^PSNDF(D0,5,PSNFNM,3)) S Y=$P(^PSNDF(D0,5,PSNFNM,3),"^",1) D INGRED^PSNOUT
  1. ; I $D(^PSNDF(D0,5,PSNFNM,4)) S Y=$P(^PSNDF(D0,5,PSNFNM,4),"^",1) D INGRED^PSNOUT
  1. Q
  1. ING1 W !!,"Displays ingredients (including strengths and units)" D UPAR K ANS Q
  1. RES2 ; MATCH PROMPT
  1. 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"""
  1. W:'$D(Z9) !,"If you want to pass to next drug and leave this drug unverified, press return" D UPAR K ANS Q
  1. CR ; FORCES CONVERSION REMATCH OPTION
  1. I $P(^PS(59.7,1,10),"^",3)=0 W !!,"You must use the Conversion Rematch option first before using this option.",! Q