[613] | 1 | RMPRPIY5 ;HINCIO/ODJ - PIP Data fields - Prompts ;3/8/01
|
---|
| 2 | ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
|
---|
| 3 | Q
|
---|
| 4 | ;
|
---|
| 5 | ;SRC - Prompt for Source - V for VA (used), C for Commercial
|
---|
| 6 | SRC(RMPRSRC,RMPREXC) ;
|
---|
| 7 | N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 8 | S RMPRSRC=$G(RMPRSRC)
|
---|
| 9 | S RMPRERR=0
|
---|
| 10 | S DIR(0)="661.11,4"
|
---|
| 11 | S DIR("A")="SOURCE"
|
---|
| 12 | S DIR("B")=$S(RMPRSRC="":"C",1:RMPRSRC)
|
---|
| 13 | S DIR("?")="^D SRCH^RMPRPIY5"
|
---|
| 14 | RESRC D ^DIR
|
---|
| 15 | I $D(DTOUT) S RMPREXC="T" G SRCX
|
---|
| 16 | I $D(DIROUT) S RMPREXC="P" G SRCX
|
---|
| 17 | I X="" G RESRC
|
---|
| 18 | I (X["^")!($D(DUOUT)) S RMPREXC="^" G SRCX
|
---|
| 19 | S RMPRSRC=Y
|
---|
| 20 | S RMPREXC=""
|
---|
| 21 | SRCX Q
|
---|
| 22 | SRCH W "If the item is USED, type in 'V' for VA."
|
---|
| 23 | W !,"If the item is NEW, type in 'C' for COMMERCIAL."
|
---|
| 24 | Q
|
---|
| 25 | ;
|
---|
| 26 | ;***** QTY - Prompt for Quantity (Invoice not on hand)
|
---|
| 27 | QTY(RMPRQTY,RMPREXC) ;
|
---|
| 28 | N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 29 | S RMPRQTY=$G(RMPRQTY)
|
---|
| 30 | S RMPRERR=0
|
---|
| 31 | S DIR(0)="NAO^0:99999:0"
|
---|
| 32 | S DIR("A")="INVOICE QUANTITY: "
|
---|
| 33 | S:RMPRQTY'="" DIR("B")=RMPRQTY
|
---|
| 34 | S DIR("??")="^D QTYHH^RMPRPIY5"
|
---|
| 35 | REQTY D ^DIR
|
---|
| 36 | I $D(DTOUT) S RMPREXC="T" G QTYX
|
---|
| 37 | I $D(DIROUT) S RMPREXC="P" G QTYX
|
---|
| 38 | I X="" G REQTY
|
---|
| 39 | I (X["^")!($D(DUOUT)) S RMPREXC="^" G QTYX
|
---|
| 40 | S RMPREXC=""
|
---|
| 41 | S RMPRQTY=+Y
|
---|
| 42 | QTYX Q
|
---|
| 43 | QTYHH W "Type in the item quantity you are receiving into stock.",!
|
---|
| 44 | W "This quantity should match that on the paper record of the receipt",!
|
---|
| 45 | W "such as an invoice or delivery note, it is not the same as the",!
|
---|
| 46 | W "quantity on hand. To correct on hand quantities you should use the",!
|
---|
| 47 | W "reconciliation option.",!
|
---|
| 48 | W "Please make sure you create separate receipts if you are receiving",!
|
---|
| 49 | W "the same item from different vendors or at different costs."
|
---|
| 50 | Q
|
---|
| 51 | ;
|
---|
| 52 | ;***** UCST - prompt for Unit Cost
|
---|
| 53 | UCST(RMPRUCST,RMPREXC) ;
|
---|
| 54 | N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 55 | S RMPRUCST=$G(RMPRUCST)
|
---|
| 56 | S RMPRERR=0
|
---|
| 57 | S RMPREXC=""
|
---|
| 58 | S DIR(0)="NOA^0:99999:6"
|
---|
| 59 | S DIR("A")="UNIT COST: "
|
---|
| 60 | S DIR("??")="^D UCSTHH^RMPRPIY5"
|
---|
| 61 | S:RMPRUCST'="" DIR("B")=RMPRUCST
|
---|
| 62 | REUCST D ^DIR
|
---|
| 63 | I $D(DTOUT) S RMPREXC="T" G SRCX
|
---|
| 64 | I $D(DIROUT) S RMPREXC="P" G SRCX
|
---|
| 65 | I X="" G REUCST
|
---|
| 66 | I X["^"!($D(DUOUT)) S RMPREXC="^" G SRCX
|
---|
| 67 | S RMPRUCST=+Y
|
---|
| 68 | UCSTX Q
|
---|
| 69 | UCSTHH W "Type in the dollar cost per item."
|
---|
| 70 | W !,"If you would prefer to enter the total dollar value for the"
|
---|
| 71 | W !,"item quantity you have just typed in, then type in 0 here."
|
---|
| 72 | Q
|
---|
| 73 | ;
|
---|
| 74 | ;***** TVAL - Prompt for total $ value
|
---|
| 75 | TVAL(RMPRTVAL,RMPREXC) ;
|
---|
| 76 | N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 77 | S RMPRTVAL=$G(RMPRTVAL)
|
---|
| 78 | S RMPRERR=0
|
---|
| 79 | S RMPREXC=""
|
---|
| 80 | S DIR(0)="NOA^0:999999:2"
|
---|
| 81 | S DIR("A")="TOTAL COST OF QUANTITY: "
|
---|
| 82 | S:RMPRTVAL'="" DIR("B")=RMPRTVAL
|
---|
| 83 | S DIR("??")="^D TVALHH^RMPRPIY5"
|
---|
| 84 | RETVAL D ^DIR
|
---|
| 85 | I $D(DTOUT) S RMPREXC="T" G TVALX
|
---|
| 86 | I $D(DIROUT) S RMPREXC="P" G TVALX
|
---|
| 87 | I X["^" S RMPREXC="^" G TVALX
|
---|
| 88 | I X="" G RETVAL
|
---|
| 89 | S RMPRTVAL=+Y
|
---|
| 90 | TVALX Q
|
---|
| 91 | TVALHH W "Type in the total dollar value or cost (excluding freight)"
|
---|
| 92 | W !,"of the item quantity you have entered above."
|
---|
| 93 | Q
|
---|
| 94 | ;
|
---|
| 95 | ;***** REO - Prompt for Re-Order Level
|
---|
| 96 | REO(RMPRREO,RMPREXC) ;
|
---|
| 97 | N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 98 | S RMPRREO=$G(RMPRREO)
|
---|
| 99 | S RMPRERR=0
|
---|
| 100 | S RMPREXC=""
|
---|
| 101 | S DIR(0)="NOA^0:99999:0"
|
---|
| 102 | S DIR("A")="RE-ORDER LEVEL: "
|
---|
| 103 | S:RMPRREO'="" DIR("B")=RMPRREO
|
---|
| 104 | S DIR("??")="^D REOHH^RMPRPIY5"
|
---|
| 105 | REREO D ^DIR
|
---|
| 106 | I $D(DTOUT) S RMPREXC="T" G REOX
|
---|
| 107 | I $D(DIROUT) S RMPREXC="P" G REOX
|
---|
| 108 | I X="" G REREO
|
---|
| 109 | I (X["^")!($D(DUOUT)) S RMPREXC="^" G REOX
|
---|
| 110 | S RMPRREO=+Y
|
---|
| 111 | REOX Q
|
---|
| 112 | REOHH W "Type in a number that signifies the quantity on hand of an item,"
|
---|
| 113 | W !,"at a particular location, below which the item should be ordered."
|
---|
| 114 | Q
|
---|
| 115 | ;
|
---|
| 116 | ;***** VEND - prompt for Vendor
|
---|
| 117 | VEND(RMPRVEND,RMPREXC) ;
|
---|
| 118 | N RMPRERR,DIC,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 119 | S RMPRVEND=$G(RMPRVEND("IEN"))
|
---|
| 120 | S RMPRERR=0
|
---|
| 121 | S DIC=440
|
---|
| 122 | S DIC(0)="AEQM"
|
---|
| 123 | S DIC("A")="VENDOR: "
|
---|
| 124 | I RMPRVEND'="" S DIC("B")=RMPRVEND
|
---|
| 125 | REVEND D ^DIC
|
---|
| 126 | I $D(DTOUT) S RMPREXC="T" G VENDX
|
---|
| 127 | I $D(DIROUT)!(X["^^") S RMPREXC="P" G VENDX
|
---|
| 128 | I X="" G REVEND
|
---|
| 129 | I (X["^")!($D(DUOUT))!(+Y=-1) S RMPREXC="^" G VENDX
|
---|
| 130 | S RMPREXC=""
|
---|
| 131 | S RMPRVEND("IEN")=$P(Y,"^",1)
|
---|
| 132 | S RMPRVEND("NAME")=$P(Y,"^",2)
|
---|
| 133 | VENDX Q
|
---|
| 134 | ;
|
---|
| 135 | ;***** UNIT - prompt for unit of issue
|
---|
| 136 | UNIT(RMPRUNI,RMPREXC) ;
|
---|
| 137 | N RMPRERR,DIC,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
|
---|
| 138 | S RMPRUNI=$G(RMPRUNI("IEN"))
|
---|
| 139 | S RMPRERR=0
|
---|
| 140 | S DIC=420.5
|
---|
| 141 | S DIC(0)="AEQM"
|
---|
| 142 | S DIC("A")="UNIT OF ISSUE: "
|
---|
| 143 | I RMPRUNI'="" S DIC("B")=RMPRUNI
|
---|
| 144 | UNITD D ^DIC
|
---|
| 145 | I $D(DTOUT) S RMPREXC="T" G UNITX
|
---|
| 146 | I $D(DIROUT)!(X["^^") S RMPREXC="P" G UNITX
|
---|
| 147 | I X="" G UNITD
|
---|
| 148 | I (X["^")!($D(DUOUT))!(+Y=-1) S RMPREXC="^" G UNITX
|
---|
| 149 | S RMPREXC=""
|
---|
| 150 | S RMPRUNI("IEN")=$P(Y,"^",1)
|
---|
| 151 | S RMPRUNI("NAME")=$P(Y,"^",2)
|
---|
| 152 | UNITX Q
|
---|