Open fedorov opened 1 year ago
Not currently. Will work on adding these as an attribute.
Actually, StudyDescription and SeriesDescription are attributes that can be requested from the query endpoint, e.g:
bcliffor@etl-dev-whc:~$ curl -X POST "https://api.imaging.datacommons.cancer.gov/v1/cohorts/query/preview? \ sql=False&page_size=3" -H "accept: application/json" -H "Content-Type: application/json" \
-d "{ \"cohort_def\": { \"name\": \"mycohort\", \"description\": \"Example description\", \"filters\": { \"collection_id\": [ \"tcga_luad\", \"tcga_kirc\" ], \"Modality\": [ \"CT\", \"MR\" ], \"race\": [ \"WHITE\" ] } }, \"queryFields\": { \"fields\": [ \"StudyDescription\",\"SeriesDescription\",\"Modality\" ] }}" | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1273 100 1001 100 272 686 186 0:00:01 0:00:01 --:--:-- 872
{
"code": 200,
"cohort_def": {
"description": "Example description",
"filterSet": {
"filters": {
"Modality": [
"CT",
"MR"
],
"collection_id": [
"tcga_luad",
"tcga_kirc"
],
"race": [
"WHITE"
]
},
"idc_data_version": "14.0"
},
"filters": {
"Modality": [
"CT",
"MR"
],
"collection_id": [
"tcga_luad",
"tcga_kirc"
],
"race": [
"WHITE"
]
},
"name": "mycohort",
"sql": ""
},
"next_page": "gAAAAABklOKRwwlXp1-Jz2zdu3tpov1AFpmRwPKDxgtvX7o9-ZveyqVJU28oLXcZg9Ce6Qbl96Zukvz8yAII98euuaG3UZM5VpahQupXasvt4q4lDH4ovYvgNjaRS6hTVPEFWpOEDZbbv7wV3gbtGYvn1kKuI1DrL_iXLx8RCMhwO7fdDLsSZojZdsC-HK7fPEU7igHwQjU4M53YdvbS0Pj1beA2kLhbB5gskx-ihr2_q6ZxVIqpxVwotspTDNN35jqiE2G9ACmy6PDsFiB0ThJVPrfiYPj35K_0-vyOD5Eae4J0YWK2-7ridbhMRR1FfxG8DBIhWs70",
"query_results": {
"json": [
{
"Modality": "MR",
"SeriesDescription": "MIPSeries0008_____10120844",
"StudyDescription": null
},
{
"Modality": "MR",
"SeriesDescription": "RENALS/BRIGHT_BLOOD_AXIALS",
"StudyDescription": null
},
{
"Modality": "MR",
"SeriesDescription": "RENALS/CORONAL_TRUE_FISP_B",
"StudyDescription": null
}
],
"rowsReturned": 3,
"totalFound": 3786
}
}
Great news! How can I discover which attributes are possible to query?
There isn't an endpoint for that in the public API, an oversight. I am adding an endpoint, /fields or /queryFields. There is an /attributes endpoint, but those are really filters and I think that I should rename the endpoint accordingly. In the meantime, here is the list of query fields that will be supported in the next API release: "Apparent_Diffusion_Coefficient", "tcia_species", "Modality", "tcia_tumorLocation", "AnatomicRegionSequence", "SegmentedPropertyCategoryCodeSequence", "SegmentedPropertyTypeCodeSequence", "Volume", "Diameter", "Surface_area_of_mesh", "Internal_structure", "Sphericity", "Calcification", "Lobular_Pattern", "Spiculation", "Margin", "Texture", "Subtlety_score", "Malignancy", "BodyPartExamined", "SOPClassUID", "collection_id", "StudyDescription", "StudyInstanceUID", "PatientID", "SeriesInstanceUID", "SOPInstanceUID", "SeriesDescription", "SliceThickness", "SeriesNumber", "StudyDate", "Manufacturer", "ManufacturerModelName", "license_short_name", "analysis_results_id", "SamplesPerPixel", "Volume_of_Mesh", "Sphericity_quant", "illuminationType", "primaryAnatomicStructure", "ObjectiveLensPower", "min_PixelSpacing", "max_TotalPixelMatrixColumns", "max_TotalPixelMatrixRows",
Ok, thanks - let me know when the next API release is available.
I think it would also be good to add PatientSex to the list.
Also, didn't we introduce a source-neutral equivalents of tcia_species and tcia_tumorLocation?
We added collection_species and collection_tumorLocation. Did you ask Suzanne to add those to the pivot? I
It would be really helpful if you could sort it out with Suzanne directly.
Related issue/blocker: https://github.com/ImagingDataCommons/IDC-WebApp/issues/1219.
I cannot figure out how to do that. If this is not possible, those capabilities should be added, since it is possible to get them in the portal.