Check if series description is extracted from DX
Copied from email
There is a field in DX which needs to be extracted if a series of images are taken like skeletal survey and it is Series Description which its tag is 0008,103E.
Best Regards
Hamid
Comments (35)
-
reporter -
reporter - edited description
-
Hi @edmcdonagh . The two radiographic rooms that I have connected to OpenREM only populate the Series Description tag - the others are blank. So what ever we do, I need to continue to use the text that is contained in Series Description elsewhere...
-
reporter That's fine @dplatten - we can do both. If all the proper tags exist, use them. If only series description exists, use it instead. If multiple exposures exist with no study description, and the series descriptions are not equal, put a new value at the study level, such as Multiple.
-
Hi @edmcdonagh . It looks like we need to add a field in the database to hold Series Description, but I'm not sure where it should go. Any help appreciated...
-
Looks like it would be most sensible to go as a new field in IrradEventXRayData. Thoughts?
-
reporter At the top level:
- StudyDescription should go in study_description of GeneralStudyModuleAttr.
- If there is no StudyDescription, populate with SeriesDescription initially.
At the event level:
- ProtocolName should go in the acquisition_protocol of IrradEventXRayData.
- If there is no ProtocolName, populate with SeriesDescription.
- If both ProtocolName and SeriesDescription exist, append the SeriesDescription to the comment field?
If there is more than one event:
- For each event check StudyDescription (or SeriesDescription if no StudyDescription) against study_description. If they differ, modify to indicate this, eg 'Multiple'.
Does this make sense @dplatten, or do you think there is still a need for a new field?
-
Hi @edmcdonagh . That looks good to me - I'll implement it at some point soon.
-
reporter For my DX modalities:
- Kodak:
- Study Description = Protocol Name (ADULT CHEST),
- Series Description differs (PA, LAT etc)
- Siemens:
- Series Description = Protocol Name (W033 Chest p.a.),
- Study Description more generic (XR Chest)
- GE: All different!
- Study Description (XR Chest),
- Series Description (Chest),
- Protocol Name (CHEST)
Skeletal survey isn't very usefully labelled on Kodak, as the series description is just PA, LAT etc. Our Siemens is no better (Luminos dRF), with each image of a multiple exposure study getting the same series description and protocol name. I haven't got any multiple exposure studies on our mobile GE Optima 220 AMXs.
- Kodak:
-
reporter Thanks @dplatten
-
reporter -
assigned issue to
-
assigned issue to
-
For my GE_Discovery:
* 0008,1030 Study Description: SKELETAL SURVEY SERIES * 0008,103E Series Description: Foot * 0018,0015 Body Part Examined: FOOT * 0018,1030 Protocol Name: SKELETAL_SURV_SERIES-PED
Thanks Ed and David
-
Added code to deal with series description more correctly. This modification references issue
#194. In particular, I think it does all that Ed suggested except for the part about checking for more than one event. Not sure how to do that bit.→ <<cset df44cf1b39fb>>
-
I see some errors which says cannot import name "GenetalStudyModuleAttr".
-
reporter Where did you see that error @hrkhosravi?
In general you should wait for the next release, but in this case I think you could replace the dx.py file in openrem/remapp/extractors/ with this one, and delete the dx.pyc file (it is automatically compiled on first use).
-
reporter @dplatten it is probably not too important, but I was thinking along the lines of how for mammography the laterality of the study is initially set to the laterality of the first image, but if a subsequent image of the other side is added to the study, it is reset to 'both'.
-
Please see the attache file as the error.
-
reporter @hrkhosravi have you upgraded to 0.5.1 or are you still on 0.5.0?
If you are using 0.5.1, this won't work, as the database class names have changed and what was General_study_module_attributes is now GeneralStudyModuleAttr.
-
Thanks Ed! I'm still on 0.5.0
-
reporter Added Issue
#196to add comment field to export and detail view. -
reporter -
So this is in Relative exposure column an in microGy, right?
-
reporter No, from looking at the code from my phone, it looks like that isn't exported either :(
I'll add it to the existing issue.
-
reporter Hi @hrkhosravi
The current version of openrem/remapp/exports/dx_export.py will export the entrance exposure as requested, as well as the comment field. However, the comment field doesn't appear to be being filled as expected. We'll have to try and work out why!
-
@edmcdonagh , is the following code (in dx.py) correct? It looks like it is using old-style field names to me:
def _irradiationeventxraydetectordata(dataset,event): from remapp.models import IrradEventXRayDetectorData from remapp.tools.get_values import get_value_kw, get_or_create_cid detector = IrradEventXRayDetectorData.objects.create(irradiation_event_xray_data=event) detector.exposure_index = get_value_kw('ExposureIndex',dataset) detector.relative_xray_exposure = get_value_kw('RelativeXRayExposure',dataset) manufacturer = detector.irradiation_event_xray_data.projection_xray_radiation_dose.general_study_module_attributes.generalequipmentmoduleattr_set.all()[0].manufacturer.lower()
-
Hi,
Using this new dx_export.py file, export task can't be completed due to some errors as below in Celery task queue :
FieldError: Cannot resolve keyword 'projection_Xray_radiation_dose' into field. Choice are : accession_number,ctradiationdose, generalequipmentmoduleattr,......, study_time.
-
Series description now extracted and displayed in comments field on dxdetail.html. References issue 194.
→ <<cset 14b85770048c>>
-
reporter Hi @hrkhosravi - I fixed that bug in dx_export.py a few hours ago. @dplatten has now further updated dx.py so if you update both files you should see what you want.
Make sure you restart Celery, as it caches the tasks (dx_export.py) when it starts.
You won't be able to make use of the new dxdetail.html as that relies on a lot of the other changes that are in process for the next version.
-
reporter @dplatten regarding https://bitbucket.org/openrem/openrem/issue/194/check-if-series-description-is-extracted#comment-16940242 yes, I think that looks fine. When we're going one way through the tables the naming is underscore_separated (foreign keys that are named in the models), and when we go the other way they are alloneword (the automatically generated foreign keys.
Is that what you were referring to?
-
Thanks a lot for your efforts. But still there is no useful information (series description or body part examined ) in comment field. For example in my 433 images just I can see series description for 4 image, while if series description or body part examined is extracted, the problem will be solved.
- 0008,103E Series Description
- 0018,0015 Body Part Examined
-
reporter Now exports the value of Anatomical_structure in the dx_export. Refs
#194.→ <<cset cb7b929cf27b>>
-
reporter @hrkhosravi you might like to update your copy of dx_export.py, restart Celery, and try again... I think you'll like what you see.
Regarding the series description, I'll need to come back to testing that later.
-
That's it! Thanks a lot!
-
If series description exists then it is put in the event.comments field. This works for me on my live system - the series description text appears on dxdetail.html. References issue
#194.→ <<cset a5829f80f0ca>>
-
- changed status to resolved
This has been fixed. If series description exists then it is put in the event.comments field. The series description text appears on dxdetail.html.
- Log in to comment
@dplatten it looks like we only extract the series description if the protocol name is missing, which won't be what we want for multiple exposure studies like skeletal surveys.