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

ABSPOSIB.m

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