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

AGMSPFRM.m

Go to the documentation of this file.
AGMSPFRM ; IHS/ASDS/EFG - PRINT MSP FORM ;   
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 ;
 ;THIS IS THE DRIVER FOR PRINTING THE MSP FORM.
 ;IF THE VARIABLE AG("MSPPRINT") IS PRESENT, THE OPTION
 ;TO PRINT THE PATIENT'S DATA MAPPED TO THE FORM WAS
 ;SELECTED.
 ;IF THE VARIABLE IS NOT PRESENT, THE OPTION TO PRINT
 ;A BLANK FORM WAS SELECTED.
 ;
 I '$D(AG("MSPPRINT")) G BLANK
 K DIC,Y,DD,DO
 S DIC="^AUPNMSP("
 S DIC(0)="AEMQZ"
 D ^DIC Q:Y=-1  S AG("DA")=+Y
 K DIC,Y,DD,DO
 Q:'$D(AG("DA"))
 D ^XBCLS
 G BLANK2
BLANK D ^XBCLS
 D PTLK^AG
 Q:X[U
 S:'$G(DFN) DFN=""
BLANK2 K DIC,Y,DD,DO
 S XBNS="AG;DFN",XBRP="PROCESS^AGMSPFRM" D ^XBDBQUE
 K AG("MSPPRINT")
 Q
PROCESS ;
 K MSPRES
 K DIQ,DIQ(0),^UTILITY("DIQ1",$J)
 S:$G(AG("DA"))'="" DIC=9000037,DA=AG("DA"),DR=".01:.71;100",DIQ="MSPRES(" D EN^DIQ1
 S FORM=0
 D HDR,EN^AGMSP1
 S FORM=1
 D HDR,EN^AGMSP2
 D HDR,EN^AGMSP3
 D HDR,EN^AGMSP4
 D HDR,EN^AGMSP5
 D HDR,EN^AGMSP6
 D HDR,EN^AGMSP7
 K MSPRES
 Q
HDR ;PRINT HEADER LINES
 W:FORM @IOF
 S:$G(DFN)'="" AGPAT=$P(^DPT(DFN,0),U)
 S:$G(DFN)'="" AGCHRT=$S($D(^AUPNPAT(DFN,41,DUZ(2),0)):$P(^AUPNPAT(DFN,41,DUZ(2),0),U,2),1:"xxxxx")
 S Y=DT D DD^%DT S AG("TODAY")=Y
 S AGLINE("-")=$TR($J(" ",79)," ","-")
 S AGLINE("EQ")=$TR($J(" ",79)," ","=")
 S AGLINE("_")=$TR($J(" ",79)," ","_")
 W !,?10,"WARNING: Confidential Patient Information, Privacy Act Applies"
 W !,AGLINE("EQ")
 W !,?22,"MEDICARE SECONDARY PAYER QUESTIONNAIRE"
 W !,AGLINE("-")
 W:$G(DFN)'="" !,$G(AGPAT),"  (",$G(AGCHRT),")"
 W !,?52,"REPORT DATE: "
 W:$G(DFN)'="" AG("TODAY")
 W !,AGLINE("EQ"),!
 Q