source: WorldVistAEHR/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDF18E2.m@ 1766

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

initial load of WorldVistAEHR

File size: 4.5 KB
Line 
1IBDF18E2 ;ALB/AAS - AICS Error Logging Routine ;27-JAN-97
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;**25,51**;APR 24, 1997
3 ;
4LOGERR(ERRNO,FORMID,DATANO,VALUE,PI,QLFR,TYPEDTA,TXT) ;
5 ; -- log aics scanning processing error
6 N TEXT,IBDERR
7 S TEXT(1)=$$NOW^XLFDT
8 S TEXT(2)=$P($G(^IBD(357.96,+$G(FORMID),0)),"^",2) I 'TEXT(2) S TEXT(2)=$G(DFN) ; -- dfn
9 S TEXT(3)=$G(FORMID("APPT")) ; -- encounter date/time
10 S TEXT(4)=$P($G(^IBD(357.96,+$G(FORMID),0)),"^",4) ; -- pointer to 357.95
11 S TEXT(5)=$G(FORMID) S:+TEXT(5) TEXT(5)=+TEXT(5) ; -- pointer to 357.96
12 S:$G(DATANO)'="" TEXT(6)=$G(DATANO) ; -- number of bubble or hand print field (ie BUBBLE(1)
13 S:$G(VALUE)'="" TEXT(7)=$G(VALUE) ; -- value of bubble or hand print field
14 S TEXT(8)=$G(FORMID("SOURCE"))
15 S TEXT(9)=$P($G(^IBD(357.95,+$P($G(^IBD(357.96,+$G(FORMID),0)),"^",4),0)),"^",21) ; -- form name
16 S:$G(PI)'="" TEXT(10)=$G(PI) ; -- package interface
17 S:$G(QLFR)'="" TEXT(11)=$G(QLFR) ; -- name of qualifier
18 S:$G(TXT)'="" TEXT(12)=$G(TXT) ; -- Text appearing on the form
19 S TEXT(13)=$G(DUZ) ; -- user
20 S:$G(TYPEDTA)'="" TEXT(14)=$P($G(^IBE(359.1,+TYPEDTA,0)),"^")
21 S:$G(XQY0)'="" TEXT(15)=$P(XQY0,"^") ; -- option name
22 S TEXT(16)=$G(ERRNO) ; -- entry in dialog file
23 S:$G(FORMID("PAGE")) TEXT(17)=$G(FORMID("PAGE"))
24 S:$G(FORMID("WSID"))'="" TEXT(18)=$G(FORMID("WSID"))
25 ;
26 ; -- Build Error Message from Dialog file
27 D BLD^DIALOG(ERRNO,.TEXT,.IBDOUT,"IBDERR","S")
28 ;D ERRMSG(ERRNO,.TEXT)
29 ;
30 ; -- file error in aics error log file
31 D ERRFIL(ERRNO,.TEXT,.IBDERR)
32 Q:ERRNO=3570001!(ERRNO=3570004)
33 ;
34 ; -- set error in pxca(aics error) array to pass back to workstation
35 S CNT=$G(PXCA("AICS ERROR"))+1
36 S PXCA("AICS ERROR")=CNT
37 S PXCA("AICS ERROR",1,1,1,CNT)=$P($G(IBDERR(1)),": ",2,99)
38 Q
39 ;
40ERRMSG(ERRNO,TEXT) ;
41 ; -- Build Error Message from Dialog file
42 D BLD^DIALOG(ERRNO,.TEXT,.IBDOUT,"IBDERR","S")
43 Q
44 ;
45ERRFIL(ERRNO,TEXT,IBDERR) ;
46 ; -- file error in aics error log file
47 N FDAROOT,FDAIEN
48 ;
49 Q:$G(TEXT(1))=""
50 S FDAROOT(359.3,"+1,",.01)=$G(TEXT(1))
51 S:$G(TEXT(2))'="" FDAROOT(359.3,"+1,",.02)=$G(TEXT(2))
52 S:$G(TEXT(3))'="" FDAROOT(359.3,"+1,",.03)=$G(TEXT(3))
53 S:$G(TEXT(4))'="" FDAROOT(359.3,"+1,",.04)=$G(TEXT(4))
54 S:$G(TEXT(5))'="" FDAROOT(359.3,"+1,",.05)=$G(TEXT(5))
55 S:$G(TEXT(6))'="" FDAROOT(359.3,"+1,",.06)=$G(TEXT(6))
56 S:$G(TEXT(7))'="" FDAROOT(359.3,"+1,",.07)=$G(TEXT(7))
57 S:$G(TEXT(8))'="" FDAROOT(359.3,"+1,",.08)=$G(TEXT(8))
58 S:$G(TEXT(9))'="" FDAROOT(359.3,"+1,",.09)=$G(TEXT(9))
59 S:$G(TEXT(10))'="" FDAROOT(359.3,"+1,",.1)=$G(TEXT(10))
60 S:$G(TEXT(11))'="" FDAROOT(359.3,"+1,",.11)=$G(TEXT(11))
61 S:$G(TEXT(12))'="" FDAROOT(359.3,"+1,",.12)=$G(TEXT(12))
62 S:$G(TEXT(13))'="" FDAROOT(359.3,"+1,",.13)=$G(TEXT(13))
63 S:$G(TEXT(16))'="" FDAROOT(359.3,"+1,",.16)=$G(TEXT(16))
64 S:$G(TEXT(15))'="" FDAROOT(359.3,"+1,",1.01)=$G(TEXT(15))
65 S:$G(TEXT(17))'="" FDAROOT(359.3,"+1,",.17)=$G(TEXT(17))
66 S:$G(TEXT(18))'="" FDAROOT(359.3,"+1,",.18)=$G(TEXT(18))
67 ;
68 S CNT=2
69 I ERRNO=3570001 D EW^IBDFBK2(.IBDERR,.PXCA,.CNT,1)
70 ;
71 D UPDATE^DIE("","FDAROOT","FDAIEN")
72 D WP^DIE(359.3,FDAIEN(1)_",",10,"KA","IBDERR")
73 Q
74 ;
75PRT ; -- print error listing
76 ;
77 W !,?4,"** This option is OUT OF ORDER **" QUIT ;Code set Versioning
78 ;
79 I '$D(IOF) D HOME^%ZIS
80 W @IOF,?10,"Print List of Scanning Errors and Warnings",!!!
81 ;
82 S DIC="^IBD(359.3,",L=0,FR="?,?,?,?",TO="?,?,?,?"
83 S BY="[IBD LIST ERRORS]"
84 S FLDS="[IBD LIST ERRORS]"
85 ;
86 ;S DISUPNO=1 ; -- print No records found if not set, don't uncomment this line
87 S DIPCRIT=1 ; -- print sort criteria on first page.
88 S DIS(0)="I '$P($G(^IBD(359.3,D0,1)),U,2)"
89 D EN1^DIP
90PRTQ K DIC,L,FLDS,DIOEND,FR,TO,BY,DHD,X,Y,DUOUT,DIRUT
91 Q
92 ;
93NOAPP ; -- print no appointment listing
94 I '$D(IOF) D HOME^%ZIS
95 S IBDCNT=0
96 W @IOF,?10,"Print List Patients with Data from Encounter Forms and No appointemnts",!!!
97 ;
98 S DIC="^IBD(357.96,",L=0,FR="?,?,?,T-1",TO="?,?,?,T-1"
99 S BY="[IBD NO APPOINTMENT LIST]"
100 S FLDS="[IBD NO APPOINTMENT LIST]"
101 ;
102 ;S DIPCRIT=1 ; -- print sort criteria on first page.
103 S DIS(0)="I 1 S IBDCNT=IBDCNT+1"
104 S IOP="HOME"
105 D EN1^DIP
106NOAPPQ K DIC,L,FLDS,DIOEND,FR,TO,BY,DHD,X,Y,DUOUT,DIRUT,IBDCNT
107 Q
108NOAPP1 ; -- print no appointment listing
109 I '$D(IOF) D HOME^%ZIS
110 S IBDCNT=0
111 W @IOF,?10,"Print List Patients with Data from Encounter Forms and No appointemnts",!!!
112 ;
113 S DIC="^IBD(357.96,",L=0,FR="?,?,?,T-1",TO="?,?,?,T-1"
114 S BY="[IBD NO APPOINTMENT1]"
115 S FLDS="[IBD NO APPOINTMENT LIST]"
116 ;
117 ;S DIPCRIT=1 ; -- print sort criteria on first page.
118 S DIS(0)="I 1 S IBDCNT=IBDCNT+1"
119 S IOP="HOME"
120 D EN1^DIP
121NOAPP1Q K DIC,L,FLDS,DIOEND,FR,TO,BY,DHD,X,Y,DUOUT,DIRUT,IBDCNT
122 Q
Note: See TracBrowser for help on using the repository browser.