BHLMT50 ; cmi/sitka/maw - BHL Master Table Update (Drug) User Interface ;
;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
;
;
;this routine will ask the user which file and entry to pass a
;table update to another system
;
MAIN ;-- this is the main routine driver
K INA
S INA("MFI")="^^^50^DRUG^99IHS"
D ENT Q:$D(DUOUT)!$D(DTOUT)
Q:Y<0
D UPD Q:$D(DIRUT)
S X="BHL PASS DRUG MASTER TABLE UPDATE",DIC=101 D EN^XQOR
Q
;
ENT ;-- get the entry in the file
S DIC=50,DIC(0)="AEMQZ",DIC("A")="Pass which drug: "
D ^DIC
Q:$D(DUOUT)!$D(DTOUT)
Q:Y<0
S (INDA,BHLENT)=+Y
S BHLNDC=$$VAL^XBDIQ1(50,BHLENT,31)
S BHLGEN=$$VAL^XBDIQ1(50,BHLENT,.01)
S INA("PRIMKEY")=BHLNDC_U_BHLGEN_U_"NDC"
Q
;
UPD ;-- ask update type
S DIR(0)="S^MDL:Delete Record;MUP:Update Record;MDC:Deactivate Record"
D ^DIR
Q:$D(DIRUT)
S INA("DORLE")=Y
Q
;
EOJ ;-- end of job
K BHLNDC,BHLGEN
Q
;
TRG(BHLENT) ;get the information for a triggered routine
S INA("MFI")="^^^50^DRUG^99IHS"
S BHLNDC=$$VAL^XBDIQ1(50,BHLENT,31)
S BHLGEN=$$VAL^XBDIQ1(50,BHLENT,.01)
S INA("PRIMKEY")=BHLNDC_U_BHLGEN_U_"NDC"
S INA("DORLE")="MUP"
Q
;
BHLMT50 ; cmi/sitka/maw - BHL Master Table Update (Drug) User Interface ;
+1 ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
+2 ;
+3 ;
+4 ;this routine will ask the user which file and entry to pass a
+5 ;table update to another system
+6 ;
MAIN ;-- this is the main routine driver
+1 KILL INA
+2 SET INA("MFI")="^^^50^DRUG^99IHS"
+3 DO ENT
IF $DATA(DUOUT)!$DATA(DTOUT)
QUIT
+4 IF Y<0
QUIT
+5 DO UPD
IF $DATA(DIRUT)
QUIT
+6 SET X="BHL PASS DRUG MASTER TABLE UPDATE"
SET DIC=101
DO EN^XQOR
+7 QUIT
+8 ;
ENT ;-- get the entry in the file
+1 SET DIC=50
SET DIC(0)="AEMQZ"
SET DIC("A")="Pass which drug: "
+2 DO ^DIC
+3 IF $DATA(DUOUT)!$DATA(DTOUT)
QUIT
+4 IF Y<0
QUIT
+5 SET (INDA,BHLENT)=+Y
+6 SET BHLNDC=$$VAL^XBDIQ1(50,BHLENT,31)
+7 SET BHLGEN=$$VAL^XBDIQ1(50,BHLENT,.01)
+8 SET INA("PRIMKEY")=BHLNDC_U_BHLGEN_U_"NDC"
+9 QUIT
+10 ;
UPD ;-- ask update type
+1 SET DIR(0)="S^MDL:Delete Record;MUP:Update Record;MDC:Deactivate Record"
+2 DO ^DIR
+3 IF $DATA(DIRUT)
QUIT
+4 SET INA("DORLE")=Y
+5 QUIT
+6 ;
EOJ ;-- end of job
+1 KILL BHLNDC,BHLGEN
+2 QUIT
+3 ;
TRG(BHLENT) ;get the information for a triggered routine
+1 SET INA("MFI")="^^^50^DRUG^99IHS"
+2 SET BHLNDC=$$VAL^XBDIQ1(50,BHLENT,31)
+3 SET BHLGEN=$$VAL^XBDIQ1(50,BHLENT,.01)
+4 SET INA("PRIMKEY")=BHLNDC_U_BHLGEN_U_"NDC"
+5 SET INA("DORLE")="MUP"
+6 QUIT
+7 ;