[613] | 1 | IBQLT ;LEB/MRY - TRANSMIT DATA ; 24-APR-95
|
---|
| 2 | ;;1.0;UTILIZATION MGMT ROLLUP LOCAL;**1,2**;Oct 01, 1995
|
---|
| 3 | ;;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | ;
|
---|
| 5 | I '$D(DT) D DT^DICRW
|
---|
| 6 | ;D PULL^IBQLPL
|
---|
| 7 | W !!,"Transmit Rollup Data",!
|
---|
| 8 | ;W !,"The next National Rollup will be " S Y=IBBDT X ^DD("DD") W Y_" to " S Y=IBEDT X ^DD("DD") W Y
|
---|
| 9 | ;I IBMSG'="" W !!,IBMSG,!,IBMSG1
|
---|
| 10 | ;
|
---|
| 11 | DEC95 ;; -- per Directive ....
|
---|
| 12 | ;; -- until 1/1/96, allow sites to transmit previous rollup periods.
|
---|
| 13 | ;I DT<2960101,DT<2951116 D ASK^IBQLT5 G:IBQUIT END
|
---|
| 14 | ;I DT<2960101,DT>2951115 D ASK^IBQLT5A G:IBQUIT END
|
---|
| 15 | ;
|
---|
| 16 | ; - ask user for roll-up period to be transmitted
|
---|
| 17 | D RANGE^IBQLT5 G:IBQUIT END
|
---|
| 18 | ;
|
---|
| 19 | F I="IBBDT","IBEDT" S ZTSAVE(I)=""
|
---|
| 20 | S ZTRTN="START^IBQLT",ZTDESC="IBQ - TRANSMIT ROLLUP DATA",ZTIO=""
|
---|
| 21 | W ! D ^%ZTLOAD G END
|
---|
| 22 | ;
|
---|
| 23 | START ;
|
---|
| 24 | S IBDDT=IBBDT-.01,IBCNT=0,IBREC=0
|
---|
| 25 | S IBCNT=1,^TMP("IBQLT",$J,IBCNT,0)="**"_"^"_IBBDT_"^"_IBEDT
|
---|
| 26 | F S IBDDT=$O(^IBQ(538,"ADIS",IBDDT)) Q:'IBDDT!(IBDDT>IBEDT) D
|
---|
| 27 | .S IBTRN="" F S IBTRN=$O(^IBQ(538,"ADIS",IBDDT,IBTRN)) Q:'IBTRN D DATA
|
---|
| 28 | ;
|
---|
| 29 | ; -- transmit data thru mailman handler
|
---|
| 30 | D TRANSMIT
|
---|
| 31 | ;
|
---|
| 32 | END K ^TMP("IBQLT",$J),^TMP("IBQ",$J),IBDDT,IBTRN,INTRND0,IBTRND1,IBTRND2,IBREC,IBCNT,IBBDT1,IBEDT1
|
---|
| 33 | K IBBDT,IBEDT,IBMSG,IBMSG1,IBRDT1,IBQUIT
|
---|
| 34 | Q
|
---|
| 35 | ;
|
---|
| 36 | ;
|
---|
| 37 | DATA ; -- build ^tmp($j,cnt,0) and ^tmp("ibql",$j,cnt,0) for mailman handler.
|
---|
| 38 | ; IBTRND0 = entry id^site^ssn^admitting diagnosis^enroll code^
|
---|
| 39 | ; admitting phy^attending phy^resident phy,^admission^
|
---|
| 40 | ; discharge^ward^treating specialty^acute adm?^
|
---|
| 41 | ; IBTRND1 = si from adm^is from adm^reasons from adm^
|
---|
| 42 | ; provider interviewed?^adm influenced?^rollup type^service
|
---|
| 43 | ; IBTRND2 = day^is^si^d/s^interviewed?^reasons^service
|
---|
| 44 | ;
|
---|
| 45 | I '$G(^IBQ(538,IBTRN,0))!($P(^(1),"^",6)="L") Q
|
---|
| 46 | S IBREC=IBREC+1,IBTRND0=^IBQ(538,IBTRN,0),IBTRND1=$G(^(1))
|
---|
| 47 | I '$P(IBTRND0,"^",2) S $P(IBTRND0,"^",2)=$P($$SITE^VASITE,"^")
|
---|
| 48 | ; -- null out unwanted field entries from transmission.
|
---|
| 49 | ; -- admitting phy,attending phy,resident phy,ward
|
---|
| 50 | F I=6,7,8,11 S $P(IBTRND0,"^",I)=""
|
---|
| 51 | S IBCNT=IBCNT+1,^TMP("IBQLT",$J,IBCNT,0)=IBTRND0_"^"_IBTRND1
|
---|
| 52 | ; -- continued stay reviews
|
---|
| 53 | S N=0 F S N=$O(^IBQ(538,IBTRN,13,N)) Q:'N D
|
---|
| 54 | .S IBTRND2=^IBQ(538,IBTRN,13,N,0),$P(IBTRND2,"^")=$P(IBTRND0,"^")_"."_$P(IBTRND2,"^")
|
---|
| 55 | .S IBCNT=IBCNT+1,^TMP("IBQLT",$J,IBCNT,0)=IBTRND2
|
---|
| 56 | Q
|
---|
| 57 | ;
|
---|
| 58 | TRANSMIT ;
|
---|
| 59 | ; -- transmit data to National DataBase
|
---|
| 60 | S Y=IBBDT X ^DD("DD") S IBBDT1=Y S Y=IBEDT X ^DD("DD") S IBEDT1=Y
|
---|
| 61 | S XMY("S.IBQN SERVER@ISC-CHICAGO.VA.GOV")="",XMDUZ="UTILIZATION MANAGEMENT ROLLUP MONITOR"
|
---|
| 62 | S XMTEXT="^TMP(""IBQLT"",$J,",XMSUB="Rollup Extract" D ^XMD
|
---|
| 63 | ; -- transmit local message
|
---|
| 64 | S XMY("G.IBQ ROLLUP")=""
|
---|
| 65 | S XMSUB="Rollup Extract transmitted",XMDUZ="IBQ MONITOR"
|
---|
| 66 | S ^TMP("IBQ",$J,1,0)="Utilization Management Rollup was transmitted.",^TMP("IBQ",$J,2,0)=""
|
---|
| 67 | S ^TMP("IBQ",$J,3,0)="Site: "_$P($$SITE^VASITE,"^"),^TMP("IBQ",$J,5,0)="Number of Records sent: "_IBREC
|
---|
| 68 | S ^TMP("IBQ",$J,6,0)="Period: "_IBBDT1_" - "_IBEDT1
|
---|
| 69 | S XMTEXT="^TMP(""IBQ"",$J," D ^XMD
|
---|
| 70 | Q
|
---|