source: WorldVistAEHR/trunk/r/ZZREGIONAL-A1C-A5C-CRHD-RGED-RGUT-RGWB-RG/RGMTMONT.m@ 1582

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

initial load of WorldVistAEHR

File size: 5.6 KB
RevLine 
[613]1RGMTMONT ;BIR/CML,PTD-MPI/PD Monitor HL7 Messaging/Filers and Setups ;07/30/02
2 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**20,30,31,34**;30 Apr 99
3 ;
4 ;Reference to OPTION SCHEDULING (#19.2) file supported by IA #3599
5 ;Reference to ^DPT("AICNL" supported by IA #2070
6 ;Reference to $$SEND^VAFHUTL for file DG(43 supported by IA #2624
7 ;Reference to ^HLCS(870 supported by IA #3335
8 ;Reference to $$STAT^HLCSLM supported by IA #3574
9 ;Reference to ^DIA(2 and data derived from the AUDIT file (#1.1)
10 ;supported by IA #2097 and #2602.
11 ;
12EN1 ;Call this routine from the top to do extended checks that include:
13 ;- D HLMA1^RGMTUT98
14 ;- D EN2^RGMTMONT
15 ;- D ^RGMTMONX
16 ;
17 I $D(RGHLMQ) Q
18 ;
19 S DEV=0,EN=1 G START
20 ;
21DEV ;call used by developers to display ^RGMTMONX call
22 S DEV=1,EN=2
23 ;
24START ;
25 S CLUP=1
26 W @IOF,"Logical Link Monitor:",!,"=====================",!
27 D HLMA1^RGMTUT98
28 S DIR(0)="E" D D ^DIR K DIR
29 .S SS=22-$Y F JJ=1:1:SS W !
30 I $D(DIRUT) G QUIT
31 ;
32 D EN2
33 S DIR(0)="E" D D ^DIR K DIR
34 .S SS=22-$Y F JJ=1:1:SS W !
35 I $D(DIRUT) G QUIT
36 ;
37 I $G(EN)'=1 D ^RGMTMONX
38 ;
39 K EN,DEV G QUIT
40 ;
41EN2 ;Monitor Background Job - VAFC BATCH UPDATE
42 ;Monitor Background Job - MPIF LOC/MIS ICN RES
43 ;Check MAS PARAMETER file, field SEND PIMS HL7 V2.3 MESSAGES
44 ;if call is being made from HL7 query, variable RGHLMQ will be defined
45 S ^XTMP("RGMT",0)=$$FMADD^XLFDT(DT,30)_"^"_$$NOW^XLFDT_"^MPI/PD Maintenance Data"
46 K ^XTMP("RGMT","HLMQMONT")
47 I '$D(DEV) S DEV=0
48 S LOCSITE=$P($$SITE^VASITE(),"^",3)
49 I $D(RGHLMQ) D
50 .D NOW^%DTC
51 .S ^XTMP("RGMT","HLMQMONT",LOCSITE,"@@ RUNDATE")=$$FMTE^XLFDT($E(%,1,12))
52 I '$D(RGHLMQ) W @IOF,"MPI/PD Process Monitor:",!,"======================="
53 S TXTCNT=0
54 N BKDA,CUR,MSG,SCHDA,SEND,TIME
55CHK1 ;
56 S TXT="Checking VAFC BATCH UPDATE background job..." D TXT
57 D PIV^RGMTUT98
58 S TXTCNT=3
59 ;
60 S DIC="^DIC(19,",X="VAFC BATCH UPDATE" D ^DIC K DIC S BKDA=+Y
61 I BKDA<0 S TXT="=> VAFC BATCH UPDATE does not exist in OPTION file." D TXT K BKDA G CHK2
62 S TXT="=> VAFC BATCH UPDATE is not currently scheduled to run."
63 S DIC="^DIC(19.2,",X="VAFC BATCH UPDATE" D ^DIC K DIC S SCHDA=+Y
64 I SCHDA<0 D TXT K BKDA,TXT,SCHDA G CHK2
65 S TIME=$$GET1^DIQ(19.2,SCHDA_",",2)
66 I TIME="" D TXT K BKDA,TXT,SCHDA,TIME G CHK2
67 S TXT="=> VAFC BATCH UPDATE scheduled to run "_$$FMTE^XLFDT(TIME)_"."
68 D TXT
69 D NOW^%DTC
70 S DAY=$E(%,1,7)
71 ;
72CHK2 ;
73 S TXT="" D TXT
74 ;
75 S ICN=0,CNT=0
76 F S ICN=$O(^DPT("AICNL",1,ICN)) Q:'ICN S CNT=CNT+1
77 S TXT="Checking MPIF LOC/MIS ICN RES background job... (Total Local ICNs = "_CNT_")"
78 D TXT
79 ;
80 S DIC="^DIC(19,",X="MPIF LOC/MIS ICN RES" D ^DIC K DIC S BKDA=+Y
81 I BKDA<0 S TXT="=> MPIF LOC/MIS ICN RES does not exist in OPTION file." D TXT K BKDA G CHK2A
82 S TXT="=> MPIF LOC/MIS ICN RES is not currently scheduled to run."
83 S DIC="^DIC(19.2,",X="MPIF LOC/MIS ICN RES" D ^DIC K DIC S SCHDA=+Y
84 I SCHDA<0 D TXT K BKDA,SCHDA G CHK2A
85 S TIME=$$GET1^DIQ(19.2,SCHDA_",",2)
86 I TIME="" D TXT K BKDA,SCHDA,TIME G CHK2A
87 S TXT="=> MPIF LOC/MIS ICN RES is scheduled to run "_$$FMTE^XLFDT(TIME)_"."
88 D TXT
89 ;
90CHK2A ;check for time local/missing job was last run
91 S TIME=$P($G(^RGSITE(991.8,1,0)),"^",4) I TIME'="" D
92 .S TIME=$$FMTE^XLFDT(TIME)
93 .S TXT="=> MPIF LOC/MIS ICN RES was last run "_TIME_"."
94 .D TXT
95 ;
96CHK3 ;Check to see if .01 field in patient file has auditing turned on
97 S TXT="" D TXT
98 D FIELD^DID(2,.01,"","AUDIT","PATAUD")
99 S PATAUD=$G(PATAUD("AUDIT")) I PATAUD="" S PATAUD="NOT SET"
100 S PATAUD="<<"_PATAUD_">>"
101 S TXT="=> Audit on NAME (#.01) field of PATIENT (#2) file set to "_PATAUD
102 D TXT
103 K PATAUD
104 ;
105CHK5 ;
106 S TXT="" D TXT
107 ;
108 S TXT="Checking SEND Parameters for HL7 messaging..."
109 D TXT
110 ;
111 S SEND=$P($$SEND^VAFHUTL,"^",2)
112 S CUR=$S(SEND=1:"SEND MESSAGES",SEND=0:"STOP MESSAGES",SEND=2:"SUSPEND MESSAGES",1:"NULL")
113 S TXT="=> SEND PIMS HL7 V2.3 MESSAGES currently set to << "_CUR_" >>."
114 D TXT
115 ;
116 S TXT="=> STOP MPI/PD MESSAGING currently set to "
117 S SEND=$P($G(^RGSITE(991.8,1,1)),"^",6)
118 S CUR=$S(SEND=1:"SEND MESSAGES",SEND=0:"STOP MESSAGES",SEND=2:"SUSPEND MESSAGES",1:"NULL")
119 S TXT="=> STOP MPI/PD MESSAGING currently set to << "_CUR_" >>."
120 D TXT
121 ;
122CHK6 ;
123 K RGMT
124 S LOC=$P($$SITE^VASITE(),"^")
125 D LINK^HLUTIL3(LOC,.RGMT)
126 S LOCIEN=$O(RGMT(0))
127 I 'LOCIEN D G QUIT
128 .S TXT="^DIC(4,""AC"" xref problem. Check ^DIC(4,""AC"",,"_LOC
129 .D TXT
130 S LOCLINK=RGMT(LOCIEN)
131 ;
132 S TXT="" D TXT
133 ;
134 S TXT="Checking SHUTDOWN LLP? field and TCP/IP SERVICE TYPE for "_LOCLINK_"..."
135 D TXT
136 ;
137 S CUR=$$GET1^DIQ(870,LOCIEN_",",14)
138 S TXT="=> SHUTDOWN LLP? currently set to << "_CUR_" >>."
139 D TXT
140 ;
141 S CUR=$$GET1^DIQ(870,LOCIEN_",",400.03)
142 S TXT="=> TCP/IP SERVICE TYPE currently set to << "_CUR_" >>."
143 D TXT
144 ;
145 ;check MPIVA for LLP TYPE
146 S DIC="^HLCS(870,",X="MPIVA" D ^DIC K DIC S MPILL=+Y
147 S CUR=$$GET1^DIQ(870,MPILL_",",2)
148 S TXT="=> Logical Link MPIVA currently set to << "_CUR_" >>."
149 D TXT
150 ;
151 ;check to see if Link Manager is running
152 S LMSTAT=$$STAT^HLCSLM
153 S CUR=$S('LMSTAT:"NOT RUNNING",1:"RUNNING")
154 S TXT="=> HL LINK MANAGER is currently << "_CUR_" >>."
155 D TXT
156 ;
157FLDLIST ;capture fields being audited
158 I $D(RGHLMQ) D
159 .S AUDCNT=0
160 .S ^XTMP("RGMT","HLMQMONT",LOCSITE,"AUDIT",0)="Compiled: "_$$FMTE^XLFDT($$NOW^XLFDT)
161 .S FLDLP=0 F S FLDLP=$O(^DD(2,"AUDIT",FLDLP)) Q:'FLDLP D
162 ..S AUDCNT=AUDCNT+1
163 ..K RGARR D FIELD^DID(2,FLDLP,"","LABEL","RGARR")
164 ..S FLDNM=$G(RGARR("LABEL")) Q:FLDNM=""
165 ..S ^XTMP("RGMT","HLMQMONT",LOCSITE,"AUDIT",AUDCNT)=FLDLP_"^"_FLDNM
166 ;
167 I $D(CLUP),$D(DIRUT) Q
168 ;
169QUIT ;
170 K %,BKDA,CLUP,CNT,CUR,DAY,DIR,DIRUT,ICN,JJ,LMSTAT,LOC,LOCIEN,LOCLINK
171 K LOCSITE,MPILL,MSG,PATAUD,RGHLMQ,RGMT,SCHDA,SEND,SS,TIME,TXT,TXTCNT,X,Y
172 K AUDCNT,FLDLP,RGARR,FLDNM
173 Q
174 ;
175TXT ;
176 S TXTCNT=TXTCNT+1
177 I '$D(RGHLMQ) W !,TXT
178 I $D(RGHLMQ) S ^XTMP("RGMT","HLMQMONT",LOCSITE,TXTCNT)=TXT
179 Q
Note: See TracBrowser for help on using the repository browser.