Table of Contents |
---|
...
This is a GraphQL method that is used in Administration panel only.
Only authenticated and authorized NHS employee with appropriate scope can upload device definitions registry.
This WS uses the jabba service. Upon execution of the request, a job is created, on the basis of which tasks are created. Each task is one request to create entity from registry.
Device definition registry input data for should be in .csv format and with escaped symbols (i.e. quotes, new lines -
"
as\"
; new line replaced as\r\n
).Each Device definition in registry is validated the same as in https:/wiki/spaces/RMDN/pages/18339135535/e-health-ua.atlassian.net/wiki/pages/createpage.action?spaceKey=RMDN&title=%5BNEW%5D%20%28GraphQl%29%20Create%20Device%20definition WS.
Specification
Expand | |||||
---|---|---|---|---|---|
| |||||
|
...
View file | ||
---|---|---|
|
*Note. Fields device_names.name
, device_names.type
, properties.type
, properties.value_integer
, properties.value_string
, properties.value_boolean
, properties.value_decimal
can exist as an array. Values should be separated with |
(respectively).
...
Create job with type
upload_device_definition_registry
in jobs table in JABBA DB.For each line of input file create separate task of job in tasks table in JABBA DB with additional task metadata:
name = ‘Create device definition’
meta.csv_data_line = line from csv_file
For each created task:
Validate device definition records according to https://e-health-ua.atlassian.net/wiki/spaces/RMDNEH/pages/17670799630/NEW+GraphQl+Create+Device+definition#Validate17782014108#Validate-device-definition
in case of validation error - update task status to
FAILED
with corresponding error message, go to next task
Create new device definition in device_definitions and device_definition_names tables (PRM DB) according to field matching
Update task status to
PROCESSED
, go to next task
Render job identifier with result according to specification.
...