Prefer using email? Say hi at hello@moveshelf.com
## README: this example shows how we can retrieve session metadata from Moveshelf
# using the Moveshelf API.
# This code assumes you have implemented the 'Retrieve sessopm' example, and
# that you have found session (my_session) for the subject with a given EHR-id/MRN
# (my_subject_mrn) or name (my_subject_name) within a given project (my_project), and
# that you have access to the session ID.
## General configuration. Set values before running the script
my_project = "<organizationName/projectName>" # e.g. support/demoProject
my_subject_mrn = "<subjectMRN>" # subject MRN, e.g. "1234567" or None
my_subject_name = "<subjectName>" # subject name, e.g. Subject1 or None
my_session = "<sessionDate>" # "YYYY-MM-DD" format
## Add here the code to retrieve the project and find an existing subject and session using "getSessionById"
session_id = session["id"]
session_metadata = session.get("metadata", None)
print(
f"Found session with projectPath: {session['projectPath']},\n"
f"id: {session_id},\n"
f"and metadata: {session_metadata}"
)