source: FOIAVistA/trunk/r/NURSING_SERVICE-NUR/NURCPPS4.m@ 1499

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1NURCPPS4 ;HIRMFO/RM-NURSING CARE PLAN SEARCH Part 2 ;3/03/89
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3 ;This is a Cont. of Patient Problem Listing, Data Processor:
4NOGOIN ; SET DATA FOR NON-GOALS AND NON-INTERVENTIONS
5 S GMRGPAR(0)=$S(NURSPLN="C":1,1:0)_"^"_(NURSRM-$S(IOM'<132:0,1:3))_"^0^R",GMRGPAR=NURSC D EN1^GMRGPNBL
6 S ^TMP($J,"NURSOT",NURSP,NURSC)=""
7 K:$P(^TMP($J,"GMRGNAR","R",NURSC,0),"^",2)=0 ^(0),^TMP($J,"NURSOT",NURSP,NURSC)
8 Q
9GOIN ; GOAL OR INTERVENTION PROESSING
10 S NURSCLAS=$S(NURSA=1:NURSG(0),1:NURSG(1)),GMRGPAR=NURSG,GMRGPAR(0)=$S(NURSPLN="C":1,1:0)_"^"_(NURSRM+(NURSA-1*3))_"^0^"_NURSCLAS D EN1^GMRGPNBL
11 I $P(^TMP($J,"GMRGNAR",NURSCLAS,NURSG,0),"^",2)=0 K ^(0) Q:NURSPLN="C"
12 I $P(NURSCHIL,"^",4)=NURSICK S ^TMP($J,"NURSIN",NURSP,NURSG(0))="",NURSK=0 D STORD
13 I $P(NURSCHIL,"^",4)=NURSGCK S ^TMP($J,"NURSGO",NURSP,NURSG(0))="",NURSK=0 D STARG
14 S NURSL=NURSG,NURSK=0,NURSDA=$O(^GMR(124.3,GMRGPDA,1,"B",NURSG,0)) D:NURSDA>0 STAUD
15 Q
16STEVAL ; STORE EVALUATION DATES
17 S NURPR=0 F NURSI(0)=0:0 S NURSI(0)=$O(^NURSC(216.8,NURSPOI,"EVAL","AA",NURSP,NURSI(0))) Q:NURSI(0)'>0 D STV Q:NURSPLN="C"&NURPR
18 Q
19STV ;
20 F NURSI=0:0 S NURSI=$O(^NURSC(216.8,NURSPOI,"EVAL","AA",NURSP,NURSI(0),NURSI)) Q:NURSI'>0 D STV1 Q:NURSPLN="C"&NURPR
21 Q
22STV1 ;
23 S NURSJ=$S($D(^NURSC(216.8,NURSPOI,"EVAL",NURSI,0)):^(0),1:"") I +NURSJ S NURSJ(0)=0_"^"_$S(+$P(NURSJ,"^",5):$P(NURSJ,"^",5),1:+NURSJ)_"^"_$P(NURSJ,"^",3)_"^"_$P("E^R^S^U","^",$P(NURSJ,"^",4)+1),NURSJ(1)=NURSP D STUT
24 Q
25STAUD ; STORE AUDIT TRAIL INFO
26 S NURPR=0 F NURSI(0)=0:0 S NURSI(0)=$O(^GMR(124.3,GMRGPDA,1,NURSDA,2,"AA",NURSI(0))) Q:NURSI(0)'>0 D STA2 Q:NURSPLN="C"&NURPR
27 Q
28STA2 ;
29 F NURSI(1)=-1:0 S NURSI(1)=$O(^GMR(124.3,GMRGPDA,1,NURSDA,2,"AA",NURSI(0),NURSI(1))) Q:NURSI(1)="" D STA Q:NURSPLN="C"&NURPR
30 Q
31STA ;
32 F NURSI=0:0 S NURSI=$O(^GMR(124.3,GMRGPDA,1,NURSDA,2,"AA",NURSI(0),NURSI(1),NURSI)) Q:NURSI'>0 D STA1 Q:NURSPLN="C"&NURPR
33 Q
34STA1 ;
35 S NURSJ=$S($D(^GMR(124.3,GMRGPDA,1,NURSDA,2,NURSI,0)):^(0),1:"") I +NURSJ,$P(NURSJ,"^",2)'=2 S NURSJ(1)=NURSL,NURSJ(0)=1_"^"_+NURSJ_"^"_$P(NURSJ,"^",3)_"^"_$S('$P(NURSJ,"^",2):"@",1:"") D STUT
36 Q
37STARG ; STORE TARGET DATES
38 S NURPR=0 F NURSI(0)=0:0 S NURSI(0)=$O(^NURSC(216.8,NURSPOI,"TARG","AA",NURSG,NURSI(0))) Q:NURSI(0)'>0 D STG Q:NURSPLN="C"&NURPR
39 Q
40STG ;
41 F NURSI=0:0 S NURSI=$O(^NURSC(216.8,NURSPOI,"TARG","AA",NURSG,NURSI(0),NURSI)) Q:NURSI'>0 D STG1 Q:NURSPLN="C"&NURPR
42 Q
43STG1 ;
44 S NURSJ=$S($D(^NURSC(216.8,NURSPOI,"TARG",NURSI,0)):^(0),1:"") I +NURSJ S NURSJ(1)=NURSG,NURSJ(0)=0_"^"_$S(+$P(NURSJ,"^",5):$P(NURSJ,"^",5),1:+NURSJ)_"^"_$P(NURSJ,"^",4)_"^"_$S('$P(NURSJ,"^",2):"T",$P(NURSJ,"^",2)=2:"DC",1:"M") D STUT
45 Q
46STORD ; STORE ORDER DATES
47 F NURSI(0)=0:0 S NURSI(0)=$O(^NURSC(216.8,NURSPOI,"ORD","AA",NURSG,NURSI(0))) Q:NURSI(0)'>0 D STO Q:NURSPLN="C"&NURPR
48 Q
49STO ;
50 F NURSI=0:0 S NURSI=$O(^NURSC(216.8,NURSPOI,"ORD","AA",NURSG,NURSI(0),NURSI)) Q:NURSI'>0 D STO1 Q:NURSPLN="C"&NURPR
51 Q
52STO1 ;
53 S NURSJ=$S($D(^NURSC(216.8,NURSPOI,"ORD",NURSI,0)):^(0),1:"") I +NURSJ,$P(NURSJ,"^",3)'="" S NURSJ(1)=NURSG,NURSJ(0)=0_"^"_+NURSJ_"^"_$P(NURSJ,"^",4)_"^"_$S($P(NURSJ,"^",3):"DC",$P(NURSJ,"^",3)=0:"R",1:"") D STUT
54 Q
55STUT ;
56 F NURSK=1:1 Q:$S('$D(^TMP($J,"NURSDATE",NURSJ(1),9999999-NURSJ,NURSK)):1,^(NURSK)=NURSJ(0):1,1:0)
57 S ^TMP($J,"NURSDATE",NURSJ(1),9999999-NURSJ,NURSK)=NURSJ(0),NURPR=1
58 Q
Note: See TracBrowser for help on using the repository browser.