source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUPRPN2.m@ 1259

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1TIUPRPN2 ;SLC/MJC - Header/Footer for Progress Notes ;25-JAN-2001 08:50:35
2 ;;1.0;TEXT INTEGRATION UTILITIES;**44,45,52,100,222**;Jun 20, 1997
3FOOTER(TIUFOOT,TIUMISC,TIUCONT1,TIUHDR,TIUROOT) ; Function returns TIUCONT
4 ; Also controls Pagination position, writes footer when appropriate.
5 ; Requires array TIUFOOT, vars TIUMISC,TIUCONT1. Optional TIUHDR.
6 ; IF TIUHDR=1, HEADER WILL NOT BE PRINTED
7 N TIUCONT,TIUFLAG,TIUPFNBR,TIUDA
8 S TIUCONT=1
9 S TIUFLAG=$P(TIUMISC,U),TIUPFNBR=$P(TIUMISC,U,2),TIUDA=$P(TIUMISC,U,3)
10 I $E(IOST)="C" G FOOTX:$Y+3<IOSL S TIUCONT=$$STOP G FOOTW
11 G FTR:+$G(TIUHDR)
12 G:$Y+7<IOSL FOOTX
13FTR I (IOT'="HFS")!(IOSL<250) F Q:$Y+6'<IOSL W ! ;moves ftr to pg bottom
14 N TIUFNUM,TIULINE,LOC,DIV,TIUDIV,TIUDIVI,TIUPRTDT,TIUPRTNM
15 S $P(TIULINE,"-",81)=""
16 W ?21,$S(+$G(TIUCONT1):"** THIS NOTE CONTINUED ON NEXT PAGE **",1:""),!
17 I '+$G(TIUFLAG) W "WORK COPY ========== UNOFFICIAL "
18 I W "- NOT FOR MEDICAL RECORD =========== DO NOT FILE"
19 E W TIULINE
20 W !,TIUFOOT("PNMP")
21 S LOC=$S($L(TIUROOT):$G(@TIUROOT@(1205,"I")),1:"") ; **100**
22 I LOC D
23 . S DIV=+$P($G(^SC(LOC,0)),U,15)
24 . S TIUDIV=+$O(^TIU(8925.94,"B",DIV,0))
25 I $G(TIUDIV),$P($G(^TIU(8925.94,TIUDIV,0)),U,2)]"" S TIUDIVI=$P(^(0),U,2)
26 S TIUPRTNM=$S($G(TIUDIVI)]"":TIUDIVI,$G(TIUFOOT("INTNM"))]"":TIUFOOT("INTNM"),1:TIUFOOT("SITE"))
27 S TIUPRTDT="Printed:"_$$DATE^TIULS($$NOW^TIULC,"MM/DD/CCYY HR:MIN")
28 I $L(TIUPRTNM)<36 D
29 . W ?(80-$L(TIUPRTNM)\2),TIUPRTNM,?56,TIUPRTDT
30 ELSE D
31 . W ?58,TIUPRTDT,!?(80-$L(TIUPRTNM)\2),TIUPRTNM
32 I +$G(TIUFLAG) W !,TIUFOOT("SSN")," ",TIUFOOT("DOB"),?(80-$L(TIUFOOT("LOCP"))\2),TIUFOOT("LOCP") ; *222 only print if NOT WORKCOPY
33 I '+$G(TIUFLAG) W !,?(80-$L(TIUFOOT("LOCP"))\2),TIUFOOT("LOCP")
34 I +$G(TIUFLAG) W ?(80-$L(TIUPFNBR)),TIUPFNBR
35 I '+$G(TIUFLAG) W ?(80-$L(TIUFOOT("PH#"))),TIUFOOT("PH#")
36 I +$G(TIUFLAG) W !,TIULINE
37 E W !,"=========================== CONFIDENTIAL INFORMATION ==========================="
38 W @IOF
39FOOTW I '+$G(TIUHDR),+$G(TIUCONT) D HEADER(.TIUFOOT,TIUFLAG,.TIUPFHDR,TIUCONT1,$G(TIUROOT))
40FOOTX ;
41 Q TIUCONT
42HEADER(TIUFOOT,TIUFLAG,TIUPFHDR,TIUCONT1,TIUROOT) ; Header
43 ; Requires array TIUFOOT, vars TIUFLAG,TIUPFHDR,TIUCONT1
44 N TIULINE S $P(TIULINE,"-",81)=""
45 I $E(IOST)="C" D
46 .W @IOF,$C(13),TIULINE,!,TIUFOOT("PNMP")_" "_TIUFOOT("SSN")
47 .W ?(78-$L(TIUPFHDR)),TIUPFHDR,!,TIULINE,!
48 .I +$G(TIUCONT1) W $$DATE^TIULS(@TIUROOT@(1301,"I"),"MM/DD/CCYY HR:MIN"),?21,"** CONTINUED FROM PREVIOUS SCREEN **",!
49 E D
50 .W !,TIULINE,!,$S('+$G(TIUFLAG):"** WORK COPY - NOT FOR ",1:"")
51 .W "MEDICAL RECORD" W:'+$G(TIUFLAG) " **" W ?(80-$L(TIUPFHDR)),TIUPFHDR
52 .W !,TIULINE,!
53 .I +$G(TIUCONT1) W $$DATE^TIULS(@TIUROOT@(1301,"I"),"MM/DD/CCYY HR:MIN"),?21,"** CONTINUED FROM PREVIOUS PAGE **",!!
54 Q
55STOP() ;on screen paging check
56 ; quits TIUCONT=1 if cont. ELSE quits TIUCONT=0
57 N DIR,Y,TIUCONT
58 S DIR(0)="E" W:+$G(TIUKID) ! D ^DIR
59 S TIUCONT=Y
60 Q TIUCONT
Note: See TracBrowser for help on using the repository browser.