Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get StudyDescription and SeriesDescription? #81

Open
fedorov opened this issue Jun 6, 2023 · 9 comments
Open

Is it possible to get StudyDescription and SeriesDescription? #81

fedorov opened this issue Jun 6, 2023 · 9 comments
Assignees

Comments

@fedorov
Copy link
Member

fedorov commented Jun 6, 2023

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.

@bcli4d
Copy link
Member

bcli4d commented Jun 6, 2023

Not currently. Will work on adding these as an attribute.

@bcli4d
Copy link
Member

bcli4d commented Jun 23, 2023

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
  }
}

@fedorov
Copy link
Member Author

fedorov commented Jun 23, 2023

Great news! How can I discover which attributes are possible to query?

@bcli4d
Copy link
Member

bcli4d commented Jun 23, 2023

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",

@fedorov
Copy link
Member Author

fedorov commented Jun 26, 2023

Ok, thanks - let me know when the next API release is available.

@fedorov
Copy link
Member Author

fedorov commented Jun 26, 2023

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?

@bcli4d
Copy link
Member

bcli4d commented Jun 29, 2023

We added collection_species and collection_tumorLocation. Did you ask Suzanne to add those to the pivot? I

@fedorov
Copy link
Member Author

fedorov commented Jun 30, 2023

It would be really helpful if you could sort it out with Suzanne directly.

@fedorov
Copy link
Member Author

fedorov commented Jun 30, 2023

Related issue/blocker: ImagingDataCommons/IDC-WebApp#1219.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants