Class: ProblemService

ProblemService


new ProblemService()

Service for Meta (non-clinical) queries relating to the PROBLEM domain.

Members


<constant> auditDisplayMap

Returns list of Problem available

Methods


createProblem(problemObj, context, callback)

Creates new Problem and assigns it to current patient.

Parameters:
Name Type Description
problemObj Object

Object with all Problem properties to be created.

Properties
Name Type Argument Description
facility String

Institution URN (4)

diagnosis String

Diagnosis URN (80)

problem String

Problem URN (757.01)

providerNarrative String

Provider Narrative label (9999999.27)

problemStatus String

Enumeration, 'ACTIVE' or 'INACTIVE'

condition String

Enumeration, 'TRANSCRIBED', 'PERMANENT', 'HIDDEN'

snomedCTConceptCode String

SNOMED code

snomedCTDesignationCode String

SNOMED code

codingSystem String

Coding system

priority String <optional>

Enumeration, 'ACUTE' or 'CHRONIC'

enteredBy String <optional>

User URN (200), defaults to current context user

responsibleProvider String <optional>

User URN (200), defaults to current context user

clinic String <optional>

Hospital Location URN (44), defaults to current context location

isAgentOrangeExposure Boolean <optional>

true = yes, false = no (defaults to false)

isIonizingRadiationExposure Boolean <optional>

true = yes, false = no (defaults to false)

isPersianGulfExposure Boolean <optional>

true = yes, false = no (defaults to false)

isHeadAndOrNeckCancer Boolean <optional>

true = yes, false = no (defaults to false)

isMilitarySexualTrauma Boolean <optional>

true = yes, false = no (defaults to false)

isCombatVeteran Boolean <optional>

true = yes, false = no (defaults to false)

isShipboardHazardDefense Boolean <optional>

true = yes, false = no (defaults to false)

enteredDate String <optional>

Optional ISO-formatted date (defaults to now)

onsetDate String <optional>

Optional ISO-formatted date

resolvedDate String <optional>

Optional ISO-formatted date (defaults to now)

interestDate String <optional>

Optional ISO-formatted date (defaults to now)

isServiceConnected Boolean <optional>

true = yes, false = no

uniqueNewTermRequested String <optional>

Enumeration 'True' or 'False'

comments Array.<Object> <optional>

Array of comment objects

Properties
Name Type Argument Description
comment String <optional>

Comment text

date String <optional>

Date of comment

context Object

Session data

callback function

Error-first callback used to process results

Returns:

Returned via the asynchronous callback function. {String} result.success <> {String} result.problemId URN id of the newly created problem object in the data store {Object} result.resultSample Object containing the created object

Type
Object

listClinicalProblem(activeFilter, context, callback)

Returns list of Problem available

Parameters:
Name Type Description
activeFilter Object

string that represents filter criteria relating to active/inactive status

Properties
Name Type Description
condition Object

Displays problem based on condition status

problemStatus Object

Displays problems based on 'ACTIVE' or 'INACTIVE' status

showAllProblems Object

Returns ALL clinical problems to pass regression tests, even if they were marked 'IsRemoved'

context Object

Session context information associated with the service call.

callback function

The function that will process results from getEducationTopics

Returns:

Array of Objects containing ID and name properties (alphabetized by name)

Type
Array

removeProblem(problemId, options, context, callback)

"Removes" an existing problem record in MongoDB

Sets "isRemoved" to true and "condition" to 'HIDDEN'

Parameters:
Name Type Description
problemId String

Problem URN (9000011) This field is REQUIRED

options Object

Removal options

Properties
Name Type Description
providerId String

URN of the provider (200)

facilityId String

URN of the visit facility (44)

comment String

String comment to add to the removal

context Object

Session data

callback function

Error-first callback used to process results

Returns:

Returned via the asynchronous callback function. {String} result.success <>

Type
Object

updateProblem(problemObj, context, callback)

Updates an existing Problem.

Parameters:
Name Type Description
problemObj Object

Object with all Problem properties to be updated. ONLY fields that are to be updated should be in the problemObj object.

Properties
Name Type Argument Description
id String

Problem URN (9000011) This field is REQUIRED

facility String <optional>

Institution URN (4)

diagnosis String <optional>

Diagnosis URN (80)

problem String <optional>

Problem URN (757.01)

providerNarrative String <optional>

Provider Narrative label (9999999.27)

problemStatus String <optional>

Enumeration, 'ACTIVE' or 'INACTIVE'

condition String <optional>

Enumeration, 'TRANSCRIBED', 'PERMANENT', 'HIDDEN'

priority String <optional>

Enumeration, 'ACUTE' or 'CHRONIC'

snomedCTConceptCode String <optional>

SNOMED code

snomedCTDesignationCode String <optional>

SNOMED code

codingSystem String <optional>

Coding system

enteredBy String <optional>

User URN (200)

responsibleProvider String <optional>

User URN (200)

clinic String <optional>

Hospital Location URN (44)

isRemoved Boolean <optional>

true = yes, false = no

isAgentOrangeExposure Boolean <optional>

true = yes, false = no

isIonizingRadiationExposure Boolean <optional>

true = yes, false = no

isPersianGulfExposure Boolean <optional>

true = yes, false = no

isHeadAndOrNeckCancer Boolean <optional>

true = yes, false = no

isMilitarySexualTrauma Boolean <optional>

true = yes, false = no

isCombatVeteran Boolean <optional>

true = yes, false = no

isShipboardHazardDefense Boolean <optional>

true = yes, false = no

enteredDate String <optional>

Optional ISO-formatted date

onsetDate String <optional>

Optional ISO-formatted date

resolvedDate String <optional>

Optional ISO-formatted date

interestDate String <optional>

Optional ISO-formatted date

isServiceConnected Boolean <optional>

true = yes, false = no

uniqueNewTermRequested String <optional>

Enumeration 'True' or 'False'

comments Array.<Object> <optional>

Array of updates to existing comments

Properties
Name Type Argument Description
commentId Number <optional>

ID of the comment (1-indexed)

commentText String <optional>

Text of the comment

enteredBy Number <optional>

User URN (200)

enteredDate Number <optional>

Optional ISO-formatted date

newComments Array.<String> <optional>

Array of new comment strings

context Object

Session data

callback function

Error-first callback used to process results

Returns:

Returned via the asynchronous callback function. {String} result.success <>

Type
Object