Quality Cards [DRAFT]
- Extension on study cards: to become study wide quality cards
- Study card conditions: based on dicom tags or database/entity fields + multi-values possible
- Flag subjects quality
- Produce a quality report of the controlled data
- Possibility of checking that an exam has at least one T1 and one T2
- Two levels for quality control:
- Add limit rules and block/warn DURING IMPORT
- Post check the EXISTING DATA of a study to see if it respects the rules
- Frontend:
- modification for multi-value condition (works as before with one value)
- tag subject with VALID, WARNING or ERROR in case of quality control study card result
Quality tags are applied to subjects (technically to SubjectStudy entities). 3 levels of quality are defined. Consequences of a determined quality level depend weather the quality card is applied pre or post import.
Level | Pre Import | Post Import |
---|---|---|
VALID | - | green "valid" tag |
WARNING | warning message to user | orange "warning" tag |
ERROR | import is blocked | red "error" tag |
After a quality check, a report is produced and contains
- examination validity and details
- subject name
- ...
The current system has approximations. A StudyCard applies to one acquisition but it can be defined to
- check condition on datasets metadata (such as 0008,103E Series Description)
- in that case the condition is checked only for the first dataset (ObjectUID)
- assign new values to dataset metadata (such as dataset::metadata::comment)
- in that case the assignment is applied to every dataset in the acquisition
In addition to that, for our new quality check, now we have the need of checking that an examination has at least one acquisition that fulfill certain conditions, possibly combined with multiple statements of this type.
We need rules that apply to different levels of the data model.
A StudyCard still applies to one dataset acquisition as the acquisition is the level of data users import in Shanoir.
-
DatasetRule
- applies to a Dataset
- can check conditions on the given dataset (dicom or shanoir metadata)
- can check conditions on the given dataset's parent acquisition (dicom or shanoir metadata)
- assign values to the given dataset's metadata
-
AcquisitionRule
- applies to a DatasetAcquisition
- can check conditions on the given dataset acquisition (dicom or shanoir metadata)
- can check that 0 to ALL dataset children fulfill a condition
- assign values to the given acquisition's metadata
A QualityCard apply to an examination as the need is to validate examinations. Since the outcomes of a QualityCard are :
-
tagging subjects (depending on the linked examination quality)
-
report the quality check for each subject (also depending of the examination quality) So it appears that only examination-level rules are needed for QualityCards.
-
ExaminationRule
- Applies to one Examination
- can check that 0 to ALL dataset children fulfill a condition
- can check that 0 to ALL dataset acquisition children fulfill a condition
- assign tags on the examination's SubjectStudy
- returns a row of a QualityReport about the examination's Subject
Quality Card | Study Card | |
---|---|---|
converter | ✖️ | ✔️ |
dataset acq | ✖️ | ✔️ |
equipment | ✖️ | ✔️ |
study | ✔️ | ✔️ |
conditions | ✔️ | ✔️ |
assignments | ✖️ | ✔️ |
quality tags | ✔️ | ✖️ |
report | ✔️ | ✖️ |
- As we saw Quality Cards and Study Cards have too much differences to share the same model.
- Quality Card rules and Study Card rules have a structural difference that might justify separate tables.
- Among Study Card rules, examination rules and dataset rules are similar enough to share the same table.
NiftiConverter DatasetAcquisition
(1) (*)
| |
| |
(*) (1)
QualityCard (*) ----------- (1) Study (1) ------------ (*) StudyCard (*) ------------ (1) AcquisitionEquipment
(1) (1)
| |
| |
(*) (*)
---------------------- ----------------------- -----------------------
| QualityCardRule | | StudyCardRule | (1) --- (*) | StudyCardAssignment |
---------------------- ----------------------- -----------------------
|- id | |- id | |- id |
|- tag | |- assignments | |- field:ShanoirField |
|- conditions | |- conditions | |- value |
---------------------- ----------------------- -----------------------
(1) (1)
| ---------------------- |
| | StudyCardCondition | |
| ---------------------- |
| |- id | |
------------ (*) |- type | (*) ---------------
|- dicomTag |
|- shanoirField: |
| ShanoirField |
|- values |
|- operation |
----------------------
- a StudyCard has several StudyCardRule and a QualityCard has several QualityCardRule
- a StudyCardRule has assignments whereas a QualityCardRule has a quality tag
- both rule types have the same kind of conditions : StudyCardCondition
- StudyCardCondition has new features
- several values possible (at least one value has to match)
- a condition can be either of 'dicom' of 'shanoir' type
- 'dicom' is a condition on a dicom field
- 'shanoir' is a condition on a metadata field from the Shanoir data model
- StudyCardCondition::shanoirField and StudyCardAssignment::field share the same type (a Java enum)