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

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1DGROAPI ;DJH/AMA - ROM EXTERNAL USER INTERFACE APIs ; 27 Apr 2004 4:42 PM
2 ;;5.3;Registration;**533,572**;Aug 13, 1993
3 ;
4 ;This routine contains API entry points that are used by packages
5 ;and modules that are external to the Register Once module.
6 ;
7 Q ;no direct entry
8 ;
9ROMQRY(DGDFN) ;query the LST for all patient demographic data
10 ;This function queries a given patient's Last Site Treated (LST)
11 ;site to retrieve all patient demographic data for the patient.
12 ;The function will only succeed when the QRY HL7 interface is
13 ;enabled, the patient has a national Integrated Control Number
14 ;(ICN), the patient's LST is not the local site and the HL7 query
15 ;receives an ACK from the LST site.
16 ;
17 ; Input:
18 ; DGDFN - pointer to patient in PATIENT (#2) file
19 ;
20 ; Output:
21 ; Function value - 1 on success, 0 on failure
22 ;
23 N DGRSLT,STRTIME,ENDTIME,ELAPTIME
24 S STRTIME=$P($H,",",2)
25 ;
26 S DGRSLT=$$SNDQRY^DGROHLS(DGDFN)
27 S ENDTIME=$P($H,",",2)
28 S ELAPTIME=ENDTIME-STRTIME
29 I DGRSLT=0&(ELAPTIME>59) D
30 . S DGMSG(1)=" "
31 . S DGMSG(2)="The connection to the Last Site Treated failed and timed out."
32 . S DGMSG(3)="Please continue with registration."
33 . S DGMSG(4)=" "
34 . D EN^DDIOL(.DGMSG)
35 ;
36 I DGRSLT D
37 . N ZTSAVE,A,ZTRTN,ZTDESC,ZTIO,ZTDTH,DGMSG
38 . ;Invoke IB Insurance Query (Patch IB*2.0*214)
39 . S ZTSAVE("IBTYPE")=1,ZTSAVE("DFN")=DGDFN,ZTSAVE("IBDUZ")=$G(DUZ)
40 . S ZTRTN="BACKGND^IBCNRDV"
41 . S ZTDTH=$H
42 . S ZTDESC="IBCN INSURANCE QUERY TASK"
43 . S ZTIO=""
44 . D ^%ZTLOAD
45 . ;display busy message to interactive users
46 . S DGMSG(2)="Insurance data retrieval has been initiated."
47 . S DGMSG(3)=" "
48 . D EN^DDIOL(.DGMSG) R A:5
49 Q DGRSLT
50 ;
Note: See TracBrowser for help on using the repository browser.