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

MPIFPST.m

Go to the documentation of this file.
  1. MPIFPST ;CMC/SF-MPI VISTA build post-init ;DEC 12, 1998
  1. ;;1.0; MASTER PATIENT INDEX VISTA ;;30 Apr 99
  1. ;
  1. EN ;
  1. D MAIL
  1. D MAIL2
  1. D HL7SITE
  1. D CHECKMPI
  1. D REMOVE
  1. Q
  1. REMOVE ;
  1. S $P(^RGSITE(991.8,1,1),"^",2)=""
  1. S DIK="^RGSITE(991.8,",DA=36,DA(1)=991.8
  1. D ^DIK
  1. K DIK,DA
  1. Q
  1. ;
  1. CHECKMPI ; checking to see if MPI Institition is defined
  1. N DIC,DA,DIE,DR,X,Y
  1. S DIC="^DIC(4,",DIC(0)="XZ",X="MPI"
  1. D ^DIC
  1. I +Y<0 D BMES^XPDUTL("Missing MPI in Institution file, need to update before proceeding.")
  1. Q
  1. MAIL2 ;add mail group to 991.8
  1. N DIC,GROUP,DIC,DA,DIE,DR,X,Y
  1. S DIC="^XMB(3.8,",DIC(0)="XQZ",X="MPIF CMOR REQUEST"
  1. D ^DIC
  1. Q:+Y<0
  1. S GROUP=+Y
  1. S DA=1,DIE="^RGSITE(991.8,",DR=".03///^S X=GROUP" D ^DIE
  1. D BMES^XPDUTL("Adding MPIF CMOR REQUEST mailgroup to file 991.8")
  1. Q
  1. ;add mail group to exception file
  1. MAIL ;
  1. N DIC,GROUP,DIC,DA,DIE,X,Y,DR,ENT
  1. S DIC="^XMB(3.8,",DIC(0)="XQZ",X="MPIF EXCEPTIONS"
  1. D ^DIC
  1. Q:+Y<0
  1. S GROUP=+Y
  1. F ENT=200:1:208,210:1:212,220:1:222,224 D
  1. .S DIC="^RGHL7(991.11,",DIC(0)="XQZ",X=ENT
  1. .D ^DIC
  1. .Q:+Y<0
  1. .S DA=+Y,DIE="^RGHL7(991.11,",DR="6///^S X=GROUP"
  1. .D ^DIE
  1. Q
  1. ;
  1. HL7SITE ;updating Facility in the MPIF-Startup HL7 Application Parameter file
  1. N SITE,DIE,X,Y,DR,ENT,DIC,DA,I
  1. S SITE=$$SITE^VASITE,SITE=$P(SITE,"^",3),SITE=SITE\1
  1. ; ^ SITE is Station Number of site doing install
  1. F I="MPIF-STARTUP","MPIF CMOR RSLT","MPIF CMOR COMP","MPIF A29 SERVER","MPIF A30 SERVER","MPIF MPI","MPIF LOC/MIS" D
  1. . S DIC="^HL(771,",DIC(0)="XQZ",X=I
  1. . D ^DIC
  1. . Q:+Y<0
  1. . S DA=+Y
  1. . S DIE="^HL(771,",DR="3///^S X=SITE"
  1. . D ^DIE
  1. Q
  1. ;