BEHORXIN ;MSC/IND/DKM - Installation Support for Med Management;07-Jul-2015 16:19;PLS
;;1.1;BEH COMPONENTS;**009002,009005,009012,009013**;Mar 20, 2007
;=================================================================
PREINIT ;EP - Preinitialization
Q
POSTINIT ;EP - Postinitialization
D REGNMSP^CIAURPC("APSP","CIAV VUECENTRIC")
Q
N CMFDLG
S CMFDLG=$$FIND1^DIC(101.41,,"XQ","OR GTX CMF")
I 'CMFDLG D
.N FDA,IEN
.S FDA=$NA(FDA(101.41,"+1,"))
.S @FDA@(.01)="OR GTX CMF"
.S @FDA@(2)="Chronic Med?"
.S @FDA@(4)="P"
.S @FDA@(11)="S"
.S @FDA@(12)="Y:YES;N:NO"
.S @FDA@(13)="CMF"
.D UPDATE^DIE("","FDA","IEN")
.S CMFDLG=+$G(IEN(1))
I 'CMFDLG D
.D BMES^XPDUTL("Unable to add chronic med prompt to ORDER DIALOG file.")
E D ADDCMF("PS MEDS"),ADDCMF("PSO OERR")
D REGNMSP^CIAURPC("APSP","CIAV VUECENTRIC")
D REGMENU^BEHUTIL("BEHORX MAIN",,"MED")
Q
; Add CMF prompt to order dialog
ADDCMF(DLGNAME) ;
N ORDLG,FDA,IEN
S ORDLG=$$FIND1^DIC(101.41,,"XQ",DLGNAME)
Q:'ORDLG
Q:$O(^ORD(101.41,ORDLG,10,"D",CMFDLG,0))
S FDA=$NA(FDA(101.412,"+1,"_ORDLG_","))
S @FDA@(.01)=4.7
S @FDA@(2)=CMFDLG
S @FDA@(9)="*"
S @FDA@(21)=10
S @FDA@(24)="Chronic Med:"
D UPDATE^DIE("","FDA","IEN")
D:'$G(IEN(1)) BMES^XPDUTL("Unable to add chronic med prompt to "_DLGNAME_" order dialog.")
Q
;Change name of print formats
RNMFMT ;EP-
N NM,IEN,DIK,TMPL,LP
F LP=0:1 S TMPL=$P($T(LTMPL+LP),";;",2) Q:'$L(TMPL) D
.S IEN=$O(^BEHORX(90460.07,"B",TMPL,0)) Q:'IEN D
..S NM=$P(^BEHORX(90460.07,IEN,0),U)
..Q:$E(NM,$L(NM)-4,$L(NM))="(NEW)"
..S NM=NM_"(NEW)"
..S $P(^BEHORX(90460.07,IEN,0),U)=NM
K ^BEHORX(90460.07,"B")
S DIK="^BEHORX(90460.07,",DIK(1)=".01"
D ENALL^DIK
Q
LTMPL ;;ORDER FOR SIGNATURE (CII)(SAMPLE)
;;ORDER FOR SIGNATURE (NON-CII)(SAMPLE)
;;PRESCRIPTION (CII)(SAMPLE)
;;PRESCRIPTION (NON-CII)(SAMPLE)
;;RECEIPT (CII)(SAMPLE)
;;RECEIPT (NON-CII)(SAMPLE)
;;
BEHORXIN ;MSC/IND/DKM - Installation Support for Med Management;07-Jul-2015 16:19;PLS
+1 ;;1.1;BEH COMPONENTS;**009002,009005,009012,009013**;Mar 20, 2007
+2 ;=================================================================
PREINIT ;EP - Preinitialization
+1 QUIT
POSTINIT ;EP - Postinitialization
+1 DO REGNMSP^CIAURPC("APSP","CIAV VUECENTRIC")
+2 QUIT
+3 NEW CMFDLG
+4 SET CMFDLG=$$FIND1^DIC(101.41,,"XQ","OR GTX CMF")
+5 IF 'CMFDLG
Begin DoDot:1
+6 NEW FDA,IEN
+7 SET FDA=$NAME(FDA(101.41,"+1,"))
+8 SET @FDA@(.01)="OR GTX CMF"
+9 SET @FDA@(2)="Chronic Med?"
+10 SET @FDA@(4)="P"
+11 SET @FDA@(11)="S"
+12 SET @FDA@(12)="Y:YES;N:NO"
+13 SET @FDA@(13)="CMF"
+14 DO UPDATE^DIE("","FDA","IEN")
+15 SET CMFDLG=+$GET(IEN(1))
End DoDot:1
+16 IF 'CMFDLG
Begin DoDot:1
+17 DO BMES^XPDUTL("Unable to add chronic med prompt to ORDER DIALOG file.")
End DoDot:1
+18 IF '$TEST
DO ADDCMF("PS MEDS")
DO ADDCMF("PSO OERR")
+19 DO REGNMSP^CIAURPC("APSP","CIAV VUECENTRIC")
+20 DO REGMENU^BEHUTIL("BEHORX MAIN",,"MED")
+21 QUIT
+22 ; Add CMF prompt to order dialog
ADDCMF(DLGNAME) ;
+1 NEW ORDLG,FDA,IEN
+2 SET ORDLG=$$FIND1^DIC(101.41,,"XQ",DLGNAME)
+3 IF 'ORDLG
QUIT
+4 IF $ORDER(^ORD(101.41,ORDLG,10,"D",CMFDLG,0))
QUIT
+5 SET FDA=$NAME(FDA(101.412,"+1,"_ORDLG_","))
+6 SET @FDA@(.01)=4.7
+7 SET @FDA@(2)=CMFDLG
+8 SET @FDA@(9)="*"
+9 SET @FDA@(21)=10
+10 SET @FDA@(24)="Chronic Med:"
+11 DO UPDATE^DIE("","FDA","IEN")
+12 IF '$GET(IEN(1))
DO BMES^XPDUTL("Unable to add chronic med prompt to "_DLGNAME_" order dialog.")
+13 QUIT
+14 ;Change name of print formats
RNMFMT ;EP-
+1 NEW NM,IEN,DIK,TMPL,LP
+2 FOR LP=0:1
SET TMPL=$PIECE($TEXT(LTMPL+LP),";;",2)
IF '$LENGTH(TMPL)
QUIT
Begin DoDot:1
+3 SET IEN=$ORDER(^BEHORX(90460.07,"B",TMPL,0))
IF 'IEN
QUIT
Begin DoDot:2
+4 SET NM=$PIECE(^BEHORX(90460.07,IEN,0),U)
+5 IF $EXTRACT(NM,$LENGTH(NM)-4,$LENGTH(NM))="(NEW)"
QUIT
+6 SET NM=NM_"(NEW)"
+7 SET $PIECE(^BEHORX(90460.07,IEN,0),U)=NM
End DoDot:2
End DoDot:1
+8 KILL ^BEHORX(90460.07,"B")
+9 SET DIK="^BEHORX(90460.07,"
SET DIK(1)=".01"
+10 DO ENALL^DIK
+11 QUIT
LTMPL ;;ORDER FOR SIGNATURE (CII)(SAMPLE)
+1 ;;ORDER FOR SIGNATURE (NON-CII)(SAMPLE)
+2 ;;PRESCRIPTION (CII)(SAMPLE)
+3 ;;PRESCRIPTION (NON-CII)(SAMPLE)
+4 ;;RECEIPT (CII)(SAMPLE)
+5 ;;RECEIPT (NON-CII)(SAMPLE)
+6 ;;