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

[API] Added features for dicoms : PatientName and images: isPhantom #6899

Merged
merged 43 commits into from
Nov 9, 2020

Conversation

spell00
Copy link
Contributor

@spell00 spell00 commented Aug 12, 2020

Brief summary of changes

Patientname is added to dicoms endpoint view and IsPhantom is added to images endpoint view

Testing instructions

  1. Go to <hostname>/api/v0.0.3/candidates/400162/V6/dicoms/. Under the attribute Tarname, a new attribute should be there: Patientname : "ROM162_400162_V6"

  2. Go to <hostname>/api/v0.0.3/candidates/400162/V6/images/. Each file should have 4 attributes, the last one being the new attribute, IsPhantom: false

@spell00 spell00 force-pushed the 2020-08-11-AddFeaturesViewsFromDTO branch from fa61255 to 79cff9a Compare August 13, 2020 16:40
@spell00 spell00 requested a review from xlecours August 24, 2020 16:20
@spell00 spell00 changed the title [API] New features to view on candidates dicoms and images endpoints [API] Added features dicoms : PatientName and images: isPhantom Aug 24, 2020
@christinerogers christinerogers changed the title [API] Added features dicoms : PatientName and images: isPhantom [API] Added features for dicoms : PatientName and images: isPhantom Aug 24, 2020
Copy link
Collaborator

@driusan driusan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes do not correspond to the API spec.

@xlecours
Copy link
Contributor

@driusan do you mean that the spec should be adjusted in this PR? Or do you object to this change because it does not correspond to the API spec?

@driusan
Copy link
Collaborator

driusan commented Aug 26, 2020

0.0.3 was released, any changes need to go into a new version which incorporates the changes both in the code and the spec for that version

@xlecours
Copy link
Contributor

@driusan Additions do not compromise the specs for existing users. Managing a new version for every modification is a lot of overhead.

@driusan
Copy link
Collaborator

driusan commented Aug 26, 2020

New additions without a new version absolutely compromises the spec. It's an API intended for third party usage. Values can't sometimes exist and sometimes not exist with the same version of the API and no way for the caller to know what it's going to get.

@christinerogers
Copy link
Contributor

@xlecours @driusan Can we find a path forward here or is it better to mark this as Needs Discussion and we'll shelve it until the LORIS meeting?
A new version of the spec could be done but up to you guys when/where we start it from.

@spell00 spell00 added API PR or issue introducing/requiring modifications to the API code Blocked PR awaiting the merge, resolution or rejection of an other Pull Request labels Sep 1, 2020
@spell00
Copy link
Contributor Author

spell00 commented Sep 1, 2020

The feature added in this endpoint is not in the specs for v0.0.3, so the changes suggested in this PR need to be added to the API v0.0.4 initiated in PR #6944, which is in progress.

@christinerogers
Copy link
Contributor

@spell00 is this PR still valid and ready for re-review? If so please re-request review from driusan (click the cycling arrows in the Reviewers list)

@spell00
Copy link
Contributor Author

spell00 commented Oct 20, 2020

@christinerogers It is still blocked by PR #6944

@spell00 spell00 force-pushed the 2020-08-11-AddFeaturesViewsFromDTO branch from ce5b2f1 to 0acacb8 Compare October 29, 2020 16:05
@spell00 spell00 removed the Blocked PR awaiting the merge, resolution or rejection of an other Pull Request label Oct 29, 2020
@spell00 spell00 requested a review from driusan October 30, 2020 01:02
@xlecours
Copy link
Contributor

LGTM except it is failing travis.

@spell00
Copy link
Contributor Author

spell00 commented Oct 30, 2020

@driusan the modifications are now added to the specs of v0.0.4-dev

@spell00 spell00 force-pushed the 2020-08-11-AddFeaturesViewsFromDTO branch from c8f08ee to bc711e6 Compare November 4, 2020 19:27
@spell00 spell00 removed the Blocked PR awaiting the merge, resolution or rejection of an other Pull Request label Nov 5, 2020
@spell00
Copy link
Contributor Author

spell00 commented Nov 5, 2020

@xlecours @driusan It is now passing Travis and ready for final review

@@ -553,6 +553,7 @@ the form:
"OutputType" : "native",
"Filename" : "abc.mnc",
"AcquisitionType" : "t1w/t2w/etc",
"IsPhantom" : true/false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to say this isn't valid js so it's going to be rendered as an error since it's in a JS block, but then I decided to check if it's valid js in my JS console..

>> $x = true / false
Infinity

....

'Tarname' => $dicom->getTarname(),
'SeriesInfo' => array_map(
'Tarname' => $dicom->getTarname(),
'Patientname' => $dicom->getPatientname(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the result for both 0.0.3 and 0.0.4-dev, it needs a version check.

@@ -58,6 +58,7 @@ class Images
'OutputType' => $image->getOutputType(),
'Filename' => $image->getFilename(),
'AcquisitionType' => $image->getAcquisitionprotocol(),
'IsPhantom' => $image->isPhantom(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@spell00 spell00 requested a review from driusan November 6, 2020 06:34
@spell00
Copy link
Contributor Author

spell00 commented Nov 6, 2020

@xlecours @driusan I did the corrections, this is ready for re-review

Copy link
Collaborator

@driusan driusan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, @xlecours does it still look good to you after the latest changes?

@xlecours
Copy link
Contributor

xlecours commented Nov 9, 2020

Looks fine to me, @xlecours does it still look good to you after the latest changes?

yes.
I guess this will be the way to go for new endpoint response format.

  1. switch on version
  2. use a class which name is suffixed by the -dev version.

Once -dev is removed, replace the file by the -dev content then delete -dev.

@driusan
Copy link
Collaborator

driusan commented Nov 9, 2020

I don't think we're committed to that just because it's done that way in 1 place. We can always update the coding style to something more robust later, but since it works for this and the author of the PR is leaving I think we should merge it.

@driusan driusan merged commit 70ae672 into aces:main Nov 9, 2020
@ridz1208 ridz1208 added this to the 24.0.0 milestone Nov 27, 2020
AlexandraLivadas pushed a commit to AlexandraLivadas/Loris that referenced this pull request Jun 29, 2021
…ces#6899)

Patientname is added to dicoms endpoint view and IsPhantom is added to images endpoint view.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API PR or issue introducing/requiring modifications to the API code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants