ACKQFILP ;BIR/PTD - Print A&SP File Entries ;30 Jan 2013 3:28 PM
;;3.0;QUASAR;**21**;Feb 11, 2000;Build 40
;
OPTN ; Introduce option.
W @IOF,!,"This option can be used to list entries from the CDR ACCOUNT file, the",!,"A&SP PROCEDURE CODE file, or the A&SP DIAGNOSTIC CONDITION file."
FILE ; Display files user can print from and allow selection.
W ! K DIR,X,Y S DIR(0)="NAO^1:3"
S DIR("A",1)="Select number for the file from which you wish to print."
S DIR("A",2)=""
S DIR("A",3)="1. CDR ACCOUNT file (#509850)"
S DIR("A",4)="2. A&SP DIAGNOSTIC CONDITION file (#509850.1)"
S DIR("A",5)="3. A&SP PROCEDURE CODE file (#509850.4)"
S DIR("A",6)=""
S DIR("A")="Enter a number 1 thru 3: "
S DIR("?")="Select a number from 1 thru 3 or press <Return> to exit."
S DIR("??")="^D PRINT^ACKQHLP1" D ^DIR K DIR I $D(DIRUT)!(Y="") G EXIT
S ACKANS=+Y,ACKFNUM=509850_$S(ACKANS=3:".4",ACKANS=2:".1",1:"")
DIP ; Set up appropriate fields for file.
I ACKFNUM=509850.1 D G EXIT
. W !!,"The right margin for this report is 80.",!,"You can queue it to run at a later time.",!
. I '$D(ZTQUEUED) D ZIS W !
. S DIC=ACKFNUM,L=0,(FR,TO)="",BY="[ACKQ DIAG COND ICD-9]"
. S FLDS="[ACKQ DIAG COND 9]"
. W @IOF S IOP=IO D EN1^DIP
. S DIC=ACKFNUM,L=0,(FR,TO)="",BY="[ACKQ DIAG COND ICD-10]"
. S FLDS="[ACKQ DIAG COND 10]"
. S IOP=IO D EN1^DIP
. Q
S DIC=ACKFNUM,L=0,(FR,TO)="",BY=$S(ACKFNUM=509850.1:"[ACKQ DIAG COND ICD-9]",1:".01")
I ACKANS=1 S FLDS=".01,1,4"
;I ACKANS=2 S FLDS="[ACKQ DIAG COND 9]"
;I ACKANS=2 S FLDS=".01,.01:3;""DIAGNOSIS"",.06;C50,1;C12,.01;""MODIFIER"",.02;C17"
I ACKANS=3 S FLDS=".01,.01:2;""PROCEDURE"",.06;C50,.04;C65,1;C12,.01;""MODIFIER (*Not CPT Modifier*)"",.02;C17,.03;C50"
W !!,"The right margin for this report is 80.",!,"You can queue it to run at a later time.",!
D EN1^DIP
;
EXIT ; Kill variables and exit routine.
K %,ACKANS,ACKFNUM,BY,DIC,FLDS,FR,DIR,DIRUT,DTOUT,DUOUT,L,TO,X,Y
Q
ZIS W ! K IOP,IO("Q") S POP=0,%ZIS="QMP"
D ^%ZIS K %ZIS,IOP Q:POP
I $D(IO("Q")) S ZTDESC="A&SP DIAGNOSIS",ZTRTN="DIP^ACKQFILP",ZTSAVE("ACK*")="" S POP=1 G CLOSE
CLOSE Q:$D(ZTQUEUED) N POP D ^%ZISC
K ZTDESC,ZTRTN,ZTSAVE,ZTQUEUED,POP
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HACKQFILP 2208 printed Dec 13, 2024@02:32:14 Page 2
ACKQFILP ;BIR/PTD - Print A&SP File Entries ;30 Jan 2013 3:28 PM
+1 ;;3.0;QUASAR;**21**;Feb 11, 2000;Build 40
+2 ;
OPTN ; Introduce option.
+1 WRITE @IOF,!,"This option can be used to list entries from the CDR ACCOUNT file, the",!,"A&SP PROCEDURE CODE file, or the A&SP DIAGNOSTIC CONDITION file."
FILE ; Display files user can print from and allow selection.
+1 WRITE !
KILL DIR,X,Y
SET DIR(0)="NAO^1:3"
+2 SET DIR("A",1)="Select number for the file from which you wish to print."
+3 SET DIR("A",2)=""
+4 SET DIR("A",3)="1. CDR ACCOUNT file (#509850)"
+5 SET DIR("A",4)="2. A&SP DIAGNOSTIC CONDITION file (#509850.1)"
+6 SET DIR("A",5)="3. A&SP PROCEDURE CODE file (#509850.4)"
+7 SET DIR("A",6)=""
+8 SET DIR("A")="Enter a number 1 thru 3: "
+9 SET DIR("?")="Select a number from 1 thru 3 or press <Return> to exit."
+10 SET DIR("??")="^D PRINT^ACKQHLP1"
DO ^DIR
KILL DIR
IF $DATA(DIRUT)!(Y="")
GOTO EXIT
+11 SET ACKANS=+Y
SET ACKFNUM=509850_$SELECT(ACKANS=3:".4",ACKANS=2:".1",1:"")
DIP ; Set up appropriate fields for file.
+1 IF ACKFNUM=509850.1
Begin DoDot:1
+2 WRITE !!,"The right margin for this report is 80.",!,"You can queue it to run at a later time.",!
+3 IF '$DATA(ZTQUEUED)
DO ZIS
WRITE !
+4 SET DIC=ACKFNUM
SET L=0
SET (FR,TO)=""
SET BY="[ACKQ DIAG COND ICD-9]"
+5 SET FLDS="[ACKQ DIAG COND 9]"
+6 WRITE @IOF
SET IOP=IO
DO EN1^DIP
+7 SET DIC=ACKFNUM
SET L=0
SET (FR,TO)=""
SET BY="[ACKQ DIAG COND ICD-10]"
+8 SET FLDS="[ACKQ DIAG COND 10]"
+9 SET IOP=IO
DO EN1^DIP
+10 QUIT
End DoDot:1
GOTO EXIT
+11 SET DIC=ACKFNUM
SET L=0
SET (FR,TO)=""
SET BY=$SELECT(ACKFNUM=509850.1:"[ACKQ DIAG COND ICD-9]",1:".01")
+12 IF ACKANS=1
SET FLDS=".01,1,4"
+13 ;I ACKANS=2 S FLDS="[ACKQ DIAG COND 9]"
+14 ;I ACKANS=2 S FLDS=".01,.01:3;""DIAGNOSIS"",.06;C50,1;C12,.01;""MODIFIER"",.02;C17"
+15 IF ACKANS=3
SET FLDS=".01,.01:2;""PROCEDURE"",.06;C50,.04;C65,1;C12,.01;""MODIFIER (*Not CPT Modifier*)"",.02;C17,.03;C50"
+16 WRITE !!,"The right margin for this report is 80.",!,"You can queue it to run at a later time.",!
+17 DO EN1^DIP
+18 ;
EXIT ; Kill variables and exit routine.
+1 KILL %,ACKANS,ACKFNUM,BY,DIC,FLDS,FR,DIR,DIRUT,DTOUT,DUOUT,L,TO,X,Y
+2 QUIT
ZIS WRITE !
KILL IOP,IO("Q")
SET POP=0
SET %ZIS="QMP"
+1 DO ^%ZIS
KILL %ZIS,IOP
if POP
QUIT
+2 IF $DATA(IO("Q"))
SET ZTDESC="A&SP DIAGNOSIS"
SET ZTRTN="DIP^ACKQFILP"
SET ZTSAVE("ACK*")=""
SET POP=1
GOTO CLOSE
CLOSE if $DATA(ZTQUEUED)
QUIT
NEW POP
DO ^%ZISC
+1 KILL ZTDESC,ZTRTN,ZTSAVE,ZTQUEUED,POP