source: FOIAVistA/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUUPEDT.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1TIUUPEDT ; SLC/JER - Upload Parameter Edit ;4/23/93 14:53
2 ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
3MAIN ; Controls branching
4 N DIC,DA,DIE,DLAYGO,DR,TIUPRM0,TIUPRM1,TIUPRM3,TIUUSRC,TIU1ST,X,Y
5 N TIUQUIT
6 D:'$D(TIUPRM0) SETPARM^TIULE
7 W !,"First edit Institution-wide upload parameters:",!
8 S (DIC,DLAYGO)=8925.99,DIC(0)="AEMQL",DIC("A")="Select INSTITUTION: "
9 D ^DIC K DLAYGO Q:+Y'>0 S DA=+Y
10 S DIE=8925.99,DR="[TIU UPLOAD PARAMETER EDIT]"
11 D ^DIE
12 D SETPARM^TIULE
13 W !,"Now edit the DOCUMENT DEFINITION file:"
14 F D Q:+$G(TIUQUIT)
15 . N TIUREP,TIUX,X,Y,DA,DIE,DR
16 . S Y=$$ASKTYP^TIULA2(38,"LAST","I $P(^TIU(8925.1,+Y,0),U,4)'=""O""","DOCUMENT DEFINITION: ")
17 . I +Y'>0 S TIUQUIT=1 Q
18 . S DA=+Y,TIUREP=+Y_U_$$PNAME^TIULC1(+DA)
19 . S TIUREP(0)=$G(^TIU(8925.1,+DA,0))
20 . S DIE="^TIU(8925.1,",DR="[TIU UPLOAD FIELD EDIT]"
21 . D ^DIE S Y=1
22 . I $D(^TIU(8925.1,+DA,"HEAD"))>9!($D(^TIU(8925.1,+DA,"ITEM"))>9) D
23 . . W !!,"The header for the ",$P(TIUREP,U,2)," ",$$DDH(TIUREP(0))," is now defined as:"
24 . . I $P(TIUPRM0,U,16)="D" D DHDR^TIUTHLP(.TIUREP,TIUPRM0,TIUPRM1)
25 . . I $P(TIUPRM0,U,16)="C" D CHDR^TIUTHLP(.TIUREP,TIUPRM0,TIUPRM1)
26 . . W !
27 Q
28DDH(TIUDDEF) ; Translate position in DDH
29 N TIUY
30 S TIUY=$S($P(TIUDDEF,U,4)="DOC":"TITLE",$P(TIUDDEF,U,4)="DC":"DOCUMENT CLASS",$P(TIUDDEF,U,4)="CL":"CLASS",1:"Document Definition")
31 Q TIUY
32TXTFLD(TFILE,TIUFLT) ; Get Text Field # from ^DD(Target file #,
33 N DIC,X,Y
34 S DIC="^DD("_TFILE_",",DIC(0)="AEMQZ",DIC("A")="Select TARGET TEXT FIELD: "
35 S DIC("S")="I +$$ISWP^TIUUPEDT(TFILE,+Y)"
36 I $D(TIUFLT),(+$G(TIUFLT)>0) S DIC("B")=TIUFLT
37 D ^DIC K DIC("S") G:+Y'>0 TXTFLDX
38 S Y=+Y_";"_$P($P(Y(0),U,4),";")
39TXTFLDX Q Y
40ISWP(TFILE,TFLD) ; Is a given field a Word-processing type field
41 N X,Y S Y=0
42 I +$P(^DD(TFILE,TFLD,0),U,2)>0 D
43 . N SFILE S SFILE=+$P(^DD(TFILE,TFLD,0),U,2)
44 . S Y=$S($P(^DD(SFILE,.01,0),U,2)["W":1,1:0)
45 Q Y
Note: See TracBrowser for help on using the repository browser.