[613] | 1 | DIEZ1 ;SFISC/GFT-COMPILE INPUT TEMPLATE ;9:27 AM 22 Oct 1999
|
---|
| 2 | ;;22.0;VA FileMan;**4,11**;Mar 30, 1999
|
---|
| 3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
| 4 | D QF^DIEZ2 S L=2,X="DE S DIE="_Q_",DIC=DIE,DP="_DP_",DL="_DL_",DIEL="_DIEZL_",DU="""" K DG,DE,DB Q:$O("_DIE_"DA,""""))=""""",DS=-1 D L S X=""
|
---|
| 5 | DL S DS=$O(^UTILITY($J,U,DS)) S:DS="" DS=-1 I DS<0 K ^UTILITY($J,U) G CN
|
---|
| 6 | S DSN=DS S:+DS'=DS DSN=""""_DSN_"""" S DPP=0,X=X_" I $D(^("_DSN_")) S %Z=^("_DSN_")"
|
---|
| 7 | DP S DPP=$O(^UTILITY($J,U,DS,DPP)) I DPP="" D L S X="" G DL
|
---|
| 8 | S %=$O(^(DPP,0)) I +DPP=DPP S Y="P(%Z,U,"_DPP_") S:%]"""" DE("_%_")=%"
|
---|
| 9 | E S Y="E(%Z,"_+$E(DPP,2,9)_","_+$P(DPP,",",2)_") S:%'?."" "" DE("_%_")=%"
|
---|
| 10 | F %=%:0 S %=$O(^(%)) Q:'% S Y=Y_",DE("_%_")=%"
|
---|
| 11 | I $L(X)+$L(Y)>240 D L S X=" I "
|
---|
| 12 | S X=X_" S %=$"_Y G DP
|
---|
| 13 | ;
|
---|
| 14 | CN F X=" K %Z Q"," ;","W "_$S($D(^DIE(DIEZ,"W")):"S DQ(DQ)=DLB_U_DV_U_U_DW "_^("W"),1:"W !?DL+DL-2,DLB_"": """) D L
|
---|
| 15 | F %=1:1 S X=$E($T(TEXT+%),4,999) Q:X="" D L
|
---|
| 16 | SAVE I $L(DNM_DRN)>8 S DIEZQ=1 W:'$G(DIEZS) $C(7),!,DNM_DRN_$$EZBLD^DIALOG(1503) S:$G(DIEZRLA)]"" DIEZRLAF=0 Q
|
---|
| 17 | S X=DNM_DRN D:'$D(DISYS) OS^DII X ^DD("OS",DISYS,"ZS") N DIR D BLD^DIALOG(8025,DNM_DRN,"","DIR") W:'$G(DIEZS) !,DIR S:$G(DIEZRLA)]"" @DIEZRLA@(DNM_DRN)="",DIEZRLAF=1
|
---|
| 18 | S DRN(+DRN)=U,T=0,DRN=DQ Q
|
---|
| 19 | ;
|
---|
| 20 | L S L=L+.001,^UTILITY($J,0,L)=X Q
|
---|
| 21 | ;
|
---|
| 22 | ;DIALOG #1503 'routine name is too long...'
|
---|
| 23 | ; #8025 'routine filed'
|
---|
| 24 | ;
|
---|
| 25 | TEXT ;;
|
---|
| 26 | ;; Q
|
---|
| 27 | ;;O D W W Y W:$X>45 !?9
|
---|
| 28 | ;; I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
|
---|
| 29 | ;; W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
|
---|
| 30 | ;;TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
| 31 | ;; Q
|
---|
| 32 | ;;A K DQ(DQ) S DQ=DQ+1
|
---|
| 33 | ;;B G @DQ
|
---|
| 34 | ;;RE G PR:$D(DE(DQ)) D W,TR
|
---|
| 35 | ;;N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
| 36 | ;;RD G QS:X?."?" I X["^" D D G ^DIE17
|
---|
| 37 | ;; I X="@" D D G Z^DIE2
|
---|
| 38 | ;; I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
|
---|
| 39 | ;;T G M^DIE17:DV,^DIE3:DV["V",P:DV'["S" X:$D(^DD(DP,DIFLD,12.1)) ^(12.1) I X?.ANP D SET I 'DDER X:$D(DIC("S")) DIC("S") I W:'$D(DB(DQ)) " "_% G V
|
---|
| 40 | ;; K DDER G X
|
---|
| 41 | ;;P I DV["P" S DIC=U_DU,DIC(0)=$E("EN",$D(DB(DQ))+1)_"M"_$E("L",DV'["'") S:DIC(0)["L" DLAYGO=+$P(DV,"P",2) G:DV["*" AST^DIED D NOSCR^DIED S X=+Y,DIC=DIE G X:X<0
|
---|
| 42 | ;; G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
|
---|
| 43 | ;; I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
|
---|
| 44 | ;;V D @("X"_DQ) K YS
|
---|
| 45 | ;;Z K DIC("S"),DLAYGO I $D(X),X'=U D:$G(DE(DW,"INDEX")) SAVEVALS G:'$$KEYCHK UNIQFERR^DIE17 S DG(DW)=X S:DV["d" ^DISV(DUZ,"DIE",DLB)=X G A
|
---|
| 46 | ;;X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
| 47 | ;; S X="?BAD"
|
---|
| 48 | ;;QS S DZ=X D D,QQ^DIEQ G B
|
---|
| 49 | ;;D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
| 50 | ;;Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
| 51 | ;;PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
| 52 | ;;R I DG["P",@("$D(^"_X_"0))") S X=+$P(^(0),U,2) G RP:'$D(^(Y,0)) S Y=$P(^(0),U),X=$P(^DD(X,.01,0),U,3),DG=$P(^(0),U,2) G R
|
---|
| 53 | ;; I DG["V",+Y,$P(Y,";",2)["(",$D(@(U_$P(Y,";",2)_"0)")) S X=+$P(^(0),U,2) G RP:'$D(^(+Y,0)) S Y=$P(^(0),U) I $D(^DD(+X,.01,0)) S DG=$P(^(0),U,2),X=$P(^(0),U,3) G R
|
---|
| 54 | ;; X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
|
---|
| 55 | ;;RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
| 56 | ;;I I DV'["I",DV'["#" G RD
|
---|
| 57 | ;; D E^DIE0 G RD:$D(X),PR
|
---|
| 58 | ;; Q
|
---|
| 59 | ;;SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
|
---|
| 60 | ;; I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
|
---|
| 61 | ;; D ^DIR I 'DDER S %=Y(0),X=Y
|
---|
| 62 | ;; Q
|
---|
| 63 | ;;SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
|
---|
| 64 | ;; I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
|
---|
| 65 | ;; E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
|
---|
| 66 | ;; Q
|
---|
| 67 | ;;NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
| 68 | ;;KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|