source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCDXSUP2.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1SCDXSUP2 ;ALB/JRP - PURGE ERROR FILE;22-APR-97 ; 12/20/01 4:49pm
2 ;;5.3;Scheduling;**121,247**;AUG 13, 1993
3 ;
4PRGCO ;Purge TRANSMITTED OUTPATIENT ENCOUNTER ERROR file (#409.75) of
5 ; rejections for encounters that can not be transmitted due to
6 ; NPCD Database Close-Out
7 ;
8 ;Input : None
9 ;Output : None
10 ;
11 ;Declare variables
12 N ZTRTN,ZTDESC,ZTIO,ZTDTH,ZTSK,DIR,Y,X,DTOUT,DUOUT,DIRUT
13 ;'Are you sure' prompt
14 S DIR("A",1)=" "
15 S DIR("A",2)="This option will purge entries in the TRANSMITTED OUTPATIENT"
16 S DIR("A",3)="ENCOUNTER ERROR file (#409.75) of rejections for encounters that"
17 S DIR("A",4)="can not be transmitted due to close-out of the National Patient"
18 S DIR("A",5)="Care Database for database credit."
19 S DIR("A",6)=" "
20 S DIR("A")="Ok to continue"
21 S DIR("B")="NO"
22 S DIR(0)="Y"
23 D ^DIR
24 Q:('Y)
25 ;Task (no device needed)
26 S ZTRTN="PRGCOT^SCDXSUP2"
27 S ZTDESC="Purge file #409.75 of encounters that won't get database credit"
28 S ZTIO=""
29 S ZTDTH=""
30 D ^%ZTLOAD
31 W:($G(ZTSK)) !!,"Scheduled as task number ",ZTSK
32 W:('$G(ZTSK)) !!,"** Unable to schedule correctly **"
33 Q
34 ;
35PRGCOT ;Task entry point (self contained)
36 ;Declare variables
37 N XMITPTR
38 ;Loop through 'B' x-ref
39 S XMITPTR=0
40 F S XMITPTR=+$O(^SD(409.75,"B",XMITPTR)) Q:('XMITPTR) D Q:($$S^%ZTLOAD())
41 .;Determine if encounter can be transmitted for database credit
42 .Q:+$$XMIT4DBC^SCDXFU04(XMITPTR)<4 ;SD*5.3*247
43 .;Won't received database credit - delete all errors for encounter
44 .D DELAERR^SCDXFU02(XMITPTR)
45 ;Done
46 S:($D(ZTQUEUED)) ZTREQ="@"
47 Q
Note: See TracBrowser for help on using the repository browser.