Print Page as PDF
XSAPXUTL APIs ICR (6458)

XSAPXUTL APIs    ICR (6458)

Name Value
NUMBER 6458
IA # 6458
DATE CREATED 2016/08/17
CUSTODIAL PACKAGE VISTA SERVICES ASSEMBLER
USAGE Controlled Subscription
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XSAPXUTL
NAME XSAPXUTL APIs
GENERAL DESCRIPTION
This ICR allows any VistA application that uses the
VISTA SERVICES ASSEMBLER (VistA.js) Platform to call these APIs in order to
create supported VistA.js REST services.
STATUS Active
KEYWORDS
  • VISTA SERVICES ASSEMBLER
  • VSA
  • XSAPXUTL
DURATION Till Otherwise Agreed
ID XSAPXUTL
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
INIT(.SOURCE,.TARGET)
This function is the first function called by all VSA
functions and other m service functions. The primary purpose is to initialize
the VSA package-wide common variables.
VARIABLES TYPE VARIABLES DESCRIPTION
SOURCE Input
(Required) A closed global root, passd by reference,
containing source input parameters required by the calling function. The
SOURCE input global array is set by the VistA Services Assembler JavaScript
software through the cache.node interface. The input variable(s) for each
function are set in the last subscript of the SOURCE global.
TARGET Both
(Required) A closed global root, passed by reference,
where the results of a VistA.js m function are returned. Errors are also
returned in the TARGET global array.  All results for a successful, or failed,
VistA.js function call are returned in the TARGET global node.
INITPARM(.PARAM)
This API is used to initialize input parameters to
the empty string if passed in through VistA.js as a JavaScript null value.  A
JavaScript null value is interpreted by cache.node as the string "null"
instead of the standard m empty string. This API will set any parameter passed
in to the empty string if the value is "null".
VARIABLES TYPE VARIABLES DESCRIPTION
PARAM Both
(Required) PARAM is an input parameter variable that
is passed by reference to this API in order to initialize the variable value
to be used in VistA.js m functions.  If the value of PARAM is the literal
string "null" then it is set to the empty string.
RESULT()
This is the primary function to call to complete a
VistA.js m service endpoint.

Example: Q $$RESULTS^XSAPXUTL()
CONVERT(IN)
The purpose of this function is to convert a value to
a web-friendly camelCase format for a JSON key. This function converts all
characters in the input string to lower case. If the input string contains
spaces, the first character in the input string after a space is converted to
upper case and all spaces are removed.

For instance, the input string of PATIENT ADDRESS would be converted to
patientAddress.
VARIABLES TYPE VARIABLES DESCRIPTION
IN Input
(Required) A string literal to be converted to
camelCase.
GETFILE(FILE)
This function is a wrapper for the FILE^DID fileman
API used to return the file name from a file number.
VARIABLES TYPE VARIABLES DESCRIPTION
FILE Input
(Required) The file number used to lookup and return
a file name.
GETFLD(FILE,FIELD)
This function is used to return the field name of a
specific field in a file based on the file and field numbers.
VARIABLES TYPE VARIABLES DESCRIPTION
FILE Input
(Required) The file, or sub-file, where the field
exists.
FIELD Input
(Required) The field number of a file, or sub-file.
BLDERROR(CODE,TEXT,ACTOR)
This API is used by applications that have created
VistA.js m services to return internal application errors in the proper
VistA.js error format to be returned to an end user through the VistA.js
platform.
VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
(Optional) This is the error code number from the
DIALOG file associated with an error.
TEXT Input
(Required) This is a free text message associated
with an internal application error.
ACTOR Input
(Optional) This is a free text value used to identify
the actor that identified the internal application error. Typically this is
the m routine and location the error was identifed from.
SUBSCRIBING PACKAGE VA POINT OF SERVICE (KIOSKS)
DATE ACTIVATED 2016/09/15