ORAMY ; ISL/JER - Anticoagulation Management Installation ;12/16/09 15:31
;;3.0;ORDER ENTRY/RESULTS REPORTING;**307**;Dec 17, 1997;Build 60
;;Per VHA Directive 2004-038, this routine should not be modified
Q
POST ; Post-install routine
D ATTRPT
D REGRPCS
D PARAM
Q
ATTRPT ; Set Anticoagulation Flowsheet Report as item in ORRPW REPORT CATEGORIES
N ORRIEN,ORRNM,ORERRF,ORFDA,ORAFIEN,ORAFNM,ORLNE
N ORMSG,ORTXT
K ORMSG
D BMES^XPDUTL(" Attaching Anticoagulation Flowsheet to ORRPW REPORT CATEGORIES...")
S ORRNM="ORRPW REPORT CATEGORIES"
S ORRIEN=$$FIND1^DIC(101.24,"","X",ORRNM,"","","")
;If ORRPW REPORT CATEGORIES not found, error
I ORRIEN'>0 D I 1
. S ORMSG(1)="**"
. S ORMSG(2)="** "_ORRNM_" not found **"
. S ORMSG(3)="**"
. D MES^XPDUTL(.ORMSG) K ORMSG
. S ORERRF=1
ELSE D
. S ORAFNM="ORAM ANTICOAG REPORT"
. S ORAFIEN=$$FIND1^DIC(101.24,"","X",ORAFNM,"","","")
. ;If ORAM ANTICOAG REPORT not found, error
. I ORAFIEN'>0 D Q
. . S ORMSG(1)="**"
. . S ORMSG(2)="** "_ORAFNM_" not found **"
. . S ORMSG(3)="**"
. . D MES^XPDUTL(.ORMSG) K ORMSG
. . S ORERRF=1
. ;Attach ORAM ANTICOAG REPORT to ORRPW REPORT CATEGORIES
. N ORFDA,ORIEN,ORMSG
. S ORFDA(101.241,"?+10,"_ORRIEN_",",.01)=ORAFIEN
. D UPDATE^DIE("","ORFDA","ORIEN","ORMSG")
. ;Check for error
. I $D(ORMSG("DIERR")) D Q
. . S ORMSG(1)="**"
. . S ORMSG(2)="** Unable to attach "_ORAFNM_" to "_ORRNM_" **"
. . S ORMSG(3)="**"
. . D MES^XPDUTL(.ORMSG) K ORMSG
. . S ORERRF=1
. S ORMSG(1)=" "
. S ORMSG(2)=" ... "_ORAFNM_$S($G(ORIEN(10,0))="?":" already",1:"")_" attached to "_ORRNM_" ..."
. D MES^XPDUTL(.ORMSG) K ORMSG
;Check for error
I $G(ORERRF) D
. S ORMSG(1)="** Post-installation interrupted"
. S ORMSG(2)="** Please contact Enterprise VistA Support"
. D MES^XPDUTL(.ORMSG) K ORMSG
Q
;
REGRPCS ; Register RPCS
D BMES^XPDUTL(" Registering RPCs with Context Menu ORAM ANTICOAGULATION CONTEXT...")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWPCE SCDIS")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWPCE SCSEL")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWTPP GETCOS")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWTPP GETDCOS")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU SIGN RECORD")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU CREATE RECORD")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU DELETE RECORD")
D REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU REQUIRES COSIGNATURE")
Q
;
REGISTER(OPTION,RPC) ; Call FM Updater to register each RPC
; Input -- OPTION Option file (#19) Name field (#.01)
; RPC RPC sub-file (#19.05) RPC field (#.01)
; Output -- None
N FDA,FDAIEN,ERR,DIERR
S FDA(19,"?1,",.01)=OPTION
S FDA(19.05,"?+2,?1,",.01)=RPC
D UPDATE^DIE("E","FDA","FDAIEN","ERR")
Q
PARAM ; main (initial) parameter transport routine
N ORENT,IDX,ROOT,REF,ORVAL,I
D BMES^XPDUTL(" Installing List of Indications for Care...")
S ROOT=$NAME(^TMP("ORAMY",$J)) K @ROOT
D LOAD(ROOT)
S IDX=0,ORENT="PKG.ORDER ENTRY/RESULTS REPORTING"
F S IDX=$O(@ROOT@(IDX)) Q:'IDX D
. N ORPAR,ORINST,ORIVAL,OREVAL,ORERR
. S ORPAR=$P(@ROOT@(IDX,"KEY"),U),ORINST=$P(^("KEY"),U,2)
. S ORIVAL=$P(@ROOT@(IDX,"VAL"),U),OREVAL=$P(^("VAL"),U,2)
. D BMES^XPDUTL(" Installing "_ORINST_" = "_OREVAL)
. D EN^XPAR(ORENT,ORPAR,ORINST,ORIVAL,.ORERR)
. I +$G(ORERR)>0 D BMES^XPDUTL(" Error Occurred for "_ORINST_" = "_OREVAL_": "_$P(ORERR,U,2))
K @ROOT
Q
LOAD(ROOT) ; load data into ^TMP (expects ROOT to be defined)
N I,REF
S I=1,ROOT=$E(ROOT,1,$L(ROOT)-1)_","
F S REF=$P($T(DATA+I),";",3,999) Q:REF="" D
. N ORVAL
. S ORVAL=$P($T(DATA+I+1),";",3,999)
. S @(ROOT_REF)=ORVAL,I=I+2
Q
DATA ; parameter data
;;14701,"KEY")
;;ORAM INDICATIONS FOR CARE^A Fib
;;14701,"VAL")
;;`2557^427.31
;;14702,"KEY")
;;ORAM INDICATIONS FOR CARE^A Flutter
;;14702,"VAL")
;;`2558^427.32
;;14703,"KEY")
;;ORAM INDICATIONS FOR CARE^CVA
;;14703,"VAL")
;;`9069^436.
;;14704,"KEY")
;;ORAM INDICATIONS FOR CARE^DVT
;;14704,"VAL")
;;`15011^453.89
;;14705,"KEY")
;;ORAM INDICATIONS FOR CARE^Hypercoag State
;;14705,"VAL")
;;`13798^289.81
;;14706,"KEY")
;;ORAM INDICATIONS FOR CARE^PE
;;14706,"VAL")
;;`13157^415.19
;;14707,"KEY")
;;ORAM INDICATIONS FOR CARE^TIA
;;14707,"VAL")
;;`2591^435.9
;;14708,"KEY")
;;ORAM INDICATIONS FOR CARE^Valve-Tissue
;;14708,"VAL")
;;`11516^V42.2
;;14709,"KEY")
;;ORAM INDICATIONS FOR CARE^Valve-Mech
;;14709,"VAL")
;;`11527^V43.3
;;14710,"KEY")
;;ORAM INDICATIONS FOR CARE^L/T (Current) Anticoag Use
;;14710,"VAL")
;;`13194^V58.61
;;14711,"KEY")
;;ORAM INDICATIONS FOR CARE^Enctr for Tx Drug Monitoring
;;14711,"VAL")
;;`13529^V58.83
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORAMY 4772 printed Nov 22, 2024@17:37:09 Page 2
ORAMY ; ISL/JER - Anticoagulation Management Installation ;12/16/09 15:31
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**307**;Dec 17, 1997;Build 60
+2 ;;Per VHA Directive 2004-038, this routine should not be modified
+3 QUIT
POST ; Post-install routine
+1 DO ATTRPT
+2 DO REGRPCS
+3 DO PARAM
+4 QUIT
ATTRPT ; Set Anticoagulation Flowsheet Report as item in ORRPW REPORT CATEGORIES
+1 NEW ORRIEN,ORRNM,ORERRF,ORFDA,ORAFIEN,ORAFNM,ORLNE
+2 NEW ORMSG,ORTXT
+3 KILL ORMSG
+4 DO BMES^XPDUTL(" Attaching Anticoagulation Flowsheet to ORRPW REPORT CATEGORIES...")
+5 SET ORRNM="ORRPW REPORT CATEGORIES"
+6 SET ORRIEN=$$FIND1^DIC(101.24,"","X",ORRNM,"","","")
+7 ;If ORRPW REPORT CATEGORIES not found, error
+8 IF ORRIEN'>0
Begin DoDot:1
+9 SET ORMSG(1)="**"
+10 SET ORMSG(2)="** "_ORRNM_" not found **"
+11 SET ORMSG(3)="**"
+12 DO MES^XPDUTL(.ORMSG)
KILL ORMSG
+13 SET ORERRF=1
End DoDot:1
IF 1
+14 IF '$TEST
Begin DoDot:1
+15 SET ORAFNM="ORAM ANTICOAG REPORT"
+16 SET ORAFIEN=$$FIND1^DIC(101.24,"","X",ORAFNM,"","","")
+17 ;If ORAM ANTICOAG REPORT not found, error
+18 IF ORAFIEN'>0
Begin DoDot:2
+19 SET ORMSG(1)="**"
+20 SET ORMSG(2)="** "_ORAFNM_" not found **"
+21 SET ORMSG(3)="**"
+22 DO MES^XPDUTL(.ORMSG)
KILL ORMSG
+23 SET ORERRF=1
End DoDot:2
QUIT
+24 ;Attach ORAM ANTICOAG REPORT to ORRPW REPORT CATEGORIES
+25 NEW ORFDA,ORIEN,ORMSG
+26 SET ORFDA(101.241,"?+10,"_ORRIEN_",",.01)=ORAFIEN
+27 DO UPDATE^DIE("","ORFDA","ORIEN","ORMSG")
+28 ;Check for error
+29 IF $DATA(ORMSG("DIERR"))
Begin DoDot:2
+30 SET ORMSG(1)="**"
+31 SET ORMSG(2)="** Unable to attach "_ORAFNM_" to "_ORRNM_" **"
+32 SET ORMSG(3)="**"
+33 DO MES^XPDUTL(.ORMSG)
KILL ORMSG
+34 SET ORERRF=1
End DoDot:2
QUIT
+35 SET ORMSG(1)=" "
+36 SET ORMSG(2)=" ... "_ORAFNM_$SELECT($GET(ORIEN(10,0))="?":" already",1:"")_" attached to "_ORRNM_" ..."
+37 DO MES^XPDUTL(.ORMSG)
KILL ORMSG
End DoDot:1
+38 ;Check for error
+39 IF $GET(ORERRF)
Begin DoDot:1
+40 SET ORMSG(1)="** Post-installation interrupted"
+41 SET ORMSG(2)="** Please contact Enterprise VistA Support"
+42 DO MES^XPDUTL(.ORMSG)
KILL ORMSG
End DoDot:1
+43 QUIT
+44 ;
REGRPCS ; Register RPCS
+1 DO BMES^XPDUTL(" Registering RPCs with Context Menu ORAM ANTICOAGULATION CONTEXT...")
+2 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWPCE SCDIS")
+3 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWPCE SCSEL")
+4 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWTPP GETCOS")
+5 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","ORWTPP GETDCOS")
+6 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU SIGN RECORD")
+7 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU CREATE RECORD")
+8 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU DELETE RECORD")
+9 DO REGISTER("ORAM ANTICOAGULATION CONTEXT","TIU REQUIRES COSIGNATURE")
+10 QUIT
+11 ;
REGISTER(OPTION,RPC) ; Call FM Updater to register each RPC
+1 ; Input -- OPTION Option file (#19) Name field (#.01)
+2 ; RPC RPC sub-file (#19.05) RPC field (#.01)
+3 ; Output -- None
+4 NEW FDA,FDAIEN,ERR,DIERR
+5 SET FDA(19,"?1,",.01)=OPTION
+6 SET FDA(19.05,"?+2,?1,",.01)=RPC
+7 DO UPDATE^DIE("E","FDA","FDAIEN","ERR")
+8 QUIT
PARAM ; main (initial) parameter transport routine
+1 NEW ORENT,IDX,ROOT,REF,ORVAL,I
+2 DO BMES^XPDUTL(" Installing List of Indications for Care...")
+3 SET ROOT=$NAME(^TMP("ORAMY",$JOB))
KILL @ROOT
+4 DO LOAD(ROOT)
+5 SET IDX=0
SET ORENT="PKG.ORDER ENTRY/RESULTS REPORTING"
+6 FOR
SET IDX=$ORDER(@ROOT@(IDX))
if 'IDX
QUIT
Begin DoDot:1
+7 NEW ORPAR,ORINST,ORIVAL,OREVAL,ORERR
+8 SET ORPAR=$PIECE(@ROOT@(IDX,"KEY"),U)
SET ORINST=$PIECE(^("KEY"),U,2)
+9 SET ORIVAL=$PIECE(@ROOT@(IDX,"VAL"),U)
SET OREVAL=$PIECE(^("VAL"),U,2)
+10 DO BMES^XPDUTL(" Installing "_ORINST_" = "_OREVAL)
+11 DO EN^XPAR(ORENT,ORPAR,ORINST,ORIVAL,.ORERR)
+12 IF +$GET(ORERR)>0
DO BMES^XPDUTL(" Error Occurred for "_ORINST_" = "_OREVAL_": "_$PIECE(ORERR,U,2))
End DoDot:1
+13 KILL @ROOT
+14 QUIT
LOAD(ROOT) ; load data into ^TMP (expects ROOT to be defined)
+1 NEW I,REF
+2 SET I=1
SET ROOT=$EXTRACT(ROOT,1,$LENGTH(ROOT)-1)_","
+3 FOR
SET REF=$PIECE($TEXT(DATA+I),";",3,999)
if REF=""
QUIT
Begin DoDot:1
+4 NEW ORVAL
+5 SET ORVAL=$PIECE($TEXT(DATA+I+1),";",3,999)
+6 SET @(ROOT_REF)=ORVAL
SET I=I+2
End DoDot:1
+7 QUIT
DATA ; parameter data
+1 ;;14701,"KEY")
+2 ;;ORAM INDICATIONS FOR CARE^A Fib
+3 ;;14701,"VAL")
+4 ;;`2557^427.31
+5 ;;14702,"KEY")
+6 ;;ORAM INDICATIONS FOR CARE^A Flutter
+7 ;;14702,"VAL")
+8 ;;`2558^427.32
+9 ;;14703,"KEY")
+10 ;;ORAM INDICATIONS FOR CARE^CVA
+11 ;;14703,"VAL")
+12 ;;`9069^436.
+13 ;;14704,"KEY")
+14 ;;ORAM INDICATIONS FOR CARE^DVT
+15 ;;14704,"VAL")
+16 ;;`15011^453.89
+17 ;;14705,"KEY")
+18 ;;ORAM INDICATIONS FOR CARE^Hypercoag State
+19 ;;14705,"VAL")
+20 ;;`13798^289.81
+21 ;;14706,"KEY")
+22 ;;ORAM INDICATIONS FOR CARE^PE
+23 ;;14706,"VAL")
+24 ;;`13157^415.19
+25 ;;14707,"KEY")
+26 ;;ORAM INDICATIONS FOR CARE^TIA
+27 ;;14707,"VAL")
+28 ;;`2591^435.9
+29 ;;14708,"KEY")
+30 ;;ORAM INDICATIONS FOR CARE^Valve-Tissue
+31 ;;14708,"VAL")
+32 ;;`11516^V42.2
+33 ;;14709,"KEY")
+34 ;;ORAM INDICATIONS FOR CARE^Valve-Mech
+35 ;;14709,"VAL")
+36 ;;`11527^V43.3
+37 ;;14710,"KEY")
+38 ;;ORAM INDICATIONS FOR CARE^L/T (Current) Anticoag Use
+39 ;;14710,"VAL")
+40 ;;`13194^V58.61
+41 ;;14711,"KEY")
+42 ;;ORAM INDICATIONS FOR CARE^Enctr for Tx Drug Monitoring
+43 ;;14711,"VAL")
+44 ;;`13529^V58.83