Integrate cooperator with FAO API
Integrate cooperator with FAO API https://api.wiews.fao.org/ in https://lima.ggce.genebanks.org/cooperator
For example when adding a new cooperator just write WIEWS code and retrieve FAO institution details. Or when searching by institution name and country retrieve all the the institution to finally select one.
API example
[{
"instcode": "PHL001",
"country_iso3": "PHL",
"valid_instcode": "PHL001",
"name": "International Rice Research Institute",
"acronym": "IRRI",
"parent_instcode": "FRA305",
"parent_name": "CGIAR",
"address": "DAPO BOX 7777",
"country": "Philippines",
"Postal_Code": "1301",
"telephone": "(632)5805600",
"email": "INFO@IRRI.ORG",
"website": "https:\/\/www.irri.org\/international-rice-genebank",
"status": "CGIAR",
"lat": "121.2554",
"lon": "14.1691",
"Genebank_long_term_collections": true,
"Genebank_medium_term_collections": true,
"Genebank_short_term_collections": true,
"Botanical_garden": false,
"Breeder": true,
"Network": false,
"Community": false,
"Educational": false,
"Seed_producer": false,
"Seed_supplier": false,
"Farmer_community": false,
"Research": true,
"Extensionist": true,
"Laboratory": false,
"Publisher": true,
"Administration_or_Policy": false
}]
Please note that searching for USA100
will not return USA1004
. The API server is pretty slow to respond, we may need to set a higher timeout than default.
Implementation ideas
I imagine we can implement an autocompleter that calls a new FaoWiewsInstituteService
and displays the resulting institute details. Clicking one would then populate Organization details in the CooperatorForm
.
If any of the "target" fields are populated (not blank) the user must confirm that data can be replaced.