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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@datafire/patientview

v6.0.0

Published

DataFire integration for PatientView

Readme

@datafire/patientview

Client library for PatientView

Installation and Usage

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

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

Description

The recommended REST API endpoints to be used when integrating with PatientView

Actions

logIn

Authenticate using username and password, returns token, which must be added to X-Auth-Token in header of all future requests

patientview.logIn({}, context)

Input

Output

logOut

Log Out

patientview.logOut({
  "token": ""
}, context)

Input

  • input object
    • token required string: token

Output

Output schema unknown

getBasicUserInformation

Once logged in and have a token, get basic user information including group role membership

patientview.getBasicUserInformation({
  "token": ""
}, context)

Input

  • input object
    • token required string: token

Output

getBasicPatientDetails

Given a User ID, get basic patient information for a user from clinical data stored in FHIR

patientview.getBasicPatientDetails({
  "userId": 0
}, context)

Input

  • input object
    • userId required integer: userId

Output

getPatientManagementDiagnoses

getPatientManagementDiagnoses

patientview.getPatientManagementDiagnoses(null, context)

Input

This action has no parameters

Output

  • output array

getPatientManagementLookupTypes

getPatientManagementLookupTypes

patientview.getPatientManagementLookupTypes(null, context)

Input

This action has no parameters

Output

validatePatientManagement

validatePatientManagement

patientview.validatePatientManagement({}, context)

Input

Output

Output schema unknown

getPatientManagement

getPatientManagement

patientview.getPatientManagement({
  "userId": 0,
  "groupId": 0,
  "identifierId": 0
}, context)

Input

  • input object
    • userId required integer: userId
    • groupId required integer: groupId
    • identifierId required integer: identifierId

Output

savePatientManagement

savePatientManagement

patientview.savePatientManagement({
  "userId": 0,
  "groupId": 0,
  "identifierId": 0
}, context)

Input

  • input object
    • userId required integer: userId
    • groupId required integer: groupId
    • identifierId required integer: identifierId
    • body PatientManagement

Output

Output schema unknown

savePatientManagementSurgeries

savePatientManagementSurgeries

patientview.savePatientManagementSurgeries({
  "userId": 0,
  "groupId": 0,
  "identifierId": 0
}, context)

Input

  • input object
    • userId required integer: userId
    • groupId required integer: groupId
    • identifierId required integer: identifierId
    • body PatientManagement

Output

Output schema unknown

getAvailableObservationHeadings

Given a User ID retrieve a list of available observation types for that user (where they have observation data).

patientview.getAvailableObservationHeadings({
  "userId": 0
}, context)

Input

  • input object
    • userId required integer: userId

Output

getObservationsByCodes

Given a User ID and search parameters, retrieve a page of observations.

patientview.getObservationsByCodes({
  "userId": 0,
  "code": [],
  "limit": 0,
  "offset": 0,
  "orderDirection": ""
}, context)

Input

  • input object
    • userId required integer: userId
    • code required array: code
    • limit required integer: limit
    • offset required integer: offset
    • orderDirection required string: orderDirection

Output

getObservationsByCode

Given a User ID and observation code, retrieve all observations.

patientview.getObservationsByCode({
  "userId": 0,
  "code": ""
}, context)

Input

  • input object
    • userId required integer: userId
    • code required string: code

Output

getPatientEnteredObservationsByCode

Given a User ID and observation code, retrieve patient entered observations.

patientview.getPatientEnteredObservationsByCode({
  "userId": 0,
  "code": ""
}, context)

Input

  • input object
    • userId required integer: userId
    • code required string: code

Output

getPatientEnteredObservationHeadings

Given a User ID retrieve a list of available observation types for that user (where they have patient entered observation data).

patientview.getPatientEnteredObservationHeadings({
  "userId": 0
}, context)

Input

  • input object
    • userId required integer: userId

Output

Definitions

ApiKey

  • ApiKey object
    • expired boolean
    • expiryDate string
    • key string

BaseGroup

  • BaseGroup object
    • code string
    • groupType Lookup
    • id integer
    • lastImportDate string
    • name string
    • parentCodes array
      • items string
    • shortName string
    • visible boolean
    • visibleToJoin boolean

