source: FOIAVistA/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUSRVR3.m@ 1094

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1TIUSRVR3 ; SLC/JER - Load Signatures for record-wise GET ;4/12/01 [10/18/04 8:32am]
2 ;;1.0;TEXT INTEGRATION UTILITIES;**100,176,157**;Jun 20, 1997
3 ; Created 4/12/01 by splitting TIUSRVR2
4LOADSIG(DA,TIUL) ; Get signature and co-signature blocks
5 N DIC,DIQ,DR,TIUSIG,TIUESIG1,TIUESIG2,TIUSIG1,TIUSIG2,TIUS1,TIUS2
6 N TIUSNM,TIUSTTL,TIUS1DT,TIUS2DT,TIUSDT
7 Q:'$D(^TIU(8925,DA,15))
8 S DIC=8925,DIQ="TIUSIG(",DIQ(0)="IE",DR="1204;1208;1501:1505;1507:1513;1601:1605"
9 D EN^DIQ1 I '$D(TIUSIG) Q
10 S TIUS1=$S(TIUSIG(8925,DA,1505,"I")="E":"/es/ ",TIUSIG(8925,DA,1505,"I")="C":"/s/ ",1:"")_$G(TIUSIG(8925,DA,1503,"E"))
11 S TIUS2=$S(TIUSIG(8925,DA,1511,"I")="E":"/es/ ",TIUSIG(8925,DA,1511,"I")="C":"/s/ ",1:"")_$G(TIUSIG(8925,DA,1509,"E"))
12 S TIUESIG1=$G(TIUSIG(8925,DA,1204,"I"))
13 S TIUSIG1=$G(TIUSIG(8925,DA,1502,"I"))
14 S TIUS1DT=$S(+$G(TIUSIG(8925,DA,1501,"I")):"Signed: "_$$DATE^TIULS($G(TIUSIG(8925,DA,1501,"I")),"MM/DD/CCYY HR:MIN"),1:"")
15 S TIUESIG2=$G(TIUSIG(8925,DA,1208,"I"))
16 S TIUS2DT=$S(+$G(TIUSIG(8925,DA,1507,"I")):"Cosigned: "_$$DATE^TIULS($G(TIUSIG(8925,DA,1507,"I")),"MM/DD/CCYY HR:MIN"),1:"")
17 S TIUSIG2=$G(TIUSIG(8925,DA,1508,"I"))
18 S TIUL=TIUL+1,@TIUARR@(TIUL)=" "
19 S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUS1
20 S TIUL=TIUL+1,@TIUARR@(TIUL)=$G(TIUSIG(8925,DA,1504,"E"))
21 S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUS1DT
22 I $G(TIUSIG(8925,DA,1505,"I"))="C" D
23 . S TIUL=+$G(TIUL)+1,@TIUARR@(TIUL)="Marked signed on chart by: "_$G(TIUSIG(8925,DA,1512,"E"))
24 I TIUSIG1]"",(TIUSIG1'=TIUESIG1) D LOADFOR(TIUSIG1,TIUESIG1,.TIUL)
25 I +$G(TIUSIG(8925,DA,1507,"I"))>0 D
26 . S TIUL=TIUL+1,@TIUARR@(TIUL)=" "
27 . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUS2
28 . S TIUL=TIUL+1,@TIUARR@(TIUL)=$G(TIUSIG(8925,DA,1510,"E"))
29 . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUS2DT
30 . I $G(TIUSIG(8925,DA,1511,"I"))="C" D
31 . . S TIUL=+$G(TIUL)+1,@TIUARR@(TIUL)="Marked cosigned on chart by: "_$G(TIUSIG(8925,DA,1513,"E"))
32 I TIUSIG2]"",(TIUSIG2'=TIUESIG2) D LOADFOR(TIUSIG2,TIUESIG2,.TIUL)
33XTRA I +$O(^TIU(8925.7,"B",DA,0)) D XTRASIG(DA,.TIUL)
34 I +$G(TIUSIG(8925,DA,1601,"I")) D
35 . N TIUMODE,TIUY
36 . S TIUL=TIUL+1,@TIUARR@(TIUL)=""
37 . S TIUY=$$DATE^TIULS(TIUSIG(8925,DA,1601,"I"),"MM/DD/CCYY HR:MIN")
38 . S TIUY=TIUY_" AMENDMENT FILED:"
39 . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUY
40 . S TIUL=TIUL+1,@TIUARR@(TIUL)=""
41 . S TIUMODE=$S(+$G(TIUSIG(8925,DA,1603,"I")):"/es/ ",1:" /s/ ")
42 . S TIUY=$S($G(TIUSIG(8925,DA,1604,"E"))]"":$G(TIUSIG(8925,DA,1604,"E")),1:$G(TIUSIG(8925,DA,1602,"E")))
43 . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUMODE_TIUY
44 . I $L($G(TIUSIG(8925,DA,1605,"E"))) D
45 . . S TIUL=TIUL+1,@TIUARR@(TIUL)=$G(TIUSIG(8925,DA,1605,"E"))
46 . S TIUL=TIUL+1,@TIUARR@(TIUL)=$P($G(TIUPRM1),U,5)
47 Q
48XTRASIG(TIUDA,TIUL) ; Load additional signature blocks
49 N TIUI S TIUI=0
50 S TIUL=TIUL+1,@TIUARR@(TIUL)=""
51 S TIUL=TIUL+1,@TIUARR@(TIUL)="Receipt Acknowledged By:"
52 F S TIUI=$O(^TIU(8925.7,"B",TIUDA,TIUI)) Q:+TIUI'>0 D
53 . N DA,DIC,DR,DIQ,TIUX,TIUXTRA,TIUSGNR,TIUSDT
54 . S DIC="^TIU(8925.7,",DIQ="TIUXTRA",DA=TIUI,DR=".03:.08",DIQ(0)="IE"
55 . D EN^DIQ1 Q:+$D(TIUXTRA)'>9
56 . S TIUSGNR=$S($L($G(TIUXTRA(8925.7,DA,.06,"E"))):"/es/ "_$G(TIUXTRA(8925.7,DA,.06,"E")),1:" "_$G(TIUXTRA(8925.7,DA,.03,"E")))
57 . S TIUSDT=$S(+$G(TIUXTRA(8925.7,DA,.04,"I")):$$DATE^TIULS(TIUXTRA(8925.7,DA,.04,"I"),"MM/DD/CCYY HR:MIN"),1:"* AWAITING SIGNATURE *")
58 . S TIUX=""
59 . S TIUX=$$SETSTR^VALM1(TIUSDT,TIUX,1,38)
60 . S TIUX=$$SETSTR^VALM1(TIUSGNR,$G(TIUX),25,55)
61 . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUX,TIUX=""
62 . S TIUX=$$SETSTR^VALM1($G(TIUXTRA(8925.7,DA,.07,"E")),$G(TIUX),30,50)
63 . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUX
64 . I $G(TIUXTRA(8925.7,DA,.05,"I")),$G(TIUXTRA(8925.7,DA,.05,"I"))'=$G(TIUXTRA(8925.7,DA,.03,"I")) D
65 . . N TIUFOR
66 . . S TIUX=""
67 . . S TIUFOR="for "_$P($G(TIUXTRA(8925.7,DA,.03,"E")),",",2)_" "_$P($G(TIUXTRA(8925.7,DA,.03,"E")),",")
68 . . S TIUX=$$SETSTR^VALM1(TIUFOR,$G(TIUX),26,55)
69 . . S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUX
70 Q
71LOADFOR(TIUS1,TIUES1,TIUL) ; Apply "for" block(s)
72 N TIUESN1,TIUEST1,TIUFORN,TIUFORT
73 S TIUESN1="for "_$$SIGNAME^TIULS(TIUES1),TIUEST1=$$SIGTITL^TIULS(TIUES1)
74 I +$G(TIUS1),($G(TIUS1)'=$G(TIUES1)) S TIUFORN=$$SETSTR^VALM1(TIUESN1,$G(TIUFORN),1,50),TIUFORT=$$SETSTR^VALM1(TIUEST1,$G(TIUFORT),1,50)
75 S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUFORN
76 S TIUL=TIUL+1,@TIUARR@(TIUL)=TIUFORT
77 Q
Note: See TracBrowser for help on using the repository browser.