Splitting Series into New Study Based on BodyPartExamined

  • I have a CR scanner which cannot split different exams into different StuInsUIDs, and cannot apply a StudyDescription. The scanner DOES use BodyPartExamined correctly, so if I look at a set of 4 studies (under one StuInsUID) I can see which images (one image per series) belong to which study without having to open them individually:


    Code
    [admin] {1.2.392.200036.9107.500.111168513121102020} find ./ -path *.dcm -exec dcmdump {} \; | egrep "StudyDescription|BodyPartExamined" | sort | uniq
    (0008,1030) LO (no value available) # 0, 0 StudyDescription
    (0018,0015) CS [CSPINE] # 6, 1 BodyPartExamined
    (0018,0015) CS [LSPINE] # 6, 1 BodyPartExamined
    (0018,0015) CS [SHOULDER] # 8, 1 BodyPartExamined
    (0018,0015) CS [TSPINE] # 6, 1 BodyPartExamined


    Can I use a builtin command or lua to split the series/images for each BodyPartExamined into a new study, and then map the BodyPartExamined to StudyDescription? What would that look like?

  • Hi


    if you use changeuid to generate a new uid for each studyuid bodypart examined combination it would do the trick.


    [lua]
    ImportConverter0 = Data.StudyInstanceUID = changeuid(Data.StudyInstanceUID .. Data.BodyPartExamined)


    You may want to add checks on Modality, StatioName etc.


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!