Class: AbstractService

AbstractService

All Clinical domain service implementations need to extend this class. Registers all known MVDM models with the abstract class MVDM singleton. This abstract service class inherits from EventEmitter and provides event emitting capabilities to the child service classes.

Constructor

new AbstractService(db, serviceContext)

Abstract service constructor.
Parameters:
Name Type Description
db Object VistA database instance.
serviceContext Object Contains service context data.
Properties
Name Type Description
userId String User identifier.
facilityId String Facility identifier.
patientId String Patient identifier.
Source:

Methods

toDate(mvdmObj, argsObj, *args) → {Object}

Assigns datetime arguments and their values as date objects in a MVDM object.
Parameters:
Name Type Description
mvdmObj Object mvdmObj MVDM Object.
argsObj Object argsObj Object containing argument values.
*args Arguments to assign.
Source:
Returns:
MVDM Object with assigned date object.
Type
Object

toDateTime(mvdmObj, argsObj, *args) → {Object}

Assigns datetime arguments and their values as datetime objects in a MVDM object.
Parameters:
Name Type Description
mvdmObj Object mvdmObj MVDM Object.
argsObj Object argsObj Object containing argument values.
*args Arguments to assign.
Source:
Returns:
MVDM Object with assigned datetime objects.
Type
Object

toPointer(mvdmObj, argsObj, *args) → {Object}

Assigns pointer id arguments and their values as pointer objects in a MVDM object.
Parameters:
Name Type Description
mvdmObj Object MVDM Object.
argsObj Object Object containing argument values.
*args Arguments to assign.
Source:
Returns:
MVDM Object with assigned pointer objects.
Type
Object