Skip to content

Commit

Permalink
feat: Pipeline update
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Nov 25, 2024
1 parent f75ee38 commit 4084bc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/Pacs/components/SeriesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ const tagOptions = [
{ label: "PatientName", value: "PatientName" },
{ label: "PatientID", value: "PatientID" },
{ label: "PatientBirthDate", value: "PatientBirthDate" },
{ label: "InstitutionName", value: "InstitutionName" },
{ label: "ReferringPhysicianName", value: "ReferringPhysicianName" },
{ label: "Institution", value: "Institution" },
{ label: "Physician", value: "Physician" },
{ label: "AccessionNumber", value: "AccessionNumber" },
];

Expand Down
14 changes: 11 additions & 3 deletions src/components/Pacs/components/usePipelinesMutation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const handlePipelineCreation = async (payload: MutationPayload) => {
const pipelines = pipelineList.getItems() as Pipeline[];
if (pipelines.length === 0) {
throw new Error(
"The pipeline 'DICOM anonymization, extract, image conversion v20231027' is not registered.",
"The pipeline 'DICOM anonymization simple v20230926' is not registered.",
);
}
const selectedPipeline = pipelines[0];
Expand Down Expand Up @@ -175,10 +175,18 @@ function updateTagInfoParam(tagInfoParam: any, formData: AnonymizeTags): any {
}
});

// Update tagMap with formData values
// Update tagMap with formData values without adding the "Institution" or "Physician" keys directly
Object.entries(formData).forEach(([tagName, formValue]) => {
if (formValue) {
tagMap[tagName.trim()] = formValue.trim();
let formattedTagName = tagName.trim();
if (tagName === "Institution") {
// Map "Institution" to "re:.*stitution"
formattedTagName = "re:.*stitution";
} else if (tagName === "Physician") {
// Map "Physician" to "re:.*hysician"
formattedTagName = "re:.*hysician";
}
tagMap[formattedTagName] = formValue.trim();
}
});

Expand Down

0 comments on commit 4084bc8

Please sign in to comment.