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

ACRFSS11.m

Go to the documentation of this file.
ACRFSS11 ;IHS/OIRM/DSD/THL,AEF - ACRFSS1 CON'T; [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;CONTINUATION OF ACRFSS1
ORDER ;EP;
 I $P(ACRDOC0,U,4)=35 D O1 Q
 W @IOF
 W !,"Select STANDARD ITEM by:"
 S DIR(0)="SO^1:Index Number;2:National Stock Number;3:Vendor;4:Vendor/Manufacturer Product Number;5:National Drug Code;6:Description/Keyword"
 D DIR^ACRFDIC
 I ($D(ACRQUIT)!(X="")),$D(ACRTXDA),ACRTXDA,$D(^ACRTXTYP(ACRTXDA,0)),$P(^(0),U,4)="ST" D  Q
 .W !!,"STOCK ISSUES CAN ONLY BE ORDERED FROM STANDARD ITEM INVENTORY."
 .H 2
 Q:$D(ACROUT)
 I X="" D O1 Q
 I Y=1 S ACRXREF="B",DIR("A")="Index NO............"
 I Y=2 S ACRXREF="NSN",DIR("A")="Nat'l Stock NO......"
 I Y=3 S ACRXREF="F",DIR("A")="Vendor.............."
 I Y=4 S ACRXREF="VON",DIR("A")="Vendor Product NO..."
 I Y=5 S ACRXREF="NDC",DIR("A")="Nat'l Drug Code....."
 I Y=6 S ACRXREF="C^D",DIR("A")="Description........."
 S DIR(0)="FO^2:17",DIR("?")="^S X=""??"",DIC=""^ACRITEM("",DIC(0)=""EQZ"",D=ACRXREF D DIC^ACRFDIC"
 W !
 D DIR^ACRFDIC
 I $D(ACRQUIT)!$D(ACROUT) Q
 I Y="" K ACRQUIT D O1 Q
 S (ACRXX,X)=Y
 S DIC="^ACRITEM("
 S DIC(0)="EQZ"
 S D=ACRXREF
 D MIX^ACRFDIC
O2 I +Y>0 D  Q
 .S ACRJ=ACRJ+1
 .S ACRITMDA=+Y
 .S ACRX=$P(^ACRITEM(ACRITMDA,0),U)_" ("_$S($P(^(0),U,2)]"":$P(^(0),U,2),1:$P($G(^ACRITEM(ACRITMDA,2,1,0)),U))_")"
 .S ACRSSDR="[ACR STANDARD ITEM-2]"
 .D ADD1^ACRFSS1
 .D APCHK^ACRFSCHK
 .I $P(^ACRDOC(ACRDOCDA,0),U,4)=35,$E($G(^ACROBL(ACRDOCDA,"APV")))="A" Q
 .D APPROVE^ACRFSCHK
 W !!,"No STANDARD ITEM found"
 S DIR(0)="YO"
 S DIR("A")="Inquire to STANDARD ITEM file again"
 S DIR("B")="NO"
 K ACRQUIT,ACROUT
 D DIR^ACRFDIC
 K ACRQUIT
 G:Y=1 ORDER
O1 ;ADD NEW ITEM WHICH IS NOT FROM THE STANDARD ITEM FILE TO THE REQUEST
 K ACRXX
 D ADD2^ACRFSS1
 D APCHK^ACRFSCHK
 I $P(^ACRDOC(ACRDOCDA,0),U,4)=35,$E($G(^ACROBL(ACRDOCDA,"APV")))="A" I 1
 E  D APPROVE^ACRFSCHK
ORDER1 S DIR(0)="YO"
 S DIR("A")="Add another ITEM"
 S DIR("B")="NO"
 W !!
 D DIR^ACRFDIC
 G:Y=1 ORDER
 Q