Class: LocationMetaService

LocationMetaService


new LocationMetaService()

This service class provides an API for Locations

Methods


isClinicalLocation(locationURN, context, callback)

Checks if incoming argument is a valid ID for a clinical location

Parameters:
Name Type Description
locationURN Number

ID for file 44 used to search for a Hospital location

context Object

Session context information associated with the service call.

callback function

Function called on process completion, with standard (err, result) signature.

Returns:

isClinic Check if type2 of location equals 'CLINIC'

Type
Boolean

isNoncountClinic(locationURN, context, callback)

Is a given HOSPITAL LOCATION (file 44) a non-count clinic? (DBIA #964)

Parameters:
Name Type Description
locationURN Number

Hospital URN

context Object

Session context information associated with the service call.

callback function

Function called on process completion, with standard (err, result) signature.

Returns:

noncountClinicYOrN value

Type
Boolean

listClinicLocations(searchInput, direction, context, callback)

Returns a list of clinics from the HOSPITAL LOCATION file (#44).

Parameters:
Name Type Description
searchInput String

The starting index for the Location list

direction Number

The sorting direction of the Location list (alphabetical)

context Object

Session context information associated with the service call.

callback function

Function called on process completion, with standard (err, result) signature.

Returns:

Array of Location Objects with label and id properties.

Type
Array

lookupLocationType(locationURN, context, callback)

Returns type of location, clinic (C) or ward(W) or other location(Z)

Parameters:
Name Type Description
locationURN integer

urn for location collection data

context Object

Session context information associated with the service call.

callback function

Function called on process completion, with standard (err, result) signature.

Returns:

Array include object response if data exists

Type
Array