sibis-platform / ncanda-data-integration

This is the Data Integration, MRI, and Bioinformatics Component of the National Consortium on Alcohol and NeuroDevelopment in Adolescence (NCANDA), funded by the NIAAA.
https://www.nitrc.org/projects/ncanda-datacore
BSD 3-Clause "New" or "Revised" License
4 stars 10 forks source link

Add multiple decision schema #510

Closed annehaley closed 1 year ago

annehaley commented 1 year ago

There is one section where I am not sure of the desired behavior: in the function convert_json_to_check_new_sessions_df, if the input json has a key "decisions" with multiple decision objects, how should these be recorded to the output dataframe? Currently, I record the first entry only. How is this data structure used and can it hold multiple decisions?

kipohl commented 1 year ago

@annehaley the latest decision should be recorded in the data frame - however the scan notes should be a combination of all decision notes starting with the oldest one ending with the current one - does that make sense ?

annehaley commented 1 year ago

@kipohl Yes, I can do that. Is there any particular way you want to combine the strings?

kipohl commented 1 year ago

Acronym of person: note; acronym of person: note; ...

annehaley commented 1 year ago

I can't get the initials of the person reliably from the value of the creator field, but I can include the whole "creator" value instead.

kipohl commented 1 year ago

Give me an example of creator name? I removed the acronym is already in the scan notes in miqa but I might have misremembered

kipohl commented 1 year ago

Maybe just take the first three letters than or something like that

annehaley commented 1 year ago

the value of "creator" will be a string of the creator's MIQA username. I changed it so we record the first three letters.

kipohl commented 1 year ago

I just added a comment - see below image

kipohl commented 1 year ago

if it is a lot of work lets leave first three letters

annehaley commented 1 year ago

In order for a MIQA import to correctly interpret the creator of a decision as an existing MIQA user, the value for "creator" has to be the correct MIQA username. How is that first decision written in your import file?

The second decision, I assume, was made with the MIQA UI. It saves the decision creator properly. It can show the initials of the user because it has access to the full object of user information, unlike in the import file format.

kipohl commented 1 year ago

the first one was done by miqa 1 - if there is not a creator then you omit it simply yes the second decision was done by MIQA - so if you have the initials it that point it should be easy to include them in the json file as another tag under decisions - I might be wrong then again ignore

annehaley commented 1 year ago

We could turn the "creator" value into a whole object (in the JSON format only), so it would include username, first_name, and last_name (and any other info we want to export about the decision creator). But this might take a bit to update the import schema again.

kipohl commented 1 year ago

lets just stay with first three letters - when is it ready to be committed

annehaley commented 1 year ago

It's ready now if we are sticking with the first three letters.