source: WorldVistAEHR/trunk/r/UTILIZATION_MGMT_ROLLUP_LOCAL-IBQ/IBQLPL3.m@ 862

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1IBQLPL3 ;LEB/MRY - PATIENTS QUALIFY/MISSING LIST ; 18-AUG-95
2 ;;1.0;UTILIZATION MGMT ROLLUP LOCAL;**1**;Oct 01, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5ORDCHK ; -- edit check the UR procedure in entering reviews (.001 errors).
6 S (IBTRV,IB001)=0 K IBORDER
7 F S IBTRV=$O(^IBT(356.1,"C",IBTRN,IBTRV)) Q:'IBTRV D
8 .S IBTRVD=$G(^IBT(356.1,IBTRV,0)) I '+IBTRVD D S IB001=1
9 ..S IBERR="Bad cross-reference in Reviews (#"_IB(.01)_")"
10 ..S ^TMP("IBQLPL",$J,IB(1.06),IBDDT,IB(.03),.001)=IBERR
11 .; -- ignore INACTIVE review entries.
12 .I '$P(IBTRVD,"^",19)!'$P(IBTRVD,"^",21) Q
13 .I '$P(IBTRVD,"^",3) D S IB001=1
14 ..S IBERR="No DAY entered in Reviews (#"_IB(.01)_")"
15 ..S ^TMP("IBQLPL",$J,IB(1.06),IBDDT,IB(.03),.002)=IBERR
16 .I $D(IBORDER(+$P(IBTRVD,"^",3))) D S IB001=1
17 ..S IBERR="Review entries contain same DAY (#"_IB(.01)_")"
18 ..S ^TMP("IBQLPL",$J,IB(1.06),IBDDT,IB(.03),.003)=IBERR
19 .I 'IB001 S IBORDER($P(IBTRVD,"^",3))=IBTRV
20 S IBDAY=0
21 F IBCNT=1:1 S IBDAY=$O(IBORDER(IBDAY)) Q:'IBDAY D
22 .I IBDAY'=IBCNT D S IB001=1
23 ..S IBERR="DAY entries not in consecutive order (#"_IB(.01)_")"
24 ..S ^TMP("IBQLPL",$J,IB(1.06),IBDDT,IB(.03),.004)=IBERR
25 ;
26END ; -- clean up
27 I $O(^TMP("IBQLPL",$J,IB(1.06),IBDDT,IB(.03),0)) S ^TMP("IBQLPL",$J,IB(1.06),IBDDT,IB(.03))=IBNAM
28 K IBDAY,IBCNT
29 Q
Note: See TracBrowser for help on using the repository browser.