Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  1. This is a GraphQL method that is used in Administration panel only.

  2. Only authenticated and authorized NHS employee with appropriate scope can upload device definitions registry.

  3. 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.

  4. 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 ).

  5. 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
titleindex.graphql
Code Block
languagegraphql
  "Creates a single `DeviceRegistryJob`."
  uploadDeviceRegistry(input: UploadDeviceRegistryInput!): UploadDeviceRegistryPayload

...

View file
nameupload_device_definition_registry_example1example2 (1).csv

*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).

...

  1. Create job with type upload_device_definition_registry in jobs table in JABBA DB.

  2. For each line of input file create separate task of job in tasks table in JABBA DB with additional task metadata:

    1. name = ‘Create device definition’

    2. meta.csv_data_line = line from csv_file

  3. For each created task:

    1. 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

      1. in case of validation error - update task status to FAILED with corresponding error message, go to next task

    2. Create new device definition in device_definitions and device_definition_names tables (PRM DB) according to field matching

    3. Update task status to PROCESSED, go to next task

  4. Render job identifier with result according to specification.

...