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