VBECS MED PROFILE LOOKUP (2482)    REMOTE PROCEDURE (8994)

Name Value
NAME VBECS MED PROFILE LOOKUP
TAG RX
ROUTINE VBECRPCP
RETURN VALUE TYPE GLOBAL ARRAY
AVAILABILITY RESTRICTED
DESCRIPTION
This RPC returns XML containing a list of medications for a patient from 
^TMP("PS",$J,D0,0)=ORDER #_File;PKG^DRUG^INFUSION RATE^STOP DATE^REFILLS
REMAINING^TOTAL DOSE^UNITS PER DOSE^PLACER #^STATUS^LAST FILLDATE^DAYS
SUPPLY^QUANTITY^NOT TO BE GIVEN^PENDING RENEWAL (1 or 0)^ISSUE
DATE(Outpatient) or START DATE(Inpatient)^LAST RELEASE DATE/TIME^LAST FILL
DAY SUPPLY
 
XML Mapping:
PatientName element =          VADM(1)
PatientSsn element =           VADM(2)
PatientDob element =           VADM(3) in HL7 format
the Pharmacy package within a given date range.
BeginningSearchDate element =  SDATE input parameter in HL7 format
EndingSearchDate element =     EDATE input parameter in HL7 format
OrderNumber element =          ORDER #
DrugName element =             DRUG
IssueStartDate element =       ISSUE DATE(Outpatient) or START 
                               DATE(Inpatient)
Status element =               STATUS
InpatientOutpatientIndicator = PKG
 
XML Example:
 
<MedicationProfile>
    <PatientName>VBECSpatient,One</PatientName>
    <PatientSsn>666-66-6666</PatientSsn>
    <PatientDob>Jan 01, 1900</PatientDob>
    <BeginningSearchDate>Oct 01, 2002</BeginningSearchDate>
    <EndingSearchDate>Jul 31, 2003</EndingSearchDate>
    <Order>
        <OrderNumber>4863015</OrderNumber>
        <DrugName>ACETAMINOPHEN 500MG TAB</DrugName>
        <IssueStartDate>Apr 08, 2002</IssueStartDate>
The patient demographic data is provided by the VistA API DEM^VADPT in 
        <Status>EXPIRED</Status>
        <InpatientOutpatientIndicator>O</InpatientOutpatientIndicator>
    </Order>
</MedicationProfile>
the VADM array.
 
The medication related data is provided by the Pharmacy API OCL^PSOORRL in
the ^TMP("PS",$J global array in the following format.
 
INPUT PARAMETER
  • SDATE
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   30
    REQUIRED:   YES
    SEQUENCE NUMBER:   2
    DESCRIPTION:   
    The SDATE input parameters represents the start date required by the Pharmacy API OCL^PSOORRL.
    
  • EDATE
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   30
    REQUIRED:   YES
    SEQUENCE NUMBER:   3
    DESCRIPTION:   
    The EDATE input parameter represents the end date required by the Pharmacy API OCL^PSOORRL.
    
  • DFN
    PARAMETER TYPE:   LITERAL
    MAXIMUM DATA LENGTH:   15
    REQUIRED:   YES
    SEQUENCE NUMBER:   1
    DESCRIPTION:   
    The VistA Patient file (#2) Internal Entry Number.
    
RETURN PARAMETER DESCRIPTION
XML document with a list of medications prescribed for the patient during the specified dates in the input parameters.