Friends,
We have a situation which I am sure anyone with a moderate amount of Ensemble coding experience would be able to solve in a short space of time. Ensemble needs to read HL7 messages from SQL Server, the Ensemble Service would send them straight on to the Business Operation (no re-formatting of messages is required) and then there would be a socket connection between the BO and target system. .
Connectivity is not the problem as SQL Server data can be displayed in the Management Portal without any problem. Here’s what I have done so far:
1/ Created a namespace with nothing in it apart from modules relating to the scenario described above.
2/ Created a production with an inbound service (HL7InboundFromSQL) and outbound operation (HL7Out).
3/ Informational Settings / Class name in the BS contains the name of a class (PkgPhilTest3.Services.Inbound) which has been created within Studio.
3/ 'Basic Settings' – Call Interval, DSN and Credentials all contain appropriate values
4/ 'Data Settings' within the Service are as follows: Query, 'select row_id, hl7message from dbo.ensemble_hl7', Parameters and Delete Query are both blank and Key Field Name reads 'ROW_ID'. ROW_ID is the PK in the SQL table.
5/ Class PkgPhilTest3.Services.Inbound currently reads as follows:
Class PkgPhilTest3.Services.HL7Inbound Extends Ens.BusinessService [ ProcedureBlock ]
{
Parameter ADAPTER
= "EnsLib.SQL.InboundAdapter";
Method OnProcessInput(pInput As EnsLib.SQL.Snapshot, Output pOutput As %RegisteredObject) As %Status
{
set req=##class(ESQL.request).%New()
set req.HL7MESSAGE=pInput.Get("HL7MESSAGE")
set sc=..SendRequestSync("HL7Out",req,.pOutput)
quit sc
}
}
6/ I am thinking that the coding within Class PkgPhilTest3.Services.HL7Inbound is not as it should be, also perhaps a message class needs to be created (?)
7/ When the production is started, the following error is displayed:
HL7InboundFromSQL Processing row ROW_ID '1000005'
HL7InboundFromSQL ERROR <Ens>ErrException: <CLASS DOES NOT EXIST>zOnProcessInput+1 ^PkgPhilTest3.Services.HL7Inbound.1 *ESQL.request -- logged as '-' number - @' set req=##class(ESQL.request).%New()'
8/ There are 11 rows in the SQL table, the above error is displayed for each row.
9/ Maximum HL7 record length coming in from SQL Server is unlikely to exceed 6,000 characters and the associated column in the SQL Server table is defined as varchar(max) – not sure if this is relevant or not. Table definition as follows:
CREATE TABLE [dbo].[ENSEMBLE_HL7](
[ROW_ID] [int] IDENTITY(1000005,1) NOT NULL,
[HL7MESSAGE] [varchar](max) NOT NULL,
CONSTRAINT [PK_ENSEMBLE_HL7] PRIMARY KEY CLUSTERED
All suggestions gratefully appreciated.
Thanks, Phil
--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dom and Lawrence, thanks for the replies. Dom – I think I will need to do some research on message classes and extending them etc. because I have very little experience with this kind of thing. To explain – my background with regard to Interface Engines is all eGate based (Monk not Java) and we are currently in the process of migrating from eGate to Ensemble. Yours truly landed the job of getting Ensemble and SQL Server to talk to each other and I’ve been hammering away at this problem on and off for a couple of weeks now.
Lawrence – if by 'SQL Code' you mean the select statement (select row_id, hl7message from dbo.ensemble_hl7) then this is located in the production GUI which resides within the specially created namespace. The create table statement was included to provide extra information and resides within SQL Server. Apart from that, the credential was created within this namespace and DSNs seem to be independent of namespaces.
--
hi Andy,
Thanks for the offer of help, I was thinking it might be better to continue this conversation within this forum as it is quite possible there will be others who might find this thread to be useful. Obviously there are coding errors within PkgPhilTest3.Services.Inbound, would it be true to say that once these are sorted out then things will start moving? I am looking at an Intersystems pdf on SQL adapters but it would be good if you could provide a few pointers.
Regards, Phil