Category

  • Category object
    • friendlyDescription string
    • hidden boolean
    • icd10Description string
    • id integer
    • number integer

Code

  • Code object
    • code string
    • codeCategories array
    • codeType Lookup
    • created string
    • description string
    • displayOrder integer
    • externalStandards array
    • fullDescription string
    • hideFromPatients boolean
    • id integer
    • lastUpdate string
    • links array
    • patientFriendlyName string
    • removedExternally boolean
    • sourceType string (values: PATIENTVIEW, NHS_CHOICES)
    • standardType Lookup

CodeCategory

  • CodeCategory object

CodeExternalStandard

  • CodeExternalStandard object

ContactPoint

  • ContactPoint object
    • contactPointType ContactPointType
    • content string
    • created string
    • id integer
    • lastUpdate string

ContactPointType

  • ContactPointType object
    • description string
    • id integer
    • lookupType LookupType
    • value string (values: UNIT_WEB_ADDRESS, TRUST_WEB_ADDRESS, PV_ADMIN_NAME, PV_ADMIN_PHONE, PV_ADMIN_EMAIL, UNIT_ENQUIRIES_PHONE, UNIT_ENQUIRIES_EMAIL, APPOINTMENT_PHONE, APPOINTMENT_EMAIL, OUT_OF_HOURS_INFO)

Credentials

  • Credentials object
    • apiKey string
    • password string
    • username string

Entry_long_Map_string_List_FhirObservation_

Entry_string_List_FhirObservation_

ExternalStandard

  • ExternalStandard object
    • description string
    • id integer
    • name string

Feature

  • Feature object
    • created string
    • description string
    • id integer
    • lastUpdate string
    • name string

FhirAllergy

  • FhirAllergy object
    • confidenceLevel string
    • group Group
    • id integer
    • identifier string
    • infoSource string
    • reaction string
    • recordedDate string
    • status string
    • substance string
    • type string

FhirCondition

  • FhirCondition object
    • asserter string
    • category string
    • code string
    • date string
    • description string
    • fullDescription string
    • group Group
    • id integer
    • identifier string
    • links array
    • notes string
    • severity string
    • status string

FhirContact

  • FhirContact object
    • id integer
    • system string
    • use string
    • value string

FhirEncounter

  • FhirEncounter object

FhirIdentifier

  • FhirIdentifier object
    • id integer
    • label string
    • value string

FhirObservation

  • FhirObservation object
    • applies string
    • bodySite string
    • comments string
    • comparator string
    • diagram string
    • group Group
    • id integer
    • identifier string
    • location string
    • name string
    • temporaryUuid string
    • units string
    • value string

FhirObservationPage

FhirPatient

  • FhirPatient object
    • address1 string
    • address2 string
    • address3 string
    • address4 string
    • contacts array
    • dateOfBirth string
    • dateOfBirthNoTime string
    • forename string
    • gender string
    • group Group
    • groupCode string
    • identifier string
    • identifiers array
    • postcode string
    • practitioners array
    • surname string

FhirPractitioner

  • FhirPractitioner object
    • address1 string
    • address2 string
    • address3 string
    • address4 string
    • allowInviteGp boolean
    • contacts array
    • gender string
    • groupCode string
    • identifier string
    • inviteDate string
    • name string
    • postcode string
    • role string

FhirProcedure

  • FhirProcedure object
    • bodySite string
    • id integer
    • type string

Group

  • Group object
    • address1 string
    • address2 string
    • address3 string
    • childGroups array
    • code string
    • contactPoints array
    • created string
    • fhirResourceId string
    • groupFeatures array
    • groupType Lookup
    • id integer
    • lastImportDate string
    • lastUpdate string
    • links array
    • locations array
    • name string
    • parentGroups array
    • postcode string
    • sftpUser string
    • shortName string
    • visible boolean
    • visibleToJoin boolean

GroupFeature

  • GroupFeature object
    • created string
    • feature Feature
    • id integer
    • lastUpdate string

GroupRole

  • GroupRole object

Link

  • Link object
    • created string
    • displayOrder integer
    • id integer
    • lastUpdate string
    • link string
    • linkType Lookup
    • name string

Location

  • Location object
    • address string
    • created string
    • email string
    • id integer
    • label string
    • lastUpdate string
    • name string
    • phone string
    • web string

Lookup

  • Lookup object
    • created string
    • description string
    • descriptionFriendly string
    • displayOrder integer
    • id integer
    • lastUpdate string
    • lookupType LookupType
    • value string

LookupType

  • LookupType object
    • created string
    • description string
    • id integer
    • lastUpdate string
    • type string (values: GROUP, MENU, ROLE, CODE_STANDARD, CODE_TYPE, FEATURE_TYPE, RELATIONSHIP_TYPE, IDENTIFIER, CONTACT_POINT_TYPE, STATISTIC_TYPE, NEWS_TYPE, GENDER, IBD_CROHNSLOCATION, IBD_CROHNSPROXIMALTERMINALILEUM, IBD_CROHNSPERIANAL, IBD_CROHNSBEHAVIOUR, IBD_UCEXTENT, IBD_EGIMCOMPLICATION, IBD_SURGERYMAINPROCEDURE, IBD_SMOKINGSTATUS, IBD_FAMILYHISTORY, LINK_TYPE)

ObservationHeading

  • ObservationHeading object
    • code string
    • created string
    • decimalPlaces integer
    • defaultPanel integer
    • defaultPanelOrder integer
    • heading string
    • id integer
    • infoLink string
    • lastUpdate string
    • maxGraph number
    • minGraph number
    • name string
    • normalRange string
    • observationHeadingGroups array
    • units string

ObservationHeadingGroup

  • ObservationHeadingGroup object
    • created string
    • group Group
    • id integer
    • panel integer
    • panelOrder integer

Patient

PatientManagement

Role

  • Role object
    • description string
    • id integer
    • name string (values: PATIENT, UNIT_ADMIN, STAFF_ADMIN, DISEASE_GROUP_ADMIN, SPECIALTY_ADMIN, GLOBAL_ADMIN, GP_ADMIN, MEMBER, PUBLIC, UNIT_ADMIN_API, IMPORTER)
    • visible boolean

Route

  • Route object
    • controller string
    • created string
    • displayOrder integer
    • id integer
    • lookup Lookup
    • templateUrl string
    • title string
    • url string

UUID

User

  • User object
    • apiKey ApiKey
    • canSwitchUser boolean
    • changePassword boolean
    • contactNumber string
    • created string
    • currentLogin string
    • currentLoginIpAddress string
    • dateOfBirth string
    • deleted boolean
    • dummy boolean
    • email string
    • emailVerified boolean
    • forename string
    • groupRoles array
    • hideSecretWordNotification boolean
    • id integer
    • identifiers array
      • items object
    • lastLogin string
    • lastLoginIpAddress string
    • latestDataReceivedBy BaseGroup
    • latestDataReceivedDate string
    • locked boolean
    • picture string
    • roleDescription string
    • secretWordIsSet boolean
    • surname string
    • userFeatures array
    • username string

UserFeature

  • UserFeature object
    • created string
    • feature Feature
    • id integer
    • lastUpdate string
    • optInDate string
    • optInHidden boolean
    • optInStatus boolean
    • optOutHidden boolean

UserToken

  • UserToken object
    • auditActions array
      • items string
    • checkSecretWord boolean
    • created string
    • expiration string
    • externalStandards array
    • groupFeatures array
    • groupMessagingEnabled boolean
    • mustSetSecretWord boolean
    • patientFeatures array
    • patientMessagingFeatureTypes array
      • items string
    • patientRoles array
    • routes array
    • secretWord string
    • secretWordChoices object
    • secretWordIndexes array
      • items string
    • secretWordSalt string
    • secretWordToken string
    • securityRoles array
    • shouldEnterCondition boolean
    • staffFeatures array
    • staffRoles array
    • token string
    • user User
    • userFeatures array
    • userGroups array