Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RMPRPIY5

RMPRPIY5.m

Go to the documentation of this file.
  1. RMPRPIY5 ;HINCIO/ODJ - PIP Data fields - Prompts ;3/8/01
  1. ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
  1. Q
  1. ;
  1. ;SRC - Prompt for Source - V for VA (used), C for Commercial
  1. SRC(RMPRSRC,RMPREXC) ;
  1. N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRSRC=$G(RMPRSRC)
  1. S RMPRERR=0
  1. S DIR(0)="661.11,4"
  1. S DIR("A")="SOURCE"
  1. S DIR("B")=$S(RMPRSRC="":"C",1:RMPRSRC)
  1. S DIR("?")="^D SRCH^RMPRPIY5"
  1. RESRC D ^DIR
  1. I $D(DTOUT) S RMPREXC="T" G SRCX
  1. I $D(DIROUT) S RMPREXC="P" G SRCX
  1. I X="" G RESRC
  1. I (X["^")!($D(DUOUT)) S RMPREXC="^" G SRCX
  1. S RMPRSRC=Y
  1. S RMPREXC=""
  1. SRCX Q
  1. SRCH W "If the item is USED, type in 'V' for VA."
  1. W !,"If the item is NEW, type in 'C' for COMMERCIAL."
  1. Q
  1. ;
  1. ;***** QTY - Prompt for Quantity (Invoice not on hand)
  1. QTY(RMPRQTY,RMPREXC) ;
  1. N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRQTY=$G(RMPRQTY)
  1. S RMPRERR=0
  1. S DIR(0)="NAO^0:99999:0"
  1. S DIR("A")="INVOICE QUANTITY: "
  1. S:RMPRQTY'="" DIR("B")=RMPRQTY
  1. S DIR("??")="^D QTYHH^RMPRPIY5"
  1. REQTY D ^DIR
  1. I $D(DTOUT) S RMPREXC="T" G QTYX
  1. I $D(DIROUT) S RMPREXC="P" G QTYX
  1. I X="" G REQTY
  1. I (X["^")!($D(DUOUT)) S RMPREXC="^" G QTYX
  1. S RMPREXC=""
  1. S RMPRQTY=+Y
  1. QTYX Q
  1. QTYHH W "Type in the item quantity you are receiving into stock.",!
  1. W "This quantity should match that on the paper record of the receipt",!
  1. W "such as an invoice or delivery note, it is not the same as the",!
  1. W "quantity on hand. To correct on hand quantities you should use the",!
  1. W "reconciliation option.",!
  1. W "Please make sure you create separate receipts if you are receiving",!
  1. W "the same item from different vendors or at different costs."
  1. Q
  1. ;
  1. ;***** UCST - prompt for Unit Cost
  1. UCST(RMPRUCST,RMPREXC) ;
  1. N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRUCST=$G(RMPRUCST)
  1. S RMPRERR=0
  1. S RMPREXC=""
  1. S DIR(0)="NOA^0:99999:6"
  1. S DIR("A")="UNIT COST: "
  1. S DIR("??")="^D UCSTHH^RMPRPIY5"
  1. S:RMPRUCST'="" DIR("B")=RMPRUCST
  1. REUCST D ^DIR
  1. I $D(DTOUT) S RMPREXC="T" G SRCX
  1. I $D(DIROUT) S RMPREXC="P" G SRCX
  1. I X="" G REUCST
  1. I X["^"!($D(DUOUT)) S RMPREXC="^" G SRCX
  1. S RMPRUCST=+Y
  1. UCSTX Q
  1. UCSTHH W "Type in the dollar cost per item."
  1. W !,"If you would prefer to enter the total dollar value for the"
  1. W !,"item quantity you have just typed in, then type in 0 here."
  1. Q
  1. ;
  1. ;***** TVAL - Prompt for total $ value
  1. TVAL(RMPRTVAL,RMPREXC) ;
  1. N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRTVAL=$G(RMPRTVAL)
  1. S RMPRERR=0
  1. S RMPREXC=""
  1. S DIR(0)="NOA^0:999999:2"
  1. S DIR("A")="TOTAL COST OF QUANTITY: "
  1. S:RMPRTVAL'="" DIR("B")=RMPRTVAL
  1. S DIR("??")="^D TVALHH^RMPRPIY5"
  1. RETVAL D ^DIR
  1. I $D(DTOUT) S RMPREXC="T" G TVALX
  1. I $D(DIROUT) S RMPREXC="P" G TVALX
  1. I X["^" S RMPREXC="^" G TVALX
  1. I X="" G RETVAL
  1. S RMPRTVAL=+Y
  1. TVALX Q
  1. TVALHH W "Type in the total dollar value or cost (excluding freight)"
  1. W !,"of the item quantity you have entered above."
  1. Q
  1. ;
  1. ;***** REO - Prompt for Re-Order Level
  1. REO(RMPRREO,RMPREXC) ;
  1. N RMPRERR,DIR,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRREO=$G(RMPRREO)
  1. S RMPRERR=0
  1. S RMPREXC=""
  1. S DIR(0)="NOA^0:99999:0"
  1. S DIR("A")="RE-ORDER LEVEL: "
  1. S:RMPRREO'="" DIR("B")=RMPRREO
  1. S DIR("??")="^D REOHH^RMPRPIY5"
  1. REREO D ^DIR
  1. I $D(DTOUT) S RMPREXC="T" G REOX
  1. I $D(DIROUT) S RMPREXC="P" G REOX
  1. I X="" G REREO
  1. I (X["^")!($D(DUOUT)) S RMPREXC="^" G REOX
  1. S RMPRREO=+Y
  1. REOX Q
  1. REOHH W "Type in a number that signifies the quantity on hand of an item,"
  1. W !,"at a particular location, below which the item should be ordered."
  1. Q
  1. ;
  1. ;***** VEND - prompt for Vendor
  1. VEND(RMPRVEND,RMPREXC) ;
  1. N RMPRERR,DIC,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRVEND=$G(RMPRVEND("IEN"))
  1. S RMPRERR=0
  1. S DIC=440
  1. S DIC(0)="AEQM"
  1. S DIC("A")="VENDOR: "
  1. I RMPRVEND'="" S DIC("B")=RMPRVEND
  1. REVEND D ^DIC
  1. I $D(DTOUT) S RMPREXC="T" G VENDX
  1. I $D(DIROUT)!(X["^^") S RMPREXC="P" G VENDX
  1. I X="" G REVEND
  1. I (X["^")!($D(DUOUT))!(+Y=-1) S RMPREXC="^" G VENDX
  1. S RMPREXC=""
  1. S RMPRVEND("IEN")=$P(Y,"^",1)
  1. S RMPRVEND("NAME")=$P(Y,"^",2)
  1. VENDX Q
  1. ;
  1. ;***** UNIT - prompt for unit of issue
  1. UNIT(RMPRUNI,RMPREXC) ;
  1. N RMPRERR,DIC,X,Y,DUOUT,DTOUT,DIROUT,DIRUT,DA
  1. S RMPRUNI=$G(RMPRUNI("IEN"))
  1. S RMPRERR=0
  1. S DIC=420.5
  1. S DIC(0)="AEQM"
  1. S DIC("A")="UNIT OF ISSUE: "
  1. I RMPRUNI'="" S DIC("B")=RMPRUNI
  1. UNITD D ^DIC
  1. I $D(DTOUT) S RMPREXC="T" G UNITX
  1. I $D(DIROUT)!(X["^^") S RMPREXC="P" G UNITX
  1. I X="" G UNITD
  1. I (X["^")!($D(DUOUT))!(+Y=-1) S RMPREXC="^" G UNITX
  1. S RMPREXC=""
  1. S RMPRUNI("IEN")=$P(Y,"^",1)
  1. S RMPRUNI("NAME")=$P(Y,"^",2)
  1. UNITX Q