source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGODNP2.m@ 1076

Last change on this file since 1076 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.7 KB
RevLine 
[613]1DGODNP2 ;ALB/EG - OUTPUT TOT DISCH BY MEANS TST/ELIGIBILITY; JAN 9 1989 @ 1507
2 ;;5.3;Registration;;Aug 13, 1993
3 ;;V 4.5
4 S U="^",ZRT=0,%DT="T",X="N" D ^%DT S (DGGE,T2)=Y X ^DD("DD") S T2=Y
5 S I5("V")="SC 50-100%^A&A/HB/WW1/POW/MEX^SC<50%^NSC/PEN^NSC^DOM^",I5("N")="CHAMPVA^COLLATERAL^EMPLOYEE^OTHER FED^ALLIED VET^HUMANITARIAN^SHARING^REIMB INSURANCE^"
6 D ET^DGODUTL F K=1:1:A2 S DGDV=$P(A(K),U,2),DGDVN=$P(A(K),U,1),^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"HOSP")=$S($D(Z(DGDV))>0:Z(DGDV),1:0) Q:ZRT[U D PRI
7 D ^DGODNSM W !,"Elapsed time for this run: ",DGTOUT,!
8END K DGBD,DGDV,DGDVN,DGEL,DGG,DGND,DGTOUT,DGV,I,I2,I3,I5,L,T2,X,Y,Z,ZRT,ZRT1
9 Q
10HDR U IO W @IOF,!,?1,"INPATIENT DISCHARGES REPORT",?IOM-20,T2 S $P(L,"-",IOM-1)="" W !,L,!
11 W !,?1,"DATE RANGE: FROM " S Y=DGBD X ^DD("DD") W Y," TO " S Y=DGND X ^DD("DD") W Y,!
12 W !,?(IOM-26\2),"MEANS TEST CLASSIFICATION",! Q
13PRI Q:ZRT[U Q:$D(^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV))=0
14 Q:^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)=0
15 D HDR W !,?1,"FACILITY: ",DGDV,?20,DGDVN,?40,"TOTAL DISCHARGES: ",?50,^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)
16 W:$D(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"HOSP"))>0 ?65,"Patients remaining on "_T2_" : ",^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"HOSP"),!
17 W !,?30,"AS",?40,"AN",?50,"B0",?60,"C0",?70,"N0",?80,"X0",?90,"U0",?100,"TOTAL",?110,"%",!
18 F I=30:10:110 W ?I,"------"
19 F DGV="V","N" W !,?1,$S(DGV="V":"VETERAN ELIGIBILITY",DGV="N":"NON-VETERAN ELIGIBILITY",1:0),!,?1,"-----------------------",! F DGEL=1:1:8,"*" D PRI1
20 S:$D(Z(DGDV))=0 Z(DGDV)=0 D:^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)>0 TOTI^DGODTOT S ^UTILITY("DGOD",$J,DGJB,DGTN,DGDV)=$C(35)_U_DGGE_U_DGDV_U_DGJB_U_DGBD_U_DGND_U_Z(DGDV)_U_DGTOUT Q
21PRI1 ;print each row
22 Q:ZRT[U S ZRT1="Hit RETURN to continue" I (IOST["C-")&(IO=IO(0))&(IOSL-$Y<4) W !,?IOM-$L(ZRT1)-2,ZRT1 R ZRT:DTIME S:'$T ZRT=U D:$D(ZRT) HDR
23 W:'((DGV="V")&(DGEL>6)) !,?1,$P(I5(DGV),U,DGEL)
24 W:DGEL="*" ?1,"ERROR"
25 W:'((DGV="V")&(DGEL>6)) ?30,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"AS",DGEL),?40,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"AN",DGEL),?50,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"B",DGEL),?60,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"C",DGEL)
26 W:'((DGV="V")&(DGEL>6)) ?70,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"N",DGEL),?80,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"X",DGEL),?90,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"U",DGEL)
27 W:'((DGV="V")&(DGEL>6)) ?100,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT",DGEL),?110,"("_$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT",DGEL)/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2)_")",!
28 D:DGEL="*" TOT1
29 Q
30 ;
31TOT1 ;column subtotal
32 Q:ZRT[U F I=30:10:110 W ?I,"------"
33 W !,?1,"SUBTOTAL",?30,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","AS"),?40,^("AN"),?50,^("B"),?60,^("C"),?70,^("N"),?80,^("X"),?90,^("U")
34 W ?100,^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"TOT",DGV),?110,"("_$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"TOT",DGV)/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2)_")"
35 W !,?1,"SUBTOTAL %",?30,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","AS")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2),?40,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","AN")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2)
36 W ?50,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","B")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2),?60,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","C")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2)
37 W ?70,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","N")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2),?80,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","X")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2)
38 W ?90,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,DGV,"TOT","U")/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2)
39 W ?100,$J(^UTILITY("DGOD",$J,DGJB,DGTN,DGDV,"TOT",DGV)/^UTILITY("DGOD",$J,DGJB,DGTN,"TOT",DGDV)*100,2,2),!
40 Q
41 ;
Note: See TracBrowser for help on using the repository browser.