Skip to content

Commit

Permalink
deploy: daa19b8
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetAnithaVarghese committed Oct 21, 2024
1 parent dba9398 commit 446869a
Show file tree
Hide file tree
Showing 129 changed files with 77 additions and 82 deletions.
4 changes: 2 additions & 2 deletions 404.html

Large diffs are not rendered by default.

Binary file modified 404.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/advanced-polyglot-orchestration/index.html

Large diffs are not rendered by default.

Binary file modified blog/advanced-polyglot-orchestration/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/direct-messaging-service-pattern/index.html

Large diffs are not rendered by default.

Binary file modified blog/direct-messaging-service-pattern/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/evidence-based-decision-making-pattern/index.html

Large diffs are not rendered by default.

Binary file modified blog/evidence-based-decision-making-pattern/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/index.html

Large diffs are not rendered by default.

Binary file modified blog/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/power-of-sql-and-sql-views/index.html

Large diffs are not rendered by default.

Binary file modified blog/power-of-sql-and-sql-views/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/quality-management-pattern/index.html

Large diffs are not rendered by default.

Binary file modified blog/quality-management-pattern/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/rssd-excel-portability-sql-power/index.html

Large diffs are not rendered by default.

Binary file modified blog/rssd-excel-portability-sql-power/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/sql-based-etl-elt/index.html

Large diffs are not rendered by default.

Binary file modified blog/sql-based-etl-elt/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/surveilr-core-vs-patterns/index.html

Large diffs are not rendered by default.

Binary file modified blog/surveilr-core-vs-patterns/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/surveilr-integration-engine/index.html

Large diffs are not rendered by default.

Binary file modified blog/surveilr-integration-engine/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/vendor-assessments/index.html

Large diffs are not rendered by default.

Binary file modified blog/vendor-assessments/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions blog/why-stateful-integration/index.html

Large diffs are not rendered by default.

Binary file modified blog/why-stateful-integration/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions contact/index.html

Large diffs are not rendered by default.

Binary file modified contact/index.html.br
Binary file not shown.
6 changes: 3 additions & 3 deletions index.html

Large diffs are not rendered by default.

Binary file modified index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions insights/insight-1/index.html

Large diffs are not rendered by default.

Binary file modified insights/insight-1/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions insights/insight-2/index.html

Large diffs are not rendered by default.

Binary file modified insights/insight-2/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions insights/insight-3/index.html

Large diffs are not rendered by default.

Binary file modified insights/insight-3/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions insights/why-sqlite-for-rssd/index.html

Large diffs are not rendered by default.

Binary file modified insights/why-sqlite-for-rssd/index.html.br
Binary file not shown.
36 changes: 9 additions & 27 deletions lib/service/diabetes-research-hub/drhctl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-run --allow-net
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-run --allow-net --allowffi

import * as colors from "https://deno.land/std@0.224.0/fmt/colors.ts";
import { Database } from "https://deno.land/x/sqlite3@0.12.0/mod.ts";
Expand All @@ -18,12 +18,9 @@ const toolCmd = isWindows ? ".\\surveilr" : "surveilr";
const dbFilePath = "resource-surveillance.sqlite.db"; // Path to your SQLite DB

const RSC_BASE_URL = "https://raw.githubusercontent.com/surveilr/www.surveilr.com/main/lib/service/diabetes-research-hub";
const UX_URL = "https://www.surveilr.com/lib/service/diabetes-research-hub";
//const UX_URL = "https://www.surveilr.com/lib/service/diabetes-research-hub";
//const UX_URL = "http://localhost:4321/lib/service/diabetes-research-hub";




