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