Skip to content

Commit

Permalink
update: CTR3 Anderson (2016) Dataset stateless SQL #29
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetAnithaVarghese committed Oct 23, 2024
1 parent 9b679d0 commit 85e65d1
Show file tree
Hide file tree
Showing 4 changed files with 1,437 additions and 61 deletions.
18 changes: 8 additions & 10 deletions lib/service/diabetes-research-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ $ deno run -A ./drhctl.ts study-files
The following sample files are available in the repository:

- `/service/diabetes-research-hub/study-files.zip`
- `/service/diabetes-research-hub/ctr-study-files.zip`
- `/service/diabetes-research-hub/transformed-ctr-study-files.zip`
- `/service/diabetes-research-hub/de-trended-analysis-files.zip`

Each of these folders contains different datasets.
Expand Down Expand Up @@ -142,7 +142,7 @@ Depending on the dataset you're working with, use the appropriate folder name in
$ surveilr ingest files -r study-files/ && surveilr orchestrate transform-csv
# Ingest and transform the CSV files in the "ctr-study-files/" directory
$ surveilr ingest files -r ctr-study-files/ && surveilr orchestrate transform-csv
$ surveilr ingest files -r transformed-ctr-study-files/ && surveilr orchestrate transform-csv
# Ingest and transform the CSV files in the "de-trended-analysis-files/" directory
$ surveilr ingest files -r de-trended-analysis-files/ && surveilr orchestrate transform-csv
Expand All @@ -163,26 +163,24 @@ The de-identification and V&V scripts are specific to the first dataset (`study-

```bash
# Apply de-identification (only for the first dataset)
# deidentification and v&v moved inside respective DS for 2nd and 3rd DS
$ cat de-identification/drh-deidentification.sql | surveilr orchestrate -n "deidentification"
```

For other datasets, such as `ctr-study-files` or `de-trended-analysis-files`, use the corresponding SQL packages:
For other datasets, such as `transformed-ctr-study-files` or `de-trended-analysis-files`, use the corresponding SQL packages:

```bash
# Example for "study-files" dataset(DCLP1)
statelessDCLP1SQL within package.sql.ts
# Example for "ctr-study-files" dataset
statelessAndersonSQL within package.sql.ts
# Example for "de-trended-analysis-files" dataset
statelessdetrendedAnalysisSQL within package.sql.ts
```

### DRH Metrics SQL

```bash
# Use this only after running the combined CGM tracing generator for the first dataset
metricsDRHSQL within package.sql.ts generates metrics views.
```

### Running the SQL Package and Web UI

After processing the relevant SQL in `package.sql.ts`, proceed with one of the following commands to load the console and web UI:
Expand Down
8 changes: 4 additions & 4 deletions lib/service/diabetes-research-hub/package.sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,22 +1104,22 @@ export async function drhSQL() {
new class extends spn.TypicalSqlPageNotebook {


// async vandvDRHSQL() {
// async vandvDCLP1SQL() {
// // This function retrieves the SQL script for verfication and validation
// return await spn.TypicalSqlPageNotebook.fetchText(
// import.meta.resolve("./orchestration/vv-orchestration.sql"),
// );
// }

// async statelessDRHSQL() {
// async statelessDCLP1SQL() {
// // read the file from either local or remote (depending on location of this file)
// return await spn.TypicalSqlPageNotebook.fetchText(
// import.meta.resolve("./stateless.sql"),
// );
// }

async ctr3andersonDRHSQL() {
// read the file from either local or remote (depending on location of this file)
async statelessAndersonSQL() {
// stateless SQL for CTR3 Anderson (2016) Dataset
return await spn.TypicalSqlPageNotebook.fetchText(
import.meta.resolve("./study-specific-stateless/ctr-anderson-stateless.sql"),
);
Expand Down
Loading

0 comments on commit 85e65d1

Please sign in to comment.