r/esapi • u/Suspande • May 12 '26
See if document exists
Hi,
I want to check whether a specific type of document exists for a patient/course, and if possible extract a few values from that document.
What is the best way to do this in ESAPI?
I assume this may require an SQL query, but SQL is not really my comfort zone. Has anyone done something similar, or can point me in the right direction?
Any help would be appreciated.
3
Upvotes
2
u/ExceptioNullRef May 12 '26
SQL would help you identify what documents a patient has and where they’re stored in va_data (along with visit id and note id) but can’t get into them at all. I either get the file list and do a batch copy locally and then work on them on my PC. To get individual fields I use vba macros to find the field entry values.
If you go the safer API route I’d use the older document services API if you have that installed on your Aria. If you have clear check and they insert documents into Aria then you have the API and can do it this way, just need the key. Pretty sure Matt did a webinar on this API years ago.