source: FOIAVistA/tag/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOPOST1.m@ 636

Last change on this file since 636 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1PSOPOST1 ;BHAM ISC/SAB - post routine to view status of background jobs ; 6/26/97
2 ;;7.0;OUTPATIENT PHARMACY;**12,29,87**;DEC 1997
3 ;External Ref. to ^ORD(101, is supp. by DBIA# 872
4 K %ZIS,IOP,ZTSK S PSOION=ION,%ZIS="QM" D ^%ZIS K %ZIS I POP S IOP=PSOION D ^%ZIS K IOP G EX
5 I $D(IO("Q")) D S IOP=PSOION D ^%ZIS G EX
6 .S ZTDESC="Outpatient Pharmacy Background Job Status",ZTRTN="EN^PSOPOST1",ZTSAVE("ZTREQ")="@" D ^%ZTLOAD
7 .W:$D(ZTSK) !,"Report Queued to Print!",! K X,Y,IO("Q"),ZTSK
8EN K DIC,DR,DA,DIQ,PSOPOST
9 S DIC=59.7,DA=1,DR=".01;49.99;49.981;49.982",DIQ="PSOPOST" D EN^DIQ1
10 Q
11 I $G(PSOPOST(59.7,1,49.99))<7 D
12 .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)
13 D NOW^%DTC S $P(LINE,"-",IOM)="-",HDR="Outpatient Pharmacy Background Job Status",Y=% X ^DD("DD")
14 U IO W @IOF,!?1,HDR_" "_$P(Y,"@")_" "_$P(Y,"@",2)_" Page 1",!,LINE
15 W !?17,"Site Name: "_PSOPOST(59.7,1,.01),!?1,"Current Version Installed: "_$G(PSOPOST(59.7,1,49.99)),!
16 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!")
17 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:"")
18EX D ^%ZISC K DIC,DR,DA,DIQ,PSOPOST,LINE,HDR,Y,X,%I,D0,PSOION
19 Q
20OPT ;PSO*7.0*12 deletes PSO CANCEL protocol in preinstall
21 S DA=$O(^ORD(101,"B","PSO CANCEL",0)) I DA S DIK="^ORD(101," D ^DIK K DIK,DA
22NDCM ;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
23 N V1,V2
24 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)=""
25 Q
26NDC ;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
27 S DIK="^DD(52.1,",DA=11,DA(1)=52.1 D ^DIK K DIK,DA
28 Q
29NDCQ ;Post-install display
30 W ! ;S DIR(0)="Y",DIR("B")="YES"
31 W !,"In this patch field NDC (#11) in the REFILL sub-file (#52.1) is moved to"
32 W !,"a new node within the multiple. The data in the old location can be moved to "
33 W !,"it's new location now by selecting a time to queue the background job or can be"
34 W !,"moved later by using the entry point NDCQ^PSOPOST1. This job can run at least"
35 W !,"an hour or more depending on the amount of data that is in the PRESCRIPTION"
36 W !,"file (#52). If you do not want to queue the background job at this time"
37 W !,"enter '^' at the prompt."
38 W !,"Be aware at this point that the cursor is hidden and the characters you enter"
39 W !,"here will not be seen as the whole process is under the control of KIDS."
40NDCG ;PSO*7*29 post-install background bob Date/Time selection
41 W ! K %DT D NOW^%DTC S %DT="RAEX",%DT(0)=%,%DT("A")="Queue Post-install Job to run Date/Time: "
42 D ^%DT K %DT I $D(DTOUT)!(Y<0) G NDCX
43 S ZTDTH=$G(Y),ZTIO="",ZTRTN="NDCM^PSOPOST1",ZTDESC="Outpatient Pharmacy V7 Patch 29 Data Conversion",ZTIO=""
44 D ^%ZTLOAD W:$D(ZTSK)&('$D(ZTQUEUED)) !!,"Task Queued !",!
45 Q
46NDCX W !!,"Task not queued !",!
47 Q
48MISIG ;post install for PSO*7*87
49 F RX=0:0 S RX=$O(^PSRX(RX)) Q:'RX I $G(^PSRX(RX,"SIG"))="^",$P($G(^("OR1")),"^",3) D
50 .S RXN=$P(^PSRX(RX,"OR1"),"^",3) I $P($G(^PSRX(RXN,"SIG")),"^")]"" S ^PSRX(RX,"SIG")=^PSRX(RXN,"SIG") D EN^DDIOL(".","","?1")
51 K RX,RXN
52 Q
Note: See TracBrowser for help on using the repository browser.