Check if series description is extracted from DX

Issue #194 resolved
Ed McDonagh created an issue

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


Comments (35)

  1. Ed McDonagh reporter

    @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.

  2. David Platten

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

  3. Ed McDonagh 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.

  4. David Platten

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

  5. Ed McDonagh 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?

  6. Ed McDonagh 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.

  7. Hamid Khosravi

    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

  8. David Platten

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

  9. Ed McDonagh 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 file in openrem/remapp/extractors/ with this one, and delete the dx.pyc file (it is automatically compiled on first use).

  10. Ed McDonagh 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'.

  11. Ed McDonagh 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.

  12. Ed McDonagh 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.

  13. Ed McDonagh reporter

    Hi @hrkhosravi

    The current version of openrem/remapp/exports/ 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!

  14. David Platten

    @edmcdonagh , is the following code (in correct? It looks like it is using old-style field names to me:

    def _irradiationeventxraydetectordata(dataset,event):
        from remapp.models import IrradEventXRayDetectorData
        from 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()
  15. Hamid Khosravi


    Using this new 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.

  16. Ed McDonagh reporter

    Hi @hrkhosravi - I fixed that bug in a few hours ago. @dplatten has now further updated so if you update both files you should see what you want.

    Make sure you restart Celery, as it caches the tasks ( 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.

  17. Hamid Khosravi

    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
  18. Ed McDonagh reporter

    @hrkhosravi you might like to update your copy of, 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.

  19. David Platten

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

  20. David Platten

    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.

  21. Log in to comment