Print Page as PDF
DBIA2171 ICR (2171)

DBIA2171    ICR (2171)

Name Value
NUMBER 2171
IA # 2171
DATE CREATED 1997/10/07
CUSTODIAL PACKAGE KERNEL
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE XUAF4
NAME DBIA2171
GENERAL DESCRIPTION
Function API's to access parts of the Institution file.

This DBIA documents some entry point for accessing the Institution file that
were requested by the CIRN developers or implemented by the IFR project.
STATUS Active
ID XUAF4
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
PARENT
PARENT^XUAF4(array,lookup[,type]) for a specified
institution who is its VISN or parent.
VARIABLES TYPE VARIABLES DESCRIPTION
array Both
As a input it is the $NAME reference for the Array
name you want results back in.

As output it holds - array("p",ien)=station name ^ station number

Note: with the business rule that institutions can only have one parent per
type, if you specific the input variable type - you will get an array that
will only have one pien in it. If the type variable is left blank, find all
parents for the institution and list then in the array.
lookup Input
Lookup value - either ien, station number, station
name. If IEN it will
have the ` in front of it.
type Input
Type (optional) - type of institution from file 4.05
(in cirn case it is = visn)
SIBLING
SIBLING^XUAF4(array,child [,type]) - all institutions
in a specified institutions visn.
VARIABLES TYPE VARIABLES DESCRIPTION
array Both
As a input it is the $NAME reference for the Array
name you want results back in.

As the output array("p",pien,"c",cien)=station name ^ station number

Note: with the business rule that institution can only have one parent per
type, if you specific the input variable type - you will get an array that
will only have one pien in it. If the type variable is left blank, find all
parents for the institution and list then in the array. Also, the input site
is included in the list
child Input
Lookup value - either ien, station number, station
name. If IEN it will have the ` in front of it.
type Input
Type (optional) - type of institution from file 4.05
(in cirn case it is = visn)
CHILDREN
CHILDREN^XUAF4(array,parent) - for a specified VISN
return a list of all institutions that make up the VISN.
VARIABLES TYPE VARIABLES DESCRIPTION
array Both
Array - As a input it is the $NAME reference for the
Array name you want results back in.

