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

ACHSRP1.m

Go to the documentation of this file.
ACHSRP1 ; IHS/ITSC/PMF - PRINT CHS FORMS - LOAD FORMS, TEST, PRINT ;   [ 01/31/2005  9:45 AM ]
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**7,11,12,16**;JUN 11, 2001
 ;;ITSC/SET/JVK 11-3-03 ADD VARS FOR TEST PRINT
 ;;3.1*11 9.16.04 IHS/ITSC/FCJ ADDED TEST FOR E-SIG
 ;;3.1*12 12.15.04 IHS/ITSC/JVK DON'T TEST SPEC. LOCAL OBLG.
 ;ACHS*3.1*16 10.26.09 IHS.OIT.FCJ MOD FOR DULCE
 ;
 ;THIS RTN ENTERED FROM ACHSRP
 ;
 S DTIME=1200
A1 ;
 ;CHECK 'USE UNIVERSAL PO FOR 43 & 64' PARAMETER
 I $$PARM^ACHS(2,16)="Y" G A2
 W !!,"Please Load The ",ACHSACF," Forms In The Printer.",!!,"Press 'RETURN' When Ready: "
 D READ^ACHSFU
 Q:$D(DTOUT)!$D(DUOUT)
 I Y?1"?".E W *7,"  ??" G A1
 S DTIME=$$DTIME^XUP(DUZ)   ; RESET DTIME TO FILEMAN SETTING
 ;
