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

AGMSPI4.m

Go to the documentation of this file.
  1. AGMSPI4 ; IHS/SD/EFG - MSP INTERVIEW PART 4 ;
  1. ;;7.1;PATIENT REGISTRATION;**8,10**;AUG 25, 2005;Build 7
  1. ;
  1. EN ;EP -
  1. W !,"PART IV - Age"
  1. W !
  1. QUES1 ;ASK QUESTION NUMBER 1
  1. S DR=".26 1. Are you currently employed ? (Y/N) "
  1. D ^DIE
  1. K DIE("NO^")
  1. Q:$D(Y) ;AG*7.1*8
  1. S PARTIV1=X
  1. I X="Y" D Q:$D(Y) ;AG*7.1*8
  1. . K AG("MCRCHK")
  1. . S DR=".27 Name of your employer : "
  1. . D ^DIE
  1. . Q:$D(Y) ;AG*7.1*8
  1. I X="N" D Q:$D(Y) ;AG*7.1*8
  1. . S DR=".28 Date of retirement : "
  1. . D ^DIE
  1. ;
  1. QUES2 ;ASK QUESTION NUMBER 2
  1. S DR=".29 Is your spouse currently employed ? (Y/N) "
  1. D ^DIE
  1. K DIE("NO^")
  1. Q:$D(Y) ;AG*7.1*8
  1. S PARTIV2=X
  1. I X="Y" D Q:$D(Y)
  1. . K AG("MCRCHK")
  1. . S DR=".31 Name of spouse's employer : "
  1. . D ^DIE
  1. I X="N" D Q:$D(Y) ;AG*7.1*8
  1. . S DR=".32 Date of retirement : "
  1. . D ^DIE
  1. ;I $D(AG("MCRCHK")) W !!,"**BASED ON THE PATIENT'S RESPONSE, MEDICARE IS PRIMARY. DO NOT PROCEED FURTHER**" H 2 Q
  1. S COND1=(($G(PARTI1)="Y")!($G(PARTI2)="Y")!($G(PARTI3)="Y")!($G(PARTI4)="Y")!($G(PARTII1)="Y")!($G(PARTII2)="Y")!($G(PARTII3)="Y"))
  1. I ($G(PARTIV1)="N")&($G(PARTIV2)="N") D Q
  1. . W !,"If the patient answered no to both questions 1 and 2, Medicare is primary"
  1. . W !,"unless the patient answered yes to questions in part I and II."
  1. . S DIR(0)="E"
  1. . S DIR("A")="STOP. DO NOT PROCEED. Press any key to exit."
  1. . D ^DIR ;AG*7.1*8
  1. . K DIR
  1. . Q
  1. ;
  1. QUES3 ;ASK QUESTION NUMBER 3
  1. S DR=".33 Do you have group health plan (GHP) coverage based on your own, or a spouse's current employer ? (Y/N) "
  1. S DIE("NO^")=""
  1. D ^DIE
  1. K DIE("NO^")
  1. S PARTIV3=X
  1. I X="N" D Q
  1. . S DIR(0)="E"
  1. . S DIR("A")="STOP. Medicare is primary unless the patient answered yes to the question in part I or II."
  1. . D ^DIR
  1. . K DIR
  1. QUES4 ;ASK QUESTION NUMBER 4
  1. S DR=".34 Does the employer that sponsors your GHP employ 20 or more employees ? (Y/N)"
  1. D ^DIE
  1. K DIE("NO^")
  1. Q:$D(Y) ;AG*7.1*8
  1. S PARTIV4=X
  1. I X="Y" D Q:$D(Y)
  1. . W !,"STOP. The GHP is primary. Obtain the following information:"
  1. . S DR=".35 Name of GHP : "
  1. . D ^DIE
  1. . Q:$D(Y) ;AG*7.1*8
  1. . S DR=".36 Policy identification number : "
  1. . D ^DIE
  1. . Q:$D(Y) ;AG*7.1*8
  1. . S DR=".37 Group identification number : "
  1. . D ^DIE
  1. . Q:$D(Y) ;AG*7.1*8
  1. . S DR=".38 Name of policy holder : "
  1. . D ^DIE
  1. . Q:$D(Y) ;AG*7.1*8
  1. . S DR=".39 Relationship to patient : "
  1. . D ^DIE
  1. . Q:$D(Y) ;AG*7.1*8
  1. E W !,"STOP. Medicare is primary payer unless the patient answered yes to questions in part I or II."
  1. S DR=".05////^S X=DUZ"
  1. D ^DIE
  1. Q:$D(Y) ;AG*7.1*8
  1. Q