source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWORR1.m@ 767

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

revised back to 6/30/08 version

File size: 1.6 KB
RevLine 
[623]1ORWORR1 ; SLC/JLI - Utilities for Retrieve Orders for Broker ;9/10/02 3PM [9/16/02 2:56pm]
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**141**;Dec 17, 1997
3 ;Called from ORWORR
4GET1 ;
5 S TOT=^TMP("ORR",$J,ORLIST,"TOT") K ^TMP("ORR",$J,ORLIST,"TOT")
6 S I=.1 F S I=$O(^TMP("ORR",$J,ORLIST,I)) Q:'I S IFN=^(I) D
7 . I ORWTS,(+$P($G(^OR(100,+IFN,0)),U,13)'=ORWTS) K ^TMP("ORR",$J,ORLIST,I) S TOT=TOT-1 Q
8 . S PTEVTID=$P($G(^OR(100,+IFN,0)),U,17)
9 . S:PTEVTID>0 EVTNAME=$$NAME^OREVNTX(PTEVTID)
10 . S ^TMP("ORR",$J,ORLIST,I)=IFN_U_$P($G(^OR(100,+IFN,0)),U,11)_U_$P($G(^(8,+$P(IFN,";",2),0)),U)_U_PTEVTID_U_EVTNAME
11 S TXTVW=$S(MULT:0,FILTER=2:2,1:1) D:FILTER=2 ORYD^ORDD100
12 S ^TMP("ORR",$J,ORLIST,.1)=TOT_U_TXTVW_U_$G(ORYD,0)
13 S REF=$NA(^TMP("ORR",$J,ORLIST))
14 Q
15GET2 ; For AUTO DC/Event Release Orders
16 N JDND,JDIX,JDCNT,DCSPLIT
17 S JDCNT=1,DCSPLIT=0
18 S TOT=^TMP("ORR",$J,ORLIST,"TOT") K ^TMP("ORR",$J,ORLIST,"TOT")
19 F JDND="RL","DC" D
20 . S I=.1 F S I=$O(^TMP("ORR",$J,ORLIST,I)) Q:'I D
21 . . I '$D(^TMP("ORR",$J,ORLIST,I,JDND)) Q
22 . . S JDIX=0 F S JDIX=$O(^TMP("ORR",$J,ORLIST,I,JDND,JDIX)) Q:'JDIX S IFN=^(JDIX) D
23 . . . I 'DCSPLIT,(JDND="DC") D
24 . . . . S ^TMP("ORRJD",$J,JDCNT)="DC START"
25 . . . . S DCSPLIT=1,JDCNT=JDCNT+1,TOT=TOT+1
26 . . . I ORWTS,(+$P($G(^OR(100,+IFN,0)),U,13)'=ORWTS) S TOT=TOT-1 Q
27 . . . S PTEVTID=$P($G(^OR(100,+IFN,0)),U,17)
28 . . . S:PTEVTID>0 EVTNAME=$$NAME^OREVNTX(PTEVTID)
29 . . . S ^TMP("ORRJD",$J,JDCNT)=IFN_U_$P($G(^OR(100,+IFN,0)),U,11)_U_$P($G(^(8,+$P(IFN,";",2),0)),U)_U_PTEVTID_U_EVTNAME
30 . . . S JDCNT=JDCNT+1
31 S TXTVW=$S(MULT:0,FILTER=2:2,1:1) D:FILTER=2 ORYD^ORDD100
32 S ^TMP("ORRJD",$J,.1)=TOT_U_TXTVW_U_$G(ORYD,0)
33 S REF=$NA(^TMP("ORRJD",$J))
34 Q
Note: See TracBrowser for help on using the repository browser.