@datafire/patientview
v6.0.0
Published
DataFire integration for PatientView
Readme
@datafire/patientview
Client library for PatientView
Installation and Usage
npm install --save @datafire/patientviewlet 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
- input
object- body Credentials
Output
- output UserToken
logOut
Log Out
patientview.logOut({
"token": ""
}, context)Input
- input
object- token required
string: token
- token required
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
- token required
Output
- output User
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
- userId required
Output
- output
array- items Patient
getPatientManagementDiagnoses
getPatientManagementDiagnoses
patientview.getPatientManagementDiagnoses(null, context)Input
This action has no parameters
Output
- output
array- items Code
getPatientManagementLookupTypes
getPatientManagementLookupTypes
patientview.getPatientManagementLookupTypes(null, context)Input
This action has no parameters
Output
- output
array- items LookupType
validatePatientManagement
validatePatientManagement
patientview.validatePatientManagement({}, context)Input
- input
object- body PatientManagement
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
- userId required
Output
- output PatientManagement
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
- userId required
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
- userId required
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
- userId required
Output
- output
array- items ObservationHeading
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
- userId required
Output
- output FhirObservationPage
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
- userId required
Output
- output
array- items FhirObservation
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
- userId required
Output
- output
array- items FhirObservation
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
- userId required
Output
- output
array- items ObservationHeading
Definitions
ApiKey
- ApiKey
object- expired
boolean - expiryDate
string - key
string
- expired
BaseGroup
- 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
- Category
object- friendlyDescription
string - hidden
boolean - icd10Description
string - id
integer - number
integer
- friendlyDescription
Code
- 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
- CodeCategory
object- category Category
- id
integer
CodeExternalStandard
- CodeExternalStandard
object- codeString
string - externalStandard ExternalStandard
- id
integer
- codeString
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)
- description
Credentials
- Credentials
object- apiKey
string - password
string - username
string
- apiKey
Entry_long_Map_string_List_FhirObservation_
- Entry_long_Map_string_List_FhirObservation_
object- key
array
- key
Entry_string_List_FhirObservation_
- Entry_string_List_FhirObservation_
object- key
array- items FhirObservation
- key
ExternalStandard
- ExternalStandard
object- description
string - id
integer - name
string
- description
Feature
- Feature
object- created
string - description
string - id
integer - lastUpdate
string - name
string
- created
FhirAllergy
- FhirAllergy
object- confidenceLevel
string - group Group
- id
integer - identifier
string - infoSource
string - reaction
string - recordedDate
string - status
string - substance
string - type
string
- confidenceLevel
FhirCondition
- FhirCondition
object
FhirContact
- FhirContact
object- id
integer - system
string - use
string - value
string
- id
FhirEncounter
- 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
- FhirIdentifier
object- id
integer - label
string - value
string
- id
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
- applies
FhirObservationPage
- FhirObservationPage
object- data
array - totalElements
integer - totalPages
integer
- data
FhirPatient
- 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
- 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
- FhirProcedure
object- bodySite
string - id
integer - type
string
- bodySite
Group
- 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
- GroupFeature
object- created
string - feature Feature
- id
integer - lastUpdate
string
- created
GroupRole
Link
- Link
object- created
string - displayOrder
integer - id
integer - lastUpdate
string - link
string - linkType Lookup
- name
string
- created
Location
- Location
object- address
string - created
string - email
string - id
integer - label
string - lastUpdate
string - name
string - phone
string - web
string
- address
Lookup
- Lookup
object- created
string - description
string - descriptionFriendly
string - displayOrder
integer - id
integer - lastUpdate
string - lookupType LookupType
- value
string
- created
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)
- created
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- items ObservationHeadingGroup
- units
string
- code
ObservationHeadingGroup
- ObservationHeadingGroup
object- created
string - group Group
- id
integer - panel
integer - panelOrder
integer
- created
Patient
- 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
- PatientManagement
object- condition FhirCondition
- encounters
array- items FhirEncounter
- groupCode
string - identifier
string - observations
array- items FhirObservation
- patient FhirPatient
- practitioners
array- items FhirPractitioner
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
- description
Route
- Route
object- controller
string - created
string - displayOrder
integer - id
integer - lookup Lookup
- templateUrl
string - title
string - url
string
- controller
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- 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
- UserFeature
object- created
string - feature Feature
- id
integer - lastUpdate
string - optInDate
string - optInHidden
boolean - optInStatus
boolean - optOutHidden
boolean
- created
UserToken
- 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
