AllenNeuralDynamics / aind-metadata-service

Service to retrieve Labtracks/Sharepoint info using a REST API
MIT License
3 stars 1 forks source link

Remove Procedures with no info #109

Closed mekhlakapoor closed 1 year ago

mekhlakapoor commented 1 year ago

Describe the bug For certain subject_ids, the service will map empty procedure models with no info. This can be confusing/unimportant to users, so remove mapping for these.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://aind-metadata-service/procedures/434379
  2. See empty procedure in subject_procedures {"message":"Valid Model.","data":{"describedBy":"https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/procedures.py","schema_version":"0.7.0","subject_id":"434379","subject_procedures":[{"start_date":null,"end_date":null,"experimenter_full_name":"NSB-187","iacuc_protocol":null,"animal_weight_prior":null,"animal_weight_post":null,"weight_unit":"gram","anaesthesia":null,"notes":null}],"specimen_procedures":[],"notes":null}}

Expected behavior If there is a hit on sharepoint for a subject_id, but it is missing both procedure_type and start_date --> do not create a general procedures model.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.