clowder-framework / CONSORT-frontend

custom react frontend working with consort clowder instance
0 stars 0 forks source link

Update items checklist to remove duplicates #43

Closed minump closed 11 months ago

minump commented 1 year ago

The PreviewLeftDrawer items checklist should not contain duplicates. Update the item checklist to match the metadata json from model version 0.7.

The metadata json checklist content would be

checklist = [ {"section": section_name1, "items": [{"topic": topic_name1, "item":item_name1, "found": "No/Yes"}, {"topic": topic_name2, "item":item_name2, "found": "No/Yes"}] }, {"section": section_name2, "items":[]},]
minump commented 1 year ago

Updated metadata.json :

checklist = [ {"section": section_name1, "items_missed": str(items_missed_in_section1), "items": [{"topic": topic_name1, "item":item_name1, "found": "No/Yes"}, {"topic": topic_name2, "item":item_name2, "found": "No/Yes"}] }, {"section": section_name2, "items_missed": str(items_missed_in_section2), "items":[]},]

content = {"extractor": extractor_name, "items_missed": str(items_missed), "checklist": checklist}
metadata = {"@context": [context], "created_at": created_at, "agent": agent, "content": [content]}

Include number of missing items per section as well.