BILOT ;IHS/CMI/MWR - EDIT LOT NUMBERS.; MAY 10, 2010
;;8.5;IMMUNIZATION;**9**;OCT 01,2014
;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
;; EDIT LOT NUMBER FIELDS.
; PATCH 2: Redisplay Message area (with # of Lots) in List Template. HELP1+5
; PATCH 9: Removed until perhaps Patch 10. Update help text. HELP+5
;
;
;
;----------
START ;EP
;---> Lookup Lot Numbers and edit their fields. vvv83
D SETVARS^BIUTL5 K ^TMP("BILOT",$J) N BICOLL,BISUBT,BITMP,BIINACT
S BISUBT="1:Unused Doses;2:Expiration Date;3:Lot Number"
S BISUBT=BISUBT_";4:Vaccine Name, then by Unused Doses"
S BISUBT=BISUBT_";5:Vaccine Name, then by Exp Date"
S BISUBT=BISUBT_";6:Vaccine Name, then by Lot Number"
;
;---> If Vaccine Table is not standard, display Error Text and quit.
I $D(^BISITE(-1)) D ERRCD^BIUTL2(503,,1) Q
;
D EN
D EXIT
Q
;
;
;----------
EN ;EP
D EN^VALM("BI LOT TABLE EDIT")
Q
;
;
;----------
PRINT ;EP
;---> Print Lot Number Table.
;---> Called by Protocol BI LOT NUMBER TABLE PRINT, which is the
;---> Print List Protocol for the List: BI LOT NUMBER TABLE EDIT.
;
D DEVICE(.BIPOP)
I $G(BIPOP) D RESET Q
;
D HDR(1),INIT^BILOT1
D PRTLST^BIUTL8("BILOT")
D RESET
Q
;
;
;----------
HDR(BIPRT) ;EP
;---> Header code for both Listman Screen and Print List.
;---> Parameters:
; 1 - BIPRT (opt) If BIPRT=1 array is for print: Change column
; header line and add Site Header line.
;
N BILINE,X,Y S BILINE=0 K VALMHDR
N BICRT S BICRT=$S(($E($G(IOST))="C")!(IOST["BROWSER"):1,1:0)
;
D WH^BIW(.BILINE)
S X=$$REPHDR^BIUTL6(DUZ(2)),BIDASH=$L(X)+2 D CENTERT^BIUTL5(.X)
D WH^BIW(.BILINE,X)
S X=$$SP^BIUTL5(BIDASH,"-") D CENTERT^BIUTL5(.X)
D WH^BIW(.BILINE,X)
;
S X="LOT NUMBER TABLE" S:'$G(BIPRT) X="EDIT "_X
D CENTERT^BIUTL5(.X)
S:BICRT X=IOINHI_X_IOINORM
D WH^BIW(.BILINE,X)
;
;---> Subtitle: indicate order of listing.
D:($G(BICOLL)&$D(BISUBT))
.N Y S Y=$P($P(BISUBT,BICOLL_":",2),";") S X=" (Listed by "_Y_")"
.D CENTERT^BIUTL5(.X) S:BICRT X=IOINHI_X_IOINORM D WH^BIW(.BILINE,X)
;
D:$G(BIPRT)
.S X=$$SP^BIUTL5(51)_"Printed: "_$$NOW^BIUTL5()
.D WH^BIW(.BILINE,X,1)
.S X=" # Lot Number Vaccine Status Exp Date Start Unused Facility"
.D WH^BIW(.BILINE,X)
Q
;
;
;----------
INIT ;EP
;---> Initialize variables and list array.
D INIT^BILOT1
Q
;
;
;----------
RESET ;EP
;---> Update partition for return to Listmanager.
I $D(VALMQUIT) S VALMBCK="Q" Q
D TERM^VALM0 S VALMBCK="R"
D INIT,HDR() Q
;
;
;----------
DEVICE(BIPOP) ;EP
;---> Get Device and possibly queue to Taskman.
;---> Parameters:
; 1 - BIPOP (ret) If error or Queue, BIPOP=1
;
K %ZIS,IOP S BIPOP=0
S ZTRTN="DEQUEUE^BILOT"
D ZSAVES^BIUTL3
D ZIS^BIUTL2(.BIPOP,1)
Q
;
;
;----------
DEQUEUE ;EP
;---> Print Patient Data screen.
D HDR(1),INIT^BILOT1
D PRTLST^BIUTL8("BILOT"),EXIT
Q
;
;
;----------
HELP ;EP
;---> Help code.
N BIX S BIX=X
D FULL^VALM1
W !!?5,"Enter ""A"" to add or edit a Lot Number, enter ""S"" to Select a Lot"
W !?5,"Number from the left column, enter ""C"" to change the order of the list,"
W !?5,"""S"" to Search for a particular Lot Number, ""D"" to include Inactive Lot"
W !?5,"enter ""I"" to Inactivate expired Lot Numbers, and enter ""H"" to view"
W !?5,"the full help text for the lot number list and its parameters."
D DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
D:BIX'="??" RE^VALM4
Q
;
;
;----------
HELPNEXT ;EP
;
;********** PATCH 10?, v8.5, OCT 01,2014, IHS/CMI/MWR
;---> Requested removed from Patch 9 by Michelle Ruslavage. Possibly include
;---> in next patch.
;---> Update help text below to include new actions from patch.
;---> Help code.
N BIX S BIX=X
D FULL^VALM1
W !!?5,"Enter ""A"" to add or edit a Lot Number, enter ""E"" to select and Edit a Lot"
W !?5,"Number from the left column, enter ""C"" to change the order of the list,"
W !?5,"""S"" to Search for a particular Lot Number, ""D"" to include Inactive Lot"
W !?5,"Numbers in the display (will appear after all Active Lot Numbers),"
W !?5,"enter ""I"" to Inactivate expired Lot Numbers, and enter ""H"" to view"
W !?5,"the full help text for the lot number list and its parameters."
D DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
D:BIX'="??" RE^VALM4
Q
;**********
;
;
;----------
HELP1 ;EP
;----> Explanation of this report.
N BITEXT D TEXT1(.BITEXT)
D START^BIHELP("EDIT LOT NUMBERS - HELP",.BITEXT)
;
;********** PATCH 2, v8.5, MAY 15,2012, IHS/CMI/MWR
;---> Redisplay Message area (with number of Lots) in List Template.
D RESET^BILOT1
;**********
Q
;
; vvv83
;----------
TEXT1(BITEXT) ;EP
;;
;;This screen allows you to add and edit the eight fields of Lot Numbers.
;;
;;NOTE: To show INACTIVE Lot Numbers, select "D Display Inactives."
;;
;;To Add a new Lot Number, type "A". If the Lot Number already exists in
;;the Table, a message will display, directIng you select that Lot Number
;;for editing.
;;
;;To edit an existing Lot Number type "E" and then select the left column
;;number that corresponds to the Lot Number you wish to edit.
;;
;;You may also SEARCH the entire list for any number, name, or combination
;;of characters by usinng the "S Search List" action.
;;
;;You may list the Lots in a variety of manners by using the "C Change List"
;;action.
;;
;;Lastly, you may automatically inactivate ALL Lot Numbers that either
;;have expired or have no expiration date, by typing "I".
;;
;;The fields for each Lot Number are:
;;
;;Vaccine - This is the vaccine to which the Lot Number is assigned.
;; A Vaccine is REQUIRED when entering a New Lot Number.
;;
;;Manufacturer (MVX) - This is the standard CDC/HL7 Manufacturer Code
;; assigned to the company that produced the Lot. Enter ?? in order
;; to view the entire Manufacturer Code list.
;; A Manufacturer is REQUIRED when entering a New Lot Number.
;;
;;Status - If a Lot Number is set to "Inactive", users will not be
;; able to select it when entering NEW patient immunizations for this.
;; vaccine. However, previous immunizations with this Lot Number will
;; continue to show up on the patient histories.
;;
;;Source - Choice are VFC, Other State, or IHS/Tribal,.
;;
;;NDC Code - This is the NDC on the box or vial for this lot. Available
;; NDC's are limited by virtue of the particular vaccine chosen for
;; this lot number.
;;
;;Expiration Date - This is the date that the Lot expires.
;;
;;Starting Count - Total number of doses in the starting inventory for
;; the Lot when it was first received.
;;
;;Doses Unused - Number of doses of a lot remaining or unused.
;; This number will decrease each time an immunization of that Lot Number
;; is entered into RPMS through the Immunization package or data entry.
;; The pharmacist or user can also reset this number if it becomes
;; incorrect, such as might occur with wasted doses, data entry errors,
;; etc.
;;
;; NOTE: This number may become NEGATIVE. A negative number for the
;; Doses Unused would indicate that deletions, data entry errors, or
;; testing have caused the number to become negative by mere subtraction
;; each time it is used in the computer--even if it has not actually
;; been used clinically. Therefore, it is entirely appropriate for
;; the vaccine manager or pharmacist to correct the Doses Unused
;; in order to have it accurately reflect the number of doses that are
;; still unused in the inventory (in other words, sitting on the shelf).
;;
;;Doses Used - This is merely a the Doses Unused subtracted from the
;; Starting Count.
;;
;;Vaccine Source - VFC or non-VFC. Note: If there are two issues of the
;; same lot, and one issue is VFC and the other is not VFC, it may
;; be helpful the create a new lot for the VFC issue and give it the
;; same lot number but append "-vfc" to the end. This way, the two
;; issues can be tracked, inventoried, and reported on separately
;; (yet easily identified by the common, original lot number).
;;
;;Low Supply Alert - During entry of immunizations, if the number of Unused
;; Doses falls below the Low Supply Alert for this Lot Number, an alert
;; will be displayed.
;;
;;Health Care Facility - Adding a Health Care Facility to a Lot Number will
;; will cause that Lot Number to become unavailable for any user who is
;; NOT logged on to the named Facility.
;;
;; In general, there is NO NEED to assign Lot Numbers to specific
;; Facilities. However, if more than one Facility uses the same
;; computer (dialing in from remote sites), then it may be desirable
;; to assign Lot Numbers to specific Facilities. That way, users from
;; another Facility will be prevented from erroneously using a Lot
;; Number that is not at their Facility.
;;
;; In cases where a Lot Number is truly shared by multiple Facilities
;; all using the same computer, it may be desirable to create "sub-Lots"
;; by appending "-a", "-b", "-c", etc. to the Lot Number. For example,
;; Facility A would get "#1234-a", Facility B would get "#1234-b",
;; Facility C would get "#1234-c", and so on.
;;
;; This would enable the manager or pharmacist to assign a Starting Amount
;; for each "sub-Lot" to each Facility and ensure that the inventory at
;; each site individually is accurate.
;;
;;
D LOADTX("TEXT1",,.BITEXT)
Q
;
;
;----------
LOADTX(BILINL,BITAB,BITEXT) ;EP
Q:$G(BILINL)=""
N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" S BITEXT(I)=T_$P(X,";;",2)
Q
;
;
;----------
TEXT3 ;EP
;;
;;This option will automatically INACTIVATE ALL Lot Numbers that
;;have EXPIRED (an Expiration Date prior to today).
;;
;;It will also automatically INACTIVATE ALL Lot Numbers that have
;;NO Expiration Date (as viewed in the Lot Number Table).
;;
;; Note: You can REACTIVATE any Lot Number individually at any time
;; by editing the Lot Number individually from the Edit Lot Numbers
;; Screen (and resetting the Active Field for that Lot Number).
;;
;;Do you wish to INACTIVATE ALL Lot Numbers that either have EXPIRED
;;or have NO Expiration Date?
;;
D PRINTX("TEXT3")
Q
;
;
;----------
TEXT33 ;EP
;;
;;Okay.
;;Please confirm that you wish Inactivate all Lot Numbers that
;;either have EXPIRED or have NO Expiration Eate, by typing "YES"
;;a second time. (Enter NO to discontinue this process.)
;;
D PRINTX("TEXT33")
Q
;
;
;----------
PRINTX(BILINL,BITAB) ;EP
Q:$G(BILINL)=""
N I,T,X S T="" S:'$D(BITAB) BITAB=5 F I=1:1:BITAB S T=T_" "
F I=1:1 S X=$T(@BILINL+I) Q:X'[";;" W !,T,$P(X,";;",2)
Q
;
;
;----------
EXIT ;EP
;---> End of job cleanup.
D KILLALL^BIUTL8()
K ^TMP("BILOT",$J)
D CLEAR^VALM1
D FULL^VALM1
Q
BILOT ;IHS/CMI/MWR - EDIT LOT NUMBERS.; MAY 10, 2010
+1 ;;8.5;IMMUNIZATION;**9**;OCT 01,2014
+2 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
+3 ;; EDIT LOT NUMBER FIELDS.
+4 ; PATCH 2: Redisplay Message area (with # of Lots) in List Template. HELP1+5
+5 ; PATCH 9: Removed until perhaps Patch 10. Update help text. HELP+5
+6 ;
+7 ;
+8 ;
+9 ;----------
START ;EP
+1 ;---> Lookup Lot Numbers and edit their fields. vvv83
+2 DO SETVARS^BIUTL5
KILL ^TMP("BILOT",$JOB)
NEW BICOLL,BISUBT,BITMP,BIINACT
+3 SET BISUBT="1:Unused Doses;2:Expiration Date;3:Lot Number"
+4 SET BISUBT=BISUBT_";4:Vaccine Name, then by Unused Doses"
+5 SET BISUBT=BISUBT_";5:Vaccine Name, then by Exp Date"
+6 SET BISUBT=BISUBT_";6:Vaccine Name, then by Lot Number"
+7 ;
+8 ;---> If Vaccine Table is not standard, display Error Text and quit.
+9 IF $DATA(^BISITE(-1))
DO ERRCD^BIUTL2(503,,1)
QUIT
+10 ;
+11 DO EN
+12 DO EXIT
+13 QUIT
+14 ;
+15 ;
+16 ;----------
EN ;EP
+1 DO EN^VALM("BI LOT TABLE EDIT")
+2 QUIT
+3 ;
+4 ;
+5 ;----------
PRINT ;EP
+1 ;---> Print Lot Number Table.
+2 ;---> Called by Protocol BI LOT NUMBER TABLE PRINT, which is the
+3 ;---> Print List Protocol for the List: BI LOT NUMBER TABLE EDIT.
+4 ;
+5 DO DEVICE(.BIPOP)
+6 IF $GET(BIPOP)
DO RESET
QUIT
+7 ;
+8 DO HDR(1)
DO INIT^BILOT1
+9 DO PRTLST^BIUTL8("BILOT")
+10 DO RESET
+11 QUIT
+12 ;
+13 ;
+14 ;----------
HDR(BIPRT) ;EP
+1 ;---> Header code for both Listman Screen and Print List.
+2 ;---> Parameters:
+3 ; 1 - BIPRT (opt) If BIPRT=1 array is for print: Change column
+4 ; header line and add Site Header line.
+5 ;
+6 NEW BILINE,X,Y
SET BILINE=0
KILL VALMHDR
+7 NEW BICRT
SET BICRT=$SELECT(($EXTRACT($GET(IOST))="C")!(IOST["BROWSER"):1,1:0)
+8 ;
+9 DO WH^BIW(.BILINE)
+10 SET X=$$REPHDR^BIUTL6(DUZ(2))
SET BIDASH=$LENGTH(X)+2
DO CENTERT^BIUTL5(.X)
+11 DO WH^BIW(.BILINE,X)
+12 SET X=$$SP^BIUTL5(BIDASH,"-")
DO CENTERT^BIUTL5(.X)
+13 DO WH^BIW(.BILINE,X)
+14 ;
+15 SET X="LOT NUMBER TABLE"
IF '$GET(BIPRT)
SET X="EDIT "_X
+16 DO CENTERT^BIUTL5(.X)
+17 IF BICRT
SET X=IOINHI_X_IOINORM
+18 DO WH^BIW(.BILINE,X)
+19 ;
+20 ;---> Subtitle: indicate order of listing.
+21 IF ($GET(BICOLL)&$DATA(BISUBT))
Begin DoDot:1
+22 NEW Y
SET Y=$PIECE($PIECE(BISUBT,BICOLL_":",2),";")
SET X=" (Listed by "_Y_")"
+23 DO CENTERT^BIUTL5(.X)
IF BICRT
SET X=IOINHI_X_IOINORM
DO WH^BIW(.BILINE,X)
End DoDot:1
+24 ;
+25 IF $GET(BIPRT)
Begin DoDot:1
+26 SET X=$$SP^BIUTL5(51)_"Printed: "_$$NOW^BIUTL5()
+27 DO WH^BIW(.BILINE,X,1)
+28 SET X=" # Lot Number Vaccine Status Exp Date Start Unused Facility"
+29 DO WH^BIW(.BILINE,X)
End DoDot:1
+30 QUIT
+31 ;
+32 ;
+33 ;----------
INIT ;EP
+1 ;---> Initialize variables and list array.
+2 DO INIT^BILOT1
+3 QUIT
+4 ;
+5 ;
+6 ;----------
RESET ;EP
+1 ;---> Update partition for return to Listmanager.
+2 IF $DATA(VALMQUIT)
SET VALMBCK="Q"
QUIT
+3 DO TERM^VALM0
SET VALMBCK="R"
+4 DO INIT
DO HDR()
QUIT
+5 ;
+6 ;
+7 ;----------
DEVICE(BIPOP) ;EP
+1 ;---> Get Device and possibly queue to Taskman.
+2 ;---> Parameters:
+3 ; 1 - BIPOP (ret) If error or Queue, BIPOP=1
+4 ;
+5 KILL %ZIS,IOP
SET BIPOP=0
+6 SET ZTRTN="DEQUEUE^BILOT"
+7 DO ZSAVES^BIUTL3
+8 DO ZIS^BIUTL2(.BIPOP,1)
+9 QUIT
+10 ;
+11 ;
+12 ;----------
DEQUEUE ;EP
+1 ;---> Print Patient Data screen.
+2 DO HDR(1)
DO INIT^BILOT1
+3 DO PRTLST^BIUTL8("BILOT")
DO EXIT
+4 QUIT
+5 ;
+6 ;
+7 ;----------
HELP ;EP
+1 ;---> Help code.
+2 NEW BIX
SET BIX=X
+3 DO FULL^VALM1
+4 WRITE !!?5,"Enter ""A"" to add or edit a Lot Number, enter ""S"" to Select a Lot"
+5 WRITE !?5,"Number from the left column, enter ""C"" to change the order of the list,"
+6 WRITE !?5,"""S"" to Search for a particular Lot Number, ""D"" to include Inactive Lot"
+7 WRITE !?5,"enter ""I"" to Inactivate expired Lot Numbers, and enter ""H"" to view"
+8 WRITE !?5,"the full help text for the lot number list and its parameters."
+9 DO DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
+10 IF BIX'="??"
DO RE^VALM4
+11 QUIT
+12 ;
+13 ;
+14 ;----------
HELPNEXT ;EP
+1 ;
+2 ;********** PATCH 10?, v8.5, OCT 01,2014, IHS/CMI/MWR
+3 ;---> Requested removed from Patch 9 by Michelle Ruslavage. Possibly include
+4 ;---> in next patch.
+5 ;---> Update help text below to include new actions from patch.
+6 ;---> Help code.
+7 NEW BIX
SET BIX=X
+8 DO FULL^VALM1
+9 WRITE !!?5,"Enter ""A"" to add or edit a Lot Number, enter ""E"" to select and Edit a Lot"
+10 WRITE !?5,"Number from the left column, enter ""C"" to change the order of the list,"
+11 WRITE !?5,"""S"" to Search for a particular Lot Number, ""D"" to include Inactive Lot"
+12 WRITE !?5,"Numbers in the display (will appear after all Active Lot Numbers),"
+13 WRITE !?5,"enter ""I"" to Inactivate expired Lot Numbers, and enter ""H"" to view"
+14 WRITE !?5,"the full help text for the lot number list and its parameters."
+15 DO DIRZ^BIUTL3(""," Press ENTER/RETURN to continue")
+16 IF BIX'="??"
DO RE^VALM4
+17 QUIT
+18 ;**********
+19 ;
+20 ;
+21 ;----------
HELP1 ;EP
+1 ;----> Explanation of this report.
+2 NEW BITEXT
DO TEXT1(.BITEXT)
+3 DO START^BIHELP("EDIT LOT NUMBERS - HELP",.BITEXT)
+4 ;
+5 ;********** PATCH 2, v8.5, MAY 15,2012, IHS/CMI/MWR
+6 ;---> Redisplay Message area (with number of Lots) in List Template.
+7 DO RESET^BILOT1
+8 ;**********
+9 QUIT
+10 ;
+11 ; vvv83
+12 ;----------
TEXT1(BITEXT) ;EP
+1 ;;
+2 ;;This screen allows you to add and edit the eight fields of Lot Numbers.
+3 ;;
+4 ;;NOTE: To show INACTIVE Lot Numbers, select "D Display Inactives."
+5 ;;
+6 ;;To Add a new Lot Number, type "A". If the Lot Number already exists in
+7 ;;the Table, a message will display, directIng you select that Lot Number
+8 ;;for editing.
+9 ;;
+10 ;;To edit an existing Lot Number type "E" and then select the left column
+11 ;;number that corresponds to the Lot Number you wish to edit.
+12 ;;
+13 ;;You may also SEARCH the entire list for any number, name, or combination
+14 ;;of characters by usinng the "S Search List" action.
+15 ;;
+16 ;;You may list the Lots in a variety of manners by using the "C Change List"
+17 ;;action.
+18 ;;
+19 ;;Lastly, you may automatically inactivate ALL Lot Numbers that either
+20 ;;have expired or have no expiration date, by typing "I".
+21 ;;
+22 ;;The fields for each Lot Number are:
+23 ;;
+24 ;;Vaccine - This is the vaccine to which the Lot Number is assigned.
+25 ;; A Vaccine is REQUIRED when entering a New Lot Number.
+26 ;;
+27 ;;Manufacturer (MVX) - This is the standard CDC/HL7 Manufacturer Code
+28 ;; assigned to the company that produced the Lot. Enter ?? in order
+29 ;; to view the entire Manufacturer Code list.
+30 ;; A Manufacturer is REQUIRED when entering a New Lot Number.
+31 ;;
+32 ;;Status - If a Lot Number is set to "Inactive", users will not be
+33 ;; able to select it when entering NEW patient immunizations for this.
+34 ;; vaccine. However, previous immunizations with this Lot Number will
+35 ;; continue to show up on the patient histories.
+36 ;;
+37 ;;Source - Choice are VFC, Other State, or IHS/Tribal,.
+38 ;;
+39 ;;NDC Code - This is the NDC on the box or vial for this lot. Available
+40 ;; NDC's are limited by virtue of the particular vaccine chosen for
+41 ;; this lot number.
+42 ;;
+43 ;;Expiration Date - This is the date that the Lot expires.
+44 ;;
+45 ;;Starting Count - Total number of doses in the starting inventory for
+46 ;; the Lot when it was first received.
+47 ;;
+48 ;;Doses Unused - Number of doses of a lot remaining or unused.
+49 ;; This number will decrease each time an immunization of that Lot Number
+50 ;; is entered into RPMS through the Immunization package or data entry.
+51 ;; The pharmacist or user can also reset this number if it becomes
+52 ;; incorrect, such as might occur with wasted doses, data entry errors,
+53 ;; etc.
+54 ;;
+55 ;; NOTE: This number may become NEGATIVE. A negative number for the
+56 ;; Doses Unused would indicate that deletions, data entry errors, or
+57 ;; testing have caused the number to become negative by mere subtraction
+58 ;; each time it is used in the computer--even if it has not actually
+59 ;; been used clinically. Therefore, it is entirely appropriate for
+60 ;; the vaccine manager or pharmacist to correct the Doses Unused
+61 ;; in order to have it accurately reflect the number of doses that are
+62 ;; still unused in the inventory (in other words, sitting on the shelf).
+63 ;;
+64 ;;Doses Used - This is merely a the Doses Unused subtracted from the
+65 ;; Starting Count.
+66 ;;
+67 ;;Vaccine Source - VFC or non-VFC. Note: If there are two issues of the
+68 ;; same lot, and one issue is VFC and the other is not VFC, it may
+69 ;; be helpful the create a new lot for the VFC issue and give it the
+70 ;; same lot number but append "-vfc" to the end. This way, the two
+71 ;; issues can be tracked, inventoried, and reported on separately
+72 ;; (yet easily identified by the common, original lot number).
+73 ;;
+74 ;;Low Supply Alert - During entry of immunizations, if the number of Unused
+75 ;; Doses falls below the Low Supply Alert for this Lot Number, an alert
+76 ;; will be displayed.
+77 ;;
+78 ;;Health Care Facility - Adding a Health Care Facility to a Lot Number will
+79 ;; will cause that Lot Number to become unavailable for any user who is
+80 ;; NOT logged on to the named Facility.
+81 ;;
+82 ;; In general, there is NO NEED to assign Lot Numbers to specific
+83 ;; Facilities. However, if more than one Facility uses the same
+84 ;; computer (dialing in from remote sites), then it may be desirable
+85 ;; to assign Lot Numbers to specific Facilities. That way, users from
+86 ;; another Facility will be prevented from erroneously using a Lot
+87 ;; Number that is not at their Facility.
+88 ;;
+89 ;; In cases where a Lot Number is truly shared by multiple Facilities
+90 ;; all using the same computer, it may be desirable to create "sub-Lots"
+91 ;; by appending "-a", "-b", "-c", etc. to the Lot Number. For example,
+92 ;; Facility A would get "#1234-a", Facility B would get "#1234-b",
+93 ;; Facility C would get "#1234-c", and so on.
+94 ;;
+95 ;; This would enable the manager or pharmacist to assign a Starting Amount
+96 ;; for each "sub-Lot" to each Facility and ensure that the inventory at
+97 ;; each site individually is accurate.
+98 ;;
+99 ;;
+100 DO LOADTX("TEXT1",,.BITEXT)
+101 QUIT
+102 ;
+103 ;
+104 ;----------
LOADTX(BILINL,BITAB,BITEXT) ;EP
+1 IF $GET(BILINL)=""
QUIT
+2 NEW I,T,X
SET T=""
IF '$DATA(BITAB)
SET BITAB=5
FOR I=1:1:BITAB
SET T=T_" "
+3 FOR I=1:1
SET X=$TEXT(@BILINL+I)
IF X'[";;"
QUIT
SET BITEXT(I)=T_$PIECE(X,";;",2)
+4 QUIT
+5 ;
+6 ;
+7 ;----------
TEXT3 ;EP
+1 ;;
+2 ;;This option will automatically INACTIVATE ALL Lot Numbers that
+3 ;;have EXPIRED (an Expiration Date prior to today).
+4 ;;
+5 ;;It will also automatically INACTIVATE ALL Lot Numbers that have
+6 ;;NO Expiration Date (as viewed in the Lot Number Table).
+7 ;;
+8 ;; Note: You can REACTIVATE any Lot Number individually at any time
+9 ;; by editing the Lot Number individually from the Edit Lot Numbers
+10 ;; Screen (and resetting the Active Field for that Lot Number).
+11 ;;
+12 ;;Do you wish to INACTIVATE ALL Lot Numbers that either have EXPIRED
+13 ;;or have NO Expiration Date?
+14 ;;
+15 DO PRINTX("TEXT3")
+16 QUIT
+17 ;
+18 ;
+19 ;----------
TEXT33 ;EP
+1 ;;
+2 ;;Okay.
+3 ;;Please confirm that you wish Inactivate all Lot Numbers that
+4 ;;either have EXPIRED or have NO Expiration Eate, by typing "YES"
+5 ;;a second time. (Enter NO to discontinue this process.)
+6 ;;
+7 DO PRINTX("TEXT33")
+8 QUIT
+9 ;
+10 ;
+11 ;----------
PRINTX(BILINL,BITAB) ;EP
+1 IF $GET(BILINL)=""
QUIT
+2 NEW I,T,X
SET T=""
IF '$DATA(BITAB)
SET BITAB=5
FOR I=1:1:BITAB
SET T=T_" "
+3 FOR I=1:1
SET X=$TEXT(@BILINL+I)
IF X'[";;"
QUIT
WRITE !,T,$PIECE(X,";;",2)
+4 QUIT
+5 ;
+6 ;
+7 ;----------
EXIT ;EP
+1 ;---> End of job cleanup.
+2 DO KILLALL^BIUTL8()
+3 KILL ^TMP("BILOT",$JOB)
+4 DO CLEAR^VALM1
+5 DO FULL^VALM1
+6 QUIT