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

BHLIQUI.m

Go to the documentation of this file.
  1. BHLIQUI ; cmi/sitka/maw - BHL HL7 Immunization Query User Interface ;
  1. ;;3.01;BHL IHS Interfaces with GIS;;JUL 01, 2001
  1. ;
  1. ;this routine will generate a standard query message based upon
  1. ;the selected criteria. The message type being generated will depend
  1. ;upon the type of query. We will try to use defined query messages
  1. ;for each query. (ie. VXQ/V01, etc)
  1. ;
  1. MAIN ;-- this is the main routine driver
  1. K INA
  1. D REG
  1. D PT Q:$D(DUOUT)!($D(DTOUT)) Q:Y<0
  1. D DTR Q:$D(DIRUT)
  1. D REC Q:$D(DIRUT)
  1. K DIC,DIR,Y
  1. S X=$S(BHLREG:"BHL SEND IMMUNIZATION QUERY REGISTRY",1:"BHL SEND IMMUNIZATION QUERY"),DIC=101 D EN^XQOR
  1. D EOJ
  1. Q
  1. ;
  1. REG ;-- ask if this is going to a registry or not
  1. S DIR(0)="Y"
  1. S DIR("A")="Query a State Registry: "
  1. D ^DIR
  1. Q:Y<1
  1. S BHLREG=1
  1. Q
  1. ;
  1. ;
  1. PT ;-- get the patient
  1. S DIC=9000001,DIC(0)="AEMQZ",DIC("A")="Select Patient for Query: "
  1. D ^DIC
  1. Q:$D(DUOUT)!($D(DTOUT))
  1. Q:Y<0
  1. S INA("QNM",+Y)=$$VAL^XBDIQ1(2,+Y,.01)
  1. S BHLQDA=+Y
  1. K DIC
  1. Q
  1. ;support for multiples maybe later
  1. W !
  1. S DIR(0)="Y"
  1. S DIR("A")="Would you like to select an additional patient: "
  1. D ^DIR
  1. Q:Y<1
  1. S BHLQMPT=1
  1. G PT
  1. Q
  1. ;
  1. DTR ;-- get the date ranges
  1. W !
  1. S DIR(0)="Y",DIR("A")="Would like to specify a date range "
  1. D ^DIR
  1. Q:$D(DIRUT)
  1. Q:Y<1
  1. K DIR,Y
  1. W !
  1. S %DT="AE",%DT("A")="Select beginning date: "
  1. D ^%DT
  1. Q:Y<0
  1. S INA("QBDT")=+Y
  1. W !
  1. K %DT,Y
  1. S %DT="AE",%DT("A")="Select ending date: "
  1. D ^%DT
  1. Q:Y<0
  1. S INA("QEDT")=+Y
  1. K %DT,Y
  1. Q
  1. ;
  1. REC ;-- limit the query to number of records
  1. K DIR,Y
  1. W !
  1. S DIR(0)="N",DIR("A")="Please enter the number of responses "
  1. D ^DIR
  1. Q:$D(DIRUT)
  1. Q:Y<1
  1. S INA("QTY")=+Y
  1. K DIR,Y
  1. Q
  1. ;
  1. EOJ ;-- kill variables
  1. K BHLREG,BHLQDT,BHLQDA
  1. Q
  1. ;