source: WorldVistAEHR/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCALRT.m@ 770

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

initial load of WorldVistAEHR

File size: 2.2 KB
RevLine 
[613]1GMRCALRT ;SLC/DCM - LIST MANAGER ALERT ACTION INTERFACE ; 6/6/02 14:23
2 ;;3.0;CONSULT/REQUEST TRACKING;**1,4,26**;DEC 27, 1997
3EN(GMRCDAT,GMRCDTA) ; -- main entry point for GMRC ALERT ACTION
4 ;Process an alert for a new consult through List Manager
5 ;GMRCDTA=XQAID from CPRS interface
6 ;GMRCDAT=XQADATA from CPRS interface = IFN of consult from file 123
7 K GMRCQIT,GMRCOER,GMRCNOTF,GMRCCORY
8 S GMRCALFL=$S($D(XQAID)&($D(XQADATA)):1,1:0)
9 D EN^GMRCALOR(GMRCDTA,GMRCDAT)
10 S GMRCNOTF=+$P(GMRCDTA,",",3)
11 I $D(GMRCQIT) D Q
12 . S XQAKILL=$$XQAKILL^ORB3F1(GMRCNOTF)
13 . D DEL^ORB3FUP1(.GMRCCORY,GMRCDTA),EXIT Q
14 D INIT,HDR
15 N GMRCACTM
16 I '+GMRCO S GMRCACTM=$O(^ORD(101,"B","GMRCACTM ALERT BASIC ACTIONS",0))_";ORD(101,"
17 E N ORFLG D
18 . D CPRS^GMRCACTM(+GMRCO) ;Get users update status for the Consult entry
19 . S GMRCACTM=$S(ORFLG(+GMRCO)>1:$O(^ORD(101,"B","GMRCACTM ALERT SERVICE ACTIONS",0))_";ORD(101,",1:$O(^ORD(101,"B","GMRCACTM ALERT BASIC ACTIONS",0))_";ORD(101,")
20 I '+GMRCACTM K ^TMP("GMRC",$J,"CURRENT","MENU")
21 E S ^TMP("GMRC",$J,"CURRENT","MENU")=GMRCACTM,XQORM("HIJACK")=^("MENU")
22 S GMRCOER=0
23 D EN^VALM("GMRC ALERT ACTION")
24 S XQAKILL=$$XQAKILL^ORB3F1(GMRCNOTF) D DEL^ORB3FUP1(.GMRCCORY,GMRCDTA)
25 D EXIT
26 Q
27 ;
28HDR ; -- header code
29 N GMRVSTR,X
30 S GMRCPTN=$P(^DPT(DFN,0),"^",1)
31 S GMRVSTR="WT" D EN6^GMRVUTL S GMRCWT=$P(X,U,8)
32 D DEM^GMRCU S:'$D(GMRCWRD) GMRCWRD=GMRCWARD
33 S VALMHDR(1)=$E(GMRCPTN,1,30)_$S($L(GMRCPTN)<30:$E(TAB,1,30-$L(GMRCPTN)),1:" ")_GMRCSSN_$E(TAB,1,3)_GMRCDOB_$E(TAB,1,10-$L(GMRCDOB))_" ("_GMRCAGE_")"_$E(TAB,1,4)_"Wt (lb):"_GMRCWT
34 I $D(GMRCWRD),$L(GMRCWRD) S VALMHDR(2)="Ward: "_GMRCWRD
35 Q
36 ;
37INIT ; -- init variables and list array
38 K ^TMP("GMRCR",$J,"LIST")
39 S DSPLINE=0,VALMAR="^TMP(""GMRCR"",$J,""LIST"")"
40 S GMRCSN=$P(^DPT(DFN,0),"^",9)
41 S GMRCSSN=$E(GMRCSN,1,3)_"-"_$E(GMRCSN,4,5)_"-"_$E(GMRCSN,6,9)
42 F LINE=1:1:LNCT S DSPLINE=$O(^TMP("GMRCR",$J,"CS",DSPLINE)) Q:DSPLINE=""!(DSPLINE?1A.E) S DATA=^(DSPLINE,0) D SET^VALM10(LINE,DATA)
43 S VALMCNT=LNCT
44 K DSPLINE,DATA,LINE
45 Q
46 ;
47HELP ; -- help code
48 S X="?" D DISP^XQORM1 W !!
49 Q
50 ;
51EXIT ; -- exit code
52 K ^TMP("GMRCR",$J),^TMP("GMRCS",$J)
53 K GMRCALFL,GMRCAID,GMRCQIT,VA,XQAKILL
54 D ^GMRCREXT
55 Q
56 ;
57EXPND ; -- expand code
58 Q
59 ;
Note: See TracBrowser for help on using the repository browser.