Question
· Jul 10, 2020

Importing CSV Files into the ECR

We have a bunch of CSV files of a few different types, which contain patient and medication data, among other things, which we need to load into Healthshare, so the information can be compiled together and then viewed from the Clinical Viewer/reports made on the data as well.

I cannot find a straightforward example or any documentation about this particular case, which I would expect to be fairly common. All I could find was this: Using a Record Map in a Production When you choose to generate an object class on the Record Mapper page, you create a class that you can use in a business service of a production.

I am trying to do the most simple first step I could think of, which is to create a Record Map from one of the CSV, a DTL to map this new Record to the existing SDA (we will need to extend it at a later stage, but we're not there yet), a EnsLib.RecordMap.Service.FileService to pick up a sample file with a header and a single row of data, which communicates with an HS.Gateway.SDA3.InboundProcess, which would communicate with HS.Gateway.ECRManager.

I based this setup off of one of the courses I took in the online learning section, I think it was Extending the SDA (That course received an XML with patient data, transformed it and loaded it into an SDA, then into the ECR), but cannot verify at this moment because the lab won't load).

I have selected the appropriate map in the service, the right DTL Pipeline, and I get errors that the property ContentStream does not exist. I am guessing I'm misisng a middleman between the SDA3.InboundProcess and the RecordMapService.

So I tried the EnsLib.MsgRouter.Routing with nothing but a send : Data Transform To the SDA3.InboundProcess.

I had some errors with the Map to SDA which i fixed. Now I get the error: ERROR #5002: ObjectScript error: <PROPERTY DOES NOT EXIST>zOnRequest+24 ^HS.Gateway.SDA3.InboundProcess.1 *MPIUpdateFlag,EnsLib.EDI.XML.Document

 This process should be fairly straightforward, can anyone tell me what it is that I am doing wrong? Or how to do this really simple task?

Thank you!

Discussion (3)1
Log in or sign up to continue

You're missing one step. The SDA your DTL is producing is in the form of an XML vDOC (EnsLib.EDI.XML.Document) which is using the SDA schema. The SDA3.InboundProcess needs to receive an HS.Message.ECRUpdateRequest with the raw XML for the SDA stored in its contentstream property. To fix this, you can create a second DTL which takes the EnsLib.EDI.XML.Document as input and outputs an ECRUpdateRequest. In the DTL you'll just need to call the VDoc's method to generate the XML stream and then set ECRUpdateRequest.ContentStream to that stream.

I failed to notice the 2nd reply earlier, but after putting it into practice it works!

Now I am getting errors pertaining to a missing patient MRN when the system tries to update the registry, which probably has to do with the original DTL (although I have an entry in PatientNumbers() so I am not sure what else it could be), so I'll play with that a bit and see what I can do.

Re-edit: Ah! Needed to set the NumberType property. Moving along now :)

Thank you for your quick help!