ideafast / middleware-services

Python API containing endpoints for smartphone hub applications and transfer to data portal
0 stars 0 forks source link

Validate Device ID in DRM pipeline #50

Closed jawrainey closed 3 years ago

jawrainey commented 3 years ago

Minor oversight in #46, namely that the Patient ID was validated but not the Device ID. I noticed this when reviewing error logs for Rotterdam and also a seperate bug in dmpy. A modified version of the db record is below to show how it impacted dmp_folder and thus why an error was returned from DMP. Notably, the spaces in device_id:

{
    "device_type" : "DRM",
    "device_id" : "DRM - ABCD",
    "patient_id" : "E-ABCD",
    "dmp_folder" : "ABCD-DRM  ABCD-20210311-20210323",
}