source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG10.m@ 677

Last change on this file since 677 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1DG10 ;ALB/MRL,DAK,AEG,PHH-LOAD/EDIT PATIENT DATA ; 8/24/05 1:47pm
2 ;;5.3;Registration;**32,109,139,149,182,326,513,425,574,642,658**;Aug 13, 1993
3START ;
4 D LO^DGUTL
5 I $G(DGPRFLG)=1,$G(DGPLOC)=1 D G Q:$G(DGRPOUT),A1
6 .; D EN^DGRPD,REG^IVMCQ($G(DFN))
7 . D EN^DGRPD
8 . Q:$G(DGRPOUT)
9 . D REG^IVMCQ($G(DFN))
10 . D HINQ
11 ;
12A W !! K VET,DIE,DIC,CARD S DIC=2,DLAYGO=2,DIC(0)="ALEQM" K DIC("S") D ^DIC G Q:Y<0 S (DFN,DA)=+Y,DGNEW=$P(Y,"^",3) K DLAYGO
13 N Y D PAUSE I DGNEW D NEW^DGRP S DA=DFN,VET=$S($D(^DPT(DFN,"VET")):^("VET")'="Y",1:0)
14 ;
15 ;MPI QUERY
16 ;check to see if CIRN PD/MPI is installed
17 N X S X="MPIFAPI" X ^%ZOSF("TEST") G:'$T SKIP
18 K MPIFRTN
19 D MPIQ^MPIFAPI(DFN)
20 K MPIFRTN
21 ;
22 I +$G(DGNEW) D
23 . ; query CMOR for Patient Record Flag Assignments if NEW patient and
24 . ; display results
25 . I $$PRFQRY^DGPFAPI(DFN) D DISPPRF^DGPFAPI(DFN)
26 ;
27SKIP ;
28 S DGELVER=0 D EN^DGRPD I $D(DGRPOUT) K DGRPOUT G A
29 D HINQ,REG^IVMCQ($G(DFN)) G A1
30 ;
31HINQ ;
32 S Y=$S($D(^DG(43,1,0)):^(0),1:0) I $P(Y,U,27) S X="DVBHQZ4" X ^%ZOSF("TEST") I $T D
33 .N DGROUT
34 .S DGROUT=X
35 .I $G(DFN) D
36 ..N X,Y,DGRP
37 ..F X=.3,.32 S DGRP(X)=$G(^DPT(DFN,X))
38 ..W !," Money Verified: " S Y=$P(DGRP(.3),"^",6) X:Y]"" ^DD("DD") W $S(Y]"":Y,1:"NOT VERIFIED")
39 ..W ?40," Service Verified: " S Y=$P(DGRP(.32),"^",2) X:Y]"" ^DD("DD") W $S(Y]"":Y,1:"NOT VERIFIED")
40 .D @("EN^"_DGROUT) K Y Q ;from dgdem0
41 Q
42 ;
43 ; SDIEMM is used as a flag by AMBCARE Incomplete Encounter Management
44 ; to bypass the embossing routines when calling load/edit from IEMM
45 ;
46A1 D G H:'%,CK:%'=1 S DGRPV=0 D EN1^DGRP,MT(DFN),CP G Q:$G(DGPRFLG)=1 G Q:$G(SDIEMM) G Q:'$D(DA),EMBOS
47 .W !,"Do you want to ",$S(DGNEW:"enter",1:"edit")," Patient Data"
48 .S %=1 D YN^DICN
49 .I +$G(DGNEW) Q
50 .I $$ADD^DGADDUTL($G(DFN)) ;
51 ;
52H W !?5,"Enter 'YES' to enter/edit registration data or 'NO' to continue without",!?5,"editing."
53 G A1
54 ;
55CK S DGEDCN=1 D ^DGRPC,MT(DFN),CP
56 G Q:$G(DGPRFLG)=1 G Q:$G(SDIEMM)
57 I $G(DGER)[55 K DIR S DIR(0)="Y",DIR("A")="Do you wish to return to Screen #9 to enter missing Income Data? " D ^DIR K DIR
58 ;G:Y ^DGRP9
59 ;
60EMBOS ;W ! D EMBOS^DGQEMA G A
61 G A
62 ;
63 ;
64Q K X,Y,Z,DIC,DGELVER,DGNEW,DGRPV,VET Q
65 ;
66MT(DFN) ; Check if user requires a means test. Ask user if they want to proceedif
67 ; one is required
68 I '$D(SDIEMM) DO
69 .N DGREQF,DIV
70 .D EN^DGMTR
71 .I DGREQF D EDT^DGMTU(DFN,DT):$P($$MTS^DGMTU(DFN),U,2)="R"
72 .Q
73 I $D(SDIEMM) DO
74 .N DGMTI
75 .S DGMTI=$$LST^DGMTU(DFN,SCINF("ENCOUNTER"),1)
76 .I $P(DGMTI,U,4)="R" D I 1
77 ..S DGMT0=$G(^DGMT(408.31,+DGMTI,0)),DGMTDT=$P(DGMT0,"^")
78 ..I '$$OKTOCONT(DGMTDT) Q
79 ..S DGMTI=+DGMTI,DGMTYPT=1,DGMTACT="COM",DGMTROU="COM^DGMTEO" D EN^DGMTSC
80 .E D WARNING
81 .Q
82 Q
83 ;
84WARNING ;
85 ;prints a warning to the screen about means test
86 ;
87 W !!,"A means test for this encounter date was not found and may be required!"
88 W !,"Further investigation will be needed."
89 W !
90 D PAUSE
91 Q
92 ;
93PAUSE ;
94 N DIR
95 S DIR(0)="FAO",DIR("A")="Press ENTER to continue " D ^DIR
96 Q
97 ;
98OKTOCONT(Y) ;
99 ;
100 N DIR
101 W !!,"Patient Requires a means Test"
102 X ^DD("DD")
103 W !,"Primary Means Test Required from '",Y,"'",!
104 ;
105 I $D(SDIEMM),'$D(^XUSEC("SCENI MEANS TEST EDIT",DUZ)) DO G OKQ
106 .W !,$C(7),"You do not have the appropriate IEMM Security Key. Contact your supervisor.",!
107 .D PAUSE
108 .S Y=0
109 ;
110 S DIR("A")="Do you wish to proceed with the means test at this time"
111 S DIR("B")="YES"
112 S DIR(0)="Y"
113 D ^DIR
114OKQ Q $S(Y=1:1,1:0)
115 ;
116CP ;If not (autoexempt or MTested) & no CP test this year then
117 ;prompt for add/edit cp test
118 N DIV,DGIB,DGIBDT,DGX,X,DIRUT,DTOUT
119 G:'$P($G(^DG(43,1,0)),U,41) QTCP ;USE CP FLAG
120 S DGIBDT=$S($D(DFN1):9999999-DFN1,1:DT)
121 D EN^DGMTCOR
122 I +$G(DGNOCOPF) S DGMTCOR=0
123 I DGMTCOR D THRESH^DGMTCOU1(DGIBDT) D EDT^DGMTCOU(DFN,DT)
124 K DGNOCOPF
125QTCP Q
Note: See TracBrowser for help on using the repository browser.