ABSPOSIB ; IHS/FCS/DRS - branching logic ; [ 09/12/2002 10:11 AM ]
;;1.0;PHARMACY POINT OF SALE;**1,3,6**;JUN 21, 2001;Build 38
Q
; Situation: after inputting NDC #, there are a number of
; pop-up pages which could appear. Process them in order.
; This is called from the Branching Logic of various places,
; starting with the NDC # prompt on the main page.
;
; When you detect a pop-up page that should be done,
; set DDSSTACK and it pops up the page.
; Then, at the bottom of that page, the branching logic will
; call this routine again, at an appropriate entry point,
; and DDSSTACK may be set again.
;
; When it's all done, DDSSTACK is not set in here
; and the main page comes back.
;
; /IHS/OKCAO/POC /IHS/ASDST/lwj 1/9/02 override codes are not
; working properly - call to NEWENTRY^ABSPOSIO at the THEASKS
; tag changed to call NEWENTR2 instead.
;
;-------------------------------------------------
;IHS/SD/lwj 7/14/03 new branching logic for the overrides added.
; This is done to accomodate the expanded override capabilities
; of NCPDP 5.1
;
;-------------------------------------------------
;
PAGE1 ;EP - Branching logic for Page 1, Block ABSP PAGE 1 BOTTOM,
; Field 3, NDC DISP.
; X = what the user just put in for NDC #
;
; Disable the Fill Date field. (It will reenabled on a case-by-case
; basis after inputting Prescription)
;
D UNED^DDSUTL(6,3,1,1) ; field order 6, block 3, page 1, disabled
;
; If POSTAGE, then branch to the POSTAGE page.
; (And later, the POSTAGE page will decide whether to do any of
; the subsequent pages, by DO POSTAGE^ABSPOSIB.)
I X="POSTAGE" S DDSSTACK=X Q
;
POSTAGE ;EP - Branching logic for bottom of POSTAGE page is here
;
; If any of the other "asks" are set: Insurance, Preauthorization,
; or Pricing - then pop up that page.
;
I $$DOPAGE^ABSPOSI7 S DDSSTACK="THE ASKS" Q
;
;
THEASKS ;EP - Branching logic for bottom of THE ASKS page is here
; IHS/OKCAO/POS IHS/ASDST/lwj 01/09/02 call to NEWENTRY
; remarked out - new call to NEWENTR2 added. This was done
; to fix the override codes which were not working.
;----
;IHS/SD/lwj 7/14/03 branching logic alter so new page of
; override questions is asked - this is to accomodate
; expanded 5.1 capabilities (NEWENTR2^ABSPOSIO is now
; called as part of the screen branching from page 13
; general overrides questions.)
;
I $$DOFIELD^ABSPOSI7(1.05) D
. ;D NEWENTRY^ABSPOSIO ;IHS/OKCAO/POC IHS/ASDST/lwj removed
. ;D NEWENTR2^ABSPOSIO ;IHS/OKCAO/POS IHS/ASDST/lwj added
. ;S DDSSTACK="NCPDP OVERRIDES" ;IHS/SD/lwj 7/14/03 removed
. S DDSSTACK="OVERRIDE ASKS" ;IHS/SD/lwj 7/14/03 new screen
. ;S DDSSTACK="DUR 5.1 ENTRY" ;IHS/SD/lwj 7/14/03 new screen
;
; Else no special branching; quit without setting DDSSTACK
Q
FILLDATE ; EP - from EFFECTS^ABSPOSI1 - after the Prescription field,
; This is the BRANCHING LOGIC for the PRESCRIPTION field ; ABSP*1.0T7*7
; should we go to the Fill Date field?
; Only if (1) the Fill Date field is enabled
; and (2) it is a prescription
; and (3) there are any refills.
I X="" S DDSBR=2 Q ; If PRESCRIPTION field empty, stay there. ; ABSP*1.0T7*7
N DOFILLDT,RXI
S DOFILLDT=$$DOFIELD^ABSPOSI7(1.04) ; the yes/no field must be "Yes"
I DOFILLDT S RXI=$$GET^DDSVAL(DIE,.DA,1.01,,"I") I 'RXI S DOFILLDT=0
I DOFILLDT S DOFILLDT=$O(^PSRX(RXI,1,0))>0
D UNED^DDSUTL(6,3,1,'DOFILLDT) ; field 6, block 3, page 1
I DOFILLDT S DDSBR=6 ; and branch to that field
Q
ABSPOSIB ; IHS/FCS/DRS - branching logic ; [ 09/12/2002 10:11 AM ]
+1 ;;1.0;PHARMACY POINT OF SALE;**1,3,6**;JUN 21, 2001;Build 38
+2 QUIT
+3 ; Situation: after inputting NDC #, there are a number of
+4 ; pop-up pages which could appear. Process them in order.
+5 ; This is called from the Branching Logic of various places,
+6 ; starting with the NDC # prompt on the main page.
+7 ;
+8 ; When you detect a pop-up page that should be done,
+9 ; set DDSSTACK and it pops up the page.
+10 ; Then, at the bottom of that page, the branching logic will
+11 ; call this routine again, at an appropriate entry point,
+12 ; and DDSSTACK may be set again.
+13 ;
+14 ; When it's all done, DDSSTACK is not set in here
+15 ; and the main page comes back.
+16 ;
+17 ; /IHS/OKCAO/POC /IHS/ASDST/lwj 1/9/02 override codes are not
+18 ; working properly - call to NEWENTRY^ABSPOSIO at the THEASKS
+19 ; tag changed to call NEWENTR2 instead.
+20 ;
+21 ;-------------------------------------------------
+22 ;IHS/SD/lwj 7/14/03 new branching logic for the overrides added.
+23 ; This is done to accomodate the expanded override capabilities
+24 ; of NCPDP 5.1
+25 ;
+26 ;-------------------------------------------------
+27 ;
PAGE1 ;EP - Branching logic for Page 1, Block ABSP PAGE 1 BOTTOM,
+1 ; Field 3, NDC DISP.
+2 ; X = what the user just put in for NDC #
+3 ;
+4 ; Disable the Fill Date field. (It will reenabled on a case-by-case
+5 ; basis after inputting Prescription)
+6 ;
+7 ; field order 6, block 3, page 1, disabled
DO UNED^DDSUTL(6,3,1,1)
+8 ;
+9 ; If POSTAGE, then branch to the POSTAGE page.
+10 ; (And later, the POSTAGE page will decide whether to do any of
+11 ; the subsequent pages, by DO POSTAGE^ABSPOSIB.)
+12 IF X="POSTAGE"
SET DDSSTACK=X
QUIT
+13 ;
POSTAGE ;EP - Branching logic for bottom of POSTAGE page is here
+1 ;
+2 ; If any of the other "asks" are set: Insurance, Preauthorization,
+3 ; or Pricing - then pop up that page.
+4 ;
+5 IF $$DOPAGE^ABSPOSI7
SET DDSSTACK="THE ASKS"
QUIT
+6 ;
+7 ;
THEASKS ;EP - Branching logic for bottom of THE ASKS page is here
+1 ; IHS/OKCAO/POS IHS/ASDST/lwj 01/09/02 call to NEWENTRY
+2 ; remarked out - new call to NEWENTR2 added. This was done
+3 ; to fix the override codes which were not working.
+4 ;----
+5 ;IHS/SD/lwj 7/14/03 branching logic alter so new page of
+6 ; override questions is asked - this is to accomodate
+7 ; expanded 5.1 capabilities (NEWENTR2^ABSPOSIO is now
+8 ; called as part of the screen branching from page 13
+9 ; general overrides questions.)
+10 ;
+11 IF $$DOFIELD^ABSPOSI7(1.05)
Begin DoDot:1
+12 ;D NEWENTRY^ABSPOSIO ;IHS/OKCAO/POC IHS/ASDST/lwj removed
+13 ;D NEWENTR2^ABSPOSIO ;IHS/OKCAO/POS IHS/ASDST/lwj added
+14 ;S DDSSTACK="NCPDP OVERRIDES" ;IHS/SD/lwj 7/14/03 removed
+15 ;IHS/SD/lwj 7/14/03 new screen
SET DDSSTACK="OVERRIDE ASKS"
+16 ;S DDSSTACK="DUR 5.1 ENTRY" ;IHS/SD/lwj 7/14/03 new screen
End DoDot:1
+17 ;
+18 ; Else no special branching; quit without setting DDSSTACK
+19 QUIT
FILLDATE ; EP - from EFFECTS^ABSPOSI1 - after the Prescription field,
+1 ; This is the BRANCHING LOGIC for the PRESCRIPTION field ; ABSP*1.0T7*7
+2 ; should we go to the Fill Date field?
+3 ; Only if (1) the Fill Date field is enabled
+4 ; and (2) it is a prescription
+5 ; and (3) there are any refills.
+6 ; If PRESCRIPTION field empty, stay there. ; ABSP*1.0T7*7
IF X=""
SET DDSBR=2
QUIT
+7 NEW DOFILLDT,RXI
+8 ; the yes/no field must be "Yes"
SET DOFILLDT=$$DOFIELD^ABSPOSI7(1.04)
+9 IF DOFILLDT
SET RXI=$$GET^DDSVAL(DIE,.DA,1.01,,"I")
IF 'RXI
SET DOFILLDT=0
+10 IF DOFILLDT
SET DOFILLDT=$ORDER(^PSRX(RXI,1,0))>0
+11 ; field 6, block 3, page 1
DO UNED^DDSUTL(6,3,1,'DOFILLDT)
+12 ; and branch to that field
IF DOFILLDT
SET DDSBR=6
+13 QUIT