PXRMP65I ;ISP/AGP - PATCH 65 INSTALLATION ;Jul 12, 2022@14:37:25
;;2.0;CLINICAL REMINDERS;**65**;Feb 04, 2005;Build 438
Q
;
;===============
;I '$$PATCH^XPDUTL("PXRM*2.0*65") D
N ENTRY,ENTRIES
S ENTRIES("UPDATE_2_0_14 VA-HPV IMMUNIZATION")="12/20/2016@11:11:30"
S ENTRIES("UPDATE_2_0_47 VA-HEPATITIS B IMMUNIZATIONS")="08/15/2018@13:48:11"
S ENTRIES("UPDATE_2_0_28 VA-MENINGOCOCCAL IMMUNIZATIONS")="06/26/2017@05:56:48"
S ENTRY="" F S ENTRY=$O(ENTRIES(ENTRY)) Q:ENTRY="" I +$$EXCHINCK^PXRMEXU5(ENTRY,ENTRIES(ENTRY))<1 D
.W !,ENTRY,!,"is not installed.",!
.S XPDABORT=2
Q
;
;===============
CFINC(IEN) ;List of REMINDER COMPUTED FINDING entries to include in the build.
;These are the IENs in CPRS32 where the build is made.
;VA-REMINDER DEFINITION (IEN=35)
;VA-IMMUNIZATION AND LOCATION LOT INFO" (IEN=77)
N RESULT
S RESULT=0
I IEN=35!(IEN=77) D
.S RESULT=1
.D RMEHIST^PXRMUTIL(811.4,IEN)
Q RESULT
;
;===============
CFEDITHISTORY ;Establish the edit history of the computed findings
;installed by this build.
N CFLIST,CFNAME,FDA,IEN,IENSS,MSG
S CFLIST("VA-IMMUNIZATION AND LOCATION LOT INFO")=""
S CFLIST("VA-REMINDER DEFINITION")=""
S CFNAME=""
F S CFNAME=$O(CFLIST(CFNAME)) Q:CFNAME="" D
. I CFNAME="VA-IMMUNIZATION AND LOCATION LOT INFO" S TEXT(1)="Added by PXRM*2.0*65 installation"
. I CFNAME="VA-REMINDER DEFINITION" S TEXT(1)="Updated by PXRM*2.0*65 installation"
. S IEN=$O(^PXRMD(811.4,"B",CFNAME,""))
. I IEN="" Q
. S IENSS="+1,"_IEN_","
. S FDA(811.42,IENSS,.01)=$$NOW^XLFDT
. S FDA(811.42,IENSS,1)=DUZ
. S FDA(811.42,IENSS,2)="TEXT"
. D UPDATE^DIE("","FDA","","MSG")
. I $D(MSG) D
.. D BMES^XPDUTL("CFEDITHISTORY UPDATE^DIE FAILED FOR "_CFNAME)
.. D AWRITE^PXRMUTIL("MSG")
Q
;
;===============
INCGUI(NAME) ;Include REMINDER GUI PROCESS (801.42) file entry?
I NAME="PDMP" Q 1
Q 0
;
;===============
PRE ;Pre-init
;Disable options and protocols
;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP65E")
D OPTIONS^PXRMUTIL("DISABLE","Install of PXRM*2.0*65")
D PROTCOLS^PXRMUTIL("DISABLE","Install of PXRM*2.0*65")
D RMOLDDDS
D DELEXE^PXRMEXSI("EXARRAY","PXRMP65E")
Q
;
;===============
POST ;Post-init
;Install Exchange File entries.
;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP45E")
;Delete temporary REMINDER DIALOG file entry
;Enable options and protocols
D DIALCONV^PXRMP65D
;W $G(IOCUON)
;do not automatically install reminder exchange packed.
D SMEXINS^PXRMEXSI("EXARRAY","PXRMP65E")
D CFEDITHISTORY^PXRMP65I
D OPTIONS^PXRMUTIL("ENABLE","Install of PXRM*2.0*65")
D PROTCOLS^PXRMUTIL("ENABLE","Install of PXRM*2.0*65")
D SETPVER^PXRMUTIL("2.0P65")
Q
;===============
RMOLDDDS ;Remove old data dictionaries.
N DIU,TEXT
D BMES^XPDUTL("Removing old data dictionaries.")
S DIU(0)=""
F DIU=801.41,811.2,811.9 D
. S TEXT=" Deleting data dictionary for file # "_DIU
. D MES^XPDUTL(TEXT)
. D EN^DIU2
Q
;
;===============
TAXPNAME ;Generate taxononmy Print Names from the .01.
N CHAR,CF,CP,FDA,IEN,IENS,NAME,MSG,PNAME,REPA
D TAXREPA(.REPA)
D BMES^XPDUTL("Generating Print Names for taxonomies")
S NAME=""
F S NAME=$O(^PXD(811.2,"B",NAME)) Q:NAME="" D
. S IEN=$O(^PXD(811.2,"B",NAME,""))
. S PNAME=$P(^PXD(811.2,IEN,0),U,3)
. I PNAME'="" Q
. D BMES^XPDUTL("Working on taxonomy "_NAME)
. S PNAME=$$REPLACE^XLFSTR(NAME,.REPA)
. S PNAME=$$TITLE^XLFSTR(PNAME)
. S PNAME=$$REPLACE^XLFSTR(PNAME,.REPA)
.;Make sure characters following those below are uppercase.
. F CHAR="-","/","\" D
.. S CP=0
.. F S CP=$F(PNAME,CHAR,CP) Q:CP=0 D
... S CF=$E(PNAME,CP)
... S $E(PNAME,CP)=$$UP^XLFSTR(CF)
. D MES^XPDUTL("Print Name: "_PNAME)
. K FDA,MSG
. S IENS=IEN_","
. S FDA(811.2,IENS,1.2)=PNAME
. D FILE^DIE("ET","FDA","MSG")
Q
;
;===============
TAXREPA(REPA) ;Establish the replacements for taxonomy Print Names.
S REPA("A1c")="A1C"
S REPA("Aaa")="AAA"
S REPA("Abd")="ABD"
S REPA("ACL")="ABD"
S REPA("Afi")="AFI"
S REPA("And")="and"
S REPA("Asvd")="ASVD"
S REPA("bmi")="BMI"
S REPA("Bmi")="BMI"
S REPA(" Ca ")=" CA"
S REPA("Ccht")="CCHT"
S REPA("Chf")="CHF"
S REPA("Copd")="COPD"
S REPA("copd")="COPD"
S REPA("Cpt")="CPT"
S REPA("Dg")="DG"
S REPA("Dgpt")="DGPT"
S REPA("Dx")="DX"
S REPA("Dz")="DZ"
S REPA("Ecoe")="ECOE"
S REPA("Fobt")="FOBT"
S REPA(" Gi ")=" GI "
S REPA("Gp")="GP"
S REPA("Grp")="GRP"
S REPA("H1n1")="H1N1"
S REPA("Hcv")="HCV"
S REPA("Hedis")="HEDIS"
S REPA("Hep ")="HEP "
S REPA("hep")="HEP"
S REPA("Hf")="HF"
S REPA("Hgba1c")="HGBA1C"
S REPA("Hib")="HIB"
S REPA("Hiv")="HIV"
S REPA("Hpv")="HPV"
S REPA("Ht")="HT"
S REPA("Icd")="ICD"
S REPA("Icd0")="ICD0"
S REPA("Icd9")="ICD9"
S REPA("Icd10")="ICD10"
S REPA("Icd-10")="ICD-10"
S REPA("icd10")="ICD10"
S REPA("Ihd")="IHD"
S REPA("Im ")="IM "
S REPA("Iud")="IUD"
S REPA("Ldl")="LDL"
S REPA("Mri")="MRI"
S REPA("Mmr")="MMR"
S REPA("Mhv")="MHV"
S REPA("Nqf")="NQF"
S REPA("Pcv13")="PCV13"
S REPA("Pov")="POV"
S REPA(" Pl")=" PL"
S REPA("Ppd")="PPD"
S REPA("Ppsv23")="PPSV23"
S REPA("Psa")="PSA"
S REPA("Ptf")="PTF"
S REPA("Ptsd")="PTSD"
S REPA("(Rd)")="(RD)"
S REPA("Snomed")="SNOMED"
S REPA("Snomed Ct")="SNOMED CT"
S REPA("Tb")="TB"
S REPA("Td")="TD"
S REPA("Tdap")="TDAP"
S REPA("Tt")="TT"
S REPA("Tx")="TX"
S REPA("Wh")="WH"
S REPA("VA-")=""
S REPA("Vimm-")="VIMM-"
S REPA("Vcpt")="VCPT"
S REPA("Vpov")="VPOV"
S REPA("ZZ")=""
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRMP65I 5551 printed Dec 13, 2024@01:48:05 Page 2
PXRMP65I ;ISP/AGP - PATCH 65 INSTALLATION ;Jul 12, 2022@14:37:25
+1 ;;2.0;CLINICAL REMINDERS;**65**;Feb 04, 2005;Build 438
+2 QUIT
+3 ;
+4 ;===============
+5 ;I '$$PATCH^XPDUTL("PXRM*2.0*65") D
+6 NEW ENTRY,ENTRIES
+7 SET ENTRIES("UPDATE_2_0_14 VA-HPV IMMUNIZATION")="12/20/2016@11:11:30"
+8 SET ENTRIES("UPDATE_2_0_47 VA-HEPATITIS B IMMUNIZATIONS")="08/15/2018@13:48:11"
+9 SET ENTRIES("UPDATE_2_0_28 VA-MENINGOCOCCAL IMMUNIZATIONS")="06/26/2017@05:56:48"
+10 SET ENTRY=""
FOR
SET ENTRY=$ORDER(ENTRIES(ENTRY))
if ENTRY=""
QUIT
IF +$$EXCHINCK^PXRMEXU5(ENTRY,ENTRIES(ENTRY))<1
Begin DoDot:1
+11 WRITE !,ENTRY,!,"is not installed.",!
+12 SET XPDABORT=2
End DoDot:1
+13 QUIT
+14 ;
+15 ;===============
CFINC(IEN) ;List of REMINDER COMPUTED FINDING entries to include in the build.
+1 ;These are the IENs in CPRS32 where the build is made.
+2 ;VA-REMINDER DEFINITION (IEN=35)
+3 ;VA-IMMUNIZATION AND LOCATION LOT INFO" (IEN=77)
+4 NEW RESULT
+5 SET RESULT=0
+6 IF IEN=35!(IEN=77)
Begin DoDot:1
+7 SET RESULT=1
+8 DO RMEHIST^PXRMUTIL(811.4,IEN)
End DoDot:1
+9 QUIT RESULT
+10 ;
+11 ;===============
CFEDITHISTORY ;Establish the edit history of the computed findings
+1 ;installed by this build.
+2 NEW CFLIST,CFNAME,FDA,IEN,IENSS,MSG
+3 SET CFLIST("VA-IMMUNIZATION AND LOCATION LOT INFO")=""
+4 SET CFLIST("VA-REMINDER DEFINITION")=""
+5 SET CFNAME=""
+6 FOR
SET CFNAME=$ORDER(CFLIST(CFNAME))
if CFNAME=""
QUIT
Begin DoDot:1
+7 IF CFNAME="VA-IMMUNIZATION AND LOCATION LOT INFO"
SET TEXT(1)="Added by PXRM*2.0*65 installation"
+8 IF CFNAME="VA-REMINDER DEFINITION"
SET TEXT(1)="Updated by PXRM*2.0*65 installation"
+9 SET IEN=$ORDER(^PXRMD(811.4,"B",CFNAME,""))
+10 IF IEN=""
QUIT
+11 SET IENSS="+1,"_IEN_","
+12 SET FDA(811.42,IENSS,.01)=$$NOW^XLFDT
+13 SET FDA(811.42,IENSS,1)=DUZ
+14 SET FDA(811.42,IENSS,2)="TEXT"
+15 DO UPDATE^DIE("","FDA","","MSG")
+16 IF $DATA(MSG)
Begin DoDot:2
+17 DO BMES^XPDUTL("CFEDITHISTORY UPDATE^DIE FAILED FOR "_CFNAME)
+18 DO AWRITE^PXRMUTIL("MSG")
End DoDot:2
End DoDot:1
+19 QUIT
+20 ;
+21 ;===============
INCGUI(NAME) ;Include REMINDER GUI PROCESS (801.42) file entry?
+1 IF NAME="PDMP"
QUIT 1
+2 QUIT 0
+3 ;
+4 ;===============
PRE ;Pre-init
+1 ;Disable options and protocols
+2 ;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP65E")
+3 DO OPTIONS^PXRMUTIL("DISABLE","Install of PXRM*2.0*65")
+4 DO PROTCOLS^PXRMUTIL("DISABLE","Install of PXRM*2.0*65")
+5 DO RMOLDDDS
+6 DO DELEXE^PXRMEXSI("EXARRAY","PXRMP65E")
+7 QUIT
+8 ;
+9 ;===============
POST ;Post-init
+1 ;Install Exchange File entries.
+2 ;D SMEXINS^PXRMEXSI("EXARRAY","PXRMP45E")
+3 ;Delete temporary REMINDER DIALOG file entry
+4 ;Enable options and protocols
+5 DO DIALCONV^PXRMP65D
+6 ;W $G(IOCUON)
+7 ;do not automatically install reminder exchange packed.
+8 DO SMEXINS^PXRMEXSI("EXARRAY","PXRMP65E")
+9 DO CFEDITHISTORY^PXRMP65I
+10 DO OPTIONS^PXRMUTIL("ENABLE","Install of PXRM*2.0*65")
+11 DO PROTCOLS^PXRMUTIL("ENABLE","Install of PXRM*2.0*65")
+12 DO SETPVER^PXRMUTIL("2.0P65")
+13 QUIT
+14 ;===============
RMOLDDDS ;Remove old data dictionaries.
+1 NEW DIU,TEXT
+2 DO BMES^XPDUTL("Removing old data dictionaries.")
+3 SET DIU(0)=""
+4 FOR DIU=801.41,811.2,811.9
Begin DoDot:1
+5 SET TEXT=" Deleting data dictionary for file # "_DIU
+6 DO MES^XPDUTL(TEXT)
+7 DO EN^DIU2
End DoDot:1
+8 QUIT
+9 ;
+10 ;===============
TAXPNAME ;Generate taxononmy Print Names from the .01.
+1 NEW CHAR,CF,CP,FDA,IEN,IENS,NAME,MSG,PNAME,REPA
+2 DO TAXREPA(.REPA)
+3 DO BMES^XPDUTL("Generating Print Names for taxonomies")
+4 SET NAME=""
+5 FOR
SET NAME=$ORDER(^PXD(811.2,"B",NAME))
if NAME=""
QUIT
Begin DoDot:1
+6 SET IEN=$ORDER(^PXD(811.2,"B",NAME,""))
+7 SET PNAME=$PIECE(^PXD(811.2,IEN,0),U,3)
+8 IF PNAME'=""
QUIT
+9 DO BMES^XPDUTL("Working on taxonomy "_NAME)
+10 SET PNAME=$$REPLACE^XLFSTR(NAME,.REPA)
+11 SET PNAME=$$TITLE^XLFSTR(PNAME)
+12 SET PNAME=$$REPLACE^XLFSTR(PNAME,.REPA)
+13 ;Make sure characters following those below are uppercase.
+14 FOR CHAR="-","/","\"
Begin DoDot:2
+15 SET CP=0
+16 FOR
SET CP=$FIND(PNAME,CHAR,CP)
if CP=0
QUIT
Begin DoDot:3
+17 SET CF=$EXTRACT(PNAME,CP)
+18 SET $EXTRACT(PNAME,CP)=$$UP^XLFSTR(CF)
End DoDot:3
End DoDot:2
+19 DO MES^XPDUTL("Print Name: "_PNAME)
+20 KILL FDA,MSG
+21 SET IENS=IEN_","
+22 SET FDA(811.2,IENS,1.2)=PNAME
+23 DO FILE^DIE("ET","FDA","MSG")
End DoDot:1
+24 QUIT
+25 ;
+26 ;===============
TAXREPA(REPA) ;Establish the replacements for taxonomy Print Names.
+1 SET REPA("A1c")="A1C"
+2 SET REPA("Aaa")="AAA"
+3 SET REPA("Abd")="ABD"
+4 SET REPA("ACL")="ABD"
+5 SET REPA("Afi")="AFI"
+6 SET REPA("And")="and"
+7 SET REPA("Asvd")="ASVD"
+8 SET REPA("bmi")="BMI"
+9 SET REPA("Bmi")="BMI"
+10 SET REPA(" Ca ")=" CA"
+11 SET REPA("Ccht")="CCHT"
+12 SET REPA("Chf")="CHF"
+13 SET REPA("Copd")="COPD"
+14 SET REPA("copd")="COPD"
+15 SET REPA("Cpt")="CPT"
+16 SET REPA("Dg")="DG"
+17 SET REPA("Dgpt")="DGPT"
+18 SET REPA("Dx")="DX"
+19 SET REPA("Dz")="DZ"
+20 SET REPA("Ecoe")="ECOE"
+21 SET REPA("Fobt")="FOBT"
+22 SET REPA(" Gi ")=" GI "
+23 SET REPA("Gp")="GP"
+24 SET REPA("Grp")="GRP"
+25 SET REPA("H1n1")="H1N1"
+26 SET REPA("Hcv")="HCV"
+27 SET REPA("Hedis")="HEDIS"
+28 SET REPA("Hep ")="HEP "
+29 SET REPA("hep")="HEP"
+30 SET REPA("Hf")="HF"
+31 SET REPA("Hgba1c")="HGBA1C"
+32 SET REPA("Hib")="HIB"
+33 SET REPA("Hiv")="HIV"
+34 SET REPA("Hpv")="HPV"
+35 SET REPA("Ht")="HT"
+36 SET REPA("Icd")="ICD"
+37 SET REPA("Icd0")="ICD0"
+38 SET REPA("Icd9")="ICD9"
+39 SET REPA("Icd10")="ICD10"
+40 SET REPA("Icd-10")="ICD-10"
+41 SET REPA("icd10")="ICD10"
+42 SET REPA("Ihd")="IHD"
+43 SET REPA("Im ")="IM "
+44 SET REPA("Iud")="IUD"
+45 SET REPA("Ldl")="LDL"
+46 SET REPA("Mri")="MRI"
+47 SET REPA("Mmr")="MMR"
+48 SET REPA("Mhv")="MHV"
+49 SET REPA("Nqf")="NQF"
+50 SET REPA("Pcv13")="PCV13"
+51 SET REPA("Pov")="POV"
+52 SET REPA(" Pl")=" PL"
+53 SET REPA("Ppd")="PPD"
+54 SET REPA("Ppsv23")="PPSV23"
+55 SET REPA("Psa")="PSA"
+56 SET REPA("Ptf")="PTF"
+57 SET REPA("Ptsd")="PTSD"
+58 SET REPA("(Rd)")="(RD)"
+59 SET REPA("Snomed")="SNOMED"
+60 SET REPA("Snomed Ct")="SNOMED CT"
+61 SET REPA("Tb")="TB"
+62 SET REPA("Td")="TD"
+63 SET REPA("Tdap")="TDAP"
+64 SET REPA("Tt")="TT"
+65 SET REPA("Tx")="TX"
+66 SET REPA("Wh")="WH"
+67 SET REPA("VA-")=""
+68 SET REPA("Vimm-")="VIMM-"
+69 SET REPA("Vcpt")="VCPT"
+70 SET REPA("Vpov")="VPOV"
+71 SET REPA("ZZ")=""
+72 QUIT
+73 ;