source: FOIAVistA/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBAB52.m@ 1596

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1DVBAB52 ;ALB/SPH - CAPRI ADMISSION INQ BY DATE ;09/01/00
2 ;;2.7;AMIE;**35**;Apr 10, 1995
3 ;
4STRT(ZMSG,BDATE,EDATE) ;
5 S DVBABCNT=0
6 K ^TMP($J) G TERM
7SET Q:$D(^DPT(DA,0)) S DFN=DA D RCV^DVBAVDPT Q:CFLOC'=RONUM&(RO="Y")&(CFLOC'=0)&(CFLOC'=376)
8 S ^TMP($J,XCN,CFLOC,MB,DA)=MA_U_RCVAA_U_RCVPEN_U_CNUM
9 Q
10 ;
11PRINTB S MA=$P(DATA,U),RCVAA=$P(DATA,U,2),RCVPEN=$P(DATA,U,3),CNUM=$P(DATA,U,4),DFN=DA,QUIT1=1 D ADM^DVBAVDPT
12 S:ADMDT]"" ADMDT=$$FMTE^XLFDT(ADMDT,"5DZ")
13 S:DCHGDT]"" DCHGDT=$$FMTE^XLFDT(DCHGDT,"5DZ")
14 W:(IOST?1"C-".E!($D(DVBAON2))) @IOF
15 S ZMSG(DVBABCNT)="" S DVBABCNT=DVBABCNT+1
16 S ZMSG(DVBABCNT)="" S DVBABCNT=DVBABCNT+1
17 S ZMSG(DVBABCNT)=" Patient Name: "_PNAM S DVBABCNT=DVBABCNT+1
18 S ZMSG(DVBABCNT)=" Claim No: "_CNUM S DVBABCNT=DVBABCNT+1
19 S ZMSG(DVBABCNT)=" Claim Folder Loc: "_CFLOC S DVBABCNT=DVBABCNT+1
20 S ZMSG(DVBABCNT)=" Social Sec No: "_SSN S DVBABCNT=DVBABCNT+1
21 S ZMSG(DVBABCNT)=" Admission Date: "_ADMDT S DVBABCNT=DVBABCNT+1
22 S ZMSG(DVBABCNT)=" Admitting Diagnosis: "_DIAG S DVBABCNT=DVBABCNT+1
23 S ZMSG(DVBABCNT)=" Discharge Date: "_DCHGDT S DVBABCNT=DVBABCNT+1
24 S ZMSG(DVBABCNT)=" Bed Service: "_BEDSEC S DVBABCNT=DVBABCNT+1
25 S ZMSG(DVBABCNT)=" Recv A&A?: "_$S(RCVAA=0:"NO",RCVAA=1:"YES",1:"Not specified") S DVBABCNT=DVBABCNT+1
26 S ZMSG(DVBABCNT)=" Pension?: "_$S(RCVPEN=0:"NO",RCVPEN=1:"YES",1:"Not specified") S DVBABCNT=DVBABCNT+1
27 ;
28 ;ELIG INFO...
29 S ELIG=DVBAELIG,INCMP=""
30 I ELIG]"" S ELIG=ELIG_" ("_$S(DVBAELST="P":"Pend Ver",DVBAELST="R":"Pend Re-verif",DVBAELST="V":"Verified",1:"Not Verified")_")"
31 I $D(^DPT(DA,.29)) S INCMP=$S($P(^(.29),U,12)=1:"Incompetent",1:"")
32 S ZMSG(DVBABCNT)=" Eligibility data: "_ELIG_$S(ELIG]"":", ",1:"")
33 S DVBABCNT=DVBABCNT+1
34 W:$X>60 !?26 S ZMSG(DVBABCNT)=INCMP S DVBABCNT=DVBABCNT+1
35 Q
36 ;END OF ELIG INFO
37 ;
38PRINT U IO S QUIT="" K MA,MB
39 S XCN="" F M=0:0 S XCN=$O(^TMP($J,XCN)) Q:XCN=""!(QUIT=1) S CFLOC="" F J=0:0 S CFLOC=$O(^TMP($J,XCN,CFLOC)) Q:CFLOC=""!(QUIT=1) D PRINT1
40 Q
41PRINT1 S ADM="" F K=0:0 S ADM=$O(^TMP($J,XCN,CFLOC,ADM)) Q:ADM=""!(QUIT=1) S DA="" F L=0:0 S DA=$O(^TMP($J,XCN,CFLOC,ADM,DA)) Q:DA=""!(QUIT=1) S DATA=^(DA) D PRINTB
42 Q
43 ;
44TERM ;
45SETUP ;
46EN1 ;
47QUEUE ;
48 S RO="N"
49 S RONUM=0
50 S HEAD=""
51 S HEAD1=""
52GO S MA=BDATE F J=0:0 S MA=$O(^DGPM("AMV1",MA)) Q:$P(MA,".")>EDATE!(MA="") W:'$D(NOASK) "." F DA=0:0 S DA=$O(^DGPM("AMV1",MA,DA)) Q:DA="" F MB=0:0 S MB=$O(^DGPM("AMV1",MA,DA,MB)) Q:MB="" I MA'>EDATE D SET
53 I '$D(^TMP($J)) U IO W !!,*7,"No data found for parameters entered.",!! H 2 G KILL
54 I $D(^TMP($J)) D PRINT I $D(DVBAQUIT) K DVBAON2,DCHPTR,M,Y,J G KILL^DVBAUTIL
55 ;
56KILL D ^%ZISC S X=3 K DVBAON2,DCHPTR,M,Y,J D:$D(ZTQUEUED) KILL^%ZTLOAD G FINAL^DVBAUTIL
57 ;
58DEQUE K ^TMP($J) G GO
Note: See TracBrowser for help on using the repository browser.