source: FOIAVistA/tag/r/DENTAL-DEN/DENTAR.m@ 1162

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1DENTAR ;ISC2/SAW,HAG-RELEASE DENTAL SERVICE REPORTS FOR TRANSMISSION TO AUSTIN ;9/11/89 15:57 ;11/24/87 9:51 AM
2 ;;1.2;DENTAL;**2,8,24,25**;JAN 26, 1989
3 D:'$D(DT) DT^DICRW S %O="OPT",U="^",S=";",O=$T(@(%O)),DENTV=$$VERSION^XPDUTL("DENT") I $D(^DOPT($P(O,S,5),"VERSION")),(DENTV=^DOPT($P(O,S,5),"VERSION")) G IN
4 K ^DOPT($P(O,S,5))
5 F I=1:1 Q:$T(@(%O)+I)="" S ^DOPT($P(O,S,5),I,0)=$P($T(@(%O)+I),S,3),^DOPT($P(O,S,5),"B",$P($P($T(@(%O)+I),S,3),"^",1),I)=""
6 S K=I-1,^DOPT($P(O,S,5),0)=$P(O,S,4)_U_1_U_K_U_K K I,K,X S ^DOPT($P(O,S,5),"VERSION")=DENTV
7IN I $P(O,S,6)'="" D @($P(O,S,6))
8PR S O=$T(@(%O)),S=";" S IOP=$I D ^%ZIS W:IOST'["PK-" @IOF K IOP
9 I $P(O,S,7)'="" D @($P(O,S,7))
10 E W !!,$P(O,S,3),":",!,$$VERSION^XPDUTL("DENT")," ",$P($T(+1),S,1),!!,$P(O,S,4),"S:",!
11 F J=1:1 Q:'$D(^DOPT($P(O,S,5),J,0)) S K=$S(J<10:15,1:14) W !,?K,J,". ",$P(^DOPT($P(O,S,5),J,0),U,1)
12RE W ! S DIC("A")="Select "_$P($T(OPT),S,4)_": EXIT// ",DIC="^DOPT("_""""_$P($T(OPT),S,5)_""""_",",DIC(0)="AEQMN" D ^DIC G:X=""!(X=U) EXIT G:Y<0 RE K DIC,J,O D @($P($T(OPT+Y),S,4)) G PR
13ALL D ^DENTARA G CLOSE
14ADM S X1=3,X3=223,X4="I $P(^(0),U,29)=DENTSTA&$S('$D(^(.1)):1,1:$P(^(.1),U,1)="""")" G REL
15PERS S X1=4,X3=224,X4="I $P(^(0),U,10)=DENTSTA&$S('$D(^(.1)):1,1:$P(^(.1),U,1)="""")" G REL
16FEE S X1=5,X3=222,X4="I $P(^(0),U,28)=DENTSTA&$S('$D(^(.1)):1,1:$P(^(.1),U,1)="""")"
17REL W !! S U="^",Z1=0 G:'$D(^DENT(225,0)) W F Z2=0:1:2 S Z1=$O(^(Z1)) Q:Z1'>0 S K2=Z1
18 G:Z2=0 W I Z2>1 S DIC="^DENT(225,",DIC(0)="AEMNQZ",DIC("A")="Select STATION.DIVISION: " S:$D(DENTSTA) DIC("B")=$S(DENTSTA[" ":+DENTSTA,1:DENTSTA) D ^DIC G EXIT:Y<0 K DIC("A"),DIC("B")
19 S Z=$S(Z2=1:K2,1:+Y) S (DENTSTA,Z2)=$P(^DENT(225,Z,0),U,1) G W:DENTSTA=""
20 S DIC="^DENT("_X3_",",DIC(0)="AEMQZ",DIC("S")=X4 D ^DIC G EXIT:Y<0 S DENT1=+Y,DENTY0=Y(0) K DIC("S")
21 S:$L(DENTSTA)=3 DENTSTA=DENTSTA_" " S (DENT,Z)=$P(Y(0),U,1),Z1=1700+$E(Z,1,3),Z=+$E(Z,4,5)+2,Z=$P($T(DATE),";",Z),Z1=Z_" "_Z1
22 S X2="^DENTAR"_X1,%ZIS="MQ" K IO("Q") D ^%ZIS G EXIT:IO=""
23 I $D(IO("Q")) S ZTRTN="QUE^DENTAR",ZTSAVE("DENT*")="",ZTSAVE("X2")="",ZTSAVE("DENTY0")="",ZTSAVE("Z1")="",ZTSAVE("Z2")="",ZTSAVE("U")="" D ^%ZTLOAD K ZTSK,ZTRTN,ZTSAVE G CLOSE
24QUE U IO D @X2 U IO(0) G CLOSE:$D(ZTSK)!(IO'=IO(0))!($D(DENTF))!($E(IOST)'="C")
25A W !!,"Okay to release this report for transmission to Austin" S %=2 D YN^DICN D:%=0 Q4^DENTQ G A:%=0 I %'=1 W !,"Nothing released",*7 G CLOSE
26EN1 S DENT=DENT_" ",DENT=$E(DENT,1,80),DENT=DENT_"$"
27 S DENTA=$S($E(DENTSTA,4,5)=" ":+DENTSTA,1:DENTSTA),DENTA=$O(^DENT(225,"B",DENTA,0))
28 I DENTA,$D(^DENT(225,DENTA,0)),$P(^(0),"^",3)="Y" S XMDUZ=DUZ,XMY(DUZ)="",XMY("XXX@Q-DAS.VA.GOV")="",XMSUB=Z1_", "_Z3,X(1,0)=DENT,XMTEXT="X(" D ^XMD G M
29 S Z=$S($D(^UTILITY("DENTV")):^("DENTV")+1,1:1),^UTILITY("DENTV",Z,0)=DENT,^UTILITY("DENTV")=Z
30M S ^DENT(X3,DENT1,.1)=DUZ_"^"_DT I X3=224 S X="" F I=0:0 S X=$O(^UTILITY($J,"DENTP",X)) Q:X="" S X1=$P(^(X),".",1),^DENT(226,X,.1)=DUZ_"^"_DT K ^DENT(226,"A",Z2,X1,X)
31 R !!,"Report released for transmission to Austin",R1:5
32 G CLOSE
33W W !!,"Stations have not been entered in the Dental Site Parameter file.",!,"You must enter a station before you can use this option" G EXIT
34DATE ;;JANUARY;FEBRUARY;MARCH;APRIL;MAY;JUNE;JULY;AUGUST;SEPTEMBER;OCTOBER;NOVEMBER;DECEMBER
35CLOSE X ^%ZIS("C")
36EXIT K %,A,DENT,DENTA,DENT1,DENT2,DENTF,DENTV,DENTY0,DIC,I,J,K,K2,O,R1,S,X,X1,X2,X3,X4,XMDUZ,XMSUB,XMTEXT,XMY,Y,Z,Z1,Z2,Z3,^UTILITY($J,"DENTP"),ZTRTN,ZTSAVE K:$D(ZTSK) ^%ZTSK(ZTSK),ZTSK Q
37OPT ;;RELEASE SERVICE REPORTS;OPTION;DENTAR
38 ;;TREATMENT DATA REVIEW/RELEASE MENU;^DENTAR1
39 ;;CLASS I-VI ADMIN INFO (TYPE 3);ADM
40 ;;PERSONNEL INFO (TYPE 4);PERS
41 ;;APPLICATIONS AND DENTAL FEE (TYPE 5);FEE
42 ;;RELEASE ALL SERVICE REPORTS;ALL
43 ;;CHECK DUPLICATE FOR SITTINGS;^DENTDUP
Note: See TracBrowser for help on using the repository browser.