source: WorldVistAEHR/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDFBKS1.m@ 1696

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

initial load of WorldVistAEHR

File size: 7.6 KB
Line 
1IBDFBKS1 ;ALB/CJM/AAS - ENCOUNTER FORM - create form spec for scanning (Broker Version CONTINUATION) ; 6-JUN-95
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;**3,25**;APR 24, 1997
3 ;
4 ;
5FORM ;;
6 ;;'Paper Keyboard FormSpec
7 ;;'VERSION = 2.53
8 ;;'AICS Version 3.0;**7,3,25**
9SITE ;;'VA SITE NAME
10 ;;INT anchorcnt;
11 ;;INT hasprint;
12 ;;INT check;
13 ;;INT firstanchor;
14 ;;INT pfid;
15 ;;INT page;
16 ;;INT saveunrf;
17 ;;INT ddechan;
18 ;;ALPHA narrative;
19 ;;
20 ;;FORM
21NAME ;; NAME = "ENCOUNTER FORM 71";
22 ;; AREA = 0 0 2770 2150;
23 ;; PAGESIZE = " 2770 2150";
24 ;; ANCHOR1 = NONE;
25 ;; ANCHOR2 = NONE;
26 ;; POINTS = 0 0 0 0;
27 ;; CONFIDENCE = " 9";
28 ;; CLOSEFORMSPEC = {DDETERM(ddechan);
29 ;; LOG(\"AICS #52/DDE channel is closed\"); };
30 ;; DATEFORMAT = "6";
31 ;; TIMEFORMAT = "5";
32 ;; EXFORMAT = "STRIP";
33 ;; EXPORT = "\'SHOW(\"DO NOT EXPORT - NOT SCANNABLE\");";
34 ;; FS = ",";
35 ;; QUOTABLE = "\\n";
36 ;; ImageProcessing = {
37 ;; IMAGEPROC=1
38 ;; AUTO_ALIGN=0
39 ;; ALIGN_TEXT=0
40 ;; ALIGN_ORIENT=0
41 ;; DESKEW=0
42 ;; DESHADE=0
43 ;; SMOOTH=0
44 ;; REMOVE_BORDER=1
45 ;; REMOVE_NOISE=0
46 ;; PROC_MIN_VERT_LINE_LEN=0
47 ;; PROC_MIN_HORZ_LINE_LEN=0
48 ;; FATTYPE=0
49 ;; FATTEN=0};
50 ;; POSITION = "60,60";
51 ;; OPENFORMSPEC = {ddechan=DDEINIT(\"IBDSCAN\",\"DdeServerConv\");
52 ;; if (ddechan == 0) LOG(\"AICS #54/Unable to Open Channel to AICS.\");
53 ;; \' if (ddechan == 0) SHOW(\"Unable to Open Channel to AICS to send data.\");
54 ;; anchorcnt = 4;
55 ;; };
56 ;;FIELD ' 1
57 ;; NAME = "TOP LEFT ANCHOR";
58 ;; ELEMTYPE = ELEM_PAT;
59 ;; METRIC = 17 120 120;
60 ;; DATATYPE =INT;
61 ;; LENGTH = 2;
62 ;; POINTS = 65 70 120 130;
63 ;; PAGE = 0;
64 ;; CONFIDENCE = " 6";
65 ;; HIDDEN = "1";
66 ;; END = {if (anchorcnt == 2){
67 ;; firstanchor = 1;
68 ;; if (FIELDSTATUS != FIELD_OK) firstanchor = 0;}
69 ;; };
70 ;; Pattern = "PATTERN=C:\\VISTA\\AICS\\FORMSPEC\\AICSLOGO.BMP";
71 ;; REQUIRED = "1";
72 ;;FIELD ' 2
73 ;; NAME = "BOTTOM LEFT ANCHOR";
74 ;; ELEMTYPE = ELEM_PAT;
75 ;; METRIC = 17 120 120;
76 ;; DATATYPE =INT;
77 ;; LENGTH = 2;
78 ;; POINTS = 2690 70 2745 130;
79 ;; PAGE = 0;
80 ;; CONFIDENCE = " 6";
81 ;; HIDDEN = "1";
82 ;; Pattern = "PATTERN=C:\\VISTA\\AICS\\FORMSPEC\\AICSLOGO.BMP";
83 ;; REQUIRED = "1";
84 ;; END = {INT aset;
85 ;; if (anchorcnt == 2){
86 ;; if ((firstanchor == 1) && (FIELDSTATUS == FIELD_OK))
87 ;; aset = ANCHORSET(1,2);
88 ;; else aset = 0;
89 ;; if (aset == 0) {NEXTFIELD = 3;}
90 ;; else NEXTFIELD = 5;}
91 ;; };
92 ;;FIELD ' 3
93 ;; NAME = "TOP RIGHT ANCHOR";
94 ;; ELEMTYPE = ELEM_PAT;
95 ;; METRIC = 17 120 120;
96 ;; DATATYPE =INT;
97 ;; LENGTH = 2;
98 ;; POINTS = 65 2015 120 2075;
99 ;; PAGE = 0;
100 ;; CONFIDENCE = " 6";
101 ;; END = {if (anchorcnt == 2) {
102 ;; firstanchor = 1;
103 ;; if (FIELDSTATUS != FIELD_OK) firstanchor = 0;}
104 ;; };
105 ;; HIDDEN = "1";
106 ;; Pattern = "PATTERN=C:\\VISTA\\AICS\\FORMSPEC\\AICSLOGO.BMP";
107 ;; REQUIRED = "1";
108 ;;FIELD ' 4
109 ;; NAME = "BOTTOM RIGHT ANCHOR";
110 ;; ELEMTYPE = ELEM_PAT;
111 ;; METRIC = 17 120 120;
112 ;; DATATYPE =INT;
113 ;; LENGTH = 2;
114 ;; POINTS = 2690 2015 2745 2075;
115 ;; PAGE = 0;
116 ;; CONFIDENCE = " 6";
117 ;; HIDDEN = "1";
118 ;; Pattern = "PATTERN=C:\\VISTA\\AICS\\FORMSPEC\\AICSLOGO.BMP";
119 ;; REQUIRED = "1";
120 ;; END={INT aset;
121 ;;INT result;
122 ;; if (anchorcnt == 2){
123 ;; if ((firstanchor == 1) && (FIELDSTATUS == FIELD_OK))
124 ;; aset = ANCHORSET(3,4);
125 ;; else aset =0;
126 ;; if (aset == 0) {
127 ;; if (ddechan == 0) SHOW(\"Anchors not found, recognition stopping!\");
128 ;; if (ddechan != 0) {
129 ;; result = DDEEXEC(ddechan,\"SAVEFORM(0,0,0,U"\);
130 ;; DDEPOKE(ddechan,\"DdeServerItem\",\"Anchors not found\");}
131 ;; CHAIN(\"C:\\\\vista\\\\aics\\\\formspec\\\\AICSMSTR.FS\",1);}}
132 ;;
133 ;; if (anchorcnt == 4){
134 ;; aset = ANCHORSET(1,4);
135 ;; if (aset == 0) {
136 ;; if (ddechan == 0) SHOW(\"Anchors not found, recognition stopping!\");
137 ;; if (ddechan != 0) {
138 ;; result = DDEEXEC(ddechan,\"SAVEFORM(0,0,0,U"\);
139 ;; DDEPOKE(ddechan,\"DdeServerItem\",\"Anchors not found\");}
140 ;; CHAIN(\"C:\\\\vista\\\\aics\\\\formspec\\\\AICSMSTR.FS\",1);}}
141 ;; };
142 ;;FIELD ' 5
143 ;;NAME = "SCANPAGE?";
144 ;; ELEMTYPE = ELEM_PAT;
145 ;; METRIC = 17 120 120;
146 ;; DATATYPE =INT;
147 ;; LENGTH = 2;
148 ;; POINTS = 2669 1264 2734 1344;
149 ;; PAGE = 0;
150 ;; CONFIDENCE = " 7";
151 ;; HIDDEN = "1";
152 ;; Pattern = "PATTERN=C:\\VISTA\\AICS\\FORMSPEC\\AICSLOGO.BMP";
153 ;; REQUIRED = "1";
154 ;;FIELD ' 6
155 ;; NAME = "FORM ID CHECK";
156 ;; ELEMTYPE = ELEM_OCR;
157 ;; DATATYPE =INT;
158 ;; LENGTH = 3;
159 ;; POINTS = 50 1412 150 1545;
160 ;; PAGE = 0;
161 ;; CHARFORMAT = "NOSPACES";
162 ;; END = {
163 ;; check=GETIVALUE(FIELDNAME);
164 ;; if (check < 1) FIELDSTATUS = FIELD_BAD;
165 ;; if (GETSTATUS(FIELDNAME) == FIELD_BLANK) FIELDSTATUS = FIELD_BAD;};
166 ;; REQUIRED = "1";
167 ;;FIELD ' 7
168 ;; NAME = "FORM ID";
169 ;; ELEMTYPE = ELEM_OCR;
170 ;; DATATYPE =INT;
171 ;; LENGTH = 9;
172 ;; POINTS = 50 635 150 910;
173 ;; PAGE = 0;
174 ;; CHARFORMAT = "NOSPACES";
175 ;; END = {
176 ;; INT checksum;
177 ;; INT div;
178 ;;
179 ;; pfid=GETIVALUE(FIELDNAME);
180 ;; checksum=3*pfid;
181 ;; div=checksum/997;
182 ;; checksum=checksum-(div*997);
183 ;; if ((checksum!=check)&&(FIELDACCEPTED!=1)) {
184 ;; FIELDSTATUS=FIELD_BAD;
185 ;; }
186 ;;};
187 ;;FIELD ' 8
188 ;; NAME = "PAGE CHECK";
189 ;; ELEMTYPE = ELEM_OCR;
190 ;; DATATYPE =INT;
191 ;; LENGTH = 3;
192 ;; POINTS = 50 1590 150 1700;
193 ;; PAGE = 0;
194 ;; CHARFORMAT = "NOSPACES";
195 ;; END = {
196 ;; check=GETIVALUE(FIELDNAME);
197 ;; if (check < 1) FIELDSTATUS = FIELD_BAD;
198 ;; if (GETSTATUS(FIELDNAME) == FIELD_BLANK) FIELDSTATUS = FIELD_BAD;};
199 ;; REQUIRED = "1";
200 ;;FIELD ' 9
201 ;; NAME = "PAGE";
202 ;; ELEMTYPE = ELEM_OCR;
203 ;; DATATYPE =INT;
204 ;; LENGTH = 1;
205 ;; POINTS = 50 1860 150 1950;
206 ;; PAGE = 0;
207 ;; CHARFORMAT = "NOSPACES";
208 ;; END = {INT checksum;
209 ;; INT div;
210 ;; ALPHA next;
211 ;;
212 ;; page=GETIVALUE(FIELDNAME);
213 ;; next=STRCAT("TOP OF PAGE ",ITOA(page));
214 ;; checksum=3*page;
215 ;; div=checksum/997;
216 ;; checksum=checksum-(div*997);
217 ;;
218 ;; if ((checksum!=check)&&(FIELDACCEPTED!=1)) {
219 ;; FIELDSTATUS=FIELD_BAD;
220 ;; }
221PGCK ;; else if ((page!=1)&&(page!=2)){
222 ;; FIELDSTATUS=FIELD_BAD;
223 ;; }
224 ;; else if (page>1) {NEXTFIELD=GETNUM(next); }
225 ;;};
226QUIT ;;
227 ;;
228 ;;
229TOPOFPG ;;
230NUMBER1 ;;FIELD ' 49
231FLDNAME ;; NAME = "TOP OF PAGE 2";
232 ;; ELEMTYPE = RECT;
233 ;; METRIC = 2 2 0 0 0 0 0 0 0;
234 ;; DATATYPE =INT;
235 ;; LENGTH = 1;
236 ;; POINTS = 100 2040;
237PAGE1 ;; PAGE = 1;
238 ;; HIDDEN="1";
239 ;; EXFORMAT="NOEXPORT";
240QUIT1 ;;
241 ;;
242BOTTOM ;;
243NUMBER2 ;;FIELD ' 49
244NAME2 ;; NAME = "BOTTOM OF PAGE";
245 ;; ELEMTYPE = RECT;
246 ;; METRIC = 2 2 0 0 0 0 0 0 0;
247 ;; DATATYPE =INT;
248 ;; LENGTH = 1;
249 ;; POINTS = 100 2040;
250PAGE2 ;; PAGE = 1;
251 ;; HIDDEN="1";
252 ;;END = {INT result;
253 ;;INT loop;
254 ;;ALPHA Data;
255 ;;ALPHA str;
256 ;;ALPHA RS;
257 ;;ALPHA Save;
258 ;;ALPHA New;
259 ;;ALPHA Add;
260 ;;ALPHA End;
261 ;;
262 ;;if (ddechan == 0) {
263 ;; SHOW(\"AICS is not connected, no data exported!\");
264 ;; CHAIN(\"C:\\\\vista\\\\aics\\\\formspec\\\\AICSMSTR.FS\",1);}
265 ;;
266 ;;New=\"$$NEW$$("\;
267 ;;Add=\"$$ADD$$("\;
268 ;;End=\"$$END$$("\;
269 ;;RS=STRCAT(",",ITOC(13));
270 ;;
271 ;;if (BATCH&&(saveunrf>0)){
272SAVE ;; Save = \"SAVEFORM("\;
273 ;; if (ddechan != 0) result = DDEEXEC(ddechan,Save);
274 ;; if (result==0) SHOW(\"Warning: Saving of Unrecognized form in AICS has Failed!\");
275 ;; else DDEPOKE(ddechan,\"DdeServerItem\",\"Operator Verification Needed\");
276 ;; CHAIN(\"C:\\\\vista\\\\aics\\\\formspec\\\\AICSMSTR.FS\",1);}
277 ;;
278 ;; if (ddechan != 0) {
279EXPORT ;; \'if (STRFIND(Data,RS,STRLEN(Data) - 1) > 0) {;; \' Data = SUBSTR(Data,1,STRLEN(Data) - 1); }
280 ;;
281 ;; result=DDEPOKE(ddechan,\"DdeServerItem\",End);}
282 ;;CHAIN(\"c:\\\\vista\\\\aics\\\\formspec\\\\AICSMSTR.FS\",1);
283 ;;};
284 ;;EXFORMAT="NOEXPORT";
285QUIT2 ;;
Note: See TracBrowser for help on using the repository browser.