source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORQQCN.m@ 1087

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

initial load of WorldVistAEHR

File size: 902 bytes
RevLine 
[613]1ORQQCN ; slc/CLA/REV - Functions which return patient consult requests and results ;08:19 AM 20 FEB 2001
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**10,85**;Dec 17, 1997
3LIST(ORY,ORPT,ORSDT,OREDT,ORSERV,ORSTATUS) ; return patient's consult requests between start date and stop date for the service and status indicated:
4 N I,J,SITE,SEQ,DIFF,ORSRV,ORLOC,GMRCOER
5 S J=1,SEQ="",GMRCOER=2
6 S:'$L($G(ORSDT)) ORSDT=""
7 S:'$L($G(OREDT)) OREDT=""
8 S:'$L($G(ORSERV))!(+$G(ORSERV)=0) ORSERV=""
9 S:'$L($G(ORSTATUS)) ORSTATUS="" ;ALL STATI
10 K ^TMP("GMRCR",$J)
11 S ORY=$NA(^TMP("ORQQCN",$J,"CS"))
12 D OER^GMRCSLM1(ORPT,ORSERV,ORSDT,OREDT,ORSTATUS,GMRCOER)
13 M @ORY=^TMP("GMRCR",$J,"CS")
14 K @ORY@("AD")
15 K @ORY@(0)
16 K ^TMP("GMRCR",$J)
17 Q
18DETAIL(ORQY,CONSULT) ; return formatted consult request details (plus result note if available):
19 N GMRCOER
20 S GMRCOER=2
21 S ORQY=$NA(^TMP("GMRCR",$J,"DT"))
22 D DT^GMRCSLM2(CONSULT)
23 Q
24 ;
Note: See TracBrowser for help on using the repository browser.