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

BIRPC2.m

Go to the documentation of this file.
  1. BIRPC2 ;IHS/CMI/MWR - REMOTE PROCEDURE CALLS; MAY 10, 2010
  1. ;;8.5;IMMUNIZATION;;SEP 01,2011
  1. ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
  1. ;; RETURNS LISTS OF VACCINES, LOT NUMBERS, LOCATIONS FOR SELECTION.
  1. ;
  1. ;
  1. ;----------
  1. VACNAMS(BIGBL) ;EP
  1. ;---> Return list of available Vaccine Names delimited by
  1. ;---> "^" into 4 pieces:
  1. ;---> 1 - IEN of Vaccine Name.
  1. ;---> 2 - Vaccine Name Short in IMMUNIZATION File #9999999.14.
  1. ;---> 3 - Default Lot Number for this vaccine.
  1. ;---> 4 - Maximum Dose# for the vaccine.
  1. ;
  1. ;---> Parameters:
  1. ; 1 - BIGBL (ret) Result global for Broker (last node=||error).
  1. ;
  1. ;---> Generic Fileman file Lookup. (Can be called from client side.)
  1. N A,B,C,D,E,F,G
  1. S BIGBL=""
  1. ;
  1. S A=9999999.14 ;Immunization Table File.
  1. S B=".02;.04;.05" ;Fields to return w/each entry.
  1. ; ; IEN;Short Name;Default Lot#;
  1. ; ; Max in Vaccine Group (Series).
  1. S BIINPUT="" ;Retrieve all.
  1. S C="" ;Flags for lookup.
  1. S D="" ;Max number of entries (*=all).
  1. S E="B" ;Indexes to search.
  1. S F="I '$P(^AUTTIMM(Y,0),U,7)" ;Screen (Eliminate "Inactives".)
  1. ;
  1. D LOOKUP^BIXRPC(.BIGBL,A,B,C,BIINPUT,D,E,F)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. LOTNUMS(BIGBL,BIVAC) ;EP
  1. ;---> Return list of available Lot Numbers for the Vaccine passed.
  1. ;---> Delimited by "^" into 2 pieces:
  1. ;---> 1 - IEN of Lot Number.
  1. ;---> 2 - Lot Number (text).
  1. ;
  1. ;---> Parameters:
  1. ; 1 - BIGBL (ret) Result global for Broker (last node=||error).
  1. ; 2 - BIVAC (req) IEN of the Vaccine to match Lot Number on.
  1. ;
  1. S BIGBL=""
  1. ;
  1. ;---> If Vaccine IEN not provided, set Error Code and quit.
  1. I '$G(BIVAC) D Q
  1. .N BIERR S BIERR=""
  1. .;---> Get text of Error Code.
  1. .D ERRCD^BIUTL2(502,.BIERR)
  1. .;---> Set error text in temp global and quit.
  1. .D PASSERR^BIXRPC(.BIGBL,BIERR)
  1. ;
  1. ;---> Generic Fileman file Lookup. (Can be called from client side.)
  1. N A,B,C,D,E,F,G
  1. ;
  1. S A=9999999.41 ;Immunization Lot Number file.
  1. S B=".01;.02" ;Fields to return w/each entry.
  1. ; ; IEN;Lot Number;Manufacturer
  1. S BIINPUT="" ;Retrieve all.
  1. S C="" ;Flags for lookup.
  1. S D="" ;Max number of entries (*=all).
  1. S E="" ;Indexes to search.
  1. ; ;Only ACTIVE Lot Numbers for
  1. ; ;the Vaccine provided.
  1. S F="I $P(^AUTTIML(Y,0),U,3),$P(^(0),U,4)="_BIVAC
  1. ;
  1. D LOOKUP^BIXRPC(.BIGBL,A,B,C,BIINPUT,D,E,F)
  1. Q
  1. ;
  1. ;
  1. ;----------
  1. LOCATION(BIGBL,BIINPUT) ;EP
  1. ;---> Return list of available Locations for an Immunization visit.
  1. ;---> in the global @BIGBL. Each matching entry has a node in
  1. ;---> in @BIGBL. The last node contains the error delimiter
  1. ;---> BI31 and an error (text) if one exists.
  1. ;
  1. ;---> Parameters:
  1. ; 1 - BIGBL (ret) Result global for Broker (last node=||error).
  1. ; 2 - BIINPUT (opt) Input string to match Location on.
  1. ;
  1. ;---> Generic Fileman file Lookup. (Can be called from client side.)
  1. N A,B,C,D,E,F,G
  1. ;
  1. S A=9999999.06 ;IHS Location File.
  1. S B=".01;.04;.05;.07" ;Fields to return w/each entry.
  1. ; ;Return value for each entry:
  1. ; ; IEN;Name;State;Service Unit;Code
  1. S C="M" ;Flags for lookup.
  1. S D="20" ;Max number of entries (*=all).
  1. S E="B^C^D" ;Indexes to search.
  1. S F="I '$P(^AUTTLOC(Y,0),U,21)" ;Screen (Eliminate "Inactives".)
  1. S G=1 ;Mixed Case: 1=mixed, 0=no change
  1. ;
  1. D LOOKUP^BIXRPC(.BIGBL,A,B,C,BIINPUT,D,E,F,G)
  1. Q