User's Guide - Scripts

1.0 Introduction

Welcome to the Fortanix Confidential Computing Manager - Scripts user guide. This guide describes how to create and manage the Scripts in Fortanix Confidential Computing Manager.

The Scripts are a set of user-defined instructions in SQL query format for processing the input data within the confidential data collaboration environment. It displays a query interface to create, save, and share SQL queries. The purpose of Script is to provide a standardized way to execute specific functions within the secure and controlled environment of Fortanix Confidential Computing Manager, ensuring that the sensitive data is handled with confidentiality and integrity.

Using the Scripts menu item in the Fortanix Confidential Computing Manager user interface (UI), you can add, review, and manage the scripts. It is important to note that after the scripts are added, they cannot be changed. If the modifications are necessary, you are required to create a new version of the Script for seamless, unique operations. Additionally, you can create SQL statements to JOIN data from different sources to AGGREGATE the data for data collaboration use cases.

2.0 Add A Script

Perform the following steps to seamlessly add a script to the Fortanix Confidential Computing Manager:

  1. Click the Scripts menu item in the Confidential Computing Manager left navigation bar and click the + CREATE SCRIPT button to add a new script.
    Figure 1: Add New Script
  2. On the Create new script page, enter the following details:
    • Name: Enter a required name for your script in the provided field.
    • Description (Optional): Enter a valid brief description of your script.
    • Group: Select the required group name from the drop down menu to associate the script with that group. This helps in organizing and categorizing scripts for better management.
    • Select query language: Click the corresponding radio button to select the query language as SQL or SQL Aggregate for your script. Use the provided text area to enter the SQL commands relevant to your script. To understand more about these SQL queries, refer to the Section 2.1: Real Time Examples.
  3. Click the CREATE SCRIPT button to initiate the script creation process.

The new script is created successfully.


Figure 2: New Script Added

2.1 Real Time Examples

2.1.1 Aggregate SQL Script 

Table Name: Patient_Medication_Encounter

Query Language: SQL Join Query Script (Join Query)

SELECT DISTINCT "patients"."patients-Id",
    conditions.CODE as condition_code
FROM "patients"
    JOIN medications ON medications."patients-Id" = "patients"."patients-Id"
    JOIN conditions ON conditions."patients-Id" = "patients"."patients-Id"
    JOIN encounters ON encounters."patients-Id" = "patients"."patients-Id"
WHERE medications.CODE = '860975'
    AND medications.STOP = '';

2.1.2 SQL Script 1: Patient Condition with Gender Female

This script focuses and helps us identify and analyze conditions specific to women's health.

  • Name: Patient_Condition_Gender_F
  • Description: Filters patient conditions for females.
  • Group: Fortanix Marketplace Imports
  • Query Language: SQL
    SELECT COUNT(DISTINCT "patients-Id")
    FROM joined_data
    WHERE ENCOUNTERCLASS = 'ambulatory'
    AND GENDER='F'; 

2.1.3 SQL Script 2: Patient Condition with Gender Male

This script is similar to the previous script, but targets on the health conditions that predominantly affecting men.

  • Name: Patient_Condition_Gender_M
  • Description: Filters patient conditions for males.
  • Group: Fortanix Marketplace Imports
  • Query Language: SQL
    SELECT COUNT(DISTINCT "patients-Id")
    FROM joined_data
    WHERE ENCOUNTERCLASS = 'ambulatory'

2.1.4 Patient Condition with Diabetic Retinopathy

This script targets patients diagnosed with diabetic retinopathy, a complication of diabetes. It helps us understand the prevalence and management of this condition within our patient population.

  • Name: Patients_Diabetic_Retinopathy
  • Description: Identifies patients diagnosed with diabetic retinopathy.
  • Group: Fortanix Marketplace Imports
  • Query Language: SQL
    COUNT(DISTINCT "patients-Id")
    FROM joined_data
    WHERE condition_code = '422034002';

3.0 Edit the Scripts

Perform the following steps to modify the details of the scripts:

  1. Click the Scripts menu item in the Confidential Computing Manager left navigation bar.
  2. Locate and click the script that you wish to edit from the list of available scripts. A new screen opens where you can review and edit the selected group and script queries.
  3. Click the EDIT SCRIPT button to initiate the editing process.
    Alternatively, you can click the three dots.pngoverflow menu (three dots) for a script row and select the EDIT SCRIPT option to modify the script.
  4. Update the configuration as needed.
    These modifications are applied in a new version of script rather than altering the existing one.
  5. After you have made the necessary edits, click the UPDATE SCRIPT button to save your changes and create a new version of the script.

The script is updated successfully.

4.0 Scripts Details Overview

Click the required script to view the insights into general details and version history, enabling effective management and understanding of your scripts.

  • General tab:
    • Created by: Displays the user who originally created the script.
    • Created at: Shows the timestamp indicating when the script was initially created.
    • Changed by: Indicates the user responsible for the most recent changes to the script.
    • Changed at: Displays the timestamp of the last modification to the script.
    • Group: Specifies the group to which the script belongs.
    • Query language: Specifies the language used in the script, such as SQL or SQL Aggregate.
  • Version History tab:
    • Changed by: Lists the users who made changes to the script across different versions.
    • Created at: Displays the timestamps corresponding to the creation of each version.
    • Content: Provides a view of the modifications made in each version of the script.


Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful