source: FOIAVistA/tag/r/DENTAL-DEN/DENTA13.m@ 1123

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1DENTA13 ;ISC2/SAW,HAG-TREATMENT DATA SUMMARY REPORT FOR CLINIC ; 4/3/89 4:11 PM ;
2 ;VERSION 1.2
3A S (DENT3,DENT4)="" W !!,"Do you wish to print the optional 3rd page of the summary" S %=2 D YN^DICN D:%=0 Q5^DENTQ G A:%=0,EXIT:%<0,A2:%=2
4A1 S DENT3=1 W !!,"Do you wish to see the $VALUE on this 3rd page" S %=2 D YN^DICN D:%=0 Q6^DENTQ G A1:%=0,EXIT:%<0 S:%=1 DENT4=1
5A2 S DENTC=0,DENTSD=DENTSD-.0001,%ZIS="MQ" K IO("Q") D ^%ZIS G EXIT:IO=""
6 I $D(IO("Q")) S ZTRTN="QUE^DENTA13",ZTSAVE("DENT*")="",ZTSAVE("H1")="",ZTSAVE("H2")="",ZTSAVE("U")="",ZTSAVE("Z5")="" D ^%ZTLOAD K ZTSK,ZTRTN,ZTSAVE G EXIT
7QUE U IO D RPT G NONE:'DENTC D A^DENTA15 G CLOSE
8RPT F I=0:0 S DENTSD=$O(^DENT(221,"A1",DENTSTA,DENTSD)) Q:DENTSD>DENTED!(DENTSD="") S DENT="" F K=0:0 S DENT=$O(^DENT(221,"A1",DENTSTA,DENTSD,DENT)) Q:DENT="" D:$D(^DENT(221,DENT,0)) P1
9 Q
10P1 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
11 S DENTC=DENTC+1,X=^DENT(221,DENT,0)
12 I $P(X,U,27)'=""!($P(X,U,44)'="") D SPOT Q
13P1A D CHK^DENTA15 Q:DENTF S DENTCAT=$P(X,U,19)
14 I $P(X,U,9)!($P(X,U,11)) S ^UTILITY($J,"DENTR",7,DENTCAT)=$S($D(^UTILITY($J,"DENTR",7,DENTCAT)):^(DENTCAT)+1,1:1)
15 I $P(X,U,41) S X(2)=$P(X,U,41),^UTILITY($J,"DENTR",X(2),DENTCAT)=$S($D(^UTILITY($J,"DENTR",X(2),DENTCAT)):^(DENTCAT)+1,1:1)
16 I $P(X,U,8) S ^UTILITY($J,"DENTR",39,DENTCAT)=$S($D(^UTILITY($J,"DENTR",39,DENTCAT)):^(DENTCAT)+1,1:1)
17 I $P(X,U,7)'="" S X(2)=$S($P(X,U,7)="S":"4",1:"5"),^UTILITY($J,"DENTR",X(2),DENTCAT)=$S($D(^UTILITY($J,"DENTR",X(2),DENTCAT)):^(DENTCAT)+1,1:1)
18 F M=9,11:1:18,20,22:1:26,28:1:38,42:1:43 I $P(X,U,M) D P11
19 Q
20P11 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",+X(2),DENTCAT),U,1)=$S($D(^UTILITY($J,"DENTR",+X(2),DENTCAT)):$P(^(DENTCAT),U,1)+X(3),1:+X(3))
21 I M=36 S $P(^UTILITY($J,"DENTR",+X(2),DENTCAT),"^",2)=$S($D(^UTILITY($J,"DENTR",+X(2),DENTCAT)):$P(^(DENTCAT),"^",2)+1,1:1)
22 Q
23SPOT 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)
24 D CHK^DENTA15 Q:DENTF S DENTCAT=$P(X,U,19)
25 S ^UTILITY($J,"DENTR",X(2),DENTCAT)=$S($D(^UTILITY($J,"DENTR",X(2),DENTCAT)):^(DENTCAT)+1,1:1)
26 I $P(X,U,45) S ^UTILITY($J,"DENTR",38,DENTCAT)=$S($D(^UTILITY($J,"DENTR",38,DENTCAT)):^(DENTCAT)+$P(X,U,45),1:$P(X,U,45))
27 Q
28NONE S DENTF1=1 W !,"There is no treatment data for review/release for the time frame you specified",*7 G EXIT
29S ;;;;;;;;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
30CLOSE X ^%ZIS("C")
31EXIT K DENT,DENTCAT,DENTCAT1,DENTDAT,DENTED,DENTSD,DENT3,DENT4,H,I,K,M,V,V1,X D:$D(ZTSK) EXIT1^DENTA1 Q
Note: See TracBrowser for help on using the repository browser.