Populate `patient_table_relationship` from Siemens Zee comment field
Proper field is not supplied in the RDSR, but the position is supplied in the comment field.
A quick review suggests that this comment is not currently stored in the database (so cannot be retrospectively populated).
Required for and refs #61
Comments (16)
-
reporter -
reporter I think from a brief look at the RDSR that the comment field is at the root, ie the GeneralStudyModuleAttr level. We don't have a comment field in that model, but I don't think we need to actually record the comment, we just need to read it, extract the patient orientation information and store that in the appropriate place.
-
Thanks. How do I get the correct cid if I just have a text entry of "HFS"?
-
reporter Something along the lines of:
if orientation.strip().lower() == 'hfs': event.patient_table_relationship_cid = get_or_create_cid('F-10470', 'headfirst') event.patient_orientation_cid = get_or_create_cid('F-10450', 'recumbent') event.patient_orientation_modifier_cid = get_or_create_cid('F-10340', 'supine')
The codes and meanings can be found in the tables linked from the Irradiation Event X-Ray Data template.
We'd need to go through and populate those fields for each exposure too, as it's a per-exposure field. And assume that they patient doesn't get moved. I'm not sure if you can change the orientation mid-procedure anyway?
-
Great.
How do I get the value back out?
irrad.irradeventxraysourcedata_set.get().patient_orientation_cid.codeValue
?
-
reporter It should be
patient_orientation_cid.code_value
and.code_meaning
I think -
reporter Hopefully turned everything the right way around again. Refs
#432,#61→ <<cset f9e827b67129>>
-
reporter Reapplying tooltip fix from commit b32b416. Now 'appears' to work. Refs
#432and#61→ <<cset 55804633227f>>
-
reporter I am happy to confirm that the skin maps generated and displayed by branch merge432andskin match the relative positions and angles irradiated on my phantom for both the head first supine and head first prone studies. The foot first supine does not display, though it may be that I didn't leave enough length for the legs at the top of the table, and therefore the assumptions leave all the irradiation in the legs which are not modelled.
The tool tips also work, displaying dose to 2 significant figures.
@dplatten and @jacole, if you don't object I propose to merge this branch into develop and delete the other two branches. Any further development for this feature can then be branched from develop.
-
Excellent - glad it works.
Please go ahead with the merge.
-
reporter - changed status to resolved
Closing this as fixed. I'm going to leave both issue432orientationzee and skin_dose_maps_enabled for now in case we need to review something down the line.
-
Great, thanks Ed.
-
@edmcdonagh, there's still a issue432orientationzee branch that seems to say it is slightly ahead of develop, but it doesn't show any differences. Is the issue432orientationzee branch the same as develop?
-
reporter I think so. It might be to do with the fact develop was merged into issue432orientationzee, so develop doesn't have that commit.
Everything from this branch was merged into develop back in October, so I think we should delete it now.
-
reporter Having said that,
#432isn't in changes yet... -
@edmcdonagh, the commits in this issue do seem to be present in develop. Looks like we just need to add this issue to the changes files.
- Log in to comment
Code exists elsewhere in rdsr.py to extract the II Diameter from other comment fields, making use of the XML style of the comment. See for example line 241