Scopus Abstract Retrieval API works not as expected - scopus

Currently, Scopus Abstract Retrieval APIs don't work as expected. According to documentation I should recevice a response like this: https://dev.elsevier.com/payloads/retrieval/abstractRetrievalResp.json
I'm interested to dc:description and authors fields, but the API stopped working correctly and this is the current result of the test scopus id from the documentation website (https://dev.elsevier.com/retrieval.html#!/Abstract_Retrieval/AbstractRetrieval_0_1_2_3). I use my own apiKey.
{
"abstracts-retrieval-response": {
"affiliation": [
{
"affiliation-city": "Cambridge",
"affilname": "University of Cambridge",
"affiliation-country": "United Kingdom"
},
{
"affiliation-city": "Singapore City",
"affilname": "School of Biological Sciences",
"affiliation-country": "Singapore"
},
{
"affiliation-city": "Adelaide",
"affilname": "The University of Adelaide",
"affiliation-country": "Australia"
}
],
"coredata": {
"srctype": "j",
"eid": "2-s2.0-0037070197",
"pubmed-id": "11852050",
"prism:coverDate": "2002-02-13",
"prism:aggregationType": "Journal",
"prism:url": "https://api.elsevier.com/content/abstract/scopus_id/0037070197",
"dc:creator": {
"author": [
{
"preferred-name": {
"ce:given-name": "C. S.B.",
"ce:initials": "C.S.B.",
"ce:surname": "Chia",
"ce:indexed-name": "Chia C.S.B."
},
"#seq": "1",
"ce:initials": "C.S.B.",
"#_fa": "true",
"affiliation": {
"#id": "60031101",
"#href": "https://api.elsevier.com/content/affiliation/affiliation_id/60031101"
},
"ce:surname": "Chia",
"#auid": "57220496113",
"author-url": "https://api.elsevier.com/content/author/author_id/57220496113",
"ce:indexed-name": "Chia C.S.B."
}
]
},
"link": [
{
"#_fa": "true",
"#rel": "self",
"#href": "https://api.elsevier.com/content/abstract/scopus_id/0037070197"
},
{
"#_fa": "true",
"#rel": "scopus",
"#href": "https://www.scopus.com/inward/record.uri?partnerID=HzOxMe3b&scp=0037070197&origin=inward"
},
{
"#_fa": "true",
"#rel": "scopus-citedby",
"#href": "https://www.scopus.com/inward/citedby.uri?partnerID=HzOxMe3b&scp=0037070197&origin=inward"
}
],
"source-id": "17481",
"pii": "S0014579301033130",
"citedby-count": "55",
"prism:volume": "512",
"subtype": "ar",
"dc:title": "The orientation of the antibiotic peptide maculatin 1.1 in DMPG and DMPC lipid bilayers. Support for a pore-forming mechanism",
"openaccess": "1",
"prism:issn": "00145793",
"prism:issueIdentifier": "1-3",
"subtypeDescription": "Article",
"prism:publicationName": "FEBS Letters",
"prism:pageRange": "47-51",
"prism:endingPage": "51",
"openaccessFlag": "true",
"prism:doi": "10.1016/S0014-5793(01)03313-0",
"prism:startingPage": "47",
"dc:identifier": "SCOPUS_ID:0037070197"
}
}
}
There are missing so many informations compared to the API example provided. How can I fix the issue?

Related

FAIL: address in "setState" "newAddresses" field should have SC format: address:the_crowdfunding_contract

I'm trying to run the below mandos test, but when running erdpy contract test, the test fails and returns the following error: FAIL: address in "setState" "newAddresses" field should have SC format: address:the_crowdfunding_contract.
The test code is the one from the elrond smart contract tutorial, part 1.
What is the correct format of the SC address in the setState step?
Versions used:
erdpy: 1.0.21
elrod-wasm: 0.22.9
{
"name": "tutorial_crowdfunding",
"steps": [
{
"step": "setState",
"accounts": {
"address:my_address": {
"nonce": "0",
"balance": "1,000,000"
}
},
"newAddresses": [
{
"creatorAddress": "address:my_address",
"creatorNonce": "0",
"newAddress": "address:the_crowdfunding_contract"
}
]
},
{
"step": "scDeploy",
"tx": {
"from": "address:my_address",
"contractCode": "file:../output/tutorial_crowdfunding.wasm",
"value": "0",
"gasLimit": "1,000,000",
"gasPrice": "0"
},
"expect": {
"status": "0",
"gas": "*",
"refund": "*"
}
},
{
"step": "checkState",
"accounts": {
"address:my_address": {
"nonce": "1",
"balance": "1,000,000"
},
"address:the_crowdfunding_contract": {
"nonce": "0",
"balance": "0",
"storage": {
"''owner": "address:my_address"
},
"code": "file:../output/tutorial_crowdfunding.wasm"
}
}
}
]
}
SmartContract addresses in mandos should be prefixed using sc:instead of address:
So the correct test would look like this:
{
"name": "tutorial_crowdfunding",
"steps": [
{
"step": "setState",
"accounts": {
"address:my_address": {
"nonce": "0",
"balance": "1,000,000"
}
},
"newAddresses": [
{
"creatorAddress": "address:my_address",
"creatorNonce": "0",
"newAddress": "sc:the_crowdfunding_contract"
}
]
},
{
"step": "scDeploy",
"tx": {
"from": "address:my_address",
"contractCode": "file:../output/tutorial_crowdfunding.wasm",
"value": "0",
"gasLimit": "1,000,000",
"gasPrice": "0"
},
"expect": {
"status": "0",
"gas": "*",
"refund": "*"
}
},
{
"step": "checkState",
"accounts": {
"address:my_address": {
"nonce": "1",
"balance": "1,000,000"
},
"sc:the_crowdfunding_contract": {
"nonce": "0",
"balance": "0",
"storage": {
"''owner": "address:my_address"
},
"code": "file:../output/tutorial_crowdfunding.wasm"
}
}
}
]
}
Also your SmartContract address name might be too long, not sure on the exact limits right now. So if the error persists after the above changes try to shorten the SmartContract name.
Additional note:
The documentation is somewhat outdated. For newer informations you can take a look at the templates that can be used with the elrond ide vscode extension. They are also on github

Google Places API: different output for textsearch and nearbysearch (formatted_address missing)

