source: FOIAVistA/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDF2F1.m@ 1250

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1IBDF2F1 ;ALB/CJM - ENCOUNTER FORM - PRINT FORM(sends to printer) ;NOV 16,1992
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;**3**;APR 24, 1997
3 ;
4REGISTER(PAGE) ;registration for scanning, form # and patient at bottom
5 N PAGECHK,TYPECHK,IDCHK,VA
6 I IBDEVICE("PCL") D
7 .I IBFORM("SCAN") D
8 ..;calculate the checksums
9 ..S PAGECHK=(3*PAGE)#29,TYPECHK=(3*IBFORM("TYPE"))#997,IDCHK=(3*(+$G(IBPFID)))#997
10 .;set top margin to top of page
11 .W $C(27),"&l0E"
12 .W $C(27),"&a0v0H",!
13 .;
14 .I IBFORM("SCAN") D ANCHORS^IBDF2F2
15 .;
16 .;I $G(IBFORM("SCAN",PAGE)) D
17 .; -- black box used to determine if page has data for scanning
18 .; but not for sample forms
19 .;I '$G(IBDSAMP) W $C(27),"&a7576v3400H",$C(27),"&f1y2X",$C(27)
20 .;I '$G(IBDSAMP) W $C(27),"&a7576v3400H",$C(27),"*c140h140v0P",$C(27)
21 .;
22 .;define font for OCR'd text
23 .W $C(27),")s1p10h14v0s0b3T"
24 .;define font for non-OCR' text
25 .W $C(27)_"(s0p16.67h8.5v0s0b0T"
26 .;print the form identifiers
27 .W $C(27),"&a330h300V",! ; new line needed to get rest of line to print okay
28 .W ! ; new line needed to get rest of line to print okay
29 .W $C(27),"&a330h300V",$C(15),"FORM:",$C(27),"&a650H",$C(14),IBFORM("TYPE")
30 .W $C(27),"&a1470H",$C(15),"ID:",$C(27),"&a1700H",$C(14),$G(IBPFID)
31 .W $C(27),"&a4830H",$C(15),"PAGE:",$C(27),"&a5150H",$C(14),PAGE
32 .;
33 .;is the page going to be scanned?
34 .I $G(IBFORM("SCAN",PAGE)),$G(IBPFID) D
35 ..;Populating the scannable pages field in the forms tracking file
36 ..;#357.96. This is used when scanning the EF to make sure all
37 ..;scannable pages have been scanned before data is filed in PCE.
38 ..I '$D(^IBD(357.96,IBPFID,9,PAGE,0)) D
39 ...S DIC="^IBD(357.96,IBPFID,9,",DIC(0)="L",DIC("P")=$P(^DD(357.96,9,0),"^",2),DA(1)=IBPFID,X=PAGE,DLAYGO=357.96 K DD,DO D FILE^DICN K DIC,DA,DLAYGO,DD,DO
40 ..;print the checksums
41 ..W $C(14),$C(27),"&a3400H",TYPECHK,$C(27),"&a3900H",IDCHK,$C(27),"&a4400H",PAGECHK
42 .;
43NAM .;print form id, etc. on bottom of form
44 .D
45 ..W !,$C(15),$C(27),"&a300h7710V"
46 ..I $G(IBDSAMP) W "Sample Form: ",$P($G(^IBE(357,+$G(IBFORM),0)),"^") Q
47 ..S X=$G(^TMP("IB",$J,"INTERFACES",+$G(DFN),"DPT PATIENT'S NAME"))
48 ..W:X'="" X W:X="" $P($G(^DPT(+$G(DFN),0)),"^")
49 .;
50 .D
51 ..W $C(27),"&a1900H"
52 ..I $G(IBDSAMP) W "Clinic: ",$P($G(^SC(+$G(IBCLINIC),0)),"^") Q
53 ..S X=$G(^TMP("IB",$J,"INTERFACES",+$G(DFN),"DPT PATIENT'S PID"))
54 ..W:X'="" X I X="",+$G(DFN) D PID^VADPT W VA("PID")
55 .;
56 .W $C(27),"&a4200H","VA FORM 10-0360 APR 1994"
57 .W $C(27),"&a4200h7620V","Station: ",$P($$SITE^VASITE,"^",3)
58 .I $G(REPRINT) W $C(27),"&a1900H","**REPRINT**"
59 .;
60 .;reset the primary font & top margin, position cursor at the top
61 .;reset the font for body of form
62 .D
63 ..I IBFORM("WIDTH")>96 W $C(27)_"(s0p16.67h8.5v0s0b0T" Q
64 ..I IBFORM("WIDTH")>80 W $C(27)_"(s0p12h10v0s0b0T" Q
65 ..W $C(27)_"(s0p10h12v0s0b0T"
66 .;set top margin to leave 4 lines at top
67 .W $C(27),"&l4E"
68 .;set cursor to top left
69 .W $C(27),"&a0c0R"
70 ;
71 ;move cursor to top left
72 I '(IBFORM("SCAN")&IBDEVICE("PCL")),IBDEVICE("RASTER") S (DX,DY)=0 X IOXY K DX,DY
73 Q
74 ;
75 ;this call replaced by call to achors^ibdf2f2
76ANCHORS ; -- print anchors, anchors composed of two narrow rectangles
77 ; escape &a positions cursor at specified vert and horiz decipoints
78 ; escape *c prints rectangle of specified vert and horiz decipoints
79 ; 0P is for complete fill.
80 ;
81 Q
82 W !
83 ; -- top left corner (ANCHOR 1)
84 W $C(27),"&a184v4H",$C(27),"*c12h120v0P",$C(27),"*c124h12v0P"
85 ;
86 ; -- top right (ANCHOR 3)
87 W $C(27),"&a184v5534H",$C(27),"*c116h12v0P",$C(27),"&a184v5650H",$C(27),"*c12h120v0P"
88 ;
89 ; -- bottom left (ANCHOR 4)
90 W !,$C(27),"&a7732v4H",$C(27),"*c124h12v0P",$C(27),"&a7615v4H",$C(27),"*c12h121v0P"
91 ;
92 ; -- bottom right (ANCHOR 6)
93 W $C(27),"&a7732v5534H",$C(27),"*c116h12v0P",$C(27),"&a7616v5650H",$C(27),"*c12h120v0P"
94 Q
Note: See TracBrowser for help on using the repository browser.