Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ORWGAPI7

ORWGAPI7.m

Go to the documentation of this file.
ORWGAPI7 ; SLC/STAFF - Graph Data ;12/21/05  08:17
 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
 ;
 ; 
BCMA(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
 N DATE,NODE,RESULT,VALUE
 S DATE="",CNT=$G(CNT),BACKTO=+$G(BACKTO)
 F  S DATE=$O(^PSB(53.79,"AOIP",DFN,ITEM,DATE)) Q:DATE=""  D
 . I DATE>START Q
 . I DATE<BACKTO Q
 . S NODE=""
 . F  S NODE=$O(^PSB(53.79,"AOIP",DFN,ITEM,DATE,NODE)) Q:NODE=""  D
 .. S VALUE=$P($G(^PSB(53.79,NODE,0)),U,9) I VALUE'="G" Q
 .. S RESULT=53.79_U_ITEM_U_DATE_"^^"
 .. D SETUP^ORWGAPIW(.DATA,RESULT,TMP,.CNT)
 Q
 ;
INRX(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
 N DATE,DATE2,NODE,RESULT,VALUE K VALUE
 S DATE="",CNT=$G(CNT),BACKTO=+$G(BACKTO)
 F  S DATE=$O(^PXRMINDX(55,"PI",DFN,ITEM,DATE)) Q:DATE=""  D
 . I DATE>START Q
 . I DATE<BACKTO Q
 . S DATE2=""
 . F  S DATE2=$O(^PXRMINDX(55,"PI",DFN,ITEM,DATE,DATE2)) Q:DATE2=""  D
 .. S NODE=""
 .. F  S NODE=$O(^PXRMINDX(55,"PI",DFN,ITEM,DATE,DATE2,NODE)) Q:NODE=""  D
 ... D RXIN^ORWGAPIC(NODE,.VALUE) S VALUE=VALUE("STAT")
 ... S VALUE=VALUE_"  "_$$INSIG^ORWGAPIC(NODE)
 ... S RESULT=55_U_ITEM_U_DATE_U_DATE2_U_VALUE
 ... D SETUP^ORWGAPIW(.DATA,RESULT,TMP,.CNT)
 Q
 ;
NVA(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
 D NVA3^ORWGAPIE(.DATA,ITEM,START,DFN,.CNT,.TMP)
 Q
 ;
OUTRX(DATA,ITEM,START,DFN,CNT,TMP,BACKTO) ; from ORWGAPIR
 N DATE1,DATE2,LNUM,NODE,RESULT,VALUE K VALUE
 S DATE1="",DATE2="",CNT=$G(CNT),BACKTO=+$G(BACKTO)
 F  S DATE1=$O(^PXRMINDX(52,"PI",DFN,ITEM,DATE1)) Q:DATE1=""  D
 . I DATE1>START Q
 . I DATE1<BACKTO Q
 . S DATE2=""
 . F  S DATE2=$O(^PXRMINDX(52,"PI",DFN,ITEM,DATE1,DATE2)) Q:DATE2=""  D
 .. S NODE=""
 .. F  S NODE=$O(^PXRMINDX(52,"PI",DFN,ITEM,DATE1,DATE2,NODE)) Q:NODE=""  D
 ... D RXOUT^ORWGAPIC(NODE,.VALUE) S VALUE=$$EXTERNAL^ORWGAPIX(52,100,"",VALUE("STATUS"))
 ... S VALUE=VALUE_"  "_$$SIG^ORWGAPIC(DFN,+NODE)_"  "_$$RXNUM^ORWGAPIC(DFN,+NODE)
 ... S RESULT=52_U_ITEM_U_DATE1_U_DATE2_U_VALUE
 ... D SETUP^ORWGAPIW(.DATA,RESULT,TMP,.CNT)
 Q
 ;