source: FOIAVistA/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBAB89.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1DVBAB89 ;GT-CAPRI FULL ;05/10/02
2 ;;2.7;AMIE;**42**;Apr 10, 1995
3 ;
4 ;
5START(MSG,DFN) ;CALLED BY REMOTE PROCEDURE DVBAB SURGERY CASE
6 ;Parameters
7 ;=============
8 ; MSG : Output - data global ^TMP("SURGERY")
9 ; DFN : Patient Identification Number
10 ;
11 K ^TMP("DVBSURGERY",$J)
12 N COUNT,VAR S VAR="",COUNT=0
13 I '$D(^DPT(DFN,0)) S ^TMP("DVBSURGERY",$J,COUNT)="Not a valid patient" Q
14 I $D(^SRF("B",DFN)) D
15 . F S VAR=$O(^SRF("B",DFN,VAR)) Q:VAR="" D
16 . . S DVBSROP=$P(^SRF(VAR,"OP"),"^",1)
17 . . D ^DVBASRP1
18 . . S ^TMP("DVBSURGERY",$J,COUNT)=VAR_"^"_$P(^SRF(VAR,0),"^",9)_"^"_DVBSROP_$C(13)
19 . . S COUNT=COUNT+1
20 S MSG=$NA(^TMP("DVBSURGERY",$J))
21 Q
22 ;
23XDA(MSG,DFN) ;CALLED BY REMOTE PROCEDURE DVBAB ORIGINAL PROCESSING DATE
24 K ^TMP("REPRINT",$J)
25 N VAR,COUNT
26 I '$D(DFN) S ^TMP("REPRINT",$J,COUNT)="0^Undefined Patient IEN" Q
27 S DIC=2,DIC(0)="NZX",X=DFN D ^DIC I Y<0 D
28 . S ^TMP("REPRINT",$J,COUNT)="0^Invalid Patient Name." Q
29 S VAR="",COUNT=0
30 I $D(^DVB(396,"B",DFN)) D
31 . F S VAR=$O(^DVB(396,"B",DFN,VAR)) Q:VAR="" D
32 . . I $D(^DVB(396,VAR,4)),$P(^DVB(396,VAR,4),U,4)]"",$D(^DVB(396,VAR,2)),$P(^DVB(396,VAR,2),U,10)'="L",$D(^DPT($P(^DVB(396,VAR,0),U,1),0)) D
33 . . . S ^TMP("REPRINT",$J,COUNT)=VAR_"^"_$P(^DVB(396,VAR,4),"^",2)_$C(13)
34 . . . S COUNT=COUNT+1
35 S MSG=$NA(^TMP("REPRINT",$J))
36 Q
Note: See TracBrowser for help on using the repository browser.