source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRMITSP.m@ 1336

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1LRMITSP ;SLC/STAFF - MICRO TREND PROCESS ;3/4/93 16:59
2 ;;5.2;LAB SERVICE;**96**;Sep 27, 1994
3 ; LRATS inverse start time
4 ; LRFBEG formatted begin time
5 ; LRFEND formatted end time
6 ; LRTSAL inverse end time
7 ;
8DQ ; dequeued from LRMITS
9 ; initialize variables
10 S:$D(ZTQUEUED) ZTREQ="@" K ^TMP($J)
11 S LRFBEG=$$FMTE^XLFDT(LRTBEG),LRFEND=$$FMTE^XLFDT(LRTEND),LRTEND=$S($E(LRTEND,6,7)="00":LRTEND+99,1:LRTEND+.24) ;,LRTEND=$E(LRTEND,1,5)_99
12 S LRATS=9999999-LRTBEG,LRTSAL=9999999-LRTEND
13 D ^LRMITSRS
14 S LRDN=0 F S LRDN=$O(^LAB(62.06,"AD",LRDN)) Q:LRDN<2 S LRANTIN=$O(^(LRDN,0)) I LRANTIN D
15 .S LRX=$G(^LAB(62.06,LRANTIN,0)),LRANTINM=$P(LRX,U,5) Q:'$L(LRANTINM)
16 .S LRANTIF=$S($P(LRX,U,4):+$P(LRX,U,4),1:"") I LRANTIF S LRANTIF=$$VALUE^LRMITSPE(LRANTIF,62.06,5) I $L(LRANTIF) S LRANTIF=$E(LRANTIF)_$$LOW^XLFSTR($E(LRANTIF,2,99))
17 .S ^TMP($J,"A",LRDN)=LRANTIN_U_LRANTINM,^TMP($J,"AB",LRANTINM)=LRDN_U_LRANTIF
18 .S:LRSORT ^TMP($J,"PSRT",$P(LRX,U,7))=LRANTINM
19 S LRDN=2 F S LRDN=$O(^DD(63.39,"GL",LRDN)) Q:LRDN<2 S LRANTIN=$O(^(LRDN,1,0)) I LRANTIN D
20 .S LRX=$G(^DD(63.39,LRANTIN,0)),LRANTINM=$P(LRX,U) Q:'$L(LRANTINM)
21 .S ^TMP($J,"T",LRDN)=LRANTINM
22 K LRANTIF,LRANTIN,LRANTINM,LRDN,LRTBEG,LRTEND,LRX
23 ; extract data
24 D ^LRMITSPE I LREND Q
25 ; count and merge data
26 D ^LRMITSPC I LREND Q
27 ; report data
28 D ^LRMITSR
29 D CLEANUP^LRMITS
30 Q
Note: See TracBrowser for help on using the repository browser.