Start a new topic

Pharmacology filter units used in API calls not available in API response

The pharmacology filter unit API call contains a response with things like:


{

_about"http://www.openphacts.org/units/Nanomolar",

activity_count9499572,

label"nM"

},

{

_about"http://qudt.org/vocab/unit#Percent",

activity_count1252651,

label"%"

},

{

_about"http://www.openphacts.org/units/MicrogramPerMilliliter",

activity_count673173,

label"ug.mL-1"

},


However, the pharma calls require an activity_unit parameter with value like 'percent', note that it is not capitalised like the 'Percent' term in the above response. There seems to be no way of getting these required filter terms from the API. I suggest that the pharmacology filter response should include these filter terms like this:


{

_about"http://www.openphacts.org/units/Nanomolar",

activity_count9499572,

label"nM",

filter_term"nanomolar"

},

{

_about"http://qudt.org/vocab/unit#Percent",

activity_count1252651,

label"%",

filter_term"percent"

},

{

_about"http://www.openphacts.org/units/MicrogramPerMilliliter",

activity_count673173,

label"ug.mL-1",

filter_term"microgram_per_milliliter" #or whatever that is!

},


OR that the value for activity_unit be the URI for the unit eg http://www.openphacts.org/units/MicrogramPerMilliliter


However, it looks like the label has changed between 1.4 & 1.5. In 1.4 the response contained things like:


{

_about"http://qudt.org/vocab/unit#Percent",

activity_count970189,

label"percent"

},


which have the values that are required. I still think both the label ie "%" and filter term ie "percent" be included in the response.

Login or Signup to post a comment