source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWGAPI7.m@ 808

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1ORWGAPI7 ; SLC/STAFF - Graph Data ;12/21/05 08:17
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
3 ;
4 ;
5BCMA(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
6 N DATE,NODE,RESULT,VALUE
7 S DATE="",CNT=$G(CNT),BACKTO=+$G(BACKTO)
8 F S DATE=$O(^PSB(53.79,"AOIP",DFN,ITEM,DATE)) Q:DATE="" D
9 . I DATE>START Q
10 . I DATE<BACKTO Q
11 . S NODE=""
12 . F S NODE=$O(^PSB(53.79,"AOIP",DFN,ITEM,DATE,NODE)) Q:NODE="" D
13 .. S VALUE=$P($G(^PSB(53.79,NODE,0)),U,9) I VALUE'="G" Q
14 .. S RESULT=53.79_U_ITEM_U_DATE_"^^"
15 .. D SETUP^ORWGAPIW(.DATA,RESULT,TMP,.CNT)
16 Q
17 ;
18INRX(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
19 N DATE,DATE2,NODE,RESULT,VALUE K VALUE
20 S DATE="",CNT=$G(CNT),BACKTO=+$G(BACKTO)
21 F S DATE=$O(^PXRMINDX(55,"PI",DFN,ITEM,DATE)) Q:DATE="" D
22 . I DATE>START Q
23 . I DATE<BACKTO Q
24 . S DATE2=""
25 . F S DATE2=$O(^PXRMINDX(55,"PI",DFN,ITEM,DATE,DATE2)) Q:DATE2="" D
26 .. S NODE=""
27 .. F S NODE=$O(^PXRMINDX(55,"PI",DFN,ITEM,DATE,DATE2,NODE)) Q:NODE="" D
28 ... D RXIN^ORWGAPIC(NODE,.VALUE) S VALUE=VALUE("STAT")
29 ... S VALUE=VALUE_" "_$$INSIG^ORWGAPIC(NODE)
30 ... S RESULT=55_U_ITEM_U_DATE_U_DATE2_U_VALUE
31 ... D SETUP^ORWGAPIW(.DATA,RESULT,TMP,.CNT)
32 Q
33 ;
34NVA(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
35 D NVA3^ORWGAPIE(.DATA,ITEM,START,DFN,.CNT,.TMP)
36 Q
37 ;
38OUTRX(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
39 N DATE1,DATE2,LNUM,NODE,RESULT,VALUE K VALUE
40 S DATE1="",DATE2="",CNT=$G(CNT),BACKTO=+$G(BACKTO)
41 F S DATE1=$O(^PXRMINDX(52,"PI",DFN,ITEM,DATE1)) Q:DATE1="" D
42 . I DATE1>START Q
43 . I DATE1<BACKTO Q
44 . S DATE2=""
45 . F S DATE2=$O(^PXRMINDX(52,"PI",DFN,ITEM,DATE1,DATE2)) Q:DATE2="" D
46 .. S NODE=""
47 .. F S NODE=$O(^PXRMINDX(52,"PI",DFN,ITEM,DATE1,DATE2,NODE)) Q:NODE="" D
48 ... D RXOUT^ORWGAPIC(NODE,.VALUE) S VALUE=$$EXTERNAL^ORWGAPIX(52,100,"",VALUE("STATUS"))
49 ... S VALUE=VALUE_" "_$$SIG^ORWGAPIC(DFN,+NODE)_" "_$$RXNUM^ORWGAPIC(DFN,+NODE)
50 ... S RESULT=52_U_ITEM_U_DATE1_U_DATE2_U_VALUE
51 ... D SETUP^ORWGAPIW(.DATA,RESULT,TMP,.CNT)
52 Q
53 ;
Note: See TracBrowser for help on using the repository browser.