AI Medical Record Processing

I’m doing a 2-phase NER design. It is likely overkill for your use case, but is great for mine (Personal Injury Law). My intake involves an MNLI for domain detection and JSON definitions for categories and sub-categories per domain. It has to discover domain to understand if it is an academic paper, a legal case, a medical record, etc. Then the parsing is to help set it up for two things: 1) chunking (with document summary, section summary, and paragraph summaries, table and chart awareness and footnote awareness) down to the paragraph level, and 2) entity extraction, which requires a proper parsing and domain detection for categories and sub-categories to then select the proper NER for entity extraction and relationship buildings. I use multiple NER models from HF for the medical entity extraction and relationship building, then GliREL for the relationships.

They have a host of open medical NER models for different uses in the medical community. With the proper domain detection, and parsing, you could tag the metadata for specific things easily or summarize it easily, then have that pull the relevant information, including diagnostic coding per procedure.

That’s why I am interested in your project, as yours seems like a more targeted approach to what I am creating and I’m hoping to glean what I can from yours to work on my own. LOL.

But, as you can tell from the description, this is much more involved, code intensive, and requires studying the per model licenses carefully to find models that allow for commercial use without license fees. Then you have the limitations on the Neo4j licensure if you are doing each patient with its own database instead of proper RLS with both restrictions on project (per case or per client ID) and tenant-id restrictions, among other things, to prevent access by unauthorized personnel, etc.

I’m still learning the database management side myself, plus it needs to qualify for HIPAA, which locally hosted, but having the restrictions on access for each patient or client is still needed to guarantee compliance.

I just remembered, there are two reasons to sign up for that, the HIP SDK, which is replaced if you are using the ROCm from AMD Repo (but you should create in the conda env in the active.d folder an env_vars.bat or env_vars.ps1 file with the env keys to switch the reference from the 6.4 HIP ROCm folder to the 7.10 ROCm in your conda/python environment to auto-point to the right files for clang, HIP drivers, etc.). Then there is the downloading for the NPU driver to get that going, which is up to Ryzen AI 1.6.1, which now works in Python 3.12. It is faster than the older 1.5.0.

Installation Instructions — Ryzen AI Software 1.6.1 documentation
https://repo.amd.com/rocm/whl/

With the newer ROCm, you get Torch 2.9 running and newer transformers, among other benefits (like the packages on python 3.12 instead of 3.10). But I am still waiting on 7.0 or 7.1 to be downloadable and easily installed on Windows.

If you need some info on getting that working, let me know. But you will want to create a constraints.txt file for python so that as you install new modules, you do not overwrite the working ones for NPU support or ROCM 7.10 and Torch that are custom to the AMD hardware. You also will want to block other onnxruntime modules from installing and may have to install dependencies manually when it tries to install the wrong onnxruntime and it is blocked by the constraints.txt file. Maintaining your python dev. env. is essential.