source: WorldVistAEHR/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBADD.m@ 1710

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

initial load of WorldVistAEHR

File size: 1.2 KB
RevLine 
[613]1DVBADD ;ALB/MLI - DD calls from AMIE files ; 2/15/96@1
2 ;;2.7;AMIE;**4**;Apr 10, 1995
3 ;
4 ; This routine contains calls made from AMIE DDs
5 ;
6EXAMSET ; set logic for .01 field of AMIE EXAM file
7 ; (loops through and resets APE x-refs in file 396.4)
8 ;
9 ; FM passes x=new value; da=ien
10 ;
11 ; uses I=loop counter,RD=request date,DFN=patient
12 ;
13 N I,DFN,NODE,NODE2,RD
14 S I=0
15 I $G(X)=""!($G(DA)="") Q
16 I '$D(ZTQUEUED) W !,"Setting APE x-refs with new name...please wait"
17 F S I=$O(^DVB(396.4,"F",DA,I)) Q:'I D
18 . S NODE=$G(^DVB(396.4,I,0))
19 . S NODE2=$G(^DVB(396.3,+$P(NODE,"^",2),0))
20 . S DFN=+NODE2,RD=+$P(NODE2,"^",2)
21 . S ^DVB(396.4,"APE",DFN,X,RD,I)=""
22 Q
23 ;
24 ;
25EXAMKILL ; kill logic for .01 field of AMIE EXAM file
26 ; (loops through and kills APE x-refs in file 396.4)
27 ;
28 ; FM passes x=new value; da=ien
29 ;
30 ; uses I=loop counter,RD=request date,DFN=patient
31 ;
32 N I,DFN,NODE,NODE2,RD
33 S I=0
34 I $G(X)=""!($G(DA)="") Q
35 I '$D(ZTQUEUED) W !,"Killing APE x-refs with old name...please wait"
36 F S I=$O(^DVB(396.4,"F",DA,I)) Q:'I D
37 . S NODE=$G(^DVB(396.4,I,0))
38 . S NODE2=$G(^DVB(396.3,+$P(NODE,"^",2),0))
39 . S DFN=+NODE2,RD=+$P(NODE2,"^",2)
40 . K ^DVB(396.4,"APE",DFN,X,RD,I)
41 Q
Note: See TracBrowser for help on using the repository browser.