Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGROAPI

DGROAPI.m

Go to the documentation of this file.
  1. DGROAPI ;DJH/AMA - ROM EXTERNAL USER INTERFACE APIs ; 27 Apr 2004 4:42 PM
  1. ;;5.3;Registration;**533,572,1102**;Aug 13, 1993;Build 4
  1. ;
  1. ;This routine contains API entry points that are used by packages
  1. ;and modules that are external to the Register Once module.
  1. ;
  1. ; Reference to (#350.9,54.01) supported by ICR #7429
  1. ; Reference to BACKGND^IBCNRDV supported by ICR #4288
  1. Q ;no direct entry
  1. ;
  1. ROMQRY(DGDFN) ;query the LST for all patient demographic data
  1. ;This function queries a given patient's Last Site Treated (LST)
  1. ;site to retrieve all patient demographic data for the patient.
  1. ;The function will only succeed when the QRY HL7 interface is
  1. ;enabled, the patient has a national Integrated Control Number
  1. ;(ICN), the patient's LST is not the local site and the HL7 query
  1. ;receives an ACK from the LST site.
  1. ;
  1. ; Input:
  1. ; DGDFN - pointer to patient in PATIENT (#2) file
  1. ;
  1. ; Output:
  1. ; Function value - 1 on success, 0 on failure
  1. ;
  1. N DGRSLT,STRTIME,ENDTIME,ELAPTIME
  1. S STRTIME=$P($H,",",2)
  1. ;
  1. S DGRSLT=$$SNDQRY^DGROHLS(DGDFN)
  1. S ENDTIME=$P($H,",",2)
  1. S ELAPTIME=ENDTIME-STRTIME
  1. I DGRSLT=0&(ELAPTIME>59) D
  1. . S DGMSG(1)=" "
  1. . S DGMSG(2)="The connection to the Last Site Treated failed and timed out."
  1. . S DGMSG(3)="Please continue with registration."
  1. . S DGMSG(4)=" "
  1. . D EN^DDIOL(.DGMSG)
  1. ;
  1. I DGRSLT D
  1. . N ZTSAVE,A,ZTRTN,ZTDESC,ZTIO,ZTDTH,DGMSG
  1. . ;Invoke IB Insurance Query (Query was introduced with IB*2.0*214)
  1. . ;DG*1102/TAZ - Check Insurance Import Enabled flag
  1. . ; Reference to Field 54.01 in File 350.9 supported by ICR #7429
  1. . I '$$GET1^DIQ(350.9,"1,",54.01,"I") D Q
  1. .. S DGMSG(1)="Insurance data retrieval is not currently enabled."
  1. .. S DGMSG(2)=" "
  1. .. D EN^DDIOL(.DGMSG) R A:5
  1. . S ZTSAVE("IBTYPE")=1,ZTSAVE("DFN")=DGDFN,ZTSAVE("IBDUZ")=$G(DUZ)
  1. . S ZTRTN="BACKGND^IBCNRDV" ;Supported by ICR #4288
  1. . S ZTDTH=$H
  1. . S ZTDESC="IBCN INSURANCE QUERY TASK"
  1. . S ZTIO=""
  1. . D ^%ZTLOAD
  1. . ;display busy message to interactive users
  1. . S DGMSG(2)="Insurance data retrieval has been initiated."
  1. . S DGMSG(3)=" "
  1. . D EN^DDIOL(.DGMSG) R A:5
  1. Q DGRSLT
  1. ;