source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCPCSO1.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: 999 bytes
Line 
1PRCPCSO1 ;WISC/RFJ-surgery order supplies ;01 Sep 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 ;
7AUTOORD ; automatically create order
8 N ORDERNO
9 D SHOWCC^PRCPCSOU(OPCODE,0)
10 S XP="Do you want to automatically create and add items to a new order"
11 S XH="Enter 'YES' to automatically create an order with the items on it,",XH(1)="enter 'NO' to select the order and items, or",XH(2)="enter '^' to select a new patient and operation."
12 W ! S %=$$YN^PRCPUYN(1)
13 I %=2 Q
14 I %'=1 S PRCPFLAG=1 Q
15 W !!,"CREATING ORDER:"
16 D NEWORDER^PRCPOPUS(PRCPPRIM) I '$G(X) S ORDERDA=0 Q
17 S ORDERNO=X
18 S ORDERDA=+$$ADDNEW^PRCPOPUS(ORDERNO,PRCPPRIM,PRCPSECO) I 'ORDERDA Q
19 L +^PRCP(445.3,ORDERDA):5 I '$T D SHOWWHO^PRCPULOC(445.3,ORDERDA,0) S ORDERDA=0 Q
20 D ADD^PRCPULOC(445.3,ORDERDA,0,"Ordering Surgical Supplies")
21 ; tie patient and operation to the order
22 D PATLINK^PRCPCSOR(ORDERDA,PRCPPAT,PRCPSURG)
23 W " NUMBER ",ORDERNO
24 Q
Note: See TracBrowser for help on using the repository browser.