source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EAS1A58.m@ 1704

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1EAS1A58 ;ALB/PJR/EG - INVALID ENTRIES - EAS MT LETTER FILE ; 2/18/05 7:28 AM
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**58**; 21-OCT-94
3 ;This post install routine checks the EAS MT Letter File (713.3)
4 ;for the possible existence of entries for 20 and 40 day letters.
5 ;If found, these entries will be deleted.
6 Q
7 ;
8EP ;Entry point
9 N DA,DIE,DR,X,ZBBB,ZCNT,ZDATE,ZNUM,PURDAT,BEGTIME
10 ;capture beginning date/time and get purge date
11 S BEGTIME=$$NOW^XLFDT()
12 S PURGDT=$$FMADD^XLFDT(BEGTIME,15)
13 S ZCNT=0,ZDATE=$$DT^XLFDT
14 S $P(^XTMP("EAS1A58","DATE"),U)=$$FMTE^XLFDT($$NOW^XLFDT(),"5P")
15 ;Check EAS MT Letter File
16 F ZNUM=20,40 S ZBBB=$O(^EAS(713.3,"B",ZNUM_" ")) D
17 .I $E(ZBBB,1,2)=ZNUM,ZBBB["DAY",ZBBB["LETTER",$E(ZBBB,3)'?1N D
18 ..S DA=$O(^EAS(713.3,"B",ZBBB,0)) I 'DA Q
19 ..S DIE=713.3,DR=".01////@" D ^DIE S ZCNT=ZCNT+1 Q
20 S $P(^XTMP("EAS1A58","DATE"),U,2)=$$FMTE^XLFDT($$NOW^XLFDT(),"5P")
21 S ZDATE=$$DT^XLFDT
22 D EA58 S ^XTMP("EAS1A58",0)=PURGDT_U_BEGTIME_U_X_U_ZCNT_U_ZDATE
23 S ^XTMP("EAS1A58","COMPLETED")=1 D MSG
24 Q
25 ;
26 ;
27MSG ;create bulletin message in install file.
28 N TXT S (TXT(3),TXT(5))=" "
29 S TXT(1)="This patch checked the EAS MT Letter File (713.3)"
30 S TXT(2)="for the existence of entries for 20 and 40 day letters."
31 I ZCNT D SOME
32 I 'ZCNT D NONE
33 D BMES^XPDUTL(.TXT)
34 Q
35SOME ;
36 I ZCNT=1 S TXT(4)="One entry was removed. The process is complete." Q
37 S TXT(4)=ZCNT_" entries were removed. The process is complete."
38 Q
39NONE ;
40 S TXT(4)="No such entries were found. No action was necessary."
41 Q
42 ;
43EA58 S X="EAS*1.0*58 Invalid Entries in EAS MT Letter File" Q
Note: See TracBrowser for help on using the repository browser.