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

NURQRPT0.m

Go to the documentation of this file.
NURQRPT0 ;HIRMFO/RM,YH-ROUTINE TO PRINT 10 STEP REPORT ;1/22/97  15:28
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ;
 Q:'$$SURGENVR^NURQUTL1(2,1)
 S (NURQPG,NURQSW)=1,(NURQDT,NUROUT,NURQSURV)=0,NURQBYR=""
 S DIC("A")="Select SURVEY: ",DIC="^NURQ(217,",DIC(0)="AEMQ" D ^DIC K DIC
 G:+Y'>0 QUIT S (NURQ,DA)=+Y W !
 D EN1^NURSAUTL G QUIT:$G(NUROUT)
 D EN1^NURSAGSP G:$G(NUROUT) QUIT S DA=NURQ
DEV ; DEVICE HANDLING
 W ! S %ZIS="Q" D ^%ZIS K %ZIS K:POP IO("Q") G:POP QUIT
 I $D(IO("Q")) K IO("Q") S ZTRTN="START1^NURQRPT0",ZTDESC="Nursing QI Summary Report" D LOOP,^%ZTLOAD G:$D(ZTSK) QUIT
START1 ; Enter here if report is queued.
 U IO S NURQDT=$E(DT,4,5)_"-"_$E(DT,6,7)_"-"_$E(DT,2,3)
 S %=$G(^NURQ(217,DA,0)),NURQSVN=$P(%,"^"),NURQND=$P(%,"^",3),NURQSRVC=$P(%,"^",4),NURQSURV=$$GET1^DIQ(748,NURQSVN,.01)
 S:$D(^NURQ(217,DA,1)) NURQAR=$P($G(^(1)),"^") S NURQRPT=0
 I +NURHOSP D
 .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:"")
 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
 .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:"")
 I $D(NUREQWRD) D EN1^NURQRPT1 S NURQRPT=1
 W:NURQRPT=0 !!!,?5,"NO DATA FOR THIS REPORT",!!
QUIT D CLOSE^NURSUT1,^NURQKILL K NURSZFAC,NURQB,NURQWRD,NURDEM,NURQRPT,NURQI,NURQJ,NURMDSW,NARRAY,NURFAC,NURQTXT,NI,NARY
 Q
HDR ; EOP and Print Header.
 I $E(IOST)="C",'NURQSW W ! D ENDPG^NURSUT1 Q:$G(NUROUT)
 S NURQSITE=$$GET1^DIQ(4,+DUZ(2),.01,"I")
 W:$E(IOST)="C"!(NURQPG>1) @IOF
 W !,NURQSITE,?60,NURQDT,?70," PAGE: "_NURQPG,!,"QI SUMMARY: "_NURQSURV,!,$$REPEAT^XLFSTR("-",80)
 W ! S NURQPG=NURQPG+1,NURQSW=0 S:$Y>(IOSL-7) NURQSW=1
 Q
END W !,$C(7),"NO DATA FOR THIS REPORT" D QUIT
 Q
LOOP F X="NURQPG","NURQSW","NURQDT","NURQSURV","NURQBYR","DA","NURQ","NURHOSP","NURSZAP","NURSZDA","NURSZSP","NWRD","NUROUT","NUREQWRD" S ZTSAVE(X)=""
 Q
FHEADR ;IMPORTANT FUNCTION HEADER
 W !,?21,"STANDARD",?40,"ASSOC.",?51,"STANDARD",?70,"ASSOC.",!,"FUNCTION",?21,"OF CARE",?40,"SERVICE",?51,"OF PRACTICE",?70,"SERVICE",!,$$REPEAT^XLFSTR("-",80)
 Q