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

DG53426M.m

Go to the documentation of this file.
  1. DG53426M ;ALB/AEG - DG*5.3*426 POST INSTALLATION ; 2-21-02
  1. ;;5.3;Registration;**426,1015**;2-21-02;Build 21
  1. ;
  1. CAT1A ; Generate mail message if no records exist to be cleaned up.
  1. I '$D(^TMP($J,"CAT 1a")) D
  1. .S ^UTILITY($J,1)="No patients on file with a Means Test status of 'REQUIRED' who have"
  1. .S ^UTILITY($J,2)="a previous test in either a Cat C or PENDING ADJUDICATION status,"
  1. .S ^UTILITY($J,3)="Agreed to pay deductible field is 'YES', and the date of test"
  1. .S ^UTILITY($J,4)="is after 10/5/1999. No action required or taken."
  1. .N DIFROM,%,XMDUZ,XMSUB,XMTEXT,XMY,Y
  1. .S XMDUZ="REGISTRATION PACKAGE",XMY(DUZ)="",XMY(.5)=""
  1. .S XMTEXT="^UTILITY($J,",XMSUB="DG*5.3*426 POST INSTALL REPORT #1"
  1. .D ^XMD
  1. .D MM^DG53426U(XMZ)
  1. .K ^UTILITY($J)
  1. Q
  1. CAT1AP ; Purged Record Report.
  1. N DFN,IEN,NODE0,I
  1. S (DFN,IEN,NODE0)=""
  1. I $D(^TMP("P-REQ",$J)) D
  1. .S ^UTILITY($J,1)="The following 'REQUIRED' status Means Test records have"
  1. .S ^UTILITY($J,2)="been purged from your database. These records were purged"
  1. .S ^UTILITY($J,3)="due to the patient having a Means Test meeting the criteria"
  1. .S ^UTILITY($J,4)="introduced in patch DG*5.3*326. The criteria are as follows:"
  1. .S ^UTILITY($J,5)=" "
  1. .S ^UTILITY($J,6)=" 1 - Means Test status is Category C or Pending Adjudication."
  1. .S ^UTILITY($J,7)=" 2 - The date of the test is on or after 10/6/1999."
  1. .S ^UTILITY($J,8)=" 3 - Agreed to Pay deductible field value is 'YES'."
  1. .S ^UTILITY($J,9)=" "
  1. .S ^UTILITY($J,10)=$$BLDSTR("PATIENT NAME","SSN"," ","PURGED TEST DATE")
  1. .S ^UTILITY($J,11)=$$BLDSTR("------------","---"," ","-------------")
  1. .F I=12:1 S DFN=$O(^TMP("P-REQ",$J,DFN)) Q:'DFN D
  1. ..N DFN1,MTIEN1,TDATE,PID,PNAME,TDATE1
  1. ..S DFN1=$P($G(DFN),"~~",1),MTIEN1=$P($G(DFN),"~~",2)
  1. ..S NODE0=$G(^TMP("P-REQ",$J,DFN)),TDATE=$P(NODE0,U,1)
  1. ..S Y=TDATE X ^DD("DD") S TDATE1=Y
  1. ..S PNAME=$P($G(^DPT(DFN1,0)),U,1)
  1. ..S PID=$E($P($G(^DPT(DFN1,0)),U,9),1,3)_"-"_$E($P($G(^DPT(DFN1,0)),U,9),4,5)_"-"_$E($P($G(^DPT(DFN1,0)),U,9),6,9)
  1. ..S ^UTILITY($J,I)=$$BLDSTR(PNAME,PID," ",TDATE1)
  1. .Q
  1. I $D(^UTILITY($J)) D
  1. .N DIFROM,%,Y,XMDUZ,XMSUB,XMTEXT,XMY,XMZ
  1. .S XMDUZ="REGISTRATION PACKAGE",XMY(DUZ)="",XMY(.5)=""
  1. .S XMTEXT="^UTILITY($J,",XMSUB="DG*5.3*426 POST INSTALL REPORT #1"
  1. .D ^XMD
  1. .D MM^DG53426U(XMZ)
  1. K ^UTILITY($J),^TMP("P-REQ"),^TMP($J,"CAT 1a")
  1. Q
  1. ;
  1. CAT1B ; Report to site that no required status tests on file requiring action.
  1. I '$D(^TMP($J,"CAT 1b")) D
  1. .S ^UTILITY($J,1)="No patients on file with a Means Test status of 'REQUIRED' who do not"
  1. .S ^UTILITY($J,2)="meet the search criteria of patch DG*5.3*426."
  1. .N DIFROM,%,XMDUZ,XMSUB,XMTEXT,XMY,Y
  1. .S XMDUZ="REGISTRATION PACKAGE",XMY(DUZ)="",XMY(.5)=""
  1. .S XMTEXT="^UTILITY($J,",XMSUB="DG*5.3*426 POST INSTALL REPORT #2"
  1. .D ^XMD
  1. .D MM^DG53426U(XMZ)
  1. .K ^UTILITY($J)
  1. Q
  1. CAT1BR ; Report to the site any record in a 'REQUIRED' status needing
  1. ; action.
  1. I $D(^TMP($J,"CAT 1b")) D
  1. .N DFN,IEN,NODE0
  1. .S (DFN,IEN,NODE0)=""
  1. .S ^UTILITY($J,1)="The following Means Tests in your database are in a 'REQUIRED'"
  1. .S ^UTILITY($J,2)="status. The historical records do not meet the criteria for"
  1. .S ^UTILITY($J,3)="cleanup by patch DG*5.3*426. Please update these records."
  1. .S ^UTILITY($J,4)=" "
  1. .S ^UTILITY($J,5)=$$BLDSTR("PATIENT NAME","SSN"," ","**TEST DATE**")
  1. .S ^UTILITY($J,6)=$$BLDSTR("------------","---"," ","-------------")
  1. .N PID,PNAME,LST,DGMTDT,DGMTDT1
  1. .F I=7:1 S DFN=$O(^TMP($J,"CAT 1b",DFN)) Q:'DFN D
  1. ..S PNAME=$P($G(^DPT(DFN,0)),U,1)
  1. ..S PID=$E($P($G(^DPT(DFN,0)),U,9),1,3)_"-"_$E($P($G(^DPT(DFN,0)),U,9),4,5)_"-"_$E($P($G(^DPT(DFN,0)),U,9),6,9)
  1. ..S LST=$$LST^DGMTU(DFN),DGMTDT=$P(LST,U,2)
  1. ..S Y=DGMTDT X ^DD("DD") S DGMTDT1=Y
  1. ..S ^UTILITY($J,I)=$$BLDSTR(PNAME,PID," ",DGMTDT1)
  1. ..Q
  1. .Q
  1. I $D(^UTILITY($J)) D
  1. .N DIFROM,%,Y,XMDUZ,XMSUB,XMTEXT,XMY,XMZ
  1. .S XMDUZ="REGISTRATION PACKAGE",XMY(DUZ)="",XMY(.5)=""
  1. .S XMTEXT="^UTILITY($J,",XMSUB="DG*5.3*426 POST INSTALL REPORT #2"
  1. .D ^XMD
  1. .D MM^DG53426U(XMZ)
  1. K ^UTILITY($J),^TMP($J,"CAT 1b")
  1. Q
  1. NOCAT2 ; report no cat Cs who declined to give income info but agree to pay
  1. I '$D(^TMP($J,"CAT 2")) D
  1. .S ^UTILITY($J,1)="No patients on file with a Means Test status of 'REQUIRED' who have"
  1. .S ^UTILITY($J,2)="a Category C status test in which the patient declined to give"
  1. .S ^UTILITY($J,3)="income information but agreed to pay the deductible."
  1. .N DIFROM,%,XMDUZ,XMSUB,XMTEXT,XMY,Y
  1. .S XMDUZ="REGISTRATION PACKAGE",XMY(DUZ)="",XMY(.5)=""
  1. .S XMSUB="DG*5.3*426 POST INSTALL REPORT #3",XMTEXT="^UTILITY($J,"
  1. .D ^XMD
  1. .D MM^DG53426U(XMZ)
  1. .K ^UTILITY($J)
  1. Q
  1. ;
  1. BLDSTR(P1,P2,P3,P4) ; Build a string from input
  1. N S1,S2,S3,S4
  1. S S1=$E(P1,1,15) I $L(S1)'>14 D
  1. .S S1=S1_$J("",(15-$L(S1)))
  1. S S2=P2
  1. S S3=P3
  1. S S4=P4
  1. Q S1_$J("",5)_S2_$J("",5)_S3_$J("",5)_S4_$J("",5)