EMPIDemo
A Patient similarity comparison demo running on IRIS for Health with vector search.
The similarity is calculated using vector search to compare vectorized personal attributes such as name, DOB, address, etc. between different patients. The higher the score is, the more likely the compared patients are the same person.
This demo is referring to sentence-transformers model to convert text into vectors then use IRIS vector functions to store,read and compare the vectors.
Installation
- Clone this repo
- text2vec-base-chinese is referred in this demo but not included because of it’s size. You may want to download it to any directory on your local machine. i.e, D:\Coding\EMPIDemo\image-iris\llm\text2vec-base-chinese in this demo, then change the directory in volumes section of the docker-compose.yml file. Theoretically any other sentence-transformers model who can be ran alone should work too, while you may need to adjust the initiating parameters according to its document.
- Start the Docker container
Please be aware that the program will download and install Python sentence-transformers module and also install a FHIR repository to store patient info, consequentely it will take about 15~16GB disk storage.
Try the demo
- A demo patient info input UI
- IRIS Procuction handling the requests
- Related codes
Embedded python is used to invoke the sentence-transformer to perform vectorization, which can be found in MPIDemo.Util.Vector
Vector search is used to calculate similarity between patients, which can be found in EMPIDemo.REST.Service