// Helper function to fetch SQL content
async function fetchSqlContent(url: string): Promise<string> {
try {
Expand All @@ -43,7 +40,6 @@ async function fetchSqlContent(url: string): Promise<string> {
}



// Helper function to execute a command
async function executeCommand(
cmd: string[],
Expand Down Expand Up @@ -165,7 +161,6 @@ if (Deno.args.length === 0) {
// Store the folder name in a variable
const folderName = Deno.args[0];


// Define synchronous suppliers
const deidentificationSQLSupplier: FlexibleTextSupplierSync = () =>
deidentificationSQL;
Expand All @@ -177,6 +172,8 @@ let vvSQL: string;
let uxSQL: string;


// Check and delete the file if it exists
await checkAndDeleteFile(dbFilePath);

try {
// Fetch SQL content for DeIdentification, Verification & Validation, and UX orchestration
Expand All @@ -185,12 +182,8 @@ try {
);
vvSQL = await fetchSqlContent(
`${RSC_BASE_URL}/verfication-validation/orchestrate-drh-vv.sql`,
);
// uxSQL = await fetchSqlContent(
// `${UX_URL}/package.sql`,
// );
uxSQL = await fetchUxSqlContent(); // Fetch UX SQL content
} catch (error) {
);
} catch (error) {
console.error(
colors.cyan(
"Error fetching SQL contents for DeIdentification and Verification & Validation:",
Expand All @@ -200,9 +193,6 @@ try {
Deno.exit(1);
}

// Check and delete the file if it exists
await checkAndDeleteFile(dbFilePath);

// Log the start of the process
console.log(colors.cyan(`Starting the process for folder: ${folderName}`));

Expand Down Expand Up @@ -238,19 +228,11 @@ try {
//Deno.exit(1);
}

// This function is for the dynamic combined view generation
// try {
// await checkAndCreateCombinedView(dbFilePath);
// console.log(colors.green("View generation completed successfully."));
// } catch (error) {
// console.error(colors.red("Error during view generation:"), error.message);
// }


try {
console.log(colors.dim(`Performing UX orchestration: ${folderName}...`));
await executeCommand([toolCmd, "shell"], uxSQLSupplier);
//executeSqlCommands(uxSQL); // Execute UX SQL commands
uxSQL = await fetchUxSqlContent(); // Fetch UX SQL content
//await executeCommand([toolCmd, "shell"], uxSQLSupplier);
executeSqlCommands(uxSQL); // Execute UX SQL commands
console.log(colors.green("UX orchestration completed successfully."));
} catch (error) {
console.error(colors.cyan("Error during UX orchestration:"), error.message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,19 @@ function logError(db: Database, errorMessage: string): void {

// Function to create the initial view and return SQL for combined CGM tracing view (first dataset)
export function createUVACombinedCGMViewSQL(dbFilePath: string): string {
const db = new Database(dbFilePath);
const db = new Database(dbFilePath);

// Check if the required table exists
const tableName = 'uniform_resource_cgm_file_metadata';
const checkTableStmt = db.prepare(`SELECT name FROM sqlite_master WHERE type='table' AND name=?`);
const tableExists = checkTableStmt.get(tableName);

if (!tableExists) {
console.error(`The required table "${tableName}" does not exist. Cannot create the combined view.`);
db.close();
return "";
}


try {
// Execute the initial view
Expand Down Expand Up @@ -78,6 +90,7 @@ export function createUVACombinedCGMViewSQL(dbFilePath: string): string {
return combinedViewSQL; // Return the SQL string instead of executing it
}


// Function to generate the combined CGM tracing view SQL for the second dataset
export function generateDetrendedDSCombinedCGMViewSQL(dbFilePath: string): string {
const db = new Database(dbFilePath);
Expand Down
Binary file removed pagefind/fragment/en_149f28a.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_15ecd6e.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_2653dec.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_2961a0b.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_2b1255f.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_35139ef.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_4012b68.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_461577c.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_4ae2f6f.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_4e82ca6.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_4ed07be.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_5acb6f9.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_60af333.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_621257e.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_67a96c4.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_6f94863.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_7061faf.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_78f0b58.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_7a731d6.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_82d4e85.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_841861a.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_8592f96.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_9084f74.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_93770d6.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_9d4a9ba.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_a7849e2.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_acbcb05.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_b07bda4.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_baf21f9.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_beb324c.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_c2d4d53.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_c58d963.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_ceaffbe.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_dc8fa08.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_df8c459.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_e0f5c45.pf_fragment
Binary file not shown.
Binary file added pagefind/fragment/en_e188777.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file removed pagefind/fragment/en_e956d6c.pf_fragment
Binary file not shown.
Binary file removed pagefind/fragment/en_ed4258a.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added pagefind/fragment/en_f4c5a84.pf_fragment
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion pagefind/pagefind-entry.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.1.1","languages":{"en":{"hash":"en_96bc1bc92d","wasm":"en","page_count":105}}}
{"version":"1.1.1","languages":{"en":{"hash":"en_29727f8985","wasm":"en","page_count":105}}}
Binary file added pagefind/pagefind.en_29727f8985.pf_meta
Binary file not shown.
Binary file removed pagefind/pagefind.en_96bc1bc92d.pf_meta
Binary file not shown.
4 changes: 2 additions & 2 deletions pattern/content-assembler/index.html

Large diffs are not rendered by default.

Binary file modified pattern/content-assembler/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions pattern/direct-messaging-service/index.html

Large diffs are not rendered by default.

Binary file modified pattern/direct-messaging-service/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions pattern/fhir-explorer/index.html

Large diffs are not rendered by default.

Binary file modified pattern/fhir-explorer/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions pattern/index.html

Large diffs are not rendered by default.

Binary file modified pattern/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions pattern/lectio/index.html

Large diffs are not rendered by default.

Binary file modified pattern/lectio/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions pattern/osquery/index.html

Large diffs are not rendered by default.

Binary file modified pattern/osquery/index.html.br
Binary file not shown.
4 changes: 2 additions & 2 deletions services/index.html

Large diffs are not rendered by default.

Binary file modified services/index.html.br
Binary file not shown.

0 comments on commit 446869a

Please sign in to comment.