source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURQRPT2.m@ 1639

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1NURQRPT2 ;HIRMFO/YH-ROUTINE TO PRINT 10 STEP REPORT, PART 3 ;3/28/96
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3INDTYP ;WRITE TYPE OF INDICATOR DATA FOR EACH STUDY QUESTION
4 I $D(^NURQ(217,DA,2,D1,3,D2,2)) S NURQKOI=$P($G(^(2)),"^",4),NURQPO=$P($G(^(2)),"^",5)
5 W:$G(NURQKOI)>0 $S(NURQKOI=1:"STRUCTURE",NURQKOI=2:"PROCESS",NURQKOI=3:"OUTCOME",1:"")
6 Q
7TERMS ;PACK DEFINITION OF TERMS DATA IN NTXT_NJ ARRAY FOR EACH STUDY QUESTIONS
8 ;NJ IS DISPLAY COLUMN
9 S X="" F D3=0:0 S D3=$O(^NURQ(217,DA,2,D1,3,D2,12,D3)) Q:D3'>0 S X=X_$S(D3>1:" ",1:"")_$P($G(^(D3,0)),"^")
10 K ^UTILITY($J) S DIWF="",DIWL=0,DIWR=19 D ^DIWP S NARY="NTXT"_NJ,@NARY=0 D MERGE^NURQRPT3(.@NARY,19)
11 Q
12RATION ;PACK MULTIPLE RATIONALE DATA IN NTXT_NJ ARRAY FOR EACH STUDY QUESTION
13 S NARY="NTXT"_NJ,@NARY=0 F D3=0:0 S D3=$O(^NURQ(217,DA,2,D1,3,D2,1,D3)) Q:D3'>0!NUROUT S @NARY=@NARY+1,@(NARY_"("_@NARY_")")=$P($G(^NURQ(217.2,$P($G(^NURQ(217,DA,2,D1,3,D2,1,D3,0)),"^"),0)),"^")
14 Q
15METHOD ;SAVE METHOD OF DETERMINING VARIANCE IN NTXT_NJ ARRAY FOR EACH STUDY QUESTION
16 S X=$P($G(^NURQ(217,DA,2,D1,3,D2,3)),"^") K ^UTILITY($J) S DIWF="",DIWL=0,DIWR=19 D ^DIWP S NARY="NTXT"_NJ,@NARY=0 D MERGE^NURQRPT3(.@NARY,19)
17 Q
18CONCLUD ;SAVE CONCLUSION WP DATA IN TXT_NJ ARRAY FOR EACH STUDY
19 S X="" F D3=0:0 S D3=$O(^NURQ(217,DA,2,D1,3,D2,10,D3)) Q:D3'>0 S:X'="" X=X_" " S X=X_$S(D3>1:" ",1:"")_$P($G(^(D3,0)),"^")
20 S DIWF="",DIWL=0,DIWR=19 K ^UTILITY($J) S NARY="NTXT"_NJ,@NARY=0 D ^DIWP,MERGE^NURQRPT3(.@NARY,19)
21 Q
22RECOMD ;SAVE RECOMMENDATION/ACTION TEXT IN NTXT_NJ ARRAR WHERE NJ IS THE
23 ;DISPLAY COLUMN FOR THE STUDY QUESTION
24 S X=$P($G(^NURQ(217,DA,2,D1,3,D2,5)),"^"),DIWF="",DIWL=0,DIWR=19 K ^UTILITY($J) S NARY="NTXT"_NJ,@NARY=0 D ^DIWP,MERGE^NURQRPT3(.@NARY,19)
25 Q
26GROUP ;SAVE PERSON/GROUP TAKING ACTION TEXT IN NTXT_NJ ARRAY
27 ;NJ IS DISPLAY COLUMN
28 S X=$P($G(^NURQ(217,DA,2,D1,3,D2,6)),"^"),DIWF="",DIWL=0,DIWR=19 K ^UTILITY($J) S NARY="NTXT"_NJ,@NARY=0 D ^DIWP,MERGE^NURQRPT3(.@NARY,19)
29 Q
30DATE ;PRINT DATE IMPLEMENTED
31 S X=$P($G(^NURQ(217,DA,2,D1,3,D2,6)),"^",3) W:X>0 $E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
32 Q
33EFFECT ;EFFECTIVENESS OF ACTION TAKEN
34 S NURQ=+$P($G(^NURQ(217,DA,2,D1,3,D2,9)),"^",4) S X="" D
35 .I NURQ=1 S X="NO ACTIONS TAKEN" Q
36 .I NURQ=2 S X="ACTIONS TAKEN WERE EFFECTIVE IN IMPROVING PATIENT CARE" Q
37 .I NURQ=3 S X="ACTIONS TAKEN WERE PARTIALLY EFECTIVE IN IMPROVING PATIENT CARE" Q
38 .I NURQ=4 S X="ACTIONS TAKEN WERE NOT EFFECTIVE IN IMPROVING PATIENT CARE"
39 S DIWF="",DIWL=0,DIWR=19 K ^UTILITY($J) S NARY="NTXT"_NJ,@NARY=0 D ^DIWP,MERGE^NURQRPT3(.@NARY,19)
40 Q
41RECEIVR ;RECEIVER OF RESULTS
42 D:($Y>(IOSL-7)) HDR^NURQRPT0 Q:NUROUT W !,"C. RECEIVER OF RESULTS:"
43 I $P($G(^NURQ(217,DA,8,0)),"^",3)>0 F D1=0:0 S D1=$O(^NURQ(217,DA,8,D1)) Q:D1'>0!NUROUT D
44 .D:($Y>(IOSL-7)) HDR^NURQRPT0 Q:NUROUT W !,?4,$P($G(^NURQ(217,DA,8,D1,0)),"^"),!,?5,"DATE COMMUNICATED: " D COMUN^NURQRPT3
45 Q
Note: See TracBrowser for help on using the repository browser.