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

ORPRS12.m

Go to the documentation of this file.
ORPRS12 ; slc/dcm - Interactive Chart Sum by loc, pat or chris ;6/10/97  15:50
 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**11**;Dec 17, 1997
MAIN ;Controls the uncontrolable
 N DIC,VAROOT,XQORSPEW,X,Y
 D:$D(ORSCPAT)'>9 P^ORPRS01
 I '$O(ORSCPAT(0)) Q
 I $S(+$G(DIROUT):1,+$G(OREND):1,+$G(DUOUT):1,1:0) S OREND=+$G(DUOUT) Q
 D P
 Q
P ; Get Patient, Generate Summary
 N DFN,ORATTEND,OREARLY,OREND,ORH,ORH2,ORLATE,ORSSTOP,ORSSTRT,Y,ZTRTN,ZTDESC
 S OREND=0
 D RANGE^ORPRS01()
 Q:OREND
 S OREARLY=9999999-ORSSTRT,ORLATE=9999999-ORSSTOP
 D QUE^ORUTL1("PQ^ORPRS12","Chart Copy Summary")
 Q
PQ ; Queued subroutine for print chart copies by patient
 N ORDLRJ,ORI,DFN
 S ORDLRJ=$J
 S ORI=0 F  S ORI=$O(ORSCPAT(ORI)) Q:ORI'>0!+$G(OREND)  S DFN=+$G(ORSCPAT(ORI)) D PATIENT^ORPRS06(DFN,OREARLY,ORLATE,IO)
 Q
L ;Print for locations stored in ^TMP("OR",loc,"FCE"..., Built by ORLA* routine
 N DFN,ORATTEND,ORDLRJ,OREARLY,OREND,ORH,ORH2,ORI,ORLATE,ORSSTOP,ORSSTRT,X,Y,ZTDESC,ZTRTN
 S ORDLRJ=$J,OREND=0
 D RANGE^ORPRS01()
 Q:OREND
 S OREARLY=9999999-ORSSTRT,ORLATE=9999999-ORSSTOP
 D QUE^ORUTL1("LQ^ORPRS12","Chart Copy Summary by Location")
 Q
LQ ; Queued subroutine to print by location
 N ORI,ORSSC,ORLOC
 S ORI=0 F  S ORI=$O(^TMP("OR",ORDLRJ,"FCE",ORI)) Q:ORI'>0  D
 . S ORSSC=+^TMP("OR",ORDLRJ,"FCE",ORI)
 . S ORLOC=$S(+$G(^SC(+ORSSC,42)):$P($G(^DIC(42,+$G(^SC(+ORSSC,42)),0)),U),1:$P(^TMP("OR",ORDLRJ,"FCE",ORI),U,2)_"^"_1)
 . D @$S($L(ORLOC,U)=2:"CLINIC^ORPRS06",1:"WARD^ORPRS06")
 K ^TMP("OR",ORDLRJ,"FCE")
 Q