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

@datafire/infermedica

v6.0.0

Published

DataFire integration for Infermedica API

Readme

@datafire/infermedica

Client library for Infermedica API

Installation and Usage

npm install --save @datafire/infermedica
let infermedica = require('@datafire/infermedica').create();

.then(data => {
  console.log(data);
});

Description

Empower your healthcare services with intelligent diagnostic insights of Infermedica API.

Actions

getConcepts

infermedica.getConcepts({}, context)

Input

  • input object
    • ids string: ids
    • types string: types

Output

getConcept

infermedica.getConcept({
  "id": ""
}, context)

Input

  • input object
    • id required string: concept id

Output

getAllConditions

Returns a list of all available conditions.

infermedica.getAllConditions({}, context)

Input

  • input object
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • enable_triage_5 boolean: enable 5-level triage values

Output

getCondition

Returns details of a single condition specified by id parameter.

infermedica.getCondition({
  "id": ""
}, context)

Input

  • input object
    • id required string: condition id
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • enable_triage_5 boolean: enable 5-level triage values

Output

computeDiagnosis

Suggests possible diagnoses and relevant observations based on provided patient information.

infermedica.computeDiagnosis({
  "body": {
    "age": {},
    "sex": ""
  }
}, context)

Input

Output

computeExplanation

Explains which evidence impact probability of selected condition.

infermedica.computeExplanation({
  "body": {
    "age": {},
    "sex": "",
    "target": ""
  }
}, context)

Input

Output

getDatabaseInfo

Returns information about data used by diagnostic engine.

infermedica.getDatabaseInfo({}, context)

Input

  • input object
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided

Output

getAllLabTests

Returns a list of all available lab tests.

infermedica.getAllLabTests({}, context)

Input

  • input object
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided

Output

getLabTest

Returns details of a single lab test specified by id parameter.

infermedica.getLabTest({
  "id": ""
}, context)

Input

  • input object
    • id required string: lab test id
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided

Output

getMatchingObservation

Returns a single observation matching given phrase.

infermedica.getMatchingObservation({
  "phrase": ""
}, context)

Input

  • input object
    • phrase required string: phrase to match
    • sex string (values: male, female): sex filter
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided

Output

getMentions

Returns list of mentions of observation found in given text.

infermedica.getMentions({
  "body": {
    "text": ""
  }
}, context)

Input

Output

computeRationale

Returns rationale behind the question asked by the system.

infermedica.computeRationale({
  "body": {
    "age": {},
    "sex": ""
  }
}, context)

Input

Output

computeRedFlags

Suggests possible red flag symptoms based on provided patient information.

infermedica.computeRedFlags({
  "body": {
    "age": {},
    "sex": ""
  }
}, context)

Input

  • input object

Output

getAllRiskFactors

Returns a list of all available risk factors.

infermedica.getAllRiskFactors({}, context)

Input

  • input object
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • enable_triage_5 boolean: enable 5-level triage values

Output

getRiskFactor

Returns details of a single risk factor specified by id parameter.

infermedica.getRiskFactor({
  "id": ""
}, context)

Input

  • input object
    • id required string: risk factor id
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • enable_triage_5 boolean: enable 5-level triage values

Output

getMatchingObservations

Returns list of observations matching the given phrase.

infermedica.getMatchingObservations({
  "phrase": ""
}, context)

Input

  • input object
    • phrase required string: phrase to match
    • sex string (values: male, female): sex filter
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • max_results integer: maximum number of results
    • type array: type of results

Output

getSuggestions

Suggests possible symptoms based on provided patient information.

infermedica.getSuggestions({
  "body": {}
}, context)

Input

  • input object
    • body required SuggestRequest
    • max_results integer: maximum number of results

Output

getAllSymptoms

Returns a list of all available symptoms.

infermedica.getAllSymptoms({}, context)

Input

  • input object
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • enable_triage_5 boolean: enable 5-level triage values

