1 | NURA9C1 ;HIRMFO/MD,FT-SERVICE CATEGORY CERTIFICATION REPORT BY LOCATION ;8/9/96 10:04
|
---|
2 | ;;4.0;NURSING SERVICE;**13**;Apr 25, 1997
|
---|
3 | Q:'$D(^DIC(213.9,1,"OFF")) Q:$P(^DIC(213.9,1,"OFF"),"^",1)=1
|
---|
4 | S (NURQUEUE,NURQUIT,NUROUT)=0
|
---|
5 | D EN1^NURSAUTL G QUIT:$G(NUROUT)
|
---|
6 | I NURMDSW=0,NURPLSW=1 S NURPLSCR=1 D PRD^NURSAGSP K NURPLSCR I $G(NUROUT) G QUIT
|
---|
7 | I NURMDSW S DIC(0)="AEQZ",NURPLSCR=1 D EN5^NURSAGSP G QUIT:$G(NUROUT)
|
---|
8 | W ! D EN1^NURSAGSP G QUIT:$G(NUROUT)
|
---|
9 | S ^TMP("NURSCAT",$J,"R")=""
|
---|
10 | D EN4^NURSAGP0 W ! G QUIT:$G(NUROUT)
|
---|
11 | S ZTDESC="Nursing Service Category Certification Report by Location",ZTSAVE("^TMP(""NURSCAT"",$J,")="",ZTRTN="START^NURA9C1" D EN7^NURSUT0 G:POP!($D(ZTSK)) QUIT
|
---|
12 | START ;
|
---|
13 | K ^TMP($J),^TMP("NURLOC",$J) U IO S (NURPAGE,NURSW1)=0
|
---|
14 | D SORT G:NUROUT QUIT
|
---|
15 | D PRINT
|
---|
16 | QUIT K ^TMP($J) D CLOSE^NURSUT1,^NURAKILL
|
---|
17 | Q
|
---|
18 | ; DETAIL LINE PRINT ROUTINE
|
---|
19 | PRINT ;
|
---|
20 | S NURFAC="" F S NURFAC=$O(^TMP($J,"L",NURFAC)) Q:NURFAC=""!(NURQUIT) D P Q:NURQUIT
|
---|
21 | Q
|
---|
22 | P S NURPROG="" F S NURPROG=$O(^TMP($J,"L",NURFAC,NURPROG)) Q:NURPROG=""!(NURQUIT) D P0 Q:NURQUIT
|
---|
23 | Q
|
---|
24 | P0 S NL1="" F S NL1=$O(^TMP($J,"L",NURFAC,NURPROG,NL1)) Q:NL1=""!(NURQUIT) D:NURSW1 HEADER,BRK Q:NURQUIT D P1 Q:NURQUIT
|
---|
25 | Q
|
---|
26 | P1 S NURCAT="" F S NURCAT=$O(^TMP($J,"L",NURFAC,NURPROG,NL1,NURCAT)) Q:NURCAT=""!(NURQUIT) D:NURSW1 BRK1 D P2 Q:NURQUIT
|
---|
27 | Q
|
---|
28 | P2 S NCRT="" F S NCRT=$O(^TMP($J,"L",NURFAC,NURPROG,NL1,NURCAT,NCRT)) Q:NCRT=""!(NURQUIT) S NURSORT=$G(^TMP($J,"L",NURFAC,NURPROG,NL1,NURCAT,NCRT)) I NURSORT D P4 Q:NURQUIT
|
---|
29 | Q
|
---|
30 | P4 S NCDT="" F S NCDT=$O(^TMP($J,"L1",NURSORT,NCDT)) Q:NCDT=""!(NURQUIT) D P5 W ! Q:NURQUIT
|
---|
31 | Q
|
---|
32 | P5 S N1="" F S N1=$O(^TMP($J,"L1",NURSORT,NCDT,N1)) Q:N1=""!(NURQUIT) D:NCRT'=" BLANK" PRINT1
|
---|
33 | Q
|
---|
34 | PRINT1 I ($Y>(IOSL-6)!'NURSW1) D HEADER,BRK,BRK1 Q:NURQUIT
|
---|
35 | S NURSW1=1 S NURCTA="" S NSUB=$O(^NURSF(212.2,"C",$E(NCRT,1,30),"")),NURCTA=$S('$D(^NURSF(212.2,NSUB,0)):"",1:$P(^(0),"^",4))
|
---|
36 | W:N1'=" BLANK" !,$E(N1,1,20)
|
---|
37 | W ?24,$E(NCRT,1,30)
|
---|
38 | W:NURCTA'=" BLANK" ?60,NURCTA
|
---|
39 | S Y=NCDT D:+Y D^DIQ W:Y'=" BLANK" ?68,Y
|
---|
40 | Q
|
---|
41 | BRK Q:NURQUIT W !!?31,"LOCATION: ",NL1
|
---|
42 | Q
|
---|
43 | BRK1 Q:NURQUIT W !!?31,"SERVICE CATEGORY: ",$$CAT^NURSUT2(NURCAT),!
|
---|
44 | Q
|
---|
45 | HEADER I 'NURQUEUE,$E(IOST)="C",NURSW1 D ENDPG^NURSUT1 S:NUROUT NURQUIT=+NUROUT Q:NURQUIT
|
---|
46 | S NURPAGE=NURPAGE+1 W:$E(IOST)="C"!(NURPAGE>1) @IOF
|
---|
47 | I NURMDSW,$L($G(NURFAC))>1 W ?$$CNTR^NURSUT2(NURFAC),$$FACL^NURSUT2(NURFAC)
|
---|
48 | W !!,"CERTIFICATION PROFILE BY LOCATION/SVC. CATEGORY" S X="T" D ^%DT D:+Y D^DIQ W ?58,Y,?72,"PAGE: ",NURPAGE
|
---|
49 | W !!?60,"CERT.",?68,"DATE CERT." W !,"NAME",?24,"CERTIFICATION",?60,"AGENCY",?68,"EXPIRES" W !,$$REPEAT^XLFSTR("-",80)
|
---|
50 | I $G(NURPLSW),$L($G(NURPROG))>1 N Z S Z=$$PROD^NURSUT2(NURPROG) W !?$$CNTR^NURSUT2(Z),$G(Z),!?$$CNTR^NURSUT2(Z),$$REPEAT^XLFSTR("-",$L(Z)+1)
|
---|
51 | Q
|
---|
52 | SORT W ! S NRPT=2 D EN3^NURAAGS0
|
---|
53 | NODATA ;
|
---|
54 | I $G(NSPC(1))'="" S Y=NSPC(1) D D^DIQ S NSPC(1)=Y
|
---|
55 | I $G(NSPC(2))'="" S Y=NSPC(2) D D^DIQ S NSPC(2)=Y
|
---|
56 | I $O(^TMP($J,""))="",'$D(NURSNLOC) S NUROUT=1,NURFAC=$S($G(NURFAC)=0:NURFAC(1),1:""),NURPROG=$S($G(NURPROG)=0:NURPROG(1),1:"") D
|
---|
57 | . D HEADER W !!,"THERE'S NO DATA FOR "_$S($G(NSPC)'="":NSPC,1:"THIS REPORT")_$S($G(NSPC(1))'="":" FOR ",1:"")_$S($G(NSPC(1))'="":NSPC(1),1:"")_$S($G(NSPC(2))'="":" - "_NSPC(2),1:"")
|
---|
58 | . Q
|
---|
59 | I $O(^TMP($J,""))="",$D(NURSNLOC) S NUROUT=1,NURFAC=$S($G(NURFAC)=0:NURFAC(1),1:""),NURPROG=$S($G(NURPROG)=0:NURPROG(1),1:"") D
|
---|
60 | . D HEADER S NL1="" F S NL1=$O(NURSNLOC(NL1)) Q:NL1="" W !!,"THERE IS NO "_NL1_" DATA FOR "_$S($G(NSPC)'="":NSPC,1:"THIS REPORT")_$S($G(NSPC(1))'="":" FOR ",1:"")_$S($G(NSPC(1))'="":NSPC(1),1:"")_$S($G(NSPC(2))'="":" - "_NSPC(2),1:"")
|
---|
61 | . Q
|
---|
62 | I $O(^TMP($J,""))'="",$D(NURSNLOC) S NURFAC=$S($G(NURFAC)=0:NURFAC(1),1:""),NURPROG=$S($G(NURPROG)=0:NURPROG(1),1:"") D I NURSW1=1 D ENDPG^NURSUT1 S NURSW1=0
|
---|
63 | . S (NURY,NURZ,NURX)="" F S NURY=$O(^TMP($J,"L",NURY)) Q:NURY="" F S NURZ=$O(^TMP($J,"L",NURY,NURZ)) Q:NURZ="" F S NURX=$O(^TMP($J,"L",NURY,NURZ,NURX)) Q:NURX="" S ^TMP("NURLOC",$J,NURX)=""
|
---|
64 | . S NL1="" F S NL1=$O(NURSNLOC(NL1)) Q:NL1="" I '$D(^TMP("NURLOC",$J,NL1)) D
|
---|
65 | . . D:NURSW1=0 HEADER S NURSW1=1 W !!,"THERE IS NO "_NL1_" DATA FOR "_$S($G(NSPC)'="":NSPC,1:"THIS REPORT")_$S($G(NSPC(1))'="":" FOR ",1:"")_$S($G(NSPC(1))'="":NSPC(1),1:"")_$S($G(NSPC(2))'="":" - "_NSPC(2),1:"")
|
---|
66 | . . Q
|
---|
67 | . Q
|
---|
68 | Q
|
---|