source: WorldVistAEHR/trunk/r/OCCURRENCE_SCREEN-QAO/QAOSPSM5.m@ 1608

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1QAOSPSM5 ;HISC/DAD-SUMMARY OF OCCURRENCE SCREENING - PENDING ;1/14/93 14:48
2 ;;3.0;Occurrence Screen;;09/14/1993
3 K UNDL S $P(UNDL,"-",81)="",QAOSPAGE=1,%H=+$H D YX^%DTC S TODAY=Y
4 D HEAD S QAOSQUIT=0
5 I $O(^UTILITY($J,"QAOSPEND",0))'>0 W !!,"No pending occurrences found." G EXIT
6 F QAOSSCRN=0:0 S QAOSSCRN=$O(^UTILITY($J,"QAOSPEND",QAOSSCRN)) Q:QAOSSCRN'>0!QAOSQUIT D
7 . W !!,"SCREEN: ",QAOSSCRN," - ",$P($G(^QA(741.1,QAOSSCRN,0)),"^",2),!
8 . F QAOSDATE=0:0 S QAOSDATE=$O(^UTILITY($J,"QAOSPEND",QAOSSCRN,QAOSDATE)) Q:QAOSDATE'>0!QAOSQUIT S QAOSPAT="" F S QAOSPAT=$O(^UTILITY($J,"QAOSPEND",QAOSSCRN,QAOSDATE,QAOSPAT)) Q:QAOSPAT=""!QAOSQUIT D
9 .. F QAOSD0=0:0 S QAOSD0=$O(^UTILITY($J,"QAOSPEND",QAOSSCRN,QAOSDATE,QAOSPAT,QAOSD0)) Q:QAOSD0'>0!QAOSQUIT D
10 ... S QA=^UTILITY($J,"QAOSPEND",QAOSSCRN,QAOSDATE,QAOSPAT,QAOSD0)
11 ... S QAOSSN=$P(QA,"^"),QAOSKIND=$P(QA,"^",2)
12 ... S Y=QAOSDATE X ^DD("DD") W !?3,QAOSPAT,?38,QAOSSN,?52,Y,?76,QAOSKIND
13 ... I $Y>(IOSL-6),$Q(^UTILITY($J,"QAOSPEND",QAOSSCRN,QAOSDATE,QAOSPAT,QAOSD0))[($J_",""QAOSPEND"",") D PAUSE:$E(IOST)="C",HEAD:QAOSQUIT'>0
14 ... Q
15 .. Q
16 . Q
17EXIT D:($E(IOST)="C")&(QAOSQUIT'>0) PAUSE
18 Q
19HEAD W @IOF,!!?31,"PENDING OCCURRENCES",?68,TODAY
20 W !?68,"PAGE: ",QAOSPAGE,!
21 W !,"Type 1 - Clinical action of 'Refer to Peer Review', but no Peer review was found"
22 W !,"Type 2 - Peer review(s) found for service(s), but none are marked as being final"
23 W !!?3,"PATIENT",?38,"SSN",?52,"DATE OF OCCURRENCE",?74,"TYPE",!,UNDL
24 S QAOSPAGE=QAOSPAGE+1
25 Q
26PAUSE K DIR S DIR(0)="E" D ^DIR K DIR S QAOSQUIT=$S(Y'>0:1,1:0)
27 Q
Note: See TracBrowser for help on using the repository browser.