Want to use Google Places API nearby search for reverse lookup using coordinates.
I use nearbysearch endpoint.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.892674%2C151.200727&rankby=distance&type=bar&key=...
What is missing is formatted_address.
When trying to use textsearch instead, I do get formatted_address.
https://maps.googleapis.com/maps/api/place/textsearch/json?location=-33.892674%2C151.200727&rankby=distance&type=bar&key=...
Both return the same first place_id and look very similar.
Differences I noticed:
textsearch: formatted_address, empty opening_hours are included
nearbysearch: vicinity, scope, empty opening_hours are not included
How do I get formatted_address?
Update: I checked and both types should return the same fields.
details
When searching by distance & type I guess I could use either nearbysearch or textsearch, but when searching by prominence I will have to use nearbysearch as textsearch requires either type or query.
The query I would like to use (using nearbysearch, so missing formatted_address):
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.892674%2C151.200727&rankby=prominence&radius=500&key=...
Full output textsearch
{
"business_status": "OPERATIONAL",
"formatted_address": "7 Cope St, Redfern NSW 2016",
"geometry": {
"location": {
"lat": -33.892682,
"lng": 151.20075
},
"viewport": {
"northeast": {
"lat": -33.89147812010727,
"lng": 151.2019769298927
},
"southwest": {
"lat": -33.89417777989272,
"lng": 151.1992772701072
}
}
},
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png",
"id": "d8b3f319ad00fafd66527b248e450284a53386c2",
"name": "Arcadia",
"opening_hours": {
"open_now": true
},
"photos": [
{
"height": 3000,
"html_attributions": [
"Colin Hannah"
],
"photo_reference": "CmRaAAAAvnYeIFoCoiiQoyRqKQqpz1yJK71eXM3wYuCiTFTTtj3iwTiIW_z865AfLogqMiEyyBh5GqZoxAcHDmzyE8KelhGEh3C-ggm5LQDGK4zFWxdTNCholvXurq0ce7zLoztgEhBgklqzYxK5jhDhwqB5wuabGhQRUb448z5zV9l7EDSmXLMo5icv1w",
"width": 4000
}
],
"place_id": "ChIJ3Y3vQdqxEmsRTvCcbZnsYJ8",
"plus_code": {
"compound_code": "4642+W7 Redfern, New South Wales",
"global_code": "4RRH4642+W7"
},
"price_level": 2,
"rating": 4.5,
"reference": "ChIJ3Y3vQdqxEmsRTvCcbZnsYJ8",
"types": [
"bar",
"point_of_interest",
"establishment"
],
"user_ratings_total": 279
},
Full output nearbysearch:
{
"business_status": "OPERATIONAL",
"geometry": {
"location": {
"lat": -33.892682,
"lng": 151.20075
},
"viewport": {
"northeast": {
"lat": -33.8914789697085,
"lng": 151.2019760802915
},
"southwest": {
"lat": -33.89417693029149,
"lng": 151.1992781197085
}
}
},
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png",
"id": "d8b3f319ad00fafd66527b248e450284a53386c2",
"name": "Arcadia",
"opening_hours": {
"open_now": true
},
"photos": [
{
"height": 3024,
"html_attributions": [
"Milan"
],
"photo_reference": "CmRaAAAA7u4ZpZOddZ8ypuGySsQ1lG0HEX4Ke0DHeYtHYN1gEchx-yf1U-DVLNHVdmFVLoocHbMmWlMVCqcW9oMnpDC4-dw6ObZAovVQG90GpVD3sYeMEpzBB80yjhttjZ1lsIEdEhCzQJane_k8xy-HlI9ZlE9WGhQJ13KgR88Q239e8ocBCt5H0BgpKQ",
"width": 4032
}
],
"place_id": "ChIJ3Y3vQdqxEmsRTvCcbZnsYJ8",
"plus_code": {
"compound_code": "4642+W7 Redfern NSW, Australia",
"global_code": "4RRH4642+W7"
},
"price_level": 2,
"rating": 4.5,
"reference": "ChIJ3Y3vQdqxEmsRTvCcbZnsYJ8",
"scope": "GOOGLE", <===========
"types": [
"bar",
"point_of_interest",
"establishment"
],
"user_ratings_total": 279,
"vicinity": "7 Cope Street, Redfern" <===========
},
Comment from #MrUpsidown points to the documentation where it is stated:
A Text Search response is similar, except that it returns a formatted_address instead of a vicinity property
So, it seems that's just the way it is.
"formatted_address": "7 Cope St, Redfern NSW 2016",
vs
"vicinity": "7 Cope Street, Redfern"

Alexa.Discovery response: no device detected by Alexa

I am implementing my Alexa Home Skill using AWS Lambda.
Given the following request I receive when I try to detect new devices on Alexa Skil test page:
{directive={header={namespace=Alexa.Discovery, name=Discover, payloadVersion=3, messageId=0160c7e7-031f-47ee-a1d9-a23f38f87a9e}, payload={scope={type=BearerToken, token=...}}}}
I respond with the following:
{
"event": {
"payload": {
"endpoints": [
{
"displayCategories": [
"SMARTPLUG"
],
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"retrievable": true,
"supported": [
{
"name": "powerState"
}
],
"proactivelyReported": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"retrievable": true,
"supported": [
{
"name": "connectivity"
}
],
"proactivelyReported": true
}
}
],
"manufacturerName": "mirko.io",
"endpointId": "ca84ef6d-53b1-430a-8a5e-a62f174eac5e",
"description": "mirko.io forno (id: ca84ef6d-53b1-430a-8a5e-a62f174eac5e)",
"friendlyName": "forno"
}
]
},
"header": {
"payloadVersion": "3",
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"messageId": "c0555cc8-ad7a-4377-b310-9de9b9ab6282"
}
}
}
Despite that, for some reasons Alexa answers that it did not find any new device.
I may be mistaken but I am pretty sure it used to work before I decided to add the Alexa.EndpointHealth interface.
Your response object looks right to me, except the extra "endpoint" field.
"endpoint": {
"endpointId": "INVALID",
"scope": {
"type": "BearerToken",
"token": "INVALID"
}
}
There's no such field in the Alexa.Discovery documentation. Try removing it and see if it resolves the issue.

