radiology-research / ispy2_mri

GUI to enter info on incoming MRI's for ISPY2 into database
GNU General Public License v3.0
0 stars 0 forks source link

Discrepancy Ordering #13

Open RossBoylan opened 11 months ago

RossBoylan commented 11 months ago

The order of discrepancies (as of v0.1.0 prerelease) may be scrambled relative to the web application because they are out of numerical order. The current order is not alphabetic either.

        box.addWidget(self.discrep13)
        box.addWidget(self.discrep14)
        box.addWidget(self.discrep15)
        box.addWidget(self.discrep16)
        box.addWidget(self.discrep17)
        box.addWidget(self.discrep18)
        box.addWidget(self.discrep19)
        box.addWidget(self.discrep20)
        box.addWidget(self.discrep21)
        box.addWidget(self.discrep1)
        box.addWidget(self.discrep2)
        box.addWidget(self.discrep3)
        box.addWidget(self.discrep4)
        box.addWidget(self.discrep5)
        box.addWidget(self.discrep6)
        box.addWidget(self.discrep9)
        box.addWidget(self.discrep10)

Anyway, check what's going on and get it to match original order, if it doesn't.

This may be OK. The generating code has

        for r in self.curs.execute('SELECT id, deviation FROM dbo.ispy2_deviation_reason\
                   ORDER BY position ASC'):
            rid = int(r[0])
            if rid in (7, 8, 11, 12):
                # skip
                continue
            des = r[1]
            section.addInput(CustomCheck(f"discrep{rid}", f"{des}", rid))

so the ordering is likely coming from the position field in the database, which is probably also used by the web form.

RossBoylan commented 11 months ago

Ordering is OK, except that it would be good to have the text box for late exam submission right after the check box. That text will have how late it is. Usually it is integer number of days, but allow for text.