source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWGAPIF.m@ 1270

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1ORWGAPIF ; SLC/STAFF - Graph Fast Data Retrieval ;11/1/06 12:49
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
3 ;
4FASTDATA(DATA,DFN) ; from ORWGAPI
5 I '$G(DFN) Q
6 D FAST(.DATA,DFN,"ALL DATA")
7 Q
8 ;
9FASTITEM(DATA,DFN) ; from ORWGAPI
10 I '$G(DFN) Q
11 D FAST(.DATA,DFN,"ALL ITEMS")
12 Q
13 ;
14FASTLABS(DATA,DFN) ; from ORWGAPI
15 I '$G(DFN) Q
16 D FAST(.DATA,DFN,"ALL LABS")
17 Q
18 ;
19FAST(DATA,DFN,SOURCE) ;
20 I '$L($G(^XTMP("ORGRAPH",0))) Q
21 I '$G(DFN) Q
22 I '$G(DUZ) Q
23 N OK,PATUSER
24 S PATUSER=DFN_U_DUZ
25 S OK=0
26 I $L($O(^XTMP("ORGRAPH",SOURCE,PATUSER,""))) S OK=1
27 D LOG(DFN,DUZ,SOURCE)
28 I 'OK Q
29 L +^XTMP("ORGRAPH",SOURCE,PATUSER):3 I '$T Q ; wait 3 sec for merge
30 S DATA=$NA(^XTMP("ORGRAPH",SOURCE,PATUSER))
31 L -^XTMP("ORGRAPH",SOURCE,PATUSER)
32 Q
33 ;
34LOG(DFN,USER,SOURCE) ;
35 N GOLD,GNOW,GSTAMP,PATUSER,LINE,SIZE
36 S GOLD=$G(^XTMP("ORGDATA","QT",USER_U_DFN))
37 I 'GOLD Q
38 S GSTAMP=GOLD_U_USER_U_DFN
39 S PATUSER=DFN_U_USER
40 I '$D(^XTMP("ORGDATA","Q",GSTAMP)) Q
41 S GNOW=$$MNOW^ORWGTASK
42 S SIZE=0
43 S LINE=""
44 F S LINE=$O(^XTMP("ORGRAPH",SOURCE,PATUSER,LINE)) Q:LINE="" D
45 . S SIZE=$L(^XTMP("ORGRAPH",SOURCE,PATUSER,LINE))+SIZE
46 I SOURCE="ALL ITEMS" D Q
47 . S $P(^XTMP("ORGDATA","Q",GSTAMP),U,13)=SIZE
48 . I $P($G(^XTMP("ORGDATA","Q",GSTAMP)),U,10)<1 D
49 .. D GSTAMP^ORWGTASK(GSTAMP,GOLD,GNOW,9)
50 . S $P(^XTMP("ORGDATA","Q",GSTAMP),U,10)=(1+$P($G(^XTMP("ORGDATA","Q",GSTAMP)),U,10))
51 I SOURCE="ALL LABS" D Q
52 . S $P(^XTMP("ORGDATA","Q",GSTAMP),U,14)=SIZE
53 . D GSTAMP^ORWGTASK(GSTAMP,GOLD,GNOW,11)
54 I SOURCE="ALL DATA" D Q
55 . S $P(^XTMP("ORGDATA","Q",GSTAMP),U,15)=SIZE
56 . D GSTAMP^ORWGTASK(GSTAMP,GOLD,GNOW,12)
57 Q
58 ;
Note: See TracBrowser for help on using the repository browser.