source: WorldVistAEHR/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZFM.m@ 949

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1EASEZFM ;ALB/jap - Filing 1010EZ Data to Patient Database ;10/12/00 13:08
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;;Mar 15, 2001
3 ;
4QUE ;entry point from queued background job
5 ;
6 ;check signature verification before continuing
7 Q:'$G(EASAPP)
8 Q:'$D(^EAS(712,EASAPP,0))
9 S EASEZNEW=$P(^EAS(712,EASAPP,0),U,11)
10 S X=$G(^EAS(712,EASAPP,1))
11 ;recheck signature status
12 I ('$P(X,U,1))&('$P(X,U,2)) D Q
13 .;remove filing date if can't continue
14 .S FDT=$P(^EAS(712,EASAPP,2),U,5),$P(^EAS(712,EASAPP,2),U,5)="",$P(^EAS(712,EASAPP,2),U,6)="",$P(^EAS(712,EASAPP,2),U,11)=""
15 .I FDT K ^EAS(712,"FIL",FDT,EASAPP)
16 .D APPINDEX^EASEZU2(EASAPP)
17 ;
18 L +^EAS(712,EASAPP)
19 ;check incoming data
20 D CHECK
21 ;
22 ;get EZ1010 data into ^TMP("EZDATA" array
23 D EN^EASEZC1(EASAPP,.EASDFN)
24 ;
25 ;store file #2 data
26 D F2^EASEZF1(EASDFN)
27 ;
28 ;store file #408.12, #408.13, #408.21, #408.22 data
29 D F408^EASEZF2(EASAPP,EASDFN)
30 ;
31 ;store file #355.33 data;
32 ;call IB API to file health insurance and Medicare data
33 D IBINS^EASEZF5(EASAPP,EASDFN)
34 ;
35 ;update 'new patient' remark
36 I EASEZNEW D
37 .S REM="New Patient record added by ELECTRONIC 10-10EZ."
38 .S DA=EASDFN,DIE="^DPT(",DR=".091///^S X=REM"
39 .D ^DIE
40 ;update processing status if not already done
41 I $P($G(^EAS(712,EASAPP,2)),U,5)="" D SETDATE^EASEZU2(EASAPP,"FIL")
42 ;remove the task id
43 S $P(^EAS(712,EASAPP,2),U,11)=""
44 L -^EAS(712,EASAPP)
45 Q
46 ;
47CHECK ;check data
48 ;returns '0' if any invalid data found; otherwise '1'
49 N SUBIEN,X,CHK,DIK,DA
50 ;remove any 'noise' from incoming data
51 S SUBIEN=0 F S SUBIEN=$O(^EAS(712,EASAPP,10,SUBIEN)) Q:+SUBIEN=0 D
52 .S CHK=$P($G(^EAS(712,EASAPP,10,SUBIEN,1)),U,1)
53 .I (CHK="/")!(CHK="//")!(CHK="-")!(CHK="--")!(CHK=" ")!(CHK="") D
54 ..S DA=SUBIEN,DA(1)=EASAPP,DIK="^EAS(712,"_DA(1)_",10,"
55 ..D ^DIK
56 Q
57 ;
58CLEAN ; cleanup
59 K ^TMP("EZDATA",$J),^TMP("EZINDEX",$J),^TMP("EZTEMP",$J),^TMP("EZDISP",$J)
60 Q
Note: See TracBrowser for help on using the repository browser.