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

DG53672R.m

Go to the documentation of this file.
  1. DG53672R ;ALB/BRM;Clean-up Other EC of Reimbursable Insurance ; 9/6/05 7:39am
  1. ;;5.3;Registration;**672**;Aug 13,1993
  1. ;;
  1. ;
  1. ; Called from inside Patient File (#2) loop in DG53672C.
  1. ;
  1. RSETUP(ELIG) ; entry point
  1. N EC81,EC8
  1. ; get local codes assigned to the national Reimbursable code
  1. S EC81=$O(^DIC(8.1,"B","REIMBURSABLE INSURANCE",""))
  1. S EC8=""
  1. F S EC8=$O(^DIC(8,"D",EC81,EC8)) Q:'EC8 S ELIG(EC8)=""
  1. Q
  1. ;
  1. REIM(DFN,RIELIG) ;check for Eligibility Code of Reimbursable Insurance
  1. N EC8,IEN,QFLG,PRIMEC,DOD
  1. S DOD=$P($G(^DPT(DFN,.35)),"^") ;Date of Death
  1. S PRIMEC=$P($G(^DPT(DFN,.36)),"^"),EC8=""
  1. F S EC8=$O(RIELIG(EC8)) Q:'EC8 D
  1. .Q:'$D(^DPT(DFN,"E","B",EC8))
  1. .S IEN="",QFLG=0
  1. .F S IEN=$O(^DPT(DFN,"E","B",EC8,IEN)) Q:'IEN D
  1. ..I PRIMEC=EC8,'$G(QFLG) S QFLG=1 S:'DOD ^XTMP("DG53672C","DG53672R","PRIMCNT")=$G(^XTMP("DG53672C","DG53672R","PRIMCNT"))+1 Q
  1. ..S ^XTMP("DG53672C","DG53672R","CNT")=$G(^XTMP("DG53672C","DG53672R","CNT"))+1
  1. ..S ^XTMP("DG53672C","DG53672R","DATA",DFN)=EC8_"^"_$$EXTERNAL^DILFD(2.0361,.01,"",EC8)
  1. ..D KILL(DFN,IEN)
  1. Q
  1. ;
  1. KILL(DFN,IEN) ;
  1. ; Delete Reimbursable Insurance entry.
  1. N DA,DATA,DIK
  1. S DA(1)=DFN,DA=IEN,DIK="^DPT("_DA(1)_",""E"","
  1. D ^DIK
  1. Q
  1. SNDMSG ; Send Mailman bulletin when process completes
  1. N DIFROM,SITE,STATN,SITENM,XMDUZ,XMSUB,XMY,XMTEXT,MSG
  1. S SITE=$$SITE^VASITE,STATN=$P($G(SITE),U,3),SITENM=$P($G(SITE),U,2)
  1. S:$$GET1^DIQ(869.3,"1,",.03,"I")'="P" STATN=STATN_" [TEST]"
  1. S XMDUZ="REIMBURSABLE INS OTHER EC CLEANUP",XMSUB=XMDUZ_" - "_STATN
  1. S (XMY(DUZ),XMY("HECDQSUPPORT@domain.ext"))=""
  1. S XMTEXT="MSG("
  1. S MSG(1)="The Reimbursable Insurance Other Eligibility clean-up process has completed successfully."
  1. S MSG(2)="This process searched for patient records with an other eligibility code of"
  1. S MSG(3)="Reimbursable Insurance, and deleted it as the code is no longer active."
  1. S MSG(4)=""
  1. S MSG(5)="Task: "_$G(^XTMP("DG53672C",0,"TASK"))
  1. S MSG(6)="Site Station Number: "_STATN
  1. S MSG(7)="Site Name: "_SITENM
  1. S MSG(8)=""
  1. S MSG(9)="Process started : "_$$FMTE^XLFDT($P($G(^XTMP("DG53672C",0)),U,2))
  1. S MSG(10)="Process completed : "_$$FMTE^XLFDT($P($G(^XTMP("DG53672C",0)),"^",4))
  1. S MSG(10.5)=""
  1. S MSG(11)="Total Patients processed : "_+$G(^XTMP("DG53672C","TCNT"))
  1. S MSG(12)="Total non-Primary Reimbursable ECs Removed : "_+$G(^XTMP("DG53672C","DG53672R","CNT"))
  1. S MSG(12.1)="Total Reimbursable Primary ECs* : "_+$G(^XTMP("DG53672C","DG53672R","PRIMCNT"))
  1. S MSG(12.2)=" *Primary Reimbursable ECs were not removed, and sites must review"
  1. S MSG(12.3)=" and fix manually by assigning a new Primary EC."
  1. S MSG(12.5)=""
  1. S MSG(13)="To identify patients at the site for whom the non-Primary Reimbursable"
  1. S MSG(14)=" Insurance Eligibility Code was removed, the IRM or person(s) responsible"
  1. S MSG(14.5)=" for installing the patch can review the following global:"
  1. S MSG(15)=" ^XTMP(""DG53672C"",""DG536572R"",""DATA"",DFN)"
  1. S MSG(16)=" DFN = internal entry number of the Patient file (#2)."
  1. D ^XMD
  1. Q