source: WorldVistAEHR/trunk/r/HOSPITAL_BASED_HOME_CARE-HBH/HBHCRXMT.m@ 660

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1HBHCRXMT ; LR VAMC(IRMS)/MJT-HBHC Re-transmit previous MM (100 rec @ 125 chars ea, max) using ^HBHC(634) data, transmit/Austin, & set re-transmit batch initial MM msg no & re-transmit MM date in ^HBHC(631/632) ;9204
2 ;;1.0;HOSPITAL BASED HOME CARE;**2,6**;NOV 01, 1993
3 I ($D(^HBHC(634.1,"B")))!($D(^HBHC(634.2,"B")))!($D(^HBHC(634.3,"B")))!($D(^HBHC(634.5,"B"))) W *7,!!,"Records containing errors exist and must be corrected before file can",!,"be transmitted.",!! H 3 Q
4 I '$D(^HBHC(634,"B")) W *7,!!,"No data on file to transmit." H 3 Q
5EN ; Entry point
6 W !!,"This option re-transmits the same data included in the last file created for",!,"transmission to Austin. It should only be run under special circumstances and",!,"should be coordinated with Austin. Do you wish to continue"
7 S %=2 D YN^DICN
8 I %=0 W !!,"A 'Yes' response will re-transmit the file to Austin. A 'No' response will",!,"return to the menu without any data being transmitted." G EN
9 G:%'=1 EXIT
10 W *7,!!,"Re-transmission request has been queued.",!! H 3
11 S ZTRTN="DQ^HBHCRXMT",ZTIO="",ZTDTH=$H,ZTDESC="HBPC Re-Transmit" D ^%ZTLOAD,^%ZISC Q
12DQ ; De-queue
13 K XMZ,%DT,^TMP("HBHC",$J)
14 S X="T" D ^%DT S HBHCDT=Y,HBHCDATE=$E(HBHCDT,4,5)_"/"_$E(HBHCDT,6,7)_"/"_$E(HBHCDT,2,3)
15 S (HBHCCNT,HBHCFLG,HBHCNODE)=0,HBHCMSG=1
16 F S HBHCNODE=$O(^HBHC(634,HBHCNODE)) D:(HBHCCNT>99)!(HBHCNODE'>0) MAIL Q:HBHCNODE'>0 S HBHCCNT=HBHCCNT+1,^TMP("HBHC",$J,HBHCMSG,HBHCNODE,0)=^HBHC(634,HBHCNODE,0)
17EXIT ; Exit module
18 K DA,DIE,DR,HBHCCNT,HBHCDAT,HBHCDATE,HBHCDT,HBHCFLG,HBHCMSG,HBHCNODE,HBHCZ,XMSUB,XMTEXT,XMY,XMZ,X,Y,%,%DT,^TMP("HBHC",$J)
19 Q
20MAIL ; Send mail message
21 S XMSUB="HBHC Site: "_$S($P(^HBHC(631.9,1,0),U,5)]"":$E($P($G(^DIC(4,$P(^HBHC(631.9,1,0),U,5),99)),U),1,3),1:"")_" Message: "_HBHCMSG_" "_HBHCDATE_" Transmission",XMTEXT="^TMP(""HBHC"",$J,HBHCMSG,",XMY("XXX@Q-HBH.VA.GOV")=""
22 D ^XMD
23 S HBHCMSG=HBHCMSG+1,HBHCCNT=0
24LOOP ; Loop thru ^HBHC(631,"AG") (Form 3 Mail Message Date), ^HBHC(631,"AH") (Form 5 Mail Message Date), & ^HBHC(632,"AD") (Form 4 Mail Message Date) cross-refs
25 ; set re-transmit batch initial MM msg no & re-transmit mailman date fields in ^HBHC(631/632)
26 Q:HBHCFLG
27 S HBHCDAT=$P($G(^HBHC(631.9,1,0)),U,2)
28 Q:HBHCDAT=""
29 S DIE="^HBHC(631,"
30 S DR="83///^S X=XMZ;84///^S X=HBHCDT",DA="" F S DA=$O(^HBHC(631,"AG",HBHCDAT,DA)) Q:DA="" D ^DIE
31 S DR="85///^S X=XMZ;86///^S X=HBHCDT",DA="" F S DA=$O(^HBHC(631,"AH",HBHCDAT,DA)) Q:DA="" D ^DIE
32 S DIE="^HBHC(632,",DR="13///^S X=XMZ;14///^S X=HBHCDT",DA="" F S DA=$O(^HBHC(632,"AD",HBHCDAT,DA)) Q:DA="" D ^DIE
33 S HBHCFLG=1
34 Q
Note: See TracBrowser for help on using the repository browser.