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

ABMDLCPT.m

Go to the documentation of this file.
ABMDLCPT ; IHS/SD/SDR - REPORT OF CPT codes ; 
 ;;2.6;IHS Third Party Billing;**1**;NOV 12, 2009
 ;
 S U="^"
SEL K DIR,DIC,DIE,X,Y,DA,DR
 S DIR(0)="PO^81"
 S DIR("A")="START WITH CPT CODE"
 D ^DIR K DIR
 Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
 I X="" S Y=0
 S ABMFROM=+Y
 I ABMFROM'=0 D
 .K DIR,DIC,DIE,X,Y,DA,DR
 .S DIR(0)="PO^81"
 .S DIR("A")="FINISH WITH CPT CODE"
 .D ^DIR K DIR
 .Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
 .S ABMTO=+Y
 I +$G(ABMTO)<1 S ABMTO=$O(^ICPT(9999999999),-1)
 ;
W1 W !!!
 S %ZIS="NQ",%ZIS("B")=""
 D ^%ZIS G:'$D(IO)!$G(POP) XIT
 S ABM("ION")=ION G:$D(IO("Q")) QUE
 I IO'=IO(0),$E(IOST)'="C",'$D(IO("S")),$P($G(^ABMDPARM(DUZ(2),1,0)),U,13)="Y" W !!,"As specified in the 3P Site Parameters File FORCED QUEUEING is in effect!",! G QUE
PRQUE ;EP - Entry Point for Taskman
 S ABM("PG")=0
 S ABM("HD",0)="CPT FILE LISTING"
 I ABMFROM'=0 S ABM("HD",1)="SELECTED RANGE: "_$P($G(^ICPT(ABMFROM,0)),U)_" TO "_$P($G(^ICPT(ABMTO,0)),U)
 D HDB
 D SET
 W !!,$$EN^ABMVDF("HIN"),"E N D   O F   R E P O R T",$$EN^ABMVDF("HIF"),!
XIT ;
 D ^%ZISC
 K ABM
 Q
 ;
QUE K IO("Q")
 S ZTRTN="PRQUE^ABMDLCPT"
 S ZTDESC="REPORT OF CPT CODES"
 F ABM="ABM(" S ZTSAVE(ABM)=""
 D ^%ZTLOAD W:$D(ZTSK) !,"REQUEST QUEUED!",! G XIT
 ;
SET ;
 S:ABMFROM>0 ABMFROM=ABMFROM-.1
 F  S ABMFROM=$O(^ICPT(ABMFROM)) Q:(+ABMFROM=0!(+$G(ABMTO)'=0&(ABMFROM>ABMTO)))  D  Q:$D(DUOUT)!$D(DTOUT)!$D(DIROUT)
 .K ABMZ
 .;.01=CPT CODE
 .;2=SHORT DESC
 .;5=INACTIVE FLAG
 .;9999999.1=coor. dx (CSV)
 .;4=coor. dx (pre-CSV)
 .I $$VERSION^XPDUTL("BCSV")>0 D GETS^DIQ(81,ABMFROM,".01;2;5;81.04*","EZ","ABMZ")
 .I $$VERSION^XPDUTL("BCSV")<1 D GETS^DIQ(81,ABMFROM,".01;2;5;4*","EZ","ABMZ")
 .S ABMIEN=ABMFROM_","
 .W !?2,ABMZ(81,ABMIEN,".01","E")  ;cpt code
 .W ?10,ABMZ(81,ABMIEN,"2","E")  ;short description
 .W ?55,$S($G(ABMZ(81,ABMIEN,"5","E"))=1:"INACTIVE",1:"")  ;inactive flag
 .S ABMCD=""
 .F  S ABMCD=$O(ABMZ(81.04,ABMCD)) Q:ABMCD=""  D
 ..W ?65,$G(ABMZ(81.04,ABMCD,.01,"E"))
 ..I $O(ABMZ(81.04,ABMCD))'="" W !
 .I $Y>(IOSL-5) D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)!$D(DIRUT)  D HDB Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)  W !," (cont)" Q
 Q
HDB ;
 S ABM("PG")=+$G(ABM("PG"))+1
 D WHD^ABMDRHD
 W !,"CPT CODE",?10,"SHORT DESCRIPTION",?55,"INACTIVE FLAG",?65,"COOR. DX"
 Q