1 | VSITBUL ;ISD/RJP - Visit Error/Warning Bulletin ;4/21/97
|
---|
2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**76,81**;Aug 12, 1996
|
---|
3 | ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
|
---|
4 | ; the incorporation of the module into PCE. For historical reference,
|
---|
5 | ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
|
---|
6 | ; patches.
|
---|
7 | ;
|
---|
8 | ;;2.0;VISIT TRACKING;**2**;Aug 12, 1996;
|
---|
9 | ;
|
---|
10 | Q ; - not an entry point
|
---|
11 | ;
|
---|
12 | VAR(ERR) ; - log error messages
|
---|
13 | ; - called by ^VSITPUT
|
---|
14 | ;
|
---|
15 | ; - pass ERR = <error message text>
|
---|
16 | ; - rtns ^TMP($J,"VSIT-ERROR",
|
---|
17 | Q:$G(VSIT("IEN")) ;ADDED TO END UNNECESSARY MESSAGES
|
---|
18 | D:'$D(^TMP($J,"VSIT-ERROR")) INI
|
---|
19 | Q:$G(ERR)']"" N TXT
|
---|
20 | S TXT="",$P(TXT,"- ",25)="" D TXT(TXT)
|
---|
21 | I "LOC,VDT,TYP,PAT,INS,SVC,"[($P(ERR,"^")) D
|
---|
22 | . D TXT("*** Fatal Error - Required Variable Not Defined ***")
|
---|
23 | E D TXT("*** Warning - Non required Visit Data Field Invalid")
|
---|
24 | D TXT($P(ERR,"^",3)_" -> "_$P(ERR,"^",2))
|
---|
25 | Q
|
---|
26 | ;
|
---|
27 | TXT(TXT) ; - put text
|
---|
28 | ;
|
---|
29 | N LCT S LCT=$G(^TMP($J,"VSIT-ERROR",0))+1,^(0)=LCT,^(LCT)=$G(TXT)
|
---|
30 | Q
|
---|
31 | ;
|
---|
32 | INI ; - initialize message
|
---|
33 | ;
|
---|
34 | N TXT,X,Y,DIVIEN,DIVISION
|
---|
35 | K ^TMP($J,"VSIT-ERROR")
|
---|
36 | D NOW^%DTC S Y=% D DD^%DT
|
---|
37 | I +$G(DUZ(2)) S DIVIEN=+$G(DUZ(2))_"," S DIVISION=$$GET1^DIQ(4,DIVIEN,.01)
|
---|
38 | S:$L($G(DIVISION))<3 DIVISION="Unknown"
|
---|
39 | D TXT(" When: "_Y_" Option: "_$P($G(XQY0),"^"))
|
---|
40 | D TXT(" User: "_$S($D(DUZ):$P($G(^VA(200,+DUZ,0)),"^"),1:"Unknown")_" Division: "_DIVISION)
|
---|
41 | S TXT="",$P(TXT,"- ",25)="" D TXT(TXT)
|
---|
42 | ; - required variables
|
---|
43 | D TXT("The following are a list of required variables.")
|
---|
44 | D TXT(" VSIT = "_$S($G(VSIT)]"":VSIT,1:"Undefined"))
|
---|
45 | D TXT(" DFN = "_$S($D(DFN):DFN,1:"Undefined")_" (patient)")
|
---|
46 | D:$G(VSIT(0))]"" TXT(" VSIT(0) = "_VSIT(0))
|
---|
47 | D TXT("Hospital Location = "_$G(VSIT("LOC")))
|
---|
48 | Q
|
---|
49 | ;
|
---|
50 | SND ; - send bulletin to mail group 'VSIT CREATE ERROR'
|
---|
51 | ; called by ^VSIT
|
---|
52 | N TXT I $G(VSIT("IEN"))>0 D
|
---|
53 | . S TXT="",$P(TXT,"- ",25)="" D TXT(TXT)
|
---|
54 | . D TXT("*** Reference Visit Record Number "_+$G(VSIT("IEN"))_" on "_$P($G(VSIT("IEN")),"^",2)_" ***")
|
---|
55 | ;
|
---|
56 | N GRP,MBR,XMSUB,XMTEXT,XMDUZ,XMY
|
---|
57 | S XMY("G.VSIT CREATE ERROR")=""
|
---|
58 | S XMSUB="ERROR - Visit File Creation"
|
---|
59 | S XMTEXT="^TMP($J,""VSIT-ERROR"","
|
---|
60 | S XMDUZ=.5
|
---|
61 | I '$D(XMY),$D(DUZ)#10 S XMY(DUZ)=""
|
---|
62 | S:'$D(XMY) XMY(.5)=""
|
---|
63 | D ^XMD
|
---|
64 | K ^TMP($J,"VSIT-ERROR"),XMB
|
---|
65 | Q
|
---|