NURQUTL2 ;HIRMFO/YH-SURVEY STATISTICS PART 2 ;3/11/96
;;4.0;NURSING SERVICE;;Apr 25, 1997
LIKRTLAB ;print Likert labels and gradient
S NLFTLBL=$G(^TMP("NURQ3",$J,748.26,NURNUM_","_NURQSVN_",",1)),NRGTLBL=$G(^(2)),NLDIRCT=$G(^(3)) S NLDIRCT=$S(NLDIRCT="ASCENDING":"a",NLDIRCT="DECENDING":"d",1:"") S:NLDIRCT="" NLDIRCT="a" ;default
S:NLDIRCT="a" NLDIRCT="F Y=1:1:NGRDIENT" S:NLDIRCT="d" NLDIRCT="F Y=NGRDIENT:-1:1" S NLDIRCT=NLDIRCT_" S X=X_Y_"" "",NANS(Y)="""""
S:NLFTLBL="" NLFTLBL="Poor" S:NRGTLBL="" NRGTLBL="Excellent" ;default
S X="("_NLFTLBL_") " X NLDIRCT
S X=X_"("_NRGTLBL_")"
W ?(IOM-($L(X))\2),X,!
K NLDIRCT,X,Y Q
;
WP ;WP responses
F NPART1=0:0 S NPART1=$O(^TMP($J,"QAPZ",NPART1)) Q:NPART1=""!($D(DIRUT))!$G(NUROUT) K NARRAY D GETS^DIQ(748.31,NURQUES1_","_NPART1_",","2","","NARRAY") W:$O(NARRAY(748.31,NURQUES1_","_NPART1_",",2,0))]"" ?3,"----------",! DO
.F NQZ=0:0 S NQZ=$O(NARRAY(748.31,NURQUES1_","_NPART1_",",2,NQZ)) Q:NQZ=""!$G(NUROUT) S NQY=$G(NARRAY(748.31,NURQUES1_","_NPART1_",",2,NQZ)) D:($Y>(IOSL-7)) HDR^NURQRPT0 Q:$G(NUROUT) W ?3,NQY,!
W ?3,"----------" Q
NURQUTL2 ;HIRMFO/YH-SURVEY STATISTICS PART 2 ;3/11/96
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
LIKRTLAB ;print Likert labels and gradient
+1 ;default
SET NLFTLBL=$GET(^TMP("NURQ3",$JOB,748.26,NURNUM_","_NURQSVN_",",1))
SET NRGTLBL=$GET(^(2))
SET NLDIRCT=$GET(^(3))
SET NLDIRCT=$SELECT(NLDIRCT="ASCENDING":"a",NLDIRCT="DECENDING":"d",1:"")
IF NLDIRCT=""
SET NLDIRCT="a"
+2 IF NLDIRCT="a"
SET NLDIRCT="F Y=1:1:NGRDIENT"
IF NLDIRCT="d"
SET NLDIRCT="F Y=NGRDIENT:-1:1"
SET NLDIRCT=NLDIRCT_" S X=X_Y_"" "",NANS(Y)="""""
+3 ;default
IF NLFTLBL=""
SET NLFTLBL="Poor"
IF NRGTLBL=""
SET NRGTLBL="Excellent"
+4 SET X="("_NLFTLBL_") "
XECUTE NLDIRCT
+5 SET X=X_"("_NRGTLBL_")"
+6 WRITE ?(IOM-($LENGTH(X))\2),X,!
+7 KILL NLDIRCT,X,Y
QUIT
+8 ;
WP ;WP responses
+1 FOR NPART1=0:0
SET NPART1=$ORDER(^TMP($JOB,"QAPZ",NPART1))
IF NPART1=""!($DATA(DIRUT))!$GET(NUROUT)
QUIT
KILL NARRAY
DO GETS^DIQ(748.31,NURQUES1_","_NPART1_",","2","","NARRAY")
IF $ORDER(NARRAY(748.31,NURQUES1_","_NPART1_",",2,0))]""
WRITE ?3,"----------",!
Begin DoDot:1
+2 FOR NQZ=0:0
SET NQZ=$ORDER(NARRAY(748.31,NURQUES1_","_NPART1_",",2,NQZ))
IF NQZ=""!$GET(NUROUT)
QUIT
SET NQY=$GET(NARRAY(748.31,NURQUES1_","_NPART1_",",2,NQZ))
IF ($Y>(IOSL-7))
DO HDR^NURQRPT0
IF $GET(NUROUT)
QUIT
WRITE ?3,NQY,!
End DoDot:1
+3 WRITE ?3,"----------"
QUIT