ORWRP1A ;SLC/DCM - REPORT CALLS CONTINUED ;03/17/2015 10:24
;;3.0;ORDER ENTRY/RESULTS REPORTING;**109,160,350**;Dec 17, 1997;Build 77
BCMA1(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ;BCMA Med Log
Q:'$G(ORDFN)
I $L($G(DTRANGE)),'$G(ALPHA) S ALPHA=$$FMADD^XLFDT(DT,-DTRANGE),OMEGA=$$NOW^XLFDT
Q:'$G(ALPHA) Q:'$G(OMEGA)
I $L($T(RPC^PSBO)) D RPC^PSBO(.OROOT,"ML",ORDFN,ALPHA,OMEGA,"0^0^0^0^1^1")
I '$L($G(OROOT)) Q
I '$O(@OROOT@(0)) S @OROOT@(1)="",@OROOT@(2)="No report available..."
Q
BCMA2(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ;BCMA MAH Report
Q:'$G(ORDFN)
I $L($G(DTRANGE)),'$G(ALPHA) S ALPHA=$$FMADD^XLFDT(DT,-DTRANGE),OMEGA=$$NOW^XLFDT
Q:'$G(ALPHA) Q:'$G(OMEGA)
I $L($T(RPC^PSBO)) D RPC^PSBO(.OROOT,"MH",ORDFN,ALPHA,OMEGA,"")
I '$L($G(OROOT)) Q
I '$O(@OROOT@(0)) S @OROOT@(1)="",@OROOT@(2)="No report available..."
Q
EM(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Electron Microscopy Report
N I,C,LINES,X,ORSBHEAD,ORZIP
K ^TMP("LRC",$J),^TMP("LRH",$J)
S ORSBHEAD("EM")=""
D EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
I '$O(^TMP("LRC",$J,0)) S ^TMP("LRC",$J,1,0)="",^TMP("LRC",$J,2,0)="No EM reports available..."
S OROOT=$NA(^TMP("LRC",$J))
K ^TMP("LRH",$J)
Q
CY(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Cytology Report
N I,C,LINES,X,ORSBHEAD,ORZIP
K ^TMP("LRC",$J),^TMP("LRH",$J)
S ORSBHEAD("CYTOPATHOLOGY")=""
D EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
I '$O(^TMP("LRC",$J,0)) S ^TMP("LRC",$J,1,0)="",^TMP("LRC",$J,2,0)="No Cytology reports available..."
S OROOT=$NA(^TMP("LRC",$J))
K ^TMP("LRH",$J)
Q
SP(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Surgical Pathology Report
N I,C,LINES,X,ORSBHEAD,ORZIP
K ^TMP("LRC",$J),^TMP("LRH",$J)
S ORSBHEAD("SURGICAL PATHOLOGY")=""
D EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
I '$O(^TMP("LRC",$J,0)) S ^TMP("LRC",$J,1,0)="",^TMP("LRC",$J,2,0)="No Surgical Pathology reports available..."
S OROOT=$NA(^TMP("LRC",$J))
K ^TMP("LRH",$J)
Q
AU(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Autopsy Report
N I,C,LINES,X,ORSBHEAD,ORZIP
K ^TMP("LRC",$J),^TMP("LRH",$J)
S ORSBHEAD("AUTOPSY")=""
D EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
I '$O(^TMP("LRC",$J,0)) S ^TMP("LRC",$J,1,0)="",^TMP("LRC",$J,2,0)="No Autopsy report available..."
S OROOT=$NA(^TMP("LRC",$J))
K ^TMP("LRH",$J)
Q
RADIO(OROOT) ; -- get value of OR REPORT DATE SELECT TYPE parameter
S OROOT=$$GET^XPAR("DIV^SYS^PKG","OR REPORT DATE SELECT TYPE",1,"Q")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORWRP1A 2582 printed Dec 13, 2024@02:37:19 Page 2
ORWRP1A ;SLC/DCM - REPORT CALLS CONTINUED ;03/17/2015 10:24
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**109,160,350**;Dec 17, 1997;Build 77
BCMA1(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ;BCMA Med Log
+1 if '$GET(ORDFN)
QUIT
+2 IF $LENGTH($GET(DTRANGE))
IF '$GET(ALPHA)
SET ALPHA=$$FMADD^XLFDT(DT,-DTRANGE)
SET OMEGA=$$NOW^XLFDT
+3 if '$GET(ALPHA)
QUIT
if '$GET(OMEGA)
QUIT
+4 IF $LENGTH($TEXT(RPC^PSBO))
DO RPC^PSBO(.OROOT,"ML",ORDFN,ALPHA,OMEGA,"0^0^0^0^1^1")
+5 IF '$LENGTH($GET(OROOT))
QUIT
+6 IF '$ORDER(@OROOT@(0))
SET @OROOT@(1)=""
SET @OROOT@(2)="No report available..."
+7 QUIT
BCMA2(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ;BCMA MAH Report
+1 if '$GET(ORDFN)
QUIT
+2 IF $LENGTH($GET(DTRANGE))
IF '$GET(ALPHA)
SET ALPHA=$$FMADD^XLFDT(DT,-DTRANGE)
SET OMEGA=$$NOW^XLFDT
+3 if '$GET(ALPHA)
QUIT
if '$GET(OMEGA)
QUIT
+4 IF $LENGTH($TEXT(RPC^PSBO))
DO RPC^PSBO(.OROOT,"MH",ORDFN,ALPHA,OMEGA,"")
+5 IF '$LENGTH($GET(OROOT))
QUIT
+6 IF '$ORDER(@OROOT@(0))
SET @OROOT@(1)=""
SET @OROOT@(2)="No report available..."
+7 QUIT
EM(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Electron Microscopy Report
+1 NEW I,C,LINES,X,ORSBHEAD,ORZIP
+2 KILL ^TMP("LRC",$JOB),^TMP("LRH",$JOB)
+3 SET ORSBHEAD("EM")=""
+4 DO EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
+5 IF '$ORDER(^TMP("LRC",$JOB,0))
SET ^TMP("LRC",$JOB,1,0)=""
SET ^TMP("LRC",$JOB,2,0)="No EM reports available..."
+6 SET OROOT=$NAME(^TMP("LRC",$JOB))
+7 KILL ^TMP("LRH",$JOB)
+8 QUIT
CY(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Cytology Report
+1 NEW I,C,LINES,X,ORSBHEAD,ORZIP
+2 KILL ^TMP("LRC",$JOB),^TMP("LRH",$JOB)
+3 SET ORSBHEAD("CYTOPATHOLOGY")=""
+4 DO EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
+5 IF '$ORDER(^TMP("LRC",$JOB,0))
SET ^TMP("LRC",$JOB,1,0)=""
SET ^TMP("LRC",$JOB,2,0)="No Cytology reports available..."
+6 SET OROOT=$NAME(^TMP("LRC",$JOB))
+7 KILL ^TMP("LRH",$JOB)
+8 QUIT
SP(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Surgical Pathology Report
+1 NEW I,C,LINES,X,ORSBHEAD,ORZIP
+2 KILL ^TMP("LRC",$JOB),^TMP("LRH",$JOB)
+3 SET ORSBHEAD("SURGICAL PATHOLOGY")=""
+4 DO EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
+5 IF '$ORDER(^TMP("LRC",$JOB,0))
SET ^TMP("LRC",$JOB,1,0)=""
SET ^TMP("LRC",$JOB,2,0)="No Surgical Pathology reports available..."
+6 SET OROOT=$NAME(^TMP("LRC",$JOB))
+7 KILL ^TMP("LRH",$JOB)
+8 QUIT
AU(OROOT,ORDFN,ID,ALPHA,OMEGA,DTRANGE,REMOTE,ORMAX,ORFHIE) ; -- get Autopsy Report
+1 NEW I,C,LINES,X,ORSBHEAD,ORZIP
+2 KILL ^TMP("LRC",$JOB),^TMP("LRH",$JOB)
+3 SET ORSBHEAD("AUTOPSY")=""
+4 DO EN^LR7OSUM(.ORZIP,ORDFN,,,,80,.ORSBHEAD)
+5 IF '$ORDER(^TMP("LRC",$JOB,0))
SET ^TMP("LRC",$JOB,1,0)=""
SET ^TMP("LRC",$JOB,2,0)="No Autopsy report available..."
+6 SET OROOT=$NAME(^TMP("LRC",$JOB))
+7 KILL ^TMP("LRH",$JOB)
+8 QUIT
RADIO(OROOT) ; -- get value of OR REPORT DATE SELECT TYPE parameter
+1 SET OROOT=$$GET^XPAR("DIV^SYS^PKG","OR REPORT DATE SELECT TYPE",1,"Q")
+2 QUIT