Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Used in RPC |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables |  All
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>

Call Graph

Call Graph

Call Graph Total: 11

Package Total Call Graph
VA Point of Service 7 ($$ADDMRAR,$$ERROR,$$FILE,$$RESULT,GREQFLD,TABLE)^VPSMRAR0  ($$SUB52,$$SUB52X)^VPSMRAR2  $$SUB53^VPSMRAR3  ($$SUB54,$$SUB54X)^VPSMRAR4  $$SUB55^VPSMRAR5  $$SUB57^VPSMRAR7  $$VALIDATE^VPSRPC1  
VA FileMan 3 $$FIND1^DIC  UPDATE^DIE  $$GET1^DIQ  
Kernel 1 ($$FMTH,$$FR,$$HTFM,$$NOW)^XLFDT  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

protocol O screenman SM broker B event driver Ed print P extended action Ea limited protocol LP edit E server Se subscriber Su inquire I run routine RR action A

Caller Graph

Caller Graph Total: 1

Package Total Caller Graph
VA Point of Service 1 VPS WRITE MRAR PDO  

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.
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
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
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
;
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
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
;
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

External References

Name Field # of Occurrence
$$FIND1^DIC EXTRACT+53
UPDATE^DIE CRPATPDO+11, CRTSUB51+14
$$GET1^DIQ SUB51+21
$$ADDMRAR^VPSMRAR0 SUB5121+23
$$ERROR^VPSMRAR0 CRPATPDO+15, CRTSUB51+17
$$FILE^VPSMRAR0 SUB51+23
$$RESULT^VPSMRAR0 WRITE+44, VALPARAM+14, VALPARAM+15, VALPARAM+16, VALPARAM+17, EXTRACT+40, EXTRACT+41, EXTRACT+54, EXTRACT+55, SUB51+21
, SUB5121+15, SUB5121+21, SUB5121+24, SUB5121+27, CHKTRN+13
GREQFLD^VPSMRAR0 EXTRACT+26
TABLE^VPSMRAR0 EXTRACT+23
$$SUB52^VPSMRAR2 EXTRACT+67
$$SUB52X^VPSMRAR2 EXTRACT+68
$$SUB53^VPSMRAR3 EXTRACT+72
$$SUB54^VPSMRAR4 EXTRACT+70
$$SUB54X^VPSMRAR4 EXTRACT+71
$$SUB55^VPSMRAR5 EXTRACT+73
$$SUB57^VPSMRAR7 EXTRACT+69
$$VALIDATE^VPSRPC1 VALPARAM+13
$$FMTH^XLFDT EXTRACT+60
$$FR^XLFDT EXTRACT+62
$$HTFM^XLFDT EXTRACT+61
$$NOW^XLFDT WRITE+49

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

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DPT - [#2] VALPARAM+17
^VPS(853.5 - [#853.5] WRITE+44, WRITE+57, GETPTIEN+7, SUB5121+19

Label References

Name Line Occurrences
$$CHKTRN EXTRACT+37
$$CRPATPDO CRPTMRAR+11
$$CRPTMRAR WRITE+40
$$CRTSUB51 WRITE+50
$$GETPTIEN CRPTMRAR+9, CRPTMRAR+13
$$SUB51 EXTRACT+65
$$SUB5121 EXTRACT+66
$$VALPARAM WRITE+36
EXTRACT WRITE+55

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
ADDOK SUB5121+23~*, SUB5121+24
CNDCTWTH SUB5121+14~*, SUB5121+15, SUB5121+19, SUB5121+23
DATA SUB51~, SUB51+21, SUB51+23, SUB5121~, SUB5121+14, SUB5121+15, SUB5121+21, SUB5121+24, SUB5121+27, CHKTRN~
DDARRY EXTRACT+23~, EXTRACT+26
DDARRY( EXTRACT+41, EXTRACT+42, EXTRACT+43, EXTRACT+44, EXTRACT+49
DDFLD EXTRACT+15~, EXTRACT+39*, EXTRACT+40, EXTRACT+41, EXTRACT+42, EXTRACT+43, EXTRACT+44, EXTRACT+49
DIEFLAG EXTRACT+44~*, EXTRACT+47, EXTRACT+57, EXTRACT+63*, EXTRACT+64*, EXTRACT+65, EXTRACT+66, EXTRACT+67, EXTRACT+68, EXTRACT+69
, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73, SUB51~, SUB51+23, SUB5121~, SUB5121+23
DTIEN SUB51~, SUB51+20, SUB5121~, SUB5121+19, SUB5121+23
ERR CRPATPDO+13~*, CRPATPDO+15*, CRPATPDO+16
EXIST SUB5121+19~*, SUB5121+20, SUB5121+22
FIL EXTRACT+42~*, EXTRACT+65, EXTRACT+66, EXTRACT+67, EXTRACT+68, EXTRACT+69, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73
FILE EXTRACT+48~, EXTRACT+49*, EXTRACT+50, EXTRACT+53
FLD EXTRACT+43~*, EXTRACT+65, EXTRACT+67, EXTRACT+69, EXTRACT+70, EXTRACT+72, EXTRACT+73, SUB51~, SUB51+21, SUB51+23
>> FM EXTRACT+61*, EXTRACT+62
>> H EXTRACT+60*, EXTRACT+61, EXTRACT+62
IENS SUB51+20~*, SUB51+23
INTERFC VALPARAM~, VALPARAM+15, CRTSUB51~, CRTSUB51+13, EXTRACT~, EXTRACT+72, EXTRACT+73
OK EXTRACT+58~, EXTRACT+62*, EXTRACT+63
OUT EXTRACT+48~
PATDATA CRPATPDO+14~*, CRPATPDO+15, CRTSUB51+16~*, CRTSUB51+17
PTIEN SUB51~, SUB51+20, SUB51+21, SUB5121~, SUB5121+19, SUB5121+23
REQFLDS EXTRACT+26~, EXTRACT+37, EXTRACT+65, EXTRACT+67, EXTRACT+68, EXTRACT+69, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73
, SUB51~, CHKTRN~
REQFLDS("ENCO UNTER CLINIC" , CHKTRN+11
REQFLDS("KIOS K GROUP" , CHKTRN+11
RES EXTRACT~, EXTRACT+14!
RES( EXTRACT+40*, EXTRACT+41*, EXTRACT+54*, EXTRACT+55*, EXTRACT+65*, EXTRACT+66*, EXTRACT+67*, EXTRACT+68*, EXTRACT+69*, EXTRACT+70*
, EXTRACT+71*, EXTRACT+72*, EXTRACT+73*
RES(0 EXTRACT+38*
RESULT WRITE~, WRITE+54!, WRITE+55, CRPTMRAR+7~, CRPTMRAR+8*, CRPTMRAR+11*, CRPTMRAR+12, CRPTMRAR+14, EXTRACT+33~, EXTRACT+36*
, EXTRACT+37*, EXTRACT+38, SUB51+13~*, SUB51+21*, SUB51+22, SUB51+23*, SUB51+24, SUB5121+11~*, SUB5121+15*, SUB5121+16
, SUB5121+21*, SUB5121+24*, SUB5121+26, CHKTRN+9~*, CHKTRN+13*, CHKTRN+14
RESULT(0 WRITE+36*, WRITE+37, WRITE+40*, WRITE+41, WRITE+44*, WRITE+45, WRITE+50*, WRITE+53
STOPFLG EXTRACT+33~, EXTRACT+34*, EXTRACT+35, EXTRACT+38*
SUB EXTRACT+15~, EXTRACT+32*, EXTRACT+35*, EXTRACT+37, EXTRACT+39, EXTRACT+40, EXTRACT+41, EXTRACT+53, EXTRACT+54, EXTRACT+55
, EXTRACT+59, EXTRACT+65, EXTRACT+66, EXTRACT+67, EXTRACT+68, EXTRACT+69, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73
SUBS EXTRACT+27~
SUBS( EXTRACT+28*, EXTRACT+29*, EXTRACT+68, EXTRACT+71
TRNDT WRITE+48~, WRITE+49*, WRITE+50, WRITE+55, CRTSUB51~, CRTSUB51+12, EXTRACT~, EXTRACT+65, EXTRACT+66, EXTRACT+67
, EXTRACT+68, EXTRACT+69, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73
U VALPARAM+14, VALPARAM+15, EXTRACT+39, EXTRACT+42, EXTRACT+43, EXTRACT+44, EXTRACT+49, EXTRACT+53, EXTRACT+54, EXTRACT+55
, EXTRACT+59, SUB51+21, SUB5121+14
VALID EXTRACT+45~, EXTRACT+46*, EXTRACT+53*, EXTRACT+54, EXTRACT+55, EXTRACT+56
VARRAY EXTRACT~, EXTRACT+26
VARRAY( EXTRACT+35, EXTRACT+37, EXTRACT+39, EXTRACT+40, EXTRACT+41, EXTRACT+53, EXTRACT+54, EXTRACT+55, EXTRACT+59, EXTRACT+65
, EXTRACT+66, EXTRACT+67, EXTRACT+68, EXTRACT+69, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73
VPSDFN WRITE+32~, WRITE+36, WRITE+40, WRITE+44, WRITE+50, WRITE+55, WRITE+57, VALPARAM~, VALPARAM+13*, VALPARAM+14
, VALPARAM+17, CRPTMRAR~, CRPTMRAR+9, CRPTMRAR+11, CRPTMRAR+13, GETPTIEN~, GETPTIEN+7, CRPATPDO~, CRPATPDO+9, CRPATPDO+10
, CRPATPDO+14
VPSERR CRPATPDO+8~, CRPATPDO+15, CRTSUB51+11~, CRTSUB51+17
VPSFDA CRPATPDO+8~, CRTSUB51+11~
VPSFDA( CRPATPDO+10*, CRTSUB51+12*, CRTSUB51+13*
VPSIEN CRPATPDO+8~
VPSIEN(1 CRPATPDO+9*
VPSINTFC WRITE~, WRITE+33*, WRITE+36, WRITE+50, WRITE+55
VPSMRAR WRITE~, WRITE+36, WRITE+55, VALPARAM~, VALPARAM+16
VPSNUM WRITE~, WRITE+34*, WRITE+36, VALPARAM~, VALPARAM+13
VPSPTIEN CRPTMRAR+7~, CRPTMRAR+9*, CRPTMRAR+10, CRPTMRAR+13*, CRTSUB51~, CRTSUB51+12, CRTSUB51+13, CRTSUB51+16, EXTRACT~, EXTRACT+65
, EXTRACT+66, EXTRACT+67, EXTRACT+68, EXTRACT+69, EXTRACT+70, EXTRACT+71, EXTRACT+72, EXTRACT+73
VPSTYP WRITE~, WRITE+35*, WRITE+36, VALPARAM~, VALPARAM+13
Y EXTRACT+58~, EXTRACT+59*, EXTRACT+60, EXTRACT+62
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Used in RPC |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables |  All