source: WorldVistAEHR/trunk/r/DENTAL-DEN/DENTA11.m@ 1742

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

initial load of WorldVistAEHR

File size: 3.7 KB
Line 
1DENTA11 ;ISC2/SAW,HAG-TREATMENT DATA SUMMARY REPORT BY PROVIDER ; 4/4/89 11:32 AM ;
2 ;VERSION 1.2
3A S (DENT3,DENT4)="" W !!,"Would you like to review the data for all providers" S %=1 D YN^DICN D:%=0 Q^DENTAR11 G A:%=0,EXIT:%<0,A4:%=1
4A1 W !!,"Would you like to review released data only" S %=2 D YN^DICN D:%=0 Q1^DENTA12 G A1:%=0,EXIT:%<0 S:%=1 DENTREL=1
5A2 R !!,"Select starting PROVIDER NUMBER: ",X:DTIME D:X["?" F G A2:X["?",EXIT:X=""!(X=U) W:X'?4N *7,?($X+1),"?" G:X'?4N A2 S DENTPRV=X
6A3 R !,"Select ending PROVIDER NUMBER: ",X:DTIME D:X["?" F G A3:X["?",EXIT:X=""!(X=U) W:X'?4N *7,?($X+1),"?" G:X'?4N A3 S DENTPRV1=X,EP=1
7A4 W !!,"Do you wish to print the optional 3rd page of the summary" S %=2 D YN^DICN D:%=0 Q5^DENTQ G A4:%=0,EXIT:%<0,A6:%=2 S DENT3=1
8A5 W !!,"Do you wish to see the $VALUE on this 3rd page" S %=2 D YN^DICN D:%=0 Q6^DENTQ G A5:%=0,EXIT:%<0 S:%=1 DENT4=1
9A6 S %ZIS="MQ" K IO("Q") D ^%ZIS G EXIT:IO=""
10 I $D(IO("Q")) S ZTRTN="QUE^DENTA11",ZTSAVE("DENT*")="",ZTSAVE("EP")="",ZTSAVE("H1")="",ZTSAVE("H2")="",ZTSAVE("U")="",ZTSAVE("Z5")="" D ^%ZTLOAD K ZTSK,ZTRTN,ZTSAVE G EXIT
11QUE U IO S DENTPRV1=$S($D(DENTPRV1):DENTPRV1,1:""),DENTPRV=$S($D(DENTPRV):DENTPRV-1,1:""),DENTC=0,DENTSD=DENTSD-.0001 S:$L(DENTPRV)<4&(DENTPRV]"") DENTPRV=$E("000"_DENTPRV,$L(DENTPRV),$L(DENTPRV)+3) S DENTPRV2=DENTPRV
12 F I=0:0 S DENTSD=$O(^DENT(221,"AC1",DENTSTA,DENTSD)) Q:DENTSD>DENTED!(DENTSD="") S DENTPRV=DENTPRV2 F J=0:0 S DENTPRV=$O(^DENT(221,"AC1",DENTSTA,DENTSD,DENTPRV)) Q:DENTPRV="" Q:(DENTPRV>DENTPRV1)&($D(EP)) D RPT
13 D ^DENTA15 G CLOSE
14RPT S:'$D(^UTILITY($J,"DENTR",DENTPRV)) ^UTILITY($J,"DENTR",DENTPRV)="" S DENT="",DENTC(1)=0 F K=0:0 S DENT=$O(^DENT(221,"AC1",DENTSTA,DENTSD,DENTPRV,DENT)) Q:DENT="" D:$D(^DENT(221,DENT,0)) P1
15 S ^UTILITY($J,"DENTR",DENTPRV)=^UTILITY($J,"DENTR",DENTPRV)+DENTC(1) Q
16P1 I $D(DENTREL) Q:'$D(^DENT(221,DENT,.1)) S Y(1)=$P(^(.1),"^",2) I 'Y(1)!Y(1)<DENTSD1!Y(1)>DENTED Q
17 S DENTC=DENTC+1,X=^DENT(221,DENT,0),DENTF=0,DENTC(1)=DENTC(1)+1
18 I $P(X,U,27)'=""!($P(X,U,44)'="") D SPOT Q
19 D CHK^DENTA15 Q:DENTF S DENTCAT=$P(X,U,19)
20 I $P(X,U,9)!($P(X,U,11)) S ^UTILITY($J,"DENTR",DENTPRV,7,DENTCAT)=$S($D(^UTILITY($J,"DENTR",DENTPRV,7,DENTCAT)):^(DENTCAT)+1,1:1)
21 I $P(X,U,41) S X(2)=$P(X,U,41),^UTILITY($J,"DENTR",DENTPRV,X(2),DENTCAT)=$S($D(^UTILITY($J,"DENTR",DENTPRV,X(2),DENTCAT)):^(DENTCAT)+1,1:1)
22 I $P(X,U,8) S ^UTILITY($J,"DENTR",DENTPRV,39,DENTCAT)=$S($D(^UTILITY($J,"DENTR",DENTPRV,39,DENTCAT)):^(DENTCAT)+1,1:1)
23 I $P(X,U,7)'="" S X(2)=$S($P(X,U,7)="S":"4",1:"5"),^UTILITY($J,"DENTR",DENTPRV,X(2),DENTCAT)=$S($D(^UTILITY($J,"DENTR",DENTPRV,X(2),DENTCAT)):^(DENTCAT)+1,1:1)
24 F M=9,11:1:18,20,22:1:26,28:1:38,42:1:43 I $P(X,U,M) D P11
25 Q
26P11 S X(2)=$P($T(S),";",M),X(3)=$P(X,U,M),X(3)=0_X(3),X(3)=$E(X(3),($L(X(3))-1),$L(X(3))),$P(^UTILITY($J,"DENTR",DENTPRV,+X(2),DENTCAT),U,1)=$S($D(^UTILITY($J,"DENTR",DENTPRV,+X(2),DENTCAT)):$P(^(DENTCAT),U,1)+X(3),1:+X(3))
27 I M=36 S $P(^UTILITY($J,"DENTR",DENTPRV,+X(2),DENTCAT),"^",2)=$S($D(^UTILITY($J,"DENTR",DENTPRV,+X(2),DENTCAT)):$P(^(DENTCAT),"^",2)+1,1:1)
28 Q
29SPOT S X(1)=$S($P(X,U,44)'="":$P(X,U,44),1:$P(X,U,27)),X(2)=$S(X(1)=1:35,X(1)=2:36,1:37)
30 D CHK^DENTA15 Q:DENTF S DENTCAT=$P(X,U,19)
31 S ^UTILITY($J,"DENTR",DENTPRV,X(2),DENTCAT)=$S($D(^UTILITY($J,"DENTR",DENTPRV,X(2),DENTCAT)):^(DENTCAT)+1,1:1)
32 I $P(X,U,45) S ^UTILITY($J,"DENTR",DENTPRV,38,DENTCAT)=$S($D(^UTILITY($J,"DENTR",DENTPRV,38,DENTCAT)):^(DENTCAT)+$P(X,U,45),1:$P(X,U,45))
33 Q
34F S DIC="^DENT(220.5,",DIC(0)="E" D ^DIC K DIC Q
35S ;;;;;;;;08;;09;15;16;33;10;20;21;22;;23;;11;12;13;14;17;;24;25;26;27;28;29;30;31;18;19;32;;;;34;06
36CLOSE X ^%ZIS("C")
37EXIT K %,DENT,DENTCAT,DENTCAT1,DENTDAT,DENTED,DENTF,DENTPRV,DENTPRV2,DENTPRV1,DENTREL,DENTSD,DENT3,DENT4,EP,DIC,I,J,K,M,V,V1,X,Y D:$D(ZTSK) EXIT1^DENTA1 Q
Note: See TracBrowser for help on using the repository browser.