PSOUTL ;BHAM ISC/SAB - PSO utility routine ;Jun 22, 2018@08:18
Source file <PSOUTL.m>
Package | Total | Call Graph |
---|---|---|
VA FileMan | 8 | ^%DT (C,NOW)^%DTC EN^DDIOL ^DIC ^DIE ^DIK $$GET1^DIQ ^DIR |
Outpatient Pharmacy | 5 | REF^PSOCAN2 (KCMPX,SCMPX)^PSOCMOP ^PSOCMOPA ^PSODGAL1 ($$REFIP,WARN1)^PSOUTLA1 |
Pharmacy Data Management | 2 | ^PSSDIUTL $$DRG^PSSDSAPM |
Integrated Billing | 1 | $$SERV^IBARX1 |
MailMan | 1 | ^XMD |
Registration | 1 | (DEM,KVA)^VADPT |
Name | Comments | DBIA/ICR reference |
---|---|---|
SUSPCAN | ;dcl rx from suspense used in new, renew AND verification of Rxs
|
|
ACTLOG | ;
|
|
ACTOUT | ||
QUES | ;INSTRUCTIONS FOR RENEW AND REFILL
|
|
ENDVCHK | ||
CHK1 | ||
K52 | ||
S52 | ||
KILL | ||
CID | ;calculates six months limit on issue dates
|
|
CIDH | ||
SPR | ||
SREF | ||
KPR | ||
KREF | ||
ORIG | ||
EX | ||
IBSS | ||
IBSSR | ||
WARN | ;
|
|
WARN1 | ;move to PSOUTLA1
|
|
CAN(PSOXRX) | ;Clean up Rx when discontinued
|
|
ECAN(PSOXRX) | ;Clean up Rx when expired
|
|
CMOP | ;CMOP("L")=LAST FILL... if it is orig Rx =0
|
|
CMOP1 | ||
CHKCMOP(RX,REA) | ;Check if an RX is Transmitted/Retransmitted to CMOP and send alert mail
|
|
TRANCMOP(RX) | ;check if a fill is Transmitted or Retransmitted
|
|
MAILCMOP(RX,STR,REA) | ;Send mail message to mail group PSX EXTERNAL DISPENSE ALERTS
|
|
PSOCK | ;
|
|
PSSDGCK | ;
|
|
PSOSUPCK(CHK) | ;
|
|
OICHK(DGCKSTA,DGCKDNM) | ;only orderable item on order (no drug)
|
|
DISCK(PSRX) | ;
|
|
PRFLP | ;
|
|
TITRX(RX) | ; Returns the titration/maintenance flags
|
|
LTHEN(RX) | ; Looks for a THEN anywhere in the Complex Order.
; Returns: 1 if found and 0 if not found. Complex Order must contain at least one THEN conjunction ; in order to mark it as a Titration Rx. |
|
CONJ(PSOCRX) | ;Looks for EXCEPT conjunction; EXCEPT conjunction disabled with PSO*7*477
|
|
CSID() | ; Determinte if the ISSUE DATE is for a CS or non-CS (Internal to this routine only)
|
|
CSRX(RXIEN) | ; Controlled Substance Rx?
; Input: RXIEN - PRESCRIPTION file (#52) pointer |
Name | Field # of Occurrence |
---|---|
^%DT | CID+1, CIDH |
C^%DTC | DISCK+5 |
NOW^%DTC | KILL+16 |
EN^DDIOL | CIDH, IBSS+7, WARN+2, WARN+4, WARN+5, WARN+11, WARN+15, WARN+16, WARN+20, WARN+21 , WARN+22 |
^DIC | OICHK+12, PRFLP+5, PRFLP+6 |
^DIE | IBSSR+1, CAN+6, ECAN+6 |
^DIK | CAN+3, CAN+4, ECAN+3, ECAN+4 |
$$GET1^DIQ | MAILCMOP+9, MAILCMOP+24, MAILCMOP+27, MAILCMOP+28, MAILCMOP+29, TITRX+4, TITRX+5, CSID+4, CSID+9, CSRX+4 , CSRX+5 |
^DIR | WARN+28 |
$$SERV^IBARX1 | IBSSR+1 |
REF^PSOCAN2 | CAN+3 |
KCMPX^PSOCMOP | K52+4, KILL+11, KILL+12 |
SCMPX^PSOCMOP | S52+4 |
^PSOCMOPA | TRANCMOP+8 |
^PSODGAL1 | PRFLP+22 |
$$REFIP^PSOUTLA1 | WARN+19 |
WARN1^PSOUTLA1 | WARN1+1 |
^PSSDIUTL | PSSDGCK+1 |
$$DRG^PSSDSAPM | OICHK+11 |
DEM^VADPT | MAILCMOP+24 |
KVA^VADPT | MAILCMOP+43 |
^XMD | MAILCMOP+42 |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: READ |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Routine Call |
|
Routine Call |
|
Routine Call |
|
FileNo | Call Tags |
---|---|
^PSDRUG - [#50] | GET1^DIQ |
^PSRX - [#52] | Classic Fileman Calls, GET1^DIQ |
^PS(52.4 - [#52.4] | Classic Fileman Calls |
^PS(52.5 - [#52.5] | Classic Fileman Calls |
^PS(59 - [#59] | Classic Fileman Calls |
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^DD("DD" | CIDH |
^DIC(49 - [#49] | IBSSR+1 |
^DPT - [#2] | KILL+2 |
^PS(50.7 - [#50.7] | PRFLP+19 |
^PS(52.4 - [#52.4] | CAN+4, ECAN+4 |
^PS(52.41 - [#52.41] | OICHK+6 |
^PS(52.5 - [#52.5] | K52, K52+1, K52+2, K52+3!, K52+4!, K52+5!, S52+1, S52+2, S52+3*, S52+4* , S52+5*, KILL+2, KILL+4!, KILL+5, KILL+6!, KILL+7!, KILL+8, KILL+10, KILL+11!, KILL+12! , KILL+13!, KILL+14!, CAN+3, ECAN+3, CMOP1+4 |
^PS(55 - [#55] | ACTOUT*, ACTOUT+2, ACTOUT+3*, OICHK+9 |
^PS(59 - [#59] | MAILCMOP+14 |
^PSDRUG - [#50] | PSOSUPCK+2, PRFLP+19, PRFLP+20 |
^PSRX - [#52] | SUSPCAN+1, SUSPCAN+2!, SUSPCAN+3*, ACTLOG+2*, ACTOUT, ACTOUT+1, ACTOUT+3, ENDVCHK, CHK1, CHK1+1 , K52+1, S52, S52+1, KILL+2*, KILL+15, KILL+17*, KILL+18*, KILL+20*, SPR, SPR+1* , SREF, SREF+1*, SREF+2*, KPR, KPR+2*, KREF+1*, KREF+2, ORIG*, ORIG+1*, WARN+9 , WARN+10, WARN+14, CAN+2, CAN+3, CAN+5*, CAN+6, ECAN+2, ECAN+5*, ECAN+6, CMOP1+1 , CMOP1+2, CMOP1+3, MAILCMOP+14, DISCK+4, TITRX+3, LTHEN+5, LTHEN+6, CONJ+2, CONJ+4, CONJ+5 , CSID+4 |
^PSRX("AH" | CAN+5!, ECAN+5! |
^XMB(3.8 - [#3.8] | MAILCMOP+19, MAILCMOP+20 |
^XUSEC("PSXCMOPMGR" | MAILCMOP+22 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
>> % | KILL+17 |
>> %DT | CID+1*, CIDH* |
>> %DT(0 | CID+1* |
ANS | ENDVCHK~, CHK1+1*, CHK1+2, CHK1+3 |
CHK | PSOSUPCK~, PSOSUPCK+2!, PSOSUPCK+5! |
CMDT | MAILCMOP+7~, MAILCMOP+10*, MAILCMOP+11*, MAILCMOP+38 |
CMOP | WARN+3!, WARN+6!, CHKCMOP+6~ |
CMOP( | WARN+3, WARN+4, CMOP1+3* |
CMOP("L" | CMOP1+1* |
CMOP("S" | CMOP1+4* |
CMST | MAILCMOP+7~, MAILCMOP+13*, MAILCMOP+31, MAILCMOP+38 |
CNT | KILL+15*, KILL+16*, KILL+17, KILL+18, KILL+20! |
CRX | CMOP+5*, CMOP1+1, CMOP1+2, CMOP1+3, CMOP1+4, CMOP1+5! |
CSID | CSID+2~*, CSID+10*, CSID+12 |
DA | KILL+16*, KILL+17, KPR+1, KREF+2, IBSSR+1*, WARN+3, WARN+4, WARN+10, WARN+14, WARN+19 , CAN+1~, CAN+3*, CAN+4*, CAN+6*, ECAN+1~, ECAN+3*, ECAN+4*, ECAN+6*!, CMOP+5, TRANCMOP+7~ , TRANCMOP+8*, CSID+4 |
DA(1 | K52, S52, S52+1, KILL+2, KILL+15, KILL+17, KILL+18, KILL+20, SPR, SPR+1 , SREF, SREF+1, SREF+2, KPR, KPR+2, KREF+1, KREF+2, ORIG, ORIG+1, WARN+9 , WARN+10, WARN+14, WARN+19 |
DEA | CSID+2~, CSID+9*, CSID+10, CSRX+3~, CSRX+5*, CSRX+6 |
DFN | KILL~, KILL+2*, KILL+4, KILL+7, KILL+14!, MAILCMOP+7~, MAILCMOP+24*, OICHK+9, PRFLP+21 |
DGCKDNM | OICHK~, OICHK+5, OICHK+8, PRFLP+2*, PRFLP+4*, PRFLP+5, PRFLP+9, PRFLP+12, PRFLP+14, PRFLP+15* , PRFLP+16*, PRFLP+17, PRFLP+24! |
DGCKSTA | OICHK~, OICHK+4, OICHK+5, OICHK+7, OICHK+8, PRFLP+2*, PRFLP+4*, PRFLP+9, PRFLP+12, PRFLP+14 , PRFLP+24! |
DIC | OICHK+12*!, PRFLP+5*!, PRFLP+6*! |
DIC(0 | OICHK+12*, PRFLP+5*, PRFLP+6* |
DIE | IBSSR+1*!, CAN+6!*, ECAN+6!* |
DIK | CAN+3*!, CAN+4*!, ECAN+3!*, ECAN+4!* |
DIR | WARN+23!, WARN+29! |
DIR("?" | WARN+27* |
DIR("A" | WARN+24* |
DIR("B" | WARN+25* |
DIR(0 | WARN+26* |
DIV | MAILCMOP+8~, MAILCMOP+14* |
DIVN | MAILCMOP+8~, MAILCMOP+14*, MAILCMOP+31 |
DOSE1 | CONJ+3~, CONJ+5*, CONJ+6 |
DOSEIEN | CONJ+3~, CONJ+4*, CONJ+5 |
DR | IBSSR+1*, CAN+6*, ECAN+6*! |
DRGIEN | CSID+2~, CSID+4*, CSID+6*, CSID+8, CSID+9, CSRX+3~, CSRX+4*, CSRX+5 |
DRUG | MAILCMOP+8~, MAILCMOP+28*, MAILCMOP+34 |
DT | ACTLOG+2, ACTOUT, CAN+6, ECAN+6, DISCK+6 |
DTIME | CHK1+1 |
DTOUT | OICHK+2~, OICHK+12!, PRFLP+23!, PRFLP+24! |
DUOUT | OICHK+2~, OICHK+12!, PRFLP+23!, PRFLP+24! |
DUZ | KILL+17 |
EXCEPT | CONJ+3~, CONJ+6*, CONJ+7 |
FILL | MAILCMOP+8~, MAILCMOP+12*, MAILCMOP+32 |
FNDTHEN | LTHEN+3~, LTHEN+4*, LTHEN+5, LTHEN+7*, LTHEN+8 |
IFN | CAN+1~ |
MAILGRP | MAILCMOP+8~, MAILCMOP+15*, MAILCMOP+16, MAILCMOP+19 |
NAME | MAILCMOP+8~, MAILCMOP+25*, MAILCMOP+33 |
NODE | SPR*, SPR+1, SREF*, SREF+1, SREF+2, SREF+3!, KPR*, KPR+1*, KPR+2, KREF* , KREF+1, KREF+2, ORIG, ORIG+1, EX!, CAN+1~ |
PAT | KILL+2*, KILL+4, KILL+14! |
PRV | MAILCMOP+8~, MAILCMOP+29*, MAILCMOP+39 |
>> PSDFN | ACTOUT, ACTOUT+2, ACTOUT+3 |
>> PSFROM | QUES+1 |
PSI | SUSPCAN+1*, SUSPCAN+2*!, SUSPCAN+3!, ACTLOG+2*, ACTOUT*, ACTOUT+1* |
PSID | CID+1*! |
PSLAST | SUSPCAN+1*, SUSPCAN+2! |
>> PSMSG | ACTLOG+2 |
PSOALLGY | PRFLP+1~ |
PSOALLGY( | PRFLP+14*, PRFLP+16, PRFLP+17 |
PSOC7 | KILL+10~*, KILL+11, KILL+12 |
>> PSOCLC | ACTLOG+2 |
PSOCMOP | CHKCMOP+6~, CHKCMOP+8, TRANCMOP+9 |
PSOCOUNT | LTHEN+3~, LTHEN+4*, LTHEN+5*, LTHEN+6 |
PSOCRX | CONJ~, CONJ+2, CONJ+4, CONJ+5 |
PSODATA | PRFLP+1~, PRFLP+17*, PRFLP+18, PRFLP+21 |
>> PSODFN | PRFLP+21* |
PSODGCKF | PRFLP+2*, PRFLP+24! |
>> PSODGCKX | PSOSUPCK+1 |
PSODGCRX | PRFLP+1~, PRFLP+21* |
>> PSODIV | ENDVCHK |
PSODRIEN | PRFLP+1~, PRFLP+15*, PRFLP+16*, PRFLP+17 |
PSODRUG | PRFLP+1~ |
PSODRUG("IEN" | PRFLP+13*, PRFLP+14, PRFLP+17*, PRFLP+19, PRFLP+20, CSID+6 |
PSODRUG("NAME" | PRFLP+13*, PRFLP+14, PRFLP+18* |
PSODRUG("NDF" | PRFLP+20* |
PSODRUG("OI" | PRFLP+19* |
PSODRUG("OIN" | PRFLP+19* |
PSODRUG("VA C | LASS" , PRFLP+13*, PRFLP+14, PRFLP+18* |
PSODRUG2 | OICHK+2~, OICHK+11*, OICHK+12, OICHK+13! |
PSOHLP | IBSS~, IBSS+7! |
PSOHLP(1 | IBSS*, IBSS+1* |
PSOHLP(2 | IBSS+2*, IBSS+3* |
PSOHLP(3 | IBSS+4*, IBSS+5* |
PSOHLP(4 | IBSS+6* |
PSOI | OICHK+2~, OICHK+3*, OICHK+6*, OICHK+9*, OICHK+10, OICHK+11, OICHK+13! |
PSOIBFL | IBSSR~*, IBSSR+1* |
PSOIBLP | IBSSR~, IBSSR+1* |
PSOIBST | IBSSR~, IBSSR+1* |
PSOIEN | MAILCMOP+7~, MAILCMOP+19*, MAILCMOP+20 |
PSOKEYN | MAILCMOP+7~, MAILCMOP+21*, MAILCMOP+22*, MAILCMOP+23 |
PSOL | WARN+8~, WARN+9*, WARN+10 |
>> PSOPSDAL | KILL+20 |
PSORD | OICHK+2~, OICHK+5*, OICHK+6, OICHK+8*, OICHK+9, OICHK+13! |
>> PSOSD | PRFLP+3 |
>> PSOSD( | OICHK+5, OICHK+8, PRFLP+4, PRFLP+12, PRFLP+14 |
PSOSFN | K52!* |
>> PSOSITE | ENDVCHK, IBSSR+1 |
PSOSX | S52*, S52+6! |
PSOSXDT | S52+6! |
>> PSOSYS | CHK1, CHK1+1 |
PSOTEXT | MAILCMOP+7~ |
PSOTEXT(1 | MAILCMOP+32* |
PSOTEXT(2 | MAILCMOP+33* |
PSOTEXT(3 | MAILCMOP+34* |
PSOTEXT(4 | MAILCMOP+35*, MAILCMOP+36*, MAILCMOP+37* |
PSOTEXT(5 | MAILCMOP+38* |
PSOTEXT(6 | MAILCMOP+39* |
PSOTEXT(7 | MAILCMOP+40* |
PSOTEXT(8 | MAILCMOP+41* |
PSOTHEN | LTHEN+3~, LTHEN+4*, LTHEN+6*, LTHEN+7 |
PSOTRANS | TRANCMOP+7~, TRANCMOP+9*, TRANCMOP+10 |
>> PSOUNHLD | WARN+1 |
PSOXRX | CAN~, CAN+2, CAN+3, CAN+4, CAN+5, CAN+6, ECAN~, ECAN+2, ECAN+3, ECAN+4 , ECAN+5, ECAN+6 |
PSOXX | K52+1~*, KILL+18, KILL+20 |
PSPOP | ENDVCHK~*, CHK1*, CHK1+1*, CHK1+3* |
PSR | WARN+8~, WARN+9* |
>> PSREA | ACTLOG+2, ACTOUT, ACTOUT+1, ACTOUT+3 |
PSRX | SUSPCAN+1, SUSPCAN+2, SUSPCAN+3, ACTLOG+2, ACTOUT, ACTOUT+1, ACTOUT+2, ACTOUT+3, ENDVCHK, CHK1 , CHK1+1, DISCK~, DISCK+4, PRFLP+1~, PRFLP+12* |
>> PSRXREF | ACTLOG+2 |
PSS | ACTLOG+1~, ACTOUT+1*, ACTOUT+2 |
REA | CHKCMOP~, CHKCMOP+7*, CHKCMOP+8, MAILCMOP~, MAILCMOP+36, MAILCMOP+37 |
>> RESK | KILL+20 |
RF | SPR*, SREF+3!, KPR*, EX!, CAN+1~ |
RFID | S52*, S52+3, S52+4, S52+5, S52+6! |
RIFN | S52*, S52+6! |
RX | CHKCMOP~, CHKCMOP+8, TRANCMOP~, TRANCMOP+8, TRANCMOP+10, MAILCMOP~, MAILCMOP+9, MAILCMOP+14, MAILCMOP+24, MAILCMOP+27 , MAILCMOP+28, MAILCMOP+29, TITRX~, TITRX+2, TITRX+3, TITRX+4, TITRX+5, LTHEN~, LTHEN+5, LTHEN+6 |
RXIEN | CSRX~, CSRX+4 |
RXO | MAILCMOP+8~, MAILCMOP+9*, MAILCMOP+31, MAILCMOP+32 |
RXSTS | MAILCMOP+8~, MAILCMOP+27*, MAILCMOP+35 |
SDT | K52+3*, K52+4, K52+5, K52+6! |
SFN | K52*, K52+1, K52+2, K52+3, K52+4, K52+5, K52+6!, S52+1*, S52+2, S52+3 , S52+4, S52+5, S52+6!, KILL+1, KILL+2, KILL+4, KILL+5, KILL+6, KILL+7, KILL+8 , KILL+10, KILL+11, KILL+12, KILL+13, KILL+14! |
SSN | MAILCMOP+8~, MAILCMOP+26*, MAILCMOP+33 |
STR | MAILCMOP~, MAILCMOP+10, MAILCMOP+12, MAILCMOP+13 |
SUB | KILL+15*, KILL+20! |
SUS1 | SUSPCAN+2!, SUSPCAN+3! |
SUS2 | SUSPCAN+2!, SUSPCAN+3! |
SUSD | CAN+1~, CAN+3* |
SUSX | SUSPCAN+2!, SUSPCAN+3! |
U | MAILCMOP+10, MAILCMOP+12, MAILCMOP+13 |
VADM | MAILCMOP+7~ |
VADM(1 | MAILCMOP+25 |
VADM(2 | MAILCMOP+26 |
X | K52+2, CID+1*, CIDH*, KPR+1, KREF+2, CMOP1~, CMOP1+1*, CMOP1+2*, CMOP1+3, CMOP1+4* , CMOP1+5!, OICHK+12*, DISCK+3~, DISCK+6, PRFLP+5*, PRFLP+6*, PRFLP+23!, PRFLP+24! |
X1 | DISCK+3~, DISCK+4* |
X2 | DISCK+3~, DISCK+4* |
XMDUZ | MAILCMOP+7~, MAILCMOP+30* |
XMSUB | MAILCMOP+7~, MAILCMOP+31* |
XMTEXT | MAILCMOP+7~, MAILCMOP+42* |
XMY | MAILCMOP+7~ |
XMY( | MAILCMOP+23* |
XMY("G." | MAILCMOP+16* |
Y | K52+2, CID+1, CIDH, IBSSR+1*, WARN+19, OICHK+12*, DISCK+3~, PRFLP+6, PRFLP+7, PRFLP+10 , PRFLP+13, PRFLP+23!, PRFLP+24! |
Y(0 | PRFLP+13 |