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

NURCPP5.m

Go to the documentation of this file.
NURCPP5 ;HIRMFO/JH/RM-NURSING CARE PLAN DATA OUTPUT   Part 1 ;8/29/96
 ;;4.0;NURSING SERVICE;;Apr 25, 1997
 ; This is the Patient Problem Listing,Data Processor,Output Routine
 ; 132 Col. Compressed print
EN1 ;
 D NOW^%DTC S Y=% D D^DIQ S NURSDAT=$P(Y,":",1,2),NURSISW=1,NURSLIN("-")="",$P(NURSLIN("-"),"-",132)="-",NURSPAG=1,(NURSLCNT,NURSSW1)=0 D SPACES
 S NURSMED="Diagnosis: "_$E(NURSDIAG_NURSSS,1,37),NURSDOC="Physician: "_NURSPROV
 S NURSHED=$E(NURSPNAM_NURSSS,1,20)_" "_NURSSSN_" "_NURAGE_" "_$E(NURSWD_NURSSS,1,8)_" "_$E(NURSRB_NURSSS,1,10)_" "_$E(NURSREL_NURSSS,1,4)_" "_NURSMAR
 ;
 S (NURSO,NURSO1,NURSO2)=0 F X=1:1:2 S NURSO=NURSO+1,NURSO1=NURSO1+1,NURSO2=NURSO2+1,^TMP($J,"NURSDATA",NURSO)=""
 S X="Date/Stat/Init "_$S($P(NURSITHD,U,2)]"":$P(NURSITHD,U,2),1:"Patient Problem"),X=X_$E(NURSSS,1,43-$L(X))
 S X(1)=$S($P(NURSITHD,U,3)]"":$P(NURSITHD,U,3),1:"Goals/Expected Outcomes"),X=X_"|"_X(1)_$E(NURSSS,1,29-$L(X(1)))_"Date/Stat/Init|"
 S X(1)=$S($P(NURSITHD,U,4)]"":$P(NURSITHD,U,4),1:"Nursing Intervention/Orders"),X=X_X(1)_$E(NURSSS,1,29-$L(X(1)))_"Date/Stat/Init"
 S ^TMP($J,"NURSDATA",NURSO)=X,NURSO=NURSO+1
 S ^TMP($J,"NURSDATA",NURSO)=$E(NURSLIN("-"),1,43)_"|"_$E(NURSLIN("-"),1,43)_"|"_$E(NURSLIN("-"),1,44)
 S NURSO=NURSO+1,^TMP($J,"NURSDATA",NURSO)=""
 ;
 S (NURSO1,NURSO2,NURSO)=NURSO+1,NURSP(1)="" F NURSX=0:0 S NURSP(1)=$O(NURSPRB(NURSP(1))) Q:NURSP(1)=""  F NURSP=0:0 S NURSP=$O(NURSPRB(NURSP(1),NURSP)) Q:NURSP'>0  D PROB^NURCPP9
 S X=$E(NURSSS,1,13)_"|"_$E(NURSSS,1,29)_"|"_$E(NURSSS,1,28)_"|"_$E(NURSSS,1,14)_"|"_$E(NURSSS,1,29)_"|"_$E(NURSSS,1,14)
 F X(0)=0:0 Q:$S('$D(^TMP($J,"NURSDATA",NURSO)):0,^(NURSO)="":0,X'[^(NURSO):1,1:0)  K ^(NURSO) S NURSO=NURSO-1
 U IO I NURSO'>3 S NURSISW=0,NURSISW1=1,ANS="" D HEADER W !,$E(NURSLIN("-"),1,132),!!,"THERE IS NO DATA FOR THIS REPORT" S NURSISW=2,NURSLCNT=NURSLCNT+3 D HEADER Q
 S (NURSISW,NURSISW1)=0,ANS="" D HEADER,PRINT Q:NURSOUT  S NURSISW=2 D HEADER
 Q
PRINT W:$E(IOST)'="C" ! F NURSO=1:0 S NURSA=$S($D(^TMP($J,"NURSDATA",NURSO)):^TMP($J,"NURSDATA",NURSO),1:"") W !,NURSA S NURSO=$O(^TMP($J,"NURSDATA",NURSO)) Q:NURSO'>0  S NURSLCNT=NURSLCNT+1,NURSSP=1 D CHKLINE Q:NURSOUT
 Q
CHKLINE D HEADER:NURSLCNT>NURSIOSL Q
 ;
 I NURSISW W !!,$E(NURSLIN("-"),1,131),!,NURSMED,NURSH4,NURSDOC F I=0:0 S I=$O(NURSALGR(I)) Q:I'>0  W !,NURSALGR(I)
 I NURSISW F K=0:0 S K=$O(NURCLEG(K)) Q:K'>0  W !,NURCLEG(K)
 I NURSISW W !,$E(NURSHED,1,106),NURSH5,"["_NURSPLN_"]"," ","VAF 10-0043",! Q:NURSISW=2
 I NURSISW,$E(IOST)="C" R !,"Press return to continue or ""^"" to exit: ",ANS:DTIME I ANS="^"!(ANS="^^")!'$T S NURSOUT=1 S:ANS="^^" GMRGOUT=1 Q
 I NURSISW'=2 W @IOF,!,NURSDAT,?(IOM/2-($L(NURSTITL)/2+($L(NURSTITL)#2)\1)),NURSTITL,?123,"Page ",$J(NURSPAG,2),!?(IOM/2-($L(NURSTITL)/2+($L(NURSTITL)#2)\1)),$E(NURSLIN("-"),1,$L(NURSTITL)) W:NURSPAG=1 !,NURSPNAM,?30,NURSMED
 I  W:NURSPAG'=1 ! W:NURSPAG=1&NURSERR NURSERR(1),!,NURSERR(2),!,NURSERR(1),! S NURSPAG=NURSPAG+1,NURSLCNT=5+$S(NURSERR:3,1:0),NURSISW=1
 I NURSISW1'=0,$E(IOST)'="C",NURSO>3 W ! F Y=2:1:4 I $D(^TMP($J,"NURSDATA",Y)) W !,^TMP($J,"NURSDATA",Y) S NURSLCNT=NURSLCNT+1
 S NURSISW1=1
 Q
SPACES S NURSH1=$E(NURSSS,1,30),NURSH2=$E(NURSSS,1,42),NURSH3=$E(NURSSS,1,49),NURSH4=$E(NURSSS,1,52),NURSH5=$E(NURSSS,1,53),NURSH6=$E(NURSSS,1,10)
 Q