Print Page as PDF
OBTAIN FILLS, REFILLS, PARTIAL FILLS FROM PRESCRIPTION FILE ICR (4902)

OBTAIN FILLS, REFILLS, PARTIAL FILLS FROM PRESCRIPTION FILE    ICR (4902)

Name Value
NUMBER 4902
IA # 4902
DATE CREATED 2006/09/13
CUSTODIAL PACKAGE OUTPATIENT PHARMACY
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE PSO52EX
NAME OBTAIN FILLS, REFILLS, PARTIAL FILLS FROM PRESCRIPTION FILE
GENERAL DESCRIPTION
This ICR is provided by Outpatient Pharmacy as an API
to extract information related to original prescription fills, refills, and
partial fills.  This API is to be used by all packages needing to retrieve
data from the "AD", "AL", and "AM" cross references and the "STA" and "PARK"
nodes in the PRESCRIPTION file (#52).
STATUS Active
DURATION Till Otherwise Agreed
ID PSO52EX
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
EXTRACT(SDATE,EDATE,LIST)
FORMAT: D EXTRACT^PSO52EX(SDATE,EDATE,LIST)
VARIABLES TYPE VARIABLES DESCRIPTION
SDATE Input
Start date of record retrieval [REQUIRED]
EDATE Input
End date of record retrieval [OPTIONAL]
LIST Input
Subscript name used in the ^TMP Global [REQUIRED]
TMP Output
^TMP($J,LIST,0)=Total entries found in X-refs or
-1^NO DATA FOUND

Original Fill:  (Returned Every Time) ^TMP($J,LIST,IEN,.01) = RX # (52,.01)
^TMP($J,LIST,IEN,2) = PATIENT (52,2)^NAME (2,.01) ^TMP($J,LIST,IEN,6) = DRUG
(52,6)^GENERIC NAME (50,.01)

^TMP($J,LIST,IEN,7) = QTY (52,7) ^TMP($J,LIST,IEN,8) = DAYS SUPPLY (52,8)
^TMP($J,LIST,IEN,17) = UNIT PRICE OF DRUG (52,17)

Refills: (n = instance of a refill) ^TMP($J,LIST,IEN,"RF",0) = # OF ENTRIES
^TMP($J,LIST,IEN,"RF",n,.01) = REFILL DATE (52.1,.01)^External format
^TMP($J,LIST,IEN,"RF",n,1) = QTY (52.1,1) ^TMP($J,LIST,IEN,"RF",n,1.1)  = DAYS
SUPPLY (52.1,1.1)

^TMP($J,LIST,IEN,"RF",n,1.2) = CURRENT UNIT PRICE OF DRUG (52.1,1.2)

Partial Fills: (n = instance of a partial fill) ^TMP($J,LIST,IEN,"P",0)=# OF
ENTRIES ^TMP($J,LIST,IEN,"P",n,.01) = PARTIAL DATE (52.2,.01)^External format
^TMP($J,LIST,IEN,"P",n,.04) = QTY (52.2,.04) ^TMP($J,LIST,IEN,"P",n,.041) =
DAYS SUPPLY (52.2,.041)

^TMP($J,LIST,IEN,"P",n,.042) = CURRENT UNIT PRICE OF DRUG (52.2,.042)


^TMP($J,LIST,"AL",Date/Time,IEN,Fill)=""
^TMP($J,LIST,"AM",Date/Time,IEN,Fill)=""
REF(SDATE,EDATE,LIST)
FORMAT: D REF^PSO52EX(SDATE,EDATE,LIST)
VARIABLES TYPE VARIABLES DESCRIPTION
SDATE Input
Start date of "AD" cross reference retrieval
[REQUIRED]
EDATE Input
End date of "AD" cross reference retrieval [OPTIONAL]
LIST Input
Subscript name used in the ^TMP Global [REQUIRED]
TMP Output
^TMP($J,LIST,"AD",Date,RX,Fill)=""
ARXREF(PSODATE,PSOIEN,PSOFILL)
FORMAT: S X=$$ARXREF^PSO52EX(PSODATE,PSOIEN,PSOFILL)
VARIABLES TYPE VARIABLES DESCRIPTION
PSODATE Input
Release date/time of prescription [REQUIRED]
PSOIEN Input
Internal entry number from the PRESCRIPTION file
(#52) [REQUIRED]
PSOFILL Input
Fill number of prescription (0 for Original Fill, 1
for Refill #1, 2 for Refill #2, etc.) [REQUIRED]
$$ARXREF Output
0 (zero) = Data does not exist in the "AR" cross
reference, indicating the fill was not dispensed from the Consolidated Mail
Outpatient Pharmacy (CMOP).

1 (one) = Data does exist in the "AR" cross reference, indicating the fill was
dispensed from the CMOP.
PARK(ORIEN)
FORMAT: S X=$$PARK^PSO52EX(ORIEN)
VARIABLES TYPE VARIABLES DESCRIPTION
ORIEN Input
ORIEN Internal entry number from the ORDER FILE
(#100) [REQUIRED]
PARK Output
0 (zero) = Data in the first piece of the "STA" node
is not equal to 0 (zero) or there isn't data in the first piece of the "PARK"
node. This indicates that the prescription does not have the emulated status
of "PARK".

1 (one) = Data in the first piece "STA" node is equal to 0 (zero) and there is
data in the first piece of the "PARK" node. This indicates that the
prescription has the emulated status of "PARK".
SUSP(ORIEN)
FORMAT: S X=$$SUSP^PSO52EX(ORIEN)
VARIABLES TYPE VARIABLES DESCRIPTION
ORIEN Input
ORIEN Internal entry number from the ORDER FILE
(#100) [REQUIRED]
SUSP Output
0 (zero) = Data in the first piece of the "STA" node
is not equal to 5 (Suspended). This indicates that the prescription is not
suspended.

1 (one) = Data in the first piece of the "STA" node is equal to 5 (Suspended).
This indicates that the prescription is suspended.
DATE ACTIVATED 2021/11/15