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

RMPRESRV.m

Go to the documentation of this file.
  1. RMPRESRV ;PHX/HNC - SERVER ROUTINE FOR NATIONAL DATA EXTRACT ; 1/19/2005
  1. ;;3.0;PROSTHETICS;**12,18,24,51,59,103,125**;Feb 09, 1996;Build 21
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;DBIA # 10072 - for routine REMSBMSG^XMA1C
  1. ;
  1. ;HCPCS SERVER - patch 103, HNC 1/19/2005
  1. ;
  1. ;modified to include the PIP extract 9/28/00
  1. X XMREC D
  1. .;disability codes
  1. .I XMRG["DS1" S RMPRDS1=$P(XMRG,"*",2)
  1. .I XMRG["DS2" S RMPRDS2=$P(XMRG,"*",4)
  1. .;new and repair worksheets
  1. .I XMRG["DT1" S RMPRDT1=$P(XMRG,"*",2)
  1. .I XMRG["DT2" S RMPRDT2=$P(XMRG,"*",4)
  1. .;suspense delayed order report
  1. .I XMRG["DOR1" S RMPRDOR1=$P(XMRG,"*",2)
  1. .I XMRG["DOR1" S RMPRDORS=$P(XMRG,"*",3)
  1. .I XMRG["DOR1" S RMPRDORW=$P(XMRG,"*",4)
  1. .I XMRG["DOR1" D A1^RMPR9DO("00","99","ALL",RMPRDORS,RMPRDOR1,RMPRDORW) S XMSER="S."_XQSOP,XMZ=XQMSG D REMSBMSG^XMA1C Q
  1. ;new items to file 661.1
  1. I XMRG="ITEM SERVER 661.1" G EN^RMPRET
  1. ;retransmit a date for patient notification patch 125
  1. I XMRG="RETRANS NOTIFICATION INFO" D G IN1^RMPRDVN
  1. . X XMREC S BDATE=$P(XMRG,"*",2)
  1. . ;Send message to local VAMC staff and to PCM VACO Staff on Outlook
  1. . S XMDUZ=.5
  1. . S XMY("G.RMPR SERVER")=""
  1. . S XMY("VHACOPSASPIPReport@domain.ext")=""
  1. . S XMSUB="Retransmit Patient Notification Data "_$P($$SITE^VASITE,U,2)
  1. . S RMPRMSG(1)="The National PSAS Server has been activated today by Prosthetics HQ."
  1. . S RMPRMSG(2)="Please note data for Patient Notification was not received"
  1. . S RMPRMSG(3)=""
  1. . S RMPRMSG(4)="This was activated by "_$P(XMFROM,"@",1)
  1. . S RMPRMSG(5)=""
  1. . S XMTEXT="RMPRMSG("
  1. . D ^XMD
  1. . ;call routine to gather data
  1. . Q
  1. ;pip EXCEL extract
  1. I $P(XMRG,"*",1)="PIP ROLL-UP" S RMPRPIP1=$P(XMRG,"*",2),RMPRPIP2=$P(XMRG,"*",3) G ^RMPR5HQ1
  1. ;pip REPORT extract
  1. I $P(XMRG,"*",1)="PIP REPORT" S RMPRPIP1=$P(XMRG,"*",2),RMPRPIP2=$P(XMRG,"*",3),RMPRDET=$P(XMRG,"*",4) G ^RMPR5HQA
  1. ;open obligations
  1. I XMRG="PR2" G PR2^RMPREXT
  1. I $D(RMPRDS1)&($D(RMPRDS2)) D EN^RMPREXDS(RMPRDS1,RMPRDS2) G EXIT
  1. I '$D(RMPRDT1)!('$D(RMPRDT2)) G EXIT
  1. ;dates for message subject
  1. S Y=RMPRDT1 D DD^%DT S RMPRDAT1=Y
  1. S Y=RMPRDT2 D DD^%DT S RMPRDAT2=Y
  1. ;send message to group so they know the server was activated
  1. S XMDUZ=.5
  1. S XMY("G.RMPR SERVER")=""
  1. S XMSUB="Prosthetics Data Extract "_RMPRDAT1_" to "_RMPRDAT2
  1. S RMPRMSG(1)="The National Data Server has been activated today by Prosthetics HQ."
  1. S RMPRMSG(2)="Data has been collected for the date range "_RMPRDAT1_" to "_RMPRDAT2_"."
  1. S RMPRMSG(3)=""
  1. S RMPRMSG(4)="This was activated by "_$P(XMFROM,"@",1)
  1. S RMPRMSG(5)=""
  1. S XMTEXT="RMPRMSG("
  1. D ^XMD
  1. ;refresh amis codes in file 660
  1. D ^RMPREXR
  1. ;gather and send the raw data
  1. ;add additional extract here if needed
  1. D EN1^RMPREXT
  1. EXIT ;common exit point
  1. S XMSER="S."_XQSOP,XMZ=XQMSG D REMSBMSG^XMA1C
  1. K RMPRDAT1,RMPRDAT2,RMPRDT1,XMRG,XMSUB
  1. K RMPRDET,RMPRDOR1,RMPRDORS,RMPRDORW,RMPRDS1,RMPRDS2,RMPRDT2,RMPRMSG
  1. K RMPRPIP1,RMPRPIP2,XMDUZ,XMFROM,XMREC,XMSER,XMTEXT,XMY,XMZ,XQMSG,XQSOP,Y
  1. ;END