ecrin-github / MDR_FuiPortal

Blazor based Server (API) and client portal for the MDR
MIT License
2 stars 1 forks source link

DO lost! #45

Open sergiocontrino opened 2 months ago

sergiocontrino commented 2 months ago

now, when looking for a study 'more details' in the web interface, the attached digital objects (DO) appear to be empty/missing

something like this is displayed:

DATA OBJECTS

No type name !!
Display title: 
No display title???
Managing organisation: 
Year Published: Not provided
Access Type: 
No access type provided!
Access details: 
Further information at: 
Object Data Provenance

No provenance string
michelescarlato commented 2 months ago

@sergiocontrino Thanks for this assignment.

May I ask @Swarnalathaa Swarna if it is possible to have a screenshot and brief step-by-step instructions to help me visualize the error on MDR FuiPortal directly?

If you need a password to access the FuiPortal, please feel free to email it to me at michele.ecrin@gmail.com. I will take care of this issue as soon as I have this information.

(I don't know if @cudillal Leopold can help here, but if you can, feel free to send me the login instructions and how to visualize the error on the UI, please)

sergiocontrino commented 2 months ago

hi @michelescarlato , just go to https://crmdr.ecrin.org/ click on search and do whatever search by kw (e.g. diabetes) you will get a list of studies, just click on one.

or just go directly to a study, e.g. https://crmdr.ecrin.org/Study/4

at the bottom you will see the data object part.

michelescarlato commented 2 months ago

image

Got it, thank you. I am on it.

michelescarlato commented 2 months ago

Display title: "No display title???"

Display title: "No type name !!" , Year Published: Not provided, Access Type: No access type provided! Further information at:

Object Data Provenance

No provenance string

Are added by this portion of the code: Ref. https://github.com/ecrin-github/MDR_FuiPortal/blob/master/Client/StudyPage/ObjectDetails.razor#L283-L311

protected override void OnInitialized()
    {
        if (ob is not null)
        {
            type_name = ob.object_type?.name ?? "No type name !!";
            if (type_name.ToLower() == "journal article - unspecified")
            {
                type_name = "Journal Article";
            }
            display_title = ob.display_title ?? "No display title???";
            doi = ob.doi ?? "";
            year_pub = ob.publication_year.HasValue ? ((int)ob.publication_year).ToString() : "Not provided";

            managing_org = ob.managing_organisation?.name ?? "";
            if (!string.IsNullOrEmpty(ob.managing_organisation?.ror_id))
            {
                managing_org = "<a href=\"" + ob.managing_organisation?.ror_id + "\" target=\"_blank\">" + managing_org + "</a>";
            }

            access_type = ob.access_type?.name ?? "No access type provided!";
            url = ob.access_details?.url ?? "";
            access_description = ob.access_details?.description ?? "";
            version = ob.version ?? "";

            deidentification = ob.dataset_deident_level;
            consent = ob.dataset_consent;
            rec_keys = ob.dataset_record_keys;

            provenance = ob.provenance_string ?? "No provenance string";

So, the object that is trying to display is not null. And it is defined here: https://github.com/ecrin-github/MDR_FuiPortal/blob/master/Client/StudyPage/ObjectDetails.razor#L175

@code {
    [Parameter]
    public JSONFullObject? ob { get; set; }

Since I am still fairly new to the UI, I would suggest trying to fix the Tasks that didn't terminate with exit code 0 on the Windows server.

I will open issues directly on the proper repo, apply code fixes and open the Pull Request. I will then link everything here to show the modifications done.

michelescarlato commented 2 months ago

I fixed the MDR_Coding issues by adding a timeout and handling npgsqlException and common exceptions in the ExecuteSQL function in the ConditionHelper.cs (https://github.com/ecrin-github/MDR_Coder/blob/master/ContextHelpers/ConditionHelper.cs#L29).

This PR, https://github.com/ecrin-github/MDR_Coder/pull/4, fixed the issue created on the MDR_Coder https://github.com/ecrin-github/MDR_Coder/issues/3

Currently re-running the aggregator.

michelescarlato commented 2 months ago

@sergiocontrino ,

you may find useful this Python utils repo that I recently forked into ecrin-github:

https://github.com/ecrin-github/postgres-utils/tree/main/get_db_size

It provides an insight of the current DB status.

Database Name Size Number of Tables Number of Relations Total Rows
postgres 8125 kB 216 216 21697
anzctr 280 MB 251 251 865351
biolincc 31 MB 248 248 192713
cessda 10 MB 209 209 46150
chictr 751 MB 257 257 2340208
context 2804 MB 335 335 16802282
cris 114 MB 251 251 456447
ctg 15 GB 336 336 56728479
ctri 6862 MB 256 256 23391940
drks 347 MB 252 252 1033794
euctr 703 MB 261 261 2246345
isrctn 332 MB 258 258 926932
jprn 4851 MB 256 256 19462902
lebctr 26 MB 251 251 188148
mdr 33 GB 329 257 74515508
mon 540 MB 230 230 1303671
nntr 466 MB 251 251 1595235
pactr 63 MB 251 251 293217
pubmed 3632 MB 263 263 12460155
rebec 83 MB 251 251 315171
rpcec 33 MB 251 251 205836
rpuec 59 MB 251 251 284096
slctr 31 MB 251 251 196941
test 27 MB 412 412 45289
thctr 186 MB 251 251 658574
yoda 41 MB 248 248 349463
irct 406 MB 251 251 1162253
aggs 15 GB 251 251 99429827
iec 9935 MB 235 235 12473246
itmctr 69 MB 251 251 302541
bbmri 18 MB 216 216 170904
Total 94.94 GB 8080 8008 330465315

Additional Information