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

PSXCH.m

Go to the documentation of this file.
  1. PSXCH ;BIR/WPB-Routine to Change CMOP RX Suspense Dates ; [ 04/08/97 2:06 PM ]
  1. ;;2.0;CMOP;;11 Apr 97
  1. ;variable XOK is set based on the value of the CMOP indicator
  1. ;and directs processing in the PSOSUCHG routine so that the CMOP
  1. ;rxs are processed properly.
  1. P ;
  1. S PSXC=$P($G(^PS(52.5,SFN,0)),U,7),XOK=0
  1. I "QP"[PSXC S XOK=1 G RTN^PSOSUCHG
  1. I "LRX"[PSXC S MESS=$S(PSXC="L":"Rx is being transmitted to the CMOP and CAN NOT be edited.",(PSXC="X")!(PSXC="R"):"Rx has been transmitted to the CMOP and CAN NOT be edited.",1:0) W !,MESS
  1. I XOK=0 K X,Y,RXDATE,RXREC G:ACT="A" ALL^PSOSUCHG D:ACT="S" SPEC^PSOSUCHG
  1. Q
  1. AC ;
  1. K:"XRL"[PSXC ^PS(52.5,"AC",$P(^PS(52.5,SFN,0),"^",3),$P(^PS(52.5,SFN,0),"^",2),SFN)
  1. Q
  1. X ;
  1. S DA=SFN
  1. ;following hard kills kill off the old xref
  1. I PSXC="P" K ^PS(52.5,"AP",OLD,$P(^PS(52.5,DA,0),U,3),DA)
  1. I PSXC="Q" K ^PS(52.5,"AQ",OLD,$P(^PS(52.5,DA,0),U,3),DA)
  1. ;I PSXC="R" K ^PS(52.5,"AR",OLD,$P(^PS(52.5,DA,0),U,3),DA)
  1. S DA=SFN,DIK(1)="3^AP^AQ^AG",DIK="^PS(52.5," D EN^DIK K DIK,DA,DIK(1)
  1. I $G(PSXC)'="" K ^PS(52.5,"AC",$P(^PS(52.5,SFN,0),U,3),$P(^PS(52.5,SFN,0),U,2),SFN),PSXC,DA,XOK,SFN,MESS,OLD
  1. Q
  1. A ;
  1. S PSXC=$P($G(^PS(52.5,SFN,0)),U,7),XOK=0
  1. S:PSXC="" XOK=2
  1. S:(PSXC'="")&("QP"[PSXC) XOK=1
  1. D:XOK'=0 AC
  1. Q