source: FOIAVistA/trunk/r/OCCURRENCE_SCREEN-QAO/QAOSPDQ1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1QAOSPDQ1 ;HISC/DAD-DELINQUENT REVIEWS REPORT ;9/14/92 10:39
2 ;;3.0;Occurrence Screen;;09/14/1993
3 S QAOSQUIT=0,PAGE=1,X="T",%DT="" D ^%DT X ^DD("DD") S TODAY=Y K UNDL S $P(UNDL,"-",81)="" D HEAD
4 I '$D(^TMP($J,"QAOSPDQ")) W !!,"NO DATA FOUND FOR THIS REPORT" G EXIT
5 S QAOSSERV="" F QAOSSERV(0)=0:0 S QAOSSERV=$O(^TMP($J,"QAOSPDQ",QAOSSERV)) Q:QAOSSERV=""!QAOSQUIT D LOOP1
6EXIT ;
7 Q
8LOOP1 ;
9 W !!?3,"SERVICE: ",$S(QAOSSERV["~":$P(QAOSSERV,"~",2),1:QAOSSERV),! D CHK
10 S QAOSNAME="" F QAOSNAME(0)=0:0 S QAOSNAME=$O(^TMP($J,"QAOSPDQ",QAOSSERV,QAOSNAME)) Q:QAOSNAME=""!QAOSQUIT F QAOSDATE=0:0 S QAOSDATE=$O(^TMP($J,"QAOSPDQ",QAOSSERV,QAOSNAME,QAOSDATE)) Q:QAOSDATE'>0!QAOSQUIT D LOOP2
11 Q
12LOOP2 ;
13 S QAOS=^TMP($J,"QAOSPDQ",QAOSSERV,QAOSNAME,QAOSDATE),Y=QAOSDATE\1 X ^DD("DD") S QAOSDT=Y,Y=$P(QAOS,"^",3) X ^DD("DD") S QAOSPDUE=Y,Y=$P(QAOS,"^",4) X ^DD("DD") S QAOSMDUE=Y,QAOSSCRN=$P(QAOS,"^"),QAOSSN=$P(QAOS,"^",2)
14 W !,QAOSNAME,?32,QAOSDT,?45,QAOSSCRN,?53,QAOSPDUE,?68,QAOSMDUE D CHK W !,QAOSSN S (QAOSP,QAOSM)=.0001
15LOOP3 ;
16 D PLOOP:QAOSP,MLOOP:QAOSM W ! D CHK G:(QAOSQUIT'>0)&(QAOSP+QAOSM) LOOP3
17 Q
18PLOOP ;
19 S QAOSP=$O(^TMP($J,"QAOSPDQ",QAOSSERV,QAOSNAME,QAOSDATE,"P",QAOSP)) Q:QAOSP'>0 S Y=^TMP($J,"QAOSPDQ",QAOSSERV,QAOSNAME,QAOSDATE,"P",QAOSP) X ^DD("DD") W ?53,$S(Y]"":Y,1:" ---")
20 Q
21MLOOP ;
22 S QAOSM=$O(^TMP($J,"QAOSMDQ",QAOSSERV,QAOSNAME,QAOSDATE,"M",QAOSM)) Q:QAOSM'>0 S Y=^TMP($J,"QAOSMDQ",QAOSSERV,QAOSNAME,QAOSDATE,"M",QAOSM) X ^DD("DD") W ?53,$S(Y]"":Y,1:" ---")
23 Q
24CHK ;
25 I $Y>(IOSL-6) D:$E(IOST)="C" PAUSE Q:QAOSQUIT D HEAD
26 Q
27PAUSE ;
28 K DIR S DIR(0)="E" D ^DIR S QAOSQUIT=$S(Y'>0:1,1:0)
29 Q
30HEAD ;
31 W:(PAGE>1)!($E(IOST)="C") @IOF
32 W !!?31,"DELINQUENT REVIEWS",?68,TODAY,!?31,"AS OF ",TODAY,?68,"PAGE: ",PAGE,!?QAQTART,QAQ2HED S PAGE=PAGE+1 D EN6^QAQAUTL
33 W !,"PATIENT",?32,"OCCURRENCE",?45,"SCREEN",?53,"PEER:",?68,"MANAGEMENT:",!,"SSN",?32,"DATE",?53,"DUE DATE",?68,"DUE DATE",!?53,"COMPLETED",?68,"COMPLETED",!,UNDL
34 Q
Note: See TracBrowser for help on using the repository browser.