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

@openclinical/pfanalyse

v0.5.1

Published

A CLI tool for analysing PROformajs protocols

Downloads

6

Readme

PFAnalyse

PFAnalyse is a command-line tool for analysing PROformajs protocols.

Getting started

With Nodejs (tested with v16+) and Git installed you can first clone the repository, install the dependencies and then link the package.

you@yourmachine:~$ git clone https://gitlab.com/openclinical/pfanalyse.git
you@yourmachine:~$ cd pfanalyse
you@yourmachine:~$ npm install
you@yourmachine:~$ npm link
you@yourmachine:~$ pfanalyse

Usage: pfanalyse [options] <guideline_url> [decision_path] [data_url]

A command line tool to analyse proformajs decisions

Options:
  -d, --debug            Show debug information
  -u, --user <username>  username (for authenticating to labs.openclinical.net)
  -V, --version          output the version number
  -h, --help             output usage information

PFAnalyse performs the following steps:

  1. loads the guideline
  2. grabs the decision, analyses it to find it's dependent data definitions
  3. loads the csv file
  4. checks the csv file to make sure that the first columns match the set of data definitions and the subsequent columns match the set of decision candidates
  5. loads the data from each row of the csv into the extracted single decision model to see if the recommendation matches the suggested recommendation
  6. returns a csv that has the following shape:
loaded	matched	flu	cold	other
true	false	NN	YN	NY
true	true	YY	NN	NN

Where the first "Y" or "N" indicates the value passed in the data file and the second "Y" or "N" indicates whether the candidate is recommended by the decision model. In the example one line matches the recommendation and the other does not. The first case suggests a flu diagnosis where the data recorded a cold.

Note that if the csv file is ommitted, the tool performs steps 1 and 2 above and then outputs the headers for the csv it expects to injest and indicates the accepted values for those columns. Note that an asterix indicates a multi-valued data item which will accept array values.

Examples

Try the following examples:

pfanalyse file://./etc/cold_or_flu.json
pfanalyse file://./etc/cold_or_flu.json cold_or_flu:diagnosis
pfanalyse file://./etc/cold_or_flu.json cold_or_flu:diagnosis file://./etc/cold_or_flu.tsv
pfanalyse file://./etc/cold_or_flu.json cold_or_flu:diagnosis file://./etc/cold_or_flu-noparse.tsv
pfanalyse file://./etc/dyndef.json exporttest:decision file://./etc/dyndef.tsv
pfanalyse https://labs.openclinical.net/api/v1/demo/cold_or_flu
pfanalyse file://./etc/issue1.json
pfanalyse file://./etc/issue1.json cold_or_flu:diagnosis2
pfanalyse file://./etc/issue1.json cold_or_flu:diagnosis2 file://./etc/issue1.json