source: WorldVistAEHR/trunk/r/AUTO_REPLENISHMENT_WARD_STOCK-PSGW/PSGWUTL1.m@ 703

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1PSGWUTL1 ;BHAM ISC/CML-Utility routine for HELP functions ; 15 Aug 93 / 4:46 PM
2 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
3SS ; Scroll-stop for last page of 80 column reports
4 R !!,"END OF REPORT! Press <RETURN> to return to Menu:",SS:DTIME K SS Q
5HELP ; Help for scroll-stop
6 W *7,!,"Please Enter: <RETURN> to continue viewing report or ""^"" to Exit report: "
7 R ANS:DTIME S:'$T ANS="^" G:ANS?1."?" HELP Q
8 ;***********************************************************************
9IG ; Reset Sort Keys for inventory groups
10 F INVGRP=0:0 S INVGRP=$O(^PSI(58.2,INVGRP)) Q:'INVGRP I $O(^PSI(58.2,INVGRP,1,"D",0)) W "." D IGSET
11 K INVGRP Q
12IGSET S CNT=0 F SK=0:0 S SK=$O(^PSI(58.2,INVGRP,1,"D",SK)) Q:'SK S AOU=$O(^PSI(58.2,INVGRP,1,"D",SK,0)),CNT=CNT+1,AOULP(CNT)=AOU
13 F SK=0:0 S SK=$O(AOULP(SK)) Q:'SK S NSK=SK*100,DA(1)=INVGRP,DA=AOULP(SK),DIE="^PSI(58.2,"_DA(1)_",1,",DR="2///"_NSK D ^DIE
14 K D,D0,DA,DI,DIC,DIE,DQ,DR,X,CNT,SK,NSK,AOU,AOULP Q
15 ;***********************************************************************
16SEL ; Ask if reports are to print by Inventory Group or AOU
17 W !!?5,"You may select a single AOU, several AOUs,",!?5,"or enter ""^ALL"" to select all AOUs.",!?20,"-OR-",!?5,"You may select an Inventory Group."
18ASKSEL ;
19 W !!,"Do you want to select AOU(s) or an Inventory Group? (Enter 'A' or 'I'): " R SEL:DTIME S:'$T SEL="^" G:"^"[SEL QUIT I SEL?1."?" D HELPSEL G ASKSEL
20 I SEL'="A"&(SEL'="I") W *7,"??" D HELPSEL G ASKSEL
21 W !
22ASKIG Q:SEL="A" S DIC="^PSI(58.2,",DIC(0)="QEAM",DIC("S")="I $D(^PSI(58.2,""WS"",+Y))" D ^DIC K DIC I Y<0 K SEL Q
23 S IGDA=+Y I '$O(^PSI(58.2,IGDA,1,0)) W *7,!!,"There are no AOUs defined for this Inventory Group!" G ASKIG
24 F IGAOU=0:0 S IGAOU=$O(^PSI(58.2,IGDA,1,IGAOU)) Q:'IGAOU S AOULP(IGAOU)=""
25 W !!,"This Inventory Group contains the following AOU(s):" F IGAOU=0:0 S IGAOU=$O(AOULP(IGAOU)) Q:'IGAOU W !?5,$P(^PSI(58.1,IGAOU,0),"^") I $D(^PSI(58.1,IGAOU,"I")),^("I"),^("I")'>DT W " *** INACTIVE ***"
26QUIT K:SEL="^"!(SEL="") SEL K %,IGAOU,DIC,X,Y Q
27HELPSEL ;
28 W !!?5,"Enter an 'A' if you wish to select individual AOUs (one, several or ^ALL).",!?5,"Enter an 'I' if you wish to select all AOUs in an Inventory Group.",!?5,"Or enter ""^"" to Exit." Q
29PSGWDT() ;Find current date and time
30 D NOW^%DTC
31 S Y=$E(%,1,12)
32 X ^DD("DD")
33 Q Y
Note: See TracBrowser for help on using the repository browser.