source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHT.m@ 691

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

initial load of WorldVistAEHR

File size: 4.3 KB
RevLine 
[613]1DVBHT ;PKE/ISC-ALBANY; HINQ alert parser; 5/10/92 ; 3/9/06 4:18pm
2 ;;4.0;HINQ;**12,18,20,56**;03/25/92
3 ;
4 ;call alert
5ALERT I '$D(ZTQUEUED) H 1 W $C(7),".. Alert found."
6 S (I,Y)=0,XQAMSG=""
7 F S Y=$O(DVBDATA(Y)) Q:'Y DO
8 .S $P(DVBDATA,"^",I+1)=Y
9 .S XQAMSG=XQAMSG_$S(I:", ",1:"")_Y S I=I+1
10 .K DVBDATA(Y)
11 S XQAMSG="Screen"_$S(I>1:"s ",1:" ")_XQAMSG
12 ;
13 D MAILGP^DVBHT2,REQUSR^DVBHT2
14 I $D(XQA)'>9 S XQA(DUZ)=""
15 S Y=DT D TM
16 ;
17 S XQAMSG=$E($P(^DPT(DFN,0),"^")_" ",1,9)_" "_"("_$E(^(0))_$E($P(^(0),"^",9),6,10)_")"_$S('$L($E($P(^(0),"^",9),10)):":",1:"")_" HINQ Update . "_$E(XQAMSG_" ",1,16)_$J(Y,8)
18 I '$O(XQA(0))
19 E S XQAMSG=XQAMSG_" "_$E($P($P(^VA(200,$O(XQA(0)),0),"^"),","),1,10)
20 ;
21TST S XQAID="DVB,"_DFN
22 S XQAROU="SETUP^DVBHT"
23 ;S XQAFLG="R"
24 S XQADATA=DFN_"^"_DVBDATA K DVBDATA
25 ;
26 D SETUP^XQALERT
27 S $P(^DVB(395.5,DFN,0),"^",6)=1 Q ;set alert SET
28 ;
29 ;entry action from alert
30SETUP S DVBDATA=XQADATA K XQADATA,XQAKILL,DVBNOALR
31 S Y=+$P(DVBDATA,"^") Q:'Y
32 S DFN=Y,DVBDATA=$P(DVBDATA,"^",2,99)
33 I '$D(^DVB(395.5,Y,0)) S XQAKILL=0 D KIL Q
34 I '$P(^DVB(395.5,Y,0),"^",6) DO D KIL Q
35 .W !,?15," another request pending, alert cleared"
36 .S XQAKILL=0
37 I '$D(^XUSEC("DG ELIGIBILITY",DUZ)) DO D KIL Q
38 .S XQAKILL=1
39 .D DISPLAY
40 .D PAGE
41 ;if no to hinq screens
42 I $P(^DVB(395,1,0),"^",5)="n" DO D END Q
43 .S XQAKILL=0,DVBJ2=1
44 .D TEM^DVBHIQR I $D(DVBERCS) K XQAKILL Q
45 .D ACHK^DVBHT1
46 .D DISPLAY
47 .I $D(DVBNOALR) D PAGE,FILE^DVBHQUP Q
48 .D ACKNOW
49 .I $D(DVBNOALR) D FILE^DVBHQUP Q
50 .K XQAKILL
51 ;
52 D A^DVBHUTIL W !
53 K DVBDIQ
54 ;
55UPD L +^DPT(DFN):3 I $T DO
56 .N XQAID
57 .S DIE="^DPT(",(DA,DFN)=+Y,DR="[DVBHINQ UPDATE]",DVBJ2=0 D TEM^DVBHIQR
58 .N DVBQT
59 .I '$D(DVBERCS) D CHKID^DVBHQD1 I DVBQT D Q
60 .. N DVBTMP1,DVBTMP2
61 .. S DVBTMP1=$G(DVBNOALR)
62 .. S DVBTMP2=$G(DVBJ2)
63 .. S DVBNOALR=";4///a;5////"_DUZ_";6///N",DVBJ2=1
64 .. D FILE^DVBHQUP
65 .. S DVBNOALR=DVBTMP1
66 .. S DVBJ2=DVBTMP2
67 .D ^DIE:'$D(DVBERCS) K DIE,DR,DA Q
68 E W !?3,"This patient data is being edited by another user" H 1 G END
69 L -^DPT(DFN)
70 ;
71 I DVBJ2 DO ;patient updated, alerts filed in up
72 .W !!,"Checking the alerts ."
73 .D ACHK^DVBHT1
74 .I $D(DVBNOALR) DO
75 . .S DVBNOALR=";4///c;5////"_DUZ_";6///N"
76 . .W ". OK"
77 .E DO
78 . .W ". need more changes"
79 . .D DISPLAY
80 . .D ACKNOW
81 .H 1
82 E DO ;patient not updated
83 .I $D(DVBNOALR) DO Q
84 . .I DVBNOALR]"" D FILE^DVBHQUP
85 . .;;;D DISPLAY
86 .D ACHK^DVBHT1
87 .D DISPLAY I $D(DVBNOALR) Q
88 .D ACKNOW
89 .I $D(DVBNOALR),DVBNOALR]"" D FILE^DVBHQUP
90 ;
91 K DVBDIQ D C^DVBHQUP
92 ;
93END S END="N DVBNOALR,XQAID D KILL^XUSCLEAN" X END
94 I $D(DVBNOALR) S XQAKILL=0
95KIL K DVBNOALR,DVBDATA,DFN,DVBJ2,DR,DVBDIQ,LP2,DIC,DIQ,DA,D0 Q
96 ;
97 ;display alert
98DISPLAY Q:'$D(DVBDATA) I '$L($P(DVBDATA,"^",11)) DO CMSG Q
99INFO ;
100 ;;Diagnostic Ver.Ind.: NO Verify Service Connections at RO
101 I '$D(DVBDIQ(2,DFN,.01,"E")) S DR=".01;.09" D DIQDR^DVBHT1
102 S DVBALERT="LOAD/EDIT Screen"_$S(DVBDATA'["SC D":" 7",1:"s 7, 11")
103 W !," ----------------------------------------------------------------------------"
104 W !,"| ",DVBDIQ(2,DFN,.01,"E")," "
105 W $E(DVBDIQ(2,DFN,.01,"E")),$E(DVBDIQ(2,DFN,.09,"E"),6,10)
106 W ?39,DVBALERT,?69,"HINQ"
107 W ?77,"|",!
108 I $D(XQAKILL)
109 F I=11:1 S DVBALERT=$P(DVBDATA,"^",I)_"'" Q:'DVBALERT DO
110 .W:$X<10 "|",?6
111 .I $E(DVBALERT,2)="+" W "HINQ has data not in patient file `"
112 .I $E(DVBALERT,2)="-" W "Patient file has data not in HINQ `"
113 .I $E(DVBALERT,2)="?" W "HINQ, Patient file are different `"
114 .I $E(DVBALERT,2)="X" DO
115 . .I $E(DVBALERT,3) W $P($T(INFO+$E(DVBALERT,3)),";;",2)
116 . .S DVBALERT=$E(DVBALERT)
117 .W $E(DVBALERT,3,$L(DVBALERT))
118 .W ?66,"Screen (",$E(DVBALERT),")",?77,"|",!
119 W " ----------------------------------------------------------------------------"
120 K DVBALERT
121 Q
122ACKNOW K DIR S DIR("A")="Do you wish to acknowledge inconsistencies and clear this Alert ? "
123 S DIR("B")="No"
124 S DIR("?",1)="If the patient file has data that should not be updated by HINQ, this Alert"
125 S DIR("?",2)="can be acknowledged and cleared by entering 'Y'es. Otherwise, just continue"
126 S DIR("?")="Press RETURN to continue,'Y'es to acknowledge, '^' to exit:"
127 S DIR(0)="YAO" D ^DIR K DIR Q:'Y
128 S DVBNOALR=";4///a;5////"_DUZ_";6///N"
129 W !!?6," Alert will be cleared" H 1 Q
130 ;
131PAGE K DVBALERT S DIR(0)="E" D ^DIR K DIR Q
132 ;
133CMSG W !!,?20,"Alerts have been cleared",! Q
134 ;
135TM S Y=$E(Y,4,5)_"/"_$E(Y,6,7)_$P("@"_$E(Y_0,9,10)_":"_$E(Y_"000",11,12),"^",Y[".") Q
Note: See TracBrowser for help on using the repository browser.