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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sdc-qrf

v1.1.0-alpha.15

Published

Set of utils packaged in [npm package](https://www.npmjs.com/package/sdc-qrf) to render forms for SDC Questionnaire/Questionnaire Response.

Readme

sdc-qrf

Set of utils packaged in npm package to render forms for SDC Questionnaire/Questionnaire Response.

Sdc-qrf uses in fhir-emr project. Also we're using aidbox-sdc as backed for fhir-emr.

npm i sdc-qrf

P.S. the package was allocated from https://github.com/beda-software/sdc-ide with commits history

Translation

The FHIR ↔ FCE converter supports the translation primitive extension on fields such as Questionnaire.title and Questionnaire.item.text.

By default, toFirstClassExtension(questionnaire) keeps translation extensions in FHIR format (they stay under extension and are not promoted to FCE translation fields). Pass withTranslations: true as the second argument to convert them:

import { toFirstClassExtension } from 'sdc-qrf';

// Default: translation extensions stay in FHIR format
const fceWithoutTranslations = toFirstClassExtension(questionnaire);

// Opt in: convert translation extensions to FCE `translation` fields
const fceWithTranslations = toFirstClassExtension(questionnaire, true);

FHIR

item:
    - linkId: chief-complaint
      type: string
      text: Chief complaint
      _text:
          extension:
              - url: http://hl7.org/fhir/StructureDefinition/translation
                extension:
                    - url: lang
                      valueCode: de
                    - url: content
                      valueString: Hauptbeschwerde
              - url: http://hl7.org/fhir/StructureDefinition/translation
                extension:
                    - url: lang
                      valueCode: fr
                    - url: content
                      valueString: Motif de consultation

FCE (toFirstClassExtension(questionnaire, true) / fromFirstClassExtension)

item:
    - linkId: chief-complaint
      type: string
      text: Chief complaint
      _text:
          translation:
              - lang: de
                content: Hauptbeschwerde
              - lang: fr
                content: Motif de consultation

translateQuestionnaire

To bake a single language into a FHIR Questionnaire before converting to FCE (resolves matching translations, keeps translation extensions, and stashes the original value):

import { toFirstClassExtension, translateQuestionnaire } from 'sdc-qrf';

const fceQuestionnaire = toFirstClassExtension(translateQuestionnaire(questionnaire, 'fr'), true);

translateQuestionnaire(questionnaire, 'fr') produces:

language: fr
item:
    - linkId: chief-complaint
      type: string
      text: Motif de consultation
      _text:
          extension:
              - url: http://hl7.org/fhir/StructureDefinition/translation
                extension:
                    - url: lang
                      valueCode: de
                    - url: content
                      valueString: Hauptbeschwerde
              - url: http://hl7.org/fhir/StructureDefinition/translation
                extension:
                    - url: lang
                      valueCode: fr
                    - url: content
                      valueString: Motif de consultation
              - url: http://hl7.org/fhir/StructureDefinition/translation
                extension:
                    - url: lang
                      valueCode: en
                    - url: content
                      valueString: Chief complaint

Before replacing a value, the original is stored as a translation extension using Questionnaire.language (or en if missing). If at least one translation is applied, Questionnaire.language is set to the requested language. If the requested language is missing, the original value and all translation extensions are left unchanged.