Print Page as PDF
SCDXUAPI - OCCASION OF SERVICE ENTRY ICR (1623)

SCDXUAPI - OCCASION OF SERVICE ENTRY    ICR (1623)

Name Value
NUMBER 1623
IA # 1623
DATE CREATED 1996/10/22
CUSTODIAL PACKAGE SCHEDULING
CUSTODIAL ISC Albany
USAGE Controlled Subscription
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE SCDXUAPI
NAME SCDXUAPI - OCCASION OF SERVICE ENTRY
GENERAL DESCRIPTION
The SCDXUAPI is used to add locations to the HOSPITAL
LOCATION file which are deemed occasions of service.  This routine has some
supported references, but they should only be used after being discussed with
the scheduling developers.  The subscription to these APIs will be controlled.

There are 4 supported calls in this routine.  Line tags not specifically
mentioned in this DBIA are NOT supported.  Detailed documentation on these
calls is provided within the routine.

The supported calls are: RAD - this tag is specifically written for the
radiology package.  It
allows them to pass in an IEN and convert the entry in file 44 to be
an occasion of service location.

LOC - main entry point to add occasion of service locations.  This may
also be used to edit or inactivate a location.

SCREEN - provides a screen (S DIC("S")="SCREEN^SCDXUAPI(pkg)" to allow
selection of only occasion of service locations which were added by
the package passed in.

EXEMPT - provides a screen (S DIC("S")="EXEMPT^SCDXUAPI()") which will
allow selection of only stop codes which are deemed occasion of
service stop codes.
STATUS Active
DURATION Till Otherwise Agreed
ID SCDXUAPI
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$RAD(IEN,PKG)
This call will accept the IEN of a location currently
defined. It will check to look for clinic patterns.  If none exist, it will
update the location fields for an occasion of service location.  If there are
clinic patterns set up, it will convert the existing entry to non-count and
create a new entry with the appropriate fields defined.  It will return the
IEN of the entry used (either the same as the incoming IEN or the IEN of the
new entry which had to be created).

Input:  IEN of existing entry in the Hospital Location file
PKG as either name, namespace, or IEN of package file Output:  same
IEN or different one if new one had to be created
- OR- -1^code^description of error encountered

Error codes possible:
1 - Hospital Location IEN is Invalid
2 - Neither institution nor division defined properly for existing entry
3 - Location has an inactivation date
4 - Invalid PKG variable passed in
5 - IEN belongs to another package (PKG file entries don't match)
6 - Invalid stop code passed
7 - Invalid IEN passed to LOC call (package doesn't 'own' IEN)
8 - NAME, INST, and STOP not all defined before LOC call when IEN not set
9 - Unable to add entry to Hospital Location file 10 - Stop code not an
occassion of service stop
VARIABLES TYPE VARIABLES DESCRIPTION
IEN Input
IEN of the entry in the Hospital Location file that
needs to be converted to an occasion of service location.
PKG Input
Calling package IEN (pointer to the PACKAGE file).
FUNCTION OUTPUT Output
Returns one of three things:

- If the function was able to alter the location passed in to be an
occasion of service location, it will return the same IEN passed in.

- If it was unable to use the location passed in, a new one will be
created and its IEN will be returned

- If the input checks failed for this location, and error message will
be returned in the format -1^error code^description.  The potential
codes and descriptions are:

1 - Hospital Location IEN is Invalid
2 - Neither institution nor division defined properly for existing entry
3 - Location has an inactivation date
4 - Invalid PKG variable passed in
5 - IEN belongs to another package (PKG file entries don't match)
6 - Invalid stop code passed
7 - Invalid IEN passed to LOC call (package doesn't 'own' IEN)
8 - NAME, INST, and STOP not all defined before LOC call when IEN not set
9 - Unable to add entry to Hospital Location file 10 - Stop code not an
occassion of service stop
LOC(NAME,INST,STOP,PKG,IEN,INACT)
This call will accept the name, division, and stop
code (DSS ID) of the clinic location to be add/edited.  If the IEN is passed
in, the entry with that IEN will be updated.  Otherwise, a new entry will be
added.  If the INACT variable is set to a date, it will INACTIVATE the
location (if it exists).

Input:  NAME of clinic to be created (optional)
INST as pointer to the institution file (optional)
STOP as number of stop code (not IEN) for
occasion of service range of codes (optional)
PKG as package file IEN, name, or namespace - required!
IEN as IEN of location if you want to update an already
existing location (optional.  If not defined, NAME,
INST, STOP become required)
INACT as a date if you want to inactivate the location that
has the IEN you defined (optional)

Output:  IEN of location created/inactivated - OR -
-1^error message if problem encountered


Possible error messages:
1 - Hospital Location IEN is Invalid
2 - Neither institution nor division defined properly for existing entry
3 - Location has an inactivation date
4 - Invalid PKG variable passed in
5 - IEN belongs to another package (PKG file entries don't match)
6 - Invalid stop code passed
7 - Invalid IEN passed to LOC call (package doesn't 'own' IEN)
8 - NAME, INST, and STOP not all defined before LOC call when IEN not set
9 - Unable to add entry to Hospital Location file 10 - Stop code not an
occassion of service stop
VARIABLES TYPE VARIABLES DESCRIPTION
NAME Input
NAME - name of the location to be added.  Only
required if IEN not passed in.
INST Input
Pointer to the institution file designating the
location of the clinic.  Only required if IEN not defined.
stop Input
External value of the stop code value (example 108).
This is only required if IEN is not passed in.
PKG Input
Required variable indicating the calling package
(pointer to the PACKAGE file).
IEN Input
Optional variable denoting an existing entry in the
Hospital Location file.  If this exists, the name, institution, stop, and/or
inactivation date fields are updated per values passed in.
INACT Input
Optional:  if passed in, it is a date that the
location should be inactivated.
FUNCTION OUTPUT Output
The output will be either:

- The IEN of the location created (if IEN is not passed in) - The IEN of the
location updated (same as IEN passed in) - An error code if the process could
not be completed.  The error code
will be in the format -1^error code^description where the error codes
and descriptions are as follows:

1 - Hospital Location IEN is Invalid
2 - Neither institution nor division defined properly for existing entry
3 - Location has an inactivation date
4 - Invalid PKG variable passed in
5 - IEN belongs to another package (PKG file entries don't match)
6 - Invalid stop code passed
7 - Invalid IEN passed to LOC call (package doesn't 'own' IEN)
8 - NAME, INST, and STOP not all defined before LOC call when IEN not set
9 - Unable to add entry to Hospital Location file 10 - Stop code not an
occassion of service stop
$$SCREEN(PKG)
Allows a package to select from only the occasion of
service locations added by their package.  This value should be set to
DIC("S") when doing a lookup on the Hospital Location file (S
DIC("S")=$$SCREEN^SCDXUAPI(pkg)).
VARIABLES TYPE VARIABLES DESCRIPTION
PKG Input
Pointer to the PACKAGE file indicating the calling
package.
FUNCTION OUTPUT Output
A sting of M code that should be set into the
variable DIC("S") when doing a lookup to the Hospital Location file.
$$EXEMPT()
Allows a package to select only stop codes which are
deemed by Headquarters personnel to be occasion of service stop codes.
VARIABLES TYPE VARIABLES DESCRIPTION
FUNCTION OUTPUT Output
A sting of M code that should be set into the
variable DIC("S") when doing a lookup to the Clinic Stop file.
SUBSCRIBING PACKAGE
SUBSCRIBING PACKAGE ISC
LAB SERVICE Dallas
RADIOLOGY/NUCLEAR MEDICINE Hines
EVENT CAPTURE
DBA Comments
3/26/18-MM:  Added Event Capture as a subscriber to ICR #2623
for EC*2*139.  This IA allows calls to $$LOC^SCDXUAPI, which sets up package
specific OOS (Occasion of Service) clinics that Event Capture will be using to
link workload to for sending to PCE.
MAIL MESSAGE 22106730
DATE/TIME EDITED
DATE/TIME EDITED ACTION AT THE REQUEST OF WITH CONCURRENCE OF
2018/03/26 13:21 SUBSCRIBER ADDED NABER,DAVID REESE,DARRYL
Generated from AUG 12, 2020@ IA Listing Descriptions