Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOMED Hydrating, Filtering, Special MR Generation #1648

Draft
wants to merge 19 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(snomed): script header
Refs: #1442
  • Loading branch information
jonahkaye committed Apr 1, 2024
commit b8232257c6db07e62c136d0a4dab4926dba22d58
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main customer facing output of this PR. A script that for a given customer, gets all their patients consolidated data and performs the filtering and MR summary generation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full script for running this whole process

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// This script is used to process all of a customers patients through a snomed filtering pipeline, and
// then generate MR summaries and CSV files from the resulting bundles
// The script makes consolidated queries, inserts a patient FHIR resource, and then calls the filtering
// and MR generation logic.
Comment on lines +1 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use multi-line comments

also, please indicate how to use it


import { bundleToHtml } from "@metriport/core/external/aws/lambda-logic/bundle-to-html";
import fs from "fs/promises";
import { convertHtmlTablesToCsv } from "./convert-html-to-csv";
Expand All @@ -14,7 +19,6 @@ const apiLoadBalancerURL = getEnvVarOrFail("API_URL");
const fhirUrl = getEnvVarOrFail("FHIR_URL");
const cxId = getEnvVarOrFail("CX_ID");
const metriportApi: MetriportMedicalApi = new MetriportMedicalApi(apiKey);

const resultsDirectory = "./runs/consolidatedPatients";

async function fetchPatientIds(cxId: string): Promise<string[]> {
Expand Down
Loading