Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic generated algorithms for body mass index are not applied #4375

Closed
jjettenn opened this issue Jan 26, 2016 · 5 comments
Closed

Automatic generated algorithms for body mass index are not applied #4375

jjettenn opened this issue Jan 26, 2016 · 5 comments

Comments

@jjettenn
Copy link
Contributor

Discussed with @ChaoPang : For the algorithm template to work, we need to have the explain API available when manually selecting attributes. This is much bigger then just a bug fix and should be a story.
The core of this problem can be the same but it should work on the next 2 different cases!

--- CASE 1 of 2 --- [Automatic tagging]

Reproduce

Download the folder (real_examples) at: https://drive.google.com/drive/folders/0B7qHi41THTs_T3BnaHY2TGJ1Mzg
"Demo target data and source data

  1. mappingservice-test.xlsx" Upload via the upload page
    "Demo ontology files:
  2. biobank_ontology.owl.zip
  3. uo.owl.zip" Upload via the upload page
    "Demo magma script type and algorithm template file:
  4. test-javascript_magam.xls" Upload via the upload page

Go to the "Tag wizard"
Select the entity to tag HOP_selenium
Make sure that you tag it automatically with: "biobank_ontology" and "uo" ontologies.

Go to the MappingService
Create a new mapping project. Use HOP_selenium as target with name HOP TEST.
Add the "lifelines_test" source.
Click on attribute "Body Mass Index kg/m^2 (decimal)" to map it.
Search on: Weight Height (You will get 4 results)
Select: [HEIGHT_2] and [WEIGHT]

Expected

Algorithm:

"$('WEIGHT').div(1000.0).div($('HEIGHT_2').div(100.0).pow(2)).value()" is applied

Observed

Algorithm is not applied!
The produced algorithm:

var counter = 0;
var SUM=newValue(0);
if(!$('WEIGHT').isNull().value()){
    SUM.plus($('WEIGHT').unit('g').value());
    counter++;
}
if(!$('HEIGHT_2').isNull().value()){
    SUM.plus($('HEIGHT_2').unit('cm').value());
    counter++;
}
if(counter !== 0){
    SUM.div(counter);
    SUM.value();
}else{
    null;
}

--- CASE 2 of 2 --- [Manual tagging]

Explain:

Reproduce

Continue from case 1

Go to the "Tag wizard"
Select the entity to tag HOP_selenium
Remove all tags
Please add the tags "Weight" and "Height" to attribute "Body_Mass_Index_1 Body Mass Index kg/m^2" of the entity "HOP_selenium".

Go to the "MappingService"
Use the already existing HOP_selenium mapping.
Remove the "lifelines_test" source.
Add the "lifelines_test" source.
Click on attribute "Body Mass Index kg/m^2 (decimal)" to map it.
(You will get 4 results)
[HEIGHT_2] and [WEIGHT] are selected.
The algorithm:

$('WEIGHT').div(1000.0).div($('HEIGHT_2').div(100.0).pow(2)).value() is created as expected.

Click on Height and Unclick it.
[HEIGHT_2] and [WEIGHT] are still selected.

Expected

Algorithm:

"$('WEIGHT').div(1000.0).div($('HEIGHT_2').div(100.0).pow(2)).value()" is applied

Observed

Algorithm is not applied!
The produced algorithm:

var counter = 0;
var SUM=newValue(0);
if(!$('WEIGHT').isNull().value()){
    SUM.plus($('WEIGHT').unit('g').value());
    counter++;
}
if(!$('HEIGHT_1').isNull().value()){
    SUM.plus($('HEIGHT_1').unit('cm').value());
    counter++;
}
if(counter !== 0){
    SUM.div(counter);
    SUM.value();
}else{
    null;
}
@jjettenn jjettenn added this to the Sprint 80 milestone Jan 26, 2016
@mark-de-haan mark-de-haan changed the title MappingService - algorithm is not applied. Automatic generated algorithm for body mass index are not applied Jan 27, 2016
@mark-de-haan mark-de-haan changed the title Automatic generated algorithm for body mass index are not applied Automatic generated algorithms for body mass index are not applied Jan 27, 2016
@jjettenn
Copy link
Contributor Author

@mark-de-haan you have added a nice layout but removed 2/3 of my findings.
There are 3 cases that should be valid!
Why did you removed that?? TEST1, TEST2, and TEST3.

Please put them back.

@mark-de-haan
Copy link
Contributor

Because they are all caused by the same thing. The template algorithm is not being applied. Writing down three things describing the same bug seems a bit redundant..

@jjettenn
Copy link
Contributor Author

You should not rewrite my finding without consulting me! Except for minor changes!
I have described three cases! That are important! You probably don't understand them.
Now I will need to describe them again, Thanks!

@mark-de-haan
Copy link
Contributor

I did understand them, thats why I removed them. The wall of text was unclear in describing the issue. Next time I will consult you.

@dennishendriksen dennishendriksen modified the milestone: Sprint 80 Feb 12, 2016
@mswertz mswertz added this to the First milestone Mar 28, 2016
@dennishendriksen dennishendriksen removed this from the First milestone Nov 16, 2016
@mark-de-haan
Copy link
Contributor

mark-de-haan commented Jul 10, 2017

No longer an issue in v5.0.0. Although different algorithms are applied, the result is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants