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

DG53294A.m

Go to the documentation of this file.
  1. DG53294A ;ALB/RTK - Means Test Utilities ;10/20/00
  1. ;;5.3;Registration;**294**;Aug 13, 1993
  1. ;
  1. ;This routine will edit the newly added ELIGIBILITY VERIF.
  1. ;SOURCE (.3613) field of the PATIENT (#2) file to populate it
  1. ;for use with new logic that is being implemented as part of
  1. ;the Ineligible project. The source will be set as follows:
  1. ;
  1. ;If the ELIGIBILITY VERIF. METHOD (.3615) is VIVA, and the
  1. ;entity verifying (.3616) is POSTMASTER, the source field
  1. ;will be set to HEC.
  1. ;
  1. ;All other patient records with an existing eligibility node
  1. ;(.361) will be set to HEC.
  1. ;
  1. EN N DATA,LFDATE,DFN,I,X,X1,X2,%
  1. S (ERRMSG,FILERR)=""
  1. I $D(XPDNM) D
  1. .I $$VERCP^XPDUTL("LFDATE")'>0 D
  1. ..S %=$$NEWCP^XPDUTL("LFDATE","","0")
  1. .I $$VERCP^XPDUTL("DFN")'>0 D
  1. ..S %=$$NEWCP^XPDUTL("DFN","","0")
  1. ;
  1. F I="SRCREC","SRCSET","SRCERR" D
  1. .I $D(^XTMP("DG-"_I)) Q
  1. .S X1=DT
  1. .S X2=30
  1. .D C^%DTC
  1. .S ^XTMP("DG-"_I,0)=X_"^"_$$DT^XLFDT_"^DG*5.3*294 POST-INSTALL "_$S(I="SRCREC":"record count",I="SRCSET":"records corrected",1:"filing errors")
  1. ;
  1. I '$D(XPDNM) S (^XTMP("DG-SRCREC",1),^XTMP("DG-SRCSET",1))=0
  1. I $D(XPDNM)&'$D(^XTMP("DG-SRCREC",1)) S ^XTMP("DG-SRCREC",1)=0
  1. I $D(XPDNM)&'$D(^XTMP("DG-SRCSET",1)) S ^XTMP("DG-SRCSET",1)=0
  1. I $D(XPDNM) S %=$$VERCP^XPDUTL("LFDATE")
  1. I $G(%)="" S %=0
  1. I %=0 D EN1
  1. Q
  1. EN1 I '$D(XPDNM) S LFDATE=""
  1. I $D(XPDNM) S LFDATE=$$PARCP^XPDUTL("LFDATE")
  1. S DFN="",RECSET=0
  1. F S LFDATE=$O(^DPT("B",LFDATE)) Q:LFDATE="" D
  1. .F S DFN=$O(^DPT("B",LFDATE,DFN)) Q:DFN="" D
  1. ..I '$D(^DPT(DFN,0)) S FILERR(2,DFN,"ALL")="Patient record "_DFN_" does not exist." M ^XTMP("DG-SRCERR")=FILERR K FILERR Q
  1. ..I $D(^DPT(DFN,.361)) D
  1. ...S ^XTMP("DG-SRCREC",1)=$G(^XTMP("DG-SRCREC",1))+1
  1. ...I $P(^DPT(DFN,.361),U,5)["VIVA",($P(^DPT(DFN,.361),U,6)=.5) D
  1. ....S DATA(.3613)="H",RECSET=1 I $$UPD^DGENDBS(2,DFN,.DATA) S ^XTMP("DG-SRCSET",1)=$G(^XTMP("DG-SRCSET",1))+1
  1. ...I $P(^DPT(DFN,.361),U,5)'["VIVA"!($P(^DPT(DFN,.361),U,6)'=.5) D
  1. ....S DATA(.3613)="V",RECSET=1 I $$UPD^DGENDBS(2,DFN,.DATA) S ^XTMP("DG-SRCSET",1)=$G(^XTMP("DG-SRCSET",1))+1
  1. ...I 'RECSET S FILERR(2,DFN,"ALL")="Unable to edit patient record "_DFN_"." Q
  1. ...S RECSET=0
  1. ..I $G(FILERR) M ^XTMP("DG-SRCERR")=FILERR K FILERR
  1. ..I $D(XPDNM) S %=$$UPCP^XPDUTL("DFN",DFN)
  1. .I $D(XPDNM) S %=$$UPCP^XPDUTL("LFDATE",LFDATE)
  1. D MAIL^DG53294M
  1. I $D(XPDNM) S %=$$COMCP^XPDUTL("LFDATE")
  1. D BMES^XPDUTL(" ELIGIBILITY VERIF. SOURCE edit process is complete.")
  1. Q