source: WorldVistAEHR/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDFPE1.m@ 623

Last change on this file since 623 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.0 KB
Line 
1IBDFPE1 ;MAF/ALB - ENCOUNTER FORMS QUEUEING PARAMETERS DISPLAY CONT.; 1 31 94
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;**15**;APR 24, 1997
3EDT ; -- Edit Parameter Groups
4 N IBDVALM,IBDAT,VALMY
5 S VALMBCK=""
6 D EN^VALM2($G(XQORNOD(0))) G REP:'$O(VALMY(0)) S IBDVALM=0
7 D FULL^VALM1 S VALMBCK="R"
8 F IBDVALM=0:0 S IBDVALM=$O(VALMY(IBDVALM)) Q:'IBDVALM S DA=$S($D(IBDTYPE(IBDVALM)):$P(IBDTYPE(IBDVALM),"^",1),1:"") I DA]"" D
9 .S DA(1)=1,DIE="^IBD(357.09,"_DA(1)_","_"""Q"""_",",DA=DA,DR=".01;.04:.1;.13" D ^DIE K DA,DIE,DIC,DR
10 D REP Q
11 ;
12 ;
13ADD ; -- Add New Print Parameters
14 D FULL^VALM1
15 N DLAYGO
16 I '$O(^IBD(357.09,0))!($O(^IBD(357.09,0))&'$D(^IBD(357.09,+$O(^IBD(357.09,0)),"Q",0))) W ! S DIC="^IBD(357.09,",DIC(0)="AELQMN",DIC("DR")=".01",DLAYGO=357.09 D ^DIC K DIC G:Y<1 REP S DA=+Y D
17 .;S DIE="^IBD(357.09,",DA=DA,DR="11",DR(2,357.091)=".04:.1" D ^DIE K DA,DIE,DR
18 W ! S DA(1)=1,DIC("A")="Select Print Mgrs. Queuing Params. Name: ",DIC="^IBD(357.09,"_DA(1)_","_"""Q"""_",",DIC(0)="AELQMN",DIC("DR")=".01",DLAYGO=357.09 D ^DIC K DIC G:Y<1 REP S DA=+Y D
19 .S DA(1)=1,DIE="^IBD(357.09,"_DA(1)_","_"""Q"""_",",DA=DA
20 .S DR=".04//"_1_";.05//"_"NO"_";.06"_";.07//"_5_";.08//"_"R"_";.09"_";.1//"_10_";.13//"_0000
21 .D ^DIE K DA,DIE,DIC,DR
22 .Q
23REP D INIT^IBDFPE S VALMBCK="R" Q
24 ;
25STAT ; -- Find out the status of the queued job and kill a tasked job
26 N IBDVALM,IBDAT,VALMY,IBDFNODE,IBDFSTAT,IBQUIT
27 S VALMBCK=""
28 D EN^VALM2($G(XQORNOD(0))) G REP:'$O(VALMY(0)) S IBDVALM=0
29 D FULL^VALM1 S VALMBCK="R"
30 F IBDVALM=0:0 S IBDVALM=$O(VALMY(IBDVALM)) Q:'IBDVALM S DA=$S($D(IBDTYPE(IBDVALM)):$P(IBDTYPE(IBDVALM),"^",1),1:"") I DA]"" D K IBQUIT
31 .S DA(1)=1,IBDFNODE=^IBD(357.09,DA(1),"Q",DA,0) D ASK Q:$D(IBQUIT) D:$D(IBDFSTOP) KILL^%ZTLOAD D:'$D(IBDFSTOP)&(IBDFSTAT]"") STAT^%ZTLOAD D
32 ..D FULL^VALM1
33 ..I IBDFSTAT']"" W !!,"Status of Queued Job <<< "_$P(IBDFNODE,"^",1)_" >>>",!!,"JOB NOT TASKED!" W:$D(IBDFSTOP) " NO NEED TO INTERRUPT JOB!" Q
34 ..W !!,"Status of Queued Job <<< "_$P(IBDFNODE,"^",1)_" >>>",!!
35 ..I $D(ZTSK(0)) W !," TASK: ",$S($D(ZTSK):ZTSK,1:"")_" - ",$S(ZTSK(0)=1:"Defined",1:"Undefined")
36 ..I $D(ZTSK(1)) W !,"STATUS CODE: ",ZTSK(1)
37 ..I $D(ZTSK(2)) W !," STATUS: ",ZTSK(2)
38 ..I $D(IBDFSTOP) W:ZTSK(0)=1 !,"SUCCESSFUL DELETION OF TASK" W !!,"***JOB STOPPED UPON REQUEST***" S:ZTSK=$P(IBDFNODE,"^",11) $P(^IBD(357.09,DA(1),"Q",DA,0),"^",11)="" S:ZTSK=$P(IBDFNODE,"^",14) $P(^IBD(357.09,DA(1),"Q",DA,0),"^",14)=""
39 ..Q
40 ;I IBDFSTAT']"" W !!,"Status of Queued Job <<< "_$P(IBDFNODE,"^",1)_" >>>",!!,"JOB NOT TASKED!" I $D(IBDFSTOP) W " NO NEED TO INTERRUPT JOB!"
41 K DA,DA(1)
42 D PAUSE^VALM1,REP Q
43 Q
44 ;
45DEL ; -- Delete Clinic Group
46 N IBDVALM,VALMY,DIR,DIRUT,DUOUT
47 S VALMBCK=""
48 D EN^VALM2($G(XQORNOD(0))) G REP:'$O(VALMY(0)) S IBDVALM=0
49 D FULL^VALM1 S VALMBCK="R"
50 ;
51 F IBDVALM=0:0 S IBDVALM=$O(VALMY(IBDVALM)) Q:'IBDVALM S DA=$S($D(IBDTYPE(IBDVALM)):$P(IBDTYPE(IBDVALM),"^",1),1:"") I DA]"" D
52 .S DA(1)=1,DIK="^IBD(357.09,"_DA(1)_","_"""Q"""_","
53 .W !!,"Paramater Group: "_$P($G(^IBD(357.09,1,"Q",DA,0)),"^",1)
54 .W ! S DIR(0)="Y",DIR("B")="NO",DIR("A")="Are You Sure you want to delete "_$P($G(^IBD(357.09,1,"Q",DA,0)),"^",1)
55 .D ^DIR K DIR I Y'=1 W !,"Entry ",$P($G(^IBD(357.09,1,"Q",DA,0)),"^",1)," not Deleted!" Q
56 .D DP1
57 ;
58DELQ D REP
59 S VALMBCK="R" Q
60 ;
61DP1 ; -- actual deletion
62 S DIK="^IBD(357.09,"_DA(1)_","_"""Q"""_"," D ^DIK
63 W !,"Entry ",IBDVALM," Deleted"
64 Q
65ASK I $P(IBDFNODE,"^",11)']""!($P(IBDFNODE,"^",14)']"")!($P(IBDFNODE,"^",11)=$P(IBDFNODE,"^",14)) D Q
66 .S (IBDFSTAT,ZTSK)=$P(IBDFNODE,"^",11)
67 .Q
68 S DIR(0)="S^1:CURRENT;2:PREVIOUS"
69 S DIR("A")="Select action for print group "_$P(IBDFNODE,"^",1)
70 S DIR("B")="CURRENT"
71 S DIR("?")=" "
72 S DIR("?",1)="Choose 1 or 'C' CURRENT TASK"
73 S DIR("?",2)=" or"
74 S DIR("?",3)=" 2 or 'P' for PREVIOUS TASK"
75 S DIR("?",4)=" "
76 S DIR("?",5)=" Current task # ="_$P(IBDFNODE,"^",11)
77 S DIR("?",6)=" "
78 S DIR("?",7)=" Previous task # = "_$P(IBDFNODE,"^",14)
79 D ^DIR
80 I $D(DTOUT)!($D(DUOUT)) S IBQUIT=1
81 S (IBDFSTAT,ZTSK)=$S(Y=2:$P(IBDFNODE,"^",14),1:$P(IBDFNODE,"^",11))
82 K DIR Q
Note: See TracBrowser for help on using the repository browser.