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

AZP3UTL.m

Go to the documentation of this file.
AZP3UTL ;UTILITY PROGRAM [ 01/31/91  1:32 PM ]
 ;FCJ 09/10/90
VAR S FACPT=DUZ(2),(RXTOT,ND,PFAC)=0,(ANS,ODT,BDT,EDT)="",U="^"
 S Y=DT X ^DD("DD") S DATE=Y
 S:RX="Y" %ZIS("A")="Enter the device to print Pharmacy data: "
 S:RX="N" %ZIS("A")="Enter the device to print HCFA 1500 forms: "
 D ^%ZIS
A U IO(0) W @IOF,!
 R:RX="Y" "Do you want to print an individual Pharmacy claims? (Y or N) ",ANS:100
 R:RX="N" "Do you want to print an individual HCFA 1500? (Y or N) ",ANS:100
 I (ANS="^")!(ANS="") S RX="" G EXIT
 G:ANS="Y" A1 G:ANS="N" A2 G A
A1 R !!,"Enter the document # you wish to print.  ",BDOC I BDOC="?" D LIST G A1
 I (BDOC="^")!(BDOC="") S RX="" G EXIT 
 I '$D(^AZPPI(1,"B",BDOC)) W !,"INVAILID DOCUMENT NUMBER" G A1
 S EDOC=$E(BDOC,5,8),ETSTDOC=$E(BDOC,1,2)_EDOC Q
A2 R !,"Enter the beginning document number. ",BDOC I BDOC="?" D LIST G A2
 I (BDOC="^")!(BDOC="") S RX="" G EXIT
 I '$D(^AZPPI(1,"B",BDOC)) W !,"INVAILID DOCUMENT NUMBER" G A2
A3 R !,"Enter the ending document number. ",EDOC I EDOC="?" D LIST G A3
 I (EDOC="^")!(EDOC="") S RX="" G EXIT
 I '$D(^AZPPI(1,"B",EDOC)) W !,"INVAILID DOCUMENT NUMBER" G A3
 I $E(EDOC,3,4)'=$E(BDOC,3,4) W !,"YOU MUST PRINT BEGINNING AND ENDING DOCUMENTS FROM THE SAME FACILITY. " G A2
 S ETSTDOC=$E(EDOC,1,2)_$E(EDOC,5,8)
EXIT K DCL,DCL1,PAT Q
LIST R !!,"You may enter a document number to begin the list from",!,"or list will begin from first document.  ex. 90YH0001 : ",DCL  S:DCL="" DCL=0 Q:DCL="^"
 I DCL'=0 S DCL1=10000+$E(DCL,5,8)-1,DCL=$E(DCL,1,4)_$E(DCL1,2,5)
 F  S DCL=$O(^AZPPI(1,"B",DCL)) Q:DCL=""  D
 .S DCL1=0,PAT=0 F  S DCL1=$O(^AZPPI(1,"B",DCL,DCL1)) Q:DCL1=""  S PAT=$P(^AZPPI(1,DCL1,0),U,2),PAT=$P(^DPT(PAT,0),U) W !?5,DCL,"  ",PAT
 Q
KLL ;
 K ETSTDOC,BTSTDOC,ARID,AUTH,DATA3,DATA4,DATAF,DATAF1,DOB,EMG,FAC,INSP,L1,LAB,LABC,LEND,PHY,PHY,PT,RLS,SEX,SSN,SX,TB
KLL2 X ^%ZIS("C")
 K BDOC,EDOC,%H,%I,DATE,BDT,CTY,DATA2,DOCNO,EDT,FACPT,HRN,NM,ODT,PFAC,POP,ST,STR,ZIP
KLL3 K ID,%,X,Y,INS,AUPNDAYS,AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,C,DISYS,D0,D1,D2,DFN,DI,DOC1,DQ,DRGUNT,L,ND3,NDC,PDRG,PHAR,CYR,ANS,ND,ND1,ND2,DOC,DA,DIE,DR,DIC,DIC(0),DIC("A")
 K UNTS,TOTCPT,%X,%Y,BELG,EELG,INSC,PINS,SINS,DATA,DATA1,PDOS,PCPT,DOS,TOS,POS,TOT,RX,RXDSP,RXTOT,RXDT,PRX,PRX1,RXDATA,RXCST,CST,RXQTY,CRGUNT,DRGCST,ICD,PICD
 Q