Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  Used in RPC |  FileMan Files Accessed Via FileMan Db Call
Print Page as PDF
Routine: VPSMRAR1

Package: VA Point of Service

Routine: VPSMRAR1


Information

VPSMRAR1 ;DALOI/KML,WOIFO/BT - Update of VPS MRAR PDO file ;1/15/15 15:30

Source Information

Source file <VPSMRAR1.m>

Entry Points

Name Comments DBIA/ICR reference
WRITE(RESULT,VPSNUM,VPSTYP,VPSINTFC,VPSMRAR) ; RPC=VPS WRITE MRAR PDO
; Vetlink Kiosk has the Medication Review Allergy Review modules where a veteran can review and make
; changes to his medications and any allergies. The MRAR can also be facilitated by a provider.
; The local arrays identify the field to be updated along with the respective data changes and serves to RPC
;
; INPUT
; RESULT : represents the results of processing and passed in by reference (required by RPC Broker)
; VPSNUM : Parameter Value - patient SSN OR DFN OR ICN OR VIC/CAC (REQUIRED)
; VPSTYP : Parameter TYPE - SSN or DFN OR ICN OR VIC/CAC (REQUIRED)
; VPSINTFC : value of 'S' indicates that the entries in VPSMRAR coming from Staff-facing interface module.
; : value of 'P' indicates that the entries in VPSMRAR coming from Patient-facing interface module.
; VPSMRAR : local array representing the kiosk Medication and Allergy Review passed in by reference
; VPSMRAR represents allergy related fields, medication related fields, and statistical information about the MRAR session.
; Each subscript in the array is assigned a composite, delimited string.
; VPSMRAR(n) = FIELD NAME^ARRAY IENS^DATA
; n is an incremental number
; FIELD NAME represents the name of the field in 853.5 file
; ARRAY IENS represent entry and sub-entry ctrs
; e.g., if patient has 3 allergies with entry numbers of (10,20,30) then a given value "1,20"
; where "1" represents top level entry (patient level; ien and .01) and "20" represents the allergy entry level (.01 not the SUB IEN)
; DATA is the actual data that is populated at an entry in 853.5
;
; OUTPUT
; RESULT : local array that returns the results of each updated field per array data element.
;
; SUCCESS : localArray(n) = FIELD NAME^ARRAY IENS^DATA^1
; 1 equals successful update to the database of the specific field declared at field label.
;
; FAILED : localArray(n)="FIELD NAME^ARRAY IENS^DATA^99^exception message"
; 99 means an exception and no update was made to the database for that specific field and exception message describes the error.
VALPARAM(VPSNUM,VPSTYP,INTERFC,VPSMRAR,VPSDFN) ;Validate RPC Input parameters
; INPUT
; VPSNUM : Parameter Value - patient SSN OR DFN OR ICN OR VIC/CAC (REQUIRED)
; VPSTYP : Parameter TYPE - SSN or DFN OR ICN OR VIC/CAC (REQUIRED)
; INTERFC : value of 'S' indicates that the entries in VPSMRAR coming from Staff-facing interface module.
; : value of 'P' indicates that the entries in VPSMRAR coming from Patient-facing interface module.
; VPSMRAR : encounter, statistics, allergy and medication related data sent in a subscripted array by kiosk client
; OUTPUT
; VPSDFN : Patient DFN
; RETURN
; No Error : ""
; With Error : FIELD^PARAMETER^VALUE^99^error
CRPTMRAR(VPSDFN) ;Create MRAR PDO entry if it does not exist for this patient
; INPUT
; VPSDFN : Patient IEN
;
; OUTPUT
; No Error : ""
; With Error : PATIENT^PATIENT IEN^PATIENT IEN^99^error
GETPTIEN(VPSDFN) ;Return VPS IEN for FILE 853.5 if exist, otherwise return 0
; INPUT
; VPSDFN : Patient IEN
;
; OUTPUT
; VPS IEN for FILE 853.5
;
CRPATPDO(VPSDFN) ;create PDO
; INPUT
; VPSDFN : Patient IEN
;
; OUTPUT
; No Error : ""
; With Error : PATIENT^PATIENT IEN^PATIENT IEN^99^error
;
CRTSUB51(VPSPTIEN,INTERFC,TRNDT) ;create stub entry at 853.51
; INPUT
; VPSPTIEN : VPS IEN for FILE 853.5
; INTERFC : value of 'S' indicates that the entries in VPSMRAR coming from Staff-facing interface module.
; : value of 'P' indicates that the entries in VPSMRAR coming from Patient-facing interface module.
; TRNDT : Transaction Date
;
; OUTPUT
; No Error : ""
; With Error : PATIENT^PATIENT IEN^PATIENT IEN^99^error
;
EXTRACT(VPSPTIEN,INTERFC,TRNDT,VARRAY,RES) ; process each subscript in the MRAR array and file data at MRAR sub-entries at 853.5 patient entry
; INPUT
; VPSPTIEN : VPS IEN for FILE 853.5
; INTERFC : value of 'S' indicates that the entries in VPSMRAR coming from Staff-facing interface module.
; : value of 'P' indicates that the entries in VPSMRAR coming from Patient-facing interface module.
; TRNDT : Transaction Date
; VARRAY : encounter, statistics, allergy and medication related data sent in a subscripted array by kiosk client
; VARRAY(n) = FIELD NAME^ARRAY IENS^FIELD VALUE
;
; OUTPUT
; RES : output result array.
; Success : RES(n) = Field Name^IENS^Field Value^1
; failed : RES(n) = Field Name^IENS^Field Value^99^error text describing why data did not get filed
; IENS is composite string assigned to a subscript in the local array passed in by Vecna for the specific field
SUB51(PTIEN,DTIEN,FLD,DIEFLAG,DATA,REQFLDS) ; file the MRAR transaction (853.51)
; INPUTS
; PTIEN : D0 for 853.5 entry (Patient DFN Level)
; DTIEN : D1 for 853.51 sub-entry (transaction date/time level)
; FLD : Field # where the data will be filed
; DIEFLAG : Filing Type (I = Internal, E = External)
; DATA : Field Name^IENS^Field Value
; REQFLDS : Array of required fields by fieldname and entry number
;
; OUTPUT
; success : RESULT = Field Name^IENS^Field Value^1
; failed : RESULT = Field Name^IENS^Field Value^99^error text describing why data did not get filed
SUB5121(PTIEN,DTIEN,DATA,DIEFLAG) ; file the 'MRAR conducted with' multiple (853.5121)
; INPUTS
; PTIEN : D0 for 853.5 entry (Patient DFN Level)
; DTIEN : D1 for 853.51 sub-entry (transaction date/time level)
; DATA : Field Name^IENS^Field Value
; DIEFLAG : Filing Type (I = Internal, E = External)
;
; OUTPUT
; success : RESULT = Field Name^IENS^Field Value^1
; failed : RESULT = Field Name^IENS^Field Value^99^error text describing why data did not get filed
CHKTRN(REQFLDS,DATA) ;Check required transaction fields
; INPUTS
; REQFLDS : Array of required fields by fieldname and entry number
; DATA : Field Name^IENS^Field Value
;
; OUTPUT
; success : RESULT = Field Name^IENS^Field Value^1
; failed : RESULT = Field Name^IENS^Field Value^99^error text describing why data did not get filed

Used in RPC

RPC Name Call Tags
VPS WRITE MRAR PDO WRITE

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^TIU(8925 - [#8925] GET1^DIQ
Info |  Source |  Entry Points |  Used in RPC |  FileMan Files Accessed Via FileMan Db Call