39 lines
2.0 KiB
Mathematica
39 lines
2.0 KiB
Mathematica
NURQRPT3 ;HIRMFO/YH-ROUTINE TO PRINT 10 STEP REPORT, PART 4 ;3/21/96
|
|
;;4.0;NURSING SERVICE;;Apr 25, 1997
|
|
COMUN 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)
|
|
Q
|
|
REFER ;PRINT REFERENCE INFORMATION
|
|
W !,"D. REFERENCE:" I $P($G(^NURQ(217,DA,9,0)),"^",3)>0 D
|
|
.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)),"^")
|
|
.Q:$G(NUROUT) S NURQTXT(1)=$E(NURQB,1,3) D DIWP(.NURQTXT)
|
|
;PRINT OTHER QI INFORMATION
|
|
Q:$G(NUROUT) W !,"E. OTHER:" I $P($G(^NURQ(217,DA,11,0)),"^",3)>0 D
|
|
.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))
|
|
.Q:$G(NUROUT) S NURQTXT(1)=$E(NURQB,1,3) D DIWP(.NURQTXT)
|
|
Q
|
|
WRITE ;PRINT IMPORTANT FUNCTION TABLE
|
|
;NFUNC ARRAY CONTAINS TEXT OF IMPORTANT FUNCTIONS
|
|
;NCARE ARRAY CONTAINS TEXT OF STANDARD OF CARE_ASSOCIATESERVICE
|
|
;NPRACT ARRAY CONTAINS TEXT OF STANDARD OF PRACTICE_ASSOCIATE SERVICE
|
|
;NLEVL IS NUMBER OF ROWS
|
|
Q:NLEVL'>0
|
|
N NII F NII=1:1:NLEVL D:($Y>(IOSL-7)) HDR^NURQRPT0,FHEADR^NURQRPT0 Q:$G(NUROUT) W ! D
|
|
.I $D(NFUNC(+NII)) W NFUNC(+NII)
|
|
.I $D(NCARE(+NII)) W ?21,NCARE(+NII)
|
|
.I $D(NPRACT(+NII)) W ?51,NPRACT(+NII)
|
|
K NLEVL,NPRACT,NCARE,NFUNC Q
|
|
DIWP(NTEXT) ;INPUT NTEXT CONTAINS WP TEXT
|
|
;^UTILITY($J,"W") CONTAINS THE ^DIWP OUTPUT
|
|
K ^UTILITY($J) S X=NTEXT,DIWF="",DIWL=0,DIWR=76 D ^DIWP
|
|
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)
|
|
Q
|
|
MERGE(NTEXT,NLEN) ;MERGE ^UTILITY($J,"W") TO NTEXT ARRAY WITH TEXT LENGTH<=NLEN
|
|
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
|
|
.I $L(I(1))>NLEN D CUT Q
|
|
.E S NTEXT=NTEXT+1,NTEXT(NTEXT)=I(1)
|
|
Q
|
|
CUT S NTEXT=NTEXT+1,NTEXT(NTEXT)=$E(I(1),1,NLEN),I(1)=$E(I(1),NLEN+1,40)
|
|
I $L(I(1))>NLEN G CUT
|
|
S NTEXT=NTEXT+1,NTEXT(NTEXT)=I(1)
|
|
Q
|