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

PSOPOST1.m

Go to the documentation of this file.
  1. PSOPOST1 ;BHAM ISC/SAB - post routine to view status of background jobs ; 6/26/97
  1. ;;7.0;OUTPATIENT PHARMACY;**12,29,87**;DEC 1997
  1. ;External Ref. to ^ORD(101, is supp. by DBIA# 872
  1. K %ZIS,IOP,ZTSK S PSOION=ION,%ZIS="QM" D ^%ZIS K %ZIS I POP S IOP=PSOION D ^%ZIS K IOP G EX
  1. I $D(IO("Q")) D S IOP=PSOION D ^%ZIS G EX
  1. .S ZTDESC="Outpatient Pharmacy Background Job Status",ZTRTN="EN^PSOPOST1",ZTSAVE("ZTREQ")="@" D ^%ZTLOAD
  1. .W:$D(ZTSK) !,"Report Queued to Print!",! K X,Y,IO("Q"),ZTSK
  1. EN K DIC,DR,DA,DIQ,PSOPOST
  1. S DIC=59.7,DA=1,DR=".01;49.99;49.981;49.982",DIQ="PSOPOST" D EN^DIQ1
  1. Q
  1. I $G(PSOPOST(59.7,1,49.99))<7 D
  1. .K PSOPOST(59.7,1,49.981),PSOPOST(59.7,1,49.982),PSOPOST(59.7,1,49.983),PSOPOST(59.7,1,49.984)
  1. D NOW^%DTC S $P(LINE,"-",IOM)="-",HDR="Outpatient Pharmacy Background Job Status",Y=% X ^DD("DD")
  1. U IO W @IOF,!?1,HDR_" "_$P(Y,"@")_" "_$P(Y,"@",2)_" Page 1",!,LINE
  1. W !?17,"Site Name: "_PSOPOST(59.7,1,.01),!?1,"Current Version Installed: "_$G(PSOPOST(59.7,1,49.99)),!
  1. W !?1,"Background Conversion Job Started: "_$S($G(PSOPOST(59.7,1,49.981))]"":$P(PSOPOST(59.7,1,49.981),"@")_" "_$P(PSOPOST(59.7,1,49.981),"@",2),1:"Job Not Started Yet!")
  1. W !?21,"Job Completed: "_$S($G(PSOPOST(59.7,1,49.982))]"":$P(PSOPOST(59.7,1,49.982),"@")_" "_$P(PSOPOST(59.7,1,49.982),"@",2),1:"")
  1. EX D ^%ZISC K DIC,DR,DA,DIQ,PSOPOST,LINE,HDR,Y,X,%I,D0,PSOION
  1. Q
  1. OPT ;PSO*7.0*12 deletes PSO CANCEL protocol in preinstall
  1. S DA=$O(^ORD(101,"B","PSO CANCEL",0)) I DA S DIK="^ORD(101," D ^DIK K DIK,DA
  1. NDCM ;PSO*7*29 data conv. rout. to move data of field#11 NDC piece 13 from File 52.1(Refills) Node 0 to piece 3 of Node 1
  1. N V1,V2
  1. S V1=0 F S V1=$O(^PSRX(V1)) Q:'V1 S V2=0 F S V2=$O(^PSRX(V1,1,V2)) Q:'V2 S NDC=$P($G(^(V2,0)),"^",13) S:NDC]"" $P(^(1),"^",3)=NDC,$P(^(0),"^",13)=""
  1. Q
  1. NDC ;PSO*7.0*29 Pre-install, to remove field#11 (NDC) of file 52.1 (Refills) in order to increase the length of field#1.2 (Current Unit Price of Drug) from 99.999 to 999.9999
  1. S DIK="^DD(52.1,",DA=11,DA(1)=52.1 D ^DIK K DIK,DA
  1. Q
  1. NDCQ ;Post-install display
  1. W ! ;S DIR(0)="Y",DIR("B")="YES"
  1. W !,"In this patch field NDC (#11) in the REFILL sub-file (#52.1) is moved to"
  1. W !,"a new node within the multiple. The data in the old location can be moved to "
  1. W !,"it's new location now by selecting a time to queue the background job or can be"
  1. W !,"moved later by using the entry point NDCQ^PSOPOST1. This job can run at least"
  1. W !,"an hour or more depending on the amount of data that is in the PRESCRIPTION"
  1. W !,"file (#52). If you do not want to queue the background job at this time"
  1. W !,"enter '^' at the prompt."
  1. W !,"Be aware at this point that the cursor is hidden and the characters you enter"
  1. W !,"here will not be seen as the whole process is under the control of KIDS."
  1. NDCG ;PSO*7*29 post-install background bob Date/Time selection
  1. W ! K %DT D NOW^%DTC S %DT="RAEX",%DT(0)=%,%DT("A")="Queue Post-install Job to run Date/Time: "
  1. D ^%DT K %DT I $D(DTOUT)!(Y<0) G NDCX
  1. S ZTDTH=$G(Y),ZTIO="",ZTRTN="NDCM^PSOPOST1",ZTDESC="Outpatient Pharmacy V7 Patch 29 Data Conversion",ZTIO=""
  1. D ^%ZTLOAD W:$D(ZTSK)&('$D(ZTQUEUED)) !!,"Task Queued !",!
  1. Q
  1. NDCX W !!,"Task not queued !",!
  1. Q
  1. MISIG ;post install for PSO*7*87
  1. F RX=0:0 S RX=$O(^PSRX(RX)) Q:'RX I $G(^PSRX(RX,"SIG"))="^",$P($G(^("OR1")),"^",3) D
  1. .S RXN=$P(^PSRX(RX,"OR1"),"^",3) I $P($G(^PSRX(RXN,"SIG")),"^")]"" S ^PSRX(RX,"SIG")=^PSRX(RXN,"SIG") D EN^DDIOL(".","","?1")
  1. K RX,RXN
  1. Q