getValue
  • 19 Apr 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

getValue

  • Dark
    Light
  • PDF

Article summary

Description

Returns the value of the latest (most recent) artifact moment from an avatar's memory. When this value does not exist, a specified default value is returned.


Input Parameters

NameTypeRequiredDescription
idTextYesArtifact identifier
categoryTextYesArtifact category name
defaultAnyYesDefault return value

Supported Categories

The following categories are supported.

CategoryIDDescription
Vitals[Curation ID]Returns latest vital sign value
Labs[Lab ID]Returns latest lab result value
Medications[RxCUI or Drug ID]Returns whether or not patient is actively taking the medication
Symptoms[Curation ID]Returns latest symptom value
Diseases[Curation ID]Returns latest disease value
Family History[Curation ID]Returns latest family history value
Social History[Curation ID]Returns latest social history value
Physical Exam[Curation ID]Returns latest physical exam value
Procedures[Curation ID]Returns latest procedure value
Problems[App ID]Returns whether or not problem is active
Problems[App ID].[Object ID]Returns latest problem value

Lookup Curation IDs using Symmetry Pro
Lookup other IDs using Dr. Know - Admin
Lookup RxCUI IDs using NIH's National Library of Medicine


Returns

A dynamic type representing the value from the latest (most recent) moment in the avatar's memory. The specified default value must match this underlying value type.


Examples

// get the most recent weight value. if it doesnt exist, -1 is returned
var weight = avatar.getValue("5356", "Vitals", -1);
// get whether or not patient is actively taking Lisinopril
var taking = avatar.getValue("rxcui:314076", "Medications", false);

Remarks

Symmetry is an open integration platform that allows software projects across the globe to share information via avatars. Every avatar has a memory where information is stored. Use this function to get information from this memory.

Information is stored temporally inside an avatar's memory as artifacts. An artifact represent a single, logical data element. Each artifact has its own timeline of moments (think moments in time), where the values of the data element physically reside, along with an associated timestamp.

This function returns the value from the latest (most recent) moment in the avatar's memory. If you also want the temporal data associated with this moment, use the get function instead of this one.


What's Next