Closed vedina closed 8 years ago
I'm afraid most this is kind-of new for me. But, from looking the returned JSON for the working matrix - here's a small excerpt:
"https://apps.ideaconsult.net/data/property/ECOTOX/EC_FISHTOX_SECTION/LC50/A3B07BB94F67A6CC3995A6E2AAEE4A59E2B35826/NOTSPECIFIED/54405305-ff3f-3a5d-bfe1-9a6ccb2a44c6": [{
"loValue": 69.2,
"idresult": 6297
}
]
,
"https://apps.ideaconsult.net/data/property/ECOTOX/EC_DAPHNIATOX_SECTION/interpretation_result/DE57FC30E942668EB956E51E0C5B38908CFBAFE3/NOTSPECIFIED/38723956-c5f9-3f5b-9256-8f1291747789": [{
"textValue": "",
"newentry": true
}, {
"textValue": "",
"newentry": true
}, {
"textValue": "",
"newentry": true
}, {
"textValue": "",
"newentry": true
}, {
"textValue": "",
"newentry": true
}
]
Isn't it enough that the server just adds this idresult
field to the interpretation_result
-based entries?
Yes, it is new, we have overlooked it while implementing the matrix editing.
The thing is there is NO idresult
for interpretation_result
entries, it's in a different object. However, the document UUID is sufficient to identify it. (as in study.uuid here)
But, as I see with other entries, idresult
is unique among the array of values - how a particular entry would be identified without anything additional? By the index in the array? Why was not the same used for other effects then?
Yes, idresult
is unique for effect records, it's just that interpretation_result is not stored within this array.
interpretation": {
"result": "not classified"
},
"effects": [
{
"endpoint": "LD50",
"conditions": {
"Sex": "male"
},
"result": {
"unit": "mg/kg bw",
"loQualifier": ">",
"loValue": 5000
}
},
{
"endpoint": "LD50",
"conditions": {
"Sex": "female"
},
"result": {
"unit": "mg/kg bw",
"loQualifier": ">",
"loValue": 2000,
"upQualifier": "<",
"upValue": 5000
}
}
Indeed, we can't identify where interpretation_result
belongs to without anything additional, thus this request for brainstorming :)
Just have a thought - we can update the matrix JSON to include document_uuid
as idresult
entry for interpretation_result. Then the server side will figure out what to update.
Does jToxKit expect integer for the idresult
, or will work with any scalar value? If later, then it needs only server side fix.
No, it just copies the value. The only place idresult
is present is this:
self.edit.study.push({
owner: { substance: { uuid: data.compound.i5uuid } },
effects_to_delete: [{
result: {
idresult: data.values[featureId][valueIdx].idresult,
deleted: true,
remarks: reason
},
}]
});
Btw, it is strange that nowhere else I can find idresult
, which brings two questions:
deleted: true
?Another thing is, that - we can rename effects_to_delete
to something like studu_changes
, to make it clear it is not effect-only.
No, let's not rename or change things now, we are already very late for a release. interpretation_result is kind of a summary of effects, not completely unrelated.
Will check the server side to answer the questions.
Fixed server side https://sourceforge.net/p/ambit/bugs/96/
When deleting values from the working matrix jToxKit sends JSON request , identifying particular effect by
idresult
, as in the json below.However, some endpoints (e.g. skin sensitisation, skin irritation, eye irritation) are represented in the matrix by so called
interpretation_result
, which is a value on the level ofprotocol application
, and not on the level ofeffect records
(one protocol application may have multiple effect records). With the current setup it is impossible to remove theinterpretation_result
values, as the server receives a JSON like above, but withoutidresult
and rightly fails.@thejonan , @gonzomir , we need to brainstorm a mechanism to implement removal of
interpretation_result
values.For testing, see the
Skin sensitisation
column in the working matrix