Client library for PatientView
npm install --save @datafire/patientview
let patientview = require('@datafire/patientview').create();
.then(data => {
console.log(data);
});
The recommended REST API endpoints to be used when integrating with PatientView
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
object
- body Credentials
- output UserToken
Log Out
patientview.logOut({
"token": ""
}, context)
- input
object
- token required
string
: token
- token required
Output schema unknown
Once logged in and have a token, get basic user information including group role membership
patientview.getBasicUserInformation({
"token": ""
}, context)
- input
object
- token required
string
: token
- token required
- output User
Given a User ID, get basic patient information for a user from clinical data stored in FHIR
patientview.getBasicPatientDetails({
"userId": 0
}, context)
- input
object
- userId required
integer
: userId
- userId required
- output
array
- items Patient
getPatientManagementDiagnoses
patientview.getPatientManagementDiagnoses(null, context)
This action has no parameters
- output
array
- items Code
getPatientManagementLookupTypes
patientview.getPatientManagementLookupTypes(null, context)
This action has no parameters
- output
array
- items LookupType
validatePatientManagement
patientview.validatePatientManagement({}, context)
- input
object
- body PatientManagement
Output schema unknown
getPatientManagement
patientview.getPatientManagement({
"userId": 0,
"groupId": 0,
"identifierId": 0
}, context)
- input
object
- userId required
integer
: userId - groupId required
integer
: groupId - identifierId required
integer
: identifierId
- userId required
- output PatientManagement
savePatientManagement
patientview.savePatientManagement({
"userId": 0,
"groupId": 0,
"identifierId": 0
}, context)
- input
object
- userId required
integer
: userId - groupId required
integer
: groupId - identifierId required
integer
: identifierId - body PatientManagement
- userId required
Output schema unknown
savePatientManagementSurgeries
patientview.savePatientManagementSurgeries({
"userId": 0,
"groupId": 0,
"identifierId": 0
}, context)
- input
object
- userId required
integer
: userId - groupId required
integer
: groupId - identifierId required
integer
: identifierId - body PatientManagement
- userId required
Output schema unknown
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
object
- userId required
integer
: userId
- userId required
- output
array
- items ObservationHeading
Given a User ID and search parameters, retrieve a page of observations.
patientview.getObservationsByCodes({
"userId": 0,
"code": [],
"limit": 0,
"offset": 0,
"orderDirection": ""
}, context)
- input
object
- userId required
integer
: userId - code required
array
: code - limit required
integer
: limit - offset required
integer
: offset - orderDirection required
string
: orderDirection
- userId required
- output FhirObservationPage
Given a User ID and observation code, retrieve all observations.
patientview.getObservationsByCode({
"userId": 0,
"code": ""
}, context)
- input
object
- userId required
integer
: userId - code required
string
: code
- userId required
- output
array
- items FhirObservation
Given a User ID and observation code, retrieve patient entered observations.
patientview.getPatientEnteredObservationsByCode({
"userId": 0,
"code": ""
}, context)
- input
object
- userId required
integer
: userId - code required
string
: code
- userId required
- output
array
- items FhirObservation
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
object
- userId required
integer
: userId
- userId required
- output
array
- items ObservationHeading
- ApiKey
object
- expired
boolean
- expiryDate
string
- key
string
- expired
- BaseGroup
object
- code
string
- groupType Lookup
- id
integer
- lastImportDate
string
- name
string
- parentCodes
array
- items
string
- items
- shortName
string
- visible
boolean
- visibleToJoin
boolean
- code
- Category
object
- friendlyDescription
string
- hidden
boolean
- icd10Description
string
- id
integer
- number
integer
- friendlyDescription
- Code
object
- code
string
- codeCategories
array
- items CodeCategory
- codeType Lookup
- created
string
- description
string
- displayOrder
integer
- externalStandards
array
- items CodeExternalStandard
- fullDescription
string
- hideFromPatients
boolean
- id
integer
- lastUpdate
string
- links
array
- items Link
- patientFriendlyName
string
- removedExternally
boolean
- sourceType
string
(values: PATIENTVIEW, NHS_CHOICES) - standardType Lookup
- code
- CodeCategory
object
- category Category
- id
integer
- CodeExternalStandard
object
- codeString
string
- externalStandard ExternalStandard
- id
integer
- codeString
- ContactPoint
object
- contactPointType ContactPointType
- content
string
- created
string
- id
integer
- lastUpdate
string
- 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)
- description
- Credentials
object
- apiKey
string
- password
string
- username
string
- apiKey
- Entry_long_Map_string_List_FhirObservation_
object
- key
array
- key
- Entry_string_List_FhirObservation_
object
- key
array
- items FhirObservation
- key
- ExternalStandard
object
- description
string
- id
integer
- name
string
- description
- Feature
object
- created
string
- description
string
- id
integer
- lastUpdate
string
- name
string
- created
- FhirAllergy
object
- confidenceLevel
string
- group Group
- id
integer
- identifier
string
- infoSource
string
- reaction
string
- recordedDate
string
- status
string
- substance
string
- type
string
- confidenceLevel
- FhirCondition
object
- FhirContact
object
- id
integer
- system
string
- use
string
- value
string
- id
- FhirEncounter
object
- date
string
- encounterType
string
- group Group
- id
integer
- identifier
string
- links
array
- items Link
- observations
array
- items FhirObservation
- procedures
array
- items FhirProcedure
- status
string
- date
- FhirIdentifier
object
- id
integer
- label
string
- value
string
- id
- 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
- applies
- FhirObservationPage
object
- data
array
- totalElements
integer
- totalPages
integer
- data
- FhirPatient
object
- address1
string
- address2
string
- address3
string
- address4
string
- contacts
array
- items FhirContact
- dateOfBirth
string
- dateOfBirthNoTime
string
- forename
string
- gender
string
- group Group
- groupCode
string
- identifier
string
- identifiers
array
- items FhirIdentifier
- postcode
string
- practitioners
array
- items FhirPractitioner
- surname
string
- address1
- FhirPractitioner
object
- address1
string
- address2
string
- address3
string
- address4
string
- allowInviteGp
boolean
- contacts
array
- items FhirContact
- gender
string
- groupCode
string
- identifier
string
- inviteDate
string
- name
string
- postcode
string
- role
string
- address1
- FhirProcedure
object
- bodySite
string
- id
integer
- type
string
- bodySite
- Group
object
- address1
string
- address2
string
- address3
string
- childGroups
array
- items Group
- code
string
- contactPoints
array
- items ContactPoint
- created
string
- fhirResourceId
string
- groupFeatures
array
- items GroupFeature
- groupType Lookup
- id
integer
- lastImportDate
string
- lastUpdate
string
- links
array
- items Link
- locations
array
- items Location
- name
string
- parentGroups
array
- items Group
- postcode
string
- sftpUser
string
- shortName
string
- visible
boolean
- visibleToJoin
boolean
- address1
- GroupFeature
object
- created
string
- feature Feature
- id
integer
- lastUpdate
string
- created
- Link
object
- created
string
- displayOrder
integer
- id
integer
- lastUpdate
string
- link
string
- linkType Lookup
- name
string
- created
- Location
object
- address
string
- created
string
- email
string
- id
integer
- label
string
- lastUpdate
string
- name
string
- phone
string
- web
string
- address
- Lookup
object
- created
string
- description
string
- descriptionFriendly
string
- displayOrder
integer
- id
integer
- lastUpdate
string
- lookupType LookupType
- value
string
- created
- 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)
- created
- 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
- items ObservationHeadingGroup
- units
string
- code
- ObservationHeadingGroup
object
- created
string
- group Group
- id
integer
- panel
integer
- panelOrder
integer
- created
- Patient
object
- diagnosisCodes
array
- items Code
- fhirAllergies
array
- items FhirAllergy
- fhirConditions
array
- items FhirCondition
- fhirEncounters
array
- items FhirEncounter
- fhirObservations
array
- items FhirObservation
- fhirPatient FhirPatient
- fhirPractitioners
array
- items FhirPractitioner
- group Group
- id
integer
- diagnosisCodes
- PatientManagement
object
- condition FhirCondition
- encounters
array
- items FhirEncounter
- groupCode
string
- identifier
string
- observations
array
- items FhirObservation
- patient FhirPatient
- practitioners
array
- items FhirPractitioner
- 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
- description
- Route
object
- controller
string
- created
string
- displayOrder
integer
- id
integer
- lookup Lookup
- templateUrl
string
- title
string
- url
string
- controller
- 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
- items GroupRole
- hideSecretWordNotification
boolean
- id
integer
- identifiers
array
- items
object
- items
- lastLogin
string
- lastLoginIpAddress
string
- latestDataReceivedBy BaseGroup
- latestDataReceivedDate
string
- locked
boolean
- picture
string
- roleDescription
string
- secretWordIsSet
boolean
- surname
string
- userFeatures
array
- items UserFeature
- username
string
- UserFeature
object
- created
string
- feature Feature
- id
integer
- lastUpdate
string
- optInDate
string
- optInHidden
boolean
- optInStatus
boolean
- optOutHidden
boolean
- created
- UserToken
object
- auditActions
array
- items
string
- items
- checkSecretWord
boolean
- created
string
- expiration
string
- externalStandards
array
- items ExternalStandard
- groupFeatures
array
- items Feature
- groupMessagingEnabled
boolean
- mustSetSecretWord
boolean
- patientFeatures
array
- items Feature
- patientMessagingFeatureTypes
array
- items
string
- items
- patientRoles
array
- items Role
- routes
array
- items Route
- secretWord
string
- secretWordChoices
object
- secretWordIndexes
array
- items
string
- items
- secretWordSalt
string
- secretWordToken
string
- securityRoles
array
- items Role
- shouldEnterCondition
boolean
- staffFeatures
array
- items Feature
- staffRoles
array
- items Role
- token
string
- user User
- userFeatures
array
- items Feature
- userGroups
array
- items BaseGroup
- auditActions