PXRMP22I ;PBM/RMS,AGP - PRE AND POST INSTALL FOR TERATOGENIC MEDS ORDER CHECK 6/03/12
;;2.0;CLINICAL REMINDERS;**22**;Feb 04, 2005;Build 160
;Reference to ^PSSCLINR supported by IA #5187
;Reference to ^ORD(101.43 supported by IA #2843
Q
;
DELDD ;Delete the old data dictionaries.
N DIU,TEXT
D EN^DDIOL("Removing old data dictionaries.")
S DIU(0)=""
F DIU=801,801.1 D
.S TEXT=" Deleting data dictionary for file # "_DIU
.D EN^DDIOL(TEXT)
.D EN^DIU2
Q
;
PRE ;
I '$$PATCH^XPDUTL("PXRM*2.0*22") D
.D REMDATA
.K ^PXD(801,"AOIR")
.D DELDD
.D RENAME
D DELEXE^PXRMEXSI("EXARRAY","PXRMP22E")
Q
;
POST ;
D SMEXINS^PXRMEXSI("EXARRAY","PXRMP22E")
Q
;
REMDATA ;
N ARRAY,DA,DIK,IEN,PXRMDALL,TEXT
S PXRMDALL=1
S IEN=0 F S IEN=$O(^PXD(801,IEN)) Q:IEN'>0 D
.S ARRAY(IEN)=""
I '$D(ARRAY) Q
S TEXT(1)="Removing old order check group entries."
D MES^XPDUTL(.TEXT)
S DIK="^PXD(801,",DA=0
F S DA=$O(ARRAY(DA)) Q:DA'>0 D ^DIK
;delete rules
S IEN=0 F S IEN=$O(^PXD(801.1,IEN)) Q:IEN'>0 D
.S ARRAY(IEN)=""
I '$D(ARRAY) Q
S TEXT(1)="Removing old order check rule entries."
D MES^XPDUTL(.TEXT)
S DIK="^PXD(801.1,",DA=0
F S DA=$O(ARRAY(DA)) Q:DA'>0 D ^DIK
Q
;
RENAME ;
N PXRMINST
S PXRMINST=1
;rename old print template
D RENAME^PXRMUTIL(.4,"PXRM ORDERABLE ITEM GROUP LIST","PXRM ORDER CHECK ITEMS GROUP")
;rename old options for new name
D RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM GROUP EDIT","PXRM ORDER CHK ITEMS GROUP EDT")
D RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM GROUP INQ","PXRM ORDER CHK ITEMS GROUP INQ")
D RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM GROUP MENU","PXRM ORDER CHECK MENU")
D RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM TESTER","PXRM ORDER CHECK TESTER")
; rename for pre-existing definition and findings
D RENAME^PXRMUTIL(811.2,"VHA-TERATOGENIC MEDICATIONS ORDER CHECK EXCL (TAXONOMIES)","VA-TERATOGENIC MEDICATIONS ORDER CHECK EXCL (TAXONOMIES)")
D RENAME^PXRMUTIL(811.2,"VHA-WH IUD INSERTION (TAXONOMY)","VA-WH IUD INSERTION (TAXONOMY)")
D RENAME^PXRMUTIL(811.2,"VHA-WH IUD REMOVAL (TAXONOMY)","VA-WH IUD REMOVAL (TAXONOMY)")
D RENAME^PXRMUTIL(811.5,"VHA-FDA CATEGORY X MEDICATIONS","VA-FDA CATEGORY X MEDICATIONS")
D RENAME^PXRMUTIL(811.5,"VHA-FDA CATEGORY D MEDICATIONS","VA-FDA CATEGORY D MEDICATIONS")
D RENAME^PXRMUTIL(811.5,"VHA-FDA CATEGORY C AND FDB CATEGORY 1 MEDICATIONS","VA-FDA CATEGORY C AND FDB CATEGORY 1 MEDICATIONS")
D RENAME^PXRMUTIL(811.5,"VHA-WH IUD INSERTION (TERM)","VA-WH IUD INSERTION (TERM)")
D RENAME^PXRMUTIL(811.5,"VHA-WH IUD REMOVAL (TERM)","VA-WH IUD REMOVAL (TERM)")
D RENAME^PXRMUTIL(811.5,"VHA-TERATOGENIC MEDICATIONS ORDER CHECK EXCLUSIONS (TERM)","VA-TERATOGENIC MEDICATIONS ORDER CHECK EXCLUSIONS (TERM)")
D RENAME^PXRMUTIL(811.9,"VHA-TERATOGENIC MEDICATIONS ORDER CHECK","VA-TERATOGENIC MEDICATIONS ORDER CHECK")
;rename synonym in the option file
N RESULT
S RESULT=$$ADD^XPDMENU("PXRM MANAGERS MENU","PXRM ORDER CHECK MENU","ROC")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMP22I 3015 printed Dec 13, 2024@01:47:18 Page 2
PXRMP22I ;PBM/RMS,AGP - PRE AND POST INSTALL FOR TERATOGENIC MEDS ORDER CHECK 6/03/12
+1 ;;2.0;CLINICAL REMINDERS;**22**;Feb 04, 2005;Build 160
+2 ;Reference to ^PSSCLINR supported by IA #5187
+3 ;Reference to ^ORD(101.43 supported by IA #2843
+4 QUIT
+5 ;
DELDD ;Delete the old data dictionaries.
+1 NEW DIU,TEXT
+2 DO EN^DDIOL("Removing old data dictionaries.")
+3 SET DIU(0)=""
+4 FOR DIU=801,801.1
Begin DoDot:1
+5 SET TEXT=" Deleting data dictionary for file # "_DIU
+6 DO EN^DDIOL(TEXT)
+7 DO EN^DIU2
End DoDot:1
+8 QUIT
+9 ;
PRE ;
+1 IF '$$PATCH^XPDUTL("PXRM*2.0*22")
Begin DoDot:1
+2 DO REMDATA
+3 KILL ^PXD(801,"AOIR")
+4 DO DELDD
+5 DO RENAME
End DoDot:1
+6 DO DELEXE^PXRMEXSI("EXARRAY","PXRMP22E")
+7 QUIT
+8 ;
POST ;
+1 DO SMEXINS^PXRMEXSI("EXARRAY","PXRMP22E")
+2 QUIT
+3 ;
REMDATA ;
+1 NEW ARRAY,DA,DIK,IEN,PXRMDALL,TEXT
+2 SET PXRMDALL=1
+3 SET IEN=0
FOR
SET IEN=$ORDER(^PXD(801,IEN))
if IEN'>0
QUIT
Begin DoDot:1
+4 SET ARRAY(IEN)=""
End DoDot:1
+5 IF '$DATA(ARRAY)
QUIT
+6 SET TEXT(1)="Removing old order check group entries."
+7 DO MES^XPDUTL(.TEXT)
+8 SET DIK="^PXD(801,"
SET DA=0
+9 FOR
SET DA=$ORDER(ARRAY(DA))
if DA'>0
QUIT
DO ^DIK
+10 ;delete rules
+11 SET IEN=0
FOR
SET IEN=$ORDER(^PXD(801.1,IEN))
if IEN'>0
QUIT
Begin DoDot:1
+12 SET ARRAY(IEN)=""
End DoDot:1
+13 IF '$DATA(ARRAY)
QUIT
+14 SET TEXT(1)="Removing old order check rule entries."
+15 DO MES^XPDUTL(.TEXT)
+16 SET DIK="^PXD(801.1,"
SET DA=0
+17 FOR
SET DA=$ORDER(ARRAY(DA))
if DA'>0
QUIT
DO ^DIK
+18 QUIT
+19 ;
RENAME ;
+1 NEW PXRMINST
+2 SET PXRMINST=1
+3 ;rename old print template
+4 DO RENAME^PXRMUTIL(.4,"PXRM ORDERABLE ITEM GROUP LIST","PXRM ORDER CHECK ITEMS GROUP")
+5 ;rename old options for new name
+6 DO RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM GROUP EDIT","PXRM ORDER CHK ITEMS GROUP EDT")
+7 DO RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM GROUP INQ","PXRM ORDER CHK ITEMS GROUP INQ")
+8 DO RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM GROUP MENU","PXRM ORDER CHECK MENU")
+9 DO RENAME^PXRMUTIL(19,"PXRM ORDERABLE ITEM TESTER","PXRM ORDER CHECK TESTER")
+10 ; rename for pre-existing definition and findings
+11 DO RENAME^PXRMUTIL(811.2,"VHA-TERATOGENIC MEDICATIONS ORDER CHECK EXCL (TAXONOMIES)","VA-TERATOGENIC MEDICATIONS ORDER CHECK EXCL (TAXONOMIES)")
+12 DO RENAME^PXRMUTIL(811.2,"VHA-WH IUD INSERTION (TAXONOMY)","VA-WH IUD INSERTION (TAXONOMY)")
+13 DO RENAME^PXRMUTIL(811.2,"VHA-WH IUD REMOVAL (TAXONOMY)","VA-WH IUD REMOVAL (TAXONOMY)")
+14 DO RENAME^PXRMUTIL(811.5,"VHA-FDA CATEGORY X MEDICATIONS","VA-FDA CATEGORY X MEDICATIONS")
+15 DO RENAME^PXRMUTIL(811.5,"VHA-FDA CATEGORY D MEDICATIONS","VA-FDA CATEGORY D MEDICATIONS")
+16 DO RENAME^PXRMUTIL(811.5,"VHA-FDA CATEGORY C AND FDB CATEGORY 1 MEDICATIONS","VA-FDA CATEGORY C AND FDB CATEGORY 1 MEDICATIONS")
+17 DO RENAME^PXRMUTIL(811.5,"VHA-WH IUD INSERTION (TERM)","VA-WH IUD INSERTION (TERM)")
+18 DO RENAME^PXRMUTIL(811.5,"VHA-WH IUD REMOVAL (TERM)","VA-WH IUD REMOVAL (TERM)")
+19 DO RENAME^PXRMUTIL(811.5,"VHA-TERATOGENIC MEDICATIONS ORDER CHECK EXCLUSIONS (TERM)","VA-TERATOGENIC MEDICATIONS ORDER CHECK EXCLUSIONS (TERM)")
+20 DO RENAME^PXRMUTIL(811.9,"VHA-TERATOGENIC MEDICATIONS ORDER CHECK","VA-TERATOGENIC MEDICATIONS ORDER CHECK")
+21 ;rename synonym in the option file
+22 NEW RESULT
+23 SET RESULT=$$ADD^XPDMENU("PXRM MANAGERS MENU","PXRM ORDER CHECK MENU","ROC")
+24 QUIT
+25 ;