source: WorldVistAEHR/trunk/r/DENTAL-DEN/DENTA16.m@ 1133

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1DENTA16 ;ISC2/SAW-PRINT/DISPLAY TREATMENT DATA REPORTS - INDIVIDUAL SITTINGS BY CLINIC OR PROVIDER ;7/21/88 5:23 PM
2 ;;1.2;DENTAL;**16,19**;JAN 26, 1989
3 ;VERSION 1.2
4 G NONE:'DENTC S DENTPRV=""
5 F M=0:1 D:M COMP1 S DENTPRV=$O(^UTILITY($J,"DENTR",DENTPRV)) Q:DENTPRV="" S H6="DENTAL PROVIDER NO.: "_DENTPRV Q:Z5=U D:M HOLD Q:Z5=U D HD S DENT="" F N=0:0 S DENT=$O(^UTILITY($J,"DENTR",DENTPRV,DENT)) Q:DENT="" S X0=^(DENT) D B1 Q:Z5=U
6 D:Z5'=U HOLD G EXIT
7B1 S X=^DENT(221,DENT,0) D:IOSL-($Y#IOSL)<4 HOLD3 Q:Z5=U D HD1
8 K A F I=1:2 W:'$P(X0,U,I) ! Q:'$P(X0,U,I) S:IOSL-($Y#IOSL)<4 A=1 S X1=$P(X0,U,I),X2=$P(X0,U,I+1) W ?40,$E($P(^DIC(220.3,X1,0),U,1),1,35),?77,$J(X2,3) W:$P(X0,U,I+2) ! I $D(A) K:'$P(X0,U,I+2) A D HOLD3 Q:Z5=U
9 Q
10HD S H3="DENTAL SERVICE TREATMENT REPORT - SITTINGS BY PROVIDER",H5=$S(H1=H2:"FOR "_H1,1:"FROM "_H1_" TO "_H2)_" STATION NO.: "_DENTSTA_" "_H6
11 W @IOF,?(80-$L(H3)\2),H3,!,?(80-$L(H5)\2),H5
12 W !!,?19,"PATIENT",?29,"PAT",?34,"BED",!,"TREATMENT DATE",?19,"SSN",?29,"CAT",?34,"SECT",?40,"TREATMENT (PROCEDURE)",?77,"NO.",! Q
13HD1 S Y=$P(X,U,1) X ^DD("DD") S Y=$$DATE^DENTA14(Y) W !,Y,?19,$P(X,U,2),?30,$J($P(X,U,19),2),?35 W:$P(X,U,19)<9 $J($P(X,U,6),2) Q
14HDR S H3="DENTAL SERVICE TREATMENT REPORT - INDIVIDUAL SITTINGS",H5=$S(H1=H2:"FOR "_H1,1:"FROM "_H1_" TO "_H2)_" STATION NO.: "_DENTSTA_" "
15 W @IOF,?(80-$L(H3)\2),H3,!,?(80-$L(H5)\2),H5
16 W !!,?19,"PROV",?25,"PATIENT",?35,"PAT",?40,"BED",!,"TREATMENT DATE",?19,"NO.",?27,"SSN",?35,"CAT",?40,"SECT",?46,"TREATMENT (PROCEDURE)",?77,"NO.",! Q
17HOLD Q:$D(ZTSK)!(IO'=IO(0)) S Z5="" R !,"Press return to continue, uparrow (^) to exit: ",Z5:DTIME Q
18HOLD3 D HOLD D:Z5'=U HD D:Z5'=U&($D(A)) HD1 K A Q
19NONE S DENTF1=1 W !,"There is no treatment data for review/release for the time frame you specified",*7 G EXIT1
20COMP W !,"There "_$S(DENTC=1:"is ",1:"are ")_DENTC_$S(DENTC=1:" sitting",1:" sittings")_" in the time frame you specified. All data is complete" Q
21COMP1 S DENTC(1)=^UTILITY($J,"DENTR",DENTPRV) W !,"There "_$S(DENTC(1)=1:"is ",1:"are ")_DENTC(1)_$S(DENTC(1)=1:" sitting",1:" sittings")_" for provider ",DENTPRV," in the time frame you specified." Q
22ERR W !!,"The treatment data for this report is incomplete/incorrect.",!,"There are ",DENTC," sittings in the time frame you specified.",!,"The following errors were found:",*7,! Q
23EXIT G EXIT1:Z5=U I $D(DENTF1) W @IOF,*7 D ERR S H="" F I=1:1 Q:Z5=U S H=$O(^UTILITY($J,"DENTERR",H)) Q:H="" F J=1:1:5 D:IOSL-($Y#IOSL)<4 HOLD Q:Z5=U W:$D(^UTILITY($J,"DENTERR",H,J)) !,^(J)
24 D:'$D(DENTF1) COMP W ! D:$D(DENTF1)&(Z5'=U) HOLD
25EXIT1 S:Z5=U DENTF1=1 K DENT,DENTED,DENTPRV,DENTSD,H,H1,H2,H3,H4,H6,H7,I,J,K,M,N,X,X1,X2 Q
Note: See TracBrowser for help on using the repository browser.