DGRPTI ;ALB/RMO - 10-10T Registration - Interview;21 NOV 1996 8:43 am ; 8/28/00 9:42am
;;5.3;Registration;**108,147,175,343**;08/13/93
;
EN ;Entry point for DGRPT INTERVIEW protocol
; Input -- DFN Patient IEN
; Output -- VALMBCK R =Refresh screen
N DGRPTOUT
S VALMBCK=""
D FULL^VALM1
D INT(DFN,"",.DGRPTOUT),PAUSE^VALM1:'DGRPTOUT
D BLD^DGRPTL S VALMBCK="R"
Q
;
INT(DFN,DGNEWPF,DGRPTOUT) ;Interview for 10-10T registration
; Input -- DFN Patient IEN
; DGNEWPF New patient added flag
; 1 =New patient added
; Null=Existing patient
; Output -- DGRPTOUT Quit flag
; 0 =No
; -1 =User entered up-arrow
; -2 =Timeout
; -3 =Unable to lock record
N DG1010TF,DGASKDEV,DGDIV,DGIO
;
D BEGINREG^DGREG(DFN)
;
;Set the 10-10T registration flag and the quit flag
S DG1010TF=1,DGRPTOUT=0
;
;Set up registration parameters
D SETPAR^DGRPTU(.DGDIV,.DGIO,.DGASKDEV,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
D CKUPLOAD^DGENUPL3(DFN)
;
;Edit patient data for 10-10T
D PAT(DFN,DGNEWPF,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
;
D CKUPLOAD^DGENUPL3(DFN)
;
;Edit marital information for 10-10T
D MAR(DFN,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
;
D CKUPLOAD^DGENUPL3(DFN)
;
;Edit income data for 10-10T
D INC(DFN,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
;
D CKUPLOAD^DGENUPL3(DFN)
;
;Edit insurance data for 10-10T
D INS(DFN,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
;Ask if user would like to do a HINQ inquiry
D HINQ(DFN,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
;Invoke consistency checker
D CONCK(DFN,.DGRPTOUT)
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G INTQ
;
;Check for open disposition
I $D(^DPT("ADA",1,DFN)) D G INTQ ;exit if open disposition
. W !!,*7,">>> Patient cannot be registered while there is still an open disposition."
;
;Register patient
I $$ASKREG D
. D EN1010T^DGREG(DFN,DGNEWPF,DGDIV,.DGIO,$G(DGASKDEV),DG1010TF)
ELSE D
. ;Print 10-10T
. I $$ASKPRT D
. . I $D(DGIO(10)) D
. . . D QUE^DGRPTP(DFN,,.DGIO) ;queue 10-10T print
. . ELSE D
. . . D ENDEV^DGRPTP(DFN) ;ask device then print 10-10T
;
INTQ D ENDREG^DGREG(DFN)
Q
;
PAT(DFN,DGNEWPF,DGRPTOUT) ;Edit patient data for 10-10T
; Input -- DFN Patient IEN
; DGNEWPF New patient added flag
; Output -- DGRPTOUT Quit flag
N DA,DIE,DTOUT,DR,IOINHI,IOINORM,X
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !,"---",IOINHI,"Patient: Eligibility, Demographic",IOINORM,"---"
W !,IOINHI," Emergency Contact and Military Service",IOINORM
;Check elig prior to permitting edit of name, dob and ssn
I '$G(DGNEWPF),$$ELGCHK^DGRPTU(DFN) D ID(DFN,.DGRPTOUT) G PATQ:DGRPTOUT<0
S DA=DFN,DIE="^DPT(",DR="[DGRPT 10-10T REGISTRATION]"
L +^DPT(DA):0 I $T D
. D ^DIE L -^DPT(DA)
. ;DGFIN is used to determine whether or not the user entered
. ;an up-arrow when calling DIE
. S DGRPTOUT=$S($D(DTOUT):-2,'$D(DGFIN):-1,1:0)
ELSE D
. W !,"Another user is editing, try later ..."
. S DGRPTOUT=-3
K DGFIN
I $D(DGPHMULT) D EDITPH1^DGRPLE()
K DGPHMULT
PATQ Q
;
ID(DFN,DGRPTOUT) ;Edit patient name, dob and ssn
; Input -- DFN Patient IEN
; Output -- DGRPTOUT Quit flag
N DA,DIE,DTOUT,DR
S DA=DFN,DIE="^DPT(",DR="K DGFIN;.01;.03;.09;@98;S DGFIN="""""
L +^DPT(DA):0 I $T D
. D ^DIE L -^DPT(DA)
. S DGRPTOUT=$S($D(DTOUT):-2,'$D(DGFIN):-1,1:0)
ELSE D
. W !,"Another user is editing, try later ..."
. S DGRPTOUT=-3
K DGFIN
Q
;
MAR(DFN,DGRPTOUT) ;Edit marital information for 10-10T
; Input -- DFN Patient IEN
; Output -- DGRPTOUT Quit flag
N DGDEP,DGERR,DGFL,DGINI,DGIRI,DGISDT,DGPRI,DGREL,DGSPFL,DTOUT,IOINHI,IOINORM,X
;Set income screening date to last year
S DGISDT=$$LYR^DGMTSCU1(DT)
;
;Make sure patient is in the Patient Relation file (#408.12)
D NEW^DGRPEIS1
S DGRPTOUT=DGFL
;
;Set active dependent Patient Relation array DGREL for SPOUSE calls
D GETREL^DGMTU11(DFN,"VS",DGISDT) G MARQ:'$G(DGREL("V"))
;
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !!,"---",IOINHI,"Marital",IOINORM,"---"
;
;Check if patient was married last calendar year
D SPOUSE^DGRPEIS2
I $G(DTOUT) S DGRPTOUT=-2
I DGRPTOUT<0,$$ASKEXT(.DGRPTOUT) G MARQ
;
;If patient was married last calendar year ask spouse information
I $G(DGSPFL) D SPOUSE(DFN,.DGREL,.DGRPTOUT)
MARQ Q
;
SPOUSE(DFN,DGREL,DGRPTOUT) ;Edit spouse data for 10-10T
; Input -- DFN Patient IEN
; DGREL Active dependent array
; Output -- DGRPTOUT Quit flag
N DGFL,DGIPI,DGPRI,IOINHI,IOINORM,X
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !!,"---",IOINHI,"Spouse",IOINORM,"---"
I '$G(DGREL("S")) D
. ;Add demographic data for spouse
. D ADD^DGRPEIS(DFN,"S")
ELSE D
. ;Edit demographic data for spouse
. D EDIT^DGRPEIS(DGREL("S"),"S")
S DGRPTOUT=DGFL
Q
;
INC(DFN,DGRPTOUT) ;Edit income data for 10-10T
; Input -- DFN Patient IEN
; Output -- DGRPTOUT Quit flag
N DA,DGDEP,DGFL,DGINC,DIE,DR,DTOUT,IOINHI,IOINORM,X
;Get patient's Individual Annual Income file (#408.21) IEN - DGINC("V")
D ALL^DGMTU21(DFN,"V",DT,"I") G INCQ:'$G(DGINC("V"))
;
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !!,"---",IOINHI,"Income",IOINORM,"---"
;
;Edit patient's Last Year's Estimated "Household" Taxable Income
S DA=DGINC("V"),DIE="^DGMT(408.21,",DR="K DGFIN;.21T;@98;S DGFIN="""""
L +^DGMT(408.21,DA):0 I $T D
. D ^DIE L -^DGMT(408.21,DA)
. S DGRPTOUT=$S($D(DTOUT):-2,'$D(DGFIN):-1,1:0)
ELSE D
. W !,"Another user is editing, try later..."
. S DGRPTOUT=-3
K DGFIN
INCQ Q
;
INS(DFN,DGRPTOUT) ;Edit insurance data for 10-10T
; Input -- DFN Patient IEN
; Output -- DGRPTOUT Quit flag
N DTOUT,DUOUT,IBCOV,IOINHI,IOINORM,X
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !!,"---",IOINHI,"Insurance",IOINORM,"---"
;
;Update insurance data
D
.I $G(DGPRFLG) D PREG^IBCNBME(DFN) Q
.D REG^IBCNBME(DFN)
.Q
S DGRPTOUT=$S($D(DTOUT):-2,$D(DUOUT):-1,1:0)
Q
;
HINQ(DFN,DGRPTOUT) ;HINQ inquiry
; Input -- DFN Patient IEN
; Output -- DGRPTOUT Quit flag
N DTOUT,IOINHI,IOINORM,X
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !!,"---",IOINHI,"HINQ Inquiry",IOINORM,"---"
;
;HINQ inquiry
D HINQ^DG10
S:$G(DTOUT) DGRPTOUT=-2
Q
;
CONCK(DFN,DGRPTOUT) ;Consistency check
; Input -- DFN Patient IEN
; Output -- DGRPTOUT Quit flag
N DGCD,DGCHK,DGDAY,DGEDCN,DGER,DGLST,DGNCK,DGRPCOLD,DGSC,DGTYPE,DGVT,IOINHI,IOINORM,VA,X
S X="IOINHI;IOINORM" D ENDR^%ZISS
W !!,"---",IOINHI,"Consistency Checker",IOINORM,"---"
;
;Invoke consistency checker
S DGEDCN=1 D ^DGRPC
S:$G(DTOUT) DGRPTOUT=-2
Q
;
ASKREG() ;Ask if user would like to register patient
; Input -- None
; Output -- 1=Yes and 0=No
N DIR,DTOUT,DUOUT,Y
S DIR("A",1)="At this time you may Register the patient if he or she is present and"
S DIR("A",2)="seeking care. Answer 'No' if this was a mail-in application."
S DIR("A",3)=""
S DIR("A")="Would you like to Register the patient"
S DIR("B")="YES",DIR(0)="Y"
W ! D ^DIR
Q +$G(Y)
;
ASKEXT(DGRPTOUT) ;Ask if user would like to exit interview
; Input -- DGRPTOUT Quit flag
; Output -- 1=Yes and 0=No
; DGRPTOUT Quit flag re-set
N DIR,DTOUT,DUOUT,Y
;Timeout
I DGRPTOUT=-2 D
. S Y=1
ELSE D
. S DIR("A")="Exit Interview"
. S DIR("B")="YES",DIR(0)="Y"
. W ! D ^DIR
. S:$D(DTOUT)!($D(DUOUT)) Y=1
S:'Y DGRPTOUT=0
Q +$G(Y)
;
ASKPRT() ;Ask if user would like to print the 10-10T
; Input -- None
; Output -- 1=Yes and 0=No
N DIR,DTOUT,DUOUT,Y
S DIR("A")="PRINT 10/10T"
S DIR("B")="YES",DIR(0)="Y"
W ! D ^DIR
Q +$G(Y)
DGRPTI ;ALB/RMO - 10-10T Registration - Interview;21 NOV 1996 8:43 am ; 8/28/00 9:42am
+1 ;;5.3;Registration;**108,147,175,343**;08/13/93
+2 ;
EN ;Entry point for DGRPT INTERVIEW protocol
+1 ; Input -- DFN Patient IEN
+2 ; Output -- VALMBCK R =Refresh screen
+3 NEW DGRPTOUT
+4 SET VALMBCK=""
+5 DO FULL^VALM1
+6 DO INT(DFN,"",.DGRPTOUT)
IF 'DGRPTOUT
DO PAUSE^VALM1
+7 DO BLD^DGRPTL
SET VALMBCK="R"
+8 QUIT
+9 ;
INT(DFN,DGNEWPF,DGRPTOUT) ;Interview for 10-10T registration
+1 ; Input -- DFN Patient IEN
+2 ; DGNEWPF New patient added flag
+3 ; 1 =New patient added
+4 ; Null=Existing patient
+5 ; Output -- DGRPTOUT Quit flag
+6 ; 0 =No
+7 ; -1 =User entered up-arrow
+8 ; -2 =Timeout
+9 ; -3 =Unable to lock record
+10 NEW DG1010TF,DGASKDEV,DGDIV,DGIO
+11 ;
+12 DO BEGINREG^DGREG(DFN)
+13 ;
+14 ;Set the 10-10T registration flag and the quit flag
+15 SET DG1010TF=1
SET DGRPTOUT=0
+16 ;
+17 ;Set up registration parameters
+18 DO SETPAR^DGRPTU(.DGDIV,.DGIO,.DGASKDEV,.DGRPTOUT)
+19 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+20 ;
+21 DO CKUPLOAD^DGENUPL3(DFN)
+22 ;
+23 ;Edit patient data for 10-10T
+24 DO PAT(DFN,DGNEWPF,.DGRPTOUT)
+25 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+26 ;
+27 ;
+28 DO CKUPLOAD^DGENUPL3(DFN)
+29 ;
+30 ;Edit marital information for 10-10T
+31 DO MAR(DFN,.DGRPTOUT)
+32 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+33 ;
+34 ;
+35 DO CKUPLOAD^DGENUPL3(DFN)
+36 ;
+37 ;Edit income data for 10-10T
+38 DO INC(DFN,.DGRPTOUT)
+39 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+40 ;
+41 ;
+42 DO CKUPLOAD^DGENUPL3(DFN)
+43 ;
+44 ;Edit insurance data for 10-10T
+45 DO INS(DFN,.DGRPTOUT)
+46 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+47 ;
+48 ;Ask if user would like to do a HINQ inquiry
+49 DO HINQ(DFN,.DGRPTOUT)
+50 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+51 ;
+52 ;Invoke consistency checker
+53 DO CONCK(DFN,.DGRPTOUT)
+54 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO INTQ
+55 ;
+56 ;Check for open disposition
+57 ;exit if open disposition
IF $DATA(^DPT("ADA",1,DFN))
Begin DoDot:1
+58 WRITE !!,*7,">>> Patient cannot be registered while there is still an open disposition."
End DoDot:1
GOTO INTQ
+59 ;
+60 ;Register patient
+61 IF $$ASKREG
Begin DoDot:1
+62 DO EN1010T^DGREG(DFN,DGNEWPF,DGDIV,.DGIO,$GET(DGASKDEV),DG1010TF)
End DoDot:1
+63 IF '$TEST
Begin DoDot:1
+64 ;Print 10-10T
+65 IF $$ASKPRT
Begin DoDot:2
+66 IF $DATA(DGIO(10))
Begin DoDot:3
+67 ;queue 10-10T print
DO QUE^DGRPTP(DFN,,.DGIO)
End DoDot:3
+68 IF '$TEST
Begin DoDot:3
+69 ;ask device then print 10-10T
DO ENDEV^DGRPTP(DFN)
End DoDot:3
End DoDot:2
End DoDot:1
+70 ;
INTQ DO ENDREG^DGREG(DFN)
+1 QUIT
+2 ;
PAT(DFN,DGNEWPF,DGRPTOUT) ;Edit patient data for 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; DGNEWPF New patient added flag
+3 ; Output -- DGRPTOUT Quit flag
+4 NEW DA,DIE,DTOUT,DR,IOINHI,IOINORM,X
+5 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+6 WRITE !,"---",IOINHI,"Patient: Eligibility, Demographic",IOINORM,"---"
+7 WRITE !,IOINHI," Emergency Contact and Military Service",IOINORM
+8 ;Check elig prior to permitting edit of name, dob and ssn
+9 IF '$GET(DGNEWPF)
IF $$ELGCHK^DGRPTU(DFN)
DO ID(DFN,.DGRPTOUT)
IF DGRPTOUT<0
GOTO PATQ
+10 SET DA=DFN
SET DIE="^DPT("
SET DR="[DGRPT 10-10T REGISTRATION]"
+11 LOCK +^DPT(DA):0
IF $TEST
Begin DoDot:1
+12 DO ^DIE
LOCK -^DPT(DA)
+13 ;DGFIN is used to determine whether or not the user entered
+14 ;an up-arrow when calling DIE
+15 SET DGRPTOUT=$SELECT($DATA(DTOUT):-2,'$DATA(DGFIN):-1,1:0)
End DoDot:1
+16 IF '$TEST
Begin DoDot:1
+17 WRITE !,"Another user is editing, try later ..."
+18 SET DGRPTOUT=-3
End DoDot:1
+19 KILL DGFIN
+20 IF $DATA(DGPHMULT)
DO EDITPH1^DGRPLE()
+21 KILL DGPHMULT
PATQ QUIT
+1 ;
ID(DFN,DGRPTOUT) ;Edit patient name, dob and ssn
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGRPTOUT Quit flag
+3 NEW DA,DIE,DTOUT,DR
+4 SET DA=DFN
SET DIE="^DPT("
SET DR="K DGFIN;.01;.03;.09;@98;S DGFIN="""""
+5 LOCK +^DPT(DA):0
IF $TEST
Begin DoDot:1
+6 DO ^DIE
LOCK -^DPT(DA)
+7 SET DGRPTOUT=$SELECT($DATA(DTOUT):-2,'$DATA(DGFIN):-1,1:0)
End DoDot:1
+8 IF '$TEST
Begin DoDot:1
+9 WRITE !,"Another user is editing, try later ..."
+10 SET DGRPTOUT=-3
End DoDot:1
+11 KILL DGFIN
+12 QUIT
+13 ;
MAR(DFN,DGRPTOUT) ;Edit marital information for 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGRPTOUT Quit flag
+3 NEW DGDEP,DGERR,DGFL,DGINI,DGIRI,DGISDT,DGPRI,DGREL,DGSPFL,DTOUT,IOINHI,IOINORM,X
+4 ;Set income screening date to last year
+5 SET DGISDT=$$LYR^DGMTSCU1(DT)
+6 ;
+7 ;Make sure patient is in the Patient Relation file (#408.12)
+8 DO NEW^DGRPEIS1
+9 SET DGRPTOUT=DGFL
+10 ;
+11 ;Set active dependent Patient Relation array DGREL for SPOUSE calls
+12 DO GETREL^DGMTU11(DFN,"VS",DGISDT)
IF '$GET(DGREL("V"))
GOTO MARQ
+13 ;
+14 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+15 WRITE !!,"---",IOINHI,"Marital",IOINORM,"---"
+16 ;
+17 ;Check if patient was married last calendar year
+18 DO SPOUSE^DGRPEIS2
+19 IF $GET(DTOUT)
SET DGRPTOUT=-2
+20 IF DGRPTOUT<0
IF $$ASKEXT(.DGRPTOUT)
GOTO MARQ
+21 ;
+22 ;If patient was married last calendar year ask spouse information
+23 IF $GET(DGSPFL)
DO SPOUSE(DFN,.DGREL,.DGRPTOUT)
MARQ QUIT
+1 ;
SPOUSE(DFN,DGREL,DGRPTOUT) ;Edit spouse data for 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; DGREL Active dependent array
+3 ; Output -- DGRPTOUT Quit flag
+4 NEW DGFL,DGIPI,DGPRI,IOINHI,IOINORM,X
+5 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+6 WRITE !!,"---",IOINHI,"Spouse",IOINORM,"---"
+7 IF '$GET(DGREL("S"))
Begin DoDot:1
+8 ;Add demographic data for spouse
+9 DO ADD^DGRPEIS(DFN,"S")
End DoDot:1
+10 IF '$TEST
Begin DoDot:1
+11 ;Edit demographic data for spouse
+12 DO EDIT^DGRPEIS(DGREL("S"),"S")
End DoDot:1
+13 SET DGRPTOUT=DGFL
+14 QUIT
+15 ;
INC(DFN,DGRPTOUT) ;Edit income data for 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGRPTOUT Quit flag
+3 NEW DA,DGDEP,DGFL,DGINC,DIE,DR,DTOUT,IOINHI,IOINORM,X
+4 ;Get patient's Individual Annual Income file (#408.21) IEN - DGINC("V")
+5 DO ALL^DGMTU21(DFN,"V",DT,"I")
IF '$GET(DGINC("V"))
GOTO INCQ
+6 ;
+7 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+8 WRITE !!,"---",IOINHI,"Income",IOINORM,"---"
+9 ;
+10 ;Edit patient's Last Year's Estimated "Household" Taxable Income
+11 SET DA=DGINC("V")
SET DIE="^DGMT(408.21,"
SET DR="K DGFIN;.21T;@98;S DGFIN="""""
+12 LOCK +^DGMT(408.21,DA):0
IF $TEST
Begin DoDot:1
+13 DO ^DIE
LOCK -^DGMT(408.21,DA)
+14 SET DGRPTOUT=$SELECT($DATA(DTOUT):-2,'$DATA(DGFIN):-1,1:0)
End DoDot:1
+15 IF '$TEST
Begin DoDot:1
+16 WRITE !,"Another user is editing, try later..."
+17 SET DGRPTOUT=-3
End DoDot:1
+18 KILL DGFIN
INCQ QUIT
+1 ;
INS(DFN,DGRPTOUT) ;Edit insurance data for 10-10T
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGRPTOUT Quit flag
+3 NEW DTOUT,DUOUT,IBCOV,IOINHI,IOINORM,X
+4 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+5 WRITE !!,"---",IOINHI,"Insurance",IOINORM,"---"
+6 ;
+7 ;Update insurance data
+8 Begin DoDot:1
+9 IF $GET(DGPRFLG)
DO PREG^IBCNBME(DFN)
QUIT
+10 DO REG^IBCNBME(DFN)
+11 QUIT
End DoDot:1
+12 SET DGRPTOUT=$SELECT($DATA(DTOUT):-2,$DATA(DUOUT):-1,1:0)
+13 QUIT
+14 ;
HINQ(DFN,DGRPTOUT) ;HINQ inquiry
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGRPTOUT Quit flag
+3 NEW DTOUT,IOINHI,IOINORM,X
+4 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+5 WRITE !!,"---",IOINHI,"HINQ Inquiry",IOINORM,"---"
+6 ;
+7 ;HINQ inquiry
+8 DO HINQ^DG10
+9 IF $GET(DTOUT)
SET DGRPTOUT=-2
+10 QUIT
+11 ;
CONCK(DFN,DGRPTOUT) ;Consistency check
+1 ; Input -- DFN Patient IEN
+2 ; Output -- DGRPTOUT Quit flag
+3 NEW DGCD,DGCHK,DGDAY,DGEDCN,DGER,DGLST,DGNCK,DGRPCOLD,DGSC,DGTYPE,DGVT,IOINHI,IOINORM,VA,X
+4 SET X="IOINHI;IOINORM"
DO ENDR^%ZISS
+5 WRITE !!,"---",IOINHI,"Consistency Checker",IOINORM,"---"
+6 ;
+7 ;Invoke consistency checker
+8 SET DGEDCN=1
DO ^DGRPC
+9 IF $GET(DTOUT)
SET DGRPTOUT=-2
+10 QUIT
+11 ;
ASKREG() ;Ask if user would like to register patient
+1 ; Input -- None
+2 ; Output -- 1=Yes and 0=No
+3 NEW DIR,DTOUT,DUOUT,Y
+4 SET DIR("A",1)="At this time you may Register the patient if he or she is present and"
+5 SET DIR("A",2)="seeking care. Answer 'No' if this was a mail-in application."
+6 SET DIR("A",3)=""
+7 SET DIR("A")="Would you like to Register the patient"
+8 SET DIR("B")="YES"
SET DIR(0)="Y"
+9 WRITE !
DO ^DIR
+10 QUIT +$GET(Y)
+11 ;
ASKEXT(DGRPTOUT) ;Ask if user would like to exit interview
+1 ; Input -- DGRPTOUT Quit flag
+2 ; Output -- 1=Yes and 0=No
+3 ; DGRPTOUT Quit flag re-set
+4 NEW DIR,DTOUT,DUOUT,Y
+5 ;Timeout
+6 IF DGRPTOUT=-2
Begin DoDot:1
+7 SET Y=1
End DoDot:1
+8 IF '$TEST
Begin DoDot:1
+9 SET DIR("A")="Exit Interview"
+10 SET DIR("B")="YES"
SET DIR(0)="Y"
+11 WRITE !
DO ^DIR
+12 IF $DATA(DTOUT)!($DATA(DUOUT))
SET Y=1
End DoDot:1
+13 IF 'Y
SET DGRPTOUT=0
+14 QUIT +$GET(Y)
+15 ;
ASKPRT() ;Ask if user would like to print the 10-10T
+1 ; Input -- None
+2 ; Output -- 1=Yes and 0=No
+3 NEW DIR,DTOUT,DUOUT,Y
+4 SET DIR("A")="PRINT 10/10T"
+5 SET DIR("B")="YES"
SET DIR(0)="Y"
+6 WRITE !
DO ^DIR
+7 QUIT +$GET(Y)