skip unstable studies
This commit is contained in:
parent
a8667bd41d
commit
25729d169b
@ -132,6 +132,12 @@ public function getStudyDescription(mixed $orthanc_src): ?string
|
|||||||
|
|
||||||
public function transformData(mixed $orthanc_src): array
|
public function transformData(mixed $orthanc_src): array
|
||||||
{
|
{
|
||||||
|
$stable_study = (bool) data_get($orthanc_src, 'IsStable', false);
|
||||||
|
if (! $stable_study) {
|
||||||
|
// do not process unstable studies. wait for next sync when the study becomes stable
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
$orthanc_uuid = strtolower($orthanc_src['ID']);
|
$orthanc_uuid = strtolower($orthanc_src['ID']);
|
||||||
$dicom_tags = $this->getStudyDicomTags($orthanc_uuid);
|
$dicom_tags = $this->getStudyDicomTags($orthanc_uuid);
|
||||||
$routing = DicomStudyRouter::matchStudy($dicom_tags);
|
$routing = DicomStudyRouter::matchStudy($dicom_tags);
|
||||||
@ -171,12 +177,9 @@ public function transformData(mixed $orthanc_src): array
|
|||||||
'study_description' => $descr,
|
'study_description' => $descr,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ((bool) data_get($orthanc_src, 'IsStable', false)) {
|
$study['study_status'] = $stable_study
|
||||||
$study['study_status'] = StudyLevelStatus::Unassigned->value;
|
? StudyLevelStatus::Unassigned->value
|
||||||
} else {
|
: StudyLevelStatus::Pending->value;
|
||||||
$study['study_status'] = StudyLevelStatus::Pending->value;
|
|
||||||
}
|
|
||||||
|
|
||||||
$study['patient_birthdate'] = null;
|
$study['patient_birthdate'] = null;
|
||||||
$dob = data_get($orthanc_src, 'PatientMainDicomTags.PatientBirthDate');
|
$dob = data_get($orthanc_src, 'PatientMainDicomTags.PatientBirthDate');
|
||||||
if (filled($dob)) {
|
if (filled($dob)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user