Uploaded image for project: 'PhenoTips'
  1. PT-3130

Updating patient `nonstandard_features` via REST may clear other features as well

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 1.3-milestone-6
    • Fix Version/s: 1.5
    • Component/s: patient-data
    • Labels:
      None

      Description

      PUT

      {"nonstandard_features": []}

      also deletes all regular, standard features

      E.g. create a patient with some features, suppose it is patient `P0000001`. Then try

      curl -u Admin:admin -H "Content-Type: application/json" -X PUT -d '{"nonstandard_features": []}' http://localhost:4444/rest/patients/P0000001
      

      and all the features will be removed. Other items are not affected and setting other parameters works, e.g. if sex is set to "M" it will stay as "M", and a call like

      curl -u Admin:admin -H "Content-Type: application/json" -X PUT -d '{"nonstandard_features": [], , "sex":"F"}' http://localhost:4444/rest/patients/P0000001
      

      will correctly update the sex but also blank regular features

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                asm Andriy Misyura
                Reporter:
                asm Andriy Misyura
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: