npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sussex-occ/sid-sl-control

v1.0.11

Published

This project contains tools used to maintain the SID semantic layer.

Downloads

46

Readme

SID Semantic Layer Control Tools

This project contains tools used to maintain the SID semantic layer.

  • Deduplication: the sl-deduplicate-and-merge tool takes raw data from the SID reporting schema tables, de-duplicates it and merges it into an equivalent table within the Semantic Layer sl schema.
  • Patient Conditions: the sl-process-conditions tool is used to generate the Semantic Layer patient conditions tables.
  • Maintenance: the sl-manage tool allows general maintenance tasks to be carried out on the Semantic Layer such as creating or dropping table indexes.

Deduplication

Patient Conditions

Patient condition processing is carried out using the sl-process-conditions tool.

The tools are split into 5 different stages.

  1. Stage 1 - processes SID reporting data from tables such as EDSUS and encounters into the sl.patient_all_codes table.
  2. Stage 2 - reduces the sl.patient_all_codes table to the sl.patient_all_codes_distinct - a summary of the number of distinct patient records for a given code.
  3. Stage 3 - for conditions in each codeset (CCS, Elixhauser, etc) generates codeset condition tables with an entry for each patient/condition combination.

The normal pattern of usage for new data would be, assuming 100 new raw data files have been received:

| Stage | Command | Description | | ------| ------- | ----------- | | 1 | > sidslctl stage1 createjobs --rawDataIds 32005-32104 | Creates 100 jobs in sl.control_job, one to process each raw data file. | | 1 | > sidslctl stage1 listjobs --jobIds 290-291 | Lists stage1 jobs for the given job ids. | | 1 | > sidslctl stage1 runjobs --jobIds 290-291 | Runs any outstanding stage1 jobs and update sl.control_processing_status accordingly. | | | | | 2 | > sidslctl stage2 createjobs --rawDataIds 32005-32104 | Creates a single job to reduce records in sl.patient_all_codes for raw data ids between 32005 and 32104 to distinct records for each patient/code combination. | | 2 | > sidslctl stage2 listjobs | Lists any unrun stage2 jobs. | | 2 | > sidslctl stage2 runjobs | Runs any outstanding stage2 jobs and updates sl.control_processing_status accordingly. | | | | | 3 | > sidslctl stage3 createjob -m '2023-01-01' | Creates a single job for each codeset to run stage 3 processing for the given milestone. Normally jobs will be created for annual milestones that map to those used by demographic milestone processing. | | 3 | > sidslctl stage3 runjobs | Runs any outstanding stage3 jobs and updates sl.control_processing_status accordingly. |

The Tools

Configuration

The SID sematic layer tools needs to connect to the SID database. Use this option to configure your SID database credentials that will be stored securely in your account. You must configure your credentials before the other tools will work.

Set your database configuration:

sidslctl configuration set

It will ask you to enter your database credentials and will store your password securely in the OS keychain or equivalent. Normally you should enter credentials for the live SID reporting database SID_REPORTING.

Show your database configuration:

sidslctl configuration show

Clear your database configuration:

sidslctl configuration clean

Stage 1

Stage 2

Stage 3

Development

git clone https://github.com/Sussex-OCC/sid-sl-control.git
cd sid-sl-control
npm i
npm run dev -- configuration show