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

ORECS01.m

Go to the documentation of this file.
ORECS01 ;SLC/JDL-CPRS utility for Event Capture System; 2/10/03 13:04P
 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**141,149**;Dec 17, 1997
 ;
CHKESSO(ORY,CHK) ;--1=ESSO installed on site  0=not installed
 S ORY=$$PATCH^XPDUTL("XWB*1.1*26")
 Q
 ;
VSITID(ORY,VSTSTR) ;--Return Visit IEN ptr to #9000010
 ;VSTSTR=HospLoc;DateTime;Category;PtIEN
 N DTREF,PTID
 S ORY=0
 S DTREF=9999999-$P($P(VSTSTR,";",2),".")_"."_$P($P(VSTSTR,";",2),".",2)
 S PTID=+$P(VSTSTR,";",4)
 S:$D(^AUPNVSIT("AA",PTID,DTREF)) ORY=$O(^(DTREF,0))
 Q
 ;
ECRPT(ORY,ORECARY) ;--EC report
 Q:'$D(ORECARY)
 D RPTEN^ECRRPC(.ORY,.ORECARY)
 Q
 ;
ECPRINT(ORY,ORECARY) ;--Print ECS report to Device
 Q:'$D(ORECARY)
 D RPTEN^ECRRPC(.ORY,.ORECARY)
 Q
 ;
GETDIV(ORY,USR) ;--Get user's division
 S ORY=0
 S:$G(DUZ(2)) ORY=DUZ(2)
 Q
SAVPATH(ORY,ECPATH) ;--Save user's ECS path
 N IX,VAL,NM,HADIT,LST,INST,LAST
 S (IX,HADIT,INST,LAST)=0,(VAL,NM)=""
 D GETLST^XPAR(.LST,DUZ_";VA(200,","ORWT TOOLS MENU")
 S LAST=+$G(LST(LST))
 F  S IX=$O(LST(IX)) Q:('IX)!HADIT  D
 . S NM=$P($P(LST(IX),U,2),"=",1)
 . I $$UP^XLFSTR(NM)="EVENT CAPTURE INTERFACE" S HADIT=$P(LST(IX),U)
 S $P(ECPATH,"=",2)=$C(34)_$P(ECPATH,"=",2)_$C(34)
 S ORY=$P(ECPATH,"=",2)
 D:HADIT CHG^XPAR(DUZ_";VA(200,","ORWT TOOLS MENU",HADIT,ECPATH)
 D:'HADIT ADD^XPAR(DUZ_";VA(200,","ORWT TOOLS MENU",LAST+1,ECPATH)
 Q