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

ABSPOS6J.m

Go to the documentation of this file.
  1. ABSPOS6J ; IHS/FCS/DRS - user screen subrous ;
  1. ;;1.0;PHARMACY POINT OF SALE;**49**;JUN 21, 2001;Build 38
  1. Q
  1. ; first, ask "All users or just one user or one patient?"
  1. D FULL^VALM1
  1. N WHO,TIMEWIN,PAT,PATTIME,UPDFREQ,DIC,DA,Y,X,DTOUT,DUOUT
  1. W !
  1. HDR1 S X=$$SET^ABSPOSU3("Display for 1:One user or 2:All users or 3:One patient? ","1",0,"H","1:One user;2:All users;3:One patient")
  1. W !
  1. I X<1 G HDR8A
  1. ; Note: one user / one patient combination is not implemented
  1. ; If you choose one patient, you get them all, regardless of user,
  1. ; and the time window for weeding out old ones does not apply.
  1. I X=2 S WHO=0 G HDR3
  1. I X=3 S WHO=0 G HDRA ; and later come back to HDR88 or HDR8A
  1. HDR2 ; just one user - which one?
  1. S DIC=200,DIC(0)="AEMNQZ",DIC("A")="Select POS user: "
  1. S DIC("B")=$P(^VA(200,DUZ,0),U)
  1. ;S DIC("S")=screening, with Y=IEN, ^VA(200,Y,0) in naked
  1. D ^DIC W ! G HDR8A:$G(DUOUT)!$G(DTOUT),HDR1:Y<1 S WHO=+Y
  1. HDR3 ; time frame to keep patient on screen
  1. W !,"Enter the number of MINUTES, the length of time that",!
  1. W "completed transactions will be retained on the screen.",!
  1. S X=^TMP("ABSPOS",$J,"TIME"),X=$P(X,".",2),X=X_"000000" ; hhmmss0000
  1. S Y=$E(X,1,2)*60+$E(X,3,4)
  1. S X=$$FREETEXT^ABSPOSU2("Retention time: ",Y,1,1,6) W !
  1. I X<1 G HDR8A
  1. I X'?1N.N!(X>1439) W " ??" G HDR3
  1. S TIMEWIN="."_$TR($J(X\60,2)," ","0")_$TR($J(X#60,2)," ","0")
  1. HDR4 ; Frequency of updates in continuous update mode
  1. ; HDRA rejoins here
  1. S X=5 ; minimum allowed value for frequency
  1. W !,"Enter the number of SECONDS between updates when the display",!
  1. W "is in CONTINUOUS UPDATE MODE.",!
  1. S X=$$NUMERIC^ABSPOSU2("Seconds between updates: ",^TMP("ABSPOS",$J,"FREQ"),0,X,9999,0) W !
  1. I X'?1N.N G HDR8A
  1. S UPDFREQ=X
  1. HDR8 S ^TMP("ABSPOS",$J,"USER")=WHO
  1. I TIMEWIN'=^("TIME") S ^("TIME")=TIMEWIN,^("LAST UPDATE")=""
  1. S ^TMP("ABSPOS",$J,"FREQ")=UPDFREQ
  1. S ^TMP("ABSPOS",$J,"PATIENT")=0
  1. HDR88 W !,"Settings have been changed.",!
  1. ; at this point, shouldn't we wipe everything off and rebuild?
  1. N NODISPLY S NODISPLY=1 D UPD^ABSPOS6A
  1. G HDR9
  1. HDR8A W !,"No settings have been changed.",!
  1. HDR9 W "Done",! H 2
  1. S VALMBCK="R"
  1. Q
  1. HDRA ; display for which one patient?
  1. ; *ABSP*1.0T7*7* :
  1. ; Want to do the lookup with DUZ(2)=0 so as to be able to
  1. ; access all point of sale patients regardless of division.
  1. ; SAC 2.3.1.4.1 says this is okay so long as we reset DUZ(2)
  1. ; to its original value.
  1. N ABSPDUZ2,BBLIMIT S ABSPDUZ2=+$G(DUZ(2)),DUZ(2)=0 ; ABSP*1.0T7*7
  1. S DIC=2,DIC(0)="AEMQZ",DIC("A")="Prescriptions for which patient? "
  1. S DIC("S")="I $D(^ABSPT(""AC"",Y))"
  1. D ^DIC W !
  1. S DUZ(2)=ABSPDUZ2 ; Restore original DUZ(2) ; ABSP*1.0T7*7
  1. G HDR9:$G(DUOUT)!$G(DTOUT),HDRA:(Y<1) S PAT=+Y
  1. W !,"Enter the number of DAYS to go back to find"
  1. W !,"Point of Sale activity for ",$P(Y(0),U),"."
  1. W ! S X=^TMP("ABSPOS",$J,"PATIENT TIME")
  1. ; /IHS/OIT/RAM ; 16 OCT 2017 ; CR#09828 Changes the amount of time we can back-bill payers; change
  1. ; 1 year limit to a new field in the ABSP SETUP file with that parameter. Default is now 6 years.
  1. ; S BBLIMIT=$D(^ABSP(9002313.99,"BACKLIMIT")) ; Grab default from ABSP SETUP file.
  1. ; I BBLIMIT=0 S BBLIMIT=2192 ; If there is no value, set it to 6 years (in days).
  1. S BBLIMIT=365 ; 31 OCT 17 ; CR 9828 IS NOW ON HOLD; CHANGE BACK TO ORIGINAL 1 YEAR BEHAVIOUR.
  1. S X=$$NUMERIC^ABSPOSU2("Number of days: ",X,1,1,BBLIMIT) W !
  1. ; ; S X=$$NUMERIC^ABSPOSU2("Number of days: ",X,1,1,365) W !
  1. ; /IHS/OIT/RAM ; 16 OCT 2017 ; END OF CHANGES FOR CR#09828
  1. I X<1 G HDRA
  1. S PATTIME=X
  1. S ^TMP("ABSPOS",$J,"PATIENT")=PAT,^("PATIENT TIME")=PATTIME
  1. S ^TMP("ABSPOS",$J,"USER")=0
  1. G HDR88