source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORPRS12.m@ 1639

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

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1ORPRS12 ; slc/dcm - Interactive Chart Sum by loc, pat or chris ;6/10/97 15:50
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**11**;Dec 17, 1997
3MAIN ;Controls the uncontrolable
4 N DIC,VAROOT,XQORSPEW,X,Y
5 D:$D(ORSCPAT)'>9 P^ORPRS01
6 I '$O(ORSCPAT(0)) Q
7 I $S(+$G(DIROUT):1,+$G(OREND):1,+$G(DUOUT):1,1:0) S OREND=+$G(DUOUT) Q
8 D P
9 Q
10P ; Get Patient, Generate Summary
11 N DFN,ORATTEND,OREARLY,OREND,ORH,ORH2,ORLATE,ORSSTOP,ORSSTRT,Y,ZTRTN,ZTDESC
12 S OREND=0
13 D RANGE^ORPRS01()
14 Q:OREND
15 S OREARLY=9999999-ORSSTRT,ORLATE=9999999-ORSSTOP
16 D QUE^ORUTL1("PQ^ORPRS12","Chart Copy Summary")
17 Q
18PQ ; Queued subroutine for print chart copies by patient
19 N ORDLRJ,ORI,DFN
20 S ORDLRJ=$J
21 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)
22 Q
23L ;Print for locations stored in ^TMP("OR",loc,"FCE"..., Built by ORLA* routine
24 N DFN,ORATTEND,ORDLRJ,OREARLY,OREND,ORH,ORH2,ORI,ORLATE,ORSSTOP,ORSSTRT,X,Y,ZTDESC,ZTRTN
25 S ORDLRJ=$J,OREND=0
26 D RANGE^ORPRS01()
27 Q:OREND
28 S OREARLY=9999999-ORSSTRT,ORLATE=9999999-ORSSTOP
29 D QUE^ORUTL1("LQ^ORPRS12","Chart Copy Summary by Location")
30 Q
31LQ ; Queued subroutine to print by location
32 N ORI,ORSSC,ORLOC
33 S ORI=0 F S ORI=$O(^TMP("OR",ORDLRJ,"FCE",ORI)) Q:ORI'>0 D
34 . S ORSSC=+^TMP("OR",ORDLRJ,"FCE",ORI)
35 . 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)
36 . D @$S($L(ORLOC,U)=2:"CLINIC^ORPRS06",1:"WARD^ORPRS06")
37 K ^TMP("OR",ORDLRJ,"FCE")
38 Q
Note: See TracBrowser for help on using the repository browser.