source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURCPP5.m@ 862

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1NURCPP5 ;HIRMFO/JH/RM-NURSING CARE PLAN DATA OUTPUT Part 1 ;8/29/96
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ; This is the Patient Problem Listing,Data Processor,Output Routine
4 ; 132 Col. Compressed print
5EN1 ;
6 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
7 S NURSMED="Diagnosis: "_$E(NURSDIAG_NURSSS,1,37),NURSDOC="Physician: "_NURSPROV
8 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
9 ;
10 S (NURSO,NURSO1,NURSO2)=0 F X=1:1:2 S NURSO=NURSO+1,NURSO1=NURSO1+1,NURSO2=NURSO2+1,^TMP($J,"NURSDATA",NURSO)=""
11 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))
12 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|"
13 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"
14 S ^TMP($J,"NURSDATA",NURSO)=X,NURSO=NURSO+1
15 S ^TMP($J,"NURSDATA",NURSO)=$E(NURSLIN("-"),1,43)_"|"_$E(NURSLIN("-"),1,43)_"|"_$E(NURSLIN("-"),1,44)
16 S NURSO=NURSO+1,^TMP($J,"NURSDATA",NURSO)=""
17 ;
18 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
19 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)
20 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
21 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
22 S (NURSISW,NURSISW1)=0,ANS="" D HEADER,PRINT Q:NURSOUT S NURSISW=2 D HEADER
23 Q
24PRINT 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
25 Q
26CHKLINE D HEADER:NURSLCNT>NURSIOSL Q
27 ;
28HEADER I NURSISW=2 S NURSEND=IOSL-11 F X=NURSLCNT:1:NURSEND W !
29 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)
30 I NURSISW F K=0:0 S K=$O(NURCLEG(K)) Q:K'>0 W !,NURCLEG(K)
31 I NURSISW W !,$E(NURSHED,1,106),NURSH5,"["_NURSPLN_"]"," ","VAF 10-0043",! Q:NURSISW=2
32 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
33 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
34 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
35 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
36 S NURSISW1=1
37 Q
38SPACES 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)
39 Q
Note: See TracBrowser for help on using the repository browser.