1. OpenREM
  2. OpenREM
  3. OpenREM
  4. Issues

Issues

Issue #194 resolved

Check if series description is extracted from DX

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

Hamid

Comments (35)

  1. David Platten

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

  2. Ed McDonagh reporter

    That's fine David Platten - 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.

  3. 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 David Platten, or do you think there is still a need for a new field?

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

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

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

  7. Ed McDonagh reporter

    Where did you see that error Hamid Khosravi?

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

  8. Ed McDonagh reporter

    David Platten 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'.

  9. Ed McDonagh reporter

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

  10. Ed McDonagh reporter

    Hi Hamid Khosravi

    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!

  11. David Platten

    Ed McDonagh , 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()
    
  12. Hamid Khosravi

    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.

  13. Ed McDonagh reporter

    Hi Hamid Khosravi - I fixed that bug in dx_export.py a few hours ago. David Platten 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.

  14. 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
  15. Log in to comment