From 9e160aa0a4d13d7133b50cff0640d8eefd1aae3e Mon Sep 17 00:00:00 2001 From: Tom Gebhardt Date: Tue, 9 Jan 2024 20:42:35 +0100 Subject: [PATCH] first implementation of all indicators for the CSH --- app/celery/automated_tasks/__init__.py | 10 +- app/celery/automated_tasks/csh_fair.py | 118 ++++++- app/celery/automated_tasks/csh_helpers.py | 3 +- app/main.py | 13 +- app/metrics/metrics.csv | 17 +- tests/local_request.py | 379 +++++----------------- 6 files changed, 220 insertions(+), 320 deletions(-) diff --git a/app/celery/automated_tasks/__init__.py b/app/celery/automated_tasks/__init__.py index 82a066c..95e8205 100644 --- a/app/celery/automated_tasks/__init__.py +++ b/app/celery/automated_tasks/__init__.py @@ -1,6 +1,6 @@ from .f1_model_persistent_identifier_task import f1_model_persistent_identifier from .f4_model_metadata_harvestable_task import f4_model_metadata_harvestable -from .csh_fair import csh_f1_2_globally_unique_identifier, csh_a1_contains_access_information +from .csh_fair import csh_f1_2_globally_unique_identifier, csh_a1_contains_access_information, csh_i3_01_ref_other_metadata, csh_i3_02_ref_other_data, csh_i3_03_qual_ref_other_metadata, csh_i3_04_qual_ref_other_data, csh_r1_1_01_has_reuse_license, csh_r1_1_02_has_standard_reuse_license @@ -8,5 +8,11 @@ f1_model_persistent_identifier, f4_model_metadata_harvestable, csh_f1_2_globally_unique_identifier, - csh_a1_contains_access_information + csh_a1_contains_access_information, + csh_i3_01_ref_other_metadata, + csh_i3_02_ref_other_data, + csh_i3_03_qual_ref_other_metadata, + csh_i3_04_qual_ref_other_data, + csh_r1_1_01_has_reuse_license, + csh_r1_1_02_has_standard_reuse_license ] diff --git a/app/celery/automated_tasks/csh_fair.py b/app/celery/automated_tasks/csh_fair.py index 5301da9..f349bd6 100644 --- a/app/celery/automated_tasks/csh_fair.py +++ b/app/celery/automated_tasks/csh_fair.py @@ -11,10 +11,15 @@ config = get_settings() -def is_doi(identifier): +def is_doi(identifier: str): doi_pattern = r'^10\.\d{4,9}/[-._;()/:A-Z0-9]+$' # Use the re.match function to check if the string matches the pattern - return bool(re.match(doi_pattern, identifier)) + print("identifier: ", identifier) + match = re.match(doi_pattern, identifier) + print("?? match") + print("doi match: ", match) + return False + #return bool(re.match(doi_pattern, identifier)) @@ -49,13 +54,9 @@ def incoperate_results(task_dict: dict, result: 'app.models.TaskStatus', test: b # Works, but does not trigger updating of children # redis_app.json().set(f"session:{session_id}", f".tasks.{task_id}.status", obj=result) - - @app.task -def csh_f1_2_globally_unique_identifier( - task_dict: dict, data: dict, test: bool = False -): - print("f1_2_glob") +def csh_f1_2_globally_unique_identifier(task_dict: dict, data: dict, test: bool = False): + print(" ") """ Representation of celery task to evaluate an assessment. These celery tasks should be in the format: @@ -80,15 +81,18 @@ def assessment_task(task_dict: dict, data: dict) -> None: identifier = check_route(data, ["resource", "resource_identifier"]) - + print("grabbed identifier: ", identifier) #could also retrive "type" from data instead of using .startswith - - if(is_doi(identifier)): + if(identifier is False): + result = "failed" + elif(is_doi(identifier)): result = "success" elif(identifier.startswith("DRKS")): result = "success" else: result = "failed" + + print("!!!!!!!!!!!!! ---- ", result) incoperate_results(task_dict, result, test) @@ -153,4 +157,94 @@ def csh_a1_contains_access_information(task_dict: dict, data: dict, test: bool = else: result = "failed" - incoperate_results(task_dict, result, test) \ No newline at end of file + incoperate_results(task_dict, result, test) + print("working?") + +@app.task +def csh_i3_01_ref_other_metadata(task_dict: dict, data: dict, test: bool = False): + #check if other metadata is referenced + ref_resources = check_route(data, ["resource", "ids"]) + print("INFO - csh-i3-01") + result = "not_applicable" + if(ref_resources != False): + print("IDs: ", ref_resources, type(ref_resources)) + for res in ref_resources: + print(res, type(res)) + print(res.get('typeGeneral')) + if(res.get('typeGeneral') != 'Dataset'): + result = "success" + incoperate_results(task_dict, result, test) + +@app.task +def csh_i3_02_ref_other_data(task_dict: dict, data: dict, test: bool = False): + #check if other data is referenced + ref_resources = check_route(data, ["resource", "ids"]) + print("INFO - csh-i3-02") + result = "not_applicable" + if(ref_resources != False): + for res in ref_resources: + print(res) + print(res.get('typeGeneral')) + if(res.get('typeGeneral') == 'Dataset'): + result = "success" + incoperate_results(task_dict, result, test) + +@app.task +def csh_i3_03_qual_ref_other_metadata(task_dict: dict, data: dict, test: bool = False): + #check if other metadata is referenced + ref_resources = check_route(data, ["resource", "ids"]) + print("INFO - csh-i3-03") + result = "not_applicable" + if(ref_resources != False): + for res in ref_resources: + if(res.get('typeGeneral') != 'Dataset'): + #set to fail if ONE refed metadata has no relationType + if(result == "not_applicable"): + result = "success" + if(res.get('relationType') == None): + result = "failed" + incoperate_results(task_dict, result, test) + +@app.task +def csh_i3_04_qual_ref_other_data(task_dict: dict, data: dict, test: bool = False): + #check if other data is referenced + ref_resources = check_route(data, ["resource", "ids"]) + print("INFO - csh-i3-04") + result = "not_applicable" + if(ref_resources != False): + for res in ref_resources: + if(res.get('typeGeneral') == 'Dataset'): + #set to fail if ONE refed metadata has no relationType + if(result == "not_applicable"): + result = "success" + if(res.get('relationType') == None): + result = "failed" + incoperate_results(task_dict, result, test) + +##### Reusability +@app.task +def csh_r1_1_01_has_reuse_license(task_dict: dict, data: dict, test: bool = False): + resource_type = check_route(data, ["resource", "classification", "type"]) + if(resource_type == False): resource_type = check_route(data, ["resource", "resource_classification", "resource_type"]) + if(resource_type in ["Study", "Substudy/Data collection event"]): + result = "warning" #TODO: Ask others to specify how this can be checked + else: + license_info = check_route(data, ["resource", "nonStudyDetails", "useRights"]) + if(license_info != False): + result = "success" + else: + result = "failed" + incoperate_results(task_dict, result, test) + +@app.task #TODO: verify if this automated task really works since it depends on a parent task +def csh_r1_1_02_has_standard_reuse_license(task_dict: dict, data: dict, test: bool = False): + #check if userights label is a fitting license + license_label = check_route(data,["resource", "nonStudyDetails", "nonStudyDetails", "useRights"]) + if(license_label in ["Creative Commons Zero v1.0 Universal", "Creative Commons Attribution 4.0 International", "Creative Commons Attribution Non Commercial 4.0 International", "Creative Commons Attribution Share Alike 4.0 International", "Creative Commons Attribution Non Commercial Share Alike 4.0 International"]): + result = "success" + elif(license_label == "Other"): + result = "warning" + else: + result = "failed" + incoperate_results(task_dict, result, test) + diff --git a/app/celery/automated_tasks/csh_helpers.py b/app/celery/automated_tasks/csh_helpers.py index d6478ef..958f382 100644 --- a/app/celery/automated_tasks/csh_helpers.py +++ b/app/celery/automated_tasks/csh_helpers.py @@ -2,12 +2,11 @@ def check_route(metadata, route_keys): current_position = json.loads(metadata) - for key in route_keys: if key in current_position: - current_position = current_position[key] else: + print("the key {} form the route{} is not in the dict".format(key, route_keys), ) #if a key is missing return false return False #if the route exists return the value diff --git a/app/main.py b/app/main.py index 4d69ad8..14ffa12 100644 --- a/app/main.py +++ b/app/main.py @@ -10,7 +10,7 @@ tags_metadata = [ { "name": "Indicators", - "description": "FAIR Combine assessments. Endpoints to retrieve the descriptions of the assessments done by " + "description": "FAIR assessments. Endpoints to retrieve the descriptions of the assessments done by " "the application " "to evaluate how FAIR a resource is/", }, @@ -29,22 +29,23 @@ ] description = """ -FAIR Combine is a web application designed to help users assess how FAIR their -their Combine resources are. +FAIR Eval is a web application designed to help users assess how FAIR their +their scientific resources are. Currently supported are FAIR Combine and CSH resources. Users may submit their Combine model, and the application will create a list of assessments following the FAIR principle. Some of these assessments will run in the background while others will need to be filled by the users. +Users may also make API requests to evalutate the metadata of a CSH resource. Once all assessments are completed, the application returns a set of scores -describing how FAIR their model is. +describing how FAIR their resource is. """ app = FastAPI( - title="FAIR Combine API", + title="FAIR Eval API", description=description, - version="0.0.1", + version="0.1.0", openapi_tags=tags_metadata, lifespan=get_tasks_definitions, ) diff --git a/app/metrics/metrics.csv b/app/metrics/metrics.csv index 72c1268..3849a16 100644 --- a/app/metrics/metrics.csv +++ b/app/metrics/metrics.csv @@ -93,4 +93,19 @@ "CSH-RDA-A1-03M","Essential","Metadata identifier resolves to a metadata record","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" "CSH-RDA-A1-04M","Essential","Metadata is accessed through standardised protocol","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" "CSH-RDA-A1.1-01M","Essential","Metadata is accessible through a free access protocol","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" -"CSH-RDA-A2-01M","Essential","Metadata is guaranteed to remain available after data is no longer available","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" \ No newline at end of file +"CSH-RDA-A2-01M","Essential","Metadata is guaranteed to remain available after data is no longer available","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I1-01M","Important","Metadata uses knowledge representation expressed in standardised format","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I1-02M","Important","Metadata uses machine-understandable knowledge representation","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I2-01M","Important","Metadata uses FAIR-compliant vocabularies","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I3-01M","Important","Metadata includes references to other metadata","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I3-02M","Useful","Metadata includes references to other data","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I3-03M","Important","Metadata includes qualified references to other metadata","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-I3-04M","Useful","Metadata includes qualified references to other data","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1-01M","Essential","Plurality of accurate and relevant attributes are provided to allow reuse","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.1-01M","Essential","Metadata includes information about the licence under which the data can be reused","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.1-02M","Important","Metadata refers to a standard reuse licence","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.1-03M","Important","Metadata refers to a machine-understandable reuse licence","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.2-01M","Important","Metadata includes provenance information according to community-specific standards","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.2-02M","Useful","Metadata includes provenance information according to a cross-community language","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.3-01M","Essential","Metadata complies with a community standard","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" +"CSH-RDA-R1.3-02M","Essential","Metadata is expressed in compliance with a machine-understandable community standard","---Add a description about the indicator (probably adapt from RDA schema)---","Add an explanation on how this indicator is technically evaluated" \ No newline at end of file diff --git a/tests/local_request.py b/tests/local_request.py index 7b09258..5601398 100644 --- a/tests/local_request.py +++ b/tests/local_request.py @@ -9,329 +9,113 @@ # metadata that will be used for development metadata = { - "link": None, + "link": { + "external": True, + "url": "https://doi.org/10.1371/journal.pone.0246819.s001" + }, "resource": { + "chronicDiseases": False, + "classification": { + "type": "Dataset" + }, "collection": [ "COVID-19", "coverCHILD study platform" ], - "ids": [ + "contributors": [ { - "identifier": "https://www.thieme-connect.com/products/ejournals/abstract/10.1055/a-1638-6053", - "relation_type": "A is described by B", - "resource_type_general": "Other", - "type": "Other" + "affiliations": [ + { + "address": "Charitéplatz 1, 10117 Berlin", + "identifiers": [ + { + "identifier": "001w7jn25", + "scheme": "ROR" + } + ], + "name": "Department of Audiology and Phoniatrics, Charité – Universitätsmedizin Berlin", + "webpage": "https://www.charite.de/en/" + } + ], + "nameType": "Organisational", + "organisational": { + "name": "Department of Audiology and Phoniatrics, Charité – Universitätsmedizin Berlin", + "type": "Contact" + } } ], - "ids_alternative": [ + "descriptions": [ { - "identifier": "DRKS00027974", - "type": "DRKS" + "language": "EN (English)", + "text": "R-readable data frame. In addition to data for ID, condition, cumulative PM, and SPL, the emission rates for the six size classes (C1-C6), corresponding to >0.3–0.5, >0.5–1.0, >1.0–3.0, >3.0–5.0, >5.0–10.0, and >10.0–25 μm), are given." } ], - "provenance": { - "data_source": "Automatically uploaded: DRKS" - }, - "resource_acronyms": [ + "identifier": "314", + "ids": [ { - "language": "EN (English)", - "text": "KICK-COVID" + "identifier": "10.1371/journal.pone.0246819", + "relationType": "A is described by B", + "scheme": "DOI", + "typeGeneral": "Journal article" } ], - "resource_classification": { - "resource_type": "Study", - "resource_type_general": "Other" - }, - "resource_description_english": { - "language": "EN (English)", - "text": "In a prospective study, the long-term effects of the COVID-19 pandemic on medical and psychosocial characteristics in children and adolescents with chronic conditions will be investigated using a holistic approach. The included diseases are obesity, diabetes, and rheumatic diseases; both the affected individuals themselves and their parents will be interviewed.\nInterdisciplinary collaboration between pediatricians of various specialties, psychologists, and epidemiologists will allow a comprehensive evaluation of the effects of COVID-19 on health care and the physical and mental health of children and adolescents with chronic conditions and their families, as well as the complex interplay between health status and health care as well as environmental and personal contextual factors.\nFor this, questions for the children and adolescents and their parents will be implemented as part of the standard survey in the Diabetes-Patienten-Verlaufsdokumentation (DPV), the Adipositas-Patienten-Verlaufsdokumentation (APV) and the Kerndokumentation rheumakranker Kinder und Jugendlicher (KRhOKo). In addition, all participants are invited to participate in a further online survey on the psychosocial situation and available resources. After one year, a follow-up takes place for both surveys. The prospective design allows both the detection of short- and long-term effects of the COVID-19 pandemic on well-being and the analysis of mediator and moderator effects. The aim is to find approaches to help those families with children and adolescents affected by a chronic condition." - }, - "resource_identifier": "DRKS00027974", - "resource_keywords": [ - { - "resource_keywords_label": "family" - }, - { - "resource_keywords_label": "Coronavirus Disease 2019 (COVID-19)" - }, - { - "resource_keywords_label": "mental health" - }, - { - "resource_keywords_label": "longitudinal study" - }, - { - "resource_keywords_label": "obesity" - }, - { - "resource_keywords_label": "rheumatic diseases" - }, + "idsNfdi4health": [ { - "resource_keywords_label": "health care" + "identifier": "29a2d0954bec454b8a00756477ea6d3a", + "relationType": "A is supplement to B" }, { - "resource_keywords_label": "medical care" - }, - { - "resource_keywords_label": "disease management" - }, - { - "resource_keywords_label": "children and adolescents" - }, - { - "resource_keywords_label": "chronic conditions" - }, - { - "resource_keywords_label": "well-being" - }, - { - "resource_keywords_label": "diabetes" - }, - { - "resource_keywords_label": "psychosocial strain" + "identifier": "559bbd5254324038af85de49903a0b37", + "relationType": "A is continued by B" } ], - "resource_titles": [ + "keywords": [ { - "language": "EN (English)", - "text": "A prospective analysis of the long-term impact of the COVID-19 pandemic on well-being and health care among children with a high-risk chronic condition and their families" - } - ], - "resource_web_page": "https://www.kick-covid.de", - "roles": [ - { - "role_affiliations": [ - { - "role_affiliation_address": "Kennedyallee 40, 53175 Bonn, Germany", - "role_affiliation_name": "Deutsche Forschungsgemeinschaft", - "role_affiliation_web_page": "https://www.dfg.de" - } - ], - "role_name_organisational_group": { - "role_name_organisational_group_name": "Deutsche Forschungsgemeinschaft", - "role_name_organisational_group_type": "Funder (public)" - }, - "role_name_type": "Organisational" - }, - { - "role_affiliations": [ - { - "role_affiliation_address": "Karl-Liebknecht-Str. 24/25, 14476 Potsdam OT Golm, Germany", - "role_affiliation_name": "Lehrstuhl für Beratungspsychologie\nDepartment Psychologie\nUniversität Potsdam" - } - ], - "role_email": "warschb@uni-potsdam.de", - "role_name_personal": { - "role_name_personal_family_name": "Warschburger", - "role_name_personal_given_name": "Petra", - "role_name_personal_title": "Prof. Dr.", - "role_name_personal_type": "Sponsor (primary)" - }, - "role_name_type": "Personal", - "role_phone": "0331/ 977-2988" + "code": "http://purl.bioontology.org/ontology/MESH/D000086382", + "label": "COVID-19 | MESH > D000086382" }, { - "role_affiliations": [ - { - "role_affiliation_address": "Karl-Liebknecht-Str. 24/25, 14476 Potsdam OT Golm, Germany", - "role_affiliation_name": "Lehrstuhl für Beratungspsychologie\nDepartment Psychologie\nUniversität Potsdam", - "role_affiliation_web_page": "http://www.psych.uni-potsdam.de/counseling/index-d.html" - } - ], - "role_email": "warschb@uni-potsdam.de", - "role_name_personal": { - "role_name_personal_family_name": "Warschburger", - "role_name_personal_given_name": "Petra", - "role_name_personal_title": "Prof. Dr.", - "role_name_personal_type": "Contact" - }, - "role_name_type": "Personal", - "role_phone": "0331/ 977-2988" + "code": "http://purl.bioontology.org/ontology/MESH/D000293", + "label": "Adolescent | MESH > D000293" }, { - "role_affiliations": [ - { - "role_affiliation_address": "Karl-Liebknecht-Str. 24-25, 14476 Potsdamm, Germany", - "role_affiliation_name": "Lehrstuhl für BeratungspsychologieDepartment PsychologieUniversität Potsdam" - } - ], - "role_email": "goeldel@uni-potsdam.de", - "role_name_personal": { - "role_name_personal_family_name": "Göldel", - "role_name_personal_given_name": "Julia", - "role_name_personal_title": "Ms.", - "role_name_personal_type": "Contact" - }, - "role_name_type": "Personal", - "role_phone": "0049 331 977 5387" + "code": "http://snomed.info/id/81059003", + "label": "Emission (finding) | SNOMED > 81059003" } ], - "study_design": { - "study_arms_groups": [ - { - "study_arm_group_description": "Children and adolescents with chronic conditions as well as their parents/ guardians are taking part in a questionnaire-based survey at two measurement points one year apart.\nThe first step of the survey takes place as part of the routine health check-ups in specialist care. Interruptions in consultations (self-construction), the therapeutic intensity (self-construction) and the child's mental health (PHQ-9, GAD-7) are recorded. In addition, the child's media consumption (Lampert, Sygusch & Schlack, 2007), the effects of the corona pandemic on family and everyday life (self-construction), the experience of stress (self-construction), risk perception (self-construction) and well-being (WHO-5 Well-being Index). For children under the age of 12, parents/guardians are asked to provide their child's assessment.\nThe children and adolescents from the age of 9 and the parent/guardian are then invited to a further online study.\nThe questionnaire for parents includes the following constructs: corona-specific burden (according to Calvano et al. 2021, modified), well-being (WHO-5; SAM; De Jong-Gierveld loneliness scale) together with the quality of life (SF-8; SF-36 fatigue scale; CHQ; FLQ), psychosocial adjustment (PHQ-4; ADNM8; PSS-4), also referred to ones role as parent (CGSQ-SF11; BPBS), resources (ASKU; IE-4; RS-11; OSLO), parental coping with the child's illness (CHIP-D), parenting behavior (APQ-9; according to Clemens et al.), child’s problem behavior (SDQ), its resources (self-construction) and its corona-specific coping (according to COSMO). In addition, social desirability (SEA-K), socioeconomic status (MacArthur scale; Winkler index) and some demographic information are recorded.\nThe questionnaire for children and adolescents includes the corona-specific burden (based on Calvano et al., 2021), well-being (SAM; KIDCSREEN-27; De-Jong-Gierveld Loneliness Scale), the parent-child relationship (EBF-KJ), resources (FRKJ-8-16; Benefit-finding-Scale), coping (CODI), problem behavior (SDQ) and social integration.", - "study_arm_group_label": "Arm 1" - } - ], - "study_centers": "Multicentric", - "study_centers_number": 1, - "study_conditions": [ - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Type 1 diabetes mellitus" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Type 2 diabetes mellitus" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Malnutrition-related diabetes mellitus" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Other specified diabetes mellitus" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Unspecified diabetes mellitus" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Obesity" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Direct infections of joint in infectious and parasitic diseases classified elsewhere" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Postinfective and reactive arthropathies in diseases classified elsewhere" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Juvenile arthritis" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Juvenile arthritis in diseases classified elsewhere" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Other specific arthropathies" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Polyarteritis nodosa and related conditions" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Other necrotizing vasculopathies" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Systemic lupus erythematosus" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Dermatopolymyositis" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Systemic sclerosis" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Other systemic involvement of connective tissue" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Enthesopathies of lower limb, excluding foot" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Other soft tissue disorders, not elsewhere classified" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Osteomyelitis" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Other localized connective tissue disorders" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Purpura and other haemorrhagic conditions" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Sarcoidosis" - }, - { - "study_conditions_classification": "ICD-10", - "study_conditions_label": "Amyloidosis" - } - ], - "study_countries": [ - "Germany" - ], - "study_data_sharing_plan": { - "study_data_sharing_plan_description": "The following documents will be provided:\n• Study protocol\n• Scale manual\n\nPeriod:\n• Fully anonymized data will be made available after a moratorium of five years.\n\nProcedure:\n• A reasonable request must be made.\n", - "study_data_sharing_plan_generally": "Yes, there is a plan to make data available" - }, - "study_design_non_interventional": {}, - "study_eligibility_criteria": { - "study_eligibility_age_max": { - "number": 18, - "time_unit": "Years" - }, - "study_eligibility_age_min": { - "number": 9, - "time_unit": "Years" - }, - "study_eligibility_exclusion_criteria": "insufficient knowledge of the German language (written and spoken)", - "study_eligibility_genders": [ - "Male", - "Female", - "Diverse" - ], - "study_eligibility_inclusion_criteria": "Subjects, who have already consented to participate in one of the three patient registries (obesity, rheumatic diseases, diabetes) and to the processing of these data, and their parents/guardians." - }, - "study_ethics_committee_approval": "Request for approval submitted, approval granted", - "study_groups_of_diseases": { - "study_groups_of_diseases_generally": [ - "Unknown" - ] - }, - "study_outcomes": [ - { - "study_outcome_description": "Children’s physical and mental well-being (WHO-5; KIDCREEN; SAM), parents’ and children’s corona-specific burden (Calvano et al.)\n- T1 and T2", - "study_outcome_title": "Primary Outcome", - "study_outcome_type": "Primary" - }, - { - "study_outcome_description": "- Children’s mental well-being (PHQ-9; GAD-7; De-Jong-Gierveld-Einsamkeitsskala)\n- Parents‘ satisfaction with life (SF-8, CHQ, FLQ) and mental well-being (PHQ-4; ADNM8, PSS-4; CGSQ-SF11; BPBS)\n-T1 and T2", - "study_outcome_title": "Secondary Outcome", - "study_outcome_type": "Secondary" - } - ], - "study_primary_design": "Non-interventional", - "study_primary_purpose": "Supportive care", - "study_region": "International", - "study_start_date": "2022-02-01", - "study_status": "At the planning stage", - "study_subject": "Person", - "study_target_sample_size": 300, - "study_type": { - "study_type_non_interventional": [ - "Other" - ] + "languages": [ + "EN (English)" + ], + "nonStudyDetails": { + "useRights": { + "confirmations": { + "authority": True, + "irrevocability": True, + "supportByLicensing": True, + "terms": True + }, + "label": "CC BY 4.0 (Creative Commons Attribution 4.0 International)" } - } + }, + "provenance": { + "dataSource": "Manually collected" + }, + "titles": [ + { + "language": "EN (English)", + "text": "S1 File. Raw data." + } + ] }, "versions": [ - "1.0" + { + "create_timestamp": "2023-07-27T07:13:03Z", + "id": 842, + "last_update_timestamp": "2023-07-27T07:48:12Z", + "name": "1.0", + "release_timestamp": "2023-07-27T07:48:12Z", + "status": "PUBLISHED" + } ] } @@ -347,14 +131,15 @@ # Check the response if response.status_code == 200: print("Request was successful.") - - print("Response:", response.json()['status']) time.sleep(3) - print("should be 3 seconds delayed") + print("wait 3 seconds") #get session to look if its finished while response.json()['status'] != 'finished': time.sleep(3) response = requests.get(url + '/' + response.json()['id'], ) + tasks = response.json()['tasks'] + for values in tasks.values(): + print(values['name'], ": ", values['status']) print('status: ', response.json()['status']) print(response.json())