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

PSX41PST.m

Go to the documentation of this file.
  1. PSX41PST ;BIR/PDW-New indexes in PSX patch 41, MOVE 550.1 INTO 550.21 ;08/12/2002
  1. ;;2.0;CMOP;**41**;11 Apr 97
  1. ;; Reference to ^PS(52.5, supported by DBIA #1978
  1. ;; Reference to ^PSOCMOP supported by DBIA #2476
  1. Q
  1. EN ;
  1. I ^XMB("NETNAME")?1"CMOP-".E Q
  1. D EN^PSX41NDX ; clear and build indexes in *41
  1. ;
  1. 5501 ; REMOVE ENTRIES FROM 550.1
  1. I ^XMB("NETNAME")?1"CMOP-".E Q
  1. K ^PSX(550.1) S ^PSX(550.1,0)="CMOP RX QUEUE^550.1^0^0"
  1. ;
  1. 5502 D COR5502
  1. D CMPNDX
  1. MSG ; print reminder to use Kernel tasking
  1. I ^XMB("NETNAME")?1"CMOP-".E Q
  1. W !
  1. F I=1:1 S X=$T(TXT+I) Q:X["END" W !,$P(X,";;",2)
  1. W !!,"^^^ PLEASE NOTE THE ABOVE ^^^^"
  1. W !,"Pausing 20 seconds" F I=1:1:20 W "." H 1
  1. Q
  1. TXT ;
  1. ;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  1. ;;
  1. ;;The following PSX options must be placed into the Option Scheduling File
  1. ;;using the Kernel Taskman menu Schedule/Unschedule Options.
  1. ;;
  1. ;; PSXR SCHEDULED CS TRANS
  1. ;; PSXR SCHEDULED NON-CS TRANS
  1. ;;
  1. ;;This must be done so they can be accessed through the CMOP menus.
  1. ;;
  1. ;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  1. ;;END
  1. Q
  1. COR5502 ;correct Total RXs field from PSX*2*41 v25
  1. S PSXDT=$O(^PSX(550.2,"D",3030325)) Q:'PSXDT
  1. S PSXTDA=$O(^PSX(550.2,"D",PSXDT,0))
  1. S BATDA=PSXTDA-.1 F S BATDA=$O(^PSX(550.2,BATDA)) Q:BATDA'>0 S XX=$P($G(^PSX(550.2,BATDA,1)),"^",8) I XX'=+XX,XX["5///" D
  1. . S TOTRX=$P(XX,"5///"),$P(^PSX(550.2,BATDA,1),"^",8)=TOTRX
  1. Q
  1. CMPNDX ; new compound index on CMOP Indicator "CMP"
  1. ;check "A_x" indexes to CMP index
  1. W !,"Updating the RX Suspense file's new 'CMP' index."
  1. W !,"Processing the AQ, AL, AX, AP indexes into the CMP index"
  1. F NDX="Q","L","X","P" D
  1. . S INDX="A"_NDX W !!,INDX
  1. . S SDT=0 F S SDT=$O(^PS(52.5,INDX,SDT)) Q:'SDT D
  1. .. S DFN=0 F S DFN=$O(^PS(52.5,INDX,SDT,DFN)) Q:'DFN D
  1. ... S REC=0 F S REC=$O(^PS(52.5,INDX,SDT,DFN,REC)) Q:'REC D
  1. .... S F=$G(^PS(52.5,REC,0))
  1. .... I 'F K ^PS(52.5,INDX,SDT,DFN,REC) Q ;bad index
  1. .... S TYP=$$CMPRXTYP^PSOCMOP(REC),CNT=$G(CNT)+1 I '(CNT#100) W "."
  1. .... F VP="RX^1","SDT0^2","DFN0^3","DIV^6","STAT^7" D PIECE(F,U,VP)
  1. .... I NDX=STAT,DFN=DFN0,SDT=SDT0
  1. .... E K ^PS(52.5,INDX,SDT,DFN,REC)
  1. .... I STAT'="",'$D(^PS(52.5,"CMP",STAT,TYP,DIV,SDT0,DFN,REC)) D
  1. ..... S ^PS(52.5,"CMP",NDX,TYP,DIV,SDT,DFN,REC)=""
  1. Q
  1. PIECE(REC,DLM,VP) ; VP="Variable^Piece" : S Variable=$P(REC,DLM,Piece)
  1. N V,P S V=$P(VP,DLM),P=$P(VP,DLM,2),@V=$P(REC,DLM,P)
  1. Q