From 862b0aad4c57e715f602be08207d821cf2777555 Mon Sep 17 00:00:00 2001 From: mart-r Date: Tue, 18 Nov 2025 11:44:28 +0000 Subject: [PATCH] CU-869b75fhg: Fix issue with actual DeID in anon cat demo. The deid_text method in medcat.utils.ner was deprecated in favour of using the instead. However, the change in #223 removed the import (probably because otherwise it failed due to an import error) without replacing it with the new alteranative. This PR fixes that. --- anoncat-demo-app/app/anoncat/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anoncat-demo-app/app/anoncat/views.py b/anoncat-demo-app/app/anoncat/views.py index 2fdd892ec..ac5189d10 100644 --- a/anoncat-demo-app/app/anoncat/views.py +++ b/anoncat-demo-app/app/anoncat/views.py @@ -1,5 +1,5 @@ from django.shortcuts import render -from medcat.cat import CAT +from medcat.utils.ner.deid import DeIdModel as CAT from rest_framework.decorators import api_view from rest_framework.response import Response @@ -23,7 +23,7 @@ def deidentify(request): input_text = request.data['text'] redact = request.data['redact'] - output_text = deid_text(cat, input_text, redact=redact) + output_text = cat.deid_text(input_text, redact=redact) # Save the form data to the DeidentifiedText model text = DeidentifiedText()