source: WorldVistAEHR/trunk/r/NURSING_SERVICE-NUR/NURQRPT3.m@ 1774

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1NURQRPT3 ;HIRMFO/YH-ROUTINE TO PRINT 10 STEP REPORT, PART 4 ;3/21/96
2 ;;4.0;NURSING SERVICE;;Apr 25, 1997
3COMUN S NURQDC=$P($G(^NURQ(217,DA,8,D1,0)),"^",2) W:NURQDC'="" $E(NURQDC,4,5)_"-"_$E(NURQDC,6,7)_"-"_$E(NURQDC,2,3)
4 Q
5REFER ;PRINT REFERENCE INFORMATION
6 W !,"D. REFERENCE:" I $P($G(^NURQ(217,DA,9,0)),"^",3)>0 D
7 .S NURQTXT=" " F D1=0:0 S D1=$O(^NURQ(217,DA,9,D1)) Q:D1'>0!$G(NUROUT) S NURQTXT=NURQTXT_" "_$P($G(^NURQ(217,DA,9,D1,0)),"^")
8 .Q:$G(NUROUT) S NURQTXT(1)=$E(NURQB,1,3) D DIWP(.NURQTXT)
9 ;PRINT OTHER QI INFORMATION
10 Q:$G(NUROUT) W !,"E. OTHER:" I $P($G(^NURQ(217,DA,11,0)),"^",3)>0 D
11 .S NURQTXT=" " F D1=0:0 S D1=$O(^NURQ(217,DA,11,D1)) Q:D1'>0!$G(NUROUT) S NURQTXT=NURQTXT_" "_$G(^NURQ(217,DA,11,D1,0))
12 .Q:$G(NUROUT) S NURQTXT(1)=$E(NURQB,1,3) D DIWP(.NURQTXT)
13 Q
14WRITE ;PRINT IMPORTANT FUNCTION TABLE
15 ;NFUNC ARRAY CONTAINS TEXT OF IMPORTANT FUNCTIONS
16 ;NCARE ARRAY CONTAINS TEXT OF STANDARD OF CARE_ASSOCIATESERVICE
17 ;NPRACT ARRAY CONTAINS TEXT OF STANDARD OF PRACTICE_ASSOCIATE SERVICE
18 ;NLEVL IS NUMBER OF ROWS
19 Q:NLEVL'>0
20 N NII F NII=1:1:NLEVL D:($Y>(IOSL-7)) HDR^NURQRPT0,FHEADR^NURQRPT0 Q:$G(NUROUT) W ! D
21 .I $D(NFUNC(+NII)) W NFUNC(+NII)
22 .I $D(NCARE(+NII)) W ?21,NCARE(+NII)
23 .I $D(NPRACT(+NII)) W ?51,NPRACT(+NII)
24 K NLEVL,NPRACT,NCARE,NFUNC Q
25DIWP(NTEXT) ;INPUT NTEXT CONTAINS WP TEXT
26 ;^UTILITY($J,"W") CONTAINS THE ^DIWP OUTPUT
27 K ^UTILITY($J) S X=NTEXT,DIWF="",DIWL=0,DIWR=76 D ^DIWP
28 Q:'$D(^UTILITY($J,"W")) N NX,NY S NX=0 F S NX=$O(^UTILITY($J,"W",0,NX)) Q:NX'>0!$G(NUROUT) S NY=$G(^UTILITY($J,"W",0,NX,0)) D:($Y>(IOSL-7)) HDR^NURQRPT0 Q:$G(NUROUT) W !,$S(NX=1:NY,1:NTEXT(1)_NY)
29 Q
30MERGE(NTEXT,NLEN) ;MERGE ^UTILITY($J,"W") TO NTEXT ARRAY WITH TEXT LENGTH<=NLEN
31 N I S (NTEXT,I)=0 F S I=$O(^UTILITY($J,"W",0,I)) Q:I'>0 S I(1)=$G(^UTILITY($J,"W",0,I,0)) D
32 .I $L(I(1))>NLEN D CUT Q
33 .E S NTEXT=NTEXT+1,NTEXT(NTEXT)=I(1)
34 Q
35CUT S NTEXT=NTEXT+1,NTEXT(NTEXT)=$E(I(1),1,NLEN),I(1)=$E(I(1),NLEN+1,40)
36 I $L(I(1))>NLEN G CUT
37 S NTEXT=NTEXT+1,NTEXT(NTEXT)=I(1)
38 Q
Note: See TracBrowser for help on using the repository browser.