source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURCCPU1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1NURCCPU1 ;HIRMFO/RM/MD-NURSING CARE PLAN UTILITIES (cont.) ;8/16/95
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3EN1 ; ENTRY FOR ACTION TO ENSURE THAT NURSCPE VARIABLE SET IN NCP.
4 I '$D(NURSPROB) S NURSPROB=0
5 Q:$D(NURSCPE) S NURSCPE=$O(^NURSC(216.8,"B",GMRGPDA,0)) D:NURSCPE'>0 NEWPL^NURCPP0 I NURSCPE'>0 S GMRGOUT=1
6 Q
7EN2 ; ENTRY TO PRINT OUTCOME INFORMATION IF PRESENT
8 Q:'$P(GMRGSEL,"^",3)
9 S NURSTRDT=$O(^NURSC(216.8,NURSCPE,"TARG","AA",$P(GMRGSEL,"^"),0)) G:NURSTRDT'>0 Q2 S NURSTRDA=$O(^(NURSTRDT,0)) G:NURSTRDA'>0 Q2 S NURSTRND=$S($D(^NURSC(216.8,NURSCPE,"TARG",NURSTRDA,0)):^(0),1:"")
10 S Y=$P(NURSTRND,"^",5) S NURSTRDT=$S(Y:$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3),1:""),NURSTRMT=$P(NURSTRND,"^",2)
11 S GMRGHPRT(1)="68^"_NURSTRDT_$S(NURSTRMT=1:"(M)",NURSTRMT=2:"(DC)",1:"(T)")
12Q2 K NURSTRDT,NURSTRDA,NURSTRND,NURSTRMT
13 Q
14EN3 ; ENTRY TO PRINT EVALUATION INFORMATION IF PRESENT
15 Q:'$P(GMRGSEL,"^",3)
16 S NURSEVDT=$O(^NURSC(216.8,NURSCPE,"EVAL","AA",$P(GMRGSEL,"^"),0)) G:NURSEVDT'>0 Q3 S NURSEVDA=$O(^(NURSEVDT,0)) G:NURSEVDA'>0 Q3 S NURSEVND=$S($D(^NURSC(216.8,NURSCPE,"EVAL",NURSEVDA,0)):^(0),1:"")
17 S Y=$P(NURSEVND,"^") S NURSEVDT=$S(Y:$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3),1:"") S Y=$P(NURSEVND,"^",5) S NURSEVRD=$S(Y:$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3),1:"")
18 S GMRGHPRT(1)="67^"_$S(NURSEVRD'="":NURSEVRD,NURSEVDT'="":NURSEVDT,1:" ")_" ("_$P("E^R^S^U","^",$P(NURSEVND,"^",4)+1)_")"
19Q3 K NURSEVDT,NURSEVDA,NURSEVND,NURSEVRD,NURSEVUS,NURSEVST
20 Q
21EN4 ; ENTRY TO PRINT THE PROBLEM AT THE TOP OF THE SCREEN FOR ALL
22 ; CHILDREN THAT ARE UNDER A PROBLEM.
23 Q:'$D(NURSPROB) Q:'$D(NURSPROB(NURSPROB)) Q:'$P(NURSPROB(NURSPROB),"^")
24 S GMRGXPRT=$P(NURSPROB(NURSPROB),"^",2),GMRGXPRT(0)=$S($P(NURSPROB(NURSPROB),"^",3)="":"",$D(^GMR(124.3,GMRGPDA,1,$P(NURSPROB(NURSPROB),"^",3),0)):$P(^(0),"^",2),1:""),GMRGXPRT(1)="^^1^^1" D EN1^GMRGRUT2
25 S GMRGPLN=GMRGXPRT F NURSH=1:1 S GMRGLEN=IOM-17 D FITLINE^GMRGRUT1 Q:GMRGPLN(0)="" S GMRGHPRT(NURSH)=$S(NURSH=1:"PATIENT PROBLEM: ",1:" "),GMRGHPRT(NURSH)=GMRGHPRT(NURSH)_GMRGPLN(0),GMRGPLN=GMRGPLN(1)
26 K GMRGXPRT,NURSH Q
27EN5 ; SCREEN FROM THE ORDERABLE (#.02) SUBFIELD OF THE ORDERS INFO (#4)
28 ; FIELD OF THE NURS CARE PLAN (#216.8) FILE)
29 S NURS("OK")=0,NURS("IN")=$O(^GMRD(124.25,"B","ORDERABLE",0)),NURS("P")=$P(^NURSC(216.8,DA(1),0),U) G Q5:NURS("IN")=""!(NURS("P")="")!($P(^GMRD(124.2,+Y,0),U,4)'=NURS("IN")),Q5:'$D(^GMR(124.3,NURS("P"),1,"B",+Y))
30 F NURS=0:0 S NURS=$O(^GMRD(124.2,"AKID",+Y,NURS)) Q:NURS'>0!NURS("OK") F NURS(0)=0:0 S NURS(0)=$O(^GMRD(124.2,"AKID",NURS,NURS(0))) Q:NURS(0)'>0 I $D(^NURSC(216.8,D0,"PROB","B",NURS(0))) S NURS("OK")=1 Q
31Q5 I NURS("OK")
32 K NURS
33 Q
Note: See TracBrowser for help on using the repository browser.