BPXRM205 ; IHS/MSC/MGH - Version 2.0 Patch 1005 post routine. ;17-Jun-2015 06:33;du
;;2.0;CLINICAL REMINDERS;**1005**;Feb 04, 2005;Build 23
;
ENV ;EP environment check
N IN,INSTDA,STAT
;Check for the installation of Reminders 2.0
S IN="CLINICAL REMINDERS 2.0",INSTDA=""
I '$D(^XPD(9.7,"B",IN)) D Q
.W !,"You must first install CLINICAL REMINDERS 2.0 before this patch" S XPDQUIT=2
S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
I STAT'=3 D Q
.W !,"CLINICAL REMINDERS 2.0 must be completely installed before installing this patch." S XPDQUIT=2
S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
;
S IN="IHS CLINICAL REPORTING 14.0",INSTDA=""
I '$D(^XPD(9.7,"B",IN)) D Q
.W !,"You must first install IHS CLINICAL REPORTING 14.0 before this patch" S XPDQUIT=2
S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
I STAT'=3 D Q
.W !,"IHS CLINICAL REPORTING 14.0 must be completely installed before installing this patch." S XPDQUIT=2
S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
S IN="AICD 4.0",INSTDA=""
I '$D(^XPD(9.7,"B",IN)) D Q
.W !,"You must first install AICD 4.0 before this patch" S XPDQUIT=2
S INSTDA=$O(^XPD(9.7,"B",IN,INSTDA),-1)
S STAT=+$P($G(^XPD(9.7,INSTDA,0)),U,9)
I STAT'=3 D Q
.W !,"AICD 4.0 must be completely installed before installing this patch." S XPDQUIT=2
S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
;Check for the installation of other patches
S PATCH="PXRM*2.0*1004"
I '$$PATCH(PATCH) D Q
. W !,"You must first install "_PATCH_"." S XPDQUIT=2
S PATCH="GMPL*2.0*1004"
I '$$PATCH(PATCH) D Q
. W !,"You must first install "_PATCH_"." S XPDQUIT=2
S PATCH="XU*8.0*539"
I '$$PATCH(PATCH) D Q
. W !,"You must first install "_PATCH_"." S XPDQUIT=2
Q
PATCH(X) ;return 1 if patch X was installed, X=aaaa*nn.nn*nnnn
;copy of code from XPDUTL but modified to handle 4 digit IHS patch numb
Q:X'?1.4UN1"*"1.2N1"."1.2N.1(1"V",1"T").2N1"*"1.4N 0
NEW NUM,I,J
S I=$O(^DIC(9.4,"C",$P(X,"*"),0)) Q:'I 0
S J=$O(^DIC(9.4,I,22,"B",$P(X,"*",2),0)),X=$P(X,"*",3) Q:'J 0
;check if patch is just a number
Q:$O(^DIC(9.4,I,22,J,"PAH","B",X,0)) 1
S NUM=$O(^DIC(9.4,I,22,J,"PAH","B",X_" SEQ"))
Q (X=+NUM)
;===============================================================
PRE ;EP pre-init
;Delete exchange file entries put in by patches
D DELEI
;delete the DDs for files with Variable pointers
D DELDD
Q
;===============================================================
POST ;Post-install
N DIK
K ^XTMP("PXRM_DISEV")
D CVMEA
;Rebuild X-ref
S DIK="PXD(811.2,"
S DIK(1)="4^APDS"
D ENALL2^DIK
S DIK="PXD(811.2,"
S DIK(1)="4^APDS"
D ENALL^DIK
D SOURCE
Q
;
ARRAY(ARRAY) ;List of exchange entries used by delete and install
S ARRAY(1,1)="DEPRESSION/PTSD REMINDER TERM UPDATES - PATCH 17"
S ARRAY(2,1)="ECOE REMINDER DIALOGS"
S ARRAY(3,1)="NATIONAL BLOOD PRESSURE CHANGES"
S ARRAY(4,1)="PATCH 12 ITEMS"
S ARRAY(5,1)="PXRM PATCH 26 DIALOG UPDATES"
S ARRAY(6,1)="PXRM VISIT DATE MONTH REQ YEAR BLANK"
S ARRAY(7,1)="PXRM*2*17 COMPUTED FINDINGS"
S ARRAY(8,1)="RT VA-ALCOHOL NONE PAST 1YR"
S ARRAY(9,1)="TX HIGH RISK FLU AND PNEUMONIA"
S ARRAY(10,1)="UPDATE VA-DIABETES"
S ARRAY(11,1)="VA BRANCHING LOGIC REMINDER UPDATES OEF/OIF"
S ARRAY(12,1)="VA MH SCREENING REMINDERS UPDATE"
S ARRAY(13,1)="VA-AAA SCREENING"
S ARRAY(14,1)="VA-ALCOHOL AUDIT-C POSITIVE F/U EVAL"
S ARRAY(15,1)="VA-ALCOHOL F/U POS AUDIT-C"
S ARRAY(16,1)="VA-BL DEPRESSION SCREEN"
S ARRAY(17,1)="VA-BREAST TUMOR"
S ARRAY(18,1)="VA-DEPRESSION SCREENING"
S ARRAY(19,1)="VA-DISABLE BRANCHING LOGIC REPLACEMENT ELEMENT"
S ARRAY(20,1)="VA-EMBEDDED FRAGMENTS RISK EVALUATION"
S ARRAY(21,1)="VA-EMBEDDED FRAGMENTS SCREEN"
S ARRAY(22,1)="VA-GP ALC ADVICE2"
S ARRAY(23,1)="VA-GP EF CONTACT INFORMATION"
S ARRAY(24,1)="VA-GP LDL STATIN REMINDER NOT DUE"
S ARRAY(25,1)="VA-HF ACUTE ILLNESS EVAL"
S ARRAY(26,1)="VA-HF ETOH SELF SCORE AUD 10"
S ARRAY(27,1)="VA-HOMELESSNESS SCREENING"
S ARRAY(28,1)="VA-HOMELESSNESS SCREEENING DIALOG"
S ARRAY(29,1)="VA-INFLUENZA 2010 UPDATES"
S ARRAY(30,1)="VA-INFLUENZA H1N1 UPDATE"
S ARRAY(31,1)="VA-IRAQ AFGHAN"
S ARRAY(32,1)="VA-LIPID STATIN RX CVD/DM (VER1.0)"
S ARRAY(33,1)="VA-MH HIGH RISK NO-SHOW ADHOC RPT"
S ARRAY(34,1)="VA-MH NO SHOW APPT CLINICS LL"
S ARRAY(35,1)="VA-MH STOP CODES FOR PTSD EVALUATION"
S ARRAY(36,1)="VA-MHTC APPT STOP CODES AND EXCLUSION STOP"
S ARRAY(37,1)="VA-MHTC NEEDS ASSIGNMENT"
S ARRAY(38,1)="VA-MHV BMI COLORECTAL UPDATES PATCH 12"
S ARRAY(39,1)="VA-MHV CERVICAL CANCER SCREEN"
S ARRAY(40,1)="VA-MHV HIGH RISK TERMS"
S ARRAY(41,1)="VA-MHV HYPERTENSION"
S ARRAY(42,1)="VA-MHV INFLUENZA VACCINE"
S ARRAY(43,1)="VA-MHV MAMMOGRAM SCREENING"
S ARRAY(44,1)="VA-MHV RETINOPATHY TERMS"
S ARRAY(45,1)="VA-OEF/OIF MONITOR"
S ARRAY(46,1)="VA-OEF/OIF MONITOR REPORTING"
S ARRAY(47,1)="VA-PATIENT RECORD FLAG INFORMATION"
S ARRAY(48,1)="VA-POLYTRAUMA MARKER"
S ARRAY(49,1)="VA-PROJECT ARCH VISN CONTRACT CARE PILOT ELIGIBILITY"
S ARRAY(50,1)="VA-PTSD REASSESSMENT (PCL)"
S ARRAY(51,1)="VA-TB/POSITIVE PPD"
S ARRAY(52,1)="VA-TBI/POLY IDT EVALUATIONS ELEMENT UPDATE"
S ARRAY(53,1)="VA-TERATOGENIC MEDICATIONS ORDER CHECKS"
S ARRAY(54,1)="VA-TEXT INFO SCREEN FOR AAA"
S ARRAY(55,1)="VA-WH DISCUSS BREAST CA SCREEN WOMAN 40-49"
S ARRAY(56,1)="VA-WH MAMMOGRAM REVIEW RESULTS DIALOG"
S ARRAY(57,1)="VA-WH MAMMOGRAM SCREENING"
S ARRAY(58,1)="VA-WH MAMMOGRAM SCREENING DIALOG"
S ARRAY(59,1)="VA-WH PAP SMEAR REVIEW RESULTS"
S ARRAY(60,1)="VA-WH PAP SMEAR REVIEW RESULTS DIALOG"
S ARRAY(61,1)="VA-WH PAP SMEAR SCREENING"
S ARRAY(62,1)="VA-WH PAP SMEAR SCREENING DIALOG"
S ARRAY(63,1)="VA-MH HIGH RISK NO-SHOW FOLLOW-UP"
S ARRAY(64,1)="VA-WH DISCUSS BREAST CA WOMAN 40-49 DIALOG"
S ARRAY(65,1)="VA-TERATOGENIC MEDICATIONS ORDER CHECKS (UPDATE #1)"
S ARRAY(66,1)="VA-PNEUMOCOCCAL REMINDERS"
S ARRAY(67,1)="VA-PATCH 36 POST COMPONENTS"
S ARRAY(68,1)="VA-PATCH 31 POST HS COMPONENTS"
S ARRAY(69,1)="VA-PALLIATIVE CARE CONSULT"
S ARRAY(70,1)="VA-ECOE PATCH 30 ELEMENT UPDATE"
S ARRAY(71,1)="PXRM*2*26 NATIONAL TAXONOMIES"
S ARRAY(72,1)="PATCH 36 WH TAXONOMIES (5)"
S ARRAY(73,1)="PRXM PATCH 26 ECOE UPDATE"
S ARRAY(74,1)="PXRM PATCH 26 PALLIATIVE CARE UPDATE"
Q
;
;===============================================================
DELEI ;If the Exchange File entry already exists delete it.
N ARRAY,IC,IND,LIST,LUVALUE,NUM
D ARRAY(.ARRAY)
S IC=0
F S IC=$O(ARRAY(IC)) Q:'IC D
.S LUVALUE(1)=ARRAY(IC,1)
.D FIND^DIC(811.8,"","","U",.LUVALUE,"","","","","LIST")
.I '$D(LIST) Q
.S NUM=$P(LIST("DILIST",0),U,1)
.I NUM'=0 D
..F IND=1:1:NUM D
... N DA,DIK
... S DIK="^PXD(811.8,"
... S DA=LIST("DILIST",2,IND)
... D ^DIK
Q
;
;===============================================================
DELDD ;Delete the old data dictionaries.
N DIU,TEXT
D EN^DDIOL("Removing old data dictionaries.")
S DIU(0)=""
F DIU=801.41,811.5,811.9 D
. S TEXT=" Deleting data dictionary for file # "_DIU
. D EN^DDIOL(TEXT)
. D EN^DIU2
Q
;Delete the cross-reference
CVMEA N MSG,RESULT,XREF
D BMES^XPDUTL("Deleting V MEASUREMENT XREF")
D DELIXN^DDMOD(9000010.01,"ACR","","",.MSG)
;Create cross-reference for V MEASUREMENTS
D BMES^XPDUTL("Creating V MEASUREMENT XREF.")
;Set the XREF nodes
S XREF("FILE")=9000010.01
S XREF("ROOT FILE")=9000010.01
S XREF("SET")="D EVFILE^PXPXRM(9000010.01,.X,.DA)"
S XREF("KILL")="D KEFILE^PXPXRM(9000010.01,.X,.DA)"
S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.01)"
D SXREFVF(.XREF,"measurement type")
D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
I RESULT="" D DCERRMSG(.MSG,.XREF)
Q
SXREFVF(XREF,ITEM) ;Set XREF array nodes common for all V files.
N UITEM
S UITEM=$$UP^XLFSTR(ITEM)
S XREF("TYPE")="MU"
S XREF("NAME")="ACR"
S XREF("SHORT DESCR")="Clinical Reminders index."
S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
S XREF("DESCR",2)="all patients with a particular "_ITEM_" and one for finding all"
S XREF("DESCR",3)="the "_ITEM_"s a patient has."
S XREF("DESCR",4)="The indexes are stored in the Clinical Reminders index global as:"
S XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IP"","_UITEM_",DFN,ENTRY DATE/TIME,DAS) and"
S XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PI"",DFN,"_UITEM_",ENTRY DATE/TIME,DAS)"
S XREF("DESCR",7)="respectively."
S XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
S XREF("USE")="ACTION"
S XREF("EXECUTION")="R"
S XREF("ACTIVITY")="IR"
S XREF("VAL",1)=.01
S XREF("VAL",1,"SUBSCRIPT")=1
S XREF("VAL",2)=.02
S XREF("VAL",2,"SUBSCRIPT")=2
Q
DCERRMSG(MSG,XREF) ;Display cross-reference creation error message.
W !,"Cross-reference could not be created!"
W !,"Error message:"
D AWRITE^PXRMUTIL("MSG")
W !!,"Cross-reference information:"
D AWRITE^PXRMUTIL("XREF")
Q
SOURCE ;Loop through the taxonomies and reset the data sources
N IEN,SOURCE
S IEN=0 F S IEN=$O(^PXD(811.2,IEN)) Q:'+IEN D
.S SOURCE=$P($G(^PXD(811.2,IEN,0)),U,4)
.Q:SOURCE=""
.D SPDS^PXRMPDS(IEN,SOURCE)
Q
BPXRM205 ; IHS/MSC/MGH - Version 2.0 Patch 1005 post routine. ;17-Jun-2015 06:33;du
+1 ;;2.0;CLINICAL REMINDERS;**1005**;Feb 04, 2005;Build 23
+2 ;
ENV ;EP environment check
+1 NEW IN,INSTDA,STAT
+2 ;Check for the installation of Reminders 2.0
+3 SET IN="CLINICAL REMINDERS 2.0"
SET INSTDA=""
+4 IF '$DATA(^XPD(9.7,"B",IN))
Begin DoDot:1
+5 WRITE !,"You must first install CLINICAL REMINDERS 2.0 before this patch"
SET XPDQUIT=2
End DoDot:1
QUIT
+6 SET INSTDA=$ORDER(^XPD(9.7,"B",IN,INSTDA),-1)
+7 SET STAT=+$PIECE($GET(^XPD(9.7,INSTDA,0)),U,9)
+8 IF STAT'=3
Begin DoDot:1
+9 WRITE !,"CLINICAL REMINDERS 2.0 must be completely installed before installing this patch."
SET XPDQUIT=2
End DoDot:1
QUIT
+10 SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+11 ;
+12 SET IN="IHS CLINICAL REPORTING 14.0"
SET INSTDA=""
+13 IF '$DATA(^XPD(9.7,"B",IN))
Begin DoDot:1
+14 WRITE !,"You must first install IHS CLINICAL REPORTING 14.0 before this patch"
SET XPDQUIT=2
End DoDot:1
QUIT
+15 SET INSTDA=$ORDER(^XPD(9.7,"B",IN,INSTDA),-1)
+16 SET STAT=+$PIECE($GET(^XPD(9.7,INSTDA,0)),U,9)
+17 IF STAT'=3
Begin DoDot:1
+18 WRITE !,"IHS CLINICAL REPORTING 14.0 must be completely installed before installing this patch."
SET XPDQUIT=2
End DoDot:1
QUIT
+19 SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+20 SET IN="AICD 4.0"
SET INSTDA=""
+21 IF '$DATA(^XPD(9.7,"B",IN))
Begin DoDot:1
+22 WRITE !,"You must first install AICD 4.0 before this patch"
SET XPDQUIT=2
End DoDot:1
QUIT
+23 SET INSTDA=$ORDER(^XPD(9.7,"B",IN,INSTDA),-1)
+24 SET STAT=+$PIECE($GET(^XPD(9.7,INSTDA,0)),U,9)
+25 IF STAT'=3
Begin DoDot:1
+26 WRITE !,"AICD 4.0 must be completely installed before installing this patch."
SET XPDQUIT=2
End DoDot:1
QUIT
+27 SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+28 ;Check for the installation of other patches
+29 SET PATCH="PXRM*2.0*1004"
+30 IF '$$PATCH(PATCH)
Begin DoDot:1
+31 WRITE !,"You must first install "_PATCH_"."
SET XPDQUIT=2
End DoDot:1
QUIT
+32 SET PATCH="GMPL*2.0*1004"
+33 IF '$$PATCH(PATCH)
Begin DoDot:1
+34 WRITE !,"You must first install "_PATCH_"."
SET XPDQUIT=2
End DoDot:1
QUIT
+35 SET PATCH="XU*8.0*539"
+36 IF '$$PATCH(PATCH)
Begin DoDot:1
+37 WRITE !,"You must first install "_PATCH_"."
SET XPDQUIT=2
End DoDot:1
QUIT
+38 QUIT
PATCH(X) ;return 1 if patch X was installed, X=aaaa*nn.nn*nnnn
+1 ;copy of code from XPDUTL but modified to handle 4 digit IHS patch numb
+2 IF X'?1.4UN1"*"1.2N1"."1.2N.1(1"V",1"T").2N1"*"1.4N
QUIT 0
+3 NEW NUM,I,J
+4 SET I=$ORDER(^DIC(9.4,"C",$PIECE(X,"*"),0))
IF 'I
QUIT 0
+5 SET J=$ORDER(^DIC(9.4,I,22,"B",$PIECE(X,"*",2),0))
SET X=$PIECE(X,"*",3)
IF 'J
QUIT 0
+6 ;check if patch is just a number
+7 IF $ORDER(^DIC(9.4,I,22,J,"PAH","B",X,0))
QUIT 1
+8 SET NUM=$ORDER(^DIC(9.4,I,22,J,"PAH","B",X_" SEQ"))
+9 QUIT (X=+NUM)
+10 ;===============================================================
PRE ;EP pre-init
+1 ;Delete exchange file entries put in by patches
+2 DO DELEI
+3 ;delete the DDs for files with Variable pointers
+4 DO DELDD
+5 QUIT
+6 ;===============================================================
POST ;Post-install
+1 NEW DIK
+2 KILL ^XTMP("PXRM_DISEV")
+3 DO CVMEA
+4 ;Rebuild X-ref
+5 SET DIK="PXD(811.2,"
+6 SET DIK(1)="4^APDS"
+7 DO ENALL2^DIK
+8 SET DIK="PXD(811.2,"
+9 SET DIK(1)="4^APDS"
+10 DO ENALL^DIK
+11 DO SOURCE
+12 QUIT
+13 ;
ARRAY(ARRAY) ;List of exchange entries used by delete and install
+1 SET ARRAY(1,1)="DEPRESSION/PTSD REMINDER TERM UPDATES - PATCH 17"
+2 SET ARRAY(2,1)="ECOE REMINDER DIALOGS"
+3 SET ARRAY(3,1)="NATIONAL BLOOD PRESSURE CHANGES"
+4 SET ARRAY(4,1)="PATCH 12 ITEMS"
+5 SET ARRAY(5,1)="PXRM PATCH 26 DIALOG UPDATES"
+6 SET ARRAY(6,1)="PXRM VISIT DATE MONTH REQ YEAR BLANK"
+7 SET ARRAY(7,1)="PXRM*2*17 COMPUTED FINDINGS"
+8 SET ARRAY(8,1)="RT VA-ALCOHOL NONE PAST 1YR"
+9 SET ARRAY(9,1)="TX HIGH RISK FLU AND PNEUMONIA"
+10 SET ARRAY(10,1)="UPDATE VA-DIABETES"
+11 SET ARRAY(11,1)="VA BRANCHING LOGIC REMINDER UPDATES OEF/OIF"
+12 SET ARRAY(12,1)="VA MH SCREENING REMINDERS UPDATE"
+13 SET ARRAY(13,1)="VA-AAA SCREENING"
+14 SET ARRAY(14,1)="VA-ALCOHOL AUDIT-C POSITIVE F/U EVAL"
+15 SET ARRAY(15,1)="VA-ALCOHOL F/U POS AUDIT-C"
+16 SET ARRAY(16,1)="VA-BL DEPRESSION SCREEN"
+17 SET ARRAY(17,1)="VA-BREAST TUMOR"
+18 SET ARRAY(18,1)="VA-DEPRESSION SCREENING"
+19 SET ARRAY(19,1)="VA-DISABLE BRANCHING LOGIC REPLACEMENT ELEMENT"
+20 SET ARRAY(20,1)="VA-EMBEDDED FRAGMENTS RISK EVALUATION"
+21 SET ARRAY(21,1)="VA-EMBEDDED FRAGMENTS SCREEN"
+22 SET ARRAY(22,1)="VA-GP ALC ADVICE2"
+23 SET ARRAY(23,1)="VA-GP EF CONTACT INFORMATION"
+24 SET ARRAY(24,1)="VA-GP LDL STATIN REMINDER NOT DUE"
+25 SET ARRAY(25,1)="VA-HF ACUTE ILLNESS EVAL"
+26 SET ARRAY(26,1)="VA-HF ETOH SELF SCORE AUD 10"
+27 SET ARRAY(27,1)="VA-HOMELESSNESS SCREENING"
+28 SET ARRAY(28,1)="VA-HOMELESSNESS SCREEENING DIALOG"
+29 SET ARRAY(29,1)="VA-INFLUENZA 2010 UPDATES"
+30 SET ARRAY(30,1)="VA-INFLUENZA H1N1 UPDATE"
+31 SET ARRAY(31,1)="VA-IRAQ AFGHAN"
+32 SET ARRAY(32,1)="VA-LIPID STATIN RX CVD/DM (VER1.0)"
+33 SET ARRAY(33,1)="VA-MH HIGH RISK NO-SHOW ADHOC RPT"
+34 SET ARRAY(34,1)="VA-MH NO SHOW APPT CLINICS LL"
+35 SET ARRAY(35,1)="VA-MH STOP CODES FOR PTSD EVALUATION"
+36 SET ARRAY(36,1)="VA-MHTC APPT STOP CODES AND EXCLUSION STOP"
+37 SET ARRAY(37,1)="VA-MHTC NEEDS ASSIGNMENT"
+38 SET ARRAY(38,1)="VA-MHV BMI COLORECTAL UPDATES PATCH 12"
+39 SET ARRAY(39,1)="VA-MHV CERVICAL CANCER SCREEN"
+40 SET ARRAY(40,1)="VA-MHV HIGH RISK TERMS"
+41 SET ARRAY(41,1)="VA-MHV HYPERTENSION"
+42 SET ARRAY(42,1)="VA-MHV INFLUENZA VACCINE"
+43 SET ARRAY(43,1)="VA-MHV MAMMOGRAM SCREENING"
+44 SET ARRAY(44,1)="VA-MHV RETINOPATHY TERMS"
+45 SET ARRAY(45,1)="VA-OEF/OIF MONITOR"
+46 SET ARRAY(46,1)="VA-OEF/OIF MONITOR REPORTING"
+47 SET ARRAY(47,1)="VA-PATIENT RECORD FLAG INFORMATION"
+48 SET ARRAY(48,1)="VA-POLYTRAUMA MARKER"
+49 SET ARRAY(49,1)="VA-PROJECT ARCH VISN CONTRACT CARE PILOT ELIGIBILITY"
+50 SET ARRAY(50,1)="VA-PTSD REASSESSMENT (PCL)"
+51 SET ARRAY(51,1)="VA-TB/POSITIVE PPD"
+52 SET ARRAY(52,1)="VA-TBI/POLY IDT EVALUATIONS ELEMENT UPDATE"
+53 SET ARRAY(53,1)="VA-TERATOGENIC MEDICATIONS ORDER CHECKS"
+54 SET ARRAY(54,1)="VA-TEXT INFO SCREEN FOR AAA"
+55 SET ARRAY(55,1)="VA-WH DISCUSS BREAST CA SCREEN WOMAN 40-49"
+56 SET ARRAY(56,1)="VA-WH MAMMOGRAM REVIEW RESULTS DIALOG"
+57 SET ARRAY(57,1)="VA-WH MAMMOGRAM SCREENING"
+58 SET ARRAY(58,1)="VA-WH MAMMOGRAM SCREENING DIALOG"
+59 SET ARRAY(59,1)="VA-WH PAP SMEAR REVIEW RESULTS"
+60 SET ARRAY(60,1)="VA-WH PAP SMEAR REVIEW RESULTS DIALOG"
+61 SET ARRAY(61,1)="VA-WH PAP SMEAR SCREENING"
+62 SET ARRAY(62,1)="VA-WH PAP SMEAR SCREENING DIALOG"
+63 SET ARRAY(63,1)="VA-MH HIGH RISK NO-SHOW FOLLOW-UP"
+64 SET ARRAY(64,1)="VA-WH DISCUSS BREAST CA WOMAN 40-49 DIALOG"
+65 SET ARRAY(65,1)="VA-TERATOGENIC MEDICATIONS ORDER CHECKS (UPDATE #1)"
+66 SET ARRAY(66,1)="VA-PNEUMOCOCCAL REMINDERS"
+67 SET ARRAY(67,1)="VA-PATCH 36 POST COMPONENTS"
+68 SET ARRAY(68,1)="VA-PATCH 31 POST HS COMPONENTS"
+69 SET ARRAY(69,1)="VA-PALLIATIVE CARE CONSULT"
+70 SET ARRAY(70,1)="VA-ECOE PATCH 30 ELEMENT UPDATE"
+71 SET ARRAY(71,1)="PXRM*2*26 NATIONAL TAXONOMIES"
+72 SET ARRAY(72,1)="PATCH 36 WH TAXONOMIES (5)"
+73 SET ARRAY(73,1)="PRXM PATCH 26 ECOE UPDATE"
+74 SET ARRAY(74,1)="PXRM PATCH 26 PALLIATIVE CARE UPDATE"
+75 QUIT
+76 ;
+77 ;===============================================================
DELEI ;If the Exchange File entry already exists delete it.
+1 NEW ARRAY,IC,IND,LIST,LUVALUE,NUM
+2 DO ARRAY(.ARRAY)
+3 SET IC=0
+4 FOR
SET IC=$ORDER(ARRAY(IC))
IF 'IC
QUIT
Begin DoDot:1
+5 SET LUVALUE(1)=ARRAY(IC,1)
+6 DO FIND^DIC(811.8,"","","U",.LUVALUE,"","","","","LIST")
+7 IF '$DATA(LIST)
QUIT
+8 SET NUM=$PIECE(LIST("DILIST",0),U,1)
+9 IF NUM'=0
Begin DoDot:2
+10 FOR IND=1:1:NUM
Begin DoDot:3
+11 NEW DA,DIK
+12 SET DIK="^PXD(811.8,"
+13 SET DA=LIST("DILIST",2,IND)
+14 DO ^DIK
End DoDot:3
End DoDot:2
End DoDot:1
+15 QUIT
+16 ;
+17 ;===============================================================
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.41,811.5,811.9
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 ;Delete the cross-reference
CVMEA NEW MSG,RESULT,XREF
+1 DO BMES^XPDUTL("Deleting V MEASUREMENT XREF")
+2 DO DELIXN^DDMOD(9000010.01,"ACR","","",.MSG)
+3 ;Create cross-reference for V MEASUREMENTS
+4 DO BMES^XPDUTL("Creating V MEASUREMENT XREF.")
+5 ;Set the XREF nodes
+6 SET XREF("FILE")=9000010.01
+7 SET XREF("ROOT FILE")=9000010.01
+8 SET XREF("SET")="D EVFILE^PXPXRM(9000010.01,.X,.DA)"
+9 SET XREF("KILL")="D KEFILE^PXPXRM(9000010.01,.X,.DA)"
+10 SET XREF("WHOLE KILL")="K ^PXRMINDX(9000010.01)"
+11 DO SXREFVF(.XREF,"measurement type")
+12 DO CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
+13 IF RESULT=""
DO DCERRMSG(.MSG,.XREF)
+14 QUIT
SXREFVF(XREF,ITEM) ;Set XREF array nodes common for all V files.
+1 NEW UITEM
+2 SET UITEM=$$UP^XLFSTR(ITEM)
+3 SET XREF("TYPE")="MU"
+4 SET XREF("NAME")="ACR"
+5 SET XREF("SHORT DESCR")="Clinical Reminders index."
+6 SET XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
+7 SET XREF("DESCR",2)="all patients with a particular "_ITEM_" and one for finding all"
+8 SET XREF("DESCR",3)="the "_ITEM_"s a patient has."
+9 SET XREF("DESCR",4)="The indexes are stored in the Clinical Reminders index global as:"
+10 SET XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IP"","_UITEM_",DFN,ENTRY DATE/TIME,DAS) and"
+11 SET XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PI"",DFN,"_UITEM_",ENTRY DATE/TIME,DAS)"
+12 SET XREF("DESCR",7)="respectively."
+13 SET XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
+14 SET XREF("USE")="ACTION"
+15 SET XREF("EXECUTION")="R"
+16 SET XREF("ACTIVITY")="IR"
+17 SET XREF("VAL",1)=.01
+18 SET XREF("VAL",1,"SUBSCRIPT")=1
+19 SET XREF("VAL",2)=.02
+20 SET XREF("VAL",2,"SUBSCRIPT")=2
+21 QUIT
DCERRMSG(MSG,XREF) ;Display cross-reference creation error message.
+1 WRITE !,"Cross-reference could not be created!"
+2 WRITE !,"Error message:"
+3 DO AWRITE^PXRMUTIL("MSG")
+4 WRITE !!,"Cross-reference information:"
+5 DO AWRITE^PXRMUTIL("XREF")
+6 QUIT
SOURCE ;Loop through the taxonomies and reset the data sources
+1 NEW IEN,SOURCE
+2 SET IEN=0
FOR
SET IEN=$ORDER(^PXD(811.2,IEN))
IF '+IEN
QUIT
Begin DoDot:1
+3 SET SOURCE=$PIECE($GET(^PXD(811.2,IEN,0)),U,4)
+4 IF SOURCE=""
QUIT
+5 DO SPDS^PXRMPDS(IEN,SOURCE)
End DoDot:1
+6 QUIT