source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURQRPT0.m@ 789

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1NURQRPT0 ;HIRMFO/RM,YH-ROUTINE TO PRINT 10 STEP REPORT ;1/22/97 15:28
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3EN1 ;
4 Q:'$$SURGENVR^NURQUTL1(2,1)
5 S (NURQPG,NURQSW)=1,(NURQDT,NUROUT,NURQSURV)=0,NURQBYR=""
6 S DIC("A")="Select SURVEY: ",DIC="^NURQ(217,",DIC(0)="AEMQ" D ^DIC K DIC
7 G:+Y'>0 QUIT S (NURQ,DA)=+Y W !
8 D EN1^NURSAUTL G QUIT:$G(NUROUT)
9 D EN1^NURSAGSP G:$G(NUROUT) QUIT S DA=NURQ
10DEV ; DEVICE HANDLING
11 W ! S %ZIS="Q" D ^%ZIS K %ZIS K:POP IO("Q") G:POP QUIT
12 I $D(IO("Q")) K IO("Q") S ZTRTN="START1^NURQRPT0",ZTDESC="Nursing QI Summary Report" D LOOP,^%ZTLOAD G:$D(ZTSK) QUIT
13START1 ; Enter here if report is queued.
14 U IO S NURQDT=$E(DT,4,5)_"-"_$E(DT,6,7)_"-"_$E(DT,2,3)
15 S %=$G(^NURQ(217,DA,0)),NURQSVN=$P(%,"^"),NURQND=$P(%,"^",3),NURQSRVC=$P(%,"^",4),NURQSURV=$$GET1^DIQ(748,NURQSVN,.01)
16 S:$D(^NURQ(217,DA,1)) NURQAR=$P($G(^(1)),"^") S NURQRPT=0
17 I +NURHOSP D
18 .F D1=0:0 S D1=$O(^NURQ(217,DA,2,D1)) Q:D1'>0!$G(NUROUT) I $D(^NURQ(217,DA,2,D1,0)) S NUREQWRD(D1)=$P(^(0),"^"),NUREQWRD(D1)=NUREQWRD(D1)_"^"_$S($D(^SC(+NUREQWRD(D1),0)):$P($P($G(^(0)),"^"),"NUR ",2),1:"")
19 I 'NURHOSP F D1=0:0 S D1=$O(^NURQ(217,DA,2,D1)) Q:D1'>0!$G(NUROUT) S NURSY=+$G(^NURQ(217,DA,2,D1,0)) S NURSX=$P($P($G(^SC(+NURSY,0)),"^"),"NUR ",2) I $G(NURSX)'="",$D(NURSNLOC(NURSX)) D
20 .S NUREQWRD(D1)=$P(^NURQ(217,DA,2,D1,0),"^"),NUREQWRD(D1)=NUREQWRD(D1)_"^"_$S($D(^SC(+NUREQWRD(D1),0)):$P($P($G(^(0)),"^"),"NUR ",2),1:"")
21 I $D(NUREQWRD) D EN1^NURQRPT1 S NURQRPT=1
22 W:NURQRPT=0 !!!,?5,"NO DATA FOR THIS REPORT",!!
23QUIT D CLOSE^NURSUT1,^NURQKILL K NURSZFAC,NURQB,NURQWRD,NURDEM,NURQRPT,NURQI,NURQJ,NURMDSW,NARRAY,NURFAC,NURQTXT,NI,NARY
24 Q
25HDR ; EOP and Print Header.
26 I $E(IOST)="C",'NURQSW W ! D ENDPG^NURSUT1 Q:$G(NUROUT)
27 S NURQSITE=$$GET1^DIQ(4,+DUZ(2),.01,"I")
28 W:$E(IOST)="C"!(NURQPG>1) @IOF
29 W !,NURQSITE,?60,NURQDT,?70," PAGE: "_NURQPG,!,"QI SUMMARY: "_NURQSURV,!,$$REPEAT^XLFSTR("-",80)
30 W ! S NURQPG=NURQPG+1,NURQSW=0 S:$Y>(IOSL-7) NURQSW=1
31 Q
32END W !,$C(7),"NO DATA FOR THIS REPORT" D QUIT
33 Q
34LOOP F X="NURQPG","NURQSW","NURQDT","NURQSURV","NURQBYR","DA","NURQ","NURHOSP","NURSZAP","NURSZDA","NURSZSP","NWRD","NUROUT","NUREQWRD" S ZTSAVE(X)=""
35 Q
36FHEADR ;IMPORTANT FUNCTION HEADER
37 W !,?21,"STANDARD",?40,"ASSOC.",?51,"STANDARD",?70,"ASSOC.",!,"FUNCTION",?21,"OF CARE",?40,"SERVICE",?51,"OF PRACTICE",?70,"SERVICE",!,$$REPEAT^XLFSTR("-",80)
38 Q
Note: See TracBrowser for help on using the repository browser.