Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBDF2F1

IBDF2F1.m

Go to the documentation of this file.
  1. IBDF2F1 ;ALB/CJM - ENCOUNTER FORM - PRINT FORM(sends to printer) ;NOV 16,1992
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;**3**;APR 24, 1997
  1. ;
  1. REGISTER(PAGE) ;registration for scanning, form # and patient at bottom
  1. N PAGECHK,TYPECHK,IDCHK,VA
  1. I IBDEVICE("PCL") D
  1. .I IBFORM("SCAN") D
  1. ..;calculate the checksums
  1. ..S PAGECHK=(3*PAGE)#29,TYPECHK=(3*IBFORM("TYPE"))#997,IDCHK=(3*(+$G(IBPFID)))#997
  1. .;set top margin to top of page
  1. .W $C(27),"&l0E"
  1. .W $C(27),"&a0v0H",!
  1. .;
  1. .I IBFORM("SCAN") D ANCHORS^IBDF2F2
  1. .;
  1. .;I $G(IBFORM("SCAN",PAGE)) D
  1. .; -- black box used to determine if page has data for scanning
  1. .; but not for sample forms
  1. .;I '$G(IBDSAMP) W $C(27),"&a7576v3400H",$C(27),"&f1y2X",$C(27)
  1. .;I '$G(IBDSAMP) W $C(27),"&a7576v3400H",$C(27),"*c140h140v0P",$C(27)
  1. .;
  1. .;define font for OCR'd text
  1. .W $C(27),")s1p10h14v0s0b3T"
  1. .;define font for non-OCR' text
  1. .W $C(27)_"(s0p16.67h8.5v0s0b0T"
  1. .;print the form identifiers
  1. .W $C(27),"&a330h300V",! ; new line needed to get rest of line to print okay
  1. .W ! ; new line needed to get rest of line to print okay
  1. .W $C(27),"&a330h300V",$C(15),"FORM:",$C(27),"&a650H",$C(14),IBFORM("TYPE")
  1. .W $C(27),"&a1470H",$C(15),"ID:",$C(27),"&a1700H",$C(14),$G(IBPFID)
  1. .W $C(27),"&a4830H",$C(15),"PAGE:",$C(27),"&a5150H",$C(14),PAGE
  1. .;
  1. .;is the page going to be scanned?
  1. .I $G(IBFORM("SCAN",PAGE)),$G(IBPFID) D
  1. ..;Populating the scannable pages field in the forms tracking file
  1. ..;#357.96. This is used when scanning the EF to make sure all
  1. ..;scannable pages have been scanned before data is filed in PCE.
  1. ..I '$D(^IBD(357.96,IBPFID,9,PAGE,0)) D
  1. ...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
  1. ..;print the checksums
  1. ..W $C(14),$C(27),"&a3400H",TYPECHK,$C(27),"&a3900H",IDCHK,$C(27),"&a4400H",PAGECHK
  1. .;
  1. NAM .;print form id, etc. on bottom of form
  1. .D
  1. ..W !,$C(15),$C(27),"&a300h7710V"
  1. ..I $G(IBDSAMP) W "Sample Form: ",$P($G(^IBE(357,+$G(IBFORM),0)),"^") Q
  1. ..S X=$G(^TMP("IB",$J,"INTERFACES",+$G(DFN),"DPT PATIENT'S NAME"))
  1. ..W:X'="" X W:X="" $P($G(^DPT(+$G(DFN),0)),"^")
  1. .;
  1. .D
  1. ..W $C(27),"&a1900H"
  1. ..I $G(IBDSAMP) W "Clinic: ",$P($G(^SC(+$G(IBCLINIC),0)),"^") Q
  1. ..S X=$G(^TMP("IB",$J,"INTERFACES",+$G(DFN),"DPT PATIENT'S PID"))
  1. ..W:X'="" X I X="",+$G(DFN) D PID^VADPT W VA("PID")
  1. .;
  1. .W $C(27),"&a4200H","VA FORM 10-0360 APR 1994"
  1. .W $C(27),"&a4200h7620V","Station: ",$P($$SITE^VASITE,"^",3)
  1. .I $G(REPRINT) W $C(27),"&a1900H","**REPRINT**"
  1. .;
  1. .;reset the primary font & top margin, position cursor at the top
  1. .;reset the font for body of form
  1. .D
  1. ..I IBFORM("WIDTH")>96 W $C(27)_"(s0p16.67h8.5v0s0b0T" Q
  1. ..I IBFORM("WIDTH")>80 W $C(27)_"(s0p12h10v0s0b0T" Q
  1. ..W $C(27)_"(s0p10h12v0s0b0T"
  1. .;set top margin to leave 4 lines at top
  1. .W $C(27),"&l4E"
  1. .;set cursor to top left
  1. .W $C(27),"&a0c0R"
  1. ;
  1. ;move cursor to top left
  1. I '(IBFORM("SCAN")&IBDEVICE("PCL")),IBDEVICE("RASTER") S (DX,DY)=0 X IOXY K DX,DY
  1. Q
  1. ;
  1. ;this call replaced by call to achors^ibdf2f2
  1. ANCHORS ; -- print anchors, anchors composed of two narrow rectangles
  1. ; escape &a positions cursor at specified vert and horiz decipoints
  1. ; escape *c prints rectangle of specified vert and horiz decipoints
  1. ; 0P is for complete fill.
  1. ;
  1. Q
  1. W !
  1. ; -- top left corner (ANCHOR 1)
  1. W $C(27),"&a184v4H",$C(27),"*c12h120v0P",$C(27),"*c124h12v0P"
  1. ;
  1. ; -- top right (ANCHOR 3)
  1. W $C(27),"&a184v5534H",$C(27),"*c116h12v0P",$C(27),"&a184v5650H",$C(27),"*c12h120v0P"
  1. ;
  1. ; -- bottom left (ANCHOR 4)
  1. W !,$C(27),"&a7732v4H",$C(27),"*c124h12v0P",$C(27),"&a7615v4H",$C(27),"*c12h121v0P"
  1. ;
  1. ; -- bottom right (ANCHOR 6)
  1. W $C(27),"&a7732v5534H",$C(27),"*c116h12v0P",$C(27),"&a7616v5650H",$C(27),"*c12h120v0P"
  1. Q