get
  • 19 Apr 2023
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

get

  • Dark
    Light
  • PDF

Article Summary

Description

Gets artifact moment(s) from an avatar's memory.


Input Parameters

NameTypeRequiredDescription
idTextYesArtifact identifier
[category]TextNoArtifact category name (Not required when Needle ID is specified)
[take]NumberNo# of moments to take from memory (+ = newest; - = oldest); Default = 1

Supported Categories

The following categories are supported.

CategoryIDDescription
Vitals[Curation ID]Patient vital signs
Labs[Lab ID]Patient lab results
Medications[RxCUI or Drug ID]Patient medications
Symptoms[Curation ID]Patient symptoms
Diseases[Curation ID]Patient diseases
Family History[Curation ID]Patient family history
Social History[Curation ID]Patient social history
Physical Exam[Curation ID]Patient physical exam
Procedures[Curation ID]Patient procedures
Problems[App ID]Patient problems - tests for existance
Problems[App ID].[Object ID]Patient problems - app object values
Records[Report ID or Title Phrase]Patient structured and unstructured records
Records[Report ID].[Variable Name]Patient structured record variables (Legacy RG)

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


Returns

Type: Array (of Moment Json objects)

Returns one or more moments from an avatar's memory. Array will be empty if no moments are found.


Examples

// define artifact of interest
// Symmetry 1.0 and Symmetry Beta artifacts are supported
//  - Symmetry 1.0: use Native Vocabulary ID (NID)
//  - Symmetry Beta: use List ID + Category Name (as hint)
var id = "5356";
var category = "Vitals";
// get latest (most recent) moment from memory
var moments = avatar.get(id, category);

// read value and timestamp from moment
var moment = moments[0];  // 1st moment from array
var value = moment.value;
var stamp = moment.time1;

// display value in debugger
debug.log("Value = " + value);
debug.log("Timestamp = " + stamp);
// get most recent 3 moments from memory
var moments = avatar.get(id, category, 3);
// get oldest 1 moment from memory
var moments = avatar.get(id, category, -1);
// get all moments from memory
var moments = avatar.get(criteria, category, 0);

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 moments instead of raw values for your target data elements. This is so you also have access to the temporal component of data elements.

Timestamps

Moment timestamps may represent when a data element was captured, or have a different contextual meaning, defined by Dr. Know's curation experts (i.e. when a medication was started and/or stopped).

Every moment has time1 and time2 timestamp properties. Two properties exist in the event a time range is relevant to the artifact. Otherwise, both properties will have the same value.


What's Next