source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPURS4.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1PRCPURS4 ;WISC/RFJ-select item list ;11 Aug 93
2 ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7ITEMSEL ; select a group of items from inventory point
8 ; if all items are selected, return prcpalli=1
9 ; selected items are returned in tmp($j,"prcpurs4",itemda)
10 N ITEMDA
11 K PRCPALLI,^TMP($J,"PRCPURS4")
12 W !!,"To select ALL items, press RETURN."
13 F S ITEMDA=$$ITEM^PRCPUITM(PRCP("I"),0,"","") Q:'ITEMDA S ^TMP($J,"PRCPURS4",ITEMDA)=""
14 I ITEMDA["^" K ^TMP($J,"PRCPURS4"),PRCPALLI Q
15 I $O(^TMP($J,"PRCPURS4",0)) Q
16 S XP="Do you want to select ALL items",XH="Enter 'YES' to select ALL items, 'NO' or '^' to exit."
17 W ! I $$YN^PRCPUYN(1)'=1 Q
18 S PRCPALLI=1
19 Q
20 ;
21 ;
22ITEMMAST(PRCPDATE) ; select a group of items from item master file
23 ; prcpdate = date to check for opening balance
24 ; if all items are selected, return allitems=1
25 ; selected items are returned in tmp($j,"prcpitems",itemda)
26 K ALLITEMS,^TMP($J,"PRCPITEMS")
27 W !!,"To select ALL items, press RETURN."
28 F S ITEMDA=$$MASTITEM^PRCPUITM($S(PRCPDATE:"I $D(^PRCP(445.1,PRCP(""I""),1,+Y,1,PRCPDATE,0))",1:"")) Q:'ITEMDA S ^TMP($J,"PRCPITEMS",ITEMDA)=""
29 I ITEMDA["^" K ^TMP($J,"PRCPITEMS") Q
30 I '$O(^TMP($J,"PRCPITEMS",0)) S XP="Do you want to select ALL items",XH="Enter 'YES' to select ALL items, 'NO' or '^' to exit." W ! S %=$$YN^PRCPUYN(0) I %=1 S ALLITEMS=1
31 I '$O(^TMP($J,"PRCPITEMS",0)),'$D(ALLITEMS) W !!,"NO ITEMS SELECTED!" Q
32 Q
Note: See TracBrowser for help on using the repository browser.