Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PXRMP6I

PXRMP6I.m

Go to the documentation of this file.
  1. PXRMP6I ; SLC/PKR - Inits for PXRM*2.0*6 ;11/25/2007
  1. ;;2.0;CLINICAL REMINDERS;**6**;Feb 04, 2005;Build 123
  1. Q
  1. ;====================================================
  1. DELDD ;Delete the old data dictionaries.
  1. N DIU,TEXT
  1. D EN^DDIOL("Removing old data dictionaries.")
  1. S DIU(0)=""
  1. F DIU=800,801.41,810.1,810.2,810.4,810.5,810.8,811.5,811.8,811.9 D
  1. . S TEXT=" Deleting data dictionary for file # "_DIU
  1. . D EN^DDIOL(TEXT)
  1. . D EN^DIU2
  1. Q
  1. ;
  1. ;====================================================
  1. LISTRULE(IEN) ;List of list rules to include in the build.
  1. N NAME,OK
  1. S OK=0
  1. S NAME=$P(^PXRM(810.4,IEN,0),U,1)
  1. I NAME="VA-*IHD QUERI 412 DIAGNOSIS" S OK=1
  1. I NAME="VA-*IHD QUERI ANCHOR VISIT" S OK=1
  1. I NAME="VA-*IHD QUERI LIPID LOWERING MEDS" S OK=1
  1. I NAME="VA-*IHD QUERI PTS WITH QUALIFY VISIT" S OK=1
  1. I NAME="VA-*MH QUERI QUALIFY MH VISIT" S OK=1
  1. I NAME="VA-*MH QUERI QUALIFY PC VISIT" S OK=1
  1. I OK D RMEHIST^PXRMUTIL(810.4,IEN)
  1. Q OK
  1. ;
  1. ;====================================================
  1. OPTION(ACTION) ;Disable/enable options.
  1. N ACT,IND,OPT,LIST,RESULT
  1. S ACT=$S(ACTION=2:"DISABLE",ACTION=1:"ENABLE",1:"?")
  1. D BMES^XPDUTL(ACT_" options.")
  1. ;
  1. D FIND^DIC(19,"","@;.01","","GMTS","*","B","","","LIST")
  1. F IND=1:1:+LIST("DILIST",0) D
  1. . S OPT=LIST("DILIST","ID",IND,.01)
  1. S RESULT=$$OPTDE^XPDUTL(OPT,ACTION)
  1. I RESULT=0 D MES^XPDUTL("Could not "_ACT_" option "_OPT)
  1. ;
  1. K LIST
  1. D FIND^DIC(19,"","@;.01","","IBDF PRINT","*","B","","","LIST")
  1. F IND=1:1:+LIST("DILIST",0) D
  1. . S OPT=LIST("DILIST","ID",IND,.01)
  1. . S RESULT=$$OPTDE^XPDUTL(OPT,ACTION)
  1. . I RESULT=0 D MES^XPDUTL("Could not "_ACT_" option "_OPT)
  1. ;
  1. S OPT="OR CPRS GUI CHART"
  1. S RESULT=$$OPTDE^XPDUTL(OPT,ACTION)
  1. I RESULT=0 D MES^XPDUTL("Could not "_ACT_" option "_OPT)
  1. ;
  1. S OPT="ORS HEALTH SUMMARY"
  1. S RESULT=$$OPTDE^XPDUTL(OPT,ACTION)
  1. I RESULT=0 D MES^XPDUTL("Could not "_ACT_" option "_OPT)
  1. ;
  1. K LIST
  1. D FIND^DIC(19,"","@;.01","","PXRM","*","B","","","LIST")
  1. F IND=1:1:+LIST("DILIST",0) D
  1. . S OPT=LIST("DILIST","ID",IND,.01)
  1. . S RESULT=$$OPTDE^XPDUTL(OPT,ACTION)
  1. . I RESULT=0 W !,"Could not ",ACTION," option ",OPT
  1. Q
  1. ;
  1. ;====================================================
  1. PRE ;These are the pre-installation actions
  1. D ENVCHK^PXRMP6IM I $G(XPDABORT)=1 Q
  1. ;Disable options and protocols
  1. D OPTION(2)
  1. D PROTOCOL(2)
  1. ;Delete existing exchange file entries.
  1. D DELEXI^PXRMP6IE
  1. ;Rename entries that need it.
  1. D RENAME
  1. ;Initialize list template.
  1. D INILT^PXRMP6IL
  1. ;Delete the old DDs.
  1. D DELDD
  1. ;Repoint dialog with BDI as a finding item to BDI2
  1. D BDICONV^PXRMP6ID
  1. D CHECKRG^PXRMP6ID
  1. D STORERG^PXRMP6ID
  1. Q
  1. ;
  1. ;====================================================
  1. POST ;These are the post-installation actions
  1. N NLINES
  1. ;D SETMAXMH
  1. ;Convert the mental health pointers.
  1. ;D HMHPTRS^PXRMP6IM(.NLINES,1)
  1. ;Convert Conditions for mental health findings.
  1. ;D MHCOND^PXRMP6IC
  1. ;I '$D(^PXRMINDX(601.84,"DATE BUILT")) S ^PXRMINDX(601.84,"DATE BUILT")=$$NOW^XLFDT
  1. ;Convert the rule set sequences to numbers.
  1. ;D SEQCONV^PXRMP6IS
  1. ;Enable options and protocols
  1. ;D OPTION(1)
  1. ;D PROTOCOL(1)
  1. ;D SMEXINS^PXRMP6IE
  1. ;D RTAXEXP
  1. ;D WRITERG^PXRMP6ID
  1. ;D DCLEAN^PXRMP6ID
  1. ;D REINDEX^PXRMP6ID
  1. D RESCIND
  1. Q
  1. ;
  1. ;====================================================
  1. PROTOCOL(ACTION) ;Disable/enable protocols.
  1. N ACT,PROT,RESULT
  1. S ACT=$S(ACTION=2:"DISABLE",ACTION=1:"ENABLE",1:"?")
  1. D BMES^XPDUTL(ACT_" protocols.")
  1. ;
  1. S PROT="ORS HEALTH SUMMARY"
  1. S RESULT=$$PRODE^XPDUTL(PROT,ACTION)
  1. I RESULT=0 D MES^XPDUTL("Could not "_ACT_" protocol "_PROT)
  1. ;
  1. S PROT="ORS AD HOC HEALTH SUMMARY"
  1. S RESULT=$$PRODE^XPDUTL(PROT,ACTION)
  1. I RESULT=0 D MES^XPDUTL("Could not "_ACT_" protocol "_PROT)
  1. ;
  1. S PROT="PXRM PATIENT DATA CHANGE"
  1. S RESULT=$$PRODE^XPDUTL(PROT,ACTION)
  1. I RESULT=0 D MES^XPDUTL("Could not "_ACT_" protocol "_PROT)
  1. Q
  1. ;
  1. ;====================================================
  1. RESCIND ;
  1. N ARY,NAME,IEN,TEXT
  1. S TEXT(1)="Rescinding outdated National Reminder and disabling outdated"
  1. S TEXT(2)="National Reminder Dialog"
  1. S TEXT(3)=""
  1. D BMES^XPDUTL(.TEXT)
  1. S NAME="VA-POS DEPRESSION SCREEN FOLLOWUP"
  1. S IEN=$O(^PXD(811.9,"B",NAME,"")) Q:IEN'>0
  1. K ARY
  1. ;S ARY(1,811.9,IEN_",",1.6)=1
  1. S ARY(1,811.9,IEN_",",69)=3071101
  1. D FILE^DIE("","ARY(1)")
  1. S TEXT(1)="Rescinding reminder: "_NAME
  1. S TEXT(2)=""
  1. D BMES^XPDUTL(.TEXT)
  1. S DIEN=$G(^PXD(811.9,IEN,51)) Q:DIEN'>0
  1. S NAME=$P($G(^PXRMD(801.41,DIEN,0)),U)
  1. K ARY
  1. S ARY(1,801.41,DIEN_",",3)="Disable with PXRM*2.0*6 on Nov 1, 2007"
  1. D FILE^DIE("","ARY(1)")
  1. S TEXT(1)="Disabling Dialog: "_NAME
  1. D BMES^XPDUTL(.TEXT)
  1. Q
  1. ;====================================================
  1. RENAME ;Rename entries
  1. N DA,DIE
  1. S DA=+$O(^PXRM(810.4,"B","VA-*MH QUERY QUALIFYING MH VISIT",""))
  1. I DA=0 Q
  1. S DIE=810.4,DR=".01///VA-*MH QUERI QUALIFYING MH VISIT"
  1. D ^DIE
  1. Q
  1. ;
  1. ;====================================================
  1. RTAXEXP ;Rebuild taxonomy expansions.
  1. N IEN,IND,TEXT,TNAME
  1. S TNAME(1)="VA-TETANUS DIPHTHERIA"
  1. S TNAME(2)="VA-WH HYSTERECTOMY W/CERVIX REMOVED"
  1. D BMES^XPDUTL("Rebuilding taxonomy expansions.")
  1. F IND=1:1:2 D
  1. . S IEN=$O(^PXD(811.2,"B",TNAME(IND),""))
  1. . I IEN="" Q
  1. . S TEXT=" Working on taxonomy "_IEN
  1. . D BMES^XPDUTL(TEXT)
  1. . D DELEXTL^PXRMBXTL(IEN)
  1. . D EXPAND^PXRMBXTL(IEN,"")
  1. Q
  1. ;
  1. ;====================================================
  1. SETMAXMH ;Set the maximum number of mental health questions that can be
  1. ;administered through a reminder dialog.
  1. N DA,DIE,DR
  1. I +$P($G(^PXRM(800,1,"MH")),U)>0 Q
  1. S DA=1,DR="17////35",DIE="^PXRM(800," D ^DIE
  1. Q
  1. ;