|
@@ -0,0 +1,44 @@
|
|
|
+import { Task, RegisterWorkResponse } from '../../API/patient/workActions';
|
|
|
+
|
|
|
+const mapToTask = (data: RegisterWorkResponse['data']): Task => {
|
|
|
+ return {
|
|
|
+ StudyInstanceUID: data.study_instance_uid,
|
|
|
+ StudyID: data.study_id,
|
|
|
+ SpecificCharacterSet: data.specific_character_set,
|
|
|
+ AccessionNumber: data.accession_number,
|
|
|
+ PatientID: data.patient_id,
|
|
|
+ PatientName: data.patient_name,
|
|
|
+ DisplayPatientName: data.patient_name,
|
|
|
+ PatientSize: data.patient_size,
|
|
|
+ PatientAge: data.patient_age,
|
|
|
+ PatientSex: data.patient_sex,
|
|
|
+ AdmittingTime: data.admitting_time || '',
|
|
|
+ RegSource: data.reg_source,
|
|
|
+ StudyStatus: data.study_status,
|
|
|
+ RequestedProcedureID: '',
|
|
|
+ PerformedProtocolCodeValue: '',
|
|
|
+ PerformedProtocolCodeMeaning: '',
|
|
|
+ PerformedProcedureStepID: '',
|
|
|
+ StudyDescription: data.study_description,
|
|
|
+ StudyStartDatetime: data.study_start_datetime || '',
|
|
|
+ ScheduledProcedureStepStartDate:
|
|
|
+ data.scheduled_procedure_step_start_date || '',
|
|
|
+ StudyLock: data.study_lock,
|
|
|
+ OperatorID: data.operator_name,
|
|
|
+ Modality: data.modality,
|
|
|
+ Views: [],
|
|
|
+ Thickness: data.thickness,
|
|
|
+ PatientType: data.patient_type,
|
|
|
+ StudyType: data.study_type,
|
|
|
+ QRCode: '',
|
|
|
+ IsExported: data.is_exported,
|
|
|
+ IsEdited: data.is_edited,
|
|
|
+ WorkRef: '',
|
|
|
+ IsAppended: data.is_appended,
|
|
|
+ CreationTime: '',
|
|
|
+ MappedStatus: data.mapped_status,
|
|
|
+ IsDelete: false,
|
|
|
+ };
|
|
|
+};
|
|
|
+
|
|
|
+export default mapToTask;
|