Class: AllergyService

AllergyService

Allergy Service Class

Constructor

new AllergyService(db, serviceContext)

Allergy 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

create(args) → {Object}

Creates a new Allergy
Parameters:
Name Type Description
args Object Create allergy arguments.
Properties
Name Type Attributes Description
reactant Object
Properties
Name Type Description
id String Allergy reactant identifier.
label String Allergy reactant label (e.g. CHOCOLATE).
allergyType enum Type of allergy. Possible values: DRUG, DRUG, FOOD, FOOD, OTHER.
mechanism enum Allergy mechanism. Possible values: ALLERGY, PHARMACOLOGI", UNKNOWN.
observedOrHistorical enum Observed or historical indicator. Possible values: OBSERVED, HISTORICAL.
allergySeverity enum Allergy severity. Possible values: MILD, MODERATE, SEVERE.
dateOccurred Date Date occurred value.
reactions Array <optional>
List of reaction identifiers.
comments Array <optional>
List of allergy comments.
enteredBy String <optional>
Entered by identifier. Defaults to user.
Source:
Fires:
  • event:create Service create event.
Returns:
MVDM create response.
Type
Object

describe(allergyId) → {Object}

Describes an allergy.
Parameters:
Name Type Description
allergyId String Allergy identifier.
Source:
Returns:
MVDM describe response.
Type
Object

list() → {Array}

List of patient allergies.
Source:
Returns:
List of patient allergies.
Type
Array

listAllergyAssessments() → {Array}

List of patient allergy assessments
Source:
Returns:
List of patient allergy assessments.
Type
Array

remove(allergyId, commentopt)

Removes an allergy (marks as Entered in Error).
Parameters:
Name Type Attributes Description
allergyId String Allergy identifier.
comment String <optional>
Optional entered in error comment.
Source:

unremove(allergyId, commentopt)

Unremoves an allergy.
Parameters:
Name Type Attributes Description
allergyId String Allergy identifier.
comment String <optional>
Optional unremove comment.
Source: