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

BARADJR1.m

Go to the documentation of this file.
BARADJR1 ; IHS/SD/LSL - REPORT OF STANDARD ADJUSTMENT REASON CODES
 ;;1.8;IHS ACCOUNTS RECEIVABLE;**23**;OCT 26, 2005
 ;P.OTTIS NEW ROUTINE MAR 2013
 ;P.OTTIS added 'RPMS Code' field
 ;
 ; ********************************************************************
 Q
EN ;
 NEW FILENAME,IO,PATH
 W !!!,"Will create List of Standard claim adjustment reasons"
 W !,"into a comma delimited file. Use Excel to read / print the list.",!
 S FILENAME="STND_CLAIM_ADJ_REASONS_LIST.CSV"
 S DIR(0)="F"
 S DIR("A")="Enter the directory path for the report"
 S PATH=$P($G(^BAR(90052.06,DUZ(2),DUZ(2),0)),U,17)
 S DIR("B")=PATH
 S DIR("?")="For example enter '/usr/mydir/'"
 D ^DIR
 K DIR
 Q:$D(DIRUT)
 K POP
 D OPEN^%ZISH("FILE",PATH,FILENAME,"W")
 Q:$G(POP)
 U IO D MAIN
 D CLOSE^%ZISH("FILE")
 W !!,"Done: List stored in file: ",PATH,"/",FILENAME
 Q
MAIN ;^BARADJ(42,0)="42^Charges exceed our fee schedule or maximum allowable amount^4^21"
 NEW BAR04,BARCRLF,BARD01,BARD02,BARD03,BARD04,BARDAT0,BARHDR,BARIEN,BARIENX,BARPTR2,BARPTR3,BARSEP
 S BARSEP=",",BARCRLF=$C(13,10),Q=$C(34)
 ;S BARHDR="STANDARD ADJUSTMENT CODE,SHORT DESCRIPTION,RPMS ADJUSTMENT CATEGORY,RPMS ADJUSTMENT TYPE" ;OLD CODE
 S BARHDR="STANDARD ADJUSTMENT CODE,SHORT DESCRIPTION,RPMS ADJUSTMENT CATEGORY,RPMS CODE,RPMS ADJUSTMENT TYPE" ;NEW CODE
 W BARHDR,BARCRLF
 S BARIENX="" F  S BARIENX=$O(^BARADJ("B",BARIENX)) Q:BARIENX=""  S BARIEN=$O(^BARADJ("B",BARIENX,"")) D 2
 Q
2 D  ;S BARIEN=0 F  S BARIEN=$O(^BARADJ(BARIEN)) Q:BARIEN=""  D
 . S BARDAT0=$G(^BARADJ(BARIEN,0)) I BARDAT0="" Q
 . S BAR04=$G(^BARADJ(BARIEN,1))
 . S BARD01=$P(BARDAT0,"^",1)
 . S BARD02=$P(BARDAT0,"^",2)
 . S BARPTR2=$P(BARDAT0,"^",3) ;BAR(90052.01
 . S BARPTR3=$P(BARDAT0,"^",4) ;BAR(90052.02
 . S BARD03=$P($G(^BAR(90052.01,BARPTR2,0)),"^")
 . S BARD04=$P($G(^BARTBL(BARPTR3,0)),"^")
 . ;W Q,BARD01,Q,BARSEP,Q,BARD02,Q,BARSEP,Q,BARD03,Q,BARSEP,Q,BARD04,Q,BARCRLF ;OLD CODE
 . W Q,BARD01,Q,BARSEP,Q,BARD02,Q,BARSEP,Q,BARD03,Q,BARSEP,Q,BARPTR3,Q,BARSEP,Q,BARD04,Q,BARCRLF
 Q