source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMTOFA1.m@ 700

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

initial load of WorldVistAEHR

File size: 2.2 KB
RevLine 
[613]1DGMTOFA1 ;ALB/CAW - Output for Means/Copay Test List/Letter ; 8/24/92
2 ;;5.3;Registration;**19,33,166,182**;Aug 13, 1993
3 ;
4 ;
5EN S (DGTMP,DGTMP1,DGTMP2,DGTMP3)="",(DGSTOP,DGPAGE)=0,$P(DGLINE,"-",IOM+1)=""
6 I '$D(^TMP("DGMTO",$J)) D HDR W !!,"THERE ARE NO PATIENTS THAT WILL NEED A "_$S(DGMTYPT=1:"MEANS",1:"COPAY")_" TEST AT THEIR NEXT APPOINTMENT FOR THIS DATE RANGE" Q
7 F S DGTMP=$O(^TMP("DGMTO",$J,DGTMP)) Q:'DGTMP!(DGSTOP) F S DGTMP1=$O(^TMP("DGMTO",$J,DGTMP,DGTMP1)) Q:DGTMP1=""!(DGSTOP) D HDR D Q:DGSTOP W:$E(IOST,1)="P" @IOF I $E(IOST,1,2)="C-" D PAUSE G ENQ:'Y
8 .F S DGTMP2=$O(^TMP("DGMTO",$J,DGTMP,DGTMP1,DGTMP2)) Q:DGTMP2=""!(DGSTOP) F S DGTMP3=$O(^TMP("DGMTO",$J,DGTMP,DGTMP1,DGTMP2,DGTMP3)) Q:'DGTMP3!(DGSTOP) S DGINFO=^(DGTMP3) D Q:DGSTOP
9 ..S:$P(DGINFO,U,5)="P" $P(DGINFO,U,4)="PEND. ADJ." S DFN=+DGINFO D PID^VADPT
10 ..S SDAPTYP=$P($G(^SD(409.1,+$P(DGINFO,U,6),0)),U,4)
11 ..S DGNXTMT=$P(DGINFO,U,7),DGNXTMT=$$FDATE^DGMTUTL($E(DGNXTMT,1,12))
12 ..W !,$E(DGTMP2,1,15),?17,VA("PID"),?29,$$FDATE^DGMTUTL($E(DGTMP3,1,12)),?46,SDAPTYP,?50,$P(DGINFO,U,4),?59,$S($P(DGINFO,U,2)="":"",1:$$FDATE^DGMTUTL($P(DGINFO,U,3)))
13 ..W ?70,DGNXTMT
14 ..D CHK
15 D LETTER
16ENQ Q
17 ;
18HDR ; Header
19 U IO W:$E(IOST,1,2)["C-" @IOF
20 S DGPAGE=DGPAGE+1
21 I DGMTYPT=1 W "Patients Requiring Means Test At Next Appointment"
22 I DGMTYPT=2 W "Copay Exemptions That Will Need Updating At Next Appointment"
23 W ?70,"Page: "_DGPAGE
24 W !,"Date Range: "_$$FDATE^DGMTUTL(DGBEG)_" to "_$$FDATE^DGMTUTL($P(DGEND,".")) D NOW^%DTC W ?51,"Run Date: "_$E($$FDATE^DGMTUTL(%),1,20)
25 I $D(^TMP("DGMTO",$J)) D
26 .W !!,"","CLINIC: "_DGTMP1,?50,"DIVISION: "_$P($$SITE^VASITE(DGBEG,DGTMP),U,2)
27 .W !!?46,"APPT",?59,"INCOMPLETE",?70,"FUTURE"
28 .W !,"PATIENT",?17,"PATIENT ID",?29,"APPT DATE/TIME",?46,"TYPE",?51,"STATUS",?59,"TEST",?70," TEST"
29 W !,DGLINE
30 Q
31 ;
32CHK ;Check to pause on screen
33 I ($Y+5)>IOSL,$E(IOST,1,2)="C-" D PAUSE S DGP=Y D:DGP HDR I 'DGP S DGSTOP=1 Q
34 I $E(IOST,1,2)="P-",($Y+5)>IOSL W @IOF D HDR Q
35 Q
36PAUSE ;
37 W ! S DIR(0)="E" D ^DIR K DIR W !
38 Q
39 ;
40LETTER ; Check and print letter
41 I $D(DGYN),DGYN S (DGTMP,DFN)="" D
42 .;F S DGTMP=$O(^TMP("DGMTL",$J,DGTMP)) Q:DGTMP="" F S DFN=$O(^TMP("DGMTL",$J,DGTMP,DFN)) Q:'DFN D CHECK^DGMTLTR
43 Q
Note: See TracBrowser for help on using the repository browser.