To support the table-driven upload of transcribed text
to various DHCP files, the Discharge Summary application has permission to
access the Data Dictionary and File of Files in the following ways:
1. In order to allow the site to specify the target file, fixed-field header
elements, and word-processing field for each report type, Discharge Summary
version 1 will make several references to either the File of Files or ^DD(.
These are ONLY done in setting up a ^DIC call (to look-up a given field in the
target file), or in screening logic (e.g., to exclude the programmer at the
site from choosing a non-Word-Processing field in the target file as the
destination for the body of a report). Needless to say, NO SETs or KILLs are
ever executed on any of FileMan's supporting data structures (i.e., ^DD( or
^DIC(). All hard-coded references to ^DIC( or ^DD( are made from within the
GMRDUPAR ; SLC/JER - Upload Parameter Edit ;4/23/93 14:53
;;1.0V2;Discharge Summary;;Sep 02, 1993 MAIN ; Controls branching
W !,"First edit Division-wide upload parameters:",!
S (DIC,DLAYGO)=128.99,DIC(0)="AEMQL",DIC("A")="Select DIVISION: "
D ^DIC K DLAYGO Q:+Y'>0 S DA=+Y
S DIE=128.99,DR="[GMRD UPLOAD PARAMETER EDIT]"
W !!,"Now edit the REPORT TYPE file:",!
F D Q:+$G(Y)'>0
. N GMRDREP,GMRDX
. S DIC="^GMR(128.1,",DIC(0)="AEMQZ",DIC("A")="Select REPORT TYPE: "
. I $D(^DISV(DUZ,DIC)),'$D(GMRD1ST) S DIC("B")=$G(^DISV(DUZ,DIC)),
. D ^DIC K DIC Q:+Y'>0 S DA=+Y,GMRDREP=Y,GMRDREP(0)=Y(0)
. S DIE=128.1,DR="[GMRD UPLOAD PARAMETER EDIT]"
. D ^DIE S Y=1
. I $D(^GMR(128.1,+DA,"HEAD"))>9!($D(^GMR(128.1,+DA,"ITEM"))>9) D
. . W !!,"The header for the ",$P(GMRDREP,U,2)," Report type is now
. . I $P(GMRDPRM0,U,16)="D" D DHDR^GMRDTHLP(.GMRDREP,GMRDPRM0,GMRDPRM1)
. . I $P(GMRDPRM0,U,16)="C" D CHDR^GMRDTHLP(.GMRDREP,GMRDPRM0,GMRDPRM1)
. . W !
Q TXTFLD(TFILE,GMRDFLT) ; Get Text Field # from ^DD(Target file #,
S DIC="^DD("_TFILE_",",DIC(0)="AEMQZ",DIC("A")="Select TARGET TEXT FIELD
S DIC("S")="I +$$ISWP^GMRDUPAR(TFILE,+Y)"
I $D(GMRDFLT) S DIC("B")=GMRDFLT
D ^DIC G:+Y'>0 TXTFLDX
S Y=+Y_";"_$P($P(Y(0),U,4),";") TXTFLDX Q Y ISWP(TFILE,TFLD) ; Is a
given field a Word-processing type field
N X,Y S Y=0
I +$P(^DD(TFILE,TFLD,0),U,2)>0 D
. N SFILE S SFILE=+$P(^DD(TFILE,TFLD,0),U,2)
. S Y=$S($P(^DD(SFILE,.01,0),U,2)="W":1,1:0)
2. The input transform for the TARGET FILE field (#.05) in the GMR REPORT TYPE
file, which is a pointer to the File of Files, assures that only files which
include the "GMRD" application group may be chosen for inclusion in the
upload. This was done to assure that the site could not inadvertently choose
an inappropriate target file (NOTE: the only file exported with this
Application Group is the GMR REPORTS FILE (#128), where Discharge Summaries
themselves are housed). The input transform looks like this:
S DIC("S")="I $D(^DIC(+Y,""%"",""B"",""GMRD""))" D ^DIC K DIC S
DIC=DIE,X=+Y K:Y<0 X