.
This commit is contained in:
+6
-2
@@ -388,18 +388,22 @@ class Case(models.Model, AuthorMixin):
|
|||||||
examinations = [series.get_examination() for series in self.series.all()]
|
examinations = [series.get_examination() for series in self.series.all()]
|
||||||
return f"{self.pk}:{self.title} {'/'.join([str(c) for c in self.condition.all()])} [{', '.join(examinations)}]"
|
return f"{self.pk}:{self.title} {'/'.join([str(c) for c in self.condition.all()])} [{', '.join(examinations)}]"
|
||||||
|
|
||||||
def get_case_dicom_json(self):
|
def get_case_dicom_json(self, case_title_as_patient_name = True):
|
||||||
series_json = []
|
series_json = []
|
||||||
for series in self.series.all():
|
for series in self.series.all():
|
||||||
series_json.append(series.get_series_dicom_json())
|
series_json.append(series.get_series_dicom_json())
|
||||||
|
|
||||||
|
patient_name = ""
|
||||||
|
if case_title_as_patient_name:
|
||||||
|
patient_name = self.title
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"studies": [
|
"studies": [
|
||||||
{
|
{
|
||||||
"StudyInstanceUID": "1.3.6.1.4.1.14519.5.2.1.6279.6001.298806137288633453246975630178",
|
"StudyInstanceUID": "1.3.6.1.4.1.14519.5.2.1.6279.6001.298806137288633453246975630178",
|
||||||
"StudyDate": "20000101",
|
"StudyDate": "20000101",
|
||||||
"StudyTime": "",
|
"StudyTime": "",
|
||||||
"PatientName": "",
|
"PatientName": patient_name,
|
||||||
"PatientID": "LIDC-IDRI-0001",
|
"PatientID": "LIDC-IDRI-0001",
|
||||||
"AccessionNumber": "",
|
"AccessionNumber": "",
|
||||||
"PatientAge": "",
|
"PatientAge": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user