Purpose
This WS is designed to allow employee with appropriate scopes to get device definition details using its identifier.
Key points
This is a GraphQL query method used in Administration panel only.
Only authenticated and authorized employee with appropriate scope can search for device definitions.
Specification
Expand |
---|
|
Code Block |
---|
| "Reads a single `DeviceDefinition` using its globally unique ID."
deviceDefinition(id: ID!): DeviceDefinition |
|
Expand |
---|
title | deviceDefinitions.graphql |
---|
|
Code Block |
---|
| """
A component part of medication. User must have a scope **device_definition:read**
"""
type DeviceDefinition implements Node {
"The ID of an object."
id: ID!
"Primary key identifier from the database."
databaseId: UUID!
"Device identifier in external system."
externalId: String
"Device names."
deviceNames: [DeviceName]!
"A classification or risk class of the device model. The value should be present in the `device_classification_type` dictionary."
classificationType: String!
"Description of the device."
description: String
"Name of device manufacturer"
manufacturerName: String!
"Country of manufacture. The value should be present in the `COUNTRY` dictionary."
manufacturerCountry: String!
"The catalog or model number for the device for example as defined by the manufacturer."
modelNumber: String!
"The part number or catalog number of the device."
partNumber: String
"A code that defines the specific type of packaging. The value should be present in the `device_definition_packaging_type` dictionary."
packagingType: String!
"The number of items contained in the package."
packagingCount: Int!
"Unit of measurement. The value should be present in the `DEVICE_UNIT` dictionary."
packagingUnit: String!
"Device notes and comments."
note: String
"Array of device properties."
properties: [DeviceDefinitionProperty]
"Reference to parent device definition."
parentId: UUID
"is_active status."
isActive: Boolean!
"Date and time when record was inserted"
insertedAt: DateTime!
"Date and time when record was updated"
updatedAt: DateTime!
}
"""
A component part of DeviceDefinition.
"""
type DeviceName implements DeviceDefinition {
"Device name type. The value should be present in the `device_name_type` dictionary."
type: String!
"Device name."
name: String!
}
"""
A component part of DeviceDefinition.
"""
type DeviceDefinitionProperty implements DeviceDefinition {
"Device property type. The value should be present in the `device_properties` dictionary."
type: String!
"Device property value in integer format."
valueInteger: Int
"Device property value in string format."
valueString: String
"Device property value in boolean format."
valueBoolean: Boolean
"Device property value in decimal format."
valueDecimal: Float
} |
|
Authorize
Verify the validity of access token
Verify that token is not expired
Check user scopes in order to perform this action (scope = 'device_definition:read')
Validate legal entity
Extract client_id from token.
Check legal entity status (status = ACTIVE)
Check client type (type = NHS)
Service logic
Get device definition by id from device_definitions and device_definition_names tables in PRM database.
Render a response according to specification.