Asymmetrik FHIR Server Core support FHIRCast?

I have established a "subscription" to updates on a specific "Bundle". For some reason, the web hook is not firing. Is FHIRCast supported on Asymmetrik's FHIR Server? Here is my "subscription" json payload:
{
"resourceType" : "Subscription",
"status" : "active",
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "N"
}
]
}
],
"name": {
"family": "du Marché",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString": "VV"
}
]
},
"given": [
"Bénédicte"
]
},
"telecom": [
{
"system": "phone",
"value": "+33 (237) 998327"
}
],
"address": {
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"period": {
"start": "1974-12-25"
}
},
"gender": "female",
"period": {
"start": "2012"
}
}
],
"end" : "2021-02-07T13:28:17.239+02:00",
"reason" : "FHIR web hook",
"criteria" : "Bundle/af03af555d9eb78229619cfeac8767409fd22f72",
"error" : "error note",
"channel" : {
"type" : "rest-hook",
"endpoint" : "https://localhost:5001/api/FHIRNotification",
"payload" : "application/fhir+json",
"header" : [""]
}
}
Perhaps I am missing an implementation step to add the subscription web hook functionality?
Thanks for the help!
Todd
Currently we do not support FHIRCast out of the box since this is a facade server. To get FHIRCast working properly you would also probably need triggers or something else setup on the database.
Im not super familiar with FHIRCast personally but it does seem like there is some connection to a hub separate of the FHIR server as well.

Combine json response in nifi

