Class: VitalsService

VitalsService

Vitals Service Class

Constructor

new VitalsService(db, serviceContext)

Vitals 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

_list(startDateopt, endDateopt, suppressEventopt) → {Object}

List vital results (private method) If no start and stop dates are indicated, all vitals are returned. If no start date is passed then the start date is set to a time before records were collected. If no end date is passed then the start date is also the end date and if there's no start date, then end date is the current date time.
Parameters:
Name Type Attributes Description
startDate Date <optional>
Start date object.
endDate Date <optional>
End date object.
suppressEvent Boolean <optional>
Suppress service list event. Defaults to false.
Source:
Fires:
  • event:list Service list event.
Returns:
Filtered MVDM list results.
Type
Object

create(args)

Creates a new vital.
Parameters:
Name Type Description
args Object Create vital arguments.
Properties
Name Type Attributes Description
vitalsTakenDateTime Date Vitals taken date time.
vitalType String Vital type identifier.
hospitalLocation String Hospital location identifier.
value String Vital value.
units String Units value.
enteredBy String <optional>
Entered by identifier. Defaults to user.
vitalsEnteredDateTime Date <optional>
Vitals entered date time. Defaults to T.
supplementalO2 String <optional>
Supplemental O2.
qualifiers Array <optional>
List of qualifier identifiers.
Source:
Fires:
  • event:create Service create event.
Returns:
MVDM create response.

describe(vitalId)

Describes a vital.
Parameters:
Name Type Description
vitalId String Vital identifier.
Source:
Fires:
  • event:describe Service describe event.
Returns:
MVDM vital response.

getMostRecentVitals(startDateopt, endDateopt) → {Object}

List of most recent vitals within start and stop date/times. If no start and stop dates are indicated, the most recent are returned. If no start date is passed then the start date is set to a time before records were collected. If no end date is passed then the start date is also the end date and if there's no start date, then end date is the current date time.
Parameters:
Name Type Attributes Description
startDate Date <optional>
Start date object.
endDate Date <optional>
End date object.
Source:
Fires:
  • event:mostRecentVitals Service mostRecentVitals event.
Returns:
Most recent vitals.
Type
Object

list(startDateopt, endDateopt) → {Object}

List vital results. If no start and stop dates are indicated, all vitals are returned. If no start date is passed then the start date is set to a time before records were collected. If no end date is passed then the start date is also the end date and if there's no start date, then end date is the current date time.
Parameters:
Name Type Attributes Description
startDate Date <optional>
Start date object.
endDate Date <optional>
End date object.
Source:
Fires:
  • event:list Service list event.
Returns:
Filtered MVDM list results.
Type
Object

remove(vitalId, reason) → {Object}

Removes a vital and marks it as entered in error.
Parameters:
Name Type Description
vitalId String Vital identifier.
reason enum Reason for removal. Possible values: INCORRECT DATE/TIME, INCORRECT READING, INCORRECT PATIENT, INVALID RECORD
Source:
Fires:
  • event:remove Service remove event.
Returns:
MVDM remove result.
Type
Object