ECXUPRO ;ALB/TJL-Prosthetic Extract Unusual Cost Report ; 7/1/03 1:00pm ;;3.0;DSS EXTRACTS;**49**;July 1, 2003 ; EN ; entry point N X,Y,DATE,ECRUN,ECXDESC,ECXSAVE,ECXTL,ECTHLD N ECINST,ECSD,ECSD1,ECSTART,ECED,ECEND,ECXERR,QFLG S QFLG=0 S ECINST=$$PDIV^ECXPUTL ; get today's date D NOW^%DTC S DATE=X,Y=$E(%,1,12) D DD^%DT S ECRUN=$P(Y,"@") K %DT D BEGIN Q:QFLG D SELECT Q:QFLG S ECXDESC="Prosthetic Extract Unusual Cost Report" S ECXSAVE("EC*")="" W !!,"This report requires 132-column format." D EN^XUTMDEVQ("PROCESS^ECXUPRO",ECXDESC,.ECXSAVE) I POP W !!,"No device selected...exiting.",! Q I IO'=IO(0) D ^%ZISC D HOME^%ZIS D AUDIT^ECXKILL Q ; BEGIN ; display report description W @IOF W !,"This report prints a listing of unusual costs that would be" W !,"generated by the Prosthetic extract (PRO) as determined by a" W !,"user-defined threshold value. It should be run prior to the" W !,"generation of the actual extract(s) to identify and fix, as" W !,"necessary, any costs determined to be erroneous." W !!,"Unusual costs are those where the Cost of Transaction is" W !,"greater than the threshold value." W !!,"Note: The threshold can be set after a report is selected." W !!,"Run times for this report will vary depending upon the size of" W !,"the extract and could take as long as 30 minutes or more to" W !,"complete. This report has no effect on the actual extracts and" W !,"can be run as needed." W !!,"The report is sorted by Feeder Key, then by descending Cost of" W !,"Transaction and SSN." S DIR(0)="E" W ! D ^DIR K DIR I 'Y S QFLG=1 Q W:$Y!($E(IOST)="C") @IOF,!! Q ; SELECT ; user inputs for threshold cost and date range N DONE,OUT ; allow user to set threshold cost S ECTHLD=500 W !!,"The default threshold cost for the Prosthetic extract is $"_ECTHLD_".00." S DIR(0)="Y",DIR("A")="Would you like to change the threshold?",DIR("B")="NO" D ^DIR K DIR I X["^" S QFLG=1 Q I Y D .W !!,"Cost > threshold" .S DIR(0)="N^0:999999",DIR("A")="Enter the new threshold cost" D ^DIR K DIR S ECTHLD=Y I X["^" S QFLG=1 Q ; get date range from user W !!,"Enter the date range for which you would like to scan the Prosthetic",!,"Extract records.",! S DONE=0 F S (ECED,ECSD)="" D Q:QFLG!DONE .K %DT S %DT="AEX",%DT("A")="Starting with Date: ",%DT(0)=-DATE D ^%DT .I Y<0 S QFLG=1 Q .S ECSD=Y,ECSD1=ECSD-.1 .D DD^%DT S ECSTART=Y .K %DT S %DT="AEX",%DT("A")="Ending with Date: ",%DT(0)=-DATE D ^%DT .I Y<0 S QFLG=1 Q .I YIOSL D HEADER Q:QFLG ...W !,$P(REC,U),?8,$P(REC,U,2),?21,$P(REC,U,3),?39,$P(REC,U,4),?70,$P(REC,U,5),?93,$$RJ^XLFSTR($P(REC,U,6),8),?110,$$RJ^XLFSTR($P(REC,U,7),11) Q:QFLG I COUNT=0 W !!,?8,"No unusual costs to report for this extract" CLOSE ; I $E(IOST)="C",'QFLG D .S SS=22-$Y F JJ=1:1:SS W ! .S DIR(0)="E" W ! D ^DIR K DIR Q ; HEADER ;header and page control N SS,JJ I $E(IOST)="C" D .S SS=22-$Y F JJ=1:1:SS W ! .I PG>0 S DIR(0)="E" W ! D ^DIR K DIR S:'Y QFLG=1 Q:QFLG W:$Y!($E(IOST)="C") @IOF S PG=PG+1 W !,"Prosthetic Extract Unusual Cost Report",?124,"Page: "_PG W !,"Start Date: ",ECSTART,?97,"Report Run Date/Time: "_ECRUN W !," End Date: ",ECEND,?97," Threshold Value: ",ECTHLD W !!,?21,"Date of",?43,"PCE CPT/",?112,"Cost of" W !,"Name",?11,"SSN",?21,"Service",?36,"HCPCS CODE & Modifiers" W ?72,"Feeder Key",?93,"Quantity",?110,"Transaction" W !,LN,! Q ;