Output Variable array ("c" , ien)=station name ^ station number
parent Input
Parent - Lookup value either ien, station number,
station name. If IEN it will have the ` in front of it.
$$NNT
$$NNT^XUAF4(ien) - This will return the "station name
^ station number ^ station type"
VARIABLES TYPE VARIABLES DESCRIPTION
ien Input
ien is the pointer value to file 4.
$$CIRN
$$CIRN^XUAF4(inst [,value]) - This function returns
the value of the CIRN enabled field from the institution file.
VARIABLES TYPE VARIABLES DESCRIPTION
inst Input
inst - Lookup value either ien, station number,
station name. If IEN it will have the ` in front of it.
value Input
value - (optional) Restricted to use by CIRN. This
allows the setting of the field to a new value.
$$LKUP
$$LKUP^XUAF4(inst) - This function does a lookup on
the Institution file and returns the IEN OR 0.
VARIABLES TYPE VARIABLES DESCRIPTION
inst Input
inst - Lookup value either ien, station number,
station name. If IEN it will have the ` in front of it.
$$NS
This extrinsic function returns a string with the
institution name a "^" and the institution station number. The input is a
valid IEN for the institution.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
The internal entry number for the institution that is
requested.
$$WHAT
This entry point returns the data from one field in
the institution file.
VARIABLES TYPE VARIABLES DESCRIPTION
ien Input
ien is the pointer value to file 4.
field Input
"field" is a single valued field in the file.
Controls what data is returned.
$$IEN
$$IEN^XUAF4(STA) - This function returns the Internal
Entry Number (IEN) of the entry for a given STATION NUMBER (#99) in the
INSTITUTION (#4) file.
VARIABLES TYPE VARIABLES DESCRIPTION
STA Input
Station number (required)
$$STA
$$STA^XUAF4(IEN) - This function returns the STATION
NUMBER (#99) of the INSTITUTION (#4) file entry for a given Internal Entry
Number (IEN).

This entry point will be available after patch XU*8*126.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number (required)
$$TF
This function returns the truth-value to the question
is this an active treating medical facility?
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number (required)
$$O99

$$O99^XUAF4(IEN) - This function returns the Internal Entry Number of the
valid INSTITUTION (#4) file entry with station number that this entry (input
IEN) was merged with during the clean up.  This function may be used by
application developers to re-point their INSTITUTION (#4) file references to a
valid entry complete with station number.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
The Internal Entry Number of the INSTITUTION (#4)
file entry whose STATION NUMBER (#99) was deleted.
IEN Output
The Internal Entry Number of the INSTITUTION (#4)
file entry with a valid STATION NUMBER (#99) -- the station number deleted
from the input IEN during the clean up process with patch XU*8.0*126.
F4
F4^XUFA4(STA,ARRAY,FLAG,DATE) - This API returns the
INSTITUTION (#4) file Internal Entry Number and other data, including
historical, for a given station number.
VARIABLES TYPE VARIABLES DESCRIPTION
STA Input
Station number (required)
ARRAY Input
The array for return values (required).
FLAG Input
A = Active entries only  (optional) M = Medical
treating facilities only
DATE Input
Return name on this FM internal date (optional)
ARRAY Output
ARRAY=IEN or '0^error message' ARRAY("NAME")=name
ARRAY("VA NAME")=official VA name ARRAY("STATION NUMBER")=station number
ARRAY("TYPE")=facility type name ARRAY("INACTIVE")=inactive FM internal date
(0=not inactive) Note: if inactive date not available then 1 ARRAY("REALIGNED
TO")='IEN^station number^date' ARRAY("REALIGNED FROM")='IEN^station
number^date' ARRAY("MERGE",IEN)=merged records
$$LEGACY
This function returns the truth value for a station
number.  Has this station number been realigned?  (Is it a legacy station
number.)
VARIABLES TYPE VARIABLES DESCRIPTION
STA Input
Station Number in question.
$$NAME
This function returns the OFFICIAL NAME (#100) of an
Institution given its Internal Entry Number.  If field #100 is null, the #.01
field is returned.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number
$$ACTIVE
This function returns the truth value for the
question -- is this an active facility?  (The INACTIVE FACILITY FLAG #101 not
set.)
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number
$$PADD
This function returns the physcial address
information for an Institution in an up-arrow delimited string (street
addr^city^state^zip) for a given Internal Entry Number.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number
$$MADD
This function returns the mailing address information
for an Institution in an up-arrow delimited string (street
addr^city^state^zip) for a given Internal Entry Number.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number
$$PRNT
This function returns the string
"IEN^station_number^name" of the parent facility of a given child facility
station number.
VARIABLES TYPE VARIABLES DESCRIPTION
STA Input
STA is station number of the child facility.
LOOKUP
This utility prompts a user for a coding system and
then prompts for an identifier -- its an IX^DIC call on a new style
cross-reference of the ID (#.02) field of the IDENTIFIER (#9999) multiple of
the INSTITUTION (#4) file.
VARIABLES TYPE VARIABLES DESCRIPTION
Y Output
See FileMan IX^DIC documentation.
$$IDX
This function returns the Internal Entry Number of an
Institution file entry for a given coding sytem / ID pair.
VARIABLES TYPE VARIABLES DESCRIPTION
CDSYS Input
CDSYS is an existing CODING SYSTEM (#.01) in the
INDENTIFIER (#9999) multiple of the INSTITUTION (#4) file.  D CDSYS^XUAF4(.Y)
to see existing coding systems in the file.
ID Input
ID is the ID (#.02) in the INDENTIFIER (#9999)
multiple of the INSTITUTION (#4) that corresponds to the coding system you
input as the first parameter.

$$ Output
Internal Entry Number
CDSYS
VARIABLES TYPE VARIABLES DESCRIPTION
Y Both
Y -- pass by reference returns Y(coding_system) =
$D_of_local_system ^ coding_system name
$$ID
This function returns the ID of an Institution file
entry for a given coding system / IEN.
VARIABLES TYPE VARIABLES DESCRIPTION
CDSYS Input
CDSYS is an existing CODING SYSTEM (#.01) in the
INDENTIFIER (#9999) multiple of the INSTITUTION (#4) file.  D CDSYS^XUAF4(.Y)
to see existing coding systems in the file.
IEN Input
Internal Entry Number
$$ID Output
The ID (identifier) that is associated with the given
coding system / IEN.
$$BNSTA
This function returns the billing facility name for a
given station number.

VARIABLES TYPE VARIABLES DESCRIPTION
STA Input
Station Number

$$BNIEN
This function returns the billing facility name for a
given IEN.

VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number

$$HPADD
This function returns the correct historical physical
address information, if available, for an Institution in an up-arrow delimited
string (street addr^city^state^zip) for a given Internal Entry Number and
Effective Date. If no historical physical address information is available
based on the ien and effective date, a null value will be returned.
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
Internal Entry Number
XUEDT Input
Effective Date for Historical Address search
$$CERNER
This function checks if a facility has been converted
to CERNER.
; Take in STA = Station number
; Return -1 for invalid station number
; Return 1 for CERNER station
VARIABLES TYPE VARIABLES DESCRIPTION
STA Input
Station number
DATE ACTIVATED 2020/03/12