PSAUP ;BIR/JMB-Upload and Process Prime Vendor Invoice Data ;7/23/97
;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**12**; 10/24/97
;This routine uploads the prime vendor data into ^TMP("PSAPV",$J).
;The X12 data is checked for proper format. If the X12 data is correct,
;it is loaded into ^XTMP("PSAX12").
;
I '$D(^XUSEC("PSA ORDERS",DUZ)) W !,"You do not hold the key to enter the option." Q
W @IOF,!,"****************************** I M P O R T A N T ******************************"
W !!,"This option uploads the invoice data received from your prime vendor.",!,"In order to upload the data, you must be running ProComm Plus software",!,"on Pharmacy's prime vendor PC.",!!
S PSASTLN="",$P(PSASTLN,"*",80)="" W PSASTLN,! K PSASTLN
S DIR("A")="Are you ready to upload the prime vendor invoice data",DIR(0)="Y",DIR("B")="Yes",DIR("??")="^D YNUPLOAD^PSAUP1" D ^DIR K DIR
I 'Y S PSAOUT=1 G KILL
I $D(^DIZ(8980,"AOK",DUZ)) S XTKDIC="^TMP(""PSAX12"",$J,",DWLC=0,XTKMODE=2
I '$D(^DIZ(8980,"AOK",DUZ)) D RFILE^XTKERM4
S PSAOUT=0 K ^TMP("PSAX12",$J)
W !!,"Press <ALT> 1 if your Prime Vendor script is installed as a Meta Key,",!,"otherwise press <ALT> F5 and enter ""PV""",!
X ^%ZOSF("EOFF") R X:DTIME X ^%ZOSF("EON") D HASH^XUSHSHP I X'="$4_\y o\Xp>RN}ab*_%," S PSAOUT=1
I '$G(PSAOUT) S XTKDIC="^TMP(""PSAX12"",$J,",DWLC=0,XTKMODE=2 D RECEIVE^XTKERMIT
I $G(PSAOUT) S XTKERR="The invoice file cannot be uploaded. Contact your IRM staff for assistance." K ^TMP("PSAPV",$J) H 1
I $G(XTKERR)'=0 W !!,"ERROR - "_XTKERR S PSAOUT=1 Q
I DWLC=0 W !,"ERROR - NO LINES RECEIVED." S PSAOUT=1 Q
W @IOF,!,"Done",!,"The data uploaded to a temporary file. "_DWLC," lines received.",!! H 2
G:'$O(^TMP("PSAX12",$J,0)) KILL
;
UNWRAP ;Changes the data element and segment delimiters to ^ & ~, places each
;segment on a node to itself, then removes leading spaces from each
;data element
W !,"Unwrapping the invoice."
;
;Get delimiters
S (PSABBC,PSAISA,PSALINE,PSASEGD,PSALND)=0
F S PSALINE=$O(^TMP("PSAX12",$J,PSALINE)) Q:'PSALINE D Q:PSABBC&(PSAISA)
.I $E($G(^TMP("PSAX12",$J,PSALINE,0)),1,3)="ISA" S DAVE=^TMP("PSAX12",$J,PSALINE,0) S PSASEGD=$E(^(0),4,4),PSALND=$E(^(0),106,106),PSAISA=1 W "." Q
.I $P($G(^TMP("PSAX12",$J,PSALINE,0)),PSASEGD,2)="DS",$P($G(^(0)),PSASEGD,3)="BBC" S PSABBC=1
;If drug company is Bergen (BBC), changes data element to ^ and adds
;segment delimiters to ~.
I PSABBC S (PSACNT,PSALINE)=0 F S PSALINE=$O(^TMP("PSAX12",$J,PSALINE)) Q:'PSALINE D
.S PSADATA=^TMP("PSAX12",$J,PSALINE,0)_"~"
.I PSASEGD'="^" S PSADATA=$TR(PSADATA,PSASEGD,"^")
.I $E($G(^TMP("PSAX12",$J,PSALINE,0)),1,3)="ISA" W "."
.S ^TMP("PSAX12",$J,PSALINE,0)=PSADATA
G:PSABBC LINE
;
I PSASEGD=""!(PSALND="") D G KILL
.S PSASTAR="",$P(PSASTAR,"*",80)=""
.W !,PSASTAR,!,"There is a major error in the invoice file.",!,"Contact your IRM Staff for assistance."
.W !!,"Press the Esc key then enter YES at the 'EXIT SCRIPT (Y/N)' prompt.",!,"Press RETURN to exit the option.",!,PSASTAR D END^PSAPROC
G:PSASEGD="~"&(PSALND="^") LINE
;
;Changes the data element and segment delimiters to ^ and ~.
S (PSACNT,PSALINE)=0 F S PSALINE=$O(^TMP("PSAX12",$J,PSALINE)) Q:'PSALINE D Q:PSAOUT
.S PSADATA=^TMP("PSAX12",$J,PSALINE,0)
.I PSALND'="~" S PSADATA=$TR(PSADATA,PSALND,"~")
.I PSASEGD'="^" S PSADATA=$TR(PSADATA,PSASEGD,"^")
.S ^TMP("PSAX12",$J,PSALINE,0)=PSADATA
.I $P(^TMP("PSAX12",$J,PSALINE,0),"^")="ISA" W "."
;
LINE ;Places each segment on a node to itself.
K ^TMP("PSAPV",$J)
S PSAHOLD="",(PSACNT,PSALINE)=0
F S PSALINE=$O(^TMP("PSAX12",$J,PSALINE)) Q:'PSALINE D
.S PSADATA=^TMP("PSAX12",$J,PSALINE,0),PSADATA=PSAHOLD_PSADATA
.I PSADATA'["~" S PSAHOLD=PSADATA Q
.S PSASTOP=0 F S PSASEG=$P(PSADATA,"~") Q:PSASEG="" D Q:PSASTOP
..S PSACNT=PSACNT+1,^TMP("PSAPV",$J,PSACNT,0)=PSASEG
..I $P(PSASEG,"^")="ISA" W "."
..S PSADATA=$P(PSADATA,"~",2,99) I PSADATA'["~" S PSASTOP=1,PSAHOLD=PSADATA Q
..S PSAHOLD=""
;
SPACES ;remove all leading spaces in all data elements
K ^TMP("PSAX12",$J)
S (PSACNT,PSALINE)=0 F S PSALINE=$O(^TMP("PSAPV",$J,PSALINE)) Q:'PSALINE D
.S PSASEG=^TMP("PSAPV",$J,PSALINE,0)
.I $E(PSASEG,1,3)="ISA" S ^TMP("PSAPVS",$J,PSALINE)=^TMP("PSAPV",$J,PSALINE,0) W "." Q
.S PSACNT=0,PSASEGL=$L(PSASEG)
.F PSAEX=1:1:PSASEGL S PSAX=$E(PSASEG,PSAEX,PSAEX) S:PSAX="^" PSACNT=PSACNT+1
.F PSAPC=1:1:(PSACNT+1) S PSADE=$P(PSASEG,"^",PSAPC) D
..F Q:$E(PSADE,1,1)'=" " S PSADE=$E(PSADE,2,999)
..S $P(PSASEG,"^",PSAPC)=PSADE
.S ^TMP("PSAPVS",$J,PSALINE)=PSASEG
K ^TMP("PSAPV",$J)
W !,"Finished unwrapping the invoice." H 2
;
CHECK ;Looks for X12 errors. If no errors, loads data into ^TMP("PSAPV SET",$J)
W !!,"Checking the invoice data."
D ^PSAUP2
K ^TMP("PSAPVS",$J)
I PSAOUT K ^TMP("PSAPV SET",$J) G KILL
W !,"Finished checking the invoice data." H 2
;
LOADXTMP ;Loads data into ^XTMP("PSAPV").
W !!,"Loading data into VISTA."
D XTMP^PSAUP1
K ^TMP("PSAPV SET",$J) G:PSAOUT KILL
W !,"Finished loading data into VISTA."
W !!,"** The upload was successful. **" H 4
D END^PSAPROC
;
STORE ;Get the line item data and store in ^XTMP("PSAPV")
W @IOF S PSANEXT=$O(^XTMP("PSAPV",0))
I PSANEXT="" W !,"There are no valid invoices to process." H 1 G KILL
W !,"Searching for and storing the drug data for each line item."
D ^PSAUP5
W !,"Finished storing the drug data." H 1
;
PRINT ;Ask if user wants to print invoices.
S PSASTA="U"
W ! S DIR(0)="Y",DIR("A")="Print all uploaded invoices",DIR("B")="Y",DIR("?",1)="Enter YES to print the invoices that were uploaded.",DIR("?")="Enter NO to bypass printing the invoices and continue.",DIR("??")="^D YNPRINT^PSAUP1"
D ^DIR K DIR G:$G(DIRUT) KILL D:Y ^PSAUP4
;
PROC ;Ask if user wants to process the invoice data now.
W ! S DIR(0)="Y",DIR("A")="Do you want to process the invoices now",DIR("B")="Y",DIR("?",1)="Enter YES to process the invoices that were uploaded.",DIR("?")="Enter NO to exit the option.",DIR("??")="^D YNPROCES^PSAUP1"
D ^DIR K DIR G:'Y!($G(DIRUT)) KILL
D KILL
;
PHARM ;Assign a pharmacy location or master vault to each Order.
;Then process the invoice data.
S PSAOUT=0
D ^PSAPROC G:$G(PSAOUT) EXIT^PSAPROC
;
PRINT2 W !! S DIR(0)="Y",DIR("A")="Print all unprocessed and just processed invoices",DIR("B")="N"
S DIR("?",1)="Enter YES to print all of the uploaded invoices that are",DIR("?")="unprocessed or just processed. Enter NO to exit the option."
S DIR("??")="^D PRT2^PSAUP1"
D ^DIR K DIR D:+Y ^PSAUP4 S PSAENTRY=0
G EXIT^PSAPROC
;
KILL ;Kills uploading variables
K ^TMP("PSAPV",$J),^TMP("PSAPVS",$J),^TMP("PSAPV SET",$J),^TMP("PSAX12",$J)
K %,DIR,DIRUT,DWLC,PSABBC,PSACNT,PSACTN1,PSACOMB,PSACS,PSACTRL,PSACTRL2,PSADATA,PSADE,PSADT,PSADUP,PSAENTRY,PSAERR,PSAEX,PSAEXPEC,PSAFND1,PSAGS,PSAHOLD,PSAIEN,PSAIN,PSAINV,PSAINVDT,PSAINVN,PSAISA,PSAISIT,PSAISITN,PSAITCNT,PSAITEM
K PSALAST,PSALINE,PSALLCS,PSALLOK,PSALND,PSALOC,PSANDC,PSANEW,PSANEXT,PSANTYPE,PSAOK,PSAORD,PSAORDDT,PSAORDN,PSAOSIT,PSAOSITN,PSAOUT,PSAPC
K PSAS,PSASEG,PSASEGL,PSASEGD,PSASS,PSAST,PSASTA,PSASTAR,PSASTCNT,PSASUB,PSASYN,PSAUOM,PSAUOM1,PSAUOMH,PSAUOMH1,PSAVSN,PSAX,X,X1,X2,XTKDIC,XTKERR,XTKMODE,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSAUP 7259 printed Oct 16, 2024@17:51:35 Page 2
PSAUP ;BIR/JMB-Upload and Process Prime Vendor Invoice Data ;7/23/97
+1 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**12**; 10/24/97
+2 ;This routine uploads the prime vendor data into ^TMP("PSAPV",$J).
+3 ;The X12 data is checked for proper format. If the X12 data is correct,
+4 ;it is loaded into ^XTMP("PSAX12").
+5 ;
+6 IF '$DATA(^XUSEC("PSA ORDERS",DUZ))
WRITE !,"You do not hold the key to enter the option."
QUIT
+7 WRITE @IOF,!,"****************************** I M P O R T A N T ******************************"
+8 WRITE !!,"This option uploads the invoice data received from your prime vendor.",!,"In order to upload the data, you must be running ProComm Plus software",!,"on Pharmacy's prime vendor PC.",!!
+9 SET PSASTLN=""
SET $PIECE(PSASTLN,"*",80)=""
WRITE PSASTLN,!
KILL PSASTLN
+10 SET DIR("A")="Are you ready to upload the prime vendor invoice data"
SET DIR(0)="Y"
SET DIR("B")="Yes"
SET DIR("??")="^D YNUPLOAD^PSAUP1"
DO ^DIR
KILL DIR
+11 IF 'Y
SET PSAOUT=1
GOTO KILL
+12 IF $DATA(^DIZ(8980,"AOK",DUZ))
SET XTKDIC="^TMP(""PSAX12"",$J,"
SET DWLC=0
SET XTKMODE=2
+13 IF '$DATA(^DIZ(8980,"AOK",DUZ))
DO RFILE^XTKERM4
+14 SET PSAOUT=0
KILL ^TMP("PSAX12",$JOB)
+15 WRITE !!,"Press <ALT> 1 if your Prime Vendor script is installed as a Meta Key,",!,"otherwise press <ALT> F5 and enter ""PV""",!
+16 XECUTE ^%ZOSF("EOFF")
READ X:DTIME
XECUTE ^%ZOSF("EON")
DO HASH^XUSHSHP
IF X'="$4_\y o\Xp>RN}ab*_%,"
SET PSAOUT=1
+17 IF '$GET(PSAOUT)
SET XTKDIC="^TMP(""PSAX12"",$J,"
SET DWLC=0
SET XTKMODE=2
DO RECEIVE^XTKERMIT
+18 IF $GET(PSAOUT)
SET XTKERR="The invoice file cannot be uploaded. Contact your IRM staff for assistance."
KILL ^TMP("PSAPV",$JOB)
HANG 1
+19 IF $GET(XTKERR)'=0
WRITE !!,"ERROR - "_XTKERR
SET PSAOUT=1
QUIT
+20 IF DWLC=0
WRITE !,"ERROR - NO LINES RECEIVED."
SET PSAOUT=1
QUIT
+21 WRITE @IOF,!,"Done",!,"The data uploaded to a temporary file. "_DWLC," lines received.",!!
HANG 2
+22 if '$ORDER(^TMP("PSAX12",$JOB,0))
GOTO KILL
+23 ;
UNWRAP ;Changes the data element and segment delimiters to ^ & ~, places each
+1 ;segment on a node to itself, then removes leading spaces from each
+2 ;data element
+3 WRITE !,"Unwrapping the invoice."
+4 ;
+5 ;Get delimiters
+6 SET (PSABBC,PSAISA,PSALINE,PSASEGD,PSALND)=0
+7 FOR
SET PSALINE=$ORDER(^TMP("PSAX12",$JOB,PSALINE))
if 'PSALINE
QUIT
Begin DoDot:1
+8 IF $EXTRACT($GET(^TMP("PSAX12",$JOB,PSALINE,0)),1,3)="ISA"
SET DAVE=^TMP("PSAX12",$JOB,PSALINE,0)
SET PSASEGD=$EXTRACT(^(0),4,4)
SET PSALND=$EXTRACT(^(0),106,106)
SET PSAISA=1
WRITE "."
QUIT
+9 IF $PIECE($GET(^TMP("PSAX12",$JOB,PSALINE,0)),PSASEGD,2)="DS"
IF $PIECE($GET(^(0)),PSASEGD,3)="BBC"
SET PSABBC=1
End DoDot:1
if PSABBC&(PSAISA)
QUIT
+10 ;If drug company is Bergen (BBC), changes data element to ^ and adds
+11 ;segment delimiters to ~.
+12 IF PSABBC
SET (PSACNT,PSALINE)=0
FOR
SET PSALINE=$ORDER(^TMP("PSAX12",$JOB,PSALINE))
if 'PSALINE
QUIT
Begin DoDot:1
+13 SET PSADATA=^TMP("PSAX12",$JOB,PSALINE,0)_"~"
+14 IF PSASEGD'="^"
SET PSADATA=$TRANSLATE(PSADATA,PSASEGD,"^")
+15 IF $EXTRACT($GET(^TMP("PSAX12",$JOB,PSALINE,0)),1,3)="ISA"
WRITE "."
+16 SET ^TMP("PSAX12",$JOB,PSALINE,0)=PSADATA
End DoDot:1
+17 if PSABBC
GOTO LINE
+18 ;
+19 IF PSASEGD=""!(PSALND="")
Begin DoDot:1
+20 SET PSASTAR=""
SET $PIECE(PSASTAR,"*",80)=""
+21 WRITE !,PSASTAR,!,"There is a major error in the invoice file.",!,"Contact your IRM Staff for assistance."
+22 WRITE !!,"Press the Esc key then enter YES at the 'EXIT SCRIPT (Y/N)' prompt.",!,"Press RETURN to exit the option.",!,PSASTAR
DO END^PSAPROC
End DoDot:1
GOTO KILL
+23 if PSASEGD="~"&(PSALND="^")
GOTO LINE
+24 ;
+25 ;Changes the data element and segment delimiters to ^ and ~.
+26 SET (PSACNT,PSALINE)=0
FOR
SET PSALINE=$ORDER(^TMP("PSAX12",$JOB,PSALINE))
if 'PSALINE
QUIT
Begin DoDot:1
+27 SET PSADATA=^TMP("PSAX12",$JOB,PSALINE,0)
+28 IF PSALND'="~"
SET PSADATA=$TRANSLATE(PSADATA,PSALND,"~")
+29 IF PSASEGD'="^"
SET PSADATA=$TRANSLATE(PSADATA,PSASEGD,"^")
+30 SET ^TMP("PSAX12",$JOB,PSALINE,0)=PSADATA
+31 IF $PIECE(^TMP("PSAX12",$JOB,PSALINE,0),"^")="ISA"
WRITE "."
End DoDot:1
if PSAOUT
QUIT
+32 ;
LINE ;Places each segment on a node to itself.
+1 KILL ^TMP("PSAPV",$JOB)
+2 SET PSAHOLD=""
SET (PSACNT,PSALINE)=0
+3 FOR
SET PSALINE=$ORDER(^TMP("PSAX12",$JOB,PSALINE))
if 'PSALINE
QUIT
Begin DoDot:1
+4 SET PSADATA=^TMP("PSAX12",$JOB,PSALINE,0)
SET PSADATA=PSAHOLD_PSADATA
+5 IF PSADATA'["~"
SET PSAHOLD=PSADATA
QUIT
+6 SET PSASTOP=0
FOR
SET PSASEG=$PIECE(PSADATA,"~")
if PSASEG=""
QUIT
Begin DoDot:2
+7 SET PSACNT=PSACNT+1
SET ^TMP("PSAPV",$JOB,PSACNT,0)=PSASEG
+8 IF $PIECE(PSASEG,"^")="ISA"
WRITE "."
+9 SET PSADATA=$PIECE(PSADATA,"~",2,99)
IF PSADATA'["~"
SET PSASTOP=1
SET PSAHOLD=PSADATA
QUIT
+10 SET PSAHOLD=""
End DoDot:2
if PSASTOP
QUIT
End DoDot:1
+11 ;
SPACES ;remove all leading spaces in all data elements
+1 KILL ^TMP("PSAX12",$JOB)
+2 SET (PSACNT,PSALINE)=0
FOR
SET PSALINE=$ORDER(^TMP("PSAPV",$JOB,PSALINE))
if 'PSALINE
QUIT
Begin DoDot:1
+3 SET PSASEG=^TMP("PSAPV",$JOB,PSALINE,0)
+4 IF $EXTRACT(PSASEG,1,3)="ISA"
SET ^TMP("PSAPVS",$JOB,PSALINE)=^TMP("PSAPV",$JOB,PSALINE,0)
WRITE "."
QUIT
+5 SET PSACNT=0
SET PSASEGL=$LENGTH(PSASEG)
+6 FOR PSAEX=1:1:PSASEGL
SET PSAX=$EXTRACT(PSASEG,PSAEX,PSAEX)
if PSAX="^"
SET PSACNT=PSACNT+1
+7 FOR PSAPC=1:1:(PSACNT+1)
SET PSADE=$PIECE(PSASEG,"^",PSAPC)
Begin DoDot:2
+8 FOR
if $EXTRACT(PSADE,1,1)'=" "
QUIT
SET PSADE=$EXTRACT(PSADE,2,999)
+9 SET $PIECE(PSASEG,"^",PSAPC)=PSADE
End DoDot:2
+10 SET ^TMP("PSAPVS",$JOB,PSALINE)=PSASEG
End DoDot:1
+11 KILL ^TMP("PSAPV",$JOB)
+12 WRITE !,"Finished unwrapping the invoice."
HANG 2
+13 ;
CHECK ;Looks for X12 errors. If no errors, loads data into ^TMP("PSAPV SET",$J)
+1 WRITE !!,"Checking the invoice data."
+2 DO ^PSAUP2
+3 KILL ^TMP("PSAPVS",$JOB)
+4 IF PSAOUT
KILL ^TMP("PSAPV SET",$JOB)
GOTO KILL
+5 WRITE !,"Finished checking the invoice data."
HANG 2
+6 ;
LOADXTMP ;Loads data into ^XTMP("PSAPV").
+1 WRITE !!,"Loading data into VISTA."
+2 DO XTMP^PSAUP1
+3 KILL ^TMP("PSAPV SET",$JOB)
if PSAOUT
GOTO KILL
+4 WRITE !,"Finished loading data into VISTA."
+5 WRITE !!,"** The upload was successful. **"
HANG 4
+6 DO END^PSAPROC
+7 ;
STORE ;Get the line item data and store in ^XTMP("PSAPV")
+1 WRITE @IOF
SET PSANEXT=$ORDER(^XTMP("PSAPV",0))
+2 IF PSANEXT=""
WRITE !,"There are no valid invoices to process."
HANG 1
GOTO KILL
+3 WRITE !,"Searching for and storing the drug data for each line item."
+4 DO ^PSAUP5
+5 WRITE !,"Finished storing the drug data."
HANG 1
+6 ;
PRINT ;Ask if user wants to print invoices.
+1 SET PSASTA="U"
+2 WRITE !
SET DIR(0)="Y"
SET DIR("A")="Print all uploaded invoices"
SET DIR("B")="Y"
SET DIR("?",1)="Enter YES to print the invoices that were uploaded."
SET DIR("?")="Enter NO to bypass printing the invoices and continue."
SET DIR("??")="^D YNPRINT^PSAUP1"
+3 DO ^DIR
KILL DIR
if $GET(DIRUT)
GOTO KILL
if Y
DO ^PSAUP4
+4 ;
PROC ;Ask if user wants to process the invoice data now.
+1 WRITE !
SET DIR(0)="Y"
SET DIR("A")="Do you want to process the invoices now"
SET DIR("B")="Y"
SET DIR("?",1)="Enter YES to process the invoices that were uploaded."
SET DIR("?")="Enter NO to exit the option."
SET DIR("??")="^D YNPROCES^PSAUP1"
+2 DO ^DIR
KILL DIR
if 'Y!($GET(DIRUT))
GOTO KILL
+3 DO KILL
+4 ;
PHARM ;Assign a pharmacy location or master vault to each Order.
+1 ;Then process the invoice data.
+2 SET PSAOUT=0
+3 DO ^PSAPROC
if $GET(PSAOUT)
GOTO EXIT^PSAPROC
+4 ;
PRINT2 WRITE !!
SET DIR(0)="Y"
SET DIR("A")="Print all unprocessed and just processed invoices"
SET DIR("B")="N"
+1 SET DIR("?",1)="Enter YES to print all of the uploaded invoices that are"
SET DIR("?")="unprocessed or just processed. Enter NO to exit the option."
+2 SET DIR("??")="^D PRT2^PSAUP1"
+3 DO ^DIR
KILL DIR
if +Y
DO ^PSAUP4
SET PSAENTRY=0
+4 GOTO EXIT^PSAPROC
+5 ;
KILL ;Kills uploading variables
+1 KILL ^TMP("PSAPV",$JOB),^TMP("PSAPVS",$JOB),^TMP("PSAPV SET",$JOB),^TMP("PSAX12",$JOB)
+2 KILL %,DIR,DIRUT,DWLC,PSABBC,PSACNT,PSACTN1,PSACOMB,PSACS,PSACTRL,PSACTRL2,PSADATA,PSADE,PSADT,PSADUP,PSAENTRY,PSAERR,PSAEX,PSAEXPEC,PSAFND1,PSAGS,PSAHOLD,PSAIEN,PSAIN,PSAINV,PSAINVDT,PSAINVN,PSAISA,PSAISIT,PSAISITN,PSAITCNT,PSAITEM
+3 KILL PSALAST,PSALINE,PSALLCS,PSALLOK,PSALND,PSALOC,PSANDC,PSANEW,PSANEXT,PSANTYPE,PSAOK,PSAORD,PSAORDDT,PSAORDN,PSAOSIT,PSAOSITN,PSAOUT,PSAPC
+4 KILL PSAS,PSASEG,PSASEGL,PSASEGD,PSASS,PSAST,PSASTA,PSASTAR,PSASTCNT,PSASUB,PSASYN,PSAUOM,PSAUOM1,PSAUOMH,PSAUOMH1,PSAVSN,PSAX,X,X1,X2,XTKDIC,XTKERR,XTKMODE,Y
+5 QUIT