A2 ;EP
 ;
 S Y=$$DIR^XBDIR("Y","Test Alignment ","YES","","","",2)
 G END:$D(DTOUT)!$D(DUOUT)
 S X=$T(@"FORMAT"+ACHSTYPV)
 S ACHSTOPM=$P(X,";;",2)
 S ACHSTAB=$S($P(^AUTTLOC(DUZ(2),0),U,10)=202810:5,1:$P(X,";;",3))   ;ACHS*3.1*16 10.26.2009 IHS.OIT.FCJ ADDED FMT TST FOR DULCE
 ;S ACHSTAB=$P(X,";;",3)
 S ACHSFML=$P(X,";;",6)
 ;
 I Y D TESTPRT G A2
 ;
 ;INITIAL PRINT OR REPRINT?
 D @$S('$D(ACHSRPNT):"INITPRT",1:"REPRT")
 Q
TESTPRT ;EP
 ;
 U IO
 X:$D(IO("S")) ACHSPPO
 D TESTVARS             ;SET TEST VARIABLES
 ;AGAIN CHECK 'USE UNIVERSAL PO FOR 43 & 64' PARAMETER
 I $$PARM^ACHS(2,16)="Y" D TESTPRNT^ACHSRPU I 1
 E  D TESTPRNT^ACHSRP3:'(ACHSTYPV=2),TESTPRNT^ACHSRP3D:(ACHSTYPV=2)
 ;
 K A,B,C,D,E,F,ACHSTPRT,ACHSSIG,ACHSDEST,ACHSTYPE,ACHSORDN,ACHSESDA,ACHSSF,T
 U IO(0)
 X:$D(IO("S")) ACHSPPC
 Q
 ;
 ;TPF MY NOTE I COULD NOT FIND DUZ(2) BEING CHANGED ??????
 ; NOTE:  In the B1 and C1 sub-routines, the value of DUZ(2)
 ;        is changed.  The variable ACHSDUZ2 is used to ensure
 ;        the correct value of DUZ(2) is kept.  This is
 ;        accomplished in the 'ACTION' part of the 'Document
 ;        Print' and 'Document Re-Print' menu options.
 ;
 Q
 ;
 ;LOOP FOR INITIAL PRINT
INITPRT ;EP
 ;
 W !!,"Please Stand-By...."
 U IO
 ;************LOOP FOR INITIAL PRINT*************
 K X
 S ACHSDIEN=""
 F  S ACHSDIEN=$O(^ACHSF("PQ",DUZ(2),ACHSTYPV,ACHSDIEN)) Q:+ACHSDIEN=0  D  Q:$G(Y)="X"
 .S ACHSTIEN=""
 .F  S ACHSTIEN=$O(^ACHSF("PQ",DUZ(2),ACHSTYPV,ACHSDIEN,ACHSTIEN)) Q:+ACHSTIEN=0  D  Q:$G(Y)="X"
 ..;ACHS*3.1*11 9.16.04 IHS/ITSC/FCJ ADDED NXT SECTION FOR ESIG TEST
 ..I $D(ACHSEFL) D  I ACHSEFLG S $P(ACHSEFL,U,3)=$P(ACHSEFL,U,3)+1 Q
 ...S ACHSEFLG=0
 ...;ITSC/SET/JVK ACHS*3.1*12 ADD LINE BELOW TO OMIT SPEC. LOCAL OBLG.
 ...Q:$P(^ACHSF(DUZ(2),"D",ACHSDIEN,0),U,3)=2
 ...Q:$P(^ACHSF(DUZ(2),"D",ACHSDIEN,0),U,12)>1
 ...;ITSC/SET/JVK ACHS*3.1*12 ADD LINE ABOVE IF NOT OPEN OR SUPPLEMENT
 ...Q:$P(^ACHSF(DUZ(2),"D",ACHSDIEN,0),U,2)<$P(ACHSEFL,U,2)
 ...I $P(^ACHSF(DUZ(2),"D",ACHSDIEN,0),U,28)'?1N.N S ACHSEFLG=1 Q
 ...I $P(ACHSEFL,U)=1,$P(^ACHSF(DUZ(2),"D",ACHSDIEN,0),U,30)'?1N.N S ACHSEFLG=1
 ..;ACHS*3.1*11 9.16.04 IHS/ITSC/FCJ END OF CHANGES
 ..U IO
 ..X:$D(IO("S")) ACHSPPO     ;SLAVE PRINTER OPEN
 ..;D INIT^ACHSRP2           ;DONE IN ACHSRP2
 ..;D SB1                     ;GET FACILITY INFO AND FINANCE CODE
 ..D ^ACHSRP2                ;
 ..U IO(0)
 ..X:$D(IO("S")) ACHSPPC      ;SLAVE PRINTER CLOSED
 ..R *X:2
 ..I X=27 D PTRSTOP  ;IF USER HITS ESCAPE, CONFIRM STOP PRINTING
 ..;
 D END
 Q
 ;
 ;CLOSE OUT
END ;EP
 U IO(0)
 X:$D(IO("S")) ACHSPPC   ;SLAVE PRINTER CLOSED
 W "   Done.",!!
 ;
 K ACHSFML             ;??
 S DTIME=$$DTIME^XUP(DUZ) ;RESET DTIME TO NORMAL SETTING
 Q
 ;
SB1 ;EP
 ;GET FACILITY INFO
 K B
 D FAC^ACHSUDF   ; GET MAILING ADDRESS AND PLACE IN B ARRAY
 D FC^ACHSUF     ; GET FINANCE CODE
 Q
 ;
 ;LOOP FOR REPRINT
REPRT ;EP
 S ACHSDIEN=""
 F  S ACHSDIEN=$O(^TMP("ACHSRR",$J,DUZ(2),ACHSTYPV,ACHSDIEN)) Q:ACHSDIEN=""  D  Q:$G(Y)="X"
 .S ACHSTIEN=""
 .F  S ACHSTIEN=$O(^TMP("ACHSRR",$J,DUZ(2),ACHSTYPV,ACHSDIEN,ACHSTIEN)) Q:ACHSTIEN=""  D  Q:$G(Y)="X"
 ..U IO
 ..X:$D(IO("S")) ACHSPPO
 ..D SB1,^ACHSRP2
 ..U IO(0)
 ..X:$D(IO("S")) ACHSPPC
 ..R *X:2
 ..I X=27 D PTRSTOP
 D END
 Q
 ;
FORMAT ;;SKIP LINES;;L MARGIN;;TEST WIDTH;;TEST LENGTH;;FORM LENGTH
43 ;;2;;3;;40;;9;;66
57 ;;6;;3;;36;;7;;66
64 ;;2;;3;;40;;10;;66
 ;
 Q
 ;
 ;CONFIRM USER WANTS TO END PRINTING
PTRSTOP ;EP
 U IO(0)
 X:$D(IO("S")) ACHSPPC
 W *7,*7,*7
 F  R X:0 Q:'$T
 U IO(0)
 X:$D(IO("S")) ACHSPPC
 W !!,"Enter <RETURN> to Continue <X & RETURN> to Cancel  "
 D READ^ACHSFU
 Q
 ;
 ;
 ;SET UP TEST VARIABLES FOR TEST ALIGNMENT
TESTVARS ;EP
 ;ITSC/SET/JVK 10/21/2004
 S:'$D(ACHSMPP) ACHSMPP=""
 S A(1)="Fac: 999999  IHS#: 999999      SSN999SSN",A(2)="PATIENT,NAME",A(3)="PATIENT ADRS 1",A(4)="99-99-99  X  999",A(5)="999-99-99",A(6)="Est. date-of-svc.: XXX 99, 99",A(7)="Description of srvcs"
 S A(10)="Desc: xxxxxxxxxxxxx",A(11)="999999999"
 S B(1)="ORDERING OFFICE",(B(2),D(1),D(2))="STREET ADDRESS",(B(3),D(3))="CITY, ST  ZIP",B(4)="999999"
 S C(4)="XXX 99, 99  XXX 99, 99",D(1)="PROVIDER",D(4)="9999999999-A1",D(5)="XX",D(6)="CDE PFX-NUMB",D(7)="VT",D(14)=3
 S E(7)="99-99-99",E(8)="OPTNL",E(9)="$000.00",F(6)="99999-ZZ",F(7)="J123456",F(9)="99.9Z",D(10)=13
 ;
 ;ITSC/SET/JVK 12/21/04 ACHS*3.1*12
 S ACHSACFY=9999,ACHSDHHS="HHSI999X9999999"
 S ACHSDCR=999,ACHSORDN="9-X99-99999",ACHSDEST="F",ACHSSIG="ORDERING OFFICIAL",ACHSTYPE="",ACHSSF="99",ACHSESDA=9,T=0
 S ACHSTPRT=""
 ;ITSC/SET/JVK 11/3/03 SETUP TEST VARS FOR E-SIG
 S ACHSESIG="SIGNATURE,OFFICIAL",ACHSEDTE="XX/XX/XXXX"
 S ACHSASIG="SIGNATURE,OFFICIAL",ACHSADTE="XX/XX/XXXX"
 Q
 ;