ORQQCN ; slc/CLA/REV - Functions which return patient consult requests and results ;08:19 AM 20 FEB 2001
;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,85**;Dec 17, 1997
LIST(ORY,ORPT,ORSDT,OREDT,ORSERV,ORSTATUS) ; return patient's consult requests between start date and stop date for the service and status indicated:
N I,J,SITE,SEQ,DIFF,ORSRV,ORLOC,GMRCOER
S J=1,SEQ="",GMRCOER=2
S:'$L($G(ORSDT)) ORSDT=""
S:'$L($G(OREDT)) OREDT=""
S:'$L($G(ORSERV))!(+$G(ORSERV)=0) ORSERV=""
S:'$L($G(ORSTATUS)) ORSTATUS="" ;ALL STATI
K ^TMP("GMRCR",$J)
S ORY=$NA(^TMP("ORQQCN",$J,"CS"))
D OER^GMRCSLM1(ORPT,ORSERV,ORSDT,OREDT,ORSTATUS,GMRCOER)
M @ORY=^TMP("GMRCR",$J,"CS")
K @ORY@("AD")
K @ORY@(0)
K ^TMP("GMRCR",$J)
Q
DETAIL(ORQY,CONSULT) ; return formatted consult request details (plus result note if available):
N GMRCOER
S GMRCOER=2
S ORQY=$NA(^TMP("GMRCR",$J,"DT"))
D DT^GMRCSLM2(CONSULT)
Q
;
ORQQCN ; slc/CLA/REV - Functions which return patient consult requests and results ;08:19 AM 20 FEB 2001
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,85**;Dec 17, 1997
LIST(ORY,ORPT,ORSDT,OREDT,ORSERV,ORSTATUS) ; return patient's consult requests between start date and stop date for the service and status indicated:
+1 NEW I,J,SITE,SEQ,DIFF,ORSRV,ORLOC,GMRCOER
+2 SET J=1
SET SEQ=""
SET GMRCOER=2
+3 IF '$LENGTH($GET(ORSDT))
SET ORSDT=""
+4 IF '$LENGTH($GET(OREDT))
SET OREDT=""
+5 IF '$LENGTH($GET(ORSERV))!(+$GET(ORSERV)=0)
SET ORSERV=""
+6 ;ALL STATI
IF '$LENGTH($GET(ORSTATUS))
SET ORSTATUS=""
+7 KILL ^TMP("GMRCR",$JOB)
+8 SET ORY=$NAME(^TMP("ORQQCN",$JOB,"CS"))
+9 DO OER^GMRCSLM1(ORPT,ORSERV,ORSDT,OREDT,ORSTATUS,GMRCOER)
+10 MERGE @ORY=^TMP("GMRCR",$JOB,"CS")
+11 KILL @ORY@("AD")
+12 KILL @ORY@(0)
+13 KILL ^TMP("GMRCR",$JOB)
+14 QUIT
DETAIL(ORQY,CONSULT) ; return formatted consult request details (plus result note if available):
+1 NEW GMRCOER
+2 SET GMRCOER=2
+3 SET ORQY=$NAME(^TMP("GMRCR",$JOB,"DT"))
+4 DO DT^GMRCSLM2(CONSULT)
+5 QUIT
+6 ;