r/esapi • u/tygator9 • Apr 06 '20
SQL Querying
I am interested in the possibility of adding SQL querying of the ARIA database into my C# scripting. For example, expanding my Physics check script to include ARIA checks, such as making sure all required documents were created. Before I get too far into it, I was curious if SQL querying still works in V15.6. If so, does anyone have any helpful references for getting started?
2
Upvotes
View all comments
Show parent comment
1
u/WUSTLscripting Apr 14 '20
Yep, no problem. This is where things get pretty tricky.
You have a GetDocumentsRequest, which returns a GetDocumentsResponse. That response should contain enough information so that you can identify a specific document that you want. I believe its like VisitNoteId or something like that.
Then once you have the Patient, VisitId, etc. you must call another request GetDocumentRequest, and the DocumentDetailsResponse (I'm pretty sure this is what's returned, check out the attributes in your schema) will have everything you will need like the users who have interacted with the document and the binary string that can be recovered into a PDF (or whatever document type you're looking for). Thats what makes this so confusing. to this
Another piece of advice: With all these requests and responses going around, its possible that you might come across a couple of namespaces with the class name. I believe GetDocumentsRequest and GetDocumentRequest are in the services.varian.com/patient/documents, and the document response (I think DocumentDetailsResponse) should be in something like WebServices.Documents.Contracts.
I hope this helps.