We are calling invokehttp processes and getting response which json. Example
{
"id": "h569gcjhcm",
"doi": {
"id": "10.17632/h569gcjhcm.1",
"status": "allocated",
"prefix": "10.17632"
},
"name": "Data for: Flooding of the Caspian Sea at the intensification of Northern Hemisphere Glaciations",
"description": "Supplementary data for the Jeirankechmez section in Azerbaijan.\n\n- Appendix A contains all paleomagnetic data and interpretations of the Jeirankechmez section. This .dir file can be imported into the paleomagnetism.org webportal under \"Interpretation Portal\", \"Advanced Options\", \"Import Application Save\". For further details on the use of paleomagnetism.org please refer to the article by Koymans et al. (2016) - https://doi.org/10.1016/j.cageo.2016.05.007.\n- Appendix B contains the magnetic susceptibility data for the analysed samples, including geographic coordinates and stratigraphic levels.\n- Appendix C contains the 40Ar/39Ar data for the three analysed volcanic ash layers. ",
"version": 1,
"publish_date": "2019-01-29T12:51:38.090Z",
"data_licence": {
"id": "01d9c749-3c4d-4431-9df3-620b2dcfe144",
"short_name": "CC BY 4.0",
"full_name": "Creative Commons Attribution 4.0 International",
"description": "This dataset is licensed under a Creative Commons Attribution 4.0 International licence.\n\nWhat does this mean?\nYou can share, copy and modify this dataset so long as you give appropriate credit, provide a link to the CC BY license, and indicate if changes were made, but you may not do so in a way that suggests the rights holder has endorsed you or your use of the dataset. Note that further permission may be required for any content within the dataset that is identified as belonging to a third party.",
"url": "http://creativecommons.org/licenses/by/4.0",
"category": "Creative"
},
"contributors": [
{
"first_name": "Christiaan",
"last_name": "van Baak"
},
{
"first_name": "Marius",
"last_name": "Stoica"
},
{
"first_name": "Arjen",
"last_name": "Grothe"
},
{
"first_name": "Gareth",
"last_name": "Davies"
},
{
"profile_id": "72970719-95c8-341b-80d2-afa9e7154baf",
"first_name": "Wout",
"last_name": "Krijgsman"
},
{
"profile_id": "3a4bfe2c-4098-3859-9b88-789fa993e05a",
"first_name": "Keith",
"last_name": "Richards"
},
{
"profile_id": "f1660f3c-ebbd-3289-8240-1f4ea7913df4",
"first_name": "Klaudia",
"last_name": "Kuiper"
},
{
"first_name": "Elmira",
"last_name": "Aliyeva"
}
],
"versions": [
{
"version": 1,
"publish_date": "2019-01-29T12:51:38.090Z",
"available": true
}
],
"files": [
{
"filename": "Appendix_A_Jeirankechmez_pmag_interpretations.dir",
"id": "f2f4cba7-2411-4737-a9b2-f094db30dca1",
"content_details": {
"id": "994bc865-5300-4d76-a373-e528ccd830e8",
"sha256_hash": "2427c4b077372760973ce8224694f2a2ee5383c7f022ad818164d847a20e27cc",
"sha1_hash": "73792dc6d6eb2c1de1e04926ba5d4420dd0aaece",
"content_type": "application/x-director",
"size": 917022,
"created_date": "2019-01-03T00:00:00.000Z"
"download_expiry_time": "2019-01-29T13:52:25.729Z"
},
"metrics": {
"downloads": 0,
"previews": 0
}
},
{
"filename": "Appendix_B_Sample_locations_susceptibility.xlsx",
"id": "64241bf0-5279-49e8-a505-be9075b910e1",
"content_details": {
"id": "af8809d0-8e63-4599-abaa-e7af9ad39959",
"sha256_hash": "0588f44a0cbd477aa2798323e57ce0b2d4a118e767c0b1ffdc9eb1017e4d23c2",
"sha1_hash": "02e89f6f197ebf495e1e2c3d1aab250efc7545e7",
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": 24770,
"created_date": "2019-01-03T00:00:00.000Z"
,
"download_expiry_time": "2019-01-29T13:52:25.732Z"
},
"metrics": {
"downloads": 0,
"previews": 0
}
},
{
"filename": "Appendix_C_ArAr_data.xlsx",
"id": "2e912027-ff3f-48ad-98b9-b643b59ba0e3",
"content_details": {
"id": "4960377c-060d-41f6-b7af-150617d8ebeb",
"sha256_hash": "235dc32c1e99f350ee5c99908a5f5d72d1aeeab02f78c2e0181d585bd1880fa6",
"sha1_hash": "6483156e4577948cac5d2679eee862c76faed1c9",
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"size": 18510,
"created_date": "2019-01-03T00:00:00.000Z"
},
"metrics": {
"downloads": 0,
"previews": 0
}
}
],
"articles": [
{
"id": "10.1016/j.gloplacha.2019.01.007",
"title": "Flooding of the Caspian Sea at the intensification of Northern Hemisphere Glaciations",
"doi": "10.1016/j.gloplacha.2019.01.007",
"journal": {
"issn": "0921-8181",
"name": "Global and Planetary Change",
"url": "http://www.sciencedirect.com/science/journal/09218181"
}
}
],
"categories": [
{
"id": "http://com/vocabulary/OmniScience/Concept-170590667",
"label": "Geology"
},
{
"id": "http://data.elsevier.com/vocabulary/OmniScience/Concept-473860195",
"label": "Strontium Isotope"
}
],
"institutions": [ ],
"metrics": {
},
"available": true,
"related_links": [ ]
}
I am using $contributors.profile_id from above json to call new endpoint(invokeshttp) (https://api.xxx.com/profile/$.profile_id)
Json response for this
"contributors": [
{
“profile_id”:”cedferfiherhforhforf”
"first_name": “xxx”,
"last_name": "van Baak”,
“other_ids”:[] ,
“Other info”: “deeded” }
I have to call this endpoint depending upon number of object in contributor(let say we have 5 object in contributor ,so I have to call this endpoint 5 time)and combine these 5 response together
Then I have to merge the response(above response to the main response )
just an example:
EvaluateJsonPath to extract "id" into attribute, later join by this attribute
SplitJson to split your json by "contributors"
call endpoint
MergeContent merge by "id" and with count after SplitJson

Resources