Output

getSymptom

Returns details of a single symptom specified by id parameter.

infermedica.getSymptom({
  "id": ""
}, context)

Input

  • input object
    • id required string: symptoms id
    • age.value integer: age value
    • age.unit string (values: year, month): unit in which age value was provided
    • enable_triage_5 boolean: enable 5-level triage values

Output

computeTriage

Estimates triage level based on provided patient information.

infermedica.computeTriage({
  "body": {
    "age": {},
    "sex": ""
  }
}, context)

Input

Output

Definitions

Choice_Public

  • Choice_Public object
    • id required string (values: present, absent, unknown)
    • label required string

ConceptItemModel_Public

  • ConceptItemModel_Public object
    • common_name string
    • id string
    • name string
    • type string (values: condition, symptom, risk_factor, lab_test)

ConditionProbability_Public

  • ConditionProbability_Public object
    • common_name string: condition common name
    • id required string: condition id
    • name required string: condition name
    • probability required number

Condition_Details

  • Condition_Details object
    • acuteness string (values: chronic, chronic_with_exacerbations, acute_potentially_chronic, acute)
    • categories required array
      • items string
    • common_name string
    • extras object: additional content, like custom properties or images
    • id required string
    • name required string
    • prevalence string (values: very_rare, rare, moderate, common)
    • severity string (values: mild, moderate, severe)
    • sex_filter required string (values: both, male, female)
    • triage_level string (values: emergency_ambulance, emergency, consultation_24, consultation, self_care)

Condition_Public

  • Condition_Public object
    • acuteness string (values: chronic, chronic_with_exacerbations, acute_potentially_chronic, acute)
    • categories required array
      • items string
    • common_name string
    • extras object: additional content, like custom properties or images
    • id required string
    • name required string
    • prevalence string (values: very_rare, rare, moderate, common)
    • severity string (values: mild, moderate, severe)
    • sex_filter required string (values: both, male, female)
    • triage_level string (values: emergency_ambulance, emergency, consultation_24, consultation, self_care)

DiagnosisRequest

  • DiagnosisRequest object
    • age required object
    • evaluated_at string: time when diagnosis was evaluated in ISO 8601 format
    • evidence array
    • extras object
    • sex required string (values: male, female)

DiagnosisResponse_Public

Evidence

  • Evidence object
    • choice_id required string (values: present, absent, unknown)
    • id required string: id of observation or condition
    • observed_at string: time when evidence was observed in ISO 8601 format
    • source string (values: initial, suggest, predefined, red_flags): Flag describing evidence origin

ExplanationEvidence

  • ExplanationEvidence object
    • common_name string: observation common name
    • id required string: observation id
    • name required string: observation name

ExplanationRequest

  • ExplanationRequest object
    • age required object
    • evaluated_at string: time when diagnosis was evaluated in ISO 8601 format
    • evidence array
    • extras object
    • sex required string (values: male, female)
    • target required string: target condition id

ExplanationResponse

Info_Public

  • Info_Public object
    • api_version string: version of api release
    • conditions_count required integer
    • lab_tests_count required integer
    • risk_factors_count required integer
    • symptoms_count required integer
    • updated_at required string: time of last model update in ISO 8601 format

LabTestResult_Details

  • LabTestResult_Details object
    • id required string
    • type required string (values: very_low, low, normal, high, very_high, absent, present)

LabTestResult_Public

  • LabTestResult_Public object
    • id required string
    • type required string (values: very_low, low, normal, high, very_high, absent, present)

LabTest_Details

  • LabTest_Details object
    • category string
    • common_name string
    • id required string
    • name required string
    • results array

LabTest_Public

  • LabTest_Public object
    • category string
    • common_name string
    • id required string
    • name required string
    • results array

ObservationMention

  • ObservationMention object
    • choice_id required string (values: present, absent, unknown)
    • common_name string: observation common name
    • head_position required integer
    • id required string: observation id
    • name required string: observation name
    • orth required string
    • positions required array
      • items integer

ParseRequest

  • ParseRequest object
    • concept_types array: list of concept types that should be captured
      • items string (values: symptom, risk_factor)
    • context array: ordered list of ids of present symptoms that were already captured and can be used as context
      • items string
    • correct_spelling boolean: correct spelling of input text before proper analysis
    • include_tokens boolean: include tokenization details in output
    • text required string: user text to process

ParseResponse

  • ParseResponse object
    • mentions required array: list of recognized symptom or risk factor mentions
    • obvious required boolean: indicates that entire input text has been parsed successfully and unambiguously
    • tokens array
      • items string

QuestionItem_Public

  • QuestionItem_Public object
    • choices required array: list of available answer choices
    • id required string: observation id
    • name required string: name or alias of observation

Question_Public

  • Question_Public object
    • extras object: additional content, like images or HTML
    • items required array: one or more observations to evaluate
    • text required string: question text
    • type string (values: single, group_single, group_multiple)

RationaleParam

  • RationaleParam object
    • common_name string: observation or condition common name
    • id required string: observation or condition id
    • name required string: observation or condition name

RationaleRequest

  • RationaleRequest object
    • age required object
    • evaluated_at string: time when diagnosis was evaluated in ISO 8601 format
    • evidence array
    • extras object
    • sex required string (values: male, female)

RationaleResponse

  • RationaleResponse object
    • condition_params array: condition params
    • observation_params array: observation params
    • type required string (values: r0, r1, r2, r3, r4, r5, r6): type

RiskFactor_Details

  • RiskFactor_Details object
    • category string
    • common_name string
    • extras object: additional content, like custom properties or images
    • id required string
    • image_source string
    • image_url string
    • name required string
    • question required string: only available in object details, not in listing
    • sex_filter required string (values: both, male, female)

RiskFactor_Public

  • RiskFactor_Public object
    • category string
    • common_name string
    • extras object: additional content, like custom properties or images
    • id required string
    • image_source string
    • image_url string
    • name required string
    • sex_filter required string (values: both, male, female)

SearchResult

  • SearchResult object
    • id required string
    • label required string: matched phrase, name or its synonym

SeriousObservation

  • SeriousObservation object
    • common_name string: observation common name
    • id required string: observation id
    • is_emergency boolean
    • name required string: observation name

SuggestRequest

  • SuggestRequest object
    • age object
    • evaluated_at string: time when diagnosis was evaluated in ISO 8601 format
    • evidence array
    • extras object
    • sex string (values: male, female)

SuggestResult

  • SuggestResult object
    • common_name string
    • id required string
    • name required string

Symptom_Details

  • Symptom_Details object
    • category string
    • children object: list of child symptoms
    • common_name string
    • extras object: additional content, like custom properties or images
    • id required string
    • image_source string
    • image_url string
    • name required string
    • parent_id string: id of parent symptom
    • parent_relation string (values: base, duration, severity, character, exacerbating_factor, diminishing_factor, location, radiation): type of relation with parent symptom
    • question required string: only available in object details, not in listing
    • sex_filter required string (values: both, male, female)

Symptom_Public

  • Symptom_Public object
    • category string
    • children object: list of child symptoms
    • common_name string
    • extras object: additional content, like custom properties or images
    • id required string
    • image_source string
    • image_url string
    • name required string
    • parent_id string: id of parent symptom
    • parent_relation string (values: base, duration, severity, character, exacerbating_factor, diminishing_factor, location, radiation): type of relation with parent symptom
    • sex_filter required string (values: both, male, female)

TriageResponse

  • TriageResponse object
    • root_cause string (values: r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12)
    • serious array
    • teleconsultation_applicable boolean
    • triage_level string (values: emergency_ambulance, emergency, consultation_24, consultation, self_care)