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

PSOEPED.m

Go to the documentation of this file.
  1. PSOEPED ;JLI/FO-OAKLAND-RPC to handle epcs data changes ;7/29/21 09:53
  1. ;;7.0;OUTPATIENT PHARMACY;**545,735**;DEC 1997;Build 6
  1. ;Reference to DEA NUMBERS file (#8991.9) is supported by DBIA 7002
  1. ;Reference to XUEPCS DATA file (#8991.6) is supported by DBIA 7015
  1. ;Reference to XUEPCS PSDRPH AUDIT file (#8991.7) is supported by DBIA 7016
  1. ;Reference to KEYS sub-file (#200.051) is supported by DBIA 7054
  1. ;Reference to SIGN-ON LOG file (#3.081) is supported by ICR 7436
  1. Q
  1. ;
  1. ENTRY(RESULT,INPUT) ;.remoteprocedure
  1. NEW I,NOW
  1. SET NOW=$P($$HTE^XLFDT($H),":",1,2)
  1. FOR I=-1:0 SET I=$O(INPUT(I)) QUIT:I="" DO RECORD(INPUT(I),NOW)
  1. SET RESULT=1
  1. QUIT
  1. ;
  1. RECORD(LINE,NOW) ;
  1. N FDA,VALUE,IEN,MSG,I
  1. FOR I=1:1:5 SET VALUE=$P(LINE,U,I),FDA(8991.6,"+1,",(I/100))=VALUE
  1. SET FDA(8991.6,"+1,",.06)=NOW
  1. SET FDA(8991.6,"+1,",.07)=$P(LINE,U,6)
  1. SET FDA(8991.6,"+1,",.08)=$P(LINE,U,7)
  1. DO UPDATE^DIE("E","FDA","IEN","MSG")
  1. QUIT
  1. ;
  1. PRINT ; print audit logs as indicated
  1. NEW DIR,I,VAL,X,Y,BY,DIC,FLDS,L
  1. SET DIR(0)="S^"
  1. FOR I=1:1:6 SET X=$T(SORTTYPE+I),DIR(0)=DIR(0)_$SELECT(I>1:";",1:"")_I_":"_$PIECE(X,";",3),VAL(I)=$PIECE(X,";",4)
  1. SET DIR("A")="SORT BY" DO ^DIR IF +$GET(Y)'>0 QUIT
  1. SET BY=VAL(+Y),FLDS=".06,.01,.02,.03,.04,.05",DIC=8991.6,L="" DO EN1^DIP
  1. QUIT
  1. ;
  1. SORTTYPE ; specifies sort types for selection
  1. ;;Sort by Edited By then Date/time;.02,.06,.01
  1. ;;Sort by Edited By then User Edited;.02,.01,.06
  1. ;;Sort by Date/time then Edited By;.06,.02,.01
  1. ;;Sort by Date/time then User Edited;.06,.01,.02
  1. ;;Sort by User Edited then Edited By;.01,.02,.06
  1. ;;Sort by User Edited then Date;.01,.06,.02
  1. ; .01 .02 .06
  1. ; User Edited, Edited by, Date/Time Edited
  1. ;
  1. LASTCRED(RETURN,INDUZ) ; Get last CREDENTIAL TYPE field (#102) from SIGN-ON LOG file (#3.081)
  1. ; INPUT : INDUZ - User Internal Entry Number
  1. ; OUTPUT : Credential Code from Set of Codes
  1. ; 1 - AVCODES
  1. ; 2 - SSOI
  1. ; 3 - SSOE
  1. ; 4 - BSETOKEN
  1. ; 5 - CCOWTOKEN
  1. ; 6 - ASHTOKEN
  1. ; 7 - NHIN
  1. ; 8 - NONE
  1. ; 9 - UNKNOWN
  1. ;
  1. N CREDTM
  1. K RETURN S RETURN=8
  1. I '$G(INDUZ) S RETURN=9 Q
  1. I '$L($G(^VA(200,+INDUZ,0))) S RETURN=9 Q
  1. I INDUZ'=+$G(DUZ) Q
  1. S CREDTM=$G(DUZ("AUTHENTICATION"))
  1. S RETURN=$S(CREDTM="AVCODES":1,CREDTM="SSOI":2,CREDTM="SSOE":3,CREDTM="BSETOKEN":4,CREDTM="CCOWTOKEN":5,CREDTM="ASHTOKEN":6,CREDTM="NHIN":7,1:9)
  1. Q