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

ORPRS10.m

Go to the documentation of this file.
  1. ORPRS10 ; slc/dcm - Summary time, when the livin is easy... ;10/19/98 13:50
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**23,37,11,69,121**;Dec 17, 1997
  1. DAY ;PROCESS 24-HR ORDER SUMMARY
  1. S OREND=0,ORTIT="DAILY ORDER SUMMARY",ORPRES=1
  1. D:$D(ORSCPAT)'>9 P^ORPRS01
  1. G:OREND END
  1. D DAY^ORPRS01()
  1. G:OREND END
  1. D CONT(ORTIT)
  1. Q
  1. RANGE ;PROCESS START THRU STOP DATE/TIME RANGE
  1. S OREND=0,ORTIT="ORDER SUMMARY",ORPRES=1
  1. D:$D(ORSCPAT)'>9 P^ORPRS01
  1. G:OREND END
  1. D RANGE^ORPRS01()
  1. G:OREND END
  1. D CONT("Order summary for date range")
  1. Q
  1. GENERIC ;PROCESS WITH PROMPTS FOR ALL REPORT VARIABLES
  1. S OREND=0
  1. D:$D(ORSCPAT)'>9 P^ORPRS01
  1. G:OREND!'$D(ORSCPAT) END
  1. D PRES^ORPRS09
  1. G:OREND END
  1. D SERV^ORPRS09
  1. G:OREND END
  1. D RANGE^ORPRS01()
  1. G:OREND END
  1. S ORTIT=$P(ORPRES,";",2)_" for "_ORGRP("NAM")_" SERVICES"
  1. D CONT(ORTIT)
  1. Q
  1. CONT(DESC) ;
  1. D QUE^ORUTL1("EN1^ORPRS10",$G(DESC))
  1. Q
  1. EN1 ;Entry point for Batch Processing
  1. ;Setup display group list, patient list, and process reports
  1. N ORDG,ORGRP,ORSEL,ORSEQ,ORLIST,ORAW
  1. U IO
  1. S ORDG=1,ORGRP("NAM")="ALL",ORGRP("ROOT")=1,ORSEL="BILD",ORSEQ=0,ORPRES=1
  1. S ORAW=$S(+$$GET^XPAR("SYS","OR ORDER SUMMARY CONTEXT",1,"I"):"AW",1:"")
  1. I $E(IOST)'="C",$L($G(ORSWDN)) S ORSLTR=$E(ORSWDN,1,(IOM\15)) D ^ORSLTR
  1. I ORSHORT D PTOP^ORPRS05(0,ORTIT,ORSHORT,ORSSTRT,ORSSTOP)
  1. S (NEXTP,OREND)=0
  1. F S NEXTP=$O(ORSCPAT(NEXTP)) Q:NEXTP=""!(OREND=1) D
  1. . S ORVP=+ORSCPAT(NEXTP)_";DPT("
  1. . D EN^ORQ1(ORVP,ORDG,+ORPRES,0,+ORSSTRT,+ORSSTOP,0,1,ORAW)
  1. . N ORPI,ORPA,ORPN,X,ORPIFN
  1. . S ORPI=0 F S ORPI=$O(^TMP("ORR",$J,ORLIST,ORPI)) Q:'ORPI D
  1. .. S ORPIFN=+^TMP("ORR",$J,ORLIST,ORPI),ORPA=$P(^(ORPI),";",2)
  1. .. I $D(^OR(100,ORPIFN,8,ORPA,0)) S X=^(0),ORPN=$P(X,"^",12)
  1. .. I $G(ORPN),$D(^ORD(100.02,ORPN,1)),'$P(^(1),"^",3) K ^TMP("ORR",$J,ORLIST,ORPI)
  1. . I $$GET^XPAR("ALL","ORPF SUMMARY SORT FORWARD",1,"I") D SORT^ORPRS02
  1. . D @$S(ORSHORT:"EN^ORPRS04",1:"EN^ORPRS03")
  1. . K ^TMP("ORR",$J,ORLIST)
  1. I ORSHORT W !
  1. END ; Clean up variables
  1. K I,II,J,K,NEXTP,NB,ND,NS,ORSLTR,ORES,ODATE,ORAGE,ORDCFC,ORMD,ORDG,ORDIC,ORDOB,OREND,ORFT,ORGRP,ORH,ORH2,ORHI,ORIO,ORL,ORLST,ORODT,ORNP,ORPD,ORPFG,ORPNM,ORPRES,ORUSER,ORPV,ORREQ
  1. K ORSEL,ORSEQ,ORSEX,ORSP,ORSPAT,ORSPL,ORSSN,ORSSTOP,ORSSTRT,ORSTRT,ORSTOP,ORSTS,ORASTS,ORTIT,ORTM,ORTS,ORTX,ORVP,ORWARD,ORX,X,X1,Y,%,%DT,%IS,ORSWD,ORSWDN,ORRPG,ORIFN
  1. I $D(ZTQUEUED) S ZTREQ="@"
  1. Q