DII ;SFISC/GFT,XAK,TKW-OPTION RDR, INQUIRY ;2015-01-01 10:45 AM
V ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
;;Per VA Directive 6402, this routine should not be modified.
;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
;;Licensed under the terms of the Apache License, Version 2.0.
;
D
.N VERSION,X D VERSION^DI W !!,X,!
I '$G(DUZ),$D(^VA(200,0))#2 D I '$G(DUZ) W $C(7),!,$$EZBLD^DIALOG(7005),! Q ;MUST HAVE DUZ!
. N DIC,DTOUT,DUOUT,DIIDUZ0
ASK . S DUZ=0,DIIDUZ0=$G(DUZ(0)),DIC=200,DIC(0)="AEFNQZ",DIC("A")="Identity = ",DIC("S")="I Y'<1&$L($P(^(0),U,3))"
. D ^DIC Q:Y'>0
. S DUZ=+Y,DUZ("LANG")=$P($G(^(200)),U,7),DUZ(1)="",DUZ(2)=$O(^VA(200,DUZ,2,0)),DUZ(0)=$S(DIIDUZ0]"":DIIDUZ0,1:$P(Y(0),"^",4)) ;DON'T LET DUZ(0) GET CLOBBERED
. S DUZ("AG")=$P($G(^XTV(8989.3,1,0)),"^",8) S:'DUZ(2) DUZ(2)=+$P($G(^("XUS")),U,17)
. S:'$G(DUZ("LANG")) DUZ("LANG")=$P($G(^XTV(8989.3,1,"XUS")),U,7)
NOKL D DT^DICRW,OS S DIK="^DOPT(""DII""," G F:$D(^DOPT("DII",9)) S ^(0)="OPTION^1.01^" F I=1:1 S X=$E($T(F+I),4,99) Q:X="" S ^DOPT("DII",I,0)=X
D IXALL^DIK
F S DIC=DIK,DIC(0)="AEQZ" D ^DIC K DIC,DIK G Q:Y<0 S X=$P(Y(0),U,2,99) K Y D @X W !!! D Q G NOKL
;;ENTER OR EDIT FILE ENTRIES^^DIB
;;PRINT FILE ENTRIES^^DIP
;;SEARCH FILE ENTRIES^^DIS
;;MODIFY FILE ATTRIBUTES^^DICATT
;;INQUIRE TO FILE ENTRIES^INQ^DII
;;UTILITY FUNCTIONS^^DIU
;;OTHER OPTIONS^^DII1
;;DATA DICTIONARY UTILITIES^^DDU
;;TRANSFER ENTRIES^^DIT
;
Q D Q^DIB,Q^DICATT2,Q^DIARB
K DRK,DIL,DIS,DK,DIACD,DIQ,DX,DQI,DISYS,DHIT,%X,%Y,%,DXS,Q,DIAR
K A0,D9,DNP,DCC,DIJ,DP,DM,DQ,DICATT,DIFLD,D0,DIEL,DL,DC,DU,DIP
K DH,DIYS,DINS,DIPT,DHD,DCL,DPP,DPQ,DALL,DIRUT,DIROUT,DUOUT,DTOUT
Q
;
;
INQ ;
W !! D ^DICRW Q:'$D(DIC) S DI=DIC,DPP(1)=+Y_"^^^@",DK=+Y I $D(DICS) S DICSS=DICS
B K ^UTILITY($J),^(U,$J),DIC,DIQ,DISV,DIBT,DICS S DIC=DI,DIC(0)="AEQM",DIK=0
R D ^DIC I Y>0 S DIK=DIK+1,^UTILITY(U,$J,DIK,+Y)="",DIC("A")=$$EZBLD^DIALOG(8199)_" " G R ;**CCO/NI 'ANOTHER ONE:'
S G Q^DIP:'DIK!(X=U) G:DIK'>3 O
D K DIRUT,DIROUT
. N DIK,DI,DICSS,DX D S2^DIBT1 Q
G:$D(DTOUT)!($D(DUOUT)) Q^DIP G:X="" O G:Y<0 S
F X=1:1:DIK S ^DIBT(+Y,1,+$O(^UTILITY(U,$J,X,0)))=""
S ^DIBT(+Y,"QR")=DT_U_DIK
O K DIC G Q^DIP:$D(DTOUT) S DIC=DI,%=1
I $$FIND^DIUCANON(.4,DK) S %=2 G ASKFLDS ;there may be a standard PRINT TEMPLATE
W !,$$EZBLD^DIALOG(8198) D YN^DICN G Q^DIP:%<0 ;'STANDARD CAPTIONED OUTPUT?'
I '% D BLD^DIALOG(9108),MSG^DIALOG("WH") G O ;**CCO/NI 'ANSWER NO ....'
ASKFLDS I %=2 S L=1,Q="""",DPP=1,DPP(1,"IX")="^UTILITY(U,$J,"_DI_"^2" S:$D(DICSS) DICS=DICSS G N^DIP1 ;GO TO ASKING PRINT FIELDS
D C G:$D(DIRUT) Q
S IOP="HOME" D ^%ZIS I $D(DICSS) S DICS=DICSS
DIQ N S S S=1,$Y=0 F DIK=1:1:DIK S DA=+$O(^UTILITY(U,$J,DIK,0)) W ! D:DIK>1 LF^DIQ Q:'S D G:'S Q S S=S+2
.N DIK D CAPTION^DIQ(DK,DA,DIQ(0))
W !! Q:$D(DTOUT) G B
;
P G Q^DI
;
OS I $D(^%ZOSF("OS"))#2 S DISYS=+$P(^("OS"),"^",2) Q:DISYS>0
S DISYS=$S($D(^DD("OS"))#2:^("OS"),1:100)
Q
AUD S DIACD=DIQ(0),DIQ(0)="C",DIQ=DA
F DA=0:0 S DA=$O(^DIA(DK,"B",DIQ,DA)) Q:DA'>0 S DIC="^DIA("_DK_",",E="N<0",N=-1,DD=1.1,DIA=DK D GUY^DIQ Q:'S W !
S DIQ(0)=DIACD Q
;
C ;called from ^DIP21
N DIR,I,L,Y,X,DITXT
D BLD^DIALOG(7004,"","","DIR") S DITXT="" D S DITXT=DITXT_DIR
. F I=1:1 Q:$G(DIR(I))="" S DITXT=DITXT_DIR(I)
. Q
K DIR S DIR(0)="SMB^"_DITXT,DIR("B")=$P($P(DITXT,":",2)," ",1),DIR("A")=$$EZBLD^DIALOG(8002)
D ^DIR Q:$D(DIRUT)
F I=1:1 S X=$P($P(DITXT,";",I),":") Q:X="" I X=Y S DIQ(0)=$S(I=2:"C",I=3:"R",I=4:"CR",1:"") Q
I X'=Y S DIRUT=1 Q
A I $D(^DIA(DK)) S DIR(0)="Y",DIR("A")=$$EZBLD^DIALOG(8197),DIR("B")="No",DIR("?")=$$EZBLD^DIALOG(9109) D ^DIR Q:$D(DIRUT) S:Y=1 DIQ(0)=DIQ(0)_"A" ;**CCO/NI 'AUDIT TRAIL' QUERY & HELP
Q
;7004 N:No;Y:Yes;R:Record Number;B:Both Computed and Number
;8002 Include COMPUTED fields
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDII 3913 printed Oct 16, 2024@18:49:06 Page 2
DII ;SFISC/GFT,XAK,TKW-OPTION RDR, INQUIRY ;2015-01-01 10:45 AM
V ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
+1 ;;Per VA Directive 6402, this routine should not be modified.
+2 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
+3 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
+4 ;;Licensed under the terms of the Apache License, Version 2.0.
+5 ;
+6 Begin DoDot:1
+7 NEW VERSION,X
DO VERSION^DI
WRITE !!,X,!
End DoDot:1
+8 ;MUST HAVE DUZ!
IF '$GET(DUZ)
IF $DATA(^VA(200,0))#2
Begin DoDot:1
+9 NEW DIC,DTOUT,DUOUT,DIIDUZ0
ASK SET DUZ=0
SET DIIDUZ0=$GET(DUZ(0))
SET DIC=200
SET DIC(0)="AEFNQZ"
SET DIC("A")="Identity = "
SET DIC("S")="I Y'<1&$L($P(^(0),U,3))"
+1 DO ^DIC
if Y'>0
QUIT
+2 ;DON'T LET DUZ(0) GET CLOBBERED
SET DUZ=+Y
SET DUZ("LANG")=$PIECE($GET(^(200)),U,7)
SET DUZ(1)=""
SET DUZ(2)=$ORDER(^VA(200,DUZ,2,0))
SET DUZ(0)=$SELECT(DIIDUZ0]"":DIIDUZ0,1:$PIECE(Y(0),"^",4))
+3 SET DUZ("AG")=$PIECE($GET(^XTV(8989.3,1,0)),"^",8)
if 'DUZ(2)
SET DUZ(2)=+$PIECE($GET(^("XUS")),U,17)
+4 if '$GET(DUZ("LANG"))
SET DUZ("LANG")=$PIECE($GET(^XTV(8989.3,1,"XUS")),U,7)
End DoDot:1
IF '$GET(DUZ)
WRITE $CHAR(7),!,$$EZBLD^DIALOG(7005),!
QUIT
NOKL DO DT^DICRW
DO OS
SET DIK="^DOPT(""DII"","
if $DATA(^DOPT("DII",9))
GOTO F
SET ^(0)="OPTION^1.01^"
FOR I=1:1
SET X=$EXTRACT($TEXT(F+I),4,99)
if X=""
QUIT
SET ^DOPT("DII",I,0)=X
+1 DO IXALL^DIK
F SET DIC=DIK
SET DIC(0)="AEQZ"
DO ^DIC
KILL DIC,DIK
if Y<0
GOTO Q
SET X=$PIECE(Y(0),U,2,99)
KILL Y
DO @X
WRITE !!!
DO Q
GOTO NOKL
+1 ;;ENTER OR EDIT FILE ENTRIES^^DIB
+2 ;;PRINT FILE ENTRIES^^DIP
+3 ;;SEARCH FILE ENTRIES^^DIS
+4 ;;MODIFY FILE ATTRIBUTES^^DICATT
+5 ;;INQUIRE TO FILE ENTRIES^INQ^DII
+6 ;;UTILITY FUNCTIONS^^DIU
+7 ;;OTHER OPTIONS^^DII1
+8 ;;DATA DICTIONARY UTILITIES^^DDU
+9 ;;TRANSFER ENTRIES^^DIT
+10 ;
Q DO Q^DIB
DO Q^DICATT2
DO Q^DIARB
+1 KILL DRK,DIL,DIS,DK,DIACD,DIQ,DX,DQI,DISYS,DHIT,%X,%Y,%,DXS,Q,DIAR
+2 KILL A0,D9,DNP,DCC,DIJ,DP,DM,DQ,DICATT,DIFLD,D0,DIEL,DL,DC,DU,DIP
+3 KILL DH,DIYS,DINS,DIPT,DHD,DCL,DPP,DPQ,DALL,DIRUT,DIROUT,DUOUT,DTOUT
+4 QUIT
+5 ;
+6 ;
INQ ;
+1 WRITE !!
DO ^DICRW
if '$DATA(DIC)
QUIT
SET DI=DIC
SET DPP(1)=+Y_"^^^@"
SET DK=+Y
IF $DATA(DICS)
SET DICSS=DICS
B KILL ^UTILITY($JOB),^(U,$JOB),DIC,DIQ,DISV,DIBT,DICS
SET DIC=DI
SET DIC(0)="AEQM"
SET DIK=0
R ;**CCO/NI 'ANOTHER ONE:'
DO ^DIC
IF Y>0
SET DIK=DIK+1
SET ^UTILITY(U,$JOB,DIK,+Y)=""
SET DIC("A")=$$EZBLD^DIALOG(8199)_" "
GOTO R
S if 'DIK!(X=U)
GOTO Q^DIP
if DIK'>3
GOTO O
+1 Begin DoDot:1
+2 NEW DIK,DI,DICSS,DX
DO S2^DIBT1
QUIT
End DoDot:1
KILL DIRUT,DIROUT
+3 if $DATA(DTOUT)!($DATA(DUOUT))
GOTO Q^DIP
if X=""
GOTO O
if Y<0
GOTO S
+4 FOR X=1:1:DIK
SET ^DIBT(+Y,1,+$ORDER(^UTILITY(U,$JOB,X,0)))=""
+5 SET ^DIBT(+Y,"QR")=DT_U_DIK
O KILL DIC
if $DATA(DTOUT)
GOTO Q^DIP
SET DIC=DI
SET %=1
+1 ;there may be a standard PRINT TEMPLATE
IF $$FIND^DIUCANON(.4,DK)
SET %=2
GOTO ASKFLDS
+2 ;'STANDARD CAPTIONED OUTPUT?'
WRITE !,$$EZBLD^DIALOG(8198)
DO YN^DICN
if %<0
GOTO Q^DIP
+3 ;**CCO/NI 'ANSWER NO ....'
IF '%
DO BLD^DIALOG(9108)
DO MSG^DIALOG("WH")
GOTO O
ASKFLDS ;GO TO ASKING PRINT FIELDS
IF %=2
SET L=1
SET Q=""""
SET DPP=1
SET DPP(1,"IX")="^UTILITY(U,$J,"_DI_"^2"
if $DATA(DICSS)
SET DICS=DICSS
GOTO N^DIP1
+1 DO C
if $DATA(DIRUT)
GOTO Q
+2 SET IOP="HOME"
DO ^%ZIS
IF $DATA(DICSS)
SET DICS=DICSS
DIQ NEW S
SET S=1
SET $Y=0
FOR DIK=1:1:DIK
SET DA=+$ORDER(^UTILITY(U,$JOB,DIK,0))
WRITE !
if DIK>1
DO LF^DIQ
if 'S
QUIT
Begin DoDot:1
+1 NEW DIK
DO CAPTION^DIQ(DK,DA,DIQ(0))
End DoDot:1
if 'S
GOTO Q
SET S=S+2
+2 WRITE !!
if $DATA(DTOUT)
QUIT
GOTO B
+3 ;
P GOTO Q^DI
+1 ;
OS IF $DATA(^%ZOSF("OS"))#2
SET DISYS=+$PIECE(^("OS"),"^",2)
if DISYS>0
QUIT
+1 SET DISYS=$SELECT($DATA(^DD("OS"))#2:^("OS"),1:100)
+2 QUIT
AUD SET DIACD=DIQ(0)
SET DIQ(0)="C"
SET DIQ=DA
+1 FOR DA=0:0
SET DA=$ORDER(^DIA(DK,"B",DIQ,DA))
if DA'>0
QUIT
SET DIC="^DIA("_DK_","
SET E="N<0"
SET N=-1
SET DD=1.1
SET DIA=DK
DO GUY^DIQ
if 'S
QUIT
WRITE !
+2 SET DIQ(0)=DIACD
QUIT
+3 ;
C ;called from ^DIP21
+1 NEW DIR,I,L,Y,X,DITXT
+2 DO BLD^DIALOG(7004,"","","DIR")
SET DITXT=""
Begin DoDot:1
+3 FOR I=1:1
if $GET(DIR(I))=""
QUIT
SET DITXT=DITXT_DIR(I)
+4 QUIT
End DoDot:1
SET DITXT=DITXT_DIR
+5 KILL DIR
SET DIR(0)="SMB^"_DITXT
SET DIR("B")=$PIECE($PIECE(DITXT,":",2)," ",1)
SET DIR("A")=$$EZBLD^DIALOG(8002)
+6 DO ^DIR
if $DATA(DIRUT)
QUIT
+7 FOR I=1:1
SET X=$PIECE($PIECE(DITXT,";",I),":")
if X=""
QUIT
IF X=Y
SET DIQ(0)=$SELECT(I=2:"C",I=3:"R",I=4:"CR",1:"")
QUIT
+8 IF X'=Y
SET DIRUT=1
QUIT
A ;**CCO/NI 'AUDIT TRAIL' QUERY & HELP
IF $DATA(^DIA(DK))
SET DIR(0)="Y"
SET DIR("A")=$$EZBLD^DIALOG(8197)
SET DIR("B")="No"
SET DIR("?")=$$EZBLD^DIALOG(9109)
DO ^DIR
if $DATA(DIRUT)
QUIT
if Y=1
SET DIQ(0)=DIQ(0)_"A"
+1 QUIT
+2 ;7004 N:No;Y:Yes;R:Record Number;B:Both Computed and Number
+3 ;8002 Include COMPUTED fields