BWMDE4 ;IHS/ANMC/MWR - EXPORT MDE'S FOR CDC.;06-Oct-2003 15:36;DKM
;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
;; CALLED BY BWMDE IN EXPORT DATA OF TO CDC.
;
;
SETS ;EP
Q
;
CHECKS ;EP
N Y S Y=^BWSITE(DUZ(2),0)
I '$P(Y,U,12) D S BWPOP=1
.W:'$D(BWSILENT) !?5,"Site Parameter ""CDC Export:"" set to NO."
I '$P(Y,U,16) D S BWPOP=1
.W:'$D(BWSILENT) !?5,"Site Parameter ""FIPS County Code:"" not set."
I '$P(Y,U,11) D S BWPOP=1
.W:'$D(BWSILENT) !?5,"Site Parameter ""FIPS Program Code:"" not set."
I $P(Y,U,13)="" D S BWPOP=1
.W:'$D(BWSILENT) !?5,"Site Parameter ""CDC Tribal Pgm Abbreviation:"" not set."
I '$P(Y,U,17) D S BWPOP=1
.W:'$D(BWSILENT) !?5,"Site Parameter ""Date CDC Funding Began:"" not set."
I $P(Y,U,14)="" D S BWPOP=1
.W:'$D(BWSILENT) !?5,"Site Parameter ""Host File Path:"" not set."
I BWPOP D DIRZ^BWUTL3 S BWPOP=1
Q
;
SAVELOG ;EP
I '$D(BWSILENT) D
.W !!," The CDC Export Log contains a listing of CDC exports,"
.W !," their dates, numbers of records exported, and host filenames."
.W !!," Do you wish to save this export in the CDC Export Log?"
.S DIR("?",1)=" Enter YES to save the date, number of records, and"
.S DIR("?")=" filename in the CDC Export Log."
.S DIR(0)="YO",DIR("A")=" Enter Yes or No"
.D ^DIR W !
.Q:Y<1
S DIC("DR")=".02////"_BWCOUNT_";.03////"_BWPATH_BWFLNM
D FILE^BWFMAN(9002086.92,DIC("DR"),"ML",DT,9002086,.Y)
;---> IF Y<0, CHECK PERMISSIONS.
I Y<0 W:'$D(BWSILENT) !!,*7,"UNABLE TO LOG THIS EXPORT." D DIRZ^BWUTL3
Q
;
LOG ;EP
;---> PRINT EXPORT LOG.
S DIOEND="W:$E(IOST)'=""C"" @IOF D:$E(IOST)=""C"" DIRZ^BWUTL3"
S DIC=9002086.92,FLDS="[BW CDC EXPORT LOG]",BY=".01",FR="",TO=""
D EN1^DIP
D KILLALL^BWUTL8
Q
;
HELP1 ;EP
;;If you send the extract to the Host File, it can then be copied
;;to a floppy disc or transmitted to another computer using utilities
;;such as uucp or ftp.
;;
;;If you send the extract to your Screen, all of the records will
;;display in a scroll fashion very quickly. This may be useful if
;;you are attempting to "capture" the file on a PC monitor and
;;download it to a drive on the PC. (Refer to your communications
;;software documentation for information on how to perform such
;;procedures.)
S BWTAB=5,BWLINL="HELP1" D HELPTX
Q
;
HELPTX ;EP
N I,T,X S T="" F I=1:1:BWTAB S T=T_" "
F I=1:1 S X=$T(@BWLINL+I) Q:X'[";;" S DIR("?",I)=T_$P(X,";;",2)
S DIR("?")=DIR("?",I-1) K DIR("?",I-1)
Q
BWMDE4 ;IHS/ANMC/MWR - EXPORT MDE'S FOR CDC.;06-Oct-2003 15:36;DKM
+1 ;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
+2 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
+3 ;; CALLED BY BWMDE IN EXPORT DATA OF TO CDC.
+4 ;
+5 ;
SETS ;EP
+1 QUIT
+2 ;
CHECKS ;EP
+1 NEW Y
SET Y=^BWSITE(DUZ(2),0)
+2 IF '$PIECE(Y,U,12)
Begin DoDot:1
+3 IF '$DATA(BWSILENT)
WRITE !?5,"Site Parameter ""CDC Export:"" set to NO."
End DoDot:1
SET BWPOP=1
+4 IF '$PIECE(Y,U,16)
Begin DoDot:1
+5 IF '$DATA(BWSILENT)
WRITE !?5,"Site Parameter ""FIPS County Code:"" not set."
End DoDot:1
SET BWPOP=1
+6 IF '$PIECE(Y,U,11)
Begin DoDot:1
+7 IF '$DATA(BWSILENT)
WRITE !?5,"Site Parameter ""FIPS Program Code:"" not set."
End DoDot:1
SET BWPOP=1
+8 IF $PIECE(Y,U,13)=""
Begin DoDot:1
+9 IF '$DATA(BWSILENT)
WRITE !?5,"Site Parameter ""CDC Tribal Pgm Abbreviation:"" not set."
End DoDot:1
SET BWPOP=1
+10 IF '$PIECE(Y,U,17)
Begin DoDot:1
+11 IF '$DATA(BWSILENT)
WRITE !?5,"Site Parameter ""Date CDC Funding Began:"" not set."
End DoDot:1
SET BWPOP=1
+12 IF $PIECE(Y,U,14)=""
Begin DoDot:1
+13 IF '$DATA(BWSILENT)
WRITE !?5,"Site Parameter ""Host File Path:"" not set."
End DoDot:1
SET BWPOP=1
+14 IF BWPOP
DO DIRZ^BWUTL3
SET BWPOP=1
+15 QUIT
+16 ;
SAVELOG ;EP
+1 IF '$DATA(BWSILENT)
Begin DoDot:1
+2 WRITE !!," The CDC Export Log contains a listing of CDC exports,"
+3 WRITE !," their dates, numbers of records exported, and host filenames."
+4 WRITE !!," Do you wish to save this export in the CDC Export Log?"
+5 SET DIR("?",1)=" Enter YES to save the date, number of records, and"
+6 SET DIR("?")=" filename in the CDC Export Log."
+7 SET DIR(0)="YO"
SET DIR("A")=" Enter Yes or No"
+8 DO ^DIR
WRITE !
+9 IF Y<1
QUIT
End DoDot:1
+10 SET DIC("DR")=".02////"_BWCOUNT_";.03////"_BWPATH_BWFLNM
+11 DO FILE^BWFMAN(9002086.92,DIC("DR"),"ML",DT,9002086,.Y)
+12 ;---> IF Y<0, CHECK PERMISSIONS.
+13 IF Y<0
IF '$DATA(BWSILENT)
WRITE !!,*7,"UNABLE TO LOG THIS EXPORT."
DO DIRZ^BWUTL3
+14 QUIT
+15 ;
LOG ;EP
+1 ;---> PRINT EXPORT LOG.
+2 SET DIOEND="W:$E(IOST)'=""C"" @IOF D:$E(IOST)=""C"" DIRZ^BWUTL3"
+3 SET DIC=9002086.92
SET FLDS="[BW CDC EXPORT LOG]"
SET BY=".01"
SET FR=""
SET TO=""
+4 DO EN1^DIP
+5 DO KILLALL^BWUTL8
+6 QUIT
+7 ;
HELP1 ;EP
+1 ;;If you send the extract to the Host File, it can then be copied
+2 ;;to a floppy disc or transmitted to another computer using utilities
+3 ;;such as uucp or ftp.
+4 ;;
+5 ;;If you send the extract to your Screen, all of the records will
+6 ;;display in a scroll fashion very quickly. This may be useful if
+7 ;;you are attempting to "capture" the file on a PC monitor and
+8 ;;download it to a drive on the PC. (Refer to your communications
+9 ;;software documentation for information on how to perform such
+10 ;;procedures.)
+11 SET BWTAB=5
SET BWLINL="HELP1"
DO HELPTX
+12 QUIT
+13 ;
HELPTX ;EP
+1 NEW I,T,X
SET T=""
FOR I=1:1:BWTAB
SET T=T_" "
+2 FOR I=1:1
SET X=$TEXT(@BWLINL+I)
IF X'[";;"
QUIT
SET DIR("?",I)=T_$PIECE(X,";;",2)
+3 SET DIR("?")=DIR("?",I-1)
KILL DIR("?",I-1)
+4 QUIT