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
Print Page as PDF
Routine: VPSPARAM

Package: VA Point of Service

Routine: VPSPARAM


Information

VPSPARAM ;WOIFO/BT - Update VPS PARAMETER file ;11/14/12 15:30

Source Information

Source file <VPSPARAM.m>

Entry Points

Name Comments DBIA/ICR reference
WRITE(RESULT,PARAMTYP,PARAMNAM,PARAM) ; RPC: VPS WRITE KIOSK PARAMETERS
; Many facets of MRAR behavior are dictated by a set of business parameters defined and
; entered by the healthcare facility administrator.
; For statistical purposes, VetLink will call this RPC to store these configuration changes.
; There are two ways to store the configuration changes, by KioskGroup and by Clinic.
;
; INPUT
; RESULT : the results of processing and passed in by reference (required by RPC Broker)
; PARAMTYP : type of configuration changes, By KIOSK GROUP (K) or by Clinic (C).
; PARAMNAM : KIOSK GROUP or CLINIC IEN depend on the PARMTYP.
; PARAM : array representing the configuration parameters changed made in Vetlinks passed in by reference
; PARAM(0..n) = FIELD NAME^FIELD VALUE
; n is an incremental number;
; FIELD NAME represents the field that was changed in VetLink
; FIELD VALUE is the actual data that was updated in VetLink and to be stored in File 853.
;
; OUTPUT
; RESULT : array that returns the results of each updated field per array data element.
; SUCCESS RESULT:
; RESULT(n) = FIELD NAME^FIELD VALUE^1
; '1' at the end of the result string indicates successful update to the database of the specific field declared at field label.
;
; FAILED RESULT :
; RESULT(n)="FIELD NAME^FIELD VALUE^99^exception message"
; '99^exception message' at the end of the result string indicates an exception and no update was made to the database for that specific field and exception message describes the error.
UPDPARAM(PARAMTYP,PARAMNAM,PARAM,RESULT) ;Store input parameters
; INPUT
; PARAMTYP : type of configuration changes, By KIOSK GROUP (K) or by Clinic (C).
; PARAMNAM : KIOSK GROUP or CLINIC IEN depend on the PARMTYP.
; PARAM : array representing the configuration parameters changed made in Vetlinks passed in by reference
; PARAM(0..n) = FIELD NAME^FIELD VALUE
; n is an incremental number;
; FIELD NAME represents the field that was changed in VetLink
; FIELD VALUE is the actual data that was updated in VetLink and to be stored in File 853.
;
; INPUT/OUTPUT
; RESULT : array that returns the results of each updated field per array data element.
; SUCCESS RESULT:
; RESULT(n) = FIELD NAME^FIELD VALUE^1
; '1' at the end of the result string indicates successful update to the database of the specific field declared at field label.
;
; FAILED RESULT :
; RESULT(n)="FIELD NAME^FIELD VALUE^99^exception message"
; '99^exception message' at the end of the result string indicates an exception and no update was made to the database for that specific field and exception message describes the error.
STRMULT(RESULT,PARAMIEN,TRNDT,FLDDEF,MULT) ; Store multiple fields
; INPUT/OUTPUT
; RESULT : array that returns the results of each updated field per array data element.
; INPUT
; TRNDT : Transaction Date/Time - this field is also used as SUB IEN for this Transaction Level
; PARAMIEN : PARAMETER IEN for file 853
; FLDDEF : array of field name definition
; MULT : array of multiple field entries
; RSNTYP : array of Incomplete Reason Types
ISVALID(PARAMTYP,PARAMNAM,PARAM) ;validate RPC input parameters
; INPUT
; PARAMTYP : type of configuration changes, (eg, By KIOSK GROUP (K) or by Clinic (C)).
; PARAMNAM : Value of Parameter, (eg, KIOSK GROUP or CLINIC IEN depend on the PARMTYP.)
; PARAM : local array representing the configuration parameters changed made in Vetlinks passed in by reference
; OUTPUT
; SUCCESS : Empty String
; FAILED : FIELD NAME^FIELD VALUE^99^exception
CRPARAM(PARAMTYP,PARAMNAM) ; Create PARAM entry in root level of file #853
; INPUT
; PARAMTYP : type of configuration changes, (eg, By KIOSK GROUP (K) or by Clinic (C)).
; PARAMNAM : Value of Parameter, (eg, KIOSK GROUP or CLINIC IEN depend on the PARMTYP.)
; OUTPUT
; SUCCESS : Empty String
; FAILED : FIELD NAME^FIELD VALUE^99^exception
GPARMIEN(PARAMTYP,PARAMNAM) ; Get PARAM IEN for FILE 853
; INPUT
; PARAMTYP : type of configuration changes, (eg, By KIOSK GROUP (K) or by Clinic (C)).
; PARAMNAM : Value of Parameter name, (eg, KIOSK GROUP or CLINIC name depend on the PARMTYP.)
; OUTPUT
; SUCCESS : PARAMETER IEN for FILE 843
; FAILED : Empty string
STRFIL(TRNDT,PARAMIEN,UPDFLD,FLDNAM,FLDVAL) ; Store the modified field value
; INPUT
; TRNDT : Transaction Date/Time - this field is also used as SUB IEN for this Transaction Level
; PARAMIEN : PARAMETER IEN for file 853
; UPDFLD : field info (File Number^Field Number^input type)
; FLDNAM : field name to update
; FLDVAL : field value to update
; OUTPUT
; SUCCESS : FIELD NAME^FIELD VALUE^1
; FAILED : FIELD NAME^FIELD VALUE^99^exception message
;
; create entry in Transaction Date/Time level
ADDTRXN(TRNDT,PARAMIEN) ; create an entry in Transaction Date/Time level
; INPUT
; TRNDT : Transaction Date/Time - this field is also used as SUB IEN for this Transaction Level
; PARAMIEN : PARAMETER IEN for file 853
; RETURN
; SUCCESS : empty string
; FAILED : FIELD NAME^FIELD VALUE^99^exception message
UPDTRXN(PARAMIEN,TRNDT,UPDFLD,FLDNAM,FLDVAL) ; update fields in transaction level
; INPUT
; PARAMIEN : PARAMETER IEN for file 853
; TRNDT : Transaction Date/Time - this field is also used as SUB IEN for this Transaction Level
; UPDFLD : field info (File Number^Field Number^input type^Admin level Field Number^Admin level Field name)
; FLDNAM : field name to update
; FLDVAL : field value to update
; OUTPUT
; SUCCESS : FIELD NAME^FIELD VALUE^1
; FAILED : FIELD NAME^FIELD VALUE^99^exception message
;
ADDMULT(FIL,PARAMIEN,TRNDT,RSNSUB,RSNTYP,ERR) ; Add field .01 for Multiple fields if doesn't exist
; INPUT
; FIL : File number (853.011, 853.012, 853.013)
; PARAMIEN : PARAMETER IEN for file 853
; TRNDT : Transaction Date/Time - this field is also used as SUB IEN for this Transaction Level
; RSNSUB : This is the literal subscript for the sub file (eq: ARREASON, MRREASON, AMRREASON)
; RSNTYP : field value of Incomplete Reason Type
; OUTPUT
; ERR : FileMan Error array
; RETURN
; Multiple SUBS IEN
;
ERROR(FDAERR,FLDNAME,FLDVAL) ; Return error string that VetLink can recognize
; INPUT
; FDAERR : error array that was created when attempting to file the changes
; FLDNAME: the field that has invalid value
; FLDVAL : the invalid value
; RETURN
; Field Name^Field Value^99^error
RESULT(STATCODE,FLDNAME,FLDVAL,ERRMSG) ;return result in the structure that VetLink expects
; INPUT
; STATCODE : status code (1 = successfull, 99 = error)
; FLDNAME : field name
; FLDVAL : field value
; ERRMSG : (OPTIONAL) error message to send back to RPC caller
; RETURN
; FLDNAME^FLDVAL^STATCODE^ERMSG
TABLE(FLDDEF) ;build array of valid fields defined to VPS PARAMETER (#853)
; INPUT/OUTPUT
; FLDDEF : array by field names
; FLDDEF(field name)=file number^field number^input type^root field number
; type : I(nternal) or E(xternal)
; root field number : optional field. this field contains the current field value of the field being updated
; ex: FLDDEF("PDO INVOCABLE PDO")="853.01^1^I^.02"
PARMFLDS ; list of Configuration Parameter Statistics fields defined in VPS PARAMETER file (#853)

Used in RPC

RPC Name Call Tags
VPS WRITE KIOSK PARAMETERS WRITE
Info |  Source |  Entry Points |  Used in RPC