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

fhir-spec-tools

v0.2.0

Published

Scripts and other shared tooling for working with the HL7® FHIR® standard

Downloads

7

Readme

fhir-spec-tools

Scripts and other shared tooling for working with the HL7® FHIR® standard

List of scripts

  • parseChoiceTypesForResource.ts
    • Run with npm run build:choice-types
    • Purpose: Option [x] choice types for each resource
    • Format: creates an object whose keys are resourceTypes and values are objects whose keys are choice types and values are an array of all the types it can be
    • Input: structure definitions in folder resource-definitions (pulled from each resource profile, example: https://hl7.org/fhir/R4/encounter.profile.json)
    • Output: choice-types.json
    • Original repo: bulk-export-server getChoiceTypesForResource.js
  • parseMandatoryElements.ts
    • Run with npm run build:mandatory-elements
    • Purpose: Mandatory (minimum cardinality 1) elements for each resource
    • Format: creates object whose keys are resourceTypes and values are arrays of strings that are mandatory elements
    • Input: structure definitions in folder resource-definitions (pulled from each resource profile, example: https://hl7.org/fhir/R4/encounter.profile.json)
    • Output: mandatory-elements.json
    • Original repo: bulk-export-server parseStructureDefinitions.js
  • parseCompartmentDefinition.ts
    • Run with npm run build:patient-paths
    • Purpose: patient reference paths and patient search parameters for each associated resource
    • Format: creates object whose keys are resourceTypes and values are arrays of strings to use to reference a patient (or same but for search parameters)
    • Input: compartmentdefinition-patient.json from https://hl7.org/fhir/R4/compartmentdefinition-patient.html
    • Output: patient-attribute-paths.json, patient-search-parameters.json
    • Original repo: deqm-test-server parseCompartmentDefinition.js
    • Note: patient-search-parameters is not used by deqm-test-server but is used in fqm-execution. bulk-export-server also uses the compartmentDefinition, but only uses the resource names, which can be pulled from either of these output files instead. This script is currently dependent on node-fhir-server-core for patient-attribute-paths, but ideally these would be pulled directly from the FHIR spec.
  • parseCodeSystems.ts
    • Run with npm run build:code-systems
    • Purpose: Lookup name for each code system url
    • Format: object with code system url keys mapped to name values
    • Input: cts-metadata.json
    • Output: systemMap.ts
    • Original repo: fqm-execution parseCodeSystems.ts
  • parseCodePath.ts
    • Run with npm run build:codes
    • Purpose: primary and other code paths for each resource
    • Format: create object whose keys are resourceTypes and values have the resourceTypes' primaryCodePath and other code-type paths
    • Input: fhir-modelinfo-4.0.1.xml
    • Output: codePaths.ts
    • Original repo: fqm-testify parseCodePath.ts
  • parsePrimaryDatePath.ts
    • Run with npm run build:dates
    • Purpose: information about date paths and date types for each resource
    • Format: create object whose keys are resourceTypes and values are an object with a date path key and object listing that key’s data types
    • Input: fhir-modelinfo-4.0.1.xml
    • Output: primaryDatePaths.ts
    • Original repo: fqm-testify parsePrimaryDatePath.ts
  • parseDateSearchParam.ts
    • Run with npm run build:date-search-parameters
    • Purpose: filter all search parameters to only date parameters
    • Format: FHIR searchParams bundle
    • Input: search-parameters.json from https://hl7.org/fhir/R4/search-parameters.json
    • Output: dateSearchParameters.ts
    • Original repo: fqm-execution (just files, script was not previously committed)
  • parseProperties.ts
    • Run with npm run build:properties
    • Purpose: valid properties exist for each resource
    • Format: create object whose keys are resourceTypes and values are an array of valid properties
    • Input: structure definitions in folder resource-definitions (pulled from each resource profile, example: https://hl7.org/fhir/R4/encounter.profile.json)
    • Output: propertyPaths.ts
    • Original repo: fqm-testify parseProperties.ts, parse-properties branch
  • parseSearchParams.ts
    • Run with npm run build:search-parameters
    • Purpose: valid search parameters for each resource
    • Format: create object whose keys are resourceTypes and values are an object whose keys are the search parameters for each type and whose values are the types associated with each search parameter
    • Input: structure definitions in folder resource-definitions (pulled from each resource profile, example: https://hl7.org/fhir/R4/encounter.profile.json), and search-parameters.json (pulled from https://hl7.org/fhir/R4/search-parameters.json)
    • Output: